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

#include <TileLookForMuAlg.h>

Inheritance diagram for TileLookForMuAlg:
Collaboration diagram for TileLookForMuAlg:

Public Member Functions

 TileLookForMuAlg (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~TileLookForMuAlg ()
virtual StatusCode initialize () override
virtual StatusCode execute (const EventContext &ctx) const override
virtual StatusCode finalize () override
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

enum  N_CELLS_SAMP { N_CELLS_D = 13 , N_CELLS_BC = 30 , N_CELLS_A = 30 }
enum  N_OF_MODULES { N_MODULES = 64 }
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

const TileIDm_tileID
double m_etaD [N_CELLS_D]
double m_etaBC [N_CELLS_BC]
double m_etaA [N_CELLS_A]
const int m_nMuMax
std::vector< int > m_fromDtoBC
std::vector< int > m_fromBCtoA
double m_loThrA
double m_loThrBC
double m_loThrD
double m_loThrITC
std::vector< double > m_hiThrD
std::vector< double > m_hiThrBC
std::vector< double > m_hiThrA
SG::ReadHandleKey< CaloCellContainerm_cellContainerKey
SG::WriteHandleKey< TileMuContainerm_muContainerKey
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 43 of file TileLookForMuAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ N_CELLS_SAMP

Enumerator
N_CELLS_D 
N_CELLS_BC 
N_CELLS_A 

Definition at line 62 of file TileLookForMuAlg.h.

◆ N_OF_MODULES

Enumerator
N_MODULES 

Definition at line 65 of file TileLookForMuAlg.h.

65 {
66 N_MODULES = 64
67 };

Constructor & Destructor Documentation

◆ TileLookForMuAlg()

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

Definition at line 28 of file TileLookForMuAlg.cxx.

30 : AthReentrantAlgorithm(name, pSvcLocator)
31 , m_tileID(0)
32 , m_etaD()
33 , m_etaBC()
34 , m_etaA()
35 , m_nMuMax(30)
36{
37 declareProperty("LowerTresh0MeV", m_loThrA=80.0);
38 declareProperty("LowerTresh1MeV", m_loThrBC=80.0);
39 declareProperty("LowerTresh2MeV", m_loThrD=80.0);
40 declareProperty("LowerTreshScinMeV", m_loThrITC=160.0);
41 declareProperty("UpperTresh2MeV", m_hiThrD);
42 declareProperty("UpperTresh1MeV", m_hiThrBC);
43 declareProperty("UpperTresh0MeV", m_hiThrA);
44 declareProperty("From3to2", m_fromDtoBC);
45 declareProperty("From2to1", m_fromBCtoA);
46
47}
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::vector< int > m_fromBCtoA
std::vector< double > m_hiThrBC
std::vector< int > m_fromDtoBC
const TileID * m_tileID
double m_etaBC[N_CELLS_BC]
std::vector< double > m_hiThrA
double m_etaA[N_CELLS_A]
double m_etaD[N_CELLS_D]
std::vector< double > m_hiThrD

◆ ~TileLookForMuAlg()

TileLookForMuAlg::~TileLookForMuAlg ( )
virtual

Definition at line 49 of file TileLookForMuAlg.cxx.

49 {
50}

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 }

◆ 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>

◆ 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 TileLookForMuAlg::execute ( const EventContext & ctx) const
overridevirtual

Definition at line 103 of file TileLookForMuAlg.cxx.

