ATLAS Offline Software
Classes | Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
CaloCalibClusterMomentsMaker2 Class Reference

Calculate calibration hit based moments for CaloCluster objects using Primary Particle ID. More...

#include <CaloCalibClusterMomentsMaker2.h>

Inheritance diagram for CaloCalibClusterMomentsMaker2:
Collaboration diagram for CaloCalibClusterMomentsMaker2:

Classes

class  CalibHitIPhiIEtaRange
 Class to define range of valid bins in eta x phi plane. More...
 
class  MyCellInfo
 Class to store cluster number and weight for calorimeter cells. More...
 
class  MyClusInfo
 Class to store cluster's calibration energies. More...
 

Public Types

typedef std::map< Identifier, MyCellInfoCellInfoSet_t
 
typedef std::vector< MyClusInfoClusInfo_t
 
typedef std::pair< std::string, xAOD::CaloCluster::MomentTypemoment_name_pair
 typedef for a pair to index the enums defined in CaloClusterMoment with a string. More...
 
typedef std::vector< moment_name_pairmoment_name_vector
 vector of pairs defined above. More...
 
typedef std::set< moment_name_pairmoment_name_set
 set of pairs defined above. More...
 

Public Member Functions

 CaloCalibClusterMomentsMaker2 (const std::string &type, const std::string &name, const IInterface *parent)
 
virtual StatusCode execute (const EventContext &ctx, xAOD::CaloClusterContainer *theClusColl) const override
 Execute on an entire collection of clusters. More...
 
virtual StatusCode initialize () override
 
virtual StatusCode execute (const EventContext &ctx, xAOD::CaloClusterContainer *collection) const=0
 Execute on an entire collection of clusters. More...
 
virtual StatusCode execute (xAOD::CaloClusterContainer *collection) final
 Execute on an entire collection of clusters. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 
 DeclareInterfaceID (CaloClusterCollectionProcessor, 1, 0)
 
virtual StatusCode execute (xAOD::CaloClusterContainer *collection) final
 Execute on an entire collection of clusters. More...
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
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. More...
 

Private Types

enum  keys_dm_energy_sharing { kMatchDmOff, kMatchDmLoose, kMatchDmMedium, kMatchDmTight }
 
enum  keys_calib_frac_origin { kCalibFracEM, kCalibFracHAD, kCalibFracREST, kCalibFracMax }
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Static Private Member Functions

static double angle_mollier_factor (double x)
 

Private Attributes

std::vector< std::string > m_momentsNames
 vector holding the input list of names of moments to calculate. More...
 
moment_name_vector m_validNames
 vector holding the names of valid moments which can be calculated. More...
 
moment_name_set m_validMoments
 set of moments which will be calculated. More...
 
std::vector< std::string > m_momentsNamesAOD
 vector holding the list of moment names which go in the first store i.e. More...
 
std::set< xAOD::CaloCluster::MomentTypem_momentsAOD
 set holding the list of moment enums which go in the first store i.e. More...
 
SG::ReadHandleKeyArray< CaloCalibrationHitContainerm_CalibrationHitContainerNames
 vector of calibration hit container names to use. More...
 
SG::ReadHandleKeyArray< CaloCalibrationHitContainerm_DMCalibrationHitContainerNames
 vector of dead material calibration hit container names to use. More...
 
SG::ReadHandleKey< xAOD::TruthParticleContainerm_truthParticleContainerKey {this,"TruthParticles","TruthParticles","ReadHandleKey for truth particle container"}
 ReadHandleKey for truth particle container. More...
 
SG::ReadCondHandleKey< CaloDetDescrManagerm_caloDetDescrMgrKey {this,"CaloDetDescrManager", "CaloDetDescrManager"}
 Conditions Handle Key to access the CaloDetDescrManager. More...
 
const CaloCell_IDm_calo_id
 
const CaloDM_IDm_caloDM_ID
 
const CaloDmDescrManagerm_caloDmDescrManager
 
int m_n_phi_out
 
int m_n_eta_out
 
double m_out_phi_max
 
double m_out_eta_max
 
double m_rmaxOut [3]
 
std::array< std::vector< std::vector< CalibHitIPhiIEtaRange > >, 3 > m_i_phi_eta
 
std::atomic< bool > m_foundAllContainers {}
 
bool m_doDeadEnergySharing
 
bool m_doOutOfClusterL
 
bool m_doOutOfClusterM
 
bool m_doOutOfClusterT
 
bool m_doDeadL
 
bool m_doDeadM
 
bool m_doDeadT
 
bool m_useParticleID
 
bool m_doCalibFrac
 
float m_energyMin
 
float m_energyMinCalib
 
float m_apars_alpha
 
float m_apars_r0
 
int m_MatchDmType
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Calculate calibration hit based moments for CaloCluster objects using Primary Particle ID.

Version
$Id: CaloCalibClusterMomentsMaker2.h,v 1.8 2009-05-18 16:16:48 pospelov Exp $
Author
Sven Menke menke.nosp@m.@mpp.nosp@m.mu.mp.nosp@m.g.de, Gennady Pospelov guenn.nosp@m.adi..nosp@m.pospe.nosp@m.lov@.nosp@m.cern..nosp@m.ch
Date
17-June-2008 This is a CaloClusterCollectionProcessor which can be plugged into a CaloClusterMaker for calculating calibration hit based moments for each CaloCluster.

Definition at line 43 of file CaloCalibClusterMomentsMaker2.h.

Member Typedef Documentation

◆ CellInfoSet_t

Definition at line 64 of file CaloCalibClusterMomentsMaker2.h.

◆ ClusInfo_t

Definition at line 94 of file CaloCalibClusterMomentsMaker2.h.

◆ moment_name_pair

typedef for a pair to index the enums defined in CaloClusterMoment with a string.

Definition at line 100 of file CaloCalibClusterMomentsMaker2.h.

◆ moment_name_set

set of pairs defined above.

Definition at line 106 of file CaloCalibClusterMomentsMaker2.h.

◆ moment_name_vector

vector of pairs defined above.

Definition at line 103 of file CaloCalibClusterMomentsMaker2.h.

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ keys_calib_frac_origin

Enumerator
kCalibFracEM 
kCalibFracHAD 
kCalibFracREST 
kCalibFracMax 

Definition at line 200 of file CaloCalibClusterMomentsMaker2.h.

◆ keys_dm_energy_sharing

Enumerator
kMatchDmOff 
kMatchDmLoose 
kMatchDmMedium 
kMatchDmTight 

Definition at line 199 of file CaloCalibClusterMomentsMaker2.h.

Constructor & Destructor Documentation

◆ CaloCalibClusterMomentsMaker2()

CaloCalibClusterMomentsMaker2::CaloCalibClusterMomentsMaker2 ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Definition at line 55 of file CaloCalibClusterMomentsMaker2.cxx.

