ATLAS Offline Software
Loading...
Searching...
No Matches
RpcDigitToRpcRDO Class Reference

#include <RpcDigitToRpcRDO.h>

Inheritance diagram for RpcDigitToRpcRDO:
Collaboration diagram for RpcDigitToRpcRDO:

Public Member Functions

 RpcDigitToRpcRDO (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~RpcDigitToRpcRDO ()=default
virtual StatusCode initialize () override final
virtual StatusCode execute (const EventContext &ctx) const override final
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual unsigned int cardinality () const override
 Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
virtual void setFilterPassed (bool state, const EventContext &ctx) const
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Private Types

typedef std::map< int, PADreadout, std::less< int > > PAD_Readout
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

RpcPaddecodePad (PADreadout &pad, const RpcCablingCondData *readCdo) const
RpcCoinMatrixdecodeMatrix (MatrixReadOut *matrix, Identifier &id) const
StatusCode fill_RPCdata (RPCsimuData &data, const EventContext &ctx, const RpcCablingCondData *) const
StatusCode fillTagInfo () const
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

SG::ReadCondHandleKey< MuonGM::MuonDetectorManagerm_DetectorManagerKey
IntegerProperty m_fast_debug {this, "FastDebug", 0, "bits for debugging 'fast' algos"}
IntegerProperty m_monitoring {this, "Monitoring", 0, "bits for monitoring sequence"}
IntegerProperty m_cma_debug {this, "CMAdebug", 0, "bits for debugging CMA simulation"}
IntegerProperty m_pad_debug {this, "PADdebug", 0, "bits for debugging PAD simulation"}
IntegerProperty m_sl_debug {this, "SLdebug", 0, "bits for debugging SL simulation"}
IntegerProperty m_cma_ro_debug {this, "CMArodebug", 0, "bits for debugging CMA readout"}
IntegerProperty m_pad_ro_debug {this, "PADrodebug", 0, "bits for debugging PAD readout"}
IntegerProperty m_rx_ro_debug {this, "RXrodebug", 0, "bits for debugging Rx readout"}
IntegerProperty m_sl_ro_debug {this, "SLrodebug", 0, "bits for debugging SL readout"}
IntegerProperty m_cma_rostruct_debug {this, "CMArostructdebug", 0, "bits for debugging CMA ro struct"}
IntegerProperty m_pad_rostruct_debug {this, "PADrostructdebug", 0, "bits for debugging PAD ro struct"}
IntegerProperty m_rx_rostruct_debug {this, "RXrostructdebug", 0, "bits for debugging Rx ro struct"}
IntegerProperty m_sl_rostruct_debug {this, "SLrostructdebug", 0, "bits for debugging SL ro struct"}
BooleanProperty m_geometric_algo {this, "Geometric", false, "flag to activate fast simu"}
BooleanProperty m_geometric_algo_param {this, "GeometricParameters", false, "flag to compute fast simu par"}
BooleanProperty m_detailed_algo {this, "Detailed", false, "flag to activate detailed simu"}
BooleanProperty m_detail_algo_param {this, "DetailedParameters", false, "flag to compute detailed simu par"}
StringProperty m_bytestream_file {this, "RPCbytestreamFile", "", "name for the bytestream file"}
BooleanProperty m_patch_for_rpc_time {this, "PatchForRpcTime", false, "flag for patching the RPC time"}
BooleanProperty m_data_detail {this, "DataDetail", false, "flag to printout detailed INFO on processed data"}
SG::ReadCondHandleKey< RpcCablingCondDatam_readKey {this, "ReadKey", "RpcCablingCondData", "Key of RpcCablingCondData"}
SG::WriteHandleKey< RpcPadContainerm_padContainerKey {this, "OutputObjectName", "RPCPAD", "WriteHandleKey for Output RpcPadContainer"}
SG::ReadHandleKey< RpcDigitContainerm_digitContainerKey
ServiceHandle< Muon::IMuonIdHelperSvcm_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
Gaudi::Property< std::vector< std::string > > m_exclStat
Gaudi::Property< int > m_nobxs { this, "NOBXS", 8, "Number of bunch crossings in readout"}
Gaudi::Property< int > m_bczero { this, "BCZERO", 3, "central bunch crossing in readout"}
std::set< int > m_exclStatNames {}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 26 of file RpcDigitToRpcRDO.h.

Member Typedef Documentation

◆ PAD_Readout

typedef std::map<int, PADreadout, std::less<int> > RpcDigitToRpcRDO::PAD_Readout
private

Definition at line 35 of file RpcDigitToRpcRDO.h.

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ RpcDigitToRpcRDO()

RpcDigitToRpcRDO::RpcDigitToRpcRDO ( const std::string & name,
ISvcLocator * pSvcLocator )

Definition at line 26 of file RpcDigitToRpcRDO.cxx.

26 :
27 AthReentrantAlgorithm(name, pSvcLocator) {}

◆ ~RpcDigitToRpcRDO()

virtual RpcDigitToRpcRDO::~RpcDigitToRpcRDO ( )
virtualdefault

Member Function Documentation

◆ cardinality()

unsigned int AthCommonReentrantAlgorithm< Gaudi::Algorithm >::cardinality ( ) const
overridevirtualinherited

Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.

Override this to return 0 for reentrant algorithms.

Definition at line 75 of file AthCommonReentrantAlgorithm.cxx.

64{
65 return 0;
66}

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ decodeMatrix()

RpcCoinMatrix * RpcDigitToRpcRDO::decodeMatrix ( MatrixReadOut * matrix,
Identifier & id ) const
private

Definition at line 308 of file RpcDigitToRpcRDO.cxx.

308 {
309 ATH_MSG_DEBUG("Decoding a new RpcCoinMatrix");
310
311 // Matrix Header and SubHeader
312 MatrixReadOutStructure matrix_header = matrix->getHeader();
313 MatrixReadOutStructure matrix_subheader = matrix->getSubHeader();
314 MatrixReadOutStructure matrix_footer = matrix->getFooter();
315 // Check the data structure
316 if(!matrix_header.isHeader()) std::abort();
317 if(!matrix_subheader.isSubHeader()) std::abort();
318 if(!matrix_footer.isFooter()) std::abort();
319
320 // Create the coincidence matrix
321 RpcCoinMatrix* coinMatrix =
322 new RpcCoinMatrix(id, matrix_header.cmid(), matrix_footer.crc(), matrix_header.fel1id(), matrix_subheader.febcid());
323
324 // Iterate on fired channels and decode them
325 MatrixReadOutStructure cm_hit;
326 for (int j = 0; j < matrix->numberOfBodyWords(); ++j) {
327 cm_hit = matrix->getCMAHit(j);
328 if(!cm_hit.isBody()) std::abort();
329 RpcFiredChannel* firedChannel = nullptr;
330
331 if (cm_hit.ijk() < rpcRawHitWordLength) {
332 firedChannel = new RpcFiredChannel(cm_hit.bcid(), cm_hit.time(), cm_hit.ijk(), cm_hit.channel());
333 } else if (cm_hit.ijk() == rpcRawHitWordLength) {
334 firedChannel = new RpcFiredChannel(cm_hit.bcid(), cm_hit.time(), cm_hit.ijk(), cm_hit.threshold(), cm_hit.overlap());
335 }
336
337 coinMatrix->push_back(firedChannel);
338 }
339
340 ATH_MSG_DEBUG("Number of Fired Channels in Matrix : " << coinMatrix->size());
341 return coinMatrix;
342}
#define ATH_MSG_DEBUG(x)
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current RpcCoinMatrix
value_type push_back(value_type pElem)
Add an element to the end of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.

◆ decodePad()

RpcPad * RpcDigitToRpcRDO::decodePad ( PADreadout & pad,
const RpcCablingCondData * readCdo ) const
private

Definition at line 236 of file RpcDigitToRpcRDO.cxx.

236 {
237 ATH_MSG_DEBUG("Decoding a new RpcPad");
238
239 // Identifier elements
240 int name = 0;
241 int eta = 0;
242 int phi = 0;
243 int doublet_r = 0;
244 int doublet_z = 0;
245 int doublet_phi = 0;
246 int gas_gap = 0;
247 int measures_phi = 0;
248 int strip = 0;
249
250 PadReadOut* readout = pad.give_pad_readout();
251
252 // Retrieve PAD sector and PAD ID
253 int sector = pad.sector();
254 int pad_id = pad.PAD();
255 // Compute side and logic sector
256 int side = (sector < 32) ? 0 : 1;
257 int logic_sector = sector % 32;
258 // Compute the key to retrieve the offline id from the map (as from LVL1 sim.)
259 int key = side * 10000 + logic_sector * 100 + pad_id;
260
261 ATH_MSG_DEBUG("Pad: Side " << side << " Sector logic" << logic_sector << " Id " << pad_id);
262
263 // Retrieve the identifier elements from the map
264 const RpcCablingCondData::RDOmap& pad_map = readCdo->give_RDOs();
265 RDOindex index = (*pad_map.find(key)).second;
266
267 index.offline_indexes(name, eta, phi, doublet_r, doublet_z, doublet_phi, gas_gap, measures_phi, strip);
268
269 // Build the pad offline identifier
270 bool valid{false};
271 Identifier id = m_idHelperSvc->rpcIdHelper().padID(name, eta, phi, doublet_r, doublet_z, doublet_phi, valid);
272
273 ATH_MSG_DEBUG("Invalid pad offline indices ");
274 ATH_MSG_DEBUG("Name : " << name);
275 ATH_MSG_DEBUG("Eta " << eta << " Phi " << phi);
276 ATH_MSG_DEBUG("Doublet r " << doublet_r << " Doublet_z " << doublet_z << " Doublet_phi " << doublet_phi);
277 ATH_MSG_DEBUG("Gas gap " << gas_gap << " Measures_phi " << measures_phi << " Strip " << strip);
278
279 // Retrieve Pad status and error code from Pad header and footer
280 PadReadOutStructure pad_header = readout->getHeader();
281 PadReadOutStructure pad_footer = readout->getFooter();
282 // Check the data format
283 if(!pad_header.isHeader()) std::abort();
284 if(!pad_footer.isFooter()) std::abort();
285
286 unsigned int hashId = index.hash();
287 unsigned int onlineId = pad_id;
288 unsigned int status = 0;
289 unsigned int errorCode = pad_footer.errorCode();
290
291 // Construct the new Pad
292 RpcPad* rpc_pad = new RpcPad(id, hashId, onlineId, status, errorCode, sector);
293
294 // Iterate on the matrices and decode them
295 for (int i = 0; i < readout->numberOfCMROFragments(); ++i) {
296 MatrixReadOut* matrix = pad.matrices_readout(i);
297 RpcCoinMatrix* coinMatrix = decodeMatrix(matrix, id);
298 // Add the matrix to the pad
299 rpc_pad->push_back(coinMatrix);
300 }
301
302 ATH_MSG_DEBUG("Number of matrices in Pad : " << rpc_pad->size());
303
304 return rpc_pad;
305}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Old Athena::TPCnvVers::Current Athena::TPCnvVers::Current Athena::TPCnvVers::Current RpcPad
PadReadOut * give_pad_readout(void)
MatrixReadOut * matrices_readout(int) const
int sector(void) const
Definition PADreadout.h:40
int PAD(void) const
Definition PADreadout.h:41
PadReadOutStructure getFooter()
PadReadOutStructure getHeader()
ubit16 numberOfCMROFragments()
Definition PadReadOut.h:30
std::map< int, RDOindex, std::less< int > > RDOmap
const RDOmap & give_RDOs(void) const
RpcCoinMatrix * decodeMatrix(MatrixReadOut *matrix, Identifier &id) const
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
str index
Definition DeMoScan.py:362
list valid
Definition calibdata.py:44
status
Definition merge.py:16

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode RpcDigitToRpcRDO::execute ( const EventContext & ctx) const
finaloverridevirtual

Definition at line 67 of file RpcDigitToRpcRDO.cxx.

67 {
68 ATH_MSG_DEBUG("in execute()");
69
70 // create an empty pad container and record it
71 SG::WriteHandle<RpcPadContainer> padContainer(m_padContainerKey, ctx);
72 ATH_CHECK(padContainer.record((std::make_unique<RpcPadContainer>(600))));
73 ATH_MSG_DEBUG("Recorded RpcPadContainer called " << padContainer.name() << " in store " << padContainer.store());
74
75 RPCsimuData data; // instantiate the container for the RPC digits
76
77 SG::ReadCondHandle<RpcCablingCondData> readHandle{m_readKey, ctx};
78 const RpcCablingCondData* readCdo{*readHandle};
79
80 // fill the data with RPC simulated digits
81 if (fill_RPCdata(data, ctx, readCdo).isFailure()) { ATH_MSG_ERROR("Fail to produce RPC data for byte stream simulation "); }
82 ATH_MSG_DEBUG("RPC data loaded from G3:" << std::endl << ShowData<RPCsimuData>(data, "", m_data_detail));
83
84
85 // ******************** Start of Level-1 simulation section *****************
86
87 // Setting the algorithm type
88 // AlgoType type;
89 // if(m_detailed_algo) type = DetailedAlgo;
90 // else if(m_geometric_algo) type = GeometricAlgo;
91
92 unsigned long int debug;
93
96 //
97 CMAdata patterns(&data, readCdo, debug); //
98 //
99 ATH_MSG_DEBUG("CMApatterns created from RPC digits:" << std::endl //
100 << ShowData<CMAdata>(patterns, "", m_data_detail)); //
102
103 // ******************* Start Byte Stream production *************************
104
105 RPCbytestream bytestream(patterns, (std::string)m_bytestream_file, msg(), (unsigned long int)m_cma_ro_debug,
106 (unsigned long int)m_pad_ro_debug, (unsigned long int)m_rx_ro_debug, (unsigned long int)m_sl_ro_debug,
107 (unsigned long int)m_cma_rostruct_debug, (unsigned long int)m_pad_rostruct_debug,
108 (unsigned long int)m_rx_rostruct_debug, (unsigned long int)m_sl_rostruct_debug, m_nobxs, m_bczero);
109
110 // ********************** create the RPC RDO's *****************************
111
112 std::vector<RpcPad*> rpcpads;
113 ATH_MSG_DEBUG("Start decoding");
114 PAD_Readout padReadout = bytestream.pad_readout();
115 // Iterate on the readout PADS and decode them
116 for (auto& padro : padReadout) {
117 RpcPad* newpad = decodePad(padro.second, readCdo);
118 // Push back the decoded pad in the vector
119 rpcpads.push_back(newpad);
120 }
121 ATH_MSG_DEBUG("Total number of pads in this event is " << rpcpads.size());
122
123 for (const auto& pad : rpcpads) {
124 const int elementHash1 = pad->identifyHash();
125 if (padContainer->addCollection(pad, elementHash1).isFailure()) { ATH_MSG_ERROR("Unable to record RPC Pad in IDC"); }
126 }
127 rpcpads.clear();
128
129
130 return StatusCode::SUCCESS;
131}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
char data[hepevt_bytes_allocation_ATLAS]
Definition HepEvt.cxx:11
const bool debug
IntegerProperty m_fast_debug
BooleanProperty m_detailed_algo
IntegerProperty m_cma_debug
SG::WriteHandleKey< RpcPadContainer > m_padContainerKey
Gaudi::Property< int > m_bczero
IntegerProperty m_pad_ro_debug
IntegerProperty m_cma_ro_debug
StringProperty m_bytestream_file
StatusCode fill_RPCdata(RPCsimuData &data, const EventContext &ctx, const RpcCablingCondData *) const
std::map< int, PADreadout, std::less< int > > PAD_Readout
Gaudi::Property< int > m_nobxs
BooleanProperty m_data_detail
IntegerProperty m_cma_rostruct_debug
RpcPad * decodePad(PADreadout &pad, const RpcCablingCondData *readCdo) const
IntegerProperty m_sl_ro_debug
SG::ReadCondHandleKey< RpcCablingCondData > m_readKey
IntegerProperty m_rx_rostruct_debug
IntegerProperty m_pad_rostruct_debug
IntegerProperty m_sl_rostruct_debug
IntegerProperty m_rx_ro_debug
std::vector< std::string > patterns
Definition listroot.cxx:187

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthCommonReentrantAlgorithm< Gaudi::Algorithm >::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 94 of file AthCommonReentrantAlgorithm.cxx.

90{
91 // If we didn't find any symlinks to add, just return the collection
92 // from the base class. Otherwise, return the extended collection.
93 if (!m_extendedExtraObjects.empty()) {
95 }
97}
An algorithm that can be simultaneously executed in multiple threads.

◆ fill_RPCdata()

StatusCode RpcDigitToRpcRDO::fill_RPCdata ( RPCsimuData & data,
const EventContext & ctx,
const RpcCablingCondData * readCdo ) const
private

Definition at line 133 of file RpcDigitToRpcRDO.cxx.

133 {
134 std::string space = " ";
135
136 ATH_MSG_DEBUG("in execute(): fill RPC data");
137
138 IdContext rpcContext = m_idHelperSvc->rpcIdHelper().module_context();
139
140 SG::ReadHandle<RpcDigitContainer> container(m_digitContainerKey, ctx);
141 if (!container.isValid()) {
142 ATH_MSG_ERROR("Could not find RpcDigitContainer called " << container.name() << " in store " << container.store());
143 return StatusCode::SUCCESS;
144 }
145 ATH_MSG_DEBUG("Found RpcDigitContainer called " << container.name() << " in store " << container.store());
146 SG::ReadCondHandle<MuonGM::MuonDetectorManager> muonDetMgr{m_DetectorManagerKey,ctx};
147 if (!muonDetMgr.isValid()) {
148 ATH_MSG_FATAL("Failed to retrieve the readout geometry "<<muonDetMgr.fullKey());
149 return StatusCode::FAILURE;
150 }
151 for (const RpcDigitCollection* rpcCollection : *container) {
152 ATH_MSG_DEBUG("RPC Digit -> Pad loop :: digitCollection at " << rpcCollection);
153
154 IdentifierHash moduleHash = rpcCollection->identifierHash();
155 Identifier moduleId{0};
156 if (m_idHelperSvc->rpcIdHelper().get_id(moduleHash, moduleId, &rpcContext)) {
157 ATH_MSG_FATAL("Invalid identifier module ");
158 return StatusCode::FAILURE;
159 }
160 if (m_exclStatNames.count(m_idHelperSvc->stationName(moduleId))){
161 ATH_MSG_VERBOSE("Do not turn digit from "<<m_idHelperSvc->toString(moduleId)<<" to RDO");
162 continue;
163 }
164
165 for (const RpcDigit* rpcDigit : *rpcCollection) {
166 const Identifier channelId = rpcDigit->identify();
167 int stationType = m_idHelperSvc->rpcIdHelper().stationName(channelId);
168 std::string StationName = m_idHelperSvc->rpcIdHelper().stationNameString(stationType);
169 // BIS stations have different readout, so they are treated separately
170 int StationEta = m_idHelperSvc->rpcIdHelper().stationEta(channelId);
171 int StationPhi = m_idHelperSvc->rpcIdHelper().stationPhi(channelId);
172 int DoubletR = m_idHelperSvc->rpcIdHelper().doubletR(channelId);
173 int DoubletZ = m_idHelperSvc->rpcIdHelper().doubletZ(channelId);
174 int DoubletP = m_idHelperSvc->rpcIdHelper().doubletPhi(channelId);
175 int GasGap = m_idHelperSvc->rpcIdHelper().gasGap(channelId);
176 int MeasuresPhi = m_idHelperSvc->rpcIdHelper().measuresPhi(channelId);
177 int Strip = m_idHelperSvc->rpcIdHelper().strip(channelId);
178
179 ATH_MSG_DEBUG("RPC Digit Type, Eta, Phi, dbR, dbZ, dbP, gg, mPhi, Strip "
180 << stationType << " " << StationEta << " " << StationPhi << " " << DoubletR << " " << DoubletZ << " "
181 << DoubletP << " " << GasGap << " " << MeasuresPhi << " " << Strip);
182 const MuonGM::RpcReadoutElement* descriptor = muonDetMgr->getRpcReadoutElement(channelId);
183
184 // Get the global position of RPC strip from MuonDetDesc
185 Amg::Vector3D pos = descriptor->stripPos(channelId);
186
187 // get now strip_code from cablingSvc
188 unsigned long int strip_code_cab = readCdo->strip_code_fromOffId(StationName, StationEta, StationPhi, DoubletR,
189 DoubletZ, DoubletP, GasGap, MeasuresPhi, Strip);
190
191 ATH_MSG_DEBUG("From RPC Cabling Layout, strip_code = " << strip_code_cab);
192
193 if (strip_code_cab) {
194 // Fill data for the Level-1 RPC digit
195 float xyz[4];
196 double tp = pos.mag() * inverseSpeedOfLight;
197 // time of flight
198 xyz[0] = (m_patch_for_rpc_time) ? rpcDigit->time() - tp : rpcDigit->time();
199 xyz[1] = pos.x() / 10.; // coo[0]; //RPC strip x coordinate
200 xyz[2] = pos.y() / 10.; // coo[1]; //RPC strip y coordinate
201 xyz[3] = pos.z() / 10.; // coo[2]; //RPC strip z coordinate
202
203 int param[3] = {0, 0, 0};
204
205 ATH_MSG_DEBUG("Digit with strip_code = " << strip_code_cab << " passed to RDO/LVL1 Simulation (RPCsimuDigit)");
206 RPCsimuDigit digit(0, strip_code_cab, param, xyz);
207 data << digit;
208 }
209 }
210 }
211 return StatusCode::SUCCESS;
212}
#define ATH_MSG_FATAL(x)
#define ATH_MSG_VERBOSE(x)
#define xyz
unsigned long int strip_code_fromOffId(const std::string &stationName, int stationEta, int stationPhi, int doubletR, int doubletZ, int doubletPhi, int gasGap, int measuresPhi, int strip) const
SG::ReadHandleKey< RpcDigitContainer > m_digitContainerKey
BooleanProperty m_patch_for_rpc_time
SG::ReadCondHandleKey< MuonGM::MuonDetectorManager > m_DetectorManagerKey
std::set< int > m_exclStatNames
const DataObjID & fullKey() const
Eigen::Matrix< double, 3, 1 > Vector3D

◆ fillTagInfo()

StatusCode RpcDigitToRpcRDO::fillTagInfo ( ) const
private

Definition at line 219 of file RpcDigitToRpcRDO.cxx.

219 {
220 ServiceHandle<ITagInfoMgr> tagInfoMgr("TagInfoMgr", name());
221 ATH_CHECK(tagInfoMgr.retrieve());
222
223 std::string cablingType = "MuonRPC_Cabling";
224 StatusCode sc = tagInfoMgr->addTag("RPC_CablingType", cablingType);
225 if (sc.isFailure()) {
226 ATH_MSG_WARNING("RPC_CablingType " << cablingType << " not added to TagInfo ");
227 return sc;
228 } else {
229 ATH_MSG_DEBUG("RPC_CablingType " << cablingType << " is Added TagInfo ");
230 }
231
232 return StatusCode::SUCCESS;
233}
#define ATH_MSG_WARNING(x)
static Double_t sc
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ filterPassed()

virtual bool AthCommonReentrantAlgorithm< Gaudi::Algorithm >::filterPassed ( const EventContext & ctx) const
inlinevirtualinherited

Definition at line 96 of file AthCommonReentrantAlgorithm.h.

96 {
97 return execState( ctx ).filterPassed();
98 }
virtual bool filterPassed(const EventContext &ctx) const

◆ initialize()

StatusCode RpcDigitToRpcRDO::initialize ( )
finaloverridevirtual

Definition at line 31 of file RpcDigitToRpcRDO.cxx.

31 {
32 ATH_MSG_DEBUG(" in initialize()");
33
34 ATH_CHECK(m_idHelperSvc.retrieve());
35
36
37 ATH_CHECK(m_readKey.initialize());
38 ATH_CHECK(m_DetectorManagerKey.initialize());
39
40 // Fill Tag Info
41 if (fillTagInfo() != StatusCode::SUCCESS) {
42 ATH_MSG_WARNING("Unable to fill Tag Info ");
43 return StatusCode::FAILURE;
44 } else {
45 ATH_MSG_DEBUG("Tag info filled successfully");
46 }
47
48 ATH_CHECK(m_padContainerKey.initialize());
49 ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_padContainerKey);
50 ATH_CHECK(m_digitContainerKey.initialize());
51 ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_digitContainerKey);
52 for (const std::string& statName : m_exclStat) {
53 m_exclStatNames.insert(m_idHelperSvc->rpcIdHelper().stationNameIndex(statName));
54 }
55 if(m_nobxs>8){
56 //The RPC simulation uses many arrays that assume maximum 8 BCs are readout
57 //See TrigT1/TrigT1RPChardware/Matrix.h for example
58 ATH_MSG_ERROR("Readout of more than 8 BCs is not supported by the simulation");
59 return StatusCode::FAILURE;
60 }
61
62 return StatusCode::SUCCESS;
63}
StatusCode fillTagInfo() const
Gaudi::Property< std::vector< std::string > > m_exclStat

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ isClonable()

◆ msg()

MsgStream & AthCommonMsg< Gaudi::Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< Gaudi::Algorithm >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ setFilterPassed()

virtual void AthCommonReentrantAlgorithm< Gaudi::Algorithm >::setFilterPassed ( bool state,
const EventContext & ctx ) const
inlinevirtualinherited

Definition at line 100 of file AthCommonReentrantAlgorithm.h.

100 {
102 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const

◆ sysExecute()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysExecute ( const EventContext & ctx)
overridevirtualinherited

Execute an algorithm.

We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.

Definition at line 85 of file AthCommonReentrantAlgorithm.cxx.

77{
78 return BaseAlg::sysExecute (ctx);
79}

◆ sysInitialize()

StatusCode AthCommonReentrantAlgorithm< Gaudi::Algorithm >::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >.

Reimplemented in HypoBase, and InputMakerBase.

Definition at line 61 of file AthCommonReentrantAlgorithm.cxx.

107 {
109
110 if (sc.isFailure()) {
111 return sc;
112 }
113
114 ServiceHandle<ICondSvc> cs("CondSvc",name());
115 for (auto h : outputHandles()) {
116 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
117 // do this inside the loop so we don't create the CondSvc until needed
118 if ( cs.retrieve().isFailure() ) {
119 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
120 return StatusCode::SUCCESS;
121 }
122 if (cs->regHandle(this,*h).isFailure()) {
124 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
125 << " with CondSvc");
126 }
127 }
128 }
129 return sc;
130}
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }

Member Data Documentation

◆ m_bczero

Gaudi::Property<int> RpcDigitToRpcRDO::m_bczero { this, "BCZERO", 3, "central bunch crossing in readout"}
private

Definition at line 88 of file RpcDigitToRpcRDO.h.

88{ this, "BCZERO", 3, "central bunch crossing in readout"};

◆ m_bytestream_file

StringProperty RpcDigitToRpcRDO::m_bytestream_file {this, "RPCbytestreamFile", "", "name for the bytestream file"}
private

Definition at line 71 of file RpcDigitToRpcRDO.h.

71{this, "RPCbytestreamFile", "", "name for the bytestream file"};

◆ m_cma_debug

IntegerProperty RpcDigitToRpcRDO::m_cma_debug {this, "CMAdebug", 0, "bits for debugging CMA simulation"}
private

Definition at line 53 of file RpcDigitToRpcRDO.h.

53{this, "CMAdebug", 0, "bits for debugging CMA simulation"};

◆ m_cma_ro_debug

IntegerProperty RpcDigitToRpcRDO::m_cma_ro_debug {this, "CMArodebug", 0, "bits for debugging CMA readout"}
private

Definition at line 57 of file RpcDigitToRpcRDO.h.

57{this, "CMArodebug", 0, "bits for debugging CMA readout"};