103 {
104
105 ATH_MSG_DEBUG("TileLookForMuAlg execution started");
106
107 //coverity[STACK_USE]
108 double eneA[N_CELLS_A][N_MODULES]; // calorimeter cell matrices
109 //coverity[STACK_USE]
110 double eneBC[N_CELLS_BC][N_MODULES];
111 //coverity[STACK_USE]
112 double eneD[N_CELLS_D][N_MODULES];
113
114 memset(eneA, 0, sizeof(eneA));
115 memset(eneBC, 0, sizeof(eneBC));
116 memset(eneD, 0, sizeof(eneD));
117
118 SG::WriteHandle<TileMuContainer> muContainer(m_muContainerKey, ctx);
119 ATH_CHECK( muContainer.record(std::make_unique<TileMuContainer>()) );
120
121
122 // Get CaloCell Container
123 std::vector<const CaloCell*> cellList;
124
125 SG::ReadHandle<CaloCellContainer> cellContainer(m_cellContainerKey, ctx);
126 ATH_CHECK( cellContainer.isValid() );
127
130 cellContainer->beginConstCalo(tileCell_ID);
132 cellContainer->endConstCalo(tileCell_ID);
133
134 ATH_MSG_DEBUG( "Calo Container size "
135 << cellContainer->nCellsCalo(tileCell_ID));
136
137 double phi[64] = { 0 };
138// TileID::SAMPLE cellSample;
139 for (; currentCell != lastCell; ++currentCell) {
140 int iCell = -1;
141 double cellEta = (*currentCell)->eta();
142 if (cellEta > -1.5 && cellEta < 1.5) {
143 int cellModule;
144 int cellSample = m_tileID->sample((*currentCell)->ID());
145 switch (cellSample) {
146 case TileID::SAMP_A:
147 iCell = (cellEta + 1.5) * 10;
148 cellModule = m_tileID->module((*currentCell)->ID());
149 eneA[iCell][cellModule] = (*currentCell)->energy();
150 phi[cellModule] = (*currentCell)->phi();
151 break;
152 case TileID::SAMP_BC:
153 iCell = (cellEta + 1.5) * 10;
154 cellModule = m_tileID->module((*currentCell)->ID());
155 eneBC[iCell][cellModule] = (*currentCell)->energy();
156 phi[cellModule] = (*currentCell)->phi();
157 break;
158 case TileID::SAMP_D:
159 iCell = (cellEta + 1.3) * 5;
160 cellModule = m_tileID->module((*currentCell)->ID());
161 eneD[iCell][cellModule] = (*currentCell)->energy();
162 phi[cellModule] = (*currentCell)->phi();
163 cellList.push_back(*currentCell);
164 break;
165 case TileID::SAMP_E:
166 iCell = (cellEta + 1.5) * 10;
167 if (iCell == 4 || iCell == 25) {
168 cellModule = m_tileID->module((*currentCell)->ID());
169 eneA[iCell][cellModule] = (*currentCell)->energy();
170 phi[cellModule] = (*currentCell)->phi();
171 }
172 break;
173 }
174 }
175
176 if (msgLvl(MSG::VERBOSE)) {
177 msg(MSG::VERBOSE) << "scintillators sample, eta, phi, ene => "
178 << m_tileID->sample((*currentCell)->ID()) << ","
179 << cellEta << ","
180 << (*currentCell)->phi() << ","
181 << (*currentCell)->energy() << endmsg;
182
183 msg(MSG::VERBOSE) << "sample, tower, eta => "
184 << m_tileID->sample((*currentCell)->ID()) << ", "
185 << m_tileID->tower((*currentCell)->ID()) << ", "
186 << cellEta << endmsg;
187 }
188 } /* end of Tile cells loop*/
189
190 std::vector<double> muEtaD;
191 std::vector<float> muEneD;
192 std::vector<int> muModule;
193 std::vector<int> muCellD;
194 std::vector<int> muSplitted;
195 std::vector<int> muQualityD;
196 std::vector<int> muFound;
197 muEtaD.reserve(m_nMuMax);
198 muEneD.reserve(m_nMuMax);
199 muModule.reserve(m_nMuMax);
200 muCellD.reserve(m_nMuMax);
201 muSplitted.reserve(m_nMuMax);
202 muQualityD.reserve(m_nMuMax);
203 muFound.reserve(m_nMuMax);
204
205 int nCandidates = 0, ntri = 0;
206 int nSplitted = 0;
207
208 ATH_MSG_VERBOSE("Start the muon search candidates ");
209
210 // find muon candidates
211 int lastMuCell = -3;
212 int lastMuModule = -3;
213 for (int iModule = 0; iModule < N_MODULES; ++iModule) {
214 int prevCell = -2;
215 for (int iCellD = 0; iCellD < N_CELLS_D; ++iCellD) {
216 float energy = eneD[iCellD][iModule];
217 if (energy >= m_loThrD) {
218 int splitted = -1;
219 double eta = m_etaD[iCellD];
220 double hiThr = m_hiThrD[iCellD];
221 int quality = (energy < hiThr) ? 0 : 1;
222 // check for muon splitting (same phi bin and neighboring eta bin)
223 if (prevCell == lastMuCell && iModule == lastMuModule) {
224 int sumQuality = quality + muQualityD.back();
225 float sumEnergy = energy + eneD[prevCell][iModule];
226 double hiPrevThr = m_hiThrD[prevCell];
227 double maxHiThr = (hiThr > hiPrevThr) ? hiThr : hiPrevThr;
228 if ((sumQuality == 0 && sumEnergy < maxHiThr) || sumQuality == 1) {
229 // possible splitting with last found muon candidate
230 splitted = nCandidates - 1; // idx of splitting mu candidate
231 energy = sumEnergy;
232 eta = (eta + m_etaD[prevCell]) / 2;
233 ++nSplitted;
234 ATH_MSG_VERBOSE( "Possible splits between mu candidates ("
235 << (splitted + 1) << ", " << splitted
236 << "): etaD1, etaD2, eta => "
237 << m_etaD[iCellD] << ", "
238 << m_etaD[prevCell] << ", "
239 << eta
240 << "; eneD1, eneD2, energy => "
241 << eneD[iCellD][iModule] << ", "
242 << eneD[prevCell][iModule] << ", "
243 << energy);
244 }
245 }
246 muModule.push_back(iModule);
247 muCellD.push_back(iCellD);
248 muSplitted.push_back(splitted);
249 muFound.push_back(0);
250 muEneD.push_back(energy);
251 muQualityD.push_back(quality);
252 muEtaD.push_back(eta);
253 ++nCandidates;
254 lastMuCell = iCellD;
255 lastMuModule = iModule;
256 ATH_MSG_VERBOSE( "Candidate number= " << nCandidates
257 << ", tower index (iCellD)= " << iCellD
258 << ", module index(iModuleD)= " << iModule
259 << ", Energy(iCellD)(iModuleD) = " << eneD[iCellD][iModule]
260 << ", threshold2(iCellD)= " << m_hiThrD[iCellD]);
261 } else {
262 // ATH_MSG_VERBOSE ( "no candidates" );
263 }
264 prevCell = iCellD;
265 }
266 }
267
268 // debug ----------------------------------------
269 if (msgLvl(MSG::VERBOSE)) {
270 for (int i = 0; i < nCandidates; ++i) {
271 msg(MSG::VERBOSE) << "Candidates list: number phi,ene, eta "
272 << i << ","
273 << muModule[i] << ","
274 << muEneD[i] << ","
275 << muCellD[i]
276 << "nSplitted,muSplitted(cand)" << nSplitted << ", "
277 << muSplitted[i] << endmsg;
278 }
279 }
280
281 //*************** loop on the candidates----------------------*
282
283 for (int iMu = 0; iMu < nCandidates; ++iMu) {
284 int splitted = muSplitted[iMu];
285 if (splitted < 0 || muFound[splitted] == 0) {
286
287 // the most important information on mu is in the 3rd sample
288 // to avoid multiple counting due to splitting in 2nd and 1st Sp. cells
289 // the loop stop when the candidate is found
290
291 int module = muModule[iMu];
293 "loop on mu candidates: iMu, module = " << iMu << ", " << module);
294 int idxD = 6 * muCellD[iMu];
295 ATH_MSG_VERBOSE ("number of cells in BC layer to check = " << m_fromDtoBC[idxD]);
296 int endIdxD = idxD + m_fromDtoBC[idxD];
297 while (++idxD <= endIdxD && muFound[iMu] != 1) {
298 int cellBC = m_fromDtoBC[idxD];
299 float energyBC = eneBC[cellBC][module];
300 ATH_MSG_VERBOSE( "cellBC = " << cellBC
301 << ", module=" << module
302 << ", eneBC =" << energyBC);
303 if (energyBC > m_loThrBC) {
304 int qualityBC = (energyBC < m_hiThrBC[cellBC]) ? 0 : 1;
305 int idxBC = 6 * cellBC;
306 ATH_MSG_VERBOSE ("number of cells in A layer to check for mu = " << m_fromBCtoA[idxBC]);
307 int endIdxBC = idxBC + m_fromBCtoA[idxBC];
308 while (++idxBC <= endIdxBC && muFound[iMu] != 1) {
309 int cellA = m_fromBCtoA[idxBC];
310 float energyA = eneA[cellA][module];
311 ATH_MSG_VERBOSE( "cellA index = " << cellA
312 << ", module=" << module
313 << ", eneA =" << energyA);
314
315 if ( energyA > ( (cellA == 4 || cellA == 25) ? m_loThrITC : m_loThrA ) ) {
316
317 int qualityA = (energyA < m_hiThrA[cellA]) ? 0 : 1;
318
319 // We have a muon like signature
320
321 int muQuality = muQualityD[iMu] + qualityBC + qualityA;
322 if (muQuality <= 1) {
323 muFound[iMu] = 1;
324 double muEta = (muEtaD[iMu] + m_etaBC[cellBC] + m_etaA[cellA]) / 3;
325 double muPhi = phi[module];
326 std::vector<float> muEnergy;
327 muEnergy.reserve(4);
328 muEnergy.push_back(energyA);
329 muEnergy.push_back(energyBC);
330 muEnergy.push_back(muEneD[iMu]);
331 float eneAround = 0;
332
333 ATH_MSG_VERBOSE( "tag ntri eta,phi,ene[0]= " << (++ntri) << ", "
334 << muEta << ", "
335 << muPhi << ", "
336 << muEnergy[0] << ", "
337 << muEnergy[1] << ", "
338 << muEnergy[2]
339 << " tag eta 1st, 2nd, 3rd,"
340 << m_etaA[cellA] << ", "
341 << m_etaBC[cellBC] << ", "
342 << m_etaD[muCellD[iMu]]);
343
344 int nextModule = (module != 63) ? (module + 1) : 0;
345 int prevModule = (module != 0) ? (module - 1) : 63;
346 eneAround = eneA[cellA][nextModule] + eneA[cellA][prevModule]
347 + eneBC[cellBC][nextModule] + eneBC[cellBC][prevModule]; //phi neigh
348
349 int nextCellA = cellA + 1;
350 int prevCellA = cellA - 1;
351 if (nextCellA < N_CELLS_A && prevCellA > 0) {
352 eneAround += eneA[nextCellA][module] + eneA[prevCellA][module]
353 + eneA[nextCellA][nextModule]
354 + eneA[nextCellA][prevModule]
355 + eneA[prevCellA][nextModule]
356 + eneA[prevCellA][prevModule];
357
358 }
359
360 int nextCellBC = cellBC + 1;
361 int prevCellBC = cellBC - 1;
362 if (nextCellBC < N_CELLS_BC && prevCellBC > 0) {
363 eneAround += eneBC[nextCellBC][module]
364 + eneBC[prevCellBC][module]
365 + eneBC[nextCellBC][nextModule]
366 + eneBC[nextCellBC][prevModule]
367 + eneBC[prevCellBC][nextModule]
368 + eneBC[prevCellBC][prevModule];
369
370 }
371
372 muEnergy.push_back(eneAround);
373 std::unique_ptr<TileMu> muon = std::make_unique<TileMu>((float) muEta,
374 (float) muPhi,
375 muEnergy,
376 muQuality);
377
378 ATH_MSG_VERBOSE( "muon tag eta=" << muon->eta()
379 << " muon tag phi=" << muon->phi()
380 << " energydepVec[0]=" << muon->enedep()[0]
381 << " energydepVec[1]=" << muon->enedep()[1]
382 << " energydepVec[2]=" << muon->enedep()[2]
383 << " energydepVec[3]=" << muon->enedep()[3]
384 << " muon tag Q factor=" << muon->quality()
385 << " ene around= " << eneAround);
386
387 muContainer->push_back(muon.release());
388 }
389
390 } else {
391 ATH_MSG_VERBOSE(" tag eneA out");
392 } //endif eneA is in the range
393 } //end loop on pattern 1st layer
394 } else {
395 ATH_MSG_VERBOSE(" tag eneBC out");
396 } //endif eneBC is in the range
397 } //endloop on pattern 2nd layer
398 } else {
399 break;
400 }
401 } //endloop on candidate
402
403//-----debug-----------------------------------------------
404 // cellList contain the 3rd layer cell information
405 if (msgLvl(MSG::VERBOSE)) {
406 for (const CaloCell* cell : cellList) {
407 msg(MSG::VERBOSE) << " tag Cell (sect,side,mod,tow,sam)=("
408 << m_tileID->section(cell->ID()) << " "
409 << m_tileID->side(cell->ID()) << " "
410 << m_tileID->module(cell->ID()) << " "
411 << m_tileID->tower(cell->ID()) << " "
412 << m_tileID->sample(cell->ID())
413 << "),(eta,phi,energy)=("
414 << cell->eta() << ","
415 << cell->phi() << ","
416 << cell->energy() << ")" << endmsg;
417 }
418 }
419
420 //debug---------------------------------------------------
421 // check the mu tag container
422 if (msgLvl(MSG::DEBUG)) {
423 for (const TileMu* mu : *muContainer) {
424 msg(MSG::DEBUG) << "Container name = " << m_muContainerKey.key()
425 << " eta = " << mu->eta()
426 << " phi = " << mu->phi()
427 << " enedep[0] = " << (mu->enedep())[0]
428 << " enedep[1] = " << (mu->enedep())[1]
429 << " enedep[2] = " << (mu->enedep())[2]
430 << " enedep[3] = " << (mu->enedep())[3]
431 << " quality = " << mu->quality() << endmsg;
432 }
433 }
434 //-------------------debug-------------------------
435
436 return StatusCode::SUCCESS;
437}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_DEBUG(x)
bool msgLvl(const MSG::Level lvl) const
CaloCell_Base_ID::SUBCALO SUBCALO
Definition CaloCell_ID.h:50
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
SG::ReadHandleKey< CaloCellContainer > m_cellContainerKey
SG::WriteHandleKey< TileMuContainer > m_muContainerKey

