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

#include <TBTree_CaloClusterH6.h>

Inheritance diagram for TBTree_CaloClusterH6:
Collaboration diagram for TBTree_CaloClusterH6:

Public Member Functions

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

void clear ()
StatusCode getXcryoYtable (float &x, float &y, float &eBeam)
 Get Xcryo and Ytable from a text file.
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::string m_suffix
int m_nEvent
int m_nEventRejected
int m_nEventAccepted
int m_nEventRandomTrigger
bool m_addMoments
bool m_addGain
bool m_addTime
bool m_addQuality
bool m_addBeamTrack
bool m_addWTC
bool m_useEMTBCluster
bool m_first
int m_nRun
float m_beamMom
 Run number.
float m_xCryo
 Beam momentum.
float m_yTable
 CryoX.
float m_zCalo
 TableY.
unsigned short m_evType
 z-coordinate of the calorimeter surface at which beam coordinates calculated
float m_eTotal
float m_etaTotal
float m_phiTotal
float m_eEME2
float m_eEME3
float m_eHEC0
float m_eHEC1
float m_eHEC2
float m_eFCAL0
float m_eFCAL1
float m_eFCAL2
int m_nClusters
std::vector< int > * m_nCellCluster
std::vector< float > * m_eCluster
std::vector< float > * m_etaCluster
std::vector< float > * m_phiCluster
std::vector< float > * m_m1_eta
std::vector< float > * m_m1_phi
std::vector< float > * m_m2_r
std::vector< float > * m_m2_lambda
std::vector< float > * m_delta_phi
std::vector< float > * m_delta_theta
std::vector< float > * m_delta_alpha
std::vector< float > * m_center_x
std::vector< float > * m_center_y
std::vector< float > * m_center_z
std::vector< float > * m_center_lambda
std::vector< float > * m_lateral
std::vector< float > * m_longitudinal
std::vector< float > * m_eng_frac_em
std::vector< float > * m_eng_frac_max
std::vector< float > * m_eng_frac_core
std::vector< float > * m_m1_dens
std::vector< float > * m_m2_dens
int m_nCells
std::vector< int > * m_cell_id
std::vector< int > * m_cell_ind_cluster
std::vector< float > * m_cell_energy
std::vector< int > * m_cell_gain
std::vector< float > * m_cell_time
std::vector< float > * m_cell_quality
float m_beam_coor_x
float m_beam_coor_y
float m_beam_chi2_x
float m_beam_chi2_y
float m_beam_intercept_x
float m_beam_intercept_y
float m_beam_slope_x
float m_beam_slope_y
std::vector< short > * m_wtcNOverflow
std::vector< float > * m_wtcSignal
std::string m_caloCellContainerName
std::string m_clusterContainerName
std::string m_WTCContainerName
std::string m_TBTreeName
std::string m_rootfile_name
TFile * m_rootfile
TTree * m_tree
const CaloCell_IDm_calo_id {nullptr}
SG::ReadCondHandleKey< CaloNoisem_elecNoiseKey { this, "ElecNoiseKey", "electronicNoise", "SG key for electronic noise" }
std::string m_txtFileWithXY
 Text file containing xCryo and yTable.
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 26 of file TBTree_CaloClusterH6.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

◆ TBTree_CaloClusterH6()

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

Definition at line 37 of file TBTree_CaloClusterH6.cxx.

38 :
39 AthAlgorithm(name, pSvcLocator), m_suffix(""),
40 m_nEvent(0),
44 m_addMoments(false),
45 m_addGain(false),
46 m_addTime(false),
47 m_addQuality(false),
48 m_addBeamTrack(false),
49 m_addWTC(false),
50 m_useEMTBCluster(false),
51 m_first(true),
52 m_nRun(0),
53 m_beamMom(0),
54 m_xCryo(-9999), m_yTable(-9999), m_zCalo(30000),
55 m_evType(0),
56 m_eTotal(0),
57 m_etaTotal(0),
58 m_phiTotal(0),
59 m_eEME2(0),
60 m_eEME3(0),
61 m_eHEC0(0),
62 m_eHEC1(0),
63 m_eHEC2(0),
64 m_eFCAL0(0),
65 m_eFCAL1(0),
66 m_eFCAL2(0),
67 m_nClusters(0),
69 m_eCluster(0),
70 m_etaCluster (0),
71 m_phiCluster (0),
72 m_m1_eta(0),
73 m_m1_phi(0),
74 m_m2_r(0),
75 m_m2_lambda(0),
76 m_delta_phi(0),
79 m_center_x(0),
80 m_center_y(0),
81 m_center_z(0),
83 m_lateral(0),
88 m_m1_dens(0),
89 m_m2_dens(0),
90 m_nCells(0),
91 m_cell_id(0),
94 m_cell_gain(0),
95 m_cell_time(0),
100 m_beam_chi2_y(0),
106 m_wtcSignal(0),
107 m_caloCellContainerName("AllCalo"),
108 m_clusterContainerName("TBClusters"),
109 m_WTCContainerName("TailCatcher"),
110 m_TBTreeName("TBH6Tree"),
111 m_rootfile_name("tbh6tree.root"),
112 m_rootfile(0),
113 m_tree(0),
114 m_txtFileWithXY("xcryo_ytable.txt")
115{
116 declareProperty("ClusterContainer",m_clusterContainerName);
118 declareProperty("RootFileName",m_rootfile_name);
119 declareProperty("TBTreeName",m_TBTreeName);
120 declareProperty("Suffix", m_suffix);
121 declareProperty("addBeamTrack", m_addBeamTrack);
122 declareProperty("addMoments", m_addMoments);
123 declareProperty("addGain", m_addGain);
124 declareProperty("addTime", m_addTime);
125 declareProperty("addWTC", m_addWTC);
126 declareProperty("addQuality", m_addQuality);
127 declareProperty("useEMTBCluster", m_useEMTBCluster);
128 declareProperty("zCalo", m_zCalo);
129}
AthAlgorithm()
Default constructor:
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
std::string m_txtFileWithXY
Text file containing xCryo and yTable.
std::vector< float > * m_delta_phi
std::vector< float > * m_m1_phi
std::vector< float > * m_eng_frac_em
std::vector< float > * m_eng_frac_max
std::vector< float > * m_m2_r
std::vector< float > * m_cell_quality
std::vector< int > * m_nCellCluster
std::vector< float > * m_eng_frac_core
std::vector< float > * m_center_z
float m_xCryo
Beam momentum.
std::vector< float > * m_etaCluster
std::vector< float > * m_m2_lambda
unsigned short m_evType
z-coordinate of the calorimeter surface at which beam coordinates calculated
std::vector< float > * m_eCluster
std::vector< float > * m_longitudinal
std::vector< float > * m_center_lambda
std::vector< float > * m_lateral
std::vector< int > * m_cell_gain
std::vector< float > * m_phiCluster
std::vector< int > * m_cell_id
std::vector< float > * m_m1_eta
std::vector< float > * m_center_x
std::vector< float > * m_cell_time
std::vector< float > * m_m1_dens
std::vector< float > * m_center_y
std::vector< short > * m_wtcNOverflow
std::vector< float > * m_wtcSignal
std::vector< float > * m_delta_alpha
std::vector< int > * m_cell_ind_cluster
std::vector< float > * m_delta_theta
std::vector< float > * m_cell_energy
std::vector< float > * m_m2_dens