58  : AthAlgTool(type, name, parent),
59  m_calo_id(nullptr),
60  m_caloDM_ID(nullptr),
61  m_caloDmDescrManager(nullptr),
62  m_useParticleID(true),
63  m_energyMin(200*MeV),
65  m_apars_alpha(0.5),
66  m_apars_r0(0.2),
68 {
69  declareInterface<CaloClusterCollectionProcessor> (this);
70  // Name(s) of Moments to calculate
71  declareProperty("MomentsNames",m_momentsNames);
72  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_TOT"),xAOD::CaloCluster::ENG_CALIB_TOT));
73  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_OUT_L"),xAOD::CaloCluster::ENG_CALIB_OUT_L));
74  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_OUT_M"),xAOD::CaloCluster::ENG_CALIB_OUT_M));
75  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_OUT_T"),xAOD::CaloCluster::ENG_CALIB_OUT_T));
76  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_EMB0"),xAOD::CaloCluster::ENG_CALIB_EMB0));
77  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_EME0"),xAOD::CaloCluster::ENG_CALIB_EME0));
78  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_TILEG3"),xAOD::CaloCluster::ENG_CALIB_TILEG3));
79  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_DEAD_TOT"),xAOD::CaloCluster::ENG_CALIB_DEAD_TOT));
80  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_DEAD_EMB0"),xAOD::CaloCluster::ENG_CALIB_DEAD_EMB0));
81  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_DEAD_TILE0"),xAOD::CaloCluster::ENG_CALIB_DEAD_TILE0));
82  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_DEAD_TILEG3"),xAOD::CaloCluster::ENG_CALIB_DEAD_TILEG3));
83  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_DEAD_EME0"),xAOD::CaloCluster::ENG_CALIB_DEAD_EME0));
84  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_DEAD_HEC0"),xAOD::CaloCluster::ENG_CALIB_DEAD_HEC0));
85  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_DEAD_FCAL"),xAOD::CaloCluster::ENG_CALIB_DEAD_FCAL));
86  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_DEAD_LEAKAGE"),xAOD::CaloCluster::ENG_CALIB_DEAD_LEAKAGE));
87  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_DEAD_UNCLASS"),xAOD::CaloCluster::ENG_CALIB_DEAD_UNCLASS));
88  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_FRAC_EM"),xAOD::CaloCluster::ENG_CALIB_FRAC_EM));
89  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_FRAC_HAD"),xAOD::CaloCluster::ENG_CALIB_FRAC_HAD));
90  m_validNames.push_back(moment_name_pair(std::string("ENG_CALIB_FRAC_REST"),xAOD::CaloCluster::ENG_CALIB_FRAC_REST));
91 
92  // Name(s) of Moments which can be stored on the AOD - all others go to ESD
93  m_momentsNamesAOD.emplace_back("ENG_CALIB_TOT");
94  m_momentsNamesAOD.emplace_back("ENG_CALIB_OUT_L");
95  m_momentsNamesAOD.emplace_back("ENG_CALIB_OUT_M");
96  m_momentsNamesAOD.emplace_back("ENG_CALIB_OUT_T");
97  m_momentsNamesAOD.emplace_back("ENG_CALIB_EMB0");
98  m_momentsNamesAOD.emplace_back("ENG_CALIB_EME0");
99  m_momentsNamesAOD.emplace_back("ENG_CALIB_TILEG3");
100  m_momentsNamesAOD.emplace_back("ENG_CALIB_DEAD_TOT");
101  m_momentsNamesAOD.emplace_back("ENG_CALIB_DEAD_EMB0");
102  m_momentsNamesAOD.emplace_back("ENG_CALIB_DEAD_TILE0");
103  m_momentsNamesAOD.emplace_back("ENG_CALIB_DEAD_TILEG3");
104  m_momentsNamesAOD.emplace_back("ENG_CALIB_DEAD_EME0");
105  m_momentsNamesAOD.emplace_back("ENG_CALIB_DEAD_HEC0");
106  m_momentsNamesAOD.emplace_back("ENG_CALIB_DEAD_FCAL");
107  m_momentsNamesAOD.emplace_back("ENG_CALIB_DEAD_LEAKAGE");
108  m_momentsNamesAOD.emplace_back("ENG_CALIB_DEAD_UNCLASS");
109  m_momentsNamesAOD.emplace_back("ENG_CALIB_FRAC_EM");
110  m_momentsNamesAOD.emplace_back("ENG_CALIB_FRAC_HAD");
111  m_momentsNamesAOD.emplace_back("ENG_CALIB_FRAC_REST");
112 
113  declareProperty("AODMomentsNames",m_momentsNamesAOD);
114  declareProperty("CalibrationHitContainerNames",m_CalibrationHitContainerNames);
115  declareProperty("DMCalibrationHitContainerNames",m_DMCalibrationHitContainerNames);
116  m_n_phi_out = 127; // not more than 127 since we store indices (-127,...-1,0,...,126) and have 8 bits only
117  m_n_eta_out = 127;
119  m_out_eta_max = 6;
120 
121  m_rmaxOut[0] = 1.0;
122  m_rmaxOut[1] = 0.5;
123  m_rmaxOut[2] = 0.3;
124 
125  for( int im=0;im<3;im++) {
126  m_i_phi_eta[im].resize(m_n_eta_out);
127  }
128  m_doDeadEnergySharing = false;
129  m_foundAllContainers = false;
130  m_doOutOfClusterL = false;
131  m_doOutOfClusterM = false;
132  m_doOutOfClusterT = false;
133  m_doDeadL = false;
134  m_doDeadM = false;
135  m_doDeadT = false;
136  m_doCalibFrac = false;
137 
138  declareProperty("MatchDmType",m_MatchDmType);
139 
140  declareProperty( "UseParticleID",m_useParticleID);
141 }

Member Function Documentation

◆ angle_mollier_factor()

double CaloCalibClusterMomentsMaker2::angle_mollier_factor ( double  x)
staticprivate

Definition at line 813 of file CaloCalibClusterMomentsMaker2.cxx.

814 {
815  double eta = fabs(x);
816  double ff;
817  if(eta<1.6){
818  ff = atan(5.0*1.7/(200.0*cosh(eta)));
819  }else if(eta<3.2){
820  ff = atan(5.0*1.6/(420./tanh(eta)));
821  }else{
822  ff = atan(5.0*0.95/(505./tanh(eta)));
823  }
824  return ff*(1./atan(5.0*1.7/200.0));
825 }

◆ declareGaudiProperty() [1/4]

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

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

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::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  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

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

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

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ DeclareInterfaceID()

CaloClusterCollectionProcessor::DeclareInterfaceID ( CaloClusterCollectionProcessor  ,
,
 
)
inherited

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< AlgTool > >::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  }

◆ detStore()

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

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

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

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

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

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( ) const
inlineinherited

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

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute() [1/4]

virtual StatusCode CaloClusterCollectionProcessor::execute

Execute on an entire collection of clusters.

Parameters
collectionThe container of clusters. param ctx The event context.

◆ execute() [2/4]

StatusCode CaloCalibClusterMomentsMaker2::execute ( const EventContext &  ctx,
xAOD::CaloClusterContainer collection 
) const
overridevirtual

Execute on an entire collection of clusters.

Parameters
collectionThe container of clusters. param ctx The event context.

Implements CaloClusterCollectionProcessor.

Definition at line 277 of file CaloCalibClusterMomentsMaker2.cxx.