◆ 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.

◆ 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

◆ finalize()

StatusCode TileLookForMuAlg::finalize ( )
overridevirtual

Definition at line 439 of file TileLookForMuAlg.cxx.

439 {
440 ATH_MSG_DEBUG("TileLookForMuAlg finalization completed");
441 return StatusCode::SUCCESS;
442}

◆ initialize()

StatusCode TileLookForMuAlg::initialize ( )
overridevirtual

Definition at line 55 of file TileLookForMuAlg.cxx.

55 {
56
57 // retrieve TileID helper and TileIfno from det store
58
60
61
62 // define a numbering scheme for the cells
63 double eta_D = -1.2;
64 for (int iCellD = 0; iCellD < N_CELLS_D; ++iCellD) {
65 m_etaD[iCellD] = eta_D;
66 eta_D += 0.2;
67 }
68
69 if (msgLvl(MSG::DEBUG)) {
70 for (int iCellD = 0; iCellD < N_CELLS_D; ++iCellD) {
71 msg(MSG::DEBUG) << " etaD[" << iCellD << "] = " << m_etaD[iCellD] << endmsg;
72 }
73 }
74
75
76 double eta_BC_A = -1.45;
77 for (int iCell = 0; iCell < N_CELLS_BC; ++iCell) {
78 m_etaBC[iCell] = eta_BC_A;
79 m_etaA[iCell] = eta_BC_A;
80 eta_BC_A += 0.1;
81 }
82
83
84 if (msgLvl(MSG::DEBUG)) {
85 for (int iCell = 0; iCell < N_CELLS_BC; ++iCell) {
86 msg(MSG::DEBUG) << " etaBC[" << iCell << "] = " << m_etaBC[iCell] << endmsg;
87 msg(MSG::DEBUG) << " etaA[" << iCell << "] = " << m_etaA[iCell] << endmsg;
88 }
89 }
90
91
92 ATH_CHECK( m_cellContainerKey.initialize() );
93 ATH_CHECK( m_muContainerKey.initialize() );
94
95 ATH_MSG_DEBUG("TileLookForMuAlg initialization completed");
96
97 return StatusCode::SUCCESS;
98}
#define CHECK(...)
Evaluate an expression and check for errors.
const ServiceHandle< StoreGateSvc > & detStore() const
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ 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}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_WARNING(x)
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_cellContainerKey