◆ ~TBTree_CaloClusterH6()

TBTree_CaloClusterH6::~TBTree_CaloClusterH6 ( )
virtual

Definition at line 131 of file TBTree_CaloClusterH6.cxx.

132{ }

Member Function Documentation

◆ clear()

void TBTree_CaloClusterH6::clear ( )
private

Definition at line 299 of file TBTree_CaloClusterH6.cxx.

300{
301 m_eTotal = 0.;
302 m_etaTotal = 0.;
303 m_phiTotal = 0.;
304 m_eEME2 = 0.;
305 m_eEME3 = 0.;
306 m_eHEC0 = 0.;
307 m_eHEC1 = 0.;
308 m_eHEC2 = 0.;
309 m_eFCAL0 = 0.;
310 m_eFCAL1 = 0.;
311 m_eFCAL2 = 0.;
312 m_nClusters = 0;
313 m_nCellCluster->clear();
314 m_eCluster->clear();
315 m_etaCluster->clear();
316 m_phiCluster->clear();
317 if (m_addMoments) {
318 m_m1_eta->clear();
319 m_m1_phi->clear();
320 m_m2_r->clear();
321 m_m2_lambda->clear();
322 m_delta_phi->clear();
323 m_delta_theta->clear();
324 m_delta_alpha->clear();
325 m_center_x->clear();
326 m_center_y->clear();
327 m_center_z->clear();
328 m_center_lambda->clear();
329 m_lateral->clear();
330 m_longitudinal->clear();
331 m_eng_frac_em->clear();
332 m_eng_frac_max->clear();
333 m_eng_frac_core->clear();
334 m_m1_dens->clear();
335 m_m2_dens->clear();
336 }
337 m_nCells=0;
338 m_cell_id->clear();
339 m_cell_ind_cluster->clear();
340 m_cell_energy->clear();
341 if (m_addGain) m_cell_gain->clear();
342 if (m_addTime) m_cell_time->clear();
343 if (m_addQuality) m_cell_quality->clear();
344 if (m_addWTC) {
345 m_wtcNOverflow->clear();
346 m_wtcSignal->clear();
347 }
348}

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

◆ 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 TBTree_CaloClusterH6::execute ( )
overridevirtual

Definition at line 350 of file TBTree_CaloClusterH6.cxx.