279 {
280 
281  ATH_MSG_DEBUG("Starting CaloCalibClusterMomentsMaker2::execute");
283  const CaloDetDescrManager* calo_dd_man = *caloMgrHandle;
284 
285  bool foundAllContainers (true);
286  std::vector<const CaloCalibrationHitContainer *> v_cchc;
289  {
291  if ( !cchc.isValid() ) {
292  if (m_foundAllContainers) {
293  // print ERROR message only if there was at least one event with
294  // all containers
295  msg(MSG::ERROR) << "SG does not contain calibration hit container " << key.key() << endmsg;
296  }
297  foundAllContainers = false;
298  }
299  else {
300  v_cchc.push_back(cchc.cptr());
301  }
302  }
303 
304  std::vector<const CaloCalibrationHitContainer *> v_dmcchc;
307  {
309  if ( !cchc.isValid() ) {
310  if (m_foundAllContainers) {
311  // print ERROR message only if there was at least one event with
312  // all containers
313  ATH_MSG_ERROR("SG does not contain DM calibration hit container " << key.key());
314  }
315  foundAllContainers = false;
316  }
317  else {
318  v_dmcchc.push_back(cchc.cptr());
319  }
320  }
321 
322  if ( !m_foundAllContainers && foundAllContainers )
323  m_foundAllContainers = true;
324 
325  if ( !foundAllContainers ) return StatusCode::SUCCESS;
326  ATH_MSG_DEBUG("SG has all containers ");
327 
328  // will contain detailed info about cluster calibration eneries
329  ClusInfo_t clusInfoVec (theClusColl->size());
330 
331  CellInfoSet_t cellInfo;
332 
333  /* ********************************************
334  filling the map with info which cell belongs to which cluster and what
335  is the cell weight in the cluster
336  ******************************************** */
337  xAOD::CaloClusterContainer::iterator clusIter = theClusColl->begin();
338  xAOD::CaloClusterContainer::iterator clusIterEnd = theClusColl->end();
339  int iClus = 0;
340  for( ;clusIter!=clusIterEnd;++clusIter,++iClus) {
341  const xAOD::CaloCluster * theCluster = (*clusIter);
342 
343  // loop over all cell members and fill cell vector for used cells
344  xAOD::CaloCluster::const_cell_iterator cellIter = theCluster->cell_begin();
345  xAOD::CaloCluster::const_cell_iterator cellIterEnd = theCluster->cell_end();
346  for(; cellIter != cellIterEnd; cellIter++ ){
347  const CaloCell* pCell = (*cellIter);
348  Identifier myId = pCell->ID();
349 
350  MyCellInfo info (iClus, cellIter.weight() );
351  CellInfoSet_t::iterator bookmark = cellInfo.lower_bound( myId );
352  if(bookmark == cellInfo.end() || bookmark->first != myId) {
353  // We haven't had a infohit in this cell before. Add it to our set.
354  if (bookmark != cellInfo.begin()) --bookmark;
355  cellInfo.emplace_hint (bookmark, myId, std::move(info));
356  }else{
357  // Update the existing hit.
358  bookmark->second.Add( info );
359  }
360  } // cellIter
361  } // iClus
362 
363 
364  /* ********************************************
365  calculate total calib energy inside clusters
366  ******************************************** */
367  unsigned int nHitsTotal = 0;
368  unsigned int nHitsWithoutParticleUID = 0;
369  for (const CaloCalibrationHitContainer* cchc : v_cchc) {
370  //loop over cells in calibration container
371  for (const CaloCalibrationHit* hit : *cchc) {
372  Identifier myId = hit->cellID();
373 
374  CellInfoSet_t::iterator pos = cellInfo.find( myId );
375  if(pos != cellInfo.end() ) {
376  // i.e. given hit id belongs to one or more clusters
378  for ( const std::pair<int, double>& p : pos->second) {
379  int iClus = p.first;
380  double weight = p.second;
381  if(m_useParticleID){
382  const int uniqueID = HepMC::uniqueID(hit);
384  ATH_MSG_ERROR("Invalid uniqueID detected - this sample cannot be properly analysed.");
385  break;
386  }
387  clusInfoVec[iClus].Add(weight * hit->energyTotal(), nsmp, (unsigned int)(HepMC::uniqueID(hit)));
388  }else{
389  clusInfoVec[iClus].Add(weight * hit->energyTotal(), nsmp);
390  }
391  }
392  }
394  nHitsWithoutParticleUID++;
395  }
396  nHitsTotal++;
397  }
398  }
399 
400  // if all calibration hits have ParticleUID(i.e GenParticle::id())==0 when simulation was done without ParticleUID
401  bool doCalibFrac = m_doCalibFrac;
402  bool useParticleID = m_useParticleID;
403  if(m_useParticleID && (nHitsTotal == nHitsWithoutParticleUID) ) {
404  ATH_MSG_INFO("Calibration hits do not have ParticleUID, ids of particle-caused hits are always 0. Continuing without ParticleID machinery.");
405  useParticleID = false;
406  }
407 
408  // reading particle information for later calcution of calibration enegry fraction caused
409  // by particles of different types
410  SG::ReadHandle<xAOD::TruthParticleContainer> truthParticleContainerReadHandle(m_truthParticleContainerKey, ctx);
411 
412  if (doCalibFrac && !truthParticleContainerReadHandle.isValid()){
413  ATH_MSG_WARNING("Invalid read handle to TruthParticleContainer with key: " << m_truthParticleContainerKey.key());
414  doCalibFrac = false;
415  }
416 
417  std::vector<double> engCalibOut[3];
418 
419  /* ****************************************************************
420  lists of clusters populating given area [eta*phi][iClus list]
421  **************************************************************** */
422  std::vector<std::vector <int > > clusListL;
423  std::vector<std::vector <int > > clusListM;
424  std::vector<std::vector <int > > clusListT;
426  clusListL.resize((2*m_n_phi_out+1)*(2*m_n_eta_out+1));
428  clusListM.resize((2*m_n_phi_out+1)*(2*m_n_eta_out+1));
430  clusListT.resize((2*m_n_phi_out+1)*(2*m_n_eta_out+1));
431 
432  for(unsigned int ii=0;ii<3;ii++) {
433  if ( (ii == 0 && (m_doOutOfClusterL || m_doDeadL || (m_doDeadEnergySharing && m_MatchDmType==kMatchDmLoose) ) ) ||
436  engCalibOut[ii].resize(theClusColl->size(),0);
437  iClus = -1;
438  for (const xAOD::CaloCluster * theCluster : *theClusColl) {
439  ++iClus;
440  MyClusInfo& clusInfo = clusInfoVec[iClus];
441 
442  if ( clusInfo.engCalibIn.engTot > 0 ) {
443  int iEtaSign = 1;
444  if ( theCluster->eta() < 0 ) iEtaSign = -1;
445  int jeta = (int)(floor(m_n_eta_out*(theCluster->eta()/(m_out_eta_max))));
446  int jphi = (int)(floor(m_n_phi_out*(theCluster->phi())/(m_out_phi_max)));
447  if ( jeta >= -m_n_eta_out && jeta < m_n_eta_out ) {
448  if ( jphi < -m_n_phi_out ) jphi += 2*m_n_phi_out;
449  if ( jphi >= m_n_phi_out ) jphi -= 2*m_n_phi_out;
450  unsigned int iEtaBin(jeta);
451  if ( jeta < 0 ) iEtaBin = abs(jeta)-1;
452  const std::vector<CalibHitIPhiIEtaRange>& bins
453  = m_i_phi_eta[ii][iEtaBin];
454  for (const CalibHitIPhiIEtaRange& range : bins) {
455  int jp = range.iPhi+jphi;
456  if ( jp < -m_n_phi_out ) jp += 2*m_n_phi_out;
457  if ( jp >= m_n_phi_out ) jp -= 2*m_n_phi_out;
458  int jEtaMin = iEtaSign<0?-range.iEtaMax-1:range.iEtaMin;
459  int jEtaMax = iEtaSign<0?-range.iEtaMin-1:range.iEtaMax;
460  for( int je = jEtaMin;je<=jEtaMax;je++ ) {
461  if(ii == 0 ) clusListL[(jp+m_n_phi_out)*(2*m_n_eta_out+1)+je+m_n_eta_out].push_back(iClus);
462  else if(ii == 1 ) clusListM[(jp+m_n_phi_out)*(2*m_n_eta_out+1)+je+m_n_eta_out].push_back(iClus);
463  else if(ii == 2 ) clusListT[(jp+m_n_phi_out)*(2*m_n_eta_out+1)+je+m_n_eta_out].push_back(iClus);
464  }
465  }
466  }
467  }
468  }
469  }
470  }
471 
472  /* ****************************************************************
473  calculate out-of-cluster energy of clusters
474  **************************************************************** */
476  for (const CaloCalibrationHitContainer* cchc : v_cchc) {
477  //loop over cells in calibration container
478  for (const CaloCalibrationHit* hit : *cchc) {
479  Identifier myId = hit->cellID();
480 
481  CellInfoSet_t::iterator pos = cellInfo.find( myId );
482  if(pos == cellInfo.end() ) {
483  // hit is not inside any cluster
484  const CaloDetDescrElement* myCDDE =
485  calo_dd_man->get_element(myId);
487  if(useParticleID) uniqueID = HepMC::uniqueID(hit);
488  if ( myCDDE ) {
489  int jeO = (int)floor(m_n_eta_out*(myCDDE->eta()/m_out_eta_max));
490  if ( jeO >= -m_n_eta_out && jeO < m_n_eta_out ) {
491  int jpO = (int)floor(m_n_phi_out*(myCDDE->phi()/m_out_phi_max));
492  if ( jpO < -m_n_phi_out ) jpO += 2*m_n_phi_out;
493  if ( jpO >= m_n_phi_out ) jpO -= 2*m_n_phi_out;
494  for (unsigned int ii=0;ii<3;ii++) {
495  std::vector<std::vector <int > > *pClusList=nullptr;
496  if ( ii == 0 && m_doOutOfClusterL )
497  pClusList = &clusListL;
498  else if ( ii == 1 && m_doOutOfClusterM )
499  pClusList = &clusListM;
500  else if ( ii == 2 && m_doOutOfClusterT )
501  pClusList = &clusListT;
502  if ( pClusList) {
503  // loop over list of potential neighboring clusters
504  double hitClusNorm(0.);
505  std::vector<int> hitClusIndex;
506  std::vector<double > hitClusEffEnergy;
507  // loop over clusters which match given OOC hit
508  for(unsigned int i_cls=0; i_cls<(*pClusList)[(jpO+m_n_phi_out)*(2*m_n_eta_out+1)+jeO+m_n_eta_out].size(); i_cls++){
509  int iClus = (*pClusList)[(jpO+m_n_phi_out)*(2*m_n_eta_out+1)+jeO+m_n_eta_out][i_cls];
510  MyClusInfo& clusInfo = clusInfoVec[iClus];
511  // getting access to calibration energy inside cluster caused by same particleUID (uniqueID)
512  // as given OOC hit
513  auto pos = clusInfo.engCalibParticle.find(uniqueID);
514  if(pos!=clusInfo.engCalibParticle.end()) {
515  // given cluster have some energy inside caused by same particle as given OOC hitClusEffEnergy
516  // so the hit will be assigned to this cluster with some weight
517  hitClusNorm += pos->second.engTot;
518  hitClusEffEnergy.push_back(pos->second.engTot);
519  hitClusIndex.push_back(iClus);
520  }
521  }
522  if ( hitClusNorm > 0 ) {
523  const double inv_hitClusNorm = 1. / hitClusNorm;
524  for(unsigned int i_cls=0; i_cls<hitClusIndex.size(); i_cls++){
525  int iClus = hitClusIndex[i_cls];
526  double w = hitClusEffEnergy[i_cls] * inv_hitClusNorm;
527  engCalibOut[ii][iClus] += w*hit->energyTotal();
528  }
529  }
530  }
531  }
532  }
533  }
534  } // hits not in cluster
535  }
536  }
537  }
538 
539  // ------------------------------------------------------------------------
540  // calculate dead-material energy of clusters (way2)
541  // + energy is shared among clusters within certain area
542  // + distance to clusters and energy in specific samplings are used as sharing criteria
543  // + calculations are done separately for different dead material areas
544  std::vector<std::vector <int > > *pClusList=nullptr;
545  if ( m_MatchDmType == kMatchDmLoose ) {
546  pClusList = &clusListL;
547  } else if ( m_MatchDmType == kMatchDmMedium ) {
548  pClusList = &clusListM;
549  } else if ( m_MatchDmType == kMatchDmTight ) {
550  pClusList = &clusListT;
551  }
552  if( m_doDeadEnergySharing && pClusList) {
553 
554  for (const CaloCalibrationHitContainer* dmcchc : v_dmcchc) {
555  for (const CaloCalibrationHit* hit : *dmcchc) {
556  Identifier myId = hit->cellID();
557  if (m_calo_id->is_lar_dm(myId) || m_calo_id->is_tile_dm(myId)) {
558  CaloDmDescrElement* myCDDE(nullptr);
559  myCDDE = m_caloDmDescrManager->get_element(myId);
560  if ( myCDDE ) {
562  if(useParticleID) uniqueID = HepMC::uniqueID(hit);
563 
564  int jeO = (int)floor(m_n_eta_out*(myCDDE->eta()/m_out_eta_max));
565  if ( jeO >= -m_n_eta_out && jeO < m_n_eta_out ) {
566  int jpO = (int)floor(m_n_phi_out*(myCDDE->phi()/m_out_phi_max));
567  if ( jpO < -m_n_phi_out ) jpO += 2*m_n_phi_out;
568  if ( jpO >= m_n_phi_out ) jpO -= 2*m_n_phi_out;
569 
570  /* ****************************************
571  share energy of DM hit among different clusters
572  ***************************************** */
573  int nDmArea = m_caloDmDescrManager->get_dm_area(myId);
574  const CaloDmRegion *dmRegion = m_caloDmDescrManager->get_dm_region(myId);
575  int hitClusVecIndex = 0;
576  std::vector<int> hitClusIndex(theClusColl->size());
577  std::vector<double > hitClusEffEnergy(theClusColl->size());
578  double hitClusNorm = 0.0;
579  // loop over clusters which match given DM hit
580  for(unsigned int i_cls=0; i_cls< (*pClusList)[(jpO+m_n_phi_out)*(2*m_n_eta_out+1)+jeO+m_n_eta_out].size(); i_cls++){
581  int iClus = (*pClusList)[(jpO+m_n_phi_out)*(2*m_n_eta_out+1)+jeO+m_n_eta_out][i_cls];
582  xAOD::CaloCluster * theCluster = theClusColl->at(iClus);
583 
584  MyClusInfo& clusInfo = clusInfoVec[iClus];
585  // getting access to calibration energy inside cluster caused by same particleUID (uniqueID)
586  // as given OOC hit
587  auto pos = clusInfo.engCalibParticle.find(uniqueID);
588  if(pos!=clusInfo.engCalibParticle.end()) {
589  double engClusTruthUniqueIDCalib = pos->second.engTot;
590 
591  if(engClusTruthUniqueIDCalib > m_energyMinCalib && theCluster->e()>m_energyMin) {
592  double sum_smp_energy = 0.0;
593  // loop over calo sampling numbers registered for given DM area
594  for(unsigned int i_smp=0; i_smp<dmRegion->m_CaloSampleNeighbours.size(); i_smp++) {
596  if( (dmRegion->m_CaloSampleEtaMin[i_smp]-0.5) <= theCluster->eta() &&
597  theCluster->eta() <= (dmRegion->m_CaloSampleEtaMax[i_smp]+0.5) ){
598  //sum_smp_energy += theCluster->eSample(nsmp);
599  sum_smp_energy += pos->second.engSmp[nsmp];
600  }
601  }
602  if(sum_smp_energy > 0.0) {
603  double phi_diff=myCDDE->phi()-theCluster->phi();
604  if(phi_diff <= -M_PI){
605  phi_diff += 2.*M_PI;
606  } else if (phi_diff > M_PI){
607  phi_diff -= 2.*M_PI;
608  }
609  double eta_diff = (myCDDE->eta()-theCluster->eta());
610  float distance=sqrt(eta_diff * eta_diff + phi_diff * phi_diff);
611 
612  double effEner = pow(sum_smp_energy,m_apars_alpha)*exp(-distance/m_apars_r0);
613 
614  hitClusIndex [hitClusVecIndex] = iClus;
615  hitClusEffEnergy [hitClusVecIndex++]= effEner;
616  hitClusNorm += effEner;
617  }
618  } // good energetic cluster
619  } // we ve found a uniqueID
620  } // loop over clusters in the list
621  hitClusIndex.resize(hitClusVecIndex);
622  hitClusEffEnergy.resize(hitClusVecIndex);
623 
624 
625  // now we have to calculate weight for assignment hit energy to cluster
626  if(hitClusNorm >0.0) {
627  const double inv_hitClusNorm = 1. / hitClusNorm;
628  for(unsigned int i_cls=0; i_cls<hitClusIndex.size(); i_cls++){
629  int iClus = hitClusIndex[i_cls];
630  double dm_weight = hitClusEffEnergy[i_cls] * inv_hitClusNorm;
631  if(dm_weight > 1.0 || dm_weight < 0.0 ){
632  std::cout << "CaloCalibClusterMomentsMaker2::execute() ->Error! Strange weight " << dm_weight<< std::endl;
633  std::cout << hitClusEffEnergy[i_cls] << " " << hitClusNorm << std::endl;
634  }
635  clusInfoVec[iClus].engCalibDeadInArea[nDmArea] += hit->energyTotal()*dm_weight;
636  clusInfoVec[iClus].engCalibDeadInArea[CaloDmDescrArea::DMA_ALL] += hit->energyTotal()*dm_weight;
637  }
638  } // hit clus norm
639 
640  } // loop over united ieta*iphi
641  } // myCDDE
642  } // tile and lar
643  } // eol over DM calibration hits
644  } //eol over containers
645 
646  } // doDeadEnergySharing
647 
648  // fraction of calibration energies caused by different particles
649  std::vector<double> engCalibFrac;
650  engCalibFrac.resize(kCalibFracMax, 0.0);
651 
652  std::map<unsigned int,int> truthIDToPdgCodeMap;
653 
654  //loop on truth particle container is slow, so put needed information in a map for faster key lookup in later loops
655  for ( const auto *thisTruthParticle : *truthParticleContainerReadHandle){
656 
657  if (!thisTruthParticle){
658  ATH_MSG_WARNING("Got invalid pointer to TruthParticle");
659  continue;
660  }
661 
662  truthIDToPdgCodeMap[HepMC::uniqueID(thisTruthParticle)] = thisTruthParticle->pdgId();
663  }//truth particle loop
664 
665  // assign moments
666  for( clusIter = theClusColl->begin(),iClus=0; clusIter!=clusIterEnd;++clusIter,++iClus) {
667  xAOD::CaloCluster * theCluster = *clusIter;
668  MyClusInfo& clusInfo = clusInfoVec[iClus];
669 
670  // total DM energy assigned to cluster
671  double eng_calib_dead_tot = clusInfo.engCalibDeadInArea[CaloDmDescrArea::DMA_ALL]
672  + clusInfo.engCalibIn.engSmp[CaloSampling::PreSamplerB]
673  + clusInfo.engCalibIn.engSmp[CaloSampling::PreSamplerE]
674  + clusInfo.engCalibIn.engSmp[CaloSampling::TileGap3];
675  // DM energy before barrel presampler, inside it, and between presampler and strips
676  double eng_calib_dead_emb0 = clusInfo.engCalibDeadInArea[CaloDmDescrArea::DMA_EMB0]
677  + clusInfo.engCalibDeadInArea[CaloDmDescrArea::DMA_EMB1]
678  + clusInfo.engCalibIn.engSmp[CaloSampling::PreSamplerB];
679  // DM energy between barrel and tile
680  double eng_calib_dead_tile0 = clusInfo.engCalibDeadInArea[CaloDmDescrArea::DMA_EMB3_TILE0];
681  // DM energy before scintillator and inside scintillator
682  double eng_calib_dead_tileg3 = clusInfo.engCalibDeadInArea[CaloDmDescrArea::DMA_SCN]
683  + clusInfo.engCalibIn.engSmp[CaloSampling::TileGap3];
684  // DM energy beforee endcap presampler, inside it and between presampler and strips
685  double eng_calib_dead_eme0 = clusInfo.engCalibDeadInArea[CaloDmDescrArea::DMA_EME0]
686  + clusInfo.engCalibDeadInArea[CaloDmDescrArea::DMA_EME12]
687  + clusInfo.engCalibIn.engSmp[CaloSampling::PreSamplerE];
688  // DM energy between emec and hec
689  double eng_calib_dead_hec0 = clusInfo.engCalibDeadInArea[CaloDmDescrArea::DMA_EME3_HEC0];
690  // DM energy before FCAL and between HEC and FCAL
691  double eng_calib_dead_fcal = clusInfo.engCalibDeadInArea[CaloDmDescrArea::DMA_FCAL0]
692  + clusInfo.engCalibDeadInArea[CaloDmDescrArea::DMA_HEC_FCAL];
693  // DM leakage behind the calorimeter
694  double eng_calib_dead_leakage = clusInfo.engCalibDeadInArea[CaloDmDescrArea::DMA_LEAK];
695  // the rest of DM energy which remains unclassified
696  double eng_calib_dead_unclass = eng_calib_dead_tot - eng_calib_dead_emb0 - eng_calib_dead_tile0
697  - eng_calib_dead_tileg3 - eng_calib_dead_eme0 - eng_calib_dead_hec0 - eng_calib_dead_fcal
698  - eng_calib_dead_leakage;
699 
700  if(doCalibFrac){
701 /*****************************************************************************
702 Calculation of energy fraction caused by particles of different types
703 *****************************************************************************/
704  engCalibFrac.assign(kCalibFracMax, 0.0);
705  if(clusInfo.engCalibIn.engTot > 0.0) {
706  // each MyClusInfo has a map of particle's uniqueID (GenParticle::id()) and particle calibration deposits in given cluster
707  for (const auto& p : clusInfo.engCalibParticle) {
708  int pdg_id = 0;
709  if ( auto it = truthIDToPdgCodeMap.find(p.first); it != truthIDToPdgCodeMap.end()) {
710  pdg_id = it->second;
711  } else {
712  ATH_MSG_WARNING("truthIDToPdgCodeMap cannot find an entry with uniqueID " << p.first);
713  continue;
714  }
715  if( std::abs(pdg_id) == 211) {
716  engCalibFrac[kCalibFracHAD] += p.second.engTot;
717  } else if( pdg_id == 111 || pdg_id == 22 || std::abs(pdg_id)==11) {
718  engCalibFrac[kCalibFracEM] += p.second.engTot;
719  } else {
720  engCalibFrac[kCalibFracREST] += p.second.engTot;
721  }
722  }
723  for(size_t i=0; i<engCalibFrac.size(); i++) engCalibFrac[i] = engCalibFrac[i]/clusInfo.engCalibIn.engTot;
724  }
725  }
726 
727  if ( !m_momentsNames.empty() ) {
728  std::vector<double> myMoments(m_validMoments.size(),0);
729  // assign moments
730  moment_name_set::const_iterator vMomentsIter = m_validMoments.begin();
731  moment_name_set::const_iterator vMomentsIterEnd = m_validMoments.end();
732 
733  int iMoment=0;
734  for(; vMomentsIter!=vMomentsIterEnd; ++vMomentsIter,++iMoment) {
735  // now calculate the actual moments
736  switch (vMomentsIter->second) {
738  ATH_MSG_DEBUG("Inserting ENG_CALIB_TOT");
739  myMoments[iMoment] = clusInfo.engCalibIn.engTot;
740  break;
742  myMoments[iMoment] = engCalibOut[0][iClus];
743  break;
745  myMoments[iMoment] = engCalibOut[1][iClus];
746  break;
748  myMoments[iMoment] = engCalibOut[2][iClus];
749  break;
751  myMoments[iMoment] = clusInfo.engCalibIn.engSmp[CaloSampling::PreSamplerB];
752  break;
754  myMoments[iMoment] = clusInfo.engCalibIn.engSmp[CaloSampling::PreSamplerE];
755  break;
757  myMoments[iMoment] = clusInfo.engCalibIn.engSmp[CaloSampling::TileGap3];
758  break;
760  myMoments[iMoment] = eng_calib_dead_tot;
761  break;
763  myMoments[iMoment] = eng_calib_dead_emb0;
764  break;
766  myMoments[iMoment] = eng_calib_dead_tile0;
767  break;
769  myMoments[iMoment] = eng_calib_dead_tileg3;
770  break;
772  myMoments[iMoment] = eng_calib_dead_eme0;
773  break;
775  myMoments[iMoment] = eng_calib_dead_hec0;
776  break;
778  myMoments[iMoment] = eng_calib_dead_fcal;
779  break;
781  myMoments[iMoment] = eng_calib_dead_leakage;
782  break;
784  myMoments[iMoment] = eng_calib_dead_unclass;
785  break;
787  myMoments[iMoment] = engCalibFrac[kCalibFracEM];
788  break;
790  myMoments[iMoment] = engCalibFrac[kCalibFracHAD];
791  break;
793  myMoments[iMoment] = engCalibFrac[kCalibFracREST];
794  break;
795  default:
796  // nothing to be done for other moments
797  break;
798  }
799 
800  theCluster->insertMoment(vMomentsIter->second, myMoments[iMoment]);
801  }
802  }
803  }
804 
805  return StatusCode::SUCCESS;
806 }