SG::ReadHandleKey<CaloCellContainer> TileLookForMuAlg::m_cellContainerKey
private
Initial value:
{this,"CellsNames",
"AllCalo",
"Input Calo cell container key"}

Definition at line 86 of file TileLookForMuAlg.h.

86 {this,"CellsNames",
87 "AllCalo",
88 "Input Calo cell container key"};

◆ 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_etaA

double TileLookForMuAlg::m_etaA[N_CELLS_A]
private

Definition at line 70 of file TileLookForMuAlg.h.

◆ m_etaBC

double TileLookForMuAlg::m_etaBC[N_CELLS_BC]
private

Definition at line 69 of file TileLookForMuAlg.h.

◆ m_etaD

double TileLookForMuAlg::m_etaD[N_CELLS_D]
private

Definition at line 68 of file TileLookForMuAlg.h.

◆ 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_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_fromBCtoA

std::vector<int> TileLookForMuAlg::m_fromBCtoA
private

Definition at line 74 of file TileLookForMuAlg.h.

◆ m_fromDtoBC

std::vector<int> TileLookForMuAlg::m_fromDtoBC
private

Definition at line 73 of file TileLookForMuAlg.h.

◆ m_hiThrA

std::vector<double> TileLookForMuAlg::m_hiThrA
private

Definition at line 84 of file TileLookForMuAlg.h.

◆ m_hiThrBC

std::vector<double> TileLookForMuAlg::m_hiThrBC
private

Definition at line 83 of file TileLookForMuAlg.h.

◆ m_hiThrD

std::vector<double> TileLookForMuAlg::m_hiThrD
private

Definition at line 82 of file TileLookForMuAlg.h.

◆ m_loThrA

double TileLookForMuAlg::m_loThrA
private

Definition at line 77 of file TileLookForMuAlg.h.

◆ m_loThrBC

double TileLookForMuAlg::m_loThrBC
private

Definition at line 78 of file TileLookForMuAlg.h.

◆ m_loThrD

double TileLookForMuAlg::m_loThrD
private

Definition at line 79 of file TileLookForMuAlg.h.

◆ m_loThrITC

double TileLookForMuAlg::m_loThrITC
private

Definition at line 80 of file TileLookForMuAlg.h.

◆ m_muContainerKey

SG::WriteHandleKey<TileMuContainer> TileLookForMuAlg::m_muContainerKey
private
Initial value:
{this,"TileMuTagsOutputName",
"TileMuObj",
"Output Tile mu container key"}

Definition at line 90 of file TileLookForMuAlg.h.

90 {this,"TileMuTagsOutputName",
91 "TileMuObj",
92 "Output Tile mu container key"};

◆ m_nMuMax

const int TileLookForMuAlg::m_nMuMax
private

Definition at line 71 of file TileLookForMuAlg.h.

◆ m_tileID

const TileID* TileLookForMuAlg::m_tileID
private

Definition at line 59 of file TileLookForMuAlg.h.

◆ 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: