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

Top algorithm to generate Weight histograms for Local Hadron Calibration. More...

#include <GetLCWeights.h>

Inheritance diagram for GetLCWeights:
Collaboration diagram for GetLCWeights:

Public Member Functions

 GetLCWeights (const std::string &name, ISvcLocator *pSvcLocator)
virtual ~GetLCWeights ()
virtual StatusCode initialize ()
virtual StatusCode execute (const EventContext &ctx)
 Execute method.
virtual StatusCode finalize ()
virtual StatusCode sysInitialize () override
 Override sysInitialize.
virtual bool isClonable () const override
 Specify if the algorithm is clonable.
virtual StatusCode sysExecute (const EventContext &ctx) override
 Execute an algorithm.
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies.
virtual bool filterPassed (const EventContext &ctx) const
 Get filter decision:
virtual void setFilterPassed (bool state, const EventContext &ctx) const
 Set filter decision:
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

virtual bool isReEntrant () const override final
 Legacy algorithms are not thread-safe.
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< StoreGateSvc > StoreGateSvc_t

Private Member Functions

void mapinsert (const std::vector< Gaudi::Histo1DDef > &dims)
void mapparse ()
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

std::vector< std::vector< Gaudi::Histo1DDef > > m_dimensions
 definition of all dimensions used for each sampling
Gaudi::Property< std::map< std::string, Gaudi::Histo1DDef > > m_dimensionsmap {this, "SamplingDimensions", {}, "Dimensions to use for all samplings"}
 property to set all dimensions introduced above
std::vector< std::vector< int > > m_isampmap
 Vector of indices in m_dimensions for each sampling.
std::vector< std::vector< TProfile2D * > > m_weight
 Vector of vector of actual histograms.
Gaudi::Property< std::string > m_outputFileName {this, "OutputFileName", "", "Name of the output file to save histograms in"}
 Name of the output file to save histograms in.
std::unique_ptr< TFile > m_outputFile {nullptr}
 Output file to save histograms in.
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterCollName {this, "ClusterCollectionName", "CaloTopoClusters", "Name of the CaloClusterContainer to use"}
 Name of the CaloClusterContainer to use.
SG::ReadHandleKeyArray< CaloCalibrationHitContainer > m_CalibrationHitContainerNames {this, "CalibrationHitContainerNames", {}, "Names of CalibrationHitContainers to use"}
 vector of calibration hit container names to use.
Gaudi::Property< bool > m_useInversionMethod {this, "UseInversionMethod", true, "Use the inversion method"}
 flag to switch on/off the use of the inversion method
Gaudi::Property< std::string > m_NormalizationType {this, "NormalizationType", "Lin", "Normalization type: Const, Lin, Log or NClus"}
 string to choose different normalization types
int m_NormalizationTypeNumber {0}
Gaudi::Property< std::string > m_ClassificationType {this, "ClassificationType", "None", "Classification type: None, ParticleID_EM or ParticleID_HAD"}
 string to choose different classification types
int m_ClassificationTypeNumber {0}
DataObjIDColl m_extendedExtraObjects
 Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default).
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default).
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Top algorithm to generate Weight histograms for Local Hadron Calibration.

Version
$Id: GetLCWeights.h,v 1.2 2008-12-08 16:57:41 menke Exp $
Author
Sven Menke menke.nosp@m.@mpp.nosp@m.mu.mp.nosp@m.g.de
Date
3-October-2008

This class is an Algorithm to generate the 2D histograms from single pion simulations to cell-weight the hadronic classified clusters.

Definition at line 41 of file GetLCWeights.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 376 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ GetLCWeights()

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

Definition at line 45 of file GetLCWeights.cxx.