◆ execute() [3/4]

virtual StatusCode CaloClusterCollectionProcessor::execute ( xAOD::CaloClusterContainer collection)
inlinefinalvirtualinherited

Execute on an entire collection of clusters.

Parameters
collectionThe container of clusters. (deprecated)

Definition at line 50 of file CaloClusterCollectionProcessor.h.

51  {
52  return execute (Gaudi::Hive::currentContext(), collection);
53  }

◆ execute() [4/4]

virtual StatusCode CaloClusterCollectionProcessor::execute
inlinefinal

Execute on an entire collection of clusters.

Parameters
collectionThe container of clusters. (deprecated)

Definition at line 50 of file CaloClusterCollectionProcessor.h.

51  {
52  return execute (Gaudi::Hive::currentContext(), collection);
53  }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::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

◆ initialize()

StatusCode CaloCalibClusterMomentsMaker2::initialize ( )
overridevirtual

Definition at line 147 of file CaloCalibClusterMomentsMaker2.cxx.

148 {
149  ATH_MSG_INFO( "Initializing " << name() );
150 
151  for (const std::string& name : m_momentsNames) {
152  bool isValid(false);
153  for (const moment_name_pair& vname : m_validNames) {
154  if ( name == vname.first ) {
155  m_validMoments.insert(vname);
156  isValid = true;
157  ATH_MSG_DEBUG( "Inserting " << name );
158  break;
159  }
160  }
161  if ( !isValid) {
162  msg() << MSG::ERROR << "Moment " << name
163  << " is not a valid Moment name and will be ignored! "
164  << "Valid names are:";
165  for (unsigned int i=0;i<m_validNames.size();i++)
166  msg() << (i==0?" ":", ") << m_validNames[i].first;
167  msg() << endmsg;
168  }
169  }
170 
171  // to switch on clever DeadMaterial assignment procedure
172  // and check if tight, medium and/or loose versions for out-of-cluster and
173  // simple dead-material assignment are wanted
174  for (const moment_name_pair& vname : m_validNames) {
175  switch (vname.second) {
177  m_doDeadEnergySharing = true;
178  break;
180  m_doOutOfClusterL = true;
181  break;
183  m_doOutOfClusterM = true;
184  break;
186  m_doOutOfClusterT = true;
187  break;
189  m_doCalibFrac = true;
190  break;
192  m_doCalibFrac = true;
193  break;
195  m_doCalibFrac = true;
196  break;
197  default:
198  break;
199  }
200  }
201 
203  ATH_MSG_INFO( "Usage of ParticleID was switched off (UseParticleID==False), no ENG_CALIB_FRAC_* moments will be available" );
204  m_doCalibFrac = false;
205  }
206 
207  for (const std::string& name : m_momentsNamesAOD) {
208  for (const moment_name_pair& vname : m_validNames) {
209  if ( vname.first == name ) {
210  m_momentsAOD.insert(vname.second);
211  break;
212  }
213  }
214  }
216  m_doDeadEnergySharing = true;
217  }
218 
219  // dead material identifier description manager
221 
222  ATH_CHECK( detStore()->retrieve(m_calo_id, "CaloCell_ID") );
224 
225  // initialize distance tables
226  for(int jeta = 0;jeta<m_n_eta_out;jeta++) {
227  double eta0 = (jeta+0.5) * (m_out_eta_max)/m_n_eta_out;
228  HepLorentzVector middle(1,0,0,1);
229  middle.setREtaPhi(1./cosh(eta0),eta0,0);
230  double x_rmaxOut[3];
231  for (int im=0;im<3;im++) {
232  x_rmaxOut[im] = m_rmaxOut[im]*angle_mollier_factor(eta0);
233  }
234  for (int jp=-m_n_phi_out;jp<m_n_phi_out;jp++) {
235  double phi = (jp+0.5) * m_out_phi_max/m_n_phi_out;
236  int ietaMin[3] = {m_n_eta_out,m_n_eta_out,m_n_eta_out};
237  int ietaMax[3] = {-m_n_eta_out,-m_n_eta_out,-m_n_eta_out};
238  for(int je = -m_n_eta_out;je<m_n_eta_out;je++) {
239  double eta = (je+0.5) * m_out_eta_max/m_n_eta_out;
240  HepLorentzVector cpoint(1,0,0,1);
241  cpoint.setREtaPhi(1./cosh(eta),eta,phi);
242  double r = middle.angle(cpoint.vect());
243  for (int im=0;im<3;im++) {
244  if ( r < x_rmaxOut[im] ) {
245  if ( je < ietaMin[im] )
246  ietaMin[im] = je;
247  if ( je > ietaMax[im] )
248  ietaMax[im] = je;
249  }
250  }
251  }
252  for (int im=0;im<3;im++) {
253  if ( ietaMin[im] <= ietaMax[im] ) {
254  CalibHitIPhiIEtaRange theRange{};
255  theRange.iPhi = (char)jp;
256  theRange.iEtaMin = (char)ietaMin[im];
257  theRange.iEtaMax = (char)ietaMax[im];
258  m_i_phi_eta[im][jeta].push_back(theRange);
259  }
260  }
261  }
262  }
263 
266 
268 
270 
271  return StatusCode::SUCCESS;
272 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< AlgTool > >::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() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< AlgTool >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::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< AlgTool > >::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< AlgTool > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in DerivationFramework::CfAthAlgTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and asg::AsgMetadataTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::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< AlgTool > >::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) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_apars_alpha

