ATLAS Offline Software
Loading...
Searching...
No Matches
ITk::StripRDOAnalysis Class Reference

#include <StripRDOAnalysis.h>

Inheritance diagram for ITk::StripRDOAnalysis:

Public Member Functions

 StripRDOAnalysis (const std::string &name, ISvcLocator *pSvcLocator)
virtual StatusCode initialize () override final
virtual StatusCode execute () override final
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
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 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

SG::ReadHandleKey< SCT_RDO_Containerm_inputKey {this, "CollectionName", "ITkStripRDOs", "Input ITk Strip RDO collection name"}
SG::ReadHandleKey< InDetSimDataCollectionm_inputTruthKey {this, "SDOCollectionName", "ITkStripSDO_Map", "Input ITk Strip SDO collection name"}
SG::ReadHandleKey< McEventCollectionm_inputMcEventCollectionKey {this, "McEventCollectionName", "TruthEvent", "Input McEventCollection name"}
const SCT_IDm_sctID {}
const InDetDD::SCT_DetectorManagerm_SCT_Manager {}
Gaudi::Property< std::string > m_histPath {this, "HistPath", "/RDOAnalysis/ITkStrip/", ""}
Gaudi::Property< std::string > m_sharedHistPath {this, "SharedHistPath", "/RDOAnalysis/histos/", ""}
Gaudi::Property< std::string > m_ntuplePath {this, "NtuplePath", "/RDOAnalysis/ntuples/", ""}
Gaudi::Property< std::string > m_ntupleName {this, "NtupleName", "ITkStrip", ""}
Gaudi::Property< bool > m_doPosition {this, "DoPosition", true, ""}
ServiceHandle< ITHistSvc > m_thistSvc {this, "HistSvc", "THistSvc", ""}
std::vector< unsigned long long > * m_rdoID {}
std::vector< unsigned int > * m_rdoWord {}
std::vector< int > * m_barrelEndcap {}
std::vector< int > * m_layerDisk {}
std::vector< int > * m_phiModule {}
std::vector< int > * m_etaModule {}
std::vector< int > * m_side {}
std::vector< int > * m_strip {}
std::vector< int > * m_row {}
std::vector< int > * m_groupSize {}
std::vector< double > * m_globalX0 {}
std::vector< double > * m_globalY0 {}
std::vector< double > * m_globalZ0 {}
std::vector< double > * m_globalX1 {}
std::vector< double > * m_globalY1 {}
std::vector< double > * m_globalZ1 {}
std::vector< double > * m_localX {}
std::vector< double > * m_localY {}
std::vector< double > * m_localZ {}
std::vector< unsigned long long > * m_sdoID {}
std::vector< int > * m_sdoWord {}
std::vector< int > * m_barrelEndcap_sdo {}
std::vector< int > * m_layerDisk_sdo {}
std::vector< int > * m_phiModule_sdo {}
std::vector< int > * m_etaModule_sdo {}
std::vector< int > * m_side_sdo {}
std::vector< int > * m_strip_sdo {}
std::vector< int > * m_row_sdo {}
std::vector< bool > * m_noise {}
std::vector< bool > * m_belowThresh {}
std::vector< bool > * m_disabled {}
std::vector< int > * m_barcode {}
std::vector< int > * m_eventIndex {}
std::vector< float > * m_charge {}
std::vector< std::vector< int > > * m_barcode_vec {}
std::vector< std::vector< int > > * m_eventIndex_vec {}
std::vector< std::vector< float > > * m_charge_vec {}
TH1 * m_h_rdoID {}
TH1 * m_h_rdoWord {}
TH1 * m_h_barrelEndcap {}
TH1 * m_h_layerDisk {}
TH1 * m_h_phiModule {}
TH1 * m_h_etaModule {}
TH1 * m_h_side {}
TH1 * m_h_strip {}
TH1 * m_h_row {}
TH1 * m_h_groupSize {}
TH2 * m_h_phi_v_eta {}
TH1 * m_h_brlLayer {}
TH1 * m_h_brlPhiMod {}
TH1 * m_h_brlEtaMod {}
TH1 * m_h_brlSide {}
TH1 * m_h_brlStrip {}
TH1 * m_h_brlGroupSize {}
TH2 * m_h_brl_phi_v_eta {}
TH1 * m_h_ecDisk {}
TH1 * m_h_ecPhiMod {}
TH1 * m_h_ecEtaMod {}
TH1 * m_h_ecSide {}
TH1 * m_h_ecStrip {}
TH1 * m_h_ecGroupSize {}
TH2 * m_h_ec_phi_v_eta {}
TH1 * m_h_sdoID {}
TH1 * m_h_sdoWord {}
TH1 * m_h_barrelEndcap_sdo {}
TH1 * m_h_layerDisk_sdo {}
TH1 * m_h_phiModule_sdo {}
TH1 * m_h_etaModule_sdo {}
TH1 * m_h_side_sdo {}
TH1 * m_h_strip_sdo {}
TH1 * m_h_row_sdo {}
TH1 * m_h_barcode {}
TH1 * m_h_eventIndex {}
TH1 * m_h_charge {}
TH2 * m_h_phi_v_eta_sdo {}
TH1 * m_h_belowThresh_brl {}
TH1 * m_h_belowThresh_ec {}
TH1 * m_h_disabled_brl {}
TH1 * m_h_disabled_ec {}
std::vector< TH1 * > m_h_brl_strip_perLayer
std::vector< TH1 * > m_h_ec_strip_perLayer
TH2 * m_h_globalXY {}
TH2 * m_h_globalZR {}
LockedHandle< TH2 > m_h_globalXY_shared {}
LockedHandle< TH2 > m_h_globalZR_shared {}
TH1 * m_h_globalX {}
TH1 * m_h_globalY {}
TH1 * m_h_globalZ {}
TH1 * m_h_truthMatchedRDOs {}
TTree * m_tree {}
DataObjIDColl m_extendedExtraObjects
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 37 of file StripRDOAnalysis.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ StripRDOAnalysis()

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

Definition at line 21 of file StripRDOAnalysis.cxx.

22 : AthAlgorithm(name, pSvcLocator)
23{
24}
AthAlgorithm()
Default constructor:

Member Function Documentation

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< 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< 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< 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< 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 ITk::StripRDOAnalysis::execute ( )
finaloverridevirtual

Definition at line 306 of file StripRDOAnalysis.cxx.