351{
352 const int lastScintInLayer[] = {11, 23, 29, 35, 41, 47};
353 m_nEvent++;
354 ATH_MSG_DEBUG ( "Executing TBTree_CaloClusterH6 for "
356
357 // Retrieve Event Info
358 const TBEventInfo* theEventInfo = nullptr;
359 StatusCode sc = evtStore()->retrieve(theEventInfo,"TBEventInfo");
360 if ( sc.isFailure() ) {
362 ( "Cannot retrieve TBEventInfo from StoreGate" );
364 return StatusCode::FAILURE;
365 }
366 m_evType = theEventInfo->getEventType();
367 ATH_MSG_DEBUG ( "Event Type found " << m_evType );
368 if (m_evType != 1 && m_evType != 3 && m_evType != 0) {
370 return StatusCode::FAILURE;
371 }
372 if (m_evType == 3) { // Random trigger
373 if (m_cell_id->size() == 0) {
375 ( "No filled cell_id vector for random trigger event" );
377 return StatusCode::FAILURE;
378 }
379 m_beam_coor_x = 9999.;
380 m_beam_coor_y = 9999.;
381 m_beam_chi2_x = 9999.;
382 m_beam_chi2_y = 9999.;
383 m_beam_intercept_x = 9999.;
384 m_beam_intercept_y = 9999.;
385 m_beam_slope_x = 0.;
386 m_beam_slope_y = 0.;
387 m_eTotal = 0.;
388 m_eEME2 = 0.;
389 m_eEME3 = 0.;
390 m_eHEC0 = 0.;
391 m_eHEC1 = 0.;
392 m_eHEC2 = 0.;
393 m_eFCAL0 = 0.;
394 m_eFCAL1 = 0.;
395 m_eFCAL2 = 0.;
396 for (int i=0; i<(int)m_eCluster->size(); i++) (*m_eCluster)[i] = 0;
397 for (int i=0; i<(int)m_cell_energy->size(); i++) (*m_cell_energy)[i] = 0;
398 if (m_addGain) m_cell_gain->clear();
399 if (m_addTime) m_cell_time->clear();
400 if (m_addQuality) m_cell_quality->clear();
401 // Get cell information
402 const CaloCellContainer* cellContainer = nullptr;
403 sc = evtStore()->retrieve(cellContainer, m_caloCellContainerName);
404 if (sc.isFailure()) {
407 ( "cannot allocate CaloCellContainer with key <"
409 << "> for random trigger event");
410 return sc;
411 }
412 // Cell loop
413 for (const CaloCell* cell : *cellContainer) {
414 const Identifier id = cell->ID();
415 for (int icell=0; icell<(int)m_cell_id->size(); icell++) {
416 if ((int)id.get_identifier32().get_compact() == (*m_cell_id)[icell]) {
417 m_eTotal += (float)cell->energy();
418 (*m_cell_energy)[icell] = (float)cell->energy();
419 int ind = (*m_cell_ind_cluster)[icell];
420 (*m_eCluster)[ind] += (float)cell->energy();
421 break;
422 }
423 }
424 }
425 // Fill the tree
426 m_tree->Fill();
428 return StatusCode::SUCCESS;
429 }
430
431 // Do first event initialization (run header filling)
432 if (m_first) {
433 SG::ReadCondHandle<CaloNoise> elecNoise (m_elecNoiseKey);
434
435 m_first = false;
436 // Fill run header
437 m_nRun = theEventInfo->getRunNum();
438 m_beamMom = theEventInfo->getBeamMomentum();
439 // Get xcryo and ytable from a file
441 ATH_MSG_ERROR ( "xCryo and yTable are not found for run " <<
442 m_nRun << " in file " << m_txtFileWithXY );
443 if (m_addBeamTrack) return StatusCode::FAILURE;
444 }
445 ATH_MSG_INFO ( "nRun = " << m_nRun << ", beamMomentum = "
446 << m_beamMom << " GeV, CryoX = " << m_xCryo << ", tableY = "
447 << m_yTable );
448
449 // Fill the run header and attach it to the tree
450 TBH6RunHeader* rh = new TBH6RunHeader(m_nRun);
452 rh->SetXCryo(m_xCryo);
453 rh->SetYTable(m_yTable);
454 rh->SetZCalo(m_zCalo);
455
456 // Get cell information
457 const CaloCellContainer* cellContainer = nullptr;
459 m_nCells = cellContainer->size();
460 ATH_MSG_DEBUG ( "CaloCellContainer container size = " << m_nCells );
461
462 if (m_nCells > CELLMAX) {
463 ATH_MSG_ERROR ( "CaloCellContainer container size = " <<
464 m_nCells << " > CELLMAX = " << CELLMAX );
465 return StatusCode::FAILURE;
466 }
467
468 // Cell loop
469 int icell=0;
470 for (const CaloCell* cell : *cellContainer) {
471 const CaloDetDescrElement* caloDDE = cell->caloDDE();
472 const Identifier id = cell->ID();
473 rh->SetCellID(icell,id.get_identifier32().get_compact());
474 rh->SetCellEta(icell,cell->eta());
475 rh->SetCellPhi(icell,cell->phi());
476 rh->SetCellX(icell,caloDDE->x());
477 rh->SetCellY(icell,caloDDE->y());
478 rh->SetCellZ(icell,caloDDE->z());
479 rh->SetCellR(icell,caloDDE->r());
480 rh->SetCelldEta(icell,caloDDE->deta());
481 rh->SetCelldPhi(icell,caloDDE->dphi());
482 rh->SetCelldZ(icell,caloDDE->dz());
483 rh->SetCelldR(icell,caloDDE->dr());
484 rh->SetCellVolume(icell,caloDDE->volume());
485 rh->SetCelliEta(icell,m_calo_id->eta(id));
486 rh->SetCelliPhi(icell,m_calo_id->phi(id));
487 if (m_calo_id->sub_calo(id)== CaloCell_ID::LARFCAL)
488 rh->SetCellRegion(icell,0);
489 else rh->SetCellRegion(icell,m_calo_id->region(id));
490 rh->SetCellCalo(icell,m_calo_id->sub_calo(id));
491 rh->SetCellSampling(icell,m_calo_id->calo_sample(id));
492 rh->SetCellNoiseRMS(icell,
493 elecNoise->getNoise(id, cell->gain()));
494 icell++;
495 }
496 rh->SetCellNum(icell+1);
497
498 // Attach rh to the tree
499 m_tree->GetUserInfo()->Add(rh);
500 } // if (m_first)
501
502 this->clear();
503
504 // Get beam coordinates
505 if (m_addBeamTrack && (m_evType == 1 || m_evType == 0)) {
506 TBTrack *track = nullptr;
507 sc = evtStore()->retrieve(track, "Track");
508 if (sc.isFailure()){
509 ATH_MSG_ERROR ( "Retrieval of beam track failed" );
511 return StatusCode::FAILURE;
512 }
513 m_beam_coor_x = track->getUslope()*m_zCalo + track->getUintercept()
514 + m_xCryo;
515 m_beam_coor_y = track->getVslope()*m_zCalo + track->getVintercept();
516 m_beam_chi2_x = track->getChi2_u();
517 m_beam_chi2_y = track->getChi2_v();
518 m_beam_intercept_x = track->getUintercept();
519 m_beam_intercept_y = track->getVintercept();
520 m_beam_slope_x = track->getUslope();
521 m_beam_slope_y = track->getVslope();
522 }
523 // Warm TailCatcher data
524 if (m_addWTC) {
525 TBTailCatcher * wtc = nullptr;
526 sc = evtStore()->retrieve(wtc, m_WTCContainerName);
527 if (sc.isFailure()){
528 ATH_MSG_ERROR ( "Retrieval of WTC data failed" );
530 return StatusCode::FAILURE;
531 }
532 ATH_MSG_VERBOSE("scint name/signal/overflow flag:");
533 short novflow = 0;
534 float signal = 0;
535 int nScint = 0; int nLayer = 0;
536 for (const TBScintillator* scint : *wtc) {
537 ATH_MSG_VERBOSE(scint->getDetectorName()<<"/"<<scint->getSignal()<<
538 "/"<<scint->isSignalOverflow()<<" ");
539 if (scint->isSignalOverflow()) novflow++;
540 signal += scint->getSignal();
541 if (nScint == lastScintInLayer[nLayer]) {
542 m_wtcNOverflow->push_back(novflow);
543 m_wtcSignal->push_back(signal);
544 novflow = 0; signal = 0;
545 nLayer++;
546 }
547 nScint++;
548 }
549 if (msgLvl(MSG::VERBOSE)) {
550 msg()<<MSG::VERBOSE<<"nOverflow: ";
551 for (int i=0; i<nLayer; i++) {
552 msg()<<MSG::VERBOSE<<(*m_wtcNOverflow)[i]<<" ";
553 }
554 msg()<<MSG::VERBOSE<<endmsg;
555 msg()<<MSG::VERBOSE<<"Signals: ";
556 for (int i=0; i<nLayer; i++) {
557 msg()<<MSG::VERBOSE<<(*m_wtcSignal)[i]<<" ";
558 }
559 msg()<<MSG::VERBOSE<<endmsg;
560 }
561 }
562
563 // Reject hadrons in 10 GeV electron beam
564 if (m_useEMTBCluster && fabs(m_beamMom-10.) < 0.5) {
565 const CaloClusterContainer* clusterContainer = nullptr;
566 sc = evtStore()->retrieve(clusterContainer, "EMTBClusters");
567 if (sc.isFailure()) {
569 ( "cannot allocate CaloClusterContainer with key <"
570 << "EMTBClusters" << ">" );
572 return sc;
573 }
574 if ( clusterContainer->size()== 1) {
575 CaloClusterContainer::const_iterator it_clu = clusterContainer->begin();
576 const CaloCluster* cluster = (*it_clu);
577 float e = (float)cluster->energy();
578 float ecut = 6000;
579 if ( m_yTable < -100) ecut = 4000;
580 if (e < ecut) {
582 return StatusCode::FAILURE;
583 }
584 }
585 }
586 // Reject muons in 40 GeV pion beam
587 if (m_useEMTBCluster && fabs(m_beamMom-40.) < 0.5) {
588 const CaloClusterContainer* clusterContainer = nullptr;
589 sc = evtStore()->retrieve(clusterContainer, "EMTBClusters");
590 if (sc.isFailure()) {
592 ( "cannot allocate CaloClusterContainer with key <"
593 << "EMTBClusters" << ">" );
595 return sc;
596 }
597 if ( clusterContainer->size()== 1) {
598 CaloClusterContainer::const_iterator it_clu = clusterContainer->begin();
599 const CaloCluster* cluster = (*it_clu);
600 float e = (float)cluster->energy();
601 float ecut = 9000;
602 //if ( m_yTable < -100) ecut = 4000;
603 if (e < ecut) {
605 return StatusCode::FAILURE;
606 }
607 }
608 }
609 // Clusters
610 const CaloClusterContainer* clusterContainer = nullptr;
611 sc = evtStore()->retrieve(clusterContainer, m_clusterContainerName);
612 if (sc.isFailure()) {
614 ( "cannot allocate CaloClusterContainer with key <"
616 << ">");
618 return sc;
619 }
620 m_nClusters = clusterContainer->size();
621 ATH_MSG_DEBUG ( "CaloClusterContainer container size = " <<
622 m_nClusters );
623 if ( clusterContainer->size() < 1) {
624 ATH_MSG_ERROR ( " wrong CaloClusterContainer container size = " <<
625 m_nClusters );
627 return StatusCode::FAILURE;
628 }
629
630 int clu_ind = 0;
631 float eAbsTotal = 0.;
632 for (const CaloCluster* cluster : *clusterContainer) {
633 m_nCells += cluster->getNumberOfCells();
634 m_nCellCluster->push_back((int)cluster->getNumberOfCells());
635 m_eCluster->push_back((float)cluster->energy());
636 m_etaCluster->push_back((float)cluster->eta());
637 m_phiCluster->push_back((float)cluster->phi());
638 m_eTotal += (float)cluster->energy();
639 eAbsTotal += fabs((float)cluster->energy());
640 m_etaTotal += fabs((float)cluster->energy())*(float)cluster->eta();
641 m_phiTotal += fabs((float)cluster->energy())*(float)cluster->phi();
642 //m_cell_energy->reserve(m_nCells);
643 //if (m_addGain) m_cell_gain->reserve(m_nCells);
644 //if (m_addTime) m_cell_time->reserve(m_nCells);
645 //if (m_addQuality) m_cell_quality->reserve(m_nCells);
646
647 // Loop through cluster cells
649 for (; itc!=cluster->cell_end(); itc++) {
650 const CaloCell* cell = (*itc);
651 const Identifier id = cell->ID();
652 m_cell_id->push_back(id.get_identifier32().get_compact());
653 m_cell_ind_cluster->push_back(clu_ind);
654 m_cell_energy->push_back((float)cell->energy());
655 if (m_addGain) m_cell_gain->push_back((int)cell->gain());
656 if (m_addTime) m_cell_time->push_back((float)cell->time());
657 if (m_addQuality) m_cell_quality->push_back((float)cell->quality());
658 if (m_calo_id->calo_sample(id) == (int)CaloSampling::EME2)
659 m_eEME2 += (float)cell->energy();
660 if (m_calo_id->calo_sample(id) == (int)CaloSampling::EME3)
661 m_eEME3 += (float)cell->energy();
662 if (m_calo_id->calo_sample(id) == (int)CaloSampling::HEC0)
663 m_eHEC0 += (float)cell->energy();
664 if (m_calo_id->calo_sample(id) == (int)CaloSampling::HEC1)
665 m_eHEC1 += (float)cell->energy();
666 if (m_calo_id->calo_sample(id) == (int)CaloSampling::HEC2)
667 m_eHEC2 += (float)cell->energy();
668 if (m_calo_id->calo_sample(id) == (int)CaloSampling::FCAL0)
669 m_eFCAL0 += (float)cell->energy();
670 if (m_calo_id->calo_sample(id) == (int)CaloSampling::FCAL1)
671 m_eFCAL1 += (float)cell->energy();
672 if (m_calo_id->calo_sample(id) == (int)CaloSampling::FCAL2)
673 m_eFCAL2 += (float)cell->energy();
674 }
675
676 // Add cluster moments
677 if (m_addMoments) {
678 float m1_eta = -9999;
679 float m1_phi = -9999;
680 float m2_r = -9999;
681 float m2_lambda = -9999;
682 float delta_phi = -9999;
683 float delta_theta = -9999;
684 float delta_alpha = -9999;
685 float center_x = -9999;
686 float center_y = -9999;
687 float center_z = -9999;
688 float center_lambda = -9999;
689 float lateral = -9999;
690 float longitudinal = -9999;
691 float eng_frac_em = -9999;
692 float eng_frac_max = -9999;
693 float eng_frac_core = -9999;
694 float m1_dens = -9999;
695 float m2_dens = -9999;
696 CaloCluster::moment_iterator it_mom=cluster->beginMoment(false);
697 for (; it_mom != cluster->endMoment(false); ++it_mom) {
698 switch ( it_mom.getMomentType() ) {
700 m1_eta = it_mom.getMoment().getValue();
701 break;
703 m1_phi = it_mom.getMoment().getValue();
704 break;
706 m2_r = it_mom.getMoment().getValue();
707 break;
709 m2_lambda = it_mom.getMoment().getValue();
710 break;
712 delta_phi = it_mom.getMoment().getValue();
713 break;
715 delta_theta = it_mom.getMoment().getValue();
716 break;
718 delta_alpha = it_mom.getMoment().getValue();
719 break;
721 center_x = it_mom.getMoment().getValue();
722 break;
724 center_y = it_mom.getMoment().getValue();
725 break;
727 center_z = it_mom.getMoment().getValue();
728 break;
730 center_lambda = it_mom.getMoment().getValue();
731 break;
733 lateral = it_mom.getMoment().getValue();
734 break;
736 longitudinal = it_mom.getMoment().getValue();
737 break;
739 eng_frac_em = it_mom.getMoment().getValue();
740 break;
742 eng_frac_max = it_mom.getMoment().getValue();
743 break;
745 eng_frac_core = it_mom.getMoment().getValue();
746 break;
748 m1_dens = it_mom.getMoment().getValue();
749 break;
751 m2_dens = it_mom.getMoment().getValue();
752 break;
753 default:
754 break;
755 }
756 }
757 m_m1_eta->push_back(m1_eta);
758 m_m1_phi->push_back(m1_phi);
759 m_m2_r->push_back(m2_r);
760 m_m2_lambda->push_back(m2_lambda);
761 m_delta_phi->push_back(delta_phi);
762 m_delta_theta->push_back(delta_theta);
763 m_delta_alpha->push_back(delta_alpha);
764 m_center_x->push_back(center_x);
765 m_center_y->push_back(center_y);
766 m_center_z->push_back(center_z);
767 m_center_lambda->push_back(center_lambda);
768 m_lateral->push_back(lateral);
769 m_longitudinal->push_back(longitudinal);
770 m_eng_frac_em->push_back(eng_frac_em);
771 m_eng_frac_max->push_back(eng_frac_max);
772 m_eng_frac_core->push_back(eng_frac_core);
773 m_m1_dens->push_back(m1_dens);
774 m_m2_dens->push_back(m2_dens);
775 }
776 clu_ind++;
777 } // end of cluster loop
778
779 if (eAbsTotal > 0.) {
780 const float inv_eAbsTotal = 1. / eAbsTotal;
781 m_etaTotal *= inv_eAbsTotal;
782 m_phiTotal *= inv_eAbsTotal;
783 }
784
785 // Fill the tree
786 m_tree->Fill();
788
789 return sc;
790}
#define endmsg
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
CaloClusterContainer
Definition CaloTPCnv.cxx:21
static Double_t sc
#define CELLMAX
bool msgLvl(const MSG::Level lvl) const
MsgStream & msg() const
@ CENTER_Y
Cluster Centroid ( ).
@ DELTA_ALPHA
Angular shower axis deviation from IP-to-Center.
@ SECOND_LAMBDA
Second Moment in .
@ CENTER_Z
Cluster Centroid ( ).
@ FIRST_PHI
First Moment in .
@ DELTA_PHI
Angular shower axis deviation ( ) from IP-to-Center.
@ ENG_FRAC_EM
Energy fraction in EM calorimeters.
@ SECOND_ENG_DENS
Second Moment in E/V.
@ CENTER_X
Cluster Centroid ( ).
@ FIRST_ENG_DENS
First Moment in E/V.
@ LATERAL
Normalized lateral moment.
@ SECOND_R
Second Moment in .
@ DELTA_THETA
Angular shower axis deviation ( ) from IP-to-Center.
@ ENG_FRAC_MAX
Energy fraction of hottest cell.
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
@ FIRST_ETA
First Moment in .
@ ENG_FRAC_CORE
Energy fraction of the sum of the hottest cells in each sampling.
@ LONGITUDINAL
Normalized longitudinal moment.
const double & getValue() const
returns the value of this moment
moment_type getMomentType() const
Function access to moment type.
const CaloClusterMoment & getMoment() const
Function access to CaloClusterMoment.
MomentStoreIter moment_iterator
Moment iterator type for CaloCluster clients.
CaloCompositeCellBase< CaloClusterNavigable >::cell_iterator cell_iterator
Iterator on CaloCell s.
virtual double eta() const
Retrieve eta independent of signal state.
moment_iterator beginMoment(bool useLink=true) const
First iterator on moment store.
moment_iterator endMoment(bool useLink=true) const
Last iterator on moment store.
virtual double phi() const
Retrieve phi independent of signal state.
cell_iterator cell_end() const
Retrieve a STL-type end() iterator for the cell store.
unsigned int getNumberOfCells() const
Return the number of cells in the store.
cell_iterator cell_begin() const
Retrieve a STL-type begin() iterator for the cell store.
virtual double energy() const
Return energy.
DataModel_detail::const_iterator< DataVector > const_iterator
Definition DataVector.h:838
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
float getBeamMomentum() const
Definition TBEventInfo.h:73
int getEventType() const
Definition TBEventInfo.h:71
unsigned int getRunNum() const
Definition TBEventInfo.h:72
void SetCellY(const int i, const float y)
void SetCellID(const int i, const int id)
void SetCelldZ(const int i, const float dz)
void SetCelldEta(const int i, const float deta)
void SetXCryo(float x)
void SetCelldR(const int i, const float dr)
void SetZCalo(float z)
void SetCellR(const int i, const float r)
void SetCellVolume(const int i, const float vol)
void SetYTable(float y)
void SetCellZ(const int i, const float z)
void SetCellSampling(const int i, const int subc)
void SetCellRegion(const int i, const int reg)
void SetCellPhi(const int i, const float phi)
void SetBeamMomentum(float mom)
void SetCellX(const int i, const float x)
void SetCelliPhi(const int i, const int iphi)
void SetCellEta(const int i, const float eta)
void SetCellCalo(const int i, const int calo)
void SetCellNum(int nCell)
void SetCellNoiseRMS(const int i, const float rms)
void SetCelldPhi(const int i, const float dphi)
void SetCelliEta(const int i, const int ieta)
StatusCode getXcryoYtable(float &x, float &y, float &eBeam)
Get Xcryo and Ytable from a text file.
const CaloCell_ID * m_calo_id
SG::ReadCondHandleKey< CaloNoise > m_elecNoiseKey
::StatusCode StatusCode
StatusCode definition for legacy code.
delta_phi(phi1, phi2)
Definition eFEXNTuple.py:14
retrieve(aClass, aKey=None)
Definition PyKernel.py:110

◆ 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

◆ finalize()

StatusCode TBTree_CaloClusterH6::finalize ( )
overridevirtual

Definition at line 287 of file TBTree_CaloClusterH6.cxx.

288{
289 m_tree->AutoSave();
290 ATH_MSG_INFO ( "finalize(): (invoked/accept/reject/random) ("<< m_nEvent
291 << "/" << m_nEventAccepted << "/" << m_nEventRejected
292 << "/" << m_nEventRandomTrigger << ")" );
293 ATH_MSG_INFO ( "Print contents of " << m_TBTreeName );
294 m_rootfile->Print();
295 m_rootfile->Close();
296 return StatusCode::SUCCESS;
297}

◆ getXcryoYtable()

StatusCode TBTree_CaloClusterH6::getXcryoYtable ( float & x,
float & y,
float & eBeam )
private

Get Xcryo and Ytable from a text file.

Definition at line 792 of file TBTree_CaloClusterH6.cxx.

792 {
793
794 ATH_MSG_DEBUG ( "in getXcryoYtable(float x, float y)" );
795
796 std::ifstream xyFile;
797 std::string line;
798 std::string filename = PathResolver::find_file(m_txtFileWithXY, "DATAPATH");
799 xyFile.open(filename.c_str());
800 if (!xyFile.is_open()) {
801 ATH_MSG_ERROR ( "File " << m_txtFileWithXY << " fail to open in $DATAPATH");
802 return StatusCode::FAILURE;
803 }
804
805 while ( getline(xyFile, line, '\n') ) {
806 int run;
807 std::istringstream buf(line);
808 e = 0;
809 buf >> run >> x >> y >> e;
810 ATH_MSG_DEBUG ( "run,x,y,e= "<<run<<" "<<x<<" "<<y<<" "<<e);
811 if (run == m_nRun && xyFile.good()) return StatusCode::SUCCESS;
812 }
813
814 return StatusCode::FAILURE;
815}
#define y
#define x
static std::string find_file(const std::string &logical_file_name, const std::string &search_path)

◆ initialize()

StatusCode TBTree_CaloClusterH6::initialize ( )
overridevirtual

Definition at line 134 of file TBTree_CaloClusterH6.cxx.

135{
136 ATH_MSG_INFO ( "in initialize()" );
137
138 // Cluster vectors
139 m_nCellCluster = new std::vector<int>;
140 m_eCluster = new std::vector<float>;
141 m_etaCluster = new std::vector<float>;
142 m_phiCluster = new std::vector<float>;
143 // Cluster moments
144 if (m_addMoments) {
145 m_m1_eta = new std::vector<float>;
146 m_m1_phi = new std::vector<float>;
147 m_m2_r = new std::vector<float>;
148 m_m2_lambda = new std::vector<float>;
149 m_delta_phi = new std::vector<float>;
150 m_delta_theta = new std::vector<float>;
151 m_delta_alpha = new std::vector<float>;
152 m_center_x = new std::vector<float>;
153 m_center_y = new std::vector<float>;
154 m_center_z = new std::vector<float>;
155 m_center_lambda = new std::vector<float>;
156 m_lateral = new std::vector<float>;
157 m_longitudinal = new std::vector<float>;
158 m_eng_frac_em = new std::vector<float>;
159 m_eng_frac_max = new std::vector<float>;
160 m_eng_frac_core = new std::vector<float>;
161 m_m1_dens = new std::vector<float>;
162 m_m2_dens = new std::vector<float>;
163 }
164 // Cell vectors
165 m_cell_id = new std::vector<int>;
166 m_cell_ind_cluster = new std::vector<int>;
167 m_cell_energy = new std::vector<float>;
168 if (m_addGain) m_cell_gain = new std::vector<int>;
169 if (m_addTime) m_cell_time = new std::vector<float>;
170 if (m_addQuality) m_cell_quality = new std::vector<float>;
171 if (m_addWTC) {
172 m_wtcNOverflow = new std::vector<short>;
173 m_wtcSignal = new std::vector<float>;
174 }
175
176 // Open file and create TTree
177 m_rootfile = new TFile(m_rootfile_name.data(), "RECREATE");
178 if (!m_rootfile->IsOpen()) {
179 ATH_MSG_FATAL ( "Cann't open Root file" );
180 return StatusCode::FAILURE;
181 }
182 m_tree = new TTree(m_TBTreeName.c_str(), m_TBTreeName.c_str());
183
184 // Define branches
185 //Event type
186 m_tree->Branch(("ev_type"+m_suffix).c_str(),&m_evType,
187 ("ev_type"+m_suffix+"/s").c_str());
188 // Parameters of the sum of clusters (TB particle)
189 m_tree->Branch(("eTotal"+m_suffix).c_str(),&m_eTotal,
190 ("eTotal"+m_suffix+"/F").c_str());
191 m_tree->Branch(("etaTotal"+m_suffix).c_str(),&m_etaTotal,
192 ("etaTotal"+m_suffix+"/F").c_str());
193 m_tree->Branch(("phiTotal"+m_suffix).c_str(),&m_phiTotal,
194 ("phiTotal"+m_suffix+"/F").c_str());
195 m_tree->Branch(("e_emec2"+m_suffix).c_str(),&m_eEME2,
196 ("e_emec2"+m_suffix+"/F").c_str());
197 m_tree->Branch(("e_emec3"+m_suffix).c_str(),&m_eEME3,
198 ("e_emec3"+m_suffix+"/F").c_str());
199 m_tree->Branch(("e_hec0"+m_suffix).c_str(),&m_eHEC0,
200 ("e_hec0"+m_suffix+"/F").c_str());
201 m_tree->Branch(("e_hec1"+m_suffix).c_str(),&m_eHEC1,
202 ("e_hec1"+m_suffix+"/F").c_str());
203 m_tree->Branch(("e_hec2"+m_suffix).c_str(),&m_eHEC2,
204 ("e_hec2"+m_suffix+"/F").c_str());
205 m_tree->Branch(("e_fcal0"+m_suffix).c_str(),&m_eFCAL0,
206 ("e_fcal0"+m_suffix+"/F").c_str());
207 m_tree->Branch(("e_fcal1"+m_suffix).c_str(),&m_eFCAL1,
208 ("e_fcal1"+m_suffix+"/F").c_str());
209 m_tree->Branch(("e_fcal2"+m_suffix).c_str(),&m_eFCAL2,
210 ("e_fcal2"+m_suffix+"/F").c_str());
211 // Claster parameters
212 m_tree->Branch(("cl_num"+m_suffix).c_str(),&m_nClusters,
213 ("cl_num"+m_suffix+"/I").c_str());
214 m_tree->Branch(("cl_cell_num"+m_suffix).c_str(),&m_nCellCluster);
215 m_tree->Branch(("cl_ener"+m_suffix).c_str(),&m_eCluster);
216 m_tree->Branch(("cl_eta"+m_suffix).c_str(),&m_etaCluster);
217 m_tree->Branch(("cl_phi"+m_suffix).c_str(),&m_phiCluster);
218 if (m_addMoments) {
219 m_tree->Branch(("cl_m1_eta"+m_suffix).c_str(),& m_m1_eta);
220 m_tree->Branch(("cl_m1_phi"+m_suffix).c_str(), &m_m1_phi);
221 m_tree->Branch(("cl_m2_r"+m_suffix).c_str(),&m_m2_r);
222 m_tree->Branch(("cl_m2_lambda"+m_suffix).c_str(), &m_m2_lambda);
223 m_tree->Branch(("cl_delta_phi"+m_suffix).c_str(), &m_delta_phi);
224 m_tree->Branch(("cl_delta_theta"+m_suffix).c_str(), &m_delta_theta);
225 m_tree->Branch(("cl_delta_alpha"+m_suffix).c_str(), &m_delta_alpha);
226 m_tree->Branch(("cl_center_x"+m_suffix).c_str(), &m_center_x);
227 m_tree->Branch(("cl_center_y"+m_suffix).c_str(), &m_center_y);
228 m_tree->Branch(("cl_center_z"+m_suffix).c_str(), &m_center_z);
229 m_tree->Branch(("cl_center_lambda"+m_suffix).c_str(), &m_center_lambda);
230 m_tree->Branch(("cl_lateral"+m_suffix).c_str(), &m_lateral);
231 m_tree->Branch(("cl_longitudinal"+m_suffix).c_str(), &m_longitudinal);
232 m_tree->Branch(("cl_eng_frac_em"+m_suffix).c_str(), &m_eng_frac_em);
233 m_tree->Branch(("cl_eng_frac_max"+m_suffix).c_str(), &m_eng_frac_max);
234 m_tree->Branch(("cl_eng_frac_core"+m_suffix).c_str(), &m_eng_frac_core);
235 m_tree->Branch(("cl_m1_dens"+m_suffix).c_str(), &m_m1_dens);
236 m_tree->Branch(("cl_m2_dens"+m_suffix).c_str(), &m_m2_dens);
237 }
238 // Cell parameters
239 m_tree->Branch(("cl_ncells"+m_suffix).c_str(),&m_nCells,
240 ("cl_ncells"+m_suffix+"/I").c_str());
241 m_tree->Branch(("cl_cell_id"+m_suffix).c_str(), &m_cell_id);
242 m_tree->Branch(("cl_cell_clu_ind"+m_suffix).c_str(), &m_cell_ind_cluster);
243 m_tree->Branch(("cl_cell_ener"+m_suffix).c_str(), &m_cell_energy);
244 if (m_addGain)
245 m_tree->Branch(("cl_cell_gain"+m_suffix).c_str(), &m_cell_gain);
246 if (m_addTime)
247 m_tree->Branch(("cl_cell_time"+m_suffix).c_str(), &m_cell_time);
248 if (m_addQuality)
249 m_tree->Branch(("cl_cell_quality"+m_suffix).c_str(), &m_cell_quality);
250
251 // Add beam track parameters
252 if (m_addBeamTrack) {
253 m_tree->Branch(("bm_x"+m_suffix).c_str(), &m_beam_coor_x,
254 ("bm_x"+m_suffix).c_str());
255 m_tree->Branch(("bm_y"+m_suffix).c_str(), &m_beam_coor_y,
256 ("bm_y"+m_suffix).c_str());
257 m_tree->Branch(("bm_chi2_x"+m_suffix).c_str(), &m_beam_chi2_x,
258 ("bm_chi2_x"+m_suffix).c_str());
259 m_tree->Branch(("bm_chi2_y"+m_suffix).c_str(), &m_beam_chi2_y,
260 ("bm_chi2_y"+m_suffix).c_str());
261 m_tree->Branch(("bm_x0"+m_suffix).c_str(), &m_beam_intercept_x,
262 ("bm_x0"+m_suffix).c_str());
263 m_tree->Branch(("bm_y0"+m_suffix).c_str(), &m_beam_intercept_y,
264 ("bm_y0"+m_suffix).c_str());
265 m_tree->Branch(("bm_slope_x"+m_suffix).c_str(),&m_beam_slope_x,
266 ("bm_slope_x"+m_suffix).c_str());
267 m_tree->Branch(("bm_slope_y"+m_suffix).c_str(),&m_beam_slope_y,
268 ("bm_slope_y"+m_suffix).c_str());
269 }
270
271 // Add Warm TailCatcher data
272 if (m_addWTC) {
273 m_tree->Branch(("wtc_n_overflow"+m_suffix).c_str(), &m_wtcNOverflow);
274 m_tree->Branch(("wtc_signal"+m_suffix).c_str(), &m_wtcSignal);
275 }
276
277 // pointer to Cell ID helper:
278 ATH_CHECK(detStore()->retrieve(m_calo_id,"CaloCell_ID"));
279
280 ATH_CHECK( m_elecNoiseKey.initialize() );
281
282 ATH_MSG_INFO ( "end of initialize()" );
283 return StatusCode::SUCCESS;
284}
#define ATH_MSG_FATAL(x)
const ServiceHandle< StoreGateSvc > & detStore() const

◆ 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}
virtual StatusCode sysInitialize() override
Override sysInitialize.
AthCommonDataStore(const std::string &name, T... args)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

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

bool TBTree_CaloClusterH6::m_addBeamTrack
private

Definition at line 49 of file TBTree_CaloClusterH6.h.

◆ m_addGain

bool TBTree_CaloClusterH6::m_addGain
private

Definition at line 46 of file TBTree_CaloClusterH6.h.

◆ m_addMoments

bool TBTree_CaloClusterH6::m_addMoments
private

Definition at line 45 of file TBTree_CaloClusterH6.h.

◆ m_addQuality

bool TBTree_CaloClusterH6::m_addQuality
private

Definition at line 48 of file TBTree_CaloClusterH6.h.

◆ m_addTime

bool TBTree_CaloClusterH6::m_addTime
private

Definition at line 47 of file TBTree_CaloClusterH6.h.

◆ m_addWTC

bool TBTree_CaloClusterH6::m_addWTC
private

Definition at line 50 of file TBTree_CaloClusterH6.h.

◆ m_beam_chi2_x

float TBTree_CaloClusterH6::m_beam_chi2_x
private

Definition at line 115 of file TBTree_CaloClusterH6.h.

◆ m_beam_chi2_y

float TBTree_CaloClusterH6::m_beam_chi2_y
private

Definition at line 116 of file TBTree_CaloClusterH6.h.

◆ m_beam_coor_x

float TBTree_CaloClusterH6::m_beam_coor_x
private

Definition at line 113 of file TBTree_CaloClusterH6.h.

◆ m_beam_coor_y

float TBTree_CaloClusterH6::m_beam_coor_y
private

Definition at line 114 of file TBTree_CaloClusterH6.h.

◆ m_beam_intercept_x

float TBTree_CaloClusterH6::m_beam_intercept_x
private

Definition at line 117 of file TBTree_CaloClusterH6.h.

◆ m_beam_intercept_y

float TBTree_CaloClusterH6::m_beam_intercept_y
private

Definition at line 118 of file TBTree_CaloClusterH6.h.

◆ m_beam_slope_x

float TBTree_CaloClusterH6::m_beam_slope_x
private

Definition at line 119 of file TBTree_CaloClusterH6.h.

◆ m_beam_slope_y

float TBTree_CaloClusterH6::m_beam_slope_y
private

Definition at line 120 of file TBTree_CaloClusterH6.h.

◆ m_beamMom

float TBTree_CaloClusterH6::m_beamMom
private

Run number.

Definition at line 56 of file TBTree_CaloClusterH6.h.

◆ m_calo_id

const CaloCell_ID* TBTree_CaloClusterH6::m_calo_id {nullptr}
private

Definition at line 135 of file TBTree_CaloClusterH6.h.

135{nullptr};

◆ m_caloCellContainerName

std::string TBTree_CaloClusterH6::m_caloCellContainerName
private

Definition at line 127 of file TBTree_CaloClusterH6.h.

◆ m_cell_energy

std::vector<float>* TBTree_CaloClusterH6::m_cell_energy
private

Definition at line 107 of file TBTree_CaloClusterH6.h.

◆ m_cell_gain

std::vector<int>* TBTree_CaloClusterH6::m_cell_gain
private

Definition at line 108 of file TBTree_CaloClusterH6.h.

◆ m_cell_id

std::vector<int>* TBTree_CaloClusterH6::m_cell_id
private

Definition at line 105 of file TBTree_CaloClusterH6.h.

◆ m_cell_ind_cluster

std::vector<int>* TBTree_CaloClusterH6::m_cell_ind_cluster
private

Definition at line 106 of file TBTree_CaloClusterH6.h.

◆ m_cell_quality

std::vector<float>* TBTree_CaloClusterH6::m_cell_quality
private

Definition at line 110 of file TBTree_CaloClusterH6.h.

◆ m_cell_time

std::vector<float>* TBTree_CaloClusterH6::m_cell_time
private

Definition at line 109 of file TBTree_CaloClusterH6.h.

◆ m_center_lambda

std::vector<float>* TBTree_CaloClusterH6::m_center_lambda
private

Definition at line 95 of file TBTree_CaloClusterH6.h.

◆ m_center_x

std::vector<float>* TBTree_CaloClusterH6::m_center_x
private

Definition at line 92 of file TBTree_CaloClusterH6.h.

◆ m_center_y

std::vector<float>* TBTree_CaloClusterH6::m_center_y
private

Definition at line 93 of file TBTree_CaloClusterH6.h.

◆ m_center_z

std::vector<float>* TBTree_CaloClusterH6::m_center_z
private

Definition at line 94 of file TBTree_CaloClusterH6.h.

◆ m_clusterContainerName

std::string TBTree_CaloClusterH6::m_clusterContainerName
private

Definition at line 128 of file TBTree_CaloClusterH6.h.

◆ m_delta_alpha

std::vector<float>* TBTree_CaloClusterH6::m_delta_alpha
private

Definition at line 91 of file TBTree_CaloClusterH6.h.

◆ m_delta_phi

std::vector<float>* TBTree_CaloClusterH6::m_delta_phi
private

Definition at line 89 of file TBTree_CaloClusterH6.h.

◆ m_delta_theta

std::vector<float>* TBTree_CaloClusterH6::m_delta_theta
private

Definition at line 90 of file TBTree_CaloClusterH6.h.

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

std::vector<float>* TBTree_CaloClusterH6::m_eCluster
private

Definition at line 81 of file TBTree_CaloClusterH6.h.

◆ m_eEME2

float TBTree_CaloClusterH6::m_eEME2
private

Definition at line 70 of file TBTree_CaloClusterH6.h.

◆ m_eEME3

float TBTree_CaloClusterH6::m_eEME3
private

Definition at line 71 of file TBTree_CaloClusterH6.h.

◆ m_eFCAL0

float TBTree_CaloClusterH6::m_eFCAL0
private

Definition at line 75 of file TBTree_CaloClusterH6.h.

◆ m_eFCAL1

float TBTree_CaloClusterH6::m_eFCAL1
private

Definition at line 76 of file TBTree_CaloClusterH6.h.

◆ m_eFCAL2

float TBTree_CaloClusterH6::m_eFCAL2
private

Definition at line 77 of file TBTree_CaloClusterH6.h.

◆ m_eHEC0

float TBTree_CaloClusterH6::m_eHEC0
private

Definition at line 72 of file TBTree_CaloClusterH6.h.

◆ m_eHEC1

float TBTree_CaloClusterH6::m_eHEC1
private

Definition at line 73 of file TBTree_CaloClusterH6.h.

◆ m_eHEC2

float TBTree_CaloClusterH6::m_eHEC2
private

Definition at line 74 of file TBTree_CaloClusterH6.h.

◆ m_elecNoiseKey

SG::ReadCondHandleKey<CaloNoise> TBTree_CaloClusterH6::m_elecNoiseKey { this, "ElecNoiseKey", "electronicNoise", "SG key for electronic noise" }
private

Definition at line 137 of file TBTree_CaloClusterH6.h.

138{ this, "ElecNoiseKey", "electronicNoise", "SG key for electronic noise" };

◆ m_eng_frac_core

std::vector<float>* TBTree_CaloClusterH6::m_eng_frac_core
private

Definition at line 100 of file TBTree_CaloClusterH6.h.

◆ m_eng_frac_em

std::vector<float>* TBTree_CaloClusterH6::m_eng_frac_em
private

Definition at line 98 of file TBTree_CaloClusterH6.h.

◆ m_eng_frac_max

std::vector<float>* TBTree_CaloClusterH6::m_eng_frac_max
private

Definition at line 99 of file TBTree_CaloClusterH6.h.

◆ m_etaCluster

std::vector<float>* TBTree_CaloClusterH6::m_etaCluster
private

Definition at line 82 of file TBTree_CaloClusterH6.h.

◆ m_etaTotal

float TBTree_CaloClusterH6::m_etaTotal
private

Definition at line 68 of file TBTree_CaloClusterH6.h.

◆ m_eTotal

float TBTree_CaloClusterH6::m_eTotal
private

Definition at line 67 of file TBTree_CaloClusterH6.h.

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

unsigned short TBTree_CaloClusterH6::m_evType
private

z-coordinate of the calorimeter surface at which beam coordinates calculated

Definition at line 65 of file TBTree_CaloClusterH6.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_first

bool TBTree_CaloClusterH6::m_first
private

Definition at line 52 of file TBTree_CaloClusterH6.h.

◆ m_lateral

std::vector<float>* TBTree_CaloClusterH6::m_lateral
private

Definition at line 96 of file TBTree_CaloClusterH6.h.

◆ m_longitudinal

std::vector<float>* TBTree_CaloClusterH6::m_longitudinal
private

Definition at line 97 of file TBTree_CaloClusterH6.h.

◆ m_m1_dens

std::vector<float>* TBTree_CaloClusterH6::m_m1_dens
private

Definition at line 101 of file TBTree_CaloClusterH6.h.

◆ m_m1_eta

std::vector<float>* TBTree_CaloClusterH6::m_m1_eta
private

Definition at line 85 of file TBTree_CaloClusterH6.h.

◆ m_m1_phi

std::vector<float>* TBTree_CaloClusterH6::m_m1_phi
private

Definition at line 86 of file TBTree_CaloClusterH6.h.

◆ m_m2_dens

std::vector<float>* TBTree_CaloClusterH6::m_m2_dens
private

Definition at line 102 of file TBTree_CaloClusterH6.h.

◆ m_m2_lambda

std::vector<float>* TBTree_CaloClusterH6::m_m2_lambda
private

Definition at line 88 of file TBTree_CaloClusterH6.h.

◆ m_m2_r

std::vector<float>* TBTree_CaloClusterH6::m_m2_r
private

Definition at line 87 of file TBTree_CaloClusterH6.h.

◆ m_nCellCluster

std::vector<int>* TBTree_CaloClusterH6::m_nCellCluster
private

Definition at line 80 of file TBTree_CaloClusterH6.h.

◆ m_nCells

int TBTree_CaloClusterH6::m_nCells
private

Definition at line 104 of file TBTree_CaloClusterH6.h.

◆ m_nClusters

int TBTree_CaloClusterH6::m_nClusters
private

Definition at line 79 of file TBTree_CaloClusterH6.h.

◆ m_nEvent

int TBTree_CaloClusterH6::m_nEvent
private

Definition at line 41 of file TBTree_CaloClusterH6.h.

◆ m_nEventAccepted

int TBTree_CaloClusterH6::m_nEventAccepted
private

Definition at line 43 of file TBTree_CaloClusterH6.h.

◆ m_nEventRandomTrigger

int TBTree_CaloClusterH6::m_nEventRandomTrigger
private

Definition at line 44 of file TBTree_CaloClusterH6.h.

◆ m_nEventRejected

int TBTree_CaloClusterH6::m_nEventRejected
private

Definition at line 42 of file TBTree_CaloClusterH6.h.

◆ m_nRun

int TBTree_CaloClusterH6::m_nRun
private

Definition at line 55 of file TBTree_CaloClusterH6.h.

◆ m_phiCluster

std::vector<float>* TBTree_CaloClusterH6::m_phiCluster
private

Definition at line 83 of file TBTree_CaloClusterH6.h.

◆ m_phiTotal

float TBTree_CaloClusterH6::m_phiTotal
private

Definition at line 69 of file TBTree_CaloClusterH6.h.

◆ m_rootfile

TFile* TBTree_CaloClusterH6::m_rootfile
private

Definition at line 132 of file TBTree_CaloClusterH6.h.

◆ m_rootfile_name

std::string TBTree_CaloClusterH6::m_rootfile_name
private

Definition at line 131 of file TBTree_CaloClusterH6.h.

◆ m_suffix

std::string TBTree_CaloClusterH6::m_suffix
private

Definition at line 40 of file TBTree_CaloClusterH6.h.

◆ m_TBTreeName

std::string TBTree_CaloClusterH6::m_TBTreeName
private

Definition at line 130 of file TBTree_CaloClusterH6.h.

◆ m_tree

TTree* TBTree_CaloClusterH6::m_tree
private

Definition at line 133 of file TBTree_CaloClusterH6.h.

◆ m_txtFileWithXY

std::string TBTree_CaloClusterH6::m_txtFileWithXY
private

Text file containing xCryo and yTable.

Definition at line 141 of file TBTree_CaloClusterH6.h.

◆ m_useEMTBCluster

bool TBTree_CaloClusterH6::m_useEMTBCluster
private

Definition at line 51 of file TBTree_CaloClusterH6.h.

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

◆ m_WTCContainerName

std::string TBTree_CaloClusterH6::m_WTCContainerName
private

Definition at line 129 of file TBTree_CaloClusterH6.h.

◆ m_wtcNOverflow

std::vector<short>* TBTree_CaloClusterH6::m_wtcNOverflow
private

Definition at line 123 of file TBTree_CaloClusterH6.h.

◆ m_wtcSignal

std::vector<float>* TBTree_CaloClusterH6::m_wtcSignal
private

Definition at line 124 of file TBTree_CaloClusterH6.h.

◆ m_xCryo

float TBTree_CaloClusterH6::m_xCryo
private

Beam momentum.

Definition at line 57 of file TBTree_CaloClusterH6.h.

◆ m_yTable

float TBTree_CaloClusterH6::m_yTable
private

CryoX.

Definition at line 58 of file TBTree_CaloClusterH6.h.

◆ m_zCalo

float TBTree_CaloClusterH6::m_zCalo
private

TableY.

Definition at line 59 of file TBTree_CaloClusterH6.h.


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