47 : AthAlgorithm(name, pSvcLocator)
48{
49
50 std::vector<Gaudi::Histo1DDef> dims(7);
51 dims[1] = Gaudi::Histo1DDef("side",-1.5,1.5,1);
52 dims[2] = Gaudi::Histo1DDef("|eta|",0.,1.6,16);
53 dims[3] = Gaudi::Histo1DDef("phi",-M_PI,M_PI,1);
54 dims[4] = Gaudi::Histo1DDef("log10(E_clus (MeV))",log10(200),log10(1e6),14);
55 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-4.6,1.1,14);
56 dims[6] = Gaudi::Histo1DDef("weight",-2,3,1);
57
58 dims[0] = Gaudi::Histo1DDef("EMB1",0.5,1.5,1);
59 mapinsert(dims);
60 dims[0] = Gaudi::Histo1DDef("EMB2",1.5,2.5,1);
61 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-4.8,0.5,14);
62 mapinsert(dims);
63 dims[0] = Gaudi::Histo1DDef("EMB3",2.5,3.5,1);
64 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-4.9,0.6,14);
65 mapinsert(dims);
66 dims[0] = Gaudi::Histo1DDef("EME1",4.5,5.5,1);
67 dims[2] = Gaudi::Histo1DDef("|eta|",1.2,3.2,20);
68 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-4.5,1.7,14);
69 mapinsert(dims);
70 dims[0] = Gaudi::Histo1DDef("EME2",5.5,6.5,1);
71 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-4.8,1.2,14);
72 mapinsert(dims);
73 dims[0] = Gaudi::Histo1DDef("EME3",6.5,7.5,1);
74 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-4.5,1.0,14);
75 mapinsert(dims);
76 dims[0] = Gaudi::Histo1DDef("HEC0",7.5,8.5,1);
77 dims[2] = Gaudi::Histo1DDef("|eta|",1.4,3.4,20);
78 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-4.8,0.6,14);
79 mapinsert(dims);
80 dims[0] = Gaudi::Histo1DDef("HEC1",8.5,9.5,1);
81 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-4.9,-0.2,14);
82 mapinsert(dims);
83 dims[0] = Gaudi::Histo1DDef("HEC2",9.5,10.5,1);
84 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-4.8,-0.2,14);
85 mapinsert(dims);
86 dims[0] = Gaudi::Histo1DDef("HEC3",10.5,11.5,1);
87 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-4.7,-0.2,14);
88 mapinsert(dims);
89 dims[0] = Gaudi::Histo1DDef("TileBar0",11.5,12.5,1);
90 dims[2] = Gaudi::Histo1DDef("|eta|",0.,1.2,12);
91 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-6,-1,14);
92 mapinsert(dims);
93 dims[0] = Gaudi::Histo1DDef("TileBar1",12.5,13.5,1);
94 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-6.7,-1.2,14);
95 mapinsert(dims);
96 dims[0] = Gaudi::Histo1DDef("TileBar2",13.5,14.5,1);
97 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-7,-1.9,14);
98 mapinsert(dims);
99 dims[0] = Gaudi::Histo1DDef("TileGap1",14.5,15.5,1);
100 dims[2] = Gaudi::Histo1DDef("|eta|",0.8,1.8,10);
101 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-6,-1,14);
102 mapinsert(dims);
103 dims[0] = Gaudi::Histo1DDef("TileGap2",15.5,16.5,1);
104 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-6.5,-1.5,14);
105 mapinsert(dims);
106 dims[0] = Gaudi::Histo1DDef("TileExt0",17.5,18.5,1);
107 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-6.5,-1,14);
108 mapinsert(dims);
109 dims[0] = Gaudi::Histo1DDef("TileExt1",18.5,19.5,1);
110 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-6.6,-1.5,14);
111 mapinsert(dims);
112 dims[0] = Gaudi::Histo1DDef("TileExt2",19.5,20.5,1);
113 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-7.2,-2.4,14);
114 mapinsert(dims);
115 dims[0] = Gaudi::Histo1DDef("FCal1",20.5,21.5,1);
116 dims[2] = Gaudi::Histo1DDef("|eta|",2.8,5.0,22);
117 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-3.5,2,14);
118 mapinsert(dims);
119 dims[0] = Gaudi::Histo1DDef("FCal2",21.5,22.5,1);
120 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-3.5,1.5,14);
121 mapinsert(dims);
122 dims[0] = Gaudi::Histo1DDef("FCal3",22.5,23.5,1);
123 dims[5] = Gaudi::Histo1DDef("log10(rho_cell (MeV/mm^3))",-3.8,1,14);
124 mapinsert(dims);
125}
#define M_PI
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
void mapinsert(const std::vector< Gaudi::Histo1DDef > &dims)

◆ ~GetLCWeights()

GetLCWeights::~GetLCWeights ( )
virtual

Definition at line 129 of file GetLCWeights.cxx.

130{ }

Member Function Documentation

◆ declareGaudiProperty()

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

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

Definition at line 156 of file AthCommonDataStore.h.

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

◆ declareProperty()

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

Definition at line 145 of file AthCommonDataStore.h.

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

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

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

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

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode GetLCWeights::execute ( const EventContext & ctx)
virtual

Execute method.

Implements AthAlgorithm.

Definition at line 328 of file GetLCWeights.cxx.