306 {
307 ATH_MSG_DEBUG( "In StripRDOAnalysis::execute()" );
308
309 m_rdoID->clear();
310 m_rdoWord->clear();
311 m_barrelEndcap->clear();
312 m_layerDisk->clear();
313 m_phiModule->clear();
314 m_etaModule->clear();
315 m_side->clear();
316 m_strip->clear();
317 m_row->clear();
318 m_groupSize->clear();
319 if (m_doPosition) {
320 m_globalX0->clear();
321 m_globalY0->clear();
322 m_globalZ0->clear();
323 m_globalX1->clear();
324 m_globalY1->clear();
325 m_globalZ1->clear();
326 m_localX->clear();
327 m_localY->clear();
328 m_localZ->clear();
329 }
330 m_sdoID->clear();
331 m_sdoWord->clear();
332 m_barrelEndcap_sdo->clear();
333 m_layerDisk_sdo->clear();
334 m_phiModule_sdo->clear();
335 m_etaModule_sdo->clear();
336 m_side_sdo->clear();
337 m_strip_sdo->clear();
338 m_row_sdo->clear();
339 m_noise->clear();
340 m_belowThresh->clear();
341 m_disabled->clear();
342 m_barcode->clear();
343 m_eventIndex->clear();
344 m_charge->clear();
345 m_barcode_vec->clear();
346 m_eventIndex_vec->clear();
347 m_charge_vec->clear();
348
349 // RawData
350 SG::ReadHandle<SCT_RDO_Container> p_SCT_RDO_cont (m_inputKey);
351 //Adding SimMap and McEvent here for added truthMatching checks
352 SG::ReadHandle<InDetSimDataCollection> simDataMapSCT (m_inputTruthKey);
353 SG::ReadHandle<McEventCollection> mcEventCollection (m_inputMcEventCollectionKey);
354
355 const HepMC::GenEvent* hardScatterEvent(nullptr);
356 bool doTruthMatching = true;
357 if (mcEventCollection->size()==0){
358 ATH_MSG_WARNING("Failed to retrieve a nonzero sized truth event collection, disabling truthMatching");
359 doTruthMatching = false;
360 }
361 if(doTruthMatching) hardScatterEvent = mcEventCollection->at(0);
362
363 if(p_SCT_RDO_cont.isValid()) {
364 // loop over RDO container
365 SCT_RDO_Container::const_iterator rdoCont_itr(p_SCT_RDO_cont->begin());
366 const SCT_RDO_Container::const_iterator rdoCont_end(p_SCT_RDO_cont->end());
367
368 for ( ; rdoCont_itr != rdoCont_end; ++rdoCont_itr ) {
369 const SCT_RDO_Collection* p_SCT_RDO_coll(*rdoCont_itr);
370 SCT_RDO_Collection::const_iterator rdo_itr(p_SCT_RDO_coll->begin());
371 const SCT_RDO_Collection::const_iterator rdo_end(p_SCT_RDO_coll->end());
372
373 for ( ; rdo_itr != rdo_end; ++rdo_itr ) {
374 if(doTruthMatching){
375 m_h_truthMatchedRDOs->Fill(1.5);
376 bool findMatch = false;
377 if(simDataMapSCT.isValid()){
378 InDetSimDataCollection::const_iterator iter = (*simDataMapSCT).find((*rdo_itr)->identify());
379
380 if ( iter != (*simDataMapSCT).end() ) {
381 const InDetSimData& sdo = iter->second;
382 const std::vector< InDetSimData::Deposit >& deposits = sdo.getdeposits();
383 std::vector< InDetSimData::Deposit >::const_iterator nextdeposit = deposits.begin();
384 std::vector< InDetSimData::Deposit >::const_iterator lastdeposit = deposits.end();
385 for( ; nextdeposit!=lastdeposit; ++nextdeposit) {
386 const HepMcParticleLink& particleLink = nextdeposit->first;
387 if(particleLink.isValid() && !findMatch){
388 HepMC::ConstGenParticlePtr genPart(particleLink.cptr());
389 if(genPart->parent_event() == hardScatterEvent) m_h_truthMatchedRDOs->Fill(3.5);
390 m_h_truthMatchedRDOs->Fill(2.5);
391 findMatch = true;
392 }
393 }
394 }
395 }
396 if(!findMatch) m_h_truthMatchedRDOs->Fill(4.5);
397 }
398 const Identifier rdoID((*rdo_itr)->identify());
399 const unsigned int rdoWord((*rdo_itr)->getWord());
400 const int sctBrlEc(m_sctID->barrel_ec(rdoID));
401 const int sctLayerDisk(m_sctID->layer_disk(rdoID));
402 const int sctPhiMod(m_sctID->phi_module(rdoID));
403 const int sctEtaMod(m_sctID->eta_module(rdoID));
404 const int sctSide(m_sctID->side(rdoID));
405 const int sctStrip(m_sctID->strip(rdoID));
406 const int sctRow(m_sctID->row(rdoID));
407 const int sctGroupSize((*rdo_itr)->getGroupSize());
408
409 const unsigned long long rdoID_int = rdoID.get_compact();
410
411
412 const InDetDD::SiDetectorElement *detEl = m_SCT_Manager->getDetectorElement(rdoID);
413
414 if(!detEl) {
415 ATH_MSG_WARNING("No Element found for ID "<<m_sctID->show_to_string(rdoID)<<" - skipping!");
416 continue;
417 }
418
419 //Using lorentz-angle corrected version here will result in inconsistencies (ATLSWUPGR-103)
420 //NB rationlization as here should probably also be done in master
421 //https://gitlab.cern.ch/atlas/athena/-/merge_requests/33398
422
423 Amg::Vector2D localPos = detEl->rawLocalPositionOfCell(rdoID);
424
425 std::pair<Amg::Vector3D, Amg::Vector3D> endsOfStrip = detEl->endsOfStrip(localPos);
426
427 if (m_doPosition) {
428
429 m_globalX0->push_back(endsOfStrip.first.x());
430 m_globalY0->push_back(endsOfStrip.first.y());
431 m_globalZ0->push_back(endsOfStrip.first.z());
432
433 m_globalX1->push_back(endsOfStrip.second.x());
434 m_globalY1->push_back(endsOfStrip.second.y());
435 m_globalZ1->push_back(endsOfStrip.second.z());
436
437 m_localX->push_back(localPos.x());
438 m_localY->push_back(localPos.y());
439 m_localZ->push_back(0.0);
440
441 }
442 float stripradius0 = sqrt(endsOfStrip.first.x()*endsOfStrip.first.x()+endsOfStrip.first.y()*endsOfStrip.first.y());
443 float stripradius1 = sqrt(endsOfStrip.second.x()*endsOfStrip.second.x()+endsOfStrip.second.y()*endsOfStrip.second.y());
444
445 m_h_globalXY->Fill(endsOfStrip.first.x(),endsOfStrip.first.y());
446 m_h_globalXY->Fill(endsOfStrip.second.x(),endsOfStrip.second.y());
447 m_h_globalXY_shared->Fill(endsOfStrip.first.x(),endsOfStrip.first.y());
448 m_h_globalXY_shared->Fill(endsOfStrip.second.x(),endsOfStrip.second.y());
449 m_h_globalZR->Fill(endsOfStrip.first.z(),stripradius0);
450 m_h_globalZR->Fill(endsOfStrip.second.z(),stripradius1);
451 m_h_globalZR_shared->Fill(endsOfStrip.first.z(),stripradius0);
452 m_h_globalZR_shared->Fill(endsOfStrip.second.z(),stripradius1);
453 m_h_globalX->Fill(endsOfStrip.first.x());
454 m_h_globalY->Fill(endsOfStrip.first.y());
455 m_h_globalZ->Fill(endsOfStrip.first.z());
456 m_h_globalX->Fill(endsOfStrip.second.x());
457 m_h_globalY->Fill(endsOfStrip.second.y());
458 m_h_globalZ->Fill(endsOfStrip.second.z());
459
460 m_rdoID->push_back(rdoID_int);
461 m_rdoWord->push_back(rdoWord);
462 m_barrelEndcap->push_back(sctBrlEc);
463 m_layerDisk->push_back(sctLayerDisk);
464 m_phiModule->push_back(sctPhiMod);
465 m_etaModule->push_back(sctEtaMod);
466 m_side->push_back(sctSide);
467 m_row->push_back(sctRow);
468 m_strip->push_back(sctStrip);
469 m_groupSize->push_back(sctGroupSize);
470
471 m_h_rdoID->Fill(rdoID_int);
472 m_h_rdoWord->Fill(rdoWord);
473 m_h_barrelEndcap->Fill(sctBrlEc);
474 m_h_layerDisk->Fill(sctLayerDisk);
475 m_h_phiModule->Fill(sctPhiMod);
476 m_h_etaModule->Fill(sctEtaMod);
477 m_h_side->Fill(sctSide);
478 m_h_strip->Fill(sctStrip);
479 m_h_row->Fill(sctRow);
480 m_h_groupSize->Fill(sctGroupSize);
481 m_h_phi_v_eta->Fill(sctEtaMod, sctPhiMod);
482
483 if (sctBrlEc == 0) {
484 m_h_brlLayer->Fill(sctLayerDisk);
485 m_h_brlPhiMod->Fill(sctPhiMod);
486 m_h_brlEtaMod->Fill(sctEtaMod);
487 m_h_brlSide->Fill(sctSide);
488 m_h_brlStrip->Fill(sctStrip);
489 m_h_brlGroupSize->Fill(sctGroupSize);
490 m_h_brl_phi_v_eta->Fill(sctEtaMod, sctPhiMod);
491 m_h_brl_strip_perLayer[sctLayerDisk]->Fill(sctStrip);
492 m_h_brl_strip_perLayer[sctLayerDisk]->Fill(sctStrip);
493 }
494 else if (abs(sctBrlEc) == 2) {
495 m_h_ecDisk->Fill(sctLayerDisk);
496 m_h_ecPhiMod->Fill(sctPhiMod);
497 m_h_ecEtaMod->Fill(sctEtaMod);
498 m_h_ecSide->Fill(sctSide);
499 m_h_ecStrip->Fill(sctStrip);
500 m_h_ecGroupSize->Fill(sctGroupSize);
501 m_h_ec_phi_v_eta->Fill(sctEtaMod, sctPhiMod);
502 m_h_ec_strip_perLayer[sctLayerDisk]->Fill(sctStrip);
503 m_h_ec_strip_perLayer[sctLayerDisk]->Fill(sctStrip);
504 }
505 }
506 }
507 }
508
509 // SimData
510 if(simDataMapSCT.isValid()) {
511 // loop over SDO container
512 InDetSimDataCollection::const_iterator sdo_itr(simDataMapSCT->begin());
513 const InDetSimDataCollection::const_iterator sdo_end(simDataMapSCT->end());
514
515 std::vector<int> barcode_vec;
516 std::vector<int> eventIndex_vec;
517 std::vector<float> charge_vec;
518 for ( ; sdo_itr != sdo_end; ++sdo_itr ) {
519 const Identifier sdoID((*sdo_itr).first);
520 const InDetSimData& sdo((*sdo_itr).second);
521 const unsigned long long sdoID_int = sdoID.get_compact();
522 const int sdoWord(sdo.word());
523 const int sctBrlEc_sdo(m_sctID->barrel_ec(sdoID));
524 const int sctLayerDisk_sdo(m_sctID->layer_disk(sdoID));
525 const int sctPhiMod_sdo(m_sctID->phi_module(sdoID));
526 const int sctEtaMod_sdo(m_sctID->eta_module(sdoID));
527 const int sctSide_sdo(m_sctID->side(sdoID));
528 const int sctStrip_sdo(m_sctID->strip(sdoID));
529 const int sctRow_sdo(m_sctID->row(sdoID));
530 const bool noise(SCT_SimHelper::isNoise(sdo));
531 const bool belowThresh(SCT_SimHelper::isBelowThreshold(sdo));
532 const bool disabled(SCT_SimHelper::isDisabled(sdo));
533
534 m_sdoID->push_back(sdoID_int);
535 m_sdoWord->push_back(sdoWord);
536 m_barrelEndcap_sdo->push_back(sctBrlEc_sdo);
537 m_layerDisk_sdo->push_back(sctLayerDisk_sdo);
538 m_phiModule_sdo->push_back(sctPhiMod_sdo);
539 m_etaModule_sdo->push_back(sctEtaMod_sdo);
540 m_side_sdo->push_back(sctSide_sdo);
541 m_strip_sdo->push_back(sctStrip_sdo);
542 m_row_sdo->push_back(sctRow_sdo);
543 m_noise->push_back(noise);
544 m_belowThresh->push_back(belowThresh);
545 m_disabled->push_back(disabled);
546
547 if (belowThresh) {
548 if (sctBrlEc_sdo==0)
549 m_h_belowThresh_brl->Fill(sctLayerDisk_sdo);
550 else if (abs(sctBrlEc_sdo)==2)
551 m_h_belowThresh_ec->Fill(sctLayerDisk_sdo);
552 }
553
554 if (disabled) {
555 if (sctBrlEc_sdo==0)
556 m_h_disabled_brl->Fill(sctLayerDisk_sdo);
557 else if (abs(sctBrlEc_sdo)==2)
558 m_h_disabled_ec->Fill(sctLayerDisk_sdo);
559 }
560
561 m_h_sdoID->Fill(sdoID_int);
562 m_h_sdoWord->Fill(sdoWord);
563 m_h_barrelEndcap_sdo->Fill(sctBrlEc_sdo);
564 m_h_layerDisk_sdo->Fill(sctLayerDisk_sdo);
565 m_h_phiModule_sdo->Fill(sctPhiMod_sdo);
566 m_h_etaModule_sdo->Fill(sctEtaMod_sdo);
567 m_h_side_sdo->Fill(sctSide_sdo);
568 m_h_strip_sdo->Fill(sctStrip_sdo);
569 m_h_row_sdo->Fill(sctRow_sdo);
570 m_h_phi_v_eta_sdo->Fill(sctEtaMod_sdo, sctPhiMod_sdo);
571
572 // loop over deposits
573 // InDetSimData::Deposit typedef for std::pair<HepMCParticleLink,float>
574 const std::vector<InDetSimData::Deposit>& deposits = sdo.getdeposits();
575 std::vector<InDetSimData::Deposit>::const_iterator dep_itr(deposits.begin());
576 const std::vector<InDetSimData::Deposit>::const_iterator dep_end(deposits.end());
577
578 for ( ; dep_itr != dep_end; ++dep_itr ) {
579 const HepMcParticleLink& particleLink = (*dep_itr).first;
580 const int bar(HepMC::barcode(particleLink)); // FIXME barcode-based
581 const int eventIx(particleLink.eventIndex());
582 const float charge((*dep_itr).second);
583
584 m_barcode->push_back(bar);
585 m_eventIndex->push_back(eventIx);
586 m_charge->push_back(charge);
587
588 m_h_barcode->Fill(bar);
589 m_h_eventIndex->Fill(eventIx);
590 m_h_charge->Fill(charge);
591
592 barcode_vec.push_back(bar);
593 eventIndex_vec.push_back(eventIx);
594 charge_vec.push_back(charge);
595 }
596 m_barcode_vec->push_back(barcode_vec);
597 m_eventIndex_vec->push_back(eventIndex_vec);
598 m_charge_vec->push_back(charge_vec);
599 barcode_vec.clear();
600 eventIndex_vec.clear();
601 charge_vec.clear();
602 }
603 }
604
605 if (m_tree) {
606 m_tree->Fill();
607 }
608
609 return StatusCode::SUCCESS;
610}
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
double charge(const T &p)
Definition AtlasPID.h:997
InDetRawDataCollection< SCT_RDORawData > SCT_RDO_Collection
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
std::vector< float > * m_charge
std::vector< int > * m_phiModule_sdo
std::vector< double > * m_globalX1
std::vector< unsigned long long > * m_rdoID
LockedHandle< TH2 > m_h_globalZR_shared
std::vector< int > * m_barrelEndcap
std::vector< int > * m_sdoWord
std::vector< std::vector< int > > * m_eventIndex_vec
std::vector< int > * m_barcode
std::vector< TH1 * > m_h_brl_strip_perLayer
SG::ReadHandleKey< InDetSimDataCollection > m_inputTruthKey
std::vector< bool > * m_belowThresh
std::vector< int > * m_phiModule
std::vector< std::vector< float > > * m_charge_vec
std::vector< int > * m_side_sdo
std::vector< int > * m_groupSize
std::vector< int > * m_barrelEndcap_sdo
std::vector< double > * m_localZ
std::vector< int > * m_etaModule
LockedHandle< TH2 > m_h_globalXY_shared
Gaudi::Property< bool > m_doPosition
std::vector< double > * m_localX
std::vector< double > * m_globalZ0
std::vector< unsigned long long > * m_sdoID
std::vector< int > * m_layerDisk
std::vector< int > * m_row
std::vector< int > * m_side
SG::ReadHandleKey< SCT_RDO_Container > m_inputKey
std::vector< double > * m_globalX0
std::vector< int > * m_row_sdo
std::vector< std::vector< int > > * m_barcode_vec
std::vector< double > * m_globalY1
SG::ReadHandleKey< McEventCollection > m_inputMcEventCollectionKey
std::vector< int > * m_layerDisk_sdo
std::vector< unsigned int > * m_rdoWord
std::vector< bool > * m_noise
std::vector< double > * m_globalZ1
std::vector< int > * m_strip_sdo
std::vector< double > * m_localY
std::vector< int > * m_strip
const InDetDD::SCT_DetectorManager * m_SCT_Manager
std::vector< int > * m_etaModule_sdo
std::vector< bool > * m_disabled
std::vector< TH1 * > m_h_ec_strip_perLayer
std::vector< double > * m_globalY0
std::vector< int > * m_eventIndex
std::pair< Amg::Vector3D, Amg::Vector3D > endsOfStrip(const Amg::Vector2D &position) const
Special method for SCT to retrieve the two ends of a "strip" Returned coordinates are in global frame...
Amg::Vector2D rawLocalPositionOfCell(const SiCellId &cellId) const
Returns position (center) of cell.
int word() const
const std::vector< Deposit > & getdeposits() const
static bool isNoise(const InDetSimData &sdo)
static bool isBelowThreshold(const InDetSimData &sdo)
static bool isDisabled(const InDetSimData &sdo)
Eigen::Matrix< double, 2, 1 > Vector2D
int barcode(const T *p)
Definition Barcode.h:16
const GenParticle * ConstGenParticlePtr
Definition GenParticle.h:38

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< 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 & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

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