float CaloCalibClusterMomentsMaker2::m_apars_alpha
private

Definition at line 213 of file CaloCalibClusterMomentsMaker2.h.

◆ m_apars_r0

float CaloCalibClusterMomentsMaker2::m_apars_r0
private

Definition at line 214 of file CaloCalibClusterMomentsMaker2.h.

◆ m_CalibrationHitContainerNames

SG::ReadHandleKeyArray<CaloCalibrationHitContainer> CaloCalibClusterMomentsMaker2::m_CalibrationHitContainerNames
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 167 of file CaloCalibClusterMomentsMaker2.h.

◆ m_calo_id

const CaloCell_ID* CaloCalibClusterMomentsMaker2::m_calo_id
private

Definition at line 182 of file CaloCalibClusterMomentsMaker2.h.

◆ m_caloDetDescrMgrKey

SG::ReadCondHandleKey<CaloDetDescrManager> CaloCalibClusterMomentsMaker2::m_caloDetDescrMgrKey {this,"CaloDetDescrManager", "CaloDetDescrManager"}
private

Conditions Handle Key to access the CaloDetDescrManager.

Definition at line 180 of file CaloCalibClusterMomentsMaker2.h.

◆ m_caloDM_ID

const CaloDM_ID* CaloCalibClusterMomentsMaker2::m_caloDM_ID
private

Definition at line 184 of file CaloCalibClusterMomentsMaker2.h.

◆ m_caloDmDescrManager

const CaloDmDescrManager* CaloCalibClusterMomentsMaker2::m_caloDmDescrManager
private

Definition at line 186 of file CaloCalibClusterMomentsMaker2.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_DMCalibrationHitContainerNames

SG::ReadHandleKeyArray<CaloCalibrationHitContainer> CaloCalibClusterMomentsMaker2::m_DMCalibrationHitContainerNames
private

vector of dead material calibration hit container names to use.

The containers specified in this property should hold calibration hits outside the calorimeter systems - i.e. dead material hits ...

Definition at line 174 of file CaloCalibClusterMomentsMaker2.h.

◆ m_doCalibFrac

bool CaloCalibClusterMomentsMaker2::m_doCalibFrac
private

Definition at line 210 of file CaloCalibClusterMomentsMaker2.h.

◆ m_doDeadEnergySharing

bool CaloCalibClusterMomentsMaker2::m_doDeadEnergySharing
private

Definition at line 202 of file CaloCalibClusterMomentsMaker2.h.

◆ m_doDeadL

bool CaloCalibClusterMomentsMaker2::m_doDeadL
private

Definition at line 206 of file CaloCalibClusterMomentsMaker2.h.

◆ m_doDeadM

bool CaloCalibClusterMomentsMaker2::m_doDeadM
private

Definition at line 207 of file CaloCalibClusterMomentsMaker2.h.

◆ m_doDeadT

bool CaloCalibClusterMomentsMaker2::m_doDeadT
private

Definition at line 208 of file CaloCalibClusterMomentsMaker2.h.

◆ m_doOutOfClusterL

bool CaloCalibClusterMomentsMaker2::m_doOutOfClusterL
private

Definition at line 203 of file CaloCalibClusterMomentsMaker2.h.

◆ m_doOutOfClusterM

bool CaloCalibClusterMomentsMaker2::m_doOutOfClusterM
private

Definition at line 204 of file CaloCalibClusterMomentsMaker2.h.

◆ m_doOutOfClusterT

bool CaloCalibClusterMomentsMaker2::m_doOutOfClusterT
private

Definition at line 205 of file CaloCalibClusterMomentsMaker2.h.

◆ m_energyMin

float CaloCalibClusterMomentsMaker2::m_energyMin
private

Definition at line 211 of file CaloCalibClusterMomentsMaker2.h.

◆ m_energyMinCalib

float CaloCalibClusterMomentsMaker2::m_energyMinCalib
private

Definition at line 212 of file CaloCalibClusterMomentsMaker2.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_foundAllContainers

std::atomic<bool> CaloCalibClusterMomentsMaker2::m_foundAllContainers {}
mutableprivate

Definition at line 197 of file CaloCalibClusterMomentsMaker2.h.

◆ m_i_phi_eta

std::array<std::vector<std::vector<CalibHitIPhiIEtaRange> >,3> CaloCalibClusterMomentsMaker2::m_i_phi_eta
private

Definition at line 195 of file CaloCalibClusterMomentsMaker2.h.

◆ m_MatchDmType

int CaloCalibClusterMomentsMaker2::m_MatchDmType
private

Definition at line 215 of file CaloCalibClusterMomentsMaker2.h.

◆ m_momentsAOD

std::set<xAOD::CaloCluster::MomentType> CaloCalibClusterMomentsMaker2::m_momentsAOD
private

set holding the list of moment enums which go in the first store i.e.

they are available on the AOD.

Only moments listed in this property can later be directly retrieved from AOD - the others are available in the ESD ...

Definition at line 160 of file CaloCalibClusterMomentsMaker2.h.

◆ m_momentsNames

std::vector<std::string> CaloCalibClusterMomentsMaker2::m_momentsNames
private

vector holding the input list of names of moments to calculate.

This is the list of desired names of moments given in the jobOptions.

Definition at line 125 of file CaloCalibClusterMomentsMaker2.h.

◆ m_momentsNamesAOD

std::vector<std::string> CaloCalibClusterMomentsMaker2::m_momentsNamesAOD
private

vector holding the list of moment names which go in the first store i.e.

they are available on the AOD.

Only moments listed in this property can later be directly retrieved from AOD - the others are available in the ESD ...

Definition at line 152 of file CaloCalibClusterMomentsMaker2.h.

◆ m_n_eta_out

int CaloCalibClusterMomentsMaker2::m_n_eta_out
private

Definition at line 189 of file CaloCalibClusterMomentsMaker2.h.

◆ m_n_phi_out

int CaloCalibClusterMomentsMaker2::m_n_phi_out
private

Definition at line 188 of file CaloCalibClusterMomentsMaker2.h.

◆ m_out_eta_max

double CaloCalibClusterMomentsMaker2::m_out_eta_max
private

Definition at line 191 of file CaloCalibClusterMomentsMaker2.h.

◆ m_out_phi_max

double CaloCalibClusterMomentsMaker2::m_out_phi_max
private

Definition at line 190 of file CaloCalibClusterMomentsMaker2.h.

◆ m_rmaxOut

double CaloCalibClusterMomentsMaker2::m_rmaxOut[3]
private

Definition at line 193 of file CaloCalibClusterMomentsMaker2.h.

◆ m_truthParticleContainerKey

SG::ReadHandleKey<xAOD::TruthParticleContainer> CaloCalibClusterMomentsMaker2::m_truthParticleContainerKey {this,"TruthParticles","TruthParticles","ReadHandleKey for truth particle container"}
private

ReadHandleKey for truth particle container.

Definition at line 177 of file CaloCalibClusterMomentsMaker2.h.

◆ m_useParticleID

bool CaloCalibClusterMomentsMaker2::m_useParticleID
private

Definition at line 209 of file CaloCalibClusterMomentsMaker2.h.

◆ m_validMoments

moment_name_set CaloCalibClusterMomentsMaker2::m_validMoments
private

set of moments which will be calculated.

This set will hold each valid enum indexed with the name if it was found on the input list (m_momentsNames) and in the list of valid moment names (m_validNames).

Definition at line 144 of file CaloCalibClusterMomentsMaker2.h.

◆ m_validNames

moment_name_vector CaloCalibClusterMomentsMaker2::m_validNames
private

vector holding the names of valid moments which can be calculated.

Each name has to correspond to one of the enums in CaloClusterMoment. This list is defined in the constructor of CaloCalibClusterMomentsMaker2 and holds the names and enums of moments defined in CaloClusterMoment. The name is used as the key to the enum.

Definition at line 136 of file CaloCalibClusterMomentsMaker2.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
CaloDmRegion::m_CaloSampleEtaMin
std::vector< float > m_CaloSampleEtaMin
Definition: CaloDmDescrManager.h:107
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
CaloCalibClusterMomentsMaker2::m_truthParticleContainerKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleContainerKey
ReadHandleKey for truth particle container.
Definition: CaloCalibClusterMomentsMaker2.h:177
CaloDmDescrArea::DMA_EMB3_TILE0
@ DMA_EMB3_TILE0
Definition: CaloDmDescrArea.h:28
beamspotman.r
def r
Definition: beamspotman.py:674
CaloCalibClusterMomentsMaker2::m_apars_r0
float m_apars_r0
Definition: CaloCalibClusterMomentsMaker2.h:214
CaloCalibrationHitContainer
Definition: CaloCalibrationHitContainer.h:25
CaloCalibClusterMomentsMaker2::m_caloDM_ID
const CaloDM_ID * m_caloDM_ID
Definition: CaloCalibClusterMomentsMaker2.h:184
xAOD::CaloCluster_v1::ENG_CALIB_DEAD_UNCLASS
@ ENG_CALIB_DEAD_UNCLASS
Attached Calibration Hit energy in dead material in unclassified areas of the detector.
Definition: CaloCluster_v1.h:249
CaloCalibClusterMomentsMaker2::kCalibFracHAD
@ kCalibFracHAD
Definition: CaloCalibClusterMomentsMaker2.h:200
CaloCalibClusterMomentsMaker2::execute
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloClusterContainer *theClusColl) const override
Execute on an entire collection of clusters.
Definition: CaloCalibClusterMomentsMaker2.cxx:277
xAOD::CaloCluster_v1::cell_begin
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version)
Definition: CaloCluster_v1.h:815
CaloCalibClusterMomentsMaker2::moment_name_pair
std::pair< std::string, xAOD::CaloCluster::MomentType > moment_name_pair
typedef for a pair to index the enums defined in CaloClusterMoment with a string.
Definition: CaloCalibClusterMomentsMaker2.h:100
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CaloCalibClusterMomentsMaker2::m_i_phi_eta
std::array< std::vector< std::vector< CalibHitIPhiIEtaRange > >, 3 > m_i_phi_eta
Definition: CaloCalibClusterMomentsMaker2.h:195
CaloDmDescrManager::get_element
CaloDmDescrElement * get_element(const Identifier &cellId) const
Definition: CaloDmDescrManager.cxx:107
CaloCalibClusterMomentsMaker2::m_momentsAOD
std::set< xAOD::CaloCluster::MomentType > m_momentsAOD
set holding the list of moment enums which go in the first store i.e.
Definition: CaloCalibClusterMomentsMaker2.h:160
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
CaloDmDescrArea::DMA_EMB1
@ DMA_EMB1
Definition: CaloDmDescrArea.h:26
xAOD::CaloCluster_v1::ENG_CALIB_DEAD_LEAKAGE
@ ENG_CALIB_DEAD_LEAKAGE
Attached Calibration Hit energy in dead material behind calorimeters.
Definition: CaloCluster_v1.h:246
CaloCalibClusterMomentsMaker2::m_rmaxOut
double m_rmaxOut[3]
Definition: CaloCalibClusterMomentsMaker2.h:193
CaloDetDescrElement
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:66
CaloClusterCollectionProcessor::execute
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloClusterContainer *collection) const =0
Execute on an entire collection of clusters.
xAOD::char
char
Definition: TrigDecision_v1.cxx:38
CaloDmDescrArea::DMA_SCN
@ DMA_SCN
Definition: CaloDmDescrArea.h:29
CaloDetDescrManager_Base::get_element
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
Definition: CaloDetDescrManager.cxx:159
HepMC::INVALID_PARTICLE_ID
constexpr int INVALID_PARTICLE_ID
Definition: MagicNumbers.h:57
CaloCalibClusterMomentsMaker2::m_calo_id
const CaloCell_ID * m_calo_id
Definition: CaloCalibClusterMomentsMaker2.h:182
skel.it
it
Definition: skel.GENtoEVGEN.py:407
M_PI
#define M_PI
Definition: ActiveFraction.h:11
xAOD::CaloCluster_v1::ENG_CALIB_TILEG3
@ ENG_CALIB_TILEG3
Calibration Hit energy inside the cluster scintillator.
Definition: CaloCluster_v1.h:225
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
CaloCalibClusterMomentsMaker2::m_energyMin
float m_energyMin
Definition: CaloCalibClusterMomentsMaker2.h:211
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
python.atlas_oh.im
im
Definition: atlas_oh.py:167
xAOD::CaloCluster_v1::insertMoment
void insertMoment(MomentType type, double value)
Definition: CaloCluster_v1.cxx:708
xAOD::CaloCluster_v1::ENG_CALIB_OUT_M
@ ENG_CALIB_OUT_M
Attached Calibration Hit energy outside clusters but inside the calorimeter with medium matching (Ang...
Definition: CaloCluster_v1.h:203
CaloCalibClusterMomentsMaker2::m_useParticleID
bool m_useParticleID
Definition: CaloCalibClusterMomentsMaker2.h:209
CaloCalibClusterMomentsMaker2::m_momentsNamesAOD
std::vector< std::string > m_momentsNamesAOD
vector holding the list of moment names which go in the first store i.e.
Definition: CaloCalibClusterMomentsMaker2.h:152
xAOD::CaloCluster_v1::ENG_CALIB_EMB0
@ ENG_CALIB_EMB0
Calibration Hit energy inside the cluster barrel presampler.
Definition: CaloCluster_v1.h:221
CaloCell_Base_ID::calo_sample
int calo_sample(const Identifier id) const
returns an int taken from Sampling enum and describing the subCalo to which the Id belongs.
Definition: CaloCell_Base_ID.cxx:141
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
CaloDmDescrArea::DMA_EME12
@ DMA_EME12
Definition: CaloDmDescrArea.h:33
isValid
bool isValid(const T &p)
Av: we implement here an ATLAS-sepcific convention: all particles which are 99xxxxx are fine.
Definition: AtlasPID.h:867
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
CaloCalibClusterMomentsMaker2::m_doOutOfClusterL
bool m_doOutOfClusterL
Definition: CaloCalibClusterMomentsMaker2.h:203
xAOD::CaloCluster_v1::ENG_CALIB_DEAD_TILE0
@ ENG_CALIB_DEAD_TILE0
Attached Calibration Hit energy in dead material between EMB3 and TILE0.
Definition: CaloCluster_v1.h:233
SG::ReadHandleKey< CaloCalibrationHitContainer >
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
x
#define x
CaloCell_ID_FCS::TileGap3
@ TileGap3
Definition: FastCaloSim_CaloCell_ID.h:36
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
CaloCalibClusterMomentsMaker2::m_apars_alpha
float m_apars_alpha
Definition: CaloCalibClusterMomentsMaker2.h:213
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
CaloDmDescrManager::get_dm_region
CaloDmRegion * get_dm_region(const Identifier &cellId) const
Definition: CaloDmDescrManager.cxx:159
AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
CaloDmDescrManager::instance
static const CaloDmDescrManager * instance()
Definition: CaloDmDescrManager.cxx:67
python.SystemOfUnits.MeV
float MeV
Definition: SystemOfUnits.py:172
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:190
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
CaloCalibClusterMomentsMaker2::m_energyMinCalib
float m_energyMinCalib
Definition: CaloCalibClusterMomentsMaker2.h:212
CaloDmDescrArea::DMA_LEAK
@ DMA_LEAK
Definition: CaloDmDescrArea.h:44
CaloDmDescrArea::DMA_EMB0
@ DMA_EMB0
Definition: CaloDmDescrArea.h:25
CaloCalibClusterMomentsMaker2::CellInfoSet_t
std::map< Identifier, MyCellInfo > CellInfoSet_t
Definition: CaloCalibClusterMomentsMaker2.h:64
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
CaloCalibClusterMomentsMaker2::m_MatchDmType
int m_MatchDmType
Definition: CaloCalibClusterMomentsMaker2.h:215
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:62
CaloCalibClusterMomentsMaker2::m_n_phi_out
int m_n_phi_out
Definition: CaloCalibClusterMomentsMaker2.h:188
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
CaloCalibClusterMomentsMaker2::m_DMCalibrationHitContainerNames
SG::ReadHandleKeyArray< CaloCalibrationHitContainer > m_DMCalibrationHitContainerNames
vector of dead material calibration hit container names to use.
Definition: CaloCalibClusterMomentsMaker2.h:174
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
CaloCalibClusterMomentsMaker2::kCalibFracEM
@ kCalibFracEM
Definition: CaloCalibClusterMomentsMaker2.h:200
CaloCalibClusterMomentsMaker2::ClusInfo_t
std::vector< MyClusInfo > ClusInfo_t
Definition: CaloCalibClusterMomentsMaker2.h:94
CaloCalibClusterMomentsMaker2::m_doOutOfClusterM
bool m_doOutOfClusterM
Definition: CaloCalibClusterMomentsMaker2.h:204
DataModel_detail::iterator
(Non-const) Iterator class for DataVector/DataList.
Definition: DVLIterator.h:184
CaloDmRegion
Definition: CaloDmDescrManager.h:79
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
lumiFormat.i
int i
Definition: lumiFormat.py:85
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
D3PDSizeSummary.ff
ff
Definition: D3PDSizeSummary.py:305
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
xAOD::CaloCluster_v1::ENG_CALIB_TOT
@ ENG_CALIB_TOT
Calibration Hit energy inside the cluster.
Definition: CaloCluster_v1.h:198
CaloCalibClusterMomentsMaker2::kMatchDmTight
@ kMatchDmTight
Definition: CaloCalibClusterMomentsMaker2.h:199
xAOD::CaloCluster_v1::ENG_CALIB_FRAC_EM
@ ENG_CALIB_FRAC_EM
Calibration Hit energy inside the cluster caused by e/gamma/pi0.
Definition: CaloCluster_v1.h:251
CaloCalibClusterMomentsMaker2::kCalibFracREST
@ kCalibFracREST
Definition: CaloCalibClusterMomentsMaker2.h:200
AtlasDetectorID::is_tile_dm
bool is_tile_dm(Identifier id) const
Definition: AtlasDetectorID.h:755
xAOD::CaloCluster_v1::ENG_CALIB_FRAC_REST
@ ENG_CALIB_FRAC_REST
Calibration Hit energy inside the cluster caused by other particles.
Definition: CaloCluster_v1.h:256
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:116
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:194
test_pyathena.parent
parent
Definition: test_pyathena.py:15
CaloCalibClusterMomentsMaker2::m_n_eta_out
int m_n_eta_out
Definition: CaloCalibClusterMomentsMaker2.h:189
xAOD::CaloCluster_v1::ENG_CALIB_DEAD_FCAL
@ ENG_CALIB_DEAD_FCAL
Attached Calibration Hit energy in dead material before FCAL, between FCAL and HEC.
Definition: CaloCluster_v1.h:244
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CaloDmDescrArea::DMA_FCAL0
@ DMA_FCAL0
Definition: CaloDmDescrArea.h:43
plotting.yearwise_luminosity_vs_mu.bins
bins
Definition: yearwise_luminosity_vs_mu.py:30
CaloCalibClusterMomentsMaker2::m_doDeadM
bool m_doDeadM
Definition: CaloCalibClusterMomentsMaker2.h:207
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
CaloDmDescrElement
Definition: CaloDmDescrManager.h:33
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
CaloDmDescrArea::DMA_HEC_FCAL
@ DMA_HEC_FCAL
Definition: CaloDmDescrArea.h:40
CaloDmRegion::m_CaloSampleEtaMax
std::vector< float > m_CaloSampleEtaMax
Definition: CaloDmDescrManager.h:108
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
CaloCalibClusterMomentsMaker2::m_doDeadEnergySharing
bool m_doDeadEnergySharing
Definition: CaloCalibClusterMomentsMaker2.h:202
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
HepMC::UNDEFINED_ID
constexpr int UNDEFINED_ID
Definition: MagicNumbers.h:56
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
CaloCalibClusterMomentsMaker2::m_caloDmDescrManager
const CaloDmDescrManager * m_caloDmDescrManager
Definition: CaloCalibClusterMomentsMaker2.h:186
CaloDmDescrArea::DMA_EME3_HEC0
@ DMA_EME3_HEC0
Definition: CaloDmDescrArea.h:37
CaloCalibClusterMomentsMaker2::m_CalibrationHitContainerNames
SG::ReadHandleKeyArray< CaloCalibrationHitContainer > m_CalibrationHitContainerNames
vector of calibration hit container names to use.
Definition: CaloCalibClusterMomentsMaker2.h:167
CaloCalibrationHit
Class to store calorimeter calibration hit.
Definition: CaloCalibrationHit.h:23
xAOD::CaloCluster_v1::ENG_CALIB_EME0
@ ENG_CALIB_EME0
Calibration Hit energy inside the cluster endcap presampler.
Definition: CaloCluster_v1.h:223
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
CaloDmDescrArea::DMA_EME0
@ DMA_EME0
Definition: CaloDmDescrArea.h:31
xAOD::CaloCluster_v1::ENG_CALIB_DEAD_HEC0
@ ENG_CALIB_DEAD_HEC0
Attached Calibration Hit energy in dead material between EME3 and HEC0.
Definition: CaloCluster_v1.h:241
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
CaloCalibClusterMomentsMaker2::m_doOutOfClusterT
bool m_doOutOfClusterT
Definition: CaloCalibClusterMomentsMaker2.h:205
CaloCell::ID
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Definition: CaloCell.h:289
CaloCalibClusterMomentsMaker2::m_foundAllContainers
std::atomic< bool > m_foundAllContainers
Definition: CaloCalibClusterMomentsMaker2.h:197
CaloCalibClusterMomentsMaker2::m_caloDetDescrMgrKey
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloDetDescrMgrKey
Conditions Handle Key to access the CaloDetDescrManager.
Definition: CaloCalibClusterMomentsMaker2.h:180
CaloCalibClusterMomentsMaker2::kMatchDmMedium
@ kMatchDmMedium
Definition: CaloCalibClusterMomentsMaker2.h:199
CaloCalibClusterMomentsMaker2::kMatchDmLoose
@ kMatchDmLoose
Definition: CaloCalibClusterMomentsMaker2.h:199
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
xAOD::CaloCluster_v1::ENG_CALIB_DEAD_TILEG3
@ ENG_CALIB_DEAD_TILEG3
Attached Calibration Hit energy in dead material before scintillator.
Definition: CaloCluster_v1.h:235
CaloCalibClusterMomentsMaker2::m_validNames
moment_name_vector m_validNames
vector holding the names of valid moments which can be calculated.
Definition: CaloCalibClusterMomentsMaker2.h:136
CaloCalibClusterMomentsMaker2::angle_mollier_factor
static double angle_mollier_factor(double x)
Definition: CaloCalibClusterMomentsMaker2.cxx:813
a
TList * a
Definition: liststreamerinfos.cxx:10
AtlasDetectorID::is_lar_dm
bool is_lar_dm(Identifier id) const
LAr/Tile dead material:
Definition: AtlasDetectorID.h:743
CaloCalibClusterMomentsMaker2::kCalibFracMax
@ kCalibFracMax
Definition: CaloCalibClusterMomentsMaker2.h:200
xAOD::CaloCluster_v1::ENG_CALIB_DEAD_TOT
@ ENG_CALIB_DEAD_TOT
Attached Calibration Hit energy in dead material.
Definition: CaloCluster_v1.h:227
h
python.CaloAddPedShiftConfig.int
int
Definition: CaloAddPedShiftConfig.py:45
CaloDetDescrManager
This class provides the client interface for accessing the detector description information common to...
Definition: CaloDetDescrManager.h:473
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloCalibClusterMomentsMaker2::m_doDeadT
bool m_doDeadT
Definition: CaloCalibClusterMomentsMaker2.h:208
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
DeMoScan.first
bool first
Definition: DeMoScan.py:534
CaloCalibClusterMomentsMaker2::m_out_phi_max
double m_out_phi_max
Definition: CaloCalibClusterMomentsMaker2.h:190
xAOD::CaloCluster_v1::cell_end
const_cell_iterator cell_end() const
Definition: CaloCluster_v1.h:816
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:629
CaloCalibClusterMomentsMaker2::m_out_eta_max
double m_out_eta_max
Definition: CaloCalibClusterMomentsMaker2.h:191
CaloCalibClusterMomentsMaker2::m_doDeadL
bool m_doDeadL
Definition: CaloCalibClusterMomentsMaker2.h:206
CaloDetDescrElement::eta
float eta() const
cell eta
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:344
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
CaloDetDescrElement::phi
float phi() const
cell phi
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:346
xAOD::CaloCluster_v1::ENG_CALIB_FRAC_HAD
@ ENG_CALIB_FRAC_HAD
Calibration Hit energy inside the cluster caused by charged pi+ and pi-.
Definition: CaloCluster_v1.h:254
xAOD::CaloCluster_v1::ENG_CALIB_OUT_L
@ ENG_CALIB_OUT_L
Attached Calibration Hit energy outside clusters but inside the calorimeter with loose matching (Angl...
Definition: CaloCluster_v1.h:199
xAOD::CaloCluster_v1::ENG_CALIB_DEAD_EME0
@ ENG_CALIB_DEAD_EME0
Attached Calibration Hit energy in dead material before EME0, between EME0 and EME1.
Definition: CaloCluster_v1.h:238
xAOD::CaloCluster_v1::ENG_CALIB_OUT_T
@ ENG_CALIB_OUT_T
Attached Calibration Hit energy outside clusters but inside the calorimeter with tight matching (Angl...
Definition: CaloCluster_v1.h:207
CaloCalibClusterMomentsMaker2::m_momentsNames
std::vector< std::string > m_momentsNames
vector holding the input list of names of moments to calculate.
Definition: CaloCalibClusterMomentsMaker2.h:125
python.IoTestsLib.w
def w
Definition: IoTestsLib.py:198
CaloCalibClusterMomentsMaker2::m_doCalibFrac
bool m_doCalibFrac
Definition: CaloCalibClusterMomentsMaker2.h:210
pow
constexpr int pow(int base, int exp) noexcept
Definition: ap_fixedTest.cxx:15
CaloDmDescrArea::DMA_ALL
@ DMA_ALL
Definition: CaloDmDescrArea.h:24
Amg::distance
float distance(const Amg::Vector3D &p1, const Amg::Vector3D &p2)
calculates the distance between two point in 3D space
Definition: GeoPrimitivesHelpers.h:54
CaloCalibClusterMomentsMaker2::m_validMoments
moment_name_set m_validMoments
set of moments which will be calculated.
Definition: CaloCalibClusterMomentsMaker2.h:144
CaloDmRegion::m_CaloSampleNeighbours
std::vector< short > m_CaloSampleNeighbours
Definition: CaloDmDescrManager.h:106
python.ParticleTypeUtil.info
def info
Definition: ParticleTypeUtil.py:87
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
xAOD::CaloCluster_v1::ENG_CALIB_DEAD_EMB0
@ ENG_CALIB_DEAD_EMB0
Attached Calibration Hit energy in dead material before EMB0, between EMB0 and EMB1.
Definition: CaloCluster_v1.h:230
fitman.k
k
Definition: fitman.py:528
CaloDmDescrManager::get_dm_area
int get_dm_area(const Identifier &cellId) const
Definition: CaloDmDescrManager.cxx:147
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
CaloCalibClusterMomentsMaker2::kMatchDmOff
@ kMatchDmOff
Definition: CaloCalibClusterMomentsMaker2.h:199
Identifier
Definition: IdentifierFieldParser.cxx:14