329{
330 SG::ReadHandle<xAOD::CaloClusterContainer> cc (m_clusterCollName, ctx);
331
332 std::vector<const CaloCalibrationHitContainer *> v_cchc;
333 for (const SG::ReadHandleKey<CaloCalibrationHitContainer>& k : m_CalibrationHitContainerNames) {
334 SG::ReadHandle<CaloCalibrationHitContainer> cchc (k, ctx);
335 v_cchc.push_back(cchc.cptr());
336 }
337
338 std::vector<ClusWeight *> cellVector[CaloCell_ID::NSUBCALO];
339
340 const CaloCell_ID* calo_id = nullptr;
341 ATH_CHECK(detStore()->retrieve(calo_id,"CaloCell_ID"));
342
343 for(int ic=0;ic<CaloCell_ID::NSUBCALO; ic++) {
344 unsigned int maxHashSize(0);
345 IdentifierHash myHashMin,myHashMax;
346 calo_id->calo_cell_hash_range (ic,myHashMin,myHashMax);
347 maxHashSize = myHashMax-myHashMin;
348 cellVector[ic].resize(maxHashSize,nullptr);
349 }
350
351 // loop over all cell members of all clusters and fill cell vector
352 // for used cells
353
354 // total calib hit energy of all clusters
355 double eCalibTot(0.);
356
357 unsigned int iClus = 0;
358 double nClusECalibGt0 = 0.0;
359 for (const xAOD::CaloCluster* theCluster : *cc) {
360 double eC=999;
361 if (!theCluster->retrieveMoment(xAOD::CaloCluster::ENG_CALIB_TOT,eC)) {
362 ATH_MSG_ERROR( "Failed to retrieve cluster moment ENG_CALIB_TOT");
363 return StatusCode::FAILURE;
364 }
366 double emFrac=-999;
367 if (!theCluster->retrieveMoment(xAOD::CaloCluster::ENG_CALIB_FRAC_EM,emFrac)){
368 ATH_MSG_ERROR( "Failed to retrieve cluster moment ENG_CALIB_FAC_EM");
369 return StatusCode::FAILURE;
370 }
372 eC = 0;
374 eC = 0;
375 }
376 eCalibTot += eC;
377 if ( eC > 0 ) {
378 nClusECalibGt0++;
379 }
380 xAOD::CaloCluster::const_cell_iterator cellIter = theCluster->cell_begin();
381 xAOD::CaloCluster::const_cell_iterator cellIterEnd = theCluster->cell_end();
382 for(; cellIter != cellIterEnd; cellIter++ ){
383 const CaloCell* pCell = (*cellIter);
384 Identifier myId = pCell->ID();
385 IdentifierHash myHashId;
386 int otherSubDet(0);
387 myHashId = calo_id->subcalo_cell_hash(myId,otherSubDet);
388 ClusWeight * myClus = new ClusWeight();
389 myClus->iClus = iClus;
390 myClus->weight = cellIter.weight();
391 myClus->next = nullptr;
392 myClus->eCalibTot = 0;
393 ClusWeight * theList = cellVector[otherSubDet][(unsigned int)myHashId];
394 if ( theList ) {
395 while ( theList->next )
396 theList = theList->next;
397 theList->next = myClus;
398 }
399 else {
400 cellVector[otherSubDet][(unsigned int)myHashId] = myClus;
401 }
402 }
403 }
404
405 // calculate total calib energy of each cell in each cluster
406
407 for (const CaloCalibrationHitContainer* cchc : v_cchc) {
408 for (const CaloCalibrationHit* hit : *cchc) {
409 Identifier myId = hit->cellID();
410 int otherSubDet;
411 IdentifierHash myHashId = calo_id->subcalo_cell_hash(myId,otherSubDet);
412 if ( myHashId != CaloCell_ID::NOT_VALID ) {
413 ClusWeight * theList = cellVector[otherSubDet][(unsigned int)myHashId];
414 while ( theList ) {
415 theList->eCalibTot += hit->energyTotal();
416 theList = theList->next;
417 }
418 }
419 }
420 }
421
422 // fill weight histos for all cells in all clusters
423 // since pions can be split in several clusters the weights are
424 // calculated by importance of the cluster for the current pion - i.e.
425 // the weights get a weight itself proportinal to the calib hit energy
426 // sum of the cluster over the total calib hit energy
427
428 if ( eCalibTot > 0 && nClusECalibGt0 > 0 ) {
429 const double inv_eCalibTot = 1. / eCalibTot;
430 const double inv_nClusECalibGt0 = 1. / nClusECalibGt0;
431 for (unsigned int j=0;j<cc->size();j++) {
432 const xAOD::CaloCluster * pClus = cc->at(j);
433 double eng = pClus->e();
434 double eCalib=-999;
436 ATH_MSG_ERROR( "Failed to retrieve cluster moment ENG_CALIB_TOT");
437 return StatusCode::FAILURE;
438 }
439 if ( eng > 0 && eCalib > 0 ) {
441 double emFrac=-999;
443 ATH_MSG_ERROR( "Failed to retrieve cluster moment ENG_CALIB_FAC_EM");
444 return StatusCode::FAILURE;
445 }
447 continue;
449 continue;
450 }
453 for(; cellIter != cellIterEnd; cellIter++ ){
454 const CaloCell* pCell = (*cellIter);
455 const Identifier myId = pCell->ID();
456 const CaloDetDescrElement* myCDDE=pCell->caloDDE();
457 const int caloSample = myCDDE->getSampling();//m_calo_id->calo_sample(myId);
458 if ( !m_isampmap[caloSample].empty() &&
459 !m_weight[caloSample].empty() ) {
460 int isideCell = 0;
461 int ietaCell = 0;
462 int iphiCell = 0;
463 int nside = 1;
464 int neta = 1;
465 int nphi = 1;
466 if ( m_isampmap[caloSample][1] >= 0 ) {
467 const Gaudi::Histo1DDef & hd = m_dimensions[m_isampmap[caloSample][0]][m_isampmap[caloSample][1]];
468 nside = hd.bins();
469 isideCell = (int)(nside*(((pCell->eta()<0?-1.0:1.0) - hd.lowEdge())
470 /(hd.highEdge()-hd.lowEdge())));
471 if ( isideCell < 0 || isideCell > nside-1 ) {
472 ATH_MSG_WARNING( " Side index out of bounds " <<
473 isideCell << " not in [0," << nside-1 << "] for "
474 << "Sampl=" << caloSample );
475 isideCell = -1;
476 }
477 }
478 if ( m_isampmap[caloSample][2] >= 0 ) {
479 const Gaudi::Histo1DDef & hd = m_dimensions[m_isampmap[caloSample][0]][m_isampmap[caloSample][2]];
480 neta = hd.bins();
481 ietaCell = (int)(neta*((fabs(pCell->eta()) - hd.lowEdge())
482 /(hd.highEdge()-hd.lowEdge())));
483 if ( ietaCell < 0 || ietaCell > neta-1 ) {
484 ATH_MSG_WARNING( " Eta index out of bounds " <<
485 ietaCell << " not in [0," << neta-1 << "] for "
486 << "Sampl=" << caloSample );
487 ietaCell = -1;
488 }
489 }
490 if ( m_isampmap[caloSample][3] >= 0 ) {
491 const Gaudi::Histo1DDef & hd = m_dimensions[m_isampmap[caloSample][0]][m_isampmap[caloSample][3]];
492 nphi = hd.bins();
493 iphiCell = (int)(nphi*((pCell->phi() - hd.lowEdge())
494 /(hd.highEdge()-hd.lowEdge())));
495 if ( iphiCell < 0 || iphiCell > nphi-1 ) {
496 ATH_MSG_WARNING( " Phi index out of bounds " <<
497 iphiCell << " not in [0," << nphi-1 << "] for "
498 << "Sampl=" << caloSample );
499 iphiCell = -1;
500 }
501 }
502 if ( isideCell >=0 && ietaCell >=0 && iphiCell >= 0 ) {
503 if ( myCDDE->volume() > 0 ) {
504 IdentifierHash myHashId;
505 int otherSubDet(0);
506 myHashId = calo_id->subcalo_cell_hash(myId,otherSubDet);
507 unsigned int iW = iphiCell*neta*nside+ietaCell*nside+isideCell;
508 if ( iW >= m_weight[caloSample].size() ) {
509 ATH_MSG_WARNING( " Index out of bounds " <<
510 iW << " > " << m_weight[caloSample].size()-1 << " for "
511 << "Sampl=" << caloSample
512 << ", iphi=" << iphiCell
513 << ", ieta=" << ietaCell
514 << ", iside=" << isideCell );
515 }
516 else {
517 ClusWeight * theList = cellVector[otherSubDet][(unsigned int)myHashId];
518 while ( theList && theList->iClus != j )
519 theList = theList->next;
520
521 if (m_weight[caloSample][iW] && theList && eCalibTot > 0) {
522 double norm = 0.0;
524 norm = eCalib * inv_eCalibTot;
525 }
527 if ( eCalib > 0 ) {
528 // cluster has to have at least 1% of the calib hit E
529 norm = log10(eCalib * inv_eCalibTot)+2.0;
530 }
531 }
533 if ( eCalib > 0 ) {
534 norm = inv_nClusECalibGt0;
535 }
536 }
537 else {
538 norm = 1.0;
539 }
540 if ( norm > 0 ) {
541 if ( !m_useInversionMethod && pCell->e()>0 ) {
542 m_weight[caloSample][iW]->Fill(log10(eng),
543 log10(pCell->e()/myCDDE->volume()),
544 theList->eCalibTot/pCell->e(),norm);
545
546 }
547 else if (m_useInversionMethod && theList->eCalibTot>0 ) {
548 m_weight[caloSample][iW]->Fill(log10(eng),
549 log10(theList->eCalibTot/myCDDE->volume()),
550 pCell->e()/theList->eCalibTot,
551 norm);
552 }
553 }
554 }
555 }
556 }
557 }
558 }
559 }
560 }
561 }
562 }
563
564 for(unsigned int ic=0;ic<CaloCell_ID::NSUBCALO; ic++) {
565 for (unsigned int ii = 0;ii<cellVector[ic].size();ii++ ) {
566 ClusWeight * theList = cellVector[ic][ii];
567 ClusWeight * prev = nullptr;
568 while ( theList) {
569 while ( theList->next ) {
570 prev = theList;
571 theList = theList->next;
572 }
573 delete theList;
574 if ( prev )
575 prev->next = nullptr;
576 else
577 cellVector[ic][ii] = nullptr;
578 theList = cellVector[ic][ii];
579 prev = nullptr;
580 }
581 }
582 }
583
584 return StatusCode::SUCCESS;
585}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_WARNING(x,...)
CaloCalibrationHitContainer
bool hit(const Container &ids, int pdgId)
size_t size() const
Number of registered mappings.
static const Attributes_t empty
const ServiceHandle< StoreGateSvc > & detStore() const
void calo_cell_hash_range(const Identifier id, IdentifierHash &caloCellMin, IdentifierHash &caloCellMax) const
to loop on 'global' cell hashes of one sub-calorimeter alone
IdentifierHash subcalo_cell_hash(const Identifier cellId, int &subCalo) const
create hash id from 'global' cell id
virtual double e() const override final
get energy (data member) (synonym to method energy()
Definition CaloCell.h:333
virtual double phi() const override final
get phi (through CaloDetDescrElement)
Definition CaloCell.h:375
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition CaloCell.h:321
virtual double eta() const override final
get eta (through CaloDetDescrElement)
Definition CaloCell.h:382
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition CaloCell.h:295
CaloCell_ID::CaloSample getSampling() const
cell sampling
unsigned int iClus
double eCalibTot
double weight
ClusWeight * next
Gaudi::Property< bool > m_useInversionMethod
flag to switch on/off the use of the inversion method
std::vector< std::vector< Gaudi::Histo1DDef > > m_dimensions
definition of all dimensions used for each sampling
SG::ReadHandleKey< xAOD::CaloClusterContainer > m_clusterCollName
Name of the CaloClusterContainer to use.
int m_NormalizationTypeNumber
int m_ClassificationTypeNumber
std::vector< std::vector< int > > m_isampmap
Vector of indices in m_dimensions for each sampling.
std::vector< std::vector< TProfile2D * > > m_weight
Vector of vector of actual histograms.
SG::ReadHandleKeyArray< CaloCalibrationHitContainer > m_CalibrationHitContainerNames
vector of calibration hit container names to use.
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
virtual double e() const
The total energy of the particle.
CaloClusterCellLink::const_iterator const_cell_iterator
Iterator of the underlying CaloClusterCellLink (explicitly const version).
const_cell_iterator cell_end() const
@ ENG_CALIB_FRAC_EM
Calibration Hit energy inside the cluster caused by e/gamma/pi0.
@ ENG_CALIB_TOT
Calibration Hit energy inside the cluster.
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version).
@ PARTICLEID_EM
Definition GetLCDefs.h:25
@ PARTICLEID_HAD
Definition GetLCDefs.h:25
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
int ic
Definition grepfile.py:33
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.

◆ extraDeps_update_handler()

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

Add StoreName to extra input/output deps as needed.

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

◆ extraOutputDeps()

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

Return the list of extra output dependencies.

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

Definition at line 89 of file AthCommonAlgorithm.cxx.

54{
55 // If we didn't find any symlinks to add, just return the collection
56 // from the base class. Otherwise, return the extended collection.
57 if (!m_extendedExtraObjects.empty()) {
59 }
61}
Common base class for algorithms.

◆ filterPassed()

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

Get filter decision:

Definition at line 93 of file AthCommonAlgorithm.h.

93 {
94 return execState( ctx ).filterPassed();
95 }
virtual bool filterPassed(const EventContext &ctx) const
Get filter decision:

◆ finalize()

StatusCode GetLCWeights::finalize ( )
virtual

Definition at line 311 of file GetLCWeights.cxx.

312{
313 ATH_MSG_INFO( "Writing out histograms" );
314 m_outputFile->cd();
315 for(unsigned int i=0;i<m_weight.size();i++) {
316 for(unsigned int j=0;j<m_weight[i].size();j++) {
317 if ( m_weight[i][j] )
318 m_weight[i][j]->Write();
319 }
320 }
321 m_outputFile->Close();
322
323 return StatusCode::SUCCESS;
324}
#define ATH_MSG_INFO(x,...)
std::unique_ptr< TFile > m_outputFile
Output file to save histograms in.