Definition at line 50 of file AthAlgorithm.cxx.

51{
52 // If we didn't find any symlinks to add, just return the collection
53 // from the base class. Otherwise, return the extended collection.
54 if (!m_extendedExtraObjects.empty()) {
56 }
57 return Algorithm::extraOutputDeps();
58}
DataObjIDColl m_extendedExtraObjects

◆ initialize()

StatusCode ITk::StripRDOAnalysis::initialize ( )
finaloverridevirtual

Definition at line 26 of file StripRDOAnalysis.cxx.

26 {
27 ATH_MSG_DEBUG( "Initializing SCT_RDOAnalysis" );
28
29 // This will check that the properties were initialized
30 // properly by job configuration.
31 ATH_CHECK( m_inputKey.initialize() );
32 ATH_CHECK( m_inputTruthKey.initialize() );
34
35 // Grab SCT_ID helper
36 ATH_CHECK(detStore()->retrieve(m_sctID, "SCT_ID"));
37
39 // Grab Ntuple and histogramming service for tree
40 ATH_CHECK(m_thistSvc.retrieve());
41
42 m_tree = new TTree(m_ntupleName.value().c_str(), "ITkStripRDOAnalysis");
43 ATH_CHECK(m_thistSvc->regTree(m_ntuplePath.value() + m_ntupleName.value(), m_tree));
44 if (m_tree) {
45 // ITk Strip RDO
46 m_tree->Branch("rdoID", &m_rdoID);
47 m_tree->Branch("rdoWord", &m_rdoWord);
48 m_tree->Branch("barrelEndcap", &m_barrelEndcap);
49 m_tree->Branch("layerDisk", &m_layerDisk);
50 m_tree->Branch("phiModule", &m_phiModule);
51 m_tree->Branch("etaModule", &m_etaModule);
52 m_tree->Branch("side", &m_side);
53 m_tree->Branch("strip", &m_strip);
54 m_tree->Branch("row", &m_row);
55 m_tree->Branch("groupSize", &m_groupSize);
56 // Global coordinates
57 if (m_doPosition) {
58 m_tree->Branch("globalX0", &m_globalX0);
59 m_tree->Branch("globalY0", &m_globalY0);
60 m_tree->Branch("globalZ0", &m_globalZ0);
61 m_tree->Branch("globalX1", &m_globalX1);
62 m_tree->Branch("globalY1", &m_globalY1);
63 m_tree->Branch("globalZ1", &m_globalZ1);
64 m_tree->Branch("localX", &m_localX);
65 m_tree->Branch("localY", &m_localY);
66 m_tree->Branch("localZ", &m_localZ);
67 }
68 // ITk Strip SDO deposits
69 m_tree->Branch("sdoID", &m_sdoID);
70 m_tree->Branch("sdoWord", &m_sdoWord);
71 m_tree->Branch("barrelEndcap_sdo", &m_barrelEndcap_sdo);
72 m_tree->Branch("layerDisk_sdo", &m_layerDisk_sdo);
73 m_tree->Branch("phiModule_sdo", &m_phiModule_sdo);
74 m_tree->Branch("etaModule_sdo", &m_etaModule_sdo);
75 m_tree->Branch("side_sdo", &m_side_sdo);
76 m_tree->Branch("strip_sdo", &m_strip_sdo);
77 m_tree->Branch("row_sdo", &m_row_sdo);
78 m_tree->Branch("noise", &m_noise);
79 m_tree->Branch("belowThresh", &m_belowThresh);
80 m_tree->Branch("disabled", &m_disabled);
81 m_tree->Branch("barcode", &m_barcode);
82 m_tree->Branch("eventIndex", &m_eventIndex);
83 m_tree->Branch("charge", &m_charge);
84 m_tree->Branch("barcode_vec", &m_barcode_vec);
85 m_tree->Branch("eventIndex_vec", &m_eventIndex_vec);
86 m_tree->Branch("charge_vec", &m_charge_vec);
87 }
88 else {
89 ATH_MSG_ERROR("No tree found!");
90 }
91
92 // HISTOGRAMS
93 m_h_rdoID = new TH1F("h_rdoID", "rdoID", 100, 0, 25e17);
94 m_h_rdoID->StatOverflows();
95 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_rdoID->GetName(), m_h_rdoID));
96
97
98 m_h_rdoWord = new TH1F("h_rdoWord", "rdoWord", 100, 0, 17e6);
99 m_h_rdoWord->StatOverflows();
100 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_rdoWord->GetName(), m_h_rdoWord));
101
102 m_h_barrelEndcap = new TH1F("h_barrelEndcap", "Barrel or Endcap", 100, -3, 3);
103 m_h_barrelEndcap->StatOverflows();
105
106 m_h_layerDisk = new TH1F("h_layerDisk", "Barrel layer or Endcap disk", 100, 0, 10);
107 m_h_layerDisk->StatOverflows();
109
110 m_h_phiModule = new TH1F("h_phiModule", "Phi module", 100, 0, 60);
111 m_h_phiModule->StatOverflows();
113
114 m_h_etaModule = new TH1F("h_etaModule", "Eta module", 121, -60, 60);
115 m_h_etaModule->StatOverflows();
117
118 m_h_side = new TH1F("h_side", "Side", 100, 0, 1.5);
119 m_h_side->StatOverflows();
120 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_side->GetName(), m_h_side));
121
122 m_h_strip = new TH1F("h_strip", "Strip", 100, 0, 800);
123 m_h_strip->StatOverflows();
124 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_strip->GetName(), m_h_strip));
125
126 m_h_row = new TH1F("h_row", "Row", 100, 0, 4.5);
127 m_h_row->StatOverflows();
128 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_row->GetName(), m_h_row));
129
130 m_h_groupSize = new TH1F("h_groupSize", "Group size", 100, 0, 150);
131 m_h_groupSize->StatOverflows();
133
134 m_h_phi_v_eta = new TH2F("h_phi_v_eta", "Phi module vs eta module", 100, -7, 7, 100, 0, 60);
135 m_h_phi_v_eta->StatOverflows();
137
138 m_h_brlLayer = new TH1F("h_brlLayer", "Barrel layer", 100, 0, 10);
139 m_h_brlLayer->StatOverflows();
141
142 m_h_brlPhiMod = new TH1F("h_brlPhiMod", "Barrel phi module", 100, 0, 60);
143 m_h_brlPhiMod->StatOverflows();
145
146 m_h_brlEtaMod = new TH1F("h_brlEtaMod", "Barrel eta module", 121, -60, 60);
147 m_h_brlEtaMod->StatOverflows();
149
150 m_h_brlSide = new TH1F("h_brlSide", "Barrel side", 100, 0, 1.5);
151 m_h_brlSide->StatOverflows();
152 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_brlSide->GetName(), m_h_brlSide));
153
154 m_h_brlStrip = new TH1F("h_brlStrip", "Barrel strip", 100, 0, 800);
155 m_h_brlStrip->StatOverflows();
157
158 m_h_brlGroupSize = new TH1F("h_brlGroupSize", "Barrel group size", 100, 0, 150);
159 m_h_brlGroupSize->StatOverflows();
161
162 m_h_brl_phi_v_eta = new TH2F("h_brl_phi_v_eta", "Barrel phi module vs eta module", 100, -7, 7, 100, 0, 60);
163 m_h_brl_phi_v_eta->StatOverflows();
165
166 m_h_ecDisk = new TH1F("h_ecDisk", "Endcap disk", 100, 0, 10);
167 m_h_ecDisk->StatOverflows();
168 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_ecDisk->GetName(), m_h_ecDisk));
169
170 m_h_ecPhiMod = new TH1F("h_ecPhiMod", "Endcap phi module", 100, 0, 60);
171 m_h_ecPhiMod->StatOverflows();
173
174 m_h_ecEtaMod = new TH1F("h_ecEtaMod", "Endcap eta module", 21, 0, 20);
175 m_h_ecEtaMod->StatOverflows();
177
178 m_h_ecSide = new TH1F("h_ecSide", "Endcap side", 100, 0, 1.5);
179 m_h_ecSide->StatOverflows();
180 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_ecSide->GetName(), m_h_ecSide));
181
182 m_h_ecStrip = new TH1F("h_ecStrip", "Endcap strip", 100, 0, 800);
183 m_h_ecStrip->StatOverflows();
184 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_ecStrip->GetName(), m_h_ecStrip));
185
186 m_h_ecGroupSize = new TH1F("h_ecGroupSize", "Endcap group size", 100, 0, 150);
187 m_h_ecGroupSize->StatOverflows();
189
190 m_h_ec_phi_v_eta = new TH2F("h_ec_phi_v_eta", "Endcap phi module vs eta module", 100, -7.5, 7.5, 100, 0, 60);
191 m_h_ec_phi_v_eta->StatOverflows();
193
194 m_h_sdoID = new TH1F("h_sdoID", "sdoID", 100, 0, 1e18);
195 m_h_sdoID->StatOverflows();
196 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_sdoID->GetName(), m_h_sdoID));
197
198 m_h_sdoWord = new TH1F("h_sdoWord", "sdoWord", 100, 0, 1e7);
199 m_h_sdoWord->StatOverflows();
200 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_sdoWord->GetName(), m_h_sdoWord));
201
202 m_h_barrelEndcap_sdo = new TH1F("h_barrelEndcap_sdo", "Barrel or Endcap (SDO)", 100, -3, 3);
203 m_h_barrelEndcap_sdo->StatOverflows();
205
206 m_h_layerDisk_sdo = new TH1F("h_layerDisk_sdo", "Barrel layer or Endcap disk (SDO)", 100, 0, 10);
207 m_h_layerDisk_sdo->StatOverflows();
209
210 m_h_phiModule_sdo = new TH1F("h_phiModule_sdo", "Phi module (SDO)", 100, 0, 60);
211 m_h_phiModule_sdo->StatOverflows();
213
214 m_h_etaModule_sdo = new TH1F("h_etaModule_sdo", "Eta module (SDO)", 121, -60, 60);
215 m_h_etaModule_sdo->StatOverflows();
217
218 m_h_side_sdo = new TH1F("h_side_sdo", "Side (SDO)", 100, 0, 1.5);
219 m_h_side_sdo->StatOverflows();
221
222 m_h_strip_sdo = new TH1F("h_strip_sdo", "Strip (SDO)", 100, 0, 800);
223 m_h_strip_sdo->StatOverflows();
225
226 m_h_row_sdo = new TH1F("h_row_sdo", "Row (SDO)", 100, 0, 4.5);
227 m_h_row_sdo->StatOverflows();
228 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_row_sdo->GetName(), m_h_row_sdo));
229
230 m_h_barcode = new TH1F("h_barcode", "Barcode (SDO)", 100, 0, 2.2e5);
231 m_h_barcode->StatOverflows();
232 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_barcode->GetName(), m_h_barcode));
233
234 m_h_eventIndex = new TH1F("h_eventIndex", "Event index (SDO)", 100, 0, 10);
235 m_h_eventIndex->StatOverflows();
237
238 m_h_charge = new TH1F("h_charge", "Charge (SDO)", 100, 0, 6e6);
239 m_h_charge->StatOverflows();
240 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_charge->GetName(), m_h_charge));
241
242 m_h_phi_v_eta_sdo = new TH2F("h_phi_v_eta_sdo", "Phi module vs eta module (SDO)", 100, -7, 7, 100, 0, 60);
243 m_h_phi_v_eta_sdo->StatOverflows();
245
246 m_h_belowThresh_brl = new TH1F("h_belowThresh_brl", "Below threshold strips - Barrel; # below threshold strips; layer", 8, -0.5, 7.5);
247 m_h_belowThresh_brl->StatOverflows();
249
250 m_h_belowThresh_ec = new TH1F("h_belowThresh_ec", "Below threshold strips - Endcap; # below threshold strips; layer", 8, -0.5, 7.5);
251 m_h_belowThresh_ec->StatOverflows();
253
254 m_h_disabled_brl = new TH1F("h_disabled_brl", "Disabled strips - Barrel; # disabled strips; layer", 8, -0.5, 7.5);
255 m_h_disabled_brl->StatOverflows();
257
258 m_h_disabled_ec = new TH1F("h_disabled_ec", "Disabled strips - Endcap; # disabled strips; layer", 8, -0.5, 7.5);
259 m_h_disabled_ec->StatOverflows();
261
262 for (unsigned int layer=0; layer<4; layer++) {
263 m_h_brl_strip_perLayer.emplace_back(new TH1F(("h_brl_strip_perLayer"+std::to_string(layer)).c_str(), ("Strip index - Barrel - Layer "+std::to_string(layer)).c_str(), 1300, 0, 1300));
264 m_h_brl_strip_perLayer.back()->StatOverflows();
265 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_brl_strip_perLayer.back()->GetName(), m_h_brl_strip_perLayer.back()));
266 }
267
268 for (unsigned int layer=0; layer<9; layer++) {
269 m_h_ec_strip_perLayer.emplace_back(new TH1F(("h_ec_strip_perLayer"+std::to_string(layer)).c_str(), ("Strip index - Barrel - Layer "+std::to_string(layer)).c_str(), 1300, 0, 1300));
270 m_h_ec_strip_perLayer.back()->StatOverflows();
271 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_ec_strip_perLayer.back()->GetName(), m_h_ec_strip_perLayer.back()));
272 }
273
274 m_h_globalXY = new TH2F("h_globalXY","h_globalXY; x [mm]; y [mm]",2200,-1100.,1100.,2200,1100.,1100.);
276 m_h_globalZR = new TH2F("h_globalZR","h_globalZR; z [mm]; r [mm]",6800,-3400.,3400.,1100,0.,1100.);
278 m_h_globalX = new TH1F("h_globalX","h_globalX; x [mm]",2200,-1100.,1100.);
279 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_globalX->GetName(), m_h_globalX));
280 m_h_globalY = new TH1F("h_globalY","h_globalY; y [mm]",2200,-1100.,1100.);
281 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_globalY->GetName(), m_h_globalY));
282 m_h_globalZ = new TH1F("h_globalZ","h_globalZ; z [mm]",6800,-3400.,3400.);
283 ATH_CHECK(m_thistSvc->regHist(m_histPath + m_h_globalZ->GetName(), m_h_globalZ));
284
285 // Special shared ITk histograms
286 std::string xy_name = "h_ITk_xy";
287 auto xy = std::make_unique<TH2D>(xy_name.c_str(), xy_name.c_str(), 2200, -1100, 1100, 2200, -1100, 1100);
288 xy->StatOverflows();
289 ATH_CHECK(m_thistSvc->regShared(m_sharedHistPath + xy_name, std::move(xy), m_h_globalXY_shared));
290
291 std::string zr_name = "h_ITk_zr";
292 auto zr = std::make_unique<TH2D>(zr_name.c_str(), zr_name.c_str(), 6800, -3400, 3400, 1100, 0, 1100);
293 zr->StatOverflows();
294 ATH_CHECK(m_thistSvc->regShared(m_sharedHistPath + zr_name, std::move(zr), m_h_globalZR_shared));
295
296 m_h_truthMatchedRDOs = new TH1F("h_TruthMatchedITkStripRDOs", "h_TruthMatchedITkStripRDOs", 4, 1, 5);
297 TString truthMatchBinLables[4] = { "All RDOs", "Truth Matched", "HS Matched", "Unmatched" };
298 for(unsigned int ibin = 1; ibin < 5; ibin++) {
299 m_h_truthMatchedRDOs->GetXaxis()->SetBinLabel(ibin, truthMatchBinLables[ibin-1]);
300 }
302
303 return StatusCode::SUCCESS;
304}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
const ServiceHandle< StoreGateSvc > & detStore() const
Gaudi::Property< std::string > m_ntuplePath
Gaudi::Property< std::string > m_histPath
Gaudi::Property< std::string > m_ntupleName
Gaudi::Property< std::string > m_sharedHistPath
ServiceHandle< ITHistSvc > m_thistSvc
@ layer
Definition HitInfo.h:79
retrieve(aClass, aKey=None)
Definition PyKernel.py:110
TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< 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.

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

bool AthCommonMsg< 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< 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< 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< Algorithm > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ sysInitialize()

StatusCode AthAlgorithm::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< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, AthHistogramAlgorithm, and PyAthena::Alg.

Definition at line 66 of file AthAlgorithm.cxx.

66 {
68
69 if (sc.isFailure()) {
70 return sc;
71 }
72 ServiceHandle<ICondSvc> cs("CondSvc",name());
73 for (auto h : outputHandles()) {
74 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75 // do this inside the loop so we don't create the CondSvc until needed
76 if ( cs.retrieve().isFailure() ) {
77 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78 return StatusCode::SUCCESS;
79 }
80 if (cs->regHandle(this,*h).isFailure()) {
81 sc = StatusCode::FAILURE;
82 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83 << " with CondSvc");
84 }
85 }
86 }
87 return sc;
88}
static Double_t sc
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< 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< 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 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_barcode

std::vector<int>* ITk::StripRDOAnalysis::m_barcode {}
private

Definition at line 102 of file StripRDOAnalysis.h.

102{};

◆ m_barcode_vec

std::vector< std::vector<int> >* ITk::StripRDOAnalysis::m_barcode_vec {}
private

Definition at line 105 of file StripRDOAnalysis.h.

105{};

◆ m_barrelEndcap