◆ m_cma_rostruct_debug

IntegerProperty RpcDigitToRpcRDO::m_cma_rostruct_debug {this, "CMArostructdebug", 0, "bits for debugging CMA ro struct"}
private

Definition at line 62 of file RpcDigitToRpcRDO.h.

62{this, "CMArostructdebug", 0, "bits for debugging CMA ro struct"};

◆ m_data_detail

BooleanProperty RpcDigitToRpcRDO::m_data_detail {this, "DataDetail", false, "flag to printout detailed INFO on processed data"}
private

Definition at line 75 of file RpcDigitToRpcRDO.h.

75{this, "DataDetail", false, "flag to printout detailed INFO on processed data"};

◆ m_detail_algo_param

BooleanProperty RpcDigitToRpcRDO::m_detail_algo_param {this, "DetailedParameters", false, "flag to compute detailed simu par"}
private

Definition at line 70 of file RpcDigitToRpcRDO.h.

70{this, "DetailedParameters", false, "flag to compute detailed simu par"};

◆ m_detailed_algo

BooleanProperty RpcDigitToRpcRDO::m_detailed_algo {this, "Detailed", false, "flag to activate detailed simu"}
private

Definition at line 69 of file RpcDigitToRpcRDO.h.

69{this, "Detailed", false, "flag to activate detailed simu"};

◆ m_DetectorManagerKey

SG::ReadCondHandleKey<MuonGM::MuonDetectorManager> RpcDigitToRpcRDO::m_DetectorManagerKey
private
Initial value:
{this, "DetectorManagerKey", "MuonDetectorManager",
"Key of input MuonDetectorManager condition data"}

Definition at line 47 of file RpcDigitToRpcRDO.h.

47 {this, "DetectorManagerKey", "MuonDetectorManager",
48 "Key of input MuonDetectorManager condition data"};

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_digitContainerKey

SG::ReadHandleKey<RpcDigitContainer> RpcDigitToRpcRDO::m_digitContainerKey
private
Initial value:
{this, "InputObjectName", "RPC_DIGITS",
"ReadHandleKey for Input RpcDigitContainer"}

Definition at line 80 of file RpcDigitToRpcRDO.h.

80 {this, "InputObjectName", "RPC_DIGITS",
81 "ReadHandleKey for Input RpcDigitContainer"};

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_exclStat

Gaudi::Property<std::vector<std::string> > RpcDigitToRpcRDO::m_exclStat
private
Initial value:
{this, "ExcludeHitsFromStations",
{"BIS"}, "Digits from these stations are not converted" }

Definition at line 85 of file RpcDigitToRpcRDO.h.