◆ initialize()

StatusCode GetLCWeights::initialize ( )
virtual

Definition at line 134 of file GetLCWeights.cxx.

135{
136
137 m_outputFile = std::make_unique<TFile>(m_outputFileName.value().c_str(),"RECREATE");
138 m_outputFile->cd();
139
140 m_weight.resize(CaloSampling::Unknown);
141 m_isampmap.resize(CaloSampling::Unknown);
142 mapparse();
143
144
145 if ( m_NormalizationType == "Lin" ) {
146 ATH_MSG_INFO( "Using weighting proportional to E_calib" );
148 }
149 else if ( m_NormalizationType == "Log" ) {
150 ATH_MSG_INFO( "Using weighting proportional to log(E_calib)" );
152 }
153 else if ( m_NormalizationType == "NClus" ) {
154 ATH_MSG_INFO( "Using weighting proportional to 1/N_Clus_E_calib>0" );
156 }
157 else {
158 ATH_MSG_INFO( "Using constant weighting" );
160 }
161
162 if ( m_ClassificationType == "None" ) {
163 ATH_MSG_INFO( "Expecting single particle input" );
165 }
166 else if ( m_ClassificationType == "ParticleID_EM" ) {
167 ATH_MSG_INFO( "Expecting ParticleID simulation as input -- use EM type clusters only" );
169 }
170 else if ( m_ClassificationType == "ParticleID_HAD" ) {
171 ATH_MSG_INFO( "Expecting ParticleID simulation as input -- use HAD type clusters only" );
173 }
174 else {
175 ATH_MSG_WARNING( " unknown classification type " << m_ClassificationType.value() << " given! Using None instead" );
177 }
178
179 for(unsigned int isamp=0;isamp<m_dimensions.size();isamp++) {
180 int theSampling(CaloSampling::Unknown);
181 for (unsigned int jsamp = 0;jsamp< CaloSampling::Unknown; jsamp++) {
183 theSampling = jsamp;
184 break;
185 }
186 }
187 if ( theSampling == CaloSampling::Unknown ) {
188 ATH_MSG_ERROR( "Calorimeter sampling "
189 << m_dimensions[isamp][0].title()
190 << " is not a valid Calorimeter sampling name and will be ignored! "
191 << "Valid names are: ";
192 for (unsigned int jsamp = 0;jsamp< CaloSampling::Unknown; jsamp++) {
194 if ( jsamp < CaloSampling::Unknown-1)
195 msg() << ", ";
196 else
197 msg() << ".";
198 }
199 msg() );
200 }
201 else {
202 m_isampmap[theSampling].resize(4,-1);
203 m_isampmap[theSampling][0] = isamp;
204 int iside(-1);
205 int ieta(-1);
206 int iphi(-1);
207 int ilogE(-1);
208 int ilogrho(-1);
209 int iweight(-1);
210
211 for(unsigned int idim=1;idim<m_dimensions[isamp].size();idim++) {
212 if ( m_dimensions[isamp][idim].title() == "side" ) {
213 iside = idim;
214 m_isampmap[theSampling][1] = iside;
215 }
216 else if ( m_dimensions[isamp][idim].title() == "|eta|" ) {
217 ieta = idim;
218 m_isampmap[theSampling][2] = ieta;
219 }
220 else if ( m_dimensions[isamp][idim].title() == "phi" ) {
221 iphi = idim;
222 m_isampmap[theSampling][3] = iphi;
223 }
224 else if ( m_dimensions[isamp][idim].title() == "log10(E_clus (MeV))" )
225 ilogE = idim;
226 else if ( m_dimensions[isamp][idim].title() == "log10(rho_cell (MeV/mm^3))" )
227 ilogrho = idim;
228 else if ( m_dimensions[isamp][idim].title() == "weight" )
229 iweight = idim;
230 }
231 if ( ilogE < 0 || ilogrho < 0 || iweight < 0 ) {
232 ATH_MSG_FATAL( " Mandatory dimension log10E, log10rho or weight missing ..." );
233 return StatusCode::FAILURE;
234 }
235 int nside = (iside>=0?m_dimensions[isamp][iside].bins():1);
236 int neta = (ieta>=0?m_dimensions[isamp][ieta].bins():1);
237 int nphi = (iphi>=0?m_dimensions[isamp][iphi].bins():1);
238 m_weight[theSampling].resize(nside*neta*nphi,nullptr);
239 for ( int jside=0;jside<nside;jside++) {
240 for ( int jeta=0;jeta<neta;jeta++) {
241 for ( int jphi=0;jphi<nphi;jphi++) {
242 TString wname("");
244 wname += "inv_weight";
245 else
246 wname += "weight";
247 wname += "_isamp_";
248 wname += theSampling;
249 wname += "_iside_";
250 wname += jside;
251 wname += "_[";
252 wname += (iside>=0?m_dimensions[isamp][iside].lowEdge():-1);
253 wname += ",";
254 wname += (iside>=0?m_dimensions[isamp][iside].highEdge():-1);
255 wname += ",";
256 wname += nside;
257 wname += "]";
258 wname += "_ieta_";
259 wname += jeta;
260 wname += "_[";
261 wname += (ieta>=0?m_dimensions[isamp][ieta].lowEdge():-1);
262 wname += ",";
263 wname += (ieta>=0?m_dimensions[isamp][ieta].highEdge():-1);
264 wname += ",";
265 wname += neta;
266 wname += "]";
267 wname += "_iphi_";
268 wname += jphi;
269 wname += "_[";
270 wname += (iphi>=0?m_dimensions[isamp][iphi].lowEdge():-1);
271 wname += ",";
272 wname += (iphi>=0?m_dimensions[isamp][iphi].highEdge():-1);
273 wname += ",";
274 wname += nphi;
275 wname += "]";
276 int iW = jphi*neta*nside+jeta*nside+jside;
277 m_weight[theSampling][iW]=
278 new TProfile2D(wname,wname,
279 m_dimensions[isamp][ilogE].bins(),
280 m_dimensions[isamp][ilogE].lowEdge(),
281 m_dimensions[isamp][ilogE].highEdge(),
282 m_dimensions[isamp][ilogrho].bins(),
283 m_dimensions[isamp][ilogrho].lowEdge(),
284 m_dimensions[isamp][ilogrho].highEdge(),
285 m_dimensions[isamp][iweight].lowEdge(),
286 m_dimensions[isamp][iweight].highEdge(),
287 "spread");
288 if ( m_useInversionMethod ) {
289 m_weight[theSampling][iW]->SetYTitle("log10(#rho_{cell}^{true} (MeV/mm^{3}))");
290 m_weight[theSampling][iW]->SetZTitle("E_{reco}/E_{tot}");
291 }
292 else {
293 m_weight[theSampling][iW]->SetYTitle("log10(#rho_{cell} (MeV/mm^{3}))");
294 m_weight[theSampling][iW]->SetZTitle("E_{tot}/E_{reco}");
295 }
296 m_weight[theSampling][iW]->SetXTitle("log10(E_{clus} (MeV))");
297 }
298 }
299 }
300 }
301 }
302
303 ATH_CHECK( m_clusterCollName.initialize() );
305
306 return StatusCode::SUCCESS;
307}
#define ATH_MSG_FATAL(x,...)
static const std::vector< std::string > bins
static const std::string & getSamplingName(const CaloSampling::CaloSample theSample)
Returns a string (name) for each CaloSampling.
Gaudi::Property< std::string > m_outputFileName
Name of the output file to save histograms in.
Gaudi::Property< std::string > m_NormalizationType
string to choose different normalization types
Gaudi::Property< std::string > m_ClassificationType
string to choose different classification types

◆ inputHandles()

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

Return this algorithm's input handles.

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

◆ isClonable()

virtual bool AthCommonAlgorithm< Gaudi::Algorithm >::isClonable ( ) const
inlineoverridevirtualinherited

Specify if the algorithm is clonable.

Only relevant for non-reentrant algorithms. Actual number of clones needs to be set via the "Cardinality" property.

Reimplemented in AFP_DigiTop, AlgB, AlgT, BCM_Digitization, CscDigitBuilder, CscDigitToCscRDO, G4AtlasAlg, G4RunAlg, HGTD_Digitization, HiveAlgBase, InDet::GNNSeedingTrackMaker, InDet::SCT_Clusterization, InDet::SiSPGNNTrackMaker, InDet::SiSPSeededTrackFinder, InDet::SiTrackerSpacePointFinder, ISF::SimKernelMT, ITk::StripDigitization, ITkPixelCablingAlg, ITkStripCablingAlg, LArHitEMapMaker, LArTTL1Maker, LUCID_DigiTop, LVL1::L1TopoSimulation, MergeCalibHits, MergeGenericMuonSimHitColl, MergeHijingPars, MergeMcEventCollection, MergeTrackRecordCollection, MergeTruthJets, MergeTruthParticles, MuonDigitizer, PileUpMTAlg, PixelDigitization, RoIBResultToxAOD, SCT_ByteStreamErrorsTestAlg, SCT_CablingCondAlgFromCoraCool, SCT_CablingCondAlgFromText, SCT_ConditionsParameterTestAlg, SCT_ConditionsSummaryTestAlg, SCT_ConfigurationConditionsTestAlg, SCT_Digitization, SCT_FlaggedConditionTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_PrepDataToxAOD, SCT_RawDataToxAOD, SCT_ReadCalibChipDataTestAlg, SCT_ReadCalibDataTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_SiliconConditionsTestAlg, SCT_StripVetoTestAlg, SCT_TdaqEnabledTestAlg, SCT_TestCablingAlg, SCTEventFlagWriter, SCTRawDataProvider, SCTSiLorentzAngleTestAlg, SCTSiPropertiesTestAlg, SGInputLoader, Simulation::BeamEffectsAlg, TileHitVecToCnt, TileMuonFitter, TilePulseForTileMuonReceiver, TileRawChannelMaker, TRTDigitization, and ZDC_DigiTop.

Definition at line 68 of file AthCommonAlgorithm.h.

68 {
69 return true;
70 }

◆ isReEntrant()

virtual bool AthAlgorithm::isReEntrant ( ) const
inlinefinaloverrideprotectedvirtualinherited

Legacy algorithms are not thread-safe.

Definition at line 47 of file AthAlgorithm.h.

47{ return false; }

◆ mapinsert()

void GetLCWeights::mapinsert ( const std::vector< Gaudi::Histo1DDef > & dims)
private

Definition at line 587 of file GetLCWeights.cxx.

587 {
588 for (unsigned int i=0;i<dims.size();i++) {
589 m_dimensionsmap.value()[dims[0].title()+":"+dims[i].title()] = dims[i];
590 }
591}
Gaudi::Property< std::map< std::string, Gaudi::Histo1DDef > > m_dimensionsmap
property to set all dimensions introduced above

◆ mapparse()

void GetLCWeights::mapparse ( )
private

Definition at line 593 of file GetLCWeights.cxx.

593 {
594
595 std::vector<int> theUsedSamplings(CaloSampling::Unknown,-1);
596
597 int nsamp(-1);
598
599 for (const std::pair<const std::string, Gaudi::Histo1DDef>& p : m_dimensionsmap.value()) {
600 std::string_view dimname = std::string_view(p.first).substr(0,p.first.find(':'));
601 int theSampling(CaloSampling::Unknown);
602 for (unsigned int jsamp = 0;jsamp< CaloSampling::Unknown; jsamp++) {
604 theSampling = jsamp;
605 break;
606 }
607 }
608 if ( theSampling == CaloSampling::Unknown ) {
609 msg(MSG::ERROR) << "Calorimeter sampling " << dimname
610 << " is not a valid Calorimeter sampling name and will be ignored! "
611 << "Valid names are: ";
612 for (unsigned int jsamp = 0;jsamp< CaloSampling::Unknown; jsamp++) {
614 if ( jsamp < CaloSampling::Unknown-1)
615 msg() << ", ";
616 else
617 msg() << ".";
618 }
619 msg() << endmsg;
620 }
621 else {
622 if ( theUsedSamplings[theSampling] == -1 ) {
623 nsamp++;
624 theUsedSamplings[theSampling] = nsamp;
625 m_dimensions.resize(nsamp+1);
626 m_dimensions[nsamp].resize(0);
627 }
628 m_dimensions[theUsedSamplings[theSampling]].push_back(p.second);
629 ATH_MSG_DEBUG(" New Dimension for " << dimname << ": "
630 << p.second.title() << ", [" << p.second.lowEdge()
631 << ", " << p.second.highEdge()
632 << ", " << p.second.bins()
633 << "]");
634 }
635 }
636}
#define endmsg
#define ATH_MSG_DEBUG(x,...)

◆ msg()

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msgLvl()

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

Definition at line 30 of file AthCommonMsg.h.

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

◆ outputHandles()

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

Return this algorithm's output handles.

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

◆ renounce()

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

Definition at line 368 of file AthCommonDataStore.h.

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

◆ renounceArray()

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

remove all handles from I/O resolution

Definition at line 352 of file AthCommonDataStore.h.

352 {
354 }

◆ setFilterPassed()

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

Set filter decision:

Definition at line 99 of file AthCommonAlgorithm.h.

99 {
101 }
virtual void setFilterPassed(bool state, const EventContext &ctx) const
Set filter decision:

◆ sysExecute()

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

Execute an algorithm.

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

Reimplemented in AthAnalysisAlgorithm.

Definition at line 80 of file AthCommonAlgorithm.cxx.

41{
42 return BaseAlg::sysExecute (ctx);
43}

◆ sysInitialize()

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

Override sysInitialize.

Override sysInitialize from the base class.

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

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

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

Reimplemented in AthAnalysisAlgorithm, AthHistogramAlgorithm, HypoBase, InputMakerBase, and PyAthena::Alg.

Definition at line 60 of file AthCommonAlgorithm.cxx.

71 {
73
74 if (sc.isFailure()) {
75 return sc;
76 }
77
78 ServiceHandle<ICondSvc> cs("CondSvc",name());
79 for (auto h : outputHandles()) {
80 if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
81 // do this inside the loop so we don't create the CondSvc until needed
82 if ( cs.retrieve().isFailure() ) {
83 ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
85 }
86 if (cs->regHandle(this,*h).isFailure()) {
88 ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
89 << " with CondSvc");
90 }
91 }
92 }
93 return sc;
94}
virtual StatusCode sysInitialize() override
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override

◆ sysStart()

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

Handle START transition.

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

◆ updateVHKA()

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

Definition at line 298 of file AthCommonDataStore.h.

298 {
299 for (auto &a : m_vhka) {
301 for (auto k : keys) {
302 k->setOwner(this);
303 }
304 }
305 }

Member Data Documentation

◆ m_CalibrationHitContainerNames

SG::ReadHandleKeyArray<CaloCalibrationHitContainer> GetLCWeights::m_CalibrationHitContainerNames {this, "CalibrationHitContainerNames", {}, "Names of CalibrationHitContainers to use"}
private

vector of calibration hit container names to use.

The containers specified in this property should hold calibration hits inside the calorimeter systems.

Definition at line 138 of file GetLCWeights.h.

138{this, "CalibrationHitContainerNames", {}, "Names of CalibrationHitContainers to use"};

◆ m_ClassificationType

Gaudi::Property<std::string> GetLCWeights::m_ClassificationType {this, "ClassificationType", "None", "Classification type: None, ParticleID_EM or ParticleID_HAD"}
private

string to choose different classification types

Available options are "None": the input MC is expected to be just a single pion MC with one sort of particles; "ParticleID_EM" Gena's ParticleID classification (EM type objects) for the use of QCD MC; "ParticleID_HAD" Gena's ParticleID classification (HAD type objects) for the use of QCD MC;

Definition at line 175 of file GetLCWeights.h.

175{this, "ClassificationType", "None", "Classification type: None, ParticleID_EM or ParticleID_HAD"};

◆ m_ClassificationTypeNumber

int GetLCWeights::m_ClassificationTypeNumber {0}
private

Definition at line 176 of file GetLCWeights.h.

176{0};

◆ m_clusterCollName

SG::ReadHandleKey<xAOD::CaloClusterContainer> GetLCWeights::m_clusterCollName {this, "ClusterCollectionName", "CaloTopoClusters", "Name of the CaloClusterContainer to use"}
private

Name of the CaloClusterContainer to use.

Definition at line 131 of file GetLCWeights.h.

131{this, "ClusterCollectionName", "CaloTopoClusters", "Name of the CaloClusterContainer to use"};

◆ m_detStore

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

Pointer to StoreGate (detector store by default).

Definition at line 381 of file AthCommonDataStore.h.

◆ m_dimensions

std::vector<std::vector<Gaudi::Histo1DDef> > GetLCWeights::m_dimensions
private

definition of all dimensions used for each sampling

Since samplings can be present or not, the samplings itself are defined via the special first dimension which has to be exactly 1 bin with the title of the sampling and the bounds of the CaloSample enum.

The remaining dimensions are:

side: negative values for eta < 0 and positive for eta > 0; 1 bin from -1.5 to 1.5 for no side dependency

|eta|: the absolute value of eta; normally in ATLAS the bounds are within [0,5], most samplings need smaller ranges and even smaller ones for test beam setups.

phi: the phi range; 1 bin from -pi to pi for no phi dependency

log10(E_clus): the log10 of the cluster energy; typical range should be within the generated energy range of single pions with about 50% room to the maximum created energy - i.e. use log10(1 TeV) as max value if you generated up tp 2 TeV pions

log10(rho_cell): the cell energy density (either truth or reco); typical ranges are from -7 to 1

weight: the ratio E_true/E_rec (or E_rec/E_true for inversion method; the bounds define the level of truncation for the weights to suppress noise and bad sampling ratios. Typical bounds are 0.5 to 3,5, or 10 without inversion method, where 5 and 10 are used for HEC and Tile, respectively. With inversion mewthod the bounds are -2 to 3.

Definition at line 92 of file GetLCWeights.h.

◆ m_dimensionsmap

Gaudi::Property<std::map<std::string,Gaudi::Histo1DDef> > GetLCWeights::m_dimensionsmap {this, "SamplingDimensions", {}, "Dimensions to use for all samplings"}
private

property to set all dimensions introduced above

Gaudi has only a map<string,Histo1DDef> to use as property. So the syntax for all dimensions introduced above is {'Sampling:Title': ('Title',Low,High,Bins), ... }.

Definition at line 100 of file GetLCWeights.h.

100{this, "SamplingDimensions", {}, "Dimensions to use for all samplings"};

◆ m_evtStore

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

Pointer to StoreGate (event store by default).

Definition at line 378 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

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

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

Empty if no symlinks were found.

Definition at line 108 of file AthCommonAlgorithm.h.

◆ m_isampmap

std::vector<std::vector<int> > GetLCWeights::m_isampmap
private

Vector of indices in m_dimensions for each sampling.

Internal list of indices in m_dimensions object.

Definition at line 106 of file GetLCWeights.h.

◆ m_NormalizationType

Gaudi::Property<std::string> GetLCWeights::m_NormalizationType {this, "NormalizationType", "Lin", "Normalization type: Const, Lin, Log or NClus"}
private

string to choose different normalization types

Available options are "Const": every cluster counts with weight 1; "Lin": Each cluster is weighted with E_calib_clus/E_calib_tot; "Log": Each cluster is weighted with log10(E_calib_clus/E_calib_tot)+2; "NClus": Each cluster is weighted with 1/TotalNumberOfClustersWithE_calib>0.

Definition at line 162 of file GetLCWeights.h.

162{this, "NormalizationType", "Lin", "Normalization type: Const, Lin, Log or NClus"};

◆ m_NormalizationTypeNumber

int GetLCWeights::m_NormalizationTypeNumber {0}
private

Definition at line 164 of file GetLCWeights.h.

164{0};

◆ m_outputFile

std::unique_ptr<TFile> GetLCWeights::m_outputFile {nullptr}
private

Output file to save histograms in.

Internal variable pointing to the output file.

Definition at line 126 of file GetLCWeights.h.

126{nullptr};

◆ m_outputFileName

Gaudi::Property<std::string> GetLCWeights::m_outputFileName {this, "OutputFileName", "", "Name of the output file to save histograms in"}
private

Name of the output file to save histograms in.

Use this property to set the name of the output file containing the Weights histograms.

Definition at line 120 of file GetLCWeights.h.

120{this, "OutputFileName", "", "Name of the output file to save histograms in"};

◆ m_useInversionMethod

Gaudi::Property<bool> GetLCWeights::m_useInversionMethod {this, "UseInversionMethod", true, "Use the inversion method"}
private

flag to switch on/off the use of the inversion method

If true the inversion method is used - i.e. the weights are calculated as E_rec/E_true vs. E_true and not as E_true/E_rec vs. E_rec. If the inversion method is used the actual correction histogram has to be created in a final step after all histograms have been added by looping over the possible E_true values, calculating E_rec from the histogram and then filling E_true/E_rec vs. E_rec in the new weighting histogram.

Definition at line 150 of file GetLCWeights.h.

150{this, "UseInversionMethod", true, "Use the inversion method"};

◆ m_varHandleArraysDeclared

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

Definition at line 387 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 386 of file AthCommonDataStore.h.

◆ m_weight

std::vector<std::vector<TProfile2D *> > GetLCWeights::m_weight
private

Vector of vector of actual histograms.

Internal lists of histograms for each possible sampling to fill and save.

Definition at line 113 of file GetLCWeights.h.


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