std::vector<int>* ITk::StripRDOAnalysis::m_barrelEndcap {}
private

Definition at line 65 of file StripRDOAnalysis.h.

65{};

◆ m_barrelEndcap_sdo

std::vector<int>* ITk::StripRDOAnalysis::m_barrelEndcap_sdo {}
private

Definition at line 90 of file StripRDOAnalysis.h.

90{};

◆ m_belowThresh

std::vector<bool>* ITk::StripRDOAnalysis::m_belowThresh {}
private

Definition at line 99 of file StripRDOAnalysis.h.

99{};

◆ m_charge

std::vector<float>* ITk::StripRDOAnalysis::m_charge {}
private

Definition at line 104 of file StripRDOAnalysis.h.

104{};

◆ m_charge_vec

std::vector< std::vector<float> >* ITk::StripRDOAnalysis::m_charge_vec {}
private

Definition at line 107 of file StripRDOAnalysis.h.

107{};

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_disabled

std::vector<bool>* ITk::StripRDOAnalysis::m_disabled {}
private

Definition at line 100 of file StripRDOAnalysis.h.

100{};

◆ m_doPosition

Gaudi::Property<bool> ITk::StripRDOAnalysis::m_doPosition {this, "DoPosition", true, ""}
private

Definition at line 57 of file StripRDOAnalysis.h.

