Skip to content
Snippets Groups Projects
Commit 47281e1f authored by Stefano Rosati's avatar Stefano Rosati
Browse files

Revert "First version of the MicroMega RDO->PRD conversion alg and tool"

This reverts commit 02d4f9bc [formerly 4f87a807f5babf5c7d9e3dabd90f9f469dca1d60].


Former-commit-id: 3f5c56c463c9b94fb87214a7cda60a5a83f81cf2
parent 02d4f9bc
No related branches found
No related tags found
37 merge requests!46457Draft: Adding the tools to run over data,!46454Draft: Adding the tools to be able to run over data,!44869Draft: Update to candidate store,!4217921.9-first_steps-InDetTrackingGeometryXML,!39162Draft: Insert BCM' support,!38765Bis78 cabling,!36893Fix size of RPC active region in BIS78 and strip material,!3645821.9: Improving material map description (ATLITKSW-127),!36293WIP pixel updates,!34993KF-input adding jXERHO to the AOD outputs,!34864LH rings in front ot HR rigs,!34763Fix L1_4jJ15.0ETA25 item definition (ATR-21261),!33996WIP: Correct MM zpositions,!3291021.3 salva s0,!3217421.9 - Bug fix for test stream creation in RD53BEncodingTool,!3135321.3,!3134821.9 README Update,!31136added also PUsub for LargeR jets,!31123WIP: Master ttmdev,!3036121.9 fixing bug with layer indices in PixelRDOAnalysis,!28623Overlay as part of FastChain transform in 21.3,!28497ART tests - fixing the bugs,!27668Massimos 21.3 bis78,!27254WIP: Exclusive jets request -- Fix ExclusiveJets algo / ATR-17320,!26790Fixes for Simulation ART jobs (ATLASSIM-4309),!26747Update frozen shower generation scripts and code to be compatible with recent developments,!25405Add new ART test: test_physics_pp_v8_chainorder_build.sh,!2420321.3 l1 muon 00 - new MuCTPI_RDO.h,!23377WIP pixel ID scheme for ITk,!22214add an utility function to TrigT1TGCRecRoiSvc for storing ROI position and the eta/phi size,!22172changes related to 1-3 points in ATR-19579,!22124Changes related to ticket 19579,!22118Remove cabling information for new thresholds,!21304WIP: Fix ATR-19377 L1Topo vbs alg,!2117721.3 po bugfixes,!2060121.0 fix nightly test,!20518Mydev
......@@ -38,7 +38,6 @@ Muon::MmRdoToPrepDataTool::MmRdoToPrepDataTool(const std::string& t,
m_muonMgr(0),
m_mmIdHelper(0),
m_muonIdHelper(0),
m_fullEventDone(false),
m_mmPrepDataContainer(0)
{
declareInterface<Muon::IMuonRdoToPrepDataTool>(this);
......@@ -94,91 +93,19 @@ StatusCode Muon::MmRdoToPrepDataTool::finalize()
StatusCode Muon::MmRdoToPrepDataTool::processCollection(const MM_RawDataCollection *rdoColl,
std::vector<IdentifierHash>& idWithDataVect)
{
ATH_MSG_DEBUG(" ***************** Start of process MM Collection");
ATH_MSG_DEBUG(" ***************** Start of processCsm");
return StatusCode::SUCCESS;
}
Muon::MmRdoToPrepDataTool::SetupMM_PrepDataContainerStatus Muon::MmRdoToPrepDataTool::setupMM_PrepDataContainer()
{
if(!evtStore()->contains<Muon::MMPrepDataContainer>(m_mmPrepDataContainerKey.key())){
m_fullEventDone=false;
SG::WriteHandle< Muon::MMPrepDataContainer > handle(m_mmPrepDataContainerKey);
StatusCode status = handle.record(std::make_unique<Muon::MMPrepDataContainer>(m_mmIdHelper->module_hash_max()));
if (status.isFailure() || !handle.isValid() ) {
ATH_MSG_FATAL("Could not record container of MicroMega PrepData Container at " << m_mmPrepDataContainerKey.key());
return FAILED;
}
m_mmPrepDataContainer = handle.ptr();
return ADDED;
}
return ALREADYCONTAINED;
}
const MM_RawDataContainer* Muon::MmRdoToPrepDataTool::getRdoContainer() {
auto rdoContainerHandle = SG::makeHandle(m_rdoContainerKey);
if(rdoContainerHandle.isValid()) {
ATH_MSG_DEBUG("MM_getRdoContainer success");
return rdoContainerHandle.cptr();
}
ATH_MSG_WARNING("Retrieval of MM_RawDataContainer failed !");
return nullptr;
}
void Muon::MmRdoToPrepDataTool::processRDOContainer( std::vector<IdentifierHash>& idWithDataVect )
{
ATH_MSG_DEBUG("In processRDOContainer");
const MM_RawDataContainer* rdoContainer = getRdoContainer();
if (!rdoContainer) {
return;
}
// run in unseeded mode
for (MM_RawDataContainer::const_iterator it = rdoContainer->begin(); it != rdoContainer->end(); ++it ) {
auto rdoColl = *it;
if (rdoColl->empty()) continue;
ATH_MSG_DEBUG("New RDO collection with " << rdoColl->size() << "MM Hits");
if(processCollection(rdoColl, idWithDataVect).isFailure()) {
ATH_MSG_DEBUG("processCsm returns a bad StatusCode - keep going for new data collections in this event");
}
}
return;
}
// methods for ROB-based decoding
StatusCode Muon::MmRdoToPrepDataTool::decode( std::vector<IdentifierHash>& idVect,
std::vector<IdentifierHash>& idWithDataVect )
std::vector<IdentifierHash>& selectedIdVect )
{
// clear the output vector of selected data
idWithDataVect.clear();
SetupMM_PrepDataContainerStatus containerRecordStatus = setupMM_PrepDataContainer();
if ( containerRecordStatus == FAILED ) {
return StatusCode::FAILURE;
}
// check if the full event has already been decoded
if ( m_fullEventDone ) {
ATH_MSG_DEBUG ("Full event dcoded, nothing to do");
return StatusCode::SUCCESS;
}
ATH_MSG_DEBUG("Size of Hashes" << idVect.size() );
ATH_MSG_DEBUG("Size of selected Hashes" << selectedIdVect.size() );
return StatusCode::SUCCESS;
}
......
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
*/
#ifndef MM_RDOTOMM_PREPDATA_H
#define MM_RDOTOMM_PREPDATA_H
#ifndef CSCRDOTOCSCPREPDATA_H
#define CSCRDOTOCSCPREPDATA_H
#include "GaudiKernel/ToolHandle.h"
#include "AthenaBaseComps/AthAlgorithm.h"
#include "MuonCnvToolInterfaces/IMuonRdoToPrepDataTool.h"
class MM_RdoToMM_PrepData : public AthAlgorithm {
......@@ -22,11 +20,6 @@ public:
private:
ToolHandle< Muon::IMuonRdoToPrepDataTool > m_tool; //!< Tool used to do actual decoding.
bool m_print_inputRdo; //!<< If true, will dump information about the input RDOs.
bool m_print_prepData; //!<< If true, will dump information about the resulting PRDs.
};
#endif /// CSCRDOTOCSCPREPDATA_H
......
/*
Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
*/
#include "MuonRdoToPrepData/MM_RdoToMM_PrepData.h"
#include "Identifier/IdentifierHash.h"
MM_RdoToMM_PrepData::MM_RdoToMM_PrepData(const std::string& name, ISvcLocator* pSvcLocator) :
AthAlgorithm(name, pSvcLocator),
m_tool("Muon::MmRdoToPrepDataTool/MM_PrepDataProviderTool"),
m_print_inputRdo(false),
m_print_prepData(false)
AthAlgorithm(name, pSvcLocator)
{
declareProperty("DecodingTool", m_tool, "mdt rdo to prep data conversion tool" );
declareProperty("PrintInputRdo", m_print_inputRdo, "If true, will dump information about the input RDOs");
declareProperty("PrintPrepData", m_print_prepData, "If true, will dump information about the resulting PRDs");
}
StatusCode MM_RdoToMM_PrepData::finalize() {
......@@ -22,27 +11,13 @@ StatusCode MM_RdoToMM_PrepData::finalize() {
}
StatusCode MM_RdoToMM_PrepData::initialize(){
ATH_MSG_DEBUG(" in initialize()");
ATH_CHECK( m_tool.retrieve() );
ATH_MSG_INFO("Retrieved" << m_tool);
return StatusCode::SUCCESS;
ATH_MSG_DEBUG(" in initialize()");
return StatusCode::SUCCESS;
}
StatusCode MM_RdoToMM_PrepData::execute() {
ATH_MSG_DEBUG( " *************** in MM_RdoToMM_PrepData::execute() **************************************");
std::vector<IdentifierHash> myVector;
std::vector<IdentifierHash> myVectorWithData;
myVector.reserve(0); // empty vector
ATH_CHECK( m_tool->decode(myVector, myVectorWithData) );
if (m_print_inputRdo) m_tool->printInputRdo();
if (m_print_prepData) m_tool->printPrepData();
return StatusCode::SUCCESS;
ATH_MSG_DEBUG( " *************** in MM_RdoToMM_PrepData::execute()");
return StatusCode::SUCCESS;
}
......
......@@ -3,12 +3,10 @@
#include "MuonRdoToPrepData/RpcRdoToRpcPrepData.h"
#include "MuonRdoToPrepData/TgcRdoToTgcPrepData.h"
#include "MuonRdoToPrepData/StgcRdoToStgcPrepData.h"
#include "MuonRdoToPrepData/MM_RdoToMM_PrepData.h"
DECLARE_COMPONENT( CscRdoToCscPrepData )
DECLARE_COMPONENT( MdtRdoToMdtPrepData )
DECLARE_COMPONENT( RpcRdoToRpcPrepData )
DECLARE_COMPONENT( TgcRdoToTgcPrepData )
DECLARE_COMPONENT( StgcRdoToStgcPrepData )
DECLARE_COMPONENT( MM_RdoToMM_PrepData )
......@@ -11,7 +11,6 @@
#include "MuonReadoutGeometry/MMReadoutElement.h"
class MMPrepDataContainerCnv;
class IdentifierHash;
namespace Muon
{
......@@ -51,9 +50,7 @@ namespace Muon
const Amg::Vector2D& locpos,
const std::vector<Identifier>& rdoList,
const Amg::MatrixX* locErrMat,
const MuonGM::MMReadoutElement* detEl,
const int time,
const int charge );
const MuonGM::MMReadoutElement* detEl );
......@@ -67,12 +64,6 @@ namespace Muon
The pointer will be zero if the det el is not defined (i.e. it was not passed in by the ctor)*/
const MuonGM::MMReadoutElement* detectorElement() const;
/** @brief Returns the TDC counts */
int time() const;
/** @brief Returns the ADC counts */
int charge() const;
/** @brief Dumps information about the PRD*/
MsgStream& dump( MsgStream& stream) const;
......@@ -81,15 +72,9 @@ namespace Muon
private:
/** @brief Cached pointer to the detector element - should never be zero.*/
/** Cached pointer to the detector element - should never be zero.*/
const MuonGM::MMReadoutElement* m_detEl;
/** @brief measured time */
int m_time;
/** @brief measured charge */
int m_charge;
};
inline const MuonGM::MMReadoutElement* MMPrepData::detectorElement() const
......@@ -104,18 +89,7 @@ namespace Muon
if (m_globalPosition==0) throw Trk::PrepRawDataUndefinedVariable();
return *m_globalPosition;
}
inline int MMPrepData::time() const
{
return m_time;
}
inline int MMPrepData::charge() const
{
return m_charge;
}
}
#endif // MUONPREPRAWDATA_MMREPDATA_H
#endif // MUONPREPRAWDATA_RPCPREPDATA_H
......@@ -13,13 +13,9 @@ namespace Muon
const Amg::Vector2D& locpos,
const std::vector<Identifier>& rdoList,
const Amg::MatrixX* locErrMat,
const MuonGM::MMReadoutElement* detEl,
const int time,
const int charge ) :
const MuonGM::MMReadoutElement* detEl ) :
MuonCluster(RDOId, idDE, locpos, rdoList, locErrMat), //call base class constructor
m_detEl(detEl),
m_time(time),
m_charge(charge)
m_detEl(detEl)
{ }
// Destructor:
......@@ -31,25 +27,19 @@ namespace Muon
// Default constructor:
MMPrepData::MMPrepData():
MuonCluster(),
m_detEl(0),
m_time(0),
m_charge(0)
m_detEl(0)
{ }
//copy constructor:
MMPrepData::MMPrepData(const MMPrepData& RIO):
MuonCluster(RIO),
m_detEl( RIO.m_detEl ),
m_time(0),
m_charge(0)
m_detEl( RIO.m_detEl )
{ }
//move constructor:
MMPrepData::MMPrepData(MMPrepData&& RIO):
MuonCluster(std::move(RIO)),
m_detEl( RIO.m_detEl ),
m_time(0),
m_charge(0)
m_detEl( RIO.m_detEl )
{ }
//assignment operator
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment