ATLAS Offline Software
Classes | Public Types | Public Member Functions | Static 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 > &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
 
virtual StatusCode execute (xAOD::CaloClusterContainer *collection) final
 Execute on an entire collection of clusters. More...
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 Standard Gaudi interface ID method. 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 > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &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 53 of file CaloCalibClusterMomentsMaker2.cxx.

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

Member Function Documentation

◆ angle_mollier_factor()

double CaloCalibClusterMomentsMaker2::angle_mollier_factor ( double  x)
staticprivate

Definition at line 811 of file CaloCalibClusterMomentsMaker2.cxx.

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

◆ declareGaudiProperty() [1/4]

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

◆ 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 > &  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 275 of file CaloCalibClusterMomentsMaker2.cxx.

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

◆ 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 49 of file CaloClusterCollectionProcessor.h.

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

◆ execute() [4/4]

virtual StatusCode CaloClusterCollectionProcessor::execute
inlinefinal

Execute on an entire collection of clusters.

Parameters
collectionThe container of clusters. (deprecated)

Definition at line 49 of file CaloClusterCollectionProcessor.h.

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

◆ 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 145 of file CaloCalibClusterMomentsMaker2.cxx.

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

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

◆ interfaceID()

static const InterfaceID& CaloClusterCollectionProcessor::interfaceID ( )
inlinestaticinherited

Standard Gaudi interface ID method.

Definition at line 58 of file CaloClusterCollectionProcessor.h.

58 {return IID_CaloClusterCollectionProcessor;}

◆ 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:
grepfile.info
info
Definition: grepfile.py:38
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:676
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:246
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:275
xAOD::CaloCluster_v1::cell_begin
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version)
Definition: CaloCluster_v1.h:812
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
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
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:70
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
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:243
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
python.SystemOfUnits.MeV
int MeV
Definition: SystemOfUnits.py:154
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:396
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:222
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:754
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:200
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:218
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:620
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:230
SG::ReadHandleKey< CaloCalibrationHitContainer >
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
x
#define x
CaloCell_ID_FCS::TileGap3
@ TileGap3
Definition: FastCaloSim_CaloCell_ID.h:36
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
dqt_zlumi_pandas.weight
int weight
Definition: dqt_zlumi_pandas.py:189
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
CaloCalibClusterMomentsMaker2::m_MatchDmType
int m_MatchDmType
Definition: CaloCalibClusterMomentsMaker2.h:215
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:59
CaloCalibClusterMomentsMaker2::m_n_phi_out
int m_n_phi_out
Definition: CaloCalibClusterMomentsMaker2.h:188
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
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
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
xAOD::CaloCluster_v1::ENG_CALIB_TOT
@ ENG_CALIB_TOT
Calibration Hit energy inside the cluster.
Definition: CaloCluster_v1.h:195
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:248
CaloCalibClusterMomentsMaker2::kCalibFracREST
@ kCalibFracREST
Definition: CaloCalibClusterMomentsMaker2.h:200
AtlasDetectorID::is_tile_dm
bool is_tile_dm(Identifier id) const
Definition: AtlasDetectorID.h:748
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:253
HepMC::uniqueID
int uniqueID(const T &p)
Definition: MagicNumbers.h:116
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
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:241
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:220
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
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:238
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:279
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:18
xAOD::CaloCluster_v1::ENG_CALIB_DEAD_TILEG3
@ ENG_CALIB_DEAD_TILEG3
Attached Calibration Hit energy in dead material before scintillator.
Definition: CaloCluster_v1.h:232
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:811
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:736
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:224
h
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
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DeMoScan.first
bool first
Definition: DeMoScan.py:536
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:813
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:623
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:798
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:251
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:196
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:235
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:204
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:200
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
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
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:227
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