57{this, "DoPosition", true, ""};

◆ m_etaModule

std::vector<int>* ITk::StripRDOAnalysis::m_etaModule {}
private

Definition at line 68 of file StripRDOAnalysis.h.

68{};

◆ m_etaModule_sdo

std::vector<int>* ITk::StripRDOAnalysis::m_etaModule_sdo {}
private

Definition at line 93 of file StripRDOAnalysis.h.

93{};

◆ m_eventIndex

std::vector<int>* ITk::StripRDOAnalysis::m_eventIndex {}
private

Definition at line 103 of file StripRDOAnalysis.h.

103{};

◆ m_eventIndex_vec

std::vector< std::vector<int> >* ITk::StripRDOAnalysis::m_eventIndex_vec {}
private

Definition at line 106 of file StripRDOAnalysis.h.

106{};

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_globalX0

std::vector<double>* ITk::StripRDOAnalysis::m_globalX0 {}
private

Definition at line 75 of file StripRDOAnalysis.h.

75{};

◆ m_globalX1

std::vector<double>* ITk::StripRDOAnalysis::m_globalX1 {}
private

Definition at line 78 of file StripRDOAnalysis.h.

78{};

◆ m_globalY0

std::vector<double>* ITk::StripRDOAnalysis::m_globalY0 {}
private

Definition at line 76 of file StripRDOAnalysis.h.

76{};

◆ m_globalY1

std::vector<double>* ITk::StripRDOAnalysis::m_globalY1 {}
private

Definition at line 79 of file StripRDOAnalysis.h.

79{};

◆ m_globalZ0

std::vector<double>* ITk::StripRDOAnalysis::m_globalZ0 {}
private

Definition at line 77 of file StripRDOAnalysis.h.

77{};

◆ m_globalZ1

std::vector<double>* ITk::StripRDOAnalysis::m_globalZ1 {}
private

Definition at line 80 of file StripRDOAnalysis.h.

80{};

◆ m_groupSize

std::vector<int>* ITk::StripRDOAnalysis::m_groupSize {}
private

Definition at line 73 of file StripRDOAnalysis.h.

73{};

◆ m_h_barcode

TH1* ITk::StripRDOAnalysis::m_h_barcode {}
private

Definition at line 147 of file StripRDOAnalysis.h.

147{};

◆ m_h_barrelEndcap

TH1* ITk::StripRDOAnalysis::m_h_barrelEndcap {}
private

Definition at line 112 of file StripRDOAnalysis.h.

112{};

◆ m_h_barrelEndcap_sdo

TH1* ITk::StripRDOAnalysis::m_h_barrelEndcap_sdo {}
private

Definition at line 140 of file StripRDOAnalysis.h.

140{};

◆ m_h_belowThresh_brl

TH1* ITk::StripRDOAnalysis::m_h_belowThresh_brl {}
private

Definition at line 152 of file StripRDOAnalysis.h.

152{};

◆ m_h_belowThresh_ec

TH1* ITk::StripRDOAnalysis::m_h_belowThresh_ec {}
private

Definition at line 153 of file StripRDOAnalysis.h.

153{};

◆ m_h_brl_phi_v_eta

TH2* ITk::StripRDOAnalysis::m_h_brl_phi_v_eta {}
private

Definition at line 128 of file StripRDOAnalysis.h.

128{};

◆ m_h_brl_strip_perLayer

std::vector<TH1*> ITk::StripRDOAnalysis::m_h_brl_strip_perLayer
private

Definition at line 158 of file StripRDOAnalysis.h.

◆ m_h_brlEtaMod

TH1* ITk::StripRDOAnalysis::m_h_brlEtaMod {}
private

Definition at line 124 of file StripRDOAnalysis.h.

124{};

◆ m_h_brlGroupSize

TH1* ITk::StripRDOAnalysis::m_h_brlGroupSize {}
private

Definition at line 127 of file StripRDOAnalysis.h.

127{};

◆ m_h_brlLayer

TH1* ITk::StripRDOAnalysis::m_h_brlLayer {}
private

Definition at line 122 of file StripRDOAnalysis.h.

122{};

◆ m_h_brlPhiMod

TH1* ITk::StripRDOAnalysis::m_h_brlPhiMod {}
private

Definition at line 123 of file StripRDOAnalysis.h.

123{};

◆ m_h_brlSide

TH1* ITk::StripRDOAnalysis::m_h_brlSide {}
private

Definition at line 125 of file StripRDOAnalysis.h.

125{};

◆ m_h_brlStrip

TH1* ITk::StripRDOAnalysis::m_h_brlStrip {}
private

Definition at line 126 of file StripRDOAnalysis.h.

126{};

◆ m_h_charge

TH1* ITk::StripRDOAnalysis::m_h_charge {}
private

Definition at line 149 of file StripRDOAnalysis.h.

149{};

◆ m_h_disabled_brl

TH1* ITk::StripRDOAnalysis::m_h_disabled_brl {}
private

Definition at line 155 of file StripRDOAnalysis.h.

155{};

◆ m_h_disabled_ec

TH1* ITk::StripRDOAnalysis::m_h_disabled_ec {}
private

Definition at line 156 of file StripRDOAnalysis.h.

156{};

◆ m_h_ec_phi_v_eta

TH2* ITk::StripRDOAnalysis::m_h_ec_phi_v_eta {}
private

Definition at line 136 of file StripRDOAnalysis.h.

136{};

◆ m_h_ec_strip_perLayer

std::vector<TH1*> ITk::StripRDOAnalysis::m_h_ec_strip_perLayer
private

Definition at line 159 of file StripRDOAnalysis.h.

◆ m_h_ecDisk

TH1* ITk::StripRDOAnalysis::m_h_ecDisk {}
private

Definition at line 130 of file StripRDOAnalysis.h.

130{};

◆ m_h_ecEtaMod

TH1* ITk::StripRDOAnalysis::m_h_ecEtaMod {}
private

Definition at line 132 of file StripRDOAnalysis.h.

132{};

◆ m_h_ecGroupSize

TH1* ITk::StripRDOAnalysis::m_h_ecGroupSize {}
private

Definition at line 135 of file StripRDOAnalysis.h.

135{};

◆ m_h_ecPhiMod

TH1* ITk::StripRDOAnalysis::m_h_ecPhiMod {}
private

Definition at line 131 of file StripRDOAnalysis.h.

131{};

◆ m_h_ecSide

TH1* ITk::StripRDOAnalysis::m_h_ecSide {}
private

Definition at line 133 of file StripRDOAnalysis.h.

133{};

◆ m_h_ecStrip

TH1* ITk::StripRDOAnalysis::m_h_ecStrip {}
private

Definition at line 134 of file StripRDOAnalysis.h.

134{};

◆ m_h_etaModule

TH1* ITk::StripRDOAnalysis::m_h_etaModule {}
private

Definition at line 115 of file StripRDOAnalysis.h.

115{};

◆ m_h_etaModule_sdo

TH1* ITk::StripRDOAnalysis::m_h_etaModule_sdo {}
private

Definition at line 143 of file StripRDOAnalysis.h.

143{};

◆ m_h_eventIndex

TH1* ITk::StripRDOAnalysis::m_h_eventIndex {}
private

Definition at line 148 of file StripRDOAnalysis.h.

148{};

◆ m_h_globalX

TH1* ITk::StripRDOAnalysis::m_h_globalX {}
private

Definition at line 165 of file StripRDOAnalysis.h.

165{};

◆ m_h_globalXY

TH2* ITk::StripRDOAnalysis::m_h_globalXY {}
private

Definition at line 161 of file StripRDOAnalysis.h.

161{};

◆ m_h_globalXY_shared

LockedHandle<TH2> ITk::StripRDOAnalysis::m_h_globalXY_shared {}
private

Definition at line 163 of file StripRDOAnalysis.h.

163{};

◆ m_h_globalY

TH1* ITk::StripRDOAnalysis::m_h_globalY {}
private

Definition at line 166 of file StripRDOAnalysis.h.

166{};

◆ m_h_globalZ

TH1* ITk::StripRDOAnalysis::m_h_globalZ {}
private

Definition at line 167 of file StripRDOAnalysis.h.

167{};

◆ m_h_globalZR

TH2* ITk::StripRDOAnalysis::m_h_globalZR {}
private

Definition at line 162 of file StripRDOAnalysis.h.

162{};

◆ m_h_globalZR_shared

LockedHandle<TH2> ITk::StripRDOAnalysis::m_h_globalZR_shared {}
private

Definition at line 164 of file StripRDOAnalysis.h.

164{};

◆ m_h_groupSize

TH1* ITk::StripRDOAnalysis::m_h_groupSize {}
private

Definition at line 119 of file StripRDOAnalysis.h.

119{};

◆ m_h_layerDisk

TH1* ITk::StripRDOAnalysis::m_h_layerDisk {}
private

Definition at line 113 of file StripRDOAnalysis.h.

113{};

◆ m_h_layerDisk_sdo

TH1* ITk::StripRDOAnalysis::m_h_layerDisk_sdo {}
private

Definition at line 141 of file StripRDOAnalysis.h.

141{};

◆ m_h_phi_v_eta

TH2* ITk::StripRDOAnalysis::m_h_phi_v_eta {}
private

Definition at line 120 of file StripRDOAnalysis.h.

120{};

◆ m_h_phi_v_eta_sdo

TH2* ITk::StripRDOAnalysis::m_h_phi_v_eta_sdo {}
private

Definition at line 150 of file StripRDOAnalysis.h.

150{};

◆ m_h_phiModule

TH1* ITk::StripRDOAnalysis::m_h_phiModule {}
private

Definition at line 114 of file StripRDOAnalysis.h.

114{};

◆ m_h_phiModule_sdo

TH1* ITk::StripRDOAnalysis::m_h_phiModule_sdo {}
private

Definition at line 142 of file StripRDOAnalysis.h.

142{};

◆ m_h_rdoID

TH1* ITk::StripRDOAnalysis::m_h_rdoID {}
private

Definition at line 110 of file StripRDOAnalysis.h.

110{};

◆ m_h_rdoWord

TH1* ITk::StripRDOAnalysis::m_h_rdoWord {}
private

Definition at line 111 of file StripRDOAnalysis.h.

111{};

◆ m_h_row

TH1* ITk::StripRDOAnalysis::m_h_row {}
private

Definition at line 118 of file StripRDOAnalysis.h.

118{};

◆ m_h_row_sdo

TH1* ITk::StripRDOAnalysis::m_h_row_sdo {}
private

Definition at line 146 of file StripRDOAnalysis.h.

146{};

◆ m_h_sdoID

TH1* ITk::StripRDOAnalysis::m_h_sdoID {}
private

Definition at line 138 of file StripRDOAnalysis.h.

138{};

◆ m_h_sdoWord

TH1* ITk::StripRDOAnalysis::m_h_sdoWord {}
private

Definition at line 139 of file StripRDOAnalysis.h.

139{};

◆ m_h_side

TH1* ITk::StripRDOAnalysis::m_h_side {}
private

Definition at line 116 of file StripRDOAnalysis.h.

116{};

◆ m_h_side_sdo

TH1* ITk::StripRDOAnalysis::m_h_side_sdo {}
private

Definition at line 144 of file StripRDOAnalysis.h.

144{};

◆ m_h_strip

TH1* ITk::StripRDOAnalysis::m_h_strip {}
private

Definition at line 117 of file StripRDOAnalysis.h.

117{};

◆ m_h_strip_sdo

TH1* ITk::StripRDOAnalysis::m_h_strip_sdo {}
private

Definition at line 145 of file StripRDOAnalysis.h.

145{};

◆ m_h_truthMatchedRDOs

TH1* ITk::StripRDOAnalysis::m_h_truthMatchedRDOs {}
private

Definition at line 169 of file StripRDOAnalysis.h.

169{};

◆ m_histPath

Gaudi::Property<std::string> ITk::StripRDOAnalysis::m_histPath {this, "HistPath", "/RDOAnalysis/ITkStrip/", ""}
private

Definition at line 53 of file StripRDOAnalysis.h.

53{this, "HistPath", "/RDOAnalysis/ITkStrip/", ""};

◆ m_inputKey

SG::ReadHandleKey<SCT_RDO_Container> ITk::StripRDOAnalysis::m_inputKey {this, "CollectionName", "ITkStripRDOs", "Input ITk Strip RDO collection name"}
private

Definition at line 47 of file StripRDOAnalysis.h.

47{this, "CollectionName", "ITkStripRDOs", "Input ITk Strip RDO collection name"};

◆ m_inputMcEventCollectionKey

SG::ReadHandleKey<McEventCollection> ITk::StripRDOAnalysis::m_inputMcEventCollectionKey {this, "McEventCollectionName", "TruthEvent", "Input McEventCollection name"}
private

Definition at line 49 of file StripRDOAnalysis.h.

49{this, "McEventCollectionName", "TruthEvent", "Input McEventCollection name"};

◆ m_inputTruthKey

SG::ReadHandleKey<InDetSimDataCollection> ITk::StripRDOAnalysis::m_inputTruthKey {this, "SDOCollectionName", "ITkStripSDO_Map", "Input ITk Strip SDO collection name"}
private

Definition at line 48 of file StripRDOAnalysis.h.

48{this, "SDOCollectionName", "ITkStripSDO_Map", "Input ITk Strip SDO collection name"};

◆ m_layerDisk

std::vector<int>* ITk::StripRDOAnalysis::m_layerDisk {}
private

Definition at line 66 of file StripRDOAnalysis.h.

66{};

◆ m_layerDisk_sdo

std::vector<int>* ITk::StripRDOAnalysis::m_layerDisk_sdo {}
private

Definition at line 91 of file StripRDOAnalysis.h.

91{};

◆ m_localX

std::vector<double>* ITk::StripRDOAnalysis::m_localX {}
private

Definition at line 81 of file StripRDOAnalysis.h.

81{};

◆ m_localY

std::vector<double>* ITk::StripRDOAnalysis::m_localY {}
private

Definition at line 82 of file StripRDOAnalysis.h.

82{};

◆ m_localZ

std::vector<double>* ITk::StripRDOAnalysis::m_localZ {}
private

Definition at line 83 of file StripRDOAnalysis.h.

83{};

◆ m_noise

std::vector<bool>* ITk::StripRDOAnalysis::m_noise {}
private

Definition at line 98 of file StripRDOAnalysis.h.

98{};

◆ m_ntupleName

Gaudi::Property<std::string> ITk::StripRDOAnalysis::m_ntupleName {this, "NtupleName", "ITkStrip", ""}
private

Definition at line 56 of file StripRDOAnalysis.h.

56{this, "NtupleName", "ITkStrip", ""};

◆ m_ntuplePath

Gaudi::Property<std::string> ITk::StripRDOAnalysis::m_ntuplePath {this, "NtuplePath", "/RDOAnalysis/ntuples/", ""}
private

Definition at line 55 of file StripRDOAnalysis.h.

55{this, "NtuplePath", "/RDOAnalysis/ntuples/", ""};

◆ m_phiModule

std::vector<int>* ITk::StripRDOAnalysis::m_phiModule {}
private

Definition at line 67 of file StripRDOAnalysis.h.

67{};

◆ m_phiModule_sdo

std::vector<int>* ITk::StripRDOAnalysis::m_phiModule_sdo {}
private

Definition at line 92 of file StripRDOAnalysis.h.

92{};

◆ m_rdoID

std::vector<unsigned long long>* ITk::StripRDOAnalysis::m_rdoID {}
private

Definition at line 62 of file StripRDOAnalysis.h.

62{};

◆ m_rdoWord

std::vector<unsigned int>* ITk::StripRDOAnalysis::m_rdoWord {}
private

Definition at line 63 of file StripRDOAnalysis.h.

63{};

◆ m_row

std::vector<int>* ITk::StripRDOAnalysis::m_row {}
private

Definition at line 71 of file StripRDOAnalysis.h.

71{};

◆ m_row_sdo

std::vector<int>* ITk::StripRDOAnalysis::m_row_sdo {}
private

Definition at line 96 of file StripRDOAnalysis.h.

96{};

◆ m_SCT_Manager

const InDetDD::SCT_DetectorManager* ITk::StripRDOAnalysis::m_SCT_Manager {}
private

Definition at line 51 of file StripRDOAnalysis.h.

51{};

◆ m_sctID

const SCT_ID* ITk::StripRDOAnalysis::m_sctID {}
private

Definition at line 50 of file StripRDOAnalysis.h.

50{};

◆ m_sdoID

std::vector<unsigned long long>* ITk::StripRDOAnalysis::m_sdoID {}
private

Definition at line 87 of file StripRDOAnalysis.h.

87{};

◆ m_sdoWord

std::vector<int>* ITk::StripRDOAnalysis::m_sdoWord {}
private

Definition at line 88 of file StripRDOAnalysis.h.

88{};

◆ m_sharedHistPath

Gaudi::Property<std::string> ITk::StripRDOAnalysis::m_sharedHistPath {this, "SharedHistPath", "/RDOAnalysis/histos/", ""}
private

Definition at line 54 of file StripRDOAnalysis.h.

54{this, "SharedHistPath", "/RDOAnalysis/histos/", ""};

◆ m_side

std::vector<int>* ITk::StripRDOAnalysis::m_side {}
private

Definition at line 69 of file StripRDOAnalysis.h.

69{};

◆ m_side_sdo

std::vector<int>* ITk::StripRDOAnalysis::m_side_sdo {}
private

Definition at line 94 of file StripRDOAnalysis.h.

94{};

◆ m_strip

std::vector<int>* ITk::StripRDOAnalysis::m_strip {}
private

Definition at line 70 of file StripRDOAnalysis.h.

70{};

◆ m_strip_sdo

std::vector<int>* ITk::StripRDOAnalysis::m_strip_sdo {}
private

Definition at line 95 of file StripRDOAnalysis.h.

95{};

◆ m_thistSvc

ServiceHandle<ITHistSvc> ITk::StripRDOAnalysis::m_thistSvc {this, "HistSvc", "THistSvc", ""}
private

Definition at line 59 of file StripRDOAnalysis.h.

59{this, "HistSvc", "THistSvc", ""};

◆ m_tree

TTree* ITk::StripRDOAnalysis::m_tree {}
private

Definition at line 171 of file StripRDOAnalysis.h.

171{};

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


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