85 {this, "ExcludeHitsFromStations",
86 {"BIS"}, "Digits from these stations are not converted" };

◆ m_exclStatNames

std::set<int> RpcDigitToRpcRDO::m_exclStatNames {}
private

Definition at line 92 of file RpcDigitToRpcRDO.h.

92{};

◆ m_extendedExtraObjects

DataObjIDColl AthCommonReentrantAlgorithm< Gaudi::Algorithm >::m_extendedExtraObjects
privateinherited

Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.

Empty if no symlinks were found.

Definition at line 114 of file AthCommonReentrantAlgorithm.h.

◆ m_fast_debug

IntegerProperty RpcDigitToRpcRDO::m_fast_debug {this, "FastDebug", 0, "bits for debugging 'fast' algos"}
private

Definition at line 50 of file RpcDigitToRpcRDO.h.

50{this, "FastDebug", 0, "bits for debugging 'fast' algos"};

◆ m_geometric_algo

BooleanProperty RpcDigitToRpcRDO::m_geometric_algo {this, "Geometric", false, "flag to activate fast simu"}
private

Definition at line 67 of file RpcDigitToRpcRDO.h.

67{this, "Geometric", false, "flag to activate fast simu"};

◆ m_geometric_algo_param

BooleanProperty RpcDigitToRpcRDO::m_geometric_algo_param {this, "GeometricParameters", false, "flag to compute fast simu par"}
private

Definition at line 68 of file RpcDigitToRpcRDO.h.

68{this, "GeometricParameters", false, "flag to compute fast simu par"};

◆ m_idHelperSvc

ServiceHandle<Muon::IMuonIdHelperSvc> RpcDigitToRpcRDO::m_idHelperSvc {this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"}
private

Definition at line 83 of file RpcDigitToRpcRDO.h.

83{this, "MuonIdHelperSvc", "Muon::MuonIdHelperSvc/MuonIdHelperSvc"};

◆ m_monitoring

IntegerProperty RpcDigitToRpcRDO::m_monitoring {this, "Monitoring", 0, "bits for monitoring sequence"}
private

Definition at line 51 of file RpcDigitToRpcRDO.h.

51{this, "Monitoring", 0, "bits for monitoring sequence"};

◆ m_nobxs

Gaudi::Property<int> RpcDigitToRpcRDO::m_nobxs { this, "NOBXS", 8, "Number of bunch crossings in readout"}
private

Definition at line 87 of file RpcDigitToRpcRDO.h.

87{ this, "NOBXS", 8, "Number of bunch crossings in readout"};

◆ m_pad_debug

IntegerProperty RpcDigitToRpcRDO::m_pad_debug {this, "PADdebug", 0, "bits for debugging PAD simulation"}
private

Definition at line 54 of file RpcDigitToRpcRDO.h.

54{this, "PADdebug", 0, "bits for debugging PAD simulation"};

◆ m_pad_ro_debug

IntegerProperty RpcDigitToRpcRDO::m_pad_ro_debug {this, "PADrodebug", 0, "bits for debugging PAD readout"}
private

Definition at line 58 of file RpcDigitToRpcRDO.h.

58{this, "PADrodebug", 0, "bits for debugging PAD readout"};

◆ m_pad_rostruct_debug

IntegerProperty RpcDigitToRpcRDO::m_pad_rostruct_debug {this, "PADrostructdebug", 0, "bits for debugging PAD ro struct"}
private

Definition at line 63 of file RpcDigitToRpcRDO.h.

63{this, "PADrostructdebug", 0, "bits for debugging PAD ro struct"};

◆ m_padContainerKey

SG::WriteHandleKey<RpcPadContainer> RpcDigitToRpcRDO::m_padContainerKey {this, "OutputObjectName", "RPCPAD", "WriteHandleKey for Output RpcPadContainer"}
private

Definition at line 79 of file RpcDigitToRpcRDO.h.

79{this, "OutputObjectName", "RPCPAD", "WriteHandleKey for Output RpcPadContainer"};

◆ m_patch_for_rpc_time

BooleanProperty RpcDigitToRpcRDO::m_patch_for_rpc_time {this, "PatchForRpcTime", false, "flag for patching the RPC time"}
private

Definition at line 73 of file RpcDigitToRpcRDO.h.

73{this, "PatchForRpcTime", false, "flag for patching the RPC time"};

◆ m_readKey

SG::ReadCondHandleKey<RpcCablingCondData> RpcDigitToRpcRDO::m_readKey {this, "ReadKey", "RpcCablingCondData", "Key of RpcCablingCondData"}
private

Definition at line 77 of file RpcDigitToRpcRDO.h.

77{this, "ReadKey", "RpcCablingCondData", "Key of RpcCablingCondData"};

◆ m_rx_ro_debug

IntegerProperty RpcDigitToRpcRDO::m_rx_ro_debug {this, "RXrodebug", 0, "bits for debugging Rx readout"}
private

Definition at line 59 of file RpcDigitToRpcRDO.h.

59{this, "RXrodebug", 0, "bits for debugging Rx readout"};

◆ m_rx_rostruct_debug

IntegerProperty RpcDigitToRpcRDO::m_rx_rostruct_debug {this, "RXrostructdebug", 0, "bits for debugging Rx ro struct"}
private

Definition at line 64 of file RpcDigitToRpcRDO.h.

64{this, "RXrostructdebug", 0, "bits for debugging Rx ro struct"};

◆ m_sl_debug

IntegerProperty RpcDigitToRpcRDO::m_sl_debug {this, "SLdebug", 0, "bits for debugging SL simulation"}
private

Definition at line 55 of file RpcDigitToRpcRDO.h.

55{this, "SLdebug", 0, "bits for debugging SL simulation"};

◆ m_sl_ro_debug

IntegerProperty RpcDigitToRpcRDO::m_sl_ro_debug {this, "SLrodebug", 0, "bits for debugging SL readout"}
private

Definition at line 60 of file RpcDigitToRpcRDO.h.

60{this, "SLrodebug", 0, "bits for debugging SL readout"};

◆ m_sl_rostruct_debug

IntegerProperty RpcDigitToRpcRDO::m_sl_rostruct_debug {this, "SLrostructdebug", 0, "bits for debugging SL ro struct"}
private

Definition at line 65 of file RpcDigitToRpcRDO.h.

65{this, "SLrostructdebug", 0, "bits for debugging SL ro struct"};

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: