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

dead material correction tool for local hadronic calibration More...

#include <CaloLCDeadMaterialTool.h>

Inheritance diagram for CaloLCDeadMaterialTool:
Collaboration diagram for CaloLCDeadMaterialTool:

Classes

struct  Area
 
struct  Cell
 

Public Types

enum  dm_area_keys {
  sDM_EMB0_EMB1, sDM_EMB3_TILE0, sDM_SCN, sDM_EME0_EME12,
  sDM_EME3_HEC0, sDM_FCAL, sDM_LEAKAGE, sDM_UNCLASS,
  sDM
}
 Dead Material area number. More...
 

Public Member Functions

virtual ~CaloLCDeadMaterialTool () override
 
virtual StatusCode weight (xAOD::CaloCluster *theCluster, const EventContext &ctx) const override
 method to weight the cells in a cluster More...
 
virtual StatusCode initialize () override
 
 CaloLCDeadMaterialTool (const std::string &type, const std::string &name, const IInterface *parent)
 
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
 

Static Public Member Functions

static const InterfaceID & interfaceID ()
 

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

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode prepare_for_cluster (const xAOD::CaloCluster *theCluster, std::vector< Area > &areas, std::vector< Cell > &cells, float *smp_energy, float &cls_unweighted_energy, const CaloLocalHadCoeff *data) const
 
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...
 

Private Attributes

SG::ReadCondHandleKey< CaloLocalHadCoeffm_key
 name of the key for DM cell weights More...
 
int m_recoStatus
 Required Reco Status for the clusters in order to be calibrated. More...
 
int m_weightModeDM
 method of assignment of DM energy to cluster More...
 
float m_MinClusterEnergyToDeal
 Minimum energy of clusters to apply correction. More...
 
int m_MinLookupBinNentry
 minimum number of events in one lookup bin to use More...
 
float m_MinCellEnergyToDeal
 minimum cell energy to deal More...
 
float m_MaxChangeInCellWeight
 maximum allowed change in cell weights More...
 
bool m_useHadProbability
 calculate DM energy using em-probability moment More...
 
bool m_interpolate
 interpolate correction coefficients More...
 
bool m_updateSamplingVars
 update also sampling variables More...
 
std::map< std::string, std::vector< std::string > > m_interpolateDimensionNames
 vector of names of dimensions to interpolate (for different correction types different set of dimensions) More...
 
std::vector< int > m_interpolateDimensionsFit
 actual set of dimension id's to interpolate (in the DM areas corrected with TProfile approach) More...
 
std::vector< int > m_interpolateDimensionsLookup
 actual set of dimension id's to interpolate (in the DM areas corrected with lookup approach) More...
 
std::vector< int > m_interpolateDimensionsSampling
 actual set of dimension id's to interpolate (in the DM areas corrected with sampling weight approach) More...
 
bool m_absOpt
 In Abs Option case, DM calculation has to be handled in a slightly different way. More...
 
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

dead material correction tool for local hadronic calibration

Author
Gennady Pospelov guenn.nosp@m.adi..nosp@m.pospe.nosp@m.lov@.nosp@m.cern..nosp@m.ch
Date
09-September-2009 Calculates dead material energy of given cluster. Cluster energy, lambda and eta are used to get appropriate set of DM correction coefficients for appropriate dead material area ( dead material area definition and set of correction coefficients are holded by CaloHadDMCoeff2 class). DM coefficients are applied to cluster cells sums to calculate DM energy in different calorimeter areas. Finally, calculated DM energy is added to the cluster by changing (increasing) cluster cells weights in appropriate samplings.

Definition at line 39 of file CaloLCDeadMaterialTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ dm_area_keys

Dead Material area number.

These keys are used to identify specific dead material areas in the calorimeter where procedure of DM correction will be applied

Enumerator
sDM_EMB0_EMB1 
sDM_EMB3_TILE0 
sDM_SCN 
sDM_EME0_EME12 
sDM_EME3_HEC0 
sDM_FCAL 
sDM_LEAKAGE 
sDM_UNCLASS 
sDM 

Definition at line 47 of file CaloLCDeadMaterialTool.h.

48  {
49  sDM_EMB0_EMB1, // 0 before PreSamplerB, between PreSamplerB and EMB1
50  sDM_EMB3_TILE0, // 1 between barrel and tile
51  sDM_SCN, // 2 before TileGap3 (scintillator)
52  sDM_EME0_EME12, // 3 before PreSamplerE, between PreSamplerE and EME1
53  sDM_EME3_HEC0, // 4 between EME3 and HEC0
54  sDM_FCAL, // 5 between HEC and FCAL, before FCAL
55  sDM_LEAKAGE, // 6 leakage behind calorimeter
56  sDM_UNCLASS, // 7 unclassified DM enegry
57  sDM
58  };

Constructor & Destructor Documentation

◆ ~CaloLCDeadMaterialTool()

CaloLCDeadMaterialTool::~CaloLCDeadMaterialTool ( )
overridevirtualdefault

◆ CaloLCDeadMaterialTool()

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

Definition at line 32 of file CaloLCDeadMaterialTool.cxx.

36  m_key("HadDMCoeff2"),
38  m_weightModeDM(1),
43  m_useHadProbability(false),
44  m_interpolate(false),
45  m_absOpt(false)
46 {
47  declareInterface<IClusterCellWeightTool>(this);
48  declareProperty("HadDMCoeffKey",m_key);
49  declareProperty("ClusterRecoStatus",m_recoStatus);
50  declareProperty("WeightModeDM",m_weightModeDM) ;
51  declareProperty("MinClusterEnergyToDeal", m_MinClusterEnergyToDeal);
52  declareProperty("MinLookupBinNentry", m_MinLookupBinNentry);
53  declareProperty("MinCellEnergyToDeal", m_MinCellEnergyToDeal);
54  declareProperty("MaxChangeInCellWeight", m_MaxChangeInCellWeight);
55  declareProperty("UseHadProbability",m_useHadProbability);
56  // Use Interpolation or not
57  declareProperty("Interpolate",m_interpolate);
58  // list of dimensions to interpolate trought in 3 different type of areas
59  std::vector<std::string > vstr;
60  vstr.resize(2);
61  vstr[0] = "DIMD_ETA";
62  vstr[1] = "DIMD_ENER";
63  m_interpolateDimensionNames[std::string("AREA_DMFIT")] = vstr;
64  vstr.resize(3);
65  vstr[0] = "DIMD_ETA";
66  vstr[1] = "DIMD_ENER";
67  vstr[2] = "DIMD_LAMBDA";
68  m_interpolateDimensionNames[std::string("AREA_DMLOOKUP")] = vstr;
69  vstr.resize(2);
70  vstr[0] = "DIMD_ETA";
71  vstr[1] = "DIMD_LAMBDA";
72  m_interpolateDimensionNames[std::string("AREA_DMSMPW")] = vstr;
73  declareProperty("InterpolateDimensionNames", m_interpolateDimensionNames);
74  declareProperty("UpdateSamplingVars",m_updateSamplingVars=false);
75  //Use weighting of negative clusters?
76  declareProperty("WeightingOfNegClusters",m_absOpt);
77 }

Member Function Documentation

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

◆ 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 CaloLCDeadMaterialTool::initialize ( )
overridevirtual

Definition at line 90 of file CaloLCDeadMaterialTool.cxx.

91 {
92  if(m_interpolate) {
93  msg(MSG::INFO) << "Interpolation is ON, dimensions: ";
94  for(std::map<std::string, std::vector<std::string> >::iterator it=m_interpolateDimensionNames.begin(); it!=m_interpolateDimensionNames.end(); ++it){
95  msg(MSG::INFO) << " " << (*it).first << " (";
96  for(std::vector<std::string >::iterator it2 = (*it).second.begin(); it2!=(*it).second.end(); ++it2) {
97  msg() << (*it2) << " ";
98  }
99  msg() << ")";
100  }
101  msg() << endmsg;
102  for(std::map<std::string, std::vector<std::string> >::iterator it=m_interpolateDimensionNames.begin(); it!=m_interpolateDimensionNames.end(); ++it){
103  std::vector<int > *vtmp=nullptr;
104  if((*it).first == "AREA_DMFIT") {
106  }else if((*it).first == "AREA_DMLOOKUP") {
108  }else if((*it).first == "AREA_DMSMPW") {
110  }else{
111  msg(MSG::WARNING) << "Unkown dead material area type '" << (*it).first << "'" << std::endl;
112  continue;
113  }
114  for(std::vector<std::string >::iterator it2 = (*it).second.begin(); it2!=(*it).second.end(); ++it2) {
117  vtmp->push_back(int(id));
118  }else{
119  ATH_MSG_WARNING( "Dimension '" << (*it2) << "' is invalid and will be excluded." );
120  }
121  }
122  }
123  } // m_interpolate
124 
125  ATH_MSG_INFO( "Initializing " << name() );
126 
127 
129 
130  return StatusCode::SUCCESS;
131 }

◆ 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& IClusterCellWeightTool::interfaceID ( )
inlinestaticinherited

Definition at line 28 of file IClusterCellWeightTool.h.

28  {
29  static const InterfaceID IID_IClusterCellWeightTool("IClusterCellWeightTool", 1 , 0);
30  return IID_IClusterCellWeightTool;
31  }

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

◆ prepare_for_cluster()

StatusCode CaloLCDeadMaterialTool::prepare_for_cluster ( const xAOD::CaloCluster theCluster,
std::vector< Area > &  areas,
std::vector< Cell > &  cells,
float *  smp_energy,
float &  cls_unweighted_energy,
const CaloLocalHadCoeff data 
) const
private

Definition at line 531 of file CaloLCDeadMaterialTool.cxx.

537 {
538  areas.resize(data->getSizeAreaSet());
539  cells.reserve (theCluster->size());
540 
541  bzero(smp_energy, CaloSampling::Unknown*sizeof(float));
542 
543  // Finding of energy and noise in different "areas" of cluster. Some of these
544  // areas correspond to CaloSamplings, others are special.
545  CaloCluster::const_cell_iterator itrCell = theCluster->cell_begin();
546  CaloCluster::const_cell_iterator itrCellEnd = theCluster->cell_end();
547  cls_unweighted_energy = 0;
548  for (;itrCell!=itrCellEnd; ++itrCell) {
549  CxxUtils::prefetchNext(itrCell, itrCellEnd);
550  const CaloCell* thisCell = *itrCell;
551  //Identifier id = thisCell->ID();
552  CaloSampling::CaloSample nsmp=thisCell->caloDDE()->getSampling();
553  //CaloSampling::CaloSample nsmp = CaloSampling::CaloSample(m_calo_id->calo_sample(id));
554 
555  float energy = thisCell->e();
556  float weight = itrCell.weight();
557  cls_unweighted_energy += energy;
558 
559  Cell cell{};
560  cell.weight = weight;
561  cell.energy = energy;
562  cell.dm = sDM;
563 
564  smp_energy[nsmp] += energy; // unweighted energy in samplings for given cluster
565 
567 
568  if ( nsmp == CaloSampling::PreSamplerB || nsmp == CaloSampling::EMB1) {
569  cell.dm = sDM_EMB0_EMB1;
570 
571  } else if( nsmp == CaloSampling::TileGap3 ) {
572  cell.dm = sDM_SCN;
573 
574  } else if ( nsmp == CaloSampling::PreSamplerE || nsmp == CaloSampling::EME1 ) {
575  cell.dm = sDM_EME0_EME12;
576 
577  } else if (nsmp == CaloSampling::EME3) {
578  cell.dm = sDM_EME3_HEC0;
579 
580  } else if (nsmp == CaloSampling::HEC0) {
581  cell.dm = sDM_EME3_HEC0;
582 
583  } else if (nsmp == CaloSampling::EMB3) {
584  cell.dm = sDM_EMB3_TILE0;
585 
586  } else if (nsmp == CaloSampling::TileBar0) {
587  cell.dm = sDM_EMB3_TILE0;
588  }
589 
590  } // cell_ener > cell_min_energy
591  cells.push_back (cell);
592  } // itrCell
593 
594 // Realculate sampling energy as the abs value of the original cluster, if you summed up energies, fluctuations wouldn't cancel and sample energy would be huge
595  if(m_absOpt){
596 
597  for(unsigned int i=0; i != CaloSampling::Unknown; ++ i) smp_energy[i] = fabs(theCluster->eSample((CaloSampling::CaloSample)i));
598 
599  }
600 
601 
602  // calculation of 'signal' which will be used for DM energy estimation
603  float x(0), y(0);
604 
605  // sDM_EMB0_EMB1: energy before EMB0 and between EMB0 and EMB1
606  x = smp_energy[CaloSampling::PreSamplerB];
607  if ( x > 0.) {
608  areas[sDM_EMB0_EMB1].eprep = x;
609  areas[sDM_EMB0_EMB1].edm_wrong = x;
610  }
611 
612  // sDM_EMB3_TILE0: to correct energy between barrel and tile
613  x = smp_energy[CaloSampling::EMB3];
614  y = smp_energy[CaloSampling::TileBar0];
615  if ( x > 0. && y>0.) areas[sDM_EMB3_TILE0].eprep = sqrt(x*y);
616 
617  // sDM_SCN: to correct energy before scintillator
618  x = smp_energy[CaloSampling::TileGap3];
619  if ( x > 0.) {
620  areas[sDM_SCN].eprep = x;
621  areas[sDM_SCN].edm_wrong = x;
622  }
623 
624  // sDM_EME0_EME12: sum of energy before EME0 and between EME0 and EME1
625  x = smp_energy[CaloSampling::PreSamplerE];
626  if ( x > 0.) {
627  areas[sDM_EME0_EME12].eprep = x;
628  areas[sDM_EME0_EME12].edm_wrong = x;
629  }
630 
631  // sDM_EME3_HEC0: to correct energy between EMEC and HEC
632  x = smp_energy[CaloSampling::EME3];
633  y = smp_energy[CaloSampling::HEC0];
634  if ( x > 0. && y>0.) areas[sDM_EME3_HEC0].eprep = sqrt(x*y);
635 
636  areas[sDM_FCAL].eprep = cls_unweighted_energy;
637  areas[sDM_LEAKAGE].eprep = cls_unweighted_energy;
638  areas[sDM_UNCLASS].eprep = cls_unweighted_energy;
639 
640  return StatusCode::SUCCESS;
641 }

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

◆ weight()

StatusCode CaloLCDeadMaterialTool::weight ( xAOD::CaloCluster thisCluster,
const EventContext &  ctx 
) const
overridevirtual

method to weight the cells in a cluster

Parameters
theClusterthe pointer to the CaloCluster to be weighted

this method is purely virtual because every derived class needs to implement it.

Implements IClusterCellWeightTool.

Definition at line 138 of file CaloLCDeadMaterialTool.cxx.

139 {
142 
143  float wrong_dm_energy = 0.0;
144  float dm_total = 0.0;
145 
146 
147  double weightMom (1);
148  if (!theCluster->retrieveMoment(CaloCluster::DM_WEIGHT,weightMom)) {
149  ATH_MSG_WARNING ("Cannot find cluster moment DM_WEIGHT");
150  }
151  /* WTF?? re-setting the same moment??
152  theCluster->insertMoment(CaloClusterMoment::DM_WEIGHT,CaloClusterMoment(new_weight),true);
153  */
154 
155  double eWeighted = theCluster->e();
156 
157 // // check desired reco status
158 // float cls_em_fraction = 0.0;
159 // if ( theCluster->checkRecoStatus(CaloRecoStatus::TAGGEDHAD)) {
160 // cls_em_fraction = 0.25;
161 // } else if( theCluster->checkRecoStatus(CaloRecoStatus::TAGGEDEM)) {
162 // cls_em_fraction = 0.99;
163 // }else {
164 // log << MSG::DEBUG<<"Cluster was not selected for local DM calibration. Cluster reco status differs from TAGGEDHAD or TAGGEDEM."
165 // << " Cluster energy " << theCluster->e() << " remains the same." << endmsg;
166 // #ifdef MAKE_MOMENTS
167 // set_zero_moments(theCluster);
168 // #endif
169 // return StatusCode::SUCCESS;
170 // }
171 
172  if ( theCluster->e() <= m_MinClusterEnergyToDeal) {
173  ATH_MSG_DEBUG("Cluster was not selected for local DM calibration, ecls < m_MinClusterEnergyToDeal (=" <<m_MinClusterEnergyToDeal << ").");
174 #ifdef MAKE_MOMENTS
175  set_zero_moments(theCluster);
176 #endif
177  return StatusCode::SUCCESS;
178  }
179 
180  double pi0Prob = 0;
181  if ( m_useHadProbability) {
182  if (!theCluster->retrieveMoment(CaloCluster::EM_PROBABILITY,pi0Prob)) {
183  ATH_MSG_ERROR("Cannot retrieve EM_PROBABILITY cluster moment, "
184  << " cluster energy " << theCluster->e() << " remains the same." );
185  return StatusCode::FAILURE;
186  }
187  if ( pi0Prob < 0 ) {
188  pi0Prob = 0;
189  } else if ( pi0Prob > 1 ) {
190  pi0Prob = 1;
191  }
192  } else if (theCluster->recoStatus().checkStatus(CaloRecoStatus::TAGGEDEM)) {
193  pi0Prob = 1;
194  }
195 
196  double center_lambda = 0;
197  if ( !theCluster->retrieveMoment(CaloCluster::CENTER_LAMBDA, center_lambda) ){
198  ATH_MSG_ERROR("Cannot retrieve CENTER_LAMBDA cluster moment, "
199  << " cluster energy " << theCluster->e() << " remains the same." );
200  return StatusCode::FAILURE;
201  }
202 
203  const CaloLocalHadCoeff* data(nullptr);
205  data = *rch;
206  if(data==nullptr) {
207  ATH_MSG_ERROR("Unable to access conditions object");
208  return StatusCode::FAILURE;
209  }
210 
211  ATH_MSG_DEBUG("Cluster is selected for local DM calibration."
212  << " Old cluster energy:" << theCluster->e()
213  << " m_weightModeDM:" << m_weightModeDM);
214 
215  // calculation of specific cluster quantities for DM correction (i.e. core of procedure)
216  std::vector<Area> areas;
217  std::vector<Cell> cells;
218  float smp_energy[CaloSampling::Unknown];
219  float cls_unweighted_energy = 0;
220  StatusCode sc = prepare_for_cluster(theCluster, areas, cells,
221  smp_energy, cls_unweighted_energy, data);
222  if ( !sc.isSuccess() ) {
223 #ifdef MAKE_MOMENTS
224  set_zero_moments(theCluster);
225 #endif
226  ATH_MSG_ERROR( "prepare for cluster failed!" );
227  return sc;
228  }
229 
230  float cls_initial_energy = theCluster->e();
231  float cls_side = (theCluster->eta()<0?-1.0:1.0);
232  float cls_eta = fabs(theCluster->eta());
233  float cls_phi = theCluster->phi();
234  float log10ener = 0.0;
235  if(cls_unweighted_energy > 0.0) {
236  log10ener = log10(cls_unweighted_energy);
237  }
238  float log10lambda;
239  if(center_lambda > 0.0) {
240  log10lambda = log10(center_lambda);
241  if(log10lambda >=4.0) log10lambda = 3.9999;
242  }else{
243  log10lambda = 0.0;
244  }
245 #ifdef DEBUG_DMTHINGS
246  std::cout << " cls_initial_energy: " << cls_initial_energy << " cls_eta: " << cls_eta << std::endl;
247  std::cout << " log10ener: " << log10ener << " log10lambda: " << log10lambda << std::endl;
248  for(int i_smp=0; i_smp<CaloSampling::Unknown; i_smp++){
249  std::cout << " i_smp: " << i_smp << " smp_energy: " << smp_energy[i_smp] << std::endl;
250  }
251 #endif
252 
253  std::vector<float > vars;
254  vars.resize(6, 0.0);
255  vars[CaloLocalHadDefs::DIMD_EMFRAC] = pi0Prob;
256  vars[CaloLocalHadDefs::DIMD_SIDE] = cls_side;
257  vars[CaloLocalHadDefs::DIMD_ETA] = cls_eta;
258  vars[CaloLocalHadDefs::DIMD_PHI] = cls_phi;
259  vars[CaloLocalHadDefs::DIMD_ENER] = log10ener;
260  vars[CaloLocalHadDefs::DIMD_LAMBDA] = log10lambda;
261 
262  size_t n_dm = data->getSizeAreaSet();
263 
264  // loop over HAD/EM possibilities for mixing different correction types
265  for(int i_mix=0; i_mix<2; i_mix++){ // 0 - pure HAD case, 1-pure EM case
266  float mixWeight = (i_mix==0?(1-pi0Prob):pi0Prob);
267  if(mixWeight == 0) continue;
268 
269  vars[CaloLocalHadDefs::DIMD_EMFRAC] = float(i_mix);
270 
271  // loop over DM areas defined and calculation of cluster DM energy deposited in these areas
272  for(size_t i_dm=0; i_dm < n_dm; i_dm++){
273  if(areas[i_dm].eprep <= 0.0) continue; // no appropriate signal to reconstruct dm energy in this area
274 
275  const CaloLocalHadCoeff::LocalHadArea *area = data->getArea(i_dm);
276  float emax = area->getDimension(CaloLocalHadDefs::DIMD_ENER)->getXmax();
277  if(log10ener > emax) log10ener = emax - 0.0001;
278  vars[CaloLocalHadDefs::DIMD_ENER] = log10ener;
279 
280  const CaloLocalHadCoeff::LocalHadCoeff *pars = data->getCoeff(i_dm, vars);
281  if( !pars ) continue;
282 
283  float edm = 0.0;
284  // if dm area is reconstructed using polynom fit approach
285  if(area->getType() == CaloLocalHadDefs::AREA_DMFIT) {
286  edm = (*pars)[CaloLocalHadDefs::BIN_P0] + (*pars)[CaloLocalHadDefs::BIN_P1]*areas[i_dm].eprep;
287  if(m_interpolate) {
288  bool isa = CaloLCCoeffHelper::Interpolate(data, i_dm, vars, parint, m_interpolateDimensionsFit, areas[i_dm].eprep);
289  // calculation of fitted values is done already in the interpolator
290  if(isa) edm = parint[CaloLocalHadDefs::BIN_P0];
291  }
292 
293  // if dm area is reconstructed using lookup table approach
294  }else if(area->getType() == CaloLocalHadDefs::AREA_DMLOOKUP){
295  if( (*pars)[CaloLocalHadDefs::BIN_ENTRIES] > m_MinLookupBinNentry) edm = cls_unweighted_energy*((*pars)[CaloLocalHadDefs::BIN_WEIGHT] - 1.0 );
296  if(m_interpolate) {
297  bool isa = CaloLCCoeffHelper::Interpolate(data, i_dm, vars, parint, m_interpolateDimensionsLookup);
298  if(isa && parint[CaloLocalHadDefs::BIN_ENTRIES] > m_MinLookupBinNentry) edm = cls_unweighted_energy*(parint[CaloLocalHadDefs::BIN_WEIGHT] - 1.0 );
299  }
300 
301  // if dm area is reconstructed using new sampling weights
302  }else if(area->getType() == CaloLocalHadDefs::AREA_DMSMPW){
303  const int nSmp=pars->size()-1;
304  //std::cout << "size=" << nSmp << ", unkown value=" << CaloSampling::Unknown << ", minifcal=" << CaloSampling::MINIFCAL0 << std::endl;
305  double ecalonew = 0.0;
306  double ecaloold = 0.0;
307  for(int i_smp=0; i_smp<nSmp; i_smp++){
308  ecaloold += smp_energy[i_smp];
309  ecalonew += smp_energy[i_smp] * (*pars)[i_smp];
310  }
311  ecalonew += (*pars)[nSmp]; // const Used to be CaloSampling::Unknown but the value of this enum has changed to include the miniFCAL.
312  edm = ecalonew - ecaloold;
313 
314 // if(m_interpolate) {
315 // bool isa = hp.Interpolate(data, i_dm, vars, parint, m_interpolateDimensionsSampling);
316 // if(isa) {
317 // ecalonew = 0.0;
318 // ecaloold = 0.0;
319 // for(int i_smp=0; i_smp<CaloSampling::Unknown; i_smp++){
320 // ecaloold += smp_energy[i_smp];
321 // ecalonew += smp_energy[i_smp] * parint[i_smp];
322 // }
323 // ecalonew += parint[CaloSampling::Unknown]; // const
324 // edm = ecalonew - ecaloold;
325 // }
326 // }
327 
328  } else{
329  std::cout << "CaloLCDeadMaterialTool -> Error! Unknown correction type " << area->getType()
330  << " with number of parameters " << area->getNpars() << std::endl;
331  }
332  wrong_dm_energy += areas[i_dm].edm_wrong;
333 
334 #ifdef DEBUG_DMTHINGS
335  std::cout << " result> edm: " << edm << " edm_wrong:" << edm_wrong << std::endl;
336 #endif
337  edm -= areas[i_dm].edm_wrong;
338  if(edm > 0.0) {
339  areas[i_dm].erec = areas[i_dm].erec + edm*mixWeight;
340  dm_total += edm;
341  }
342  } // i_dm
343  } // i_mix
344 
345  // giving of calculated DM energy to cluster by one of 3 methods
346  // m_weightModeDM=0 - simple setting of cluster energy to new value
347  // m_weightModeDM=1 - changing (increasing) of weights of cluster cells
348  // m_weightModeDM=2 - changing (increasing) of weights of cluster cells (which were invloved into DM calculation)
349 
350 #ifdef DEBUG_DMTHINGS
351  std::cout << "wc> calculation of weights" << std::endl;
352 #endif
353 
354  if(dm_total > 0.0) {
355  if (m_weightModeDM == 0) {
356  // method 0: setting cluster energy to new value without changing of cells weights
357  theCluster->setE(cls_initial_energy + dm_total - wrong_dm_energy);
358 
359  } else if (m_weightModeDM == 1) {
360  // method1: calculation of weights of all cluster cells to treat DM energy.
361  // Weights of all cluster cells will be changed proportionally
362  float sub_ener_old = 0.0;
363  for(size_t i_c = 0; i_c < cells.size(); i_c++)
364  {
365  const Cell& cell = cells[i_c];
366  if (cell.energy <= m_MinCellEnergyToDeal) continue;
367  sub_ener_old += cell.weight*cell.energy;
368  }
369  if(sub_ener_old > 0.0) {
370  float corr = (sub_ener_old + dm_total)/sub_ener_old;
371  for(size_t i_c = 0; i_c < cells.size(); i_c++)
372  {
373  if(cells[i_c].energy <= m_MinCellEnergyToDeal) continue;
374  cells[i_c].weight *= corr;
375  }
376  }
377 
378  } else if (m_weightModeDM == 2) {
379  // method2: calculation of weights of all cluster cells to treat DM energy.
380  // only weights for cells involved into DM calculation will be changed
381 
382  for (size_t cell_index = 0; cell_index < cells.size(); ++cell_index)
383  {
384  const Cell& cell = cells[cell_index];
385  if (cell.energy <= m_MinCellEnergyToDeal) continue;
386  float we = cell.weight * cell.energy;
387  if (cell.dm != sDM)
388  areas[cell.dm].sub_ener_old += we;
389  areas[sDM_FCAL].sub_ener_old += we;
390  areas[sDM_LEAKAGE].sub_ener_old += we;
391  areas[sDM_UNCLASS].sub_ener_old += we;
392  }
393 
394  for(size_t i_dm=0; i_dm < areas.size(); i_dm++) {
395  Area& dma = areas[i_dm];
396  float corrfac = 1;
397  if (i_dm >= n_dm || dma.eprep <= 0)
398  corrfac = 1;
399  else if (dma.sub_ener_old > 0)
400  corrfac = (dma.sub_ener_old + dma.erec) / dma.sub_ener_old;
401 
402  if (i_dm < sDM_FCAL)
403  areas[sDM_FCAL].sub_ener_old += (corrfac-1)*dma.sub_ener_old;
404  if (i_dm < sDM_LEAKAGE)
405  areas[sDM_LEAKAGE].sub_ener_old += (corrfac-1)*dma.sub_ener_old;
406  if (i_dm < sDM_UNCLASS)
407  areas[sDM_UNCLASS].sub_ener_old += (corrfac-1)*dma.sub_ener_old;
408 
409  dma.corr = corrfac;
410  }
411 
412  float gblfac = areas[sDM_FCAL].corr * areas[sDM_LEAKAGE].corr * areas[sDM_UNCLASS].corr;
413  for (size_t cell_index = 0; cell_index < cells.size(); ++cell_index)
414  {
415  Cell& cell = cells[cell_index];
416  if (cell.energy <= m_MinCellEnergyToDeal) continue;
417  if (cell.dm != sDM)
418  cell.weight *= areas[cell.dm].corr;
419  cell.weight *= gblfac;
420  }
421  } else {
422  ATH_MSG_ERROR( "Unknown m_weightModeDM " << m_weightModeDM );
423  }
424 
425  // setting of calculated weights to the cluster cells
426  if (m_weightModeDM == 1 || m_weightModeDM == 2){
427  int cell_index = 0;
428  CaloCluster::cell_iterator itrCell = theCluster->cell_begin();
429  CaloCluster::cell_iterator itrCellEnd = theCluster->cell_end();
430  for (;itrCell!=itrCellEnd; ++itrCell) {
431  //CaloPrefetch::nextDDE(itrCell, itrCellEnd); no DDE info needed
432  const float old_weight = itrCell.weight();
433  float new_weight = cells[cell_index].weight;
434  if( new_weight < m_MaxChangeInCellWeight*old_weight ){
435  theCluster->reweightCell(itrCell, new_weight);
436  }else{
437  new_weight = old_weight; //Why that? Just for the printout below?
438  }
439 #ifdef DEBUG_DMTHINGS
440  std::cout << " cells> " << cell_index << " ener: " << cells[cell_index].energy << " old_w: " << old_weight << " new_w:" << new_weight << std::endl;
441  if( new_weight > 100) std::cout << "DeadMaterialCorrectionTool2 -> Panic! Too large weight" << std::endl;
442 #endif
443  cell_index++;
444  }//end loop over cells
446  }//end if method 1 or 2
447 
448  } // dm_total > 0.0
449 
450  ATH_MSG_DEBUG("cls_initial_energy: " << cls_initial_energy
451  << " (contains wrongly estimated DM energy: " << wrong_dm_energy << ")"
452  << " calculated DM energy (to be added):" << dm_total
453  << " new cluster energy:" << theCluster->e());
454 
455 #ifdef MAKE_MOMENTS
456  // to save reconstructed energy in different DM areas as cluster moments
457  CaloCluster::MomentType xtype = CaloCluster::ENG_CALIB_DEAD_TOT;
458  double xmom;
459  bool result = theCluster->retrieveMoment(xtype, xmom, false);
460 
461  if(result) {
462  double x;
463  bool useLink = true;
464 
465  x = (double)smp_energy[CaloSampling::PreSamplerB];
466  theCluster->insertMoment(CaloCluster::ENG_RECO_EMB0, x);
467 
468  x = (double)smp_energy[CaloSampling::PreSamplerE];
469  theCluster->insertMoment(CaloCluster::ENG_RECO_EME0, x);
470 
471  x = (double)smp_energy[CaloSampling::TileGap3];
472  theCluster->insertMoment(CaloCluster::ENG_RECO_TILEG3, x);
473 
474  x = (double)(dm_total+wrong_dm_energy);
475  theCluster->insertMoment(CaloCluster::ENG_RECO_DEAD_TOT, x);
476 
477  for(size_t i_dm=0; i_dm < areas.size(); i_dm++) {
478  Area& dma = areas[i_dm];
479  CaloCluster::MomentType m_type = (CaloCluster::MomentType) (int(CaloCluster::ENG_RECO_DEAD_EMB0)+i_dm);
480  x = (double)dma.erec;
481  if(i_dm == sDM_EMB0_EMB1 && smp_energy[CaloSampling::PreSamplerB]>0.0) x+= smp_energy[CaloSampling::PreSamplerB];
482  if(i_dm == sDM_EME0_EME12 && smp_energy[CaloSampling::PreSamplerE] > 0.0) x+= smp_energy[CaloSampling::PreSamplerE];
483  if(i_dm == sDM_SCN && smp_energy[CaloSampling::TileGap3] > 0.0) x+= smp_energy[CaloSampling::TileGap3];
484  theCluster->insertMoment(m_type, CaloClusterMoment(x));
485  }
486  }
487 
488 #endif
489 
490  // assume that the weighting could be called more than once. In that
491  // case eWeighted is the result of the previous step and the current
492  // e/eWeighted ratio should be multiplied with the existing
493  // DM_WEIGHT moment
494 
495  if ( eWeighted > 0 || eWeighted < 0 ) {
496  weightMom *= theCluster->e()/eWeighted;
497  }
498  theCluster->insertMoment(CaloCluster::DM_WEIGHT,weightMom);
499 
500  return StatusCode::SUCCESS;
501 }

Member Data Documentation

◆ m_absOpt

bool CaloLCDeadMaterialTool::m_absOpt
private

In Abs Option case, DM calculation has to be handled in a slightly different way.

Definition at line 160 of file CaloLCDeadMaterialTool.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_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_interpolate

bool CaloLCDeadMaterialTool::m_interpolate
private

interpolate correction coefficients

Definition at line 138 of file CaloLCDeadMaterialTool.h.

◆ m_interpolateDimensionNames

std::map<std::string, std::vector<std::string > > CaloLCDeadMaterialTool::m_interpolateDimensionNames
private

vector of names of dimensions to interpolate (for different correction types different set of dimensions)

Definition at line 146 of file CaloLCDeadMaterialTool.h.

◆ m_interpolateDimensionsFit

std::vector<int > CaloLCDeadMaterialTool::m_interpolateDimensionsFit
private

actual set of dimension id's to interpolate (in the DM areas corrected with TProfile approach)

Definition at line 150 of file CaloLCDeadMaterialTool.h.

◆ m_interpolateDimensionsLookup

std::vector<int > CaloLCDeadMaterialTool::m_interpolateDimensionsLookup
private

actual set of dimension id's to interpolate (in the DM areas corrected with lookup approach)

Definition at line 153 of file CaloLCDeadMaterialTool.h.

◆ m_interpolateDimensionsSampling

std::vector<int > CaloLCDeadMaterialTool::m_interpolateDimensionsSampling
private

actual set of dimension id's to interpolate (in the DM areas corrected with sampling weight approach)

Definition at line 156 of file CaloLCDeadMaterialTool.h.

◆ m_key

SG::ReadCondHandleKey<CaloLocalHadCoeff> CaloLCDeadMaterialTool::m_key
private

name of the key for DM cell weights

Definition at line 97 of file CaloLCDeadMaterialTool.h.

◆ m_MaxChangeInCellWeight

float CaloLCDeadMaterialTool::m_MaxChangeInCellWeight
private

maximum allowed change in cell weights

Definition at line 125 of file CaloLCDeadMaterialTool.h.

◆ m_MinCellEnergyToDeal

float CaloLCDeadMaterialTool::m_MinCellEnergyToDeal
private

minimum cell energy to deal

Definition at line 121 of file CaloLCDeadMaterialTool.h.

◆ m_MinClusterEnergyToDeal

float CaloLCDeadMaterialTool::m_MinClusterEnergyToDeal
private

Minimum energy of clusters to apply correction.

Definition at line 113 of file CaloLCDeadMaterialTool.h.

◆ m_MinLookupBinNentry

int CaloLCDeadMaterialTool::m_MinLookupBinNentry
private

minimum number of events in one lookup bin to use

Definition at line 117 of file CaloLCDeadMaterialTool.h.

◆ m_recoStatus

int CaloLCDeadMaterialTool::m_recoStatus
private

Required Reco Status for the clusters in order to be calibrated.

Definition at line 101 of file CaloLCDeadMaterialTool.h.

◆ m_updateSamplingVars

bool CaloLCDeadMaterialTool::m_updateSamplingVars
private

update also sampling variables

Definition at line 142 of file CaloLCDeadMaterialTool.h.

◆ m_useHadProbability

bool CaloLCDeadMaterialTool::m_useHadProbability
private

calculate DM energy using em-probability moment

The classification provides the probability p for the current cluster to be em-like. Dead material enegry of cluster is calculated as a mixture of DM energies for pure EM and pure HAD clusters using p as engDM = p *engDM_EM+(1-p)*endDM_HAD

Definition at line 134 of file CaloLCDeadMaterialTool.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.

◆ m_weightModeDM

int CaloLCDeadMaterialTool::m_weightModeDM
private

method of assignment of DM energy to cluster

if 0: setting cluster energy to the new value without changing of cells weights if 1: weights of all cells in the cluster with energy > m_MinCellEnergyToDeal will be changed if 2: changing only weights of cells which have been involved into DM calculation

Definition at line 109 of file CaloLCDeadMaterialTool.h.


The documentation for this class was generated from the following files:
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
CaloLocalHadDefs::BIN_P1
@ BIN_P1
Definition: CaloLocalHadDefs.h:32
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
RunTileCalibRec.cells
cells
Definition: RunTileCalibRec.py:271
GetLCDefs::Unknown
@ Unknown
Definition: GetLCDefs.h:21
CaloClusterMoment::MomentType
MomentType
enums to identify different moments
Definition: CaloClusterMoment.h:38
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
CaloLCDeadMaterialTool::m_useHadProbability
bool m_useHadProbability
calculate DM energy using em-probability moment
Definition: CaloLCDeadMaterialTool.h:134
TauGNNUtils::Variables::Cluster::CENTER_LAMBDA
bool CENTER_LAMBDA(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
Definition: TauGNNUtils.cxx:831
xAOD::CaloCluster_v1::cell_begin
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version)
Definition: CaloCluster_v1.h:812
CaloLCDeadMaterialTool::sDM
@ sDM
Definition: CaloLCDeadMaterialTool.h:57
CaloLCDeadMaterialTool::m_MinCellEnergyToDeal
float m_MinCellEnergyToDeal
minimum cell energy to deal
Definition: CaloLCDeadMaterialTool.h:121
get_generator_info.result
result
Definition: get_generator_info.py:21
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CaloLocalHadDefs::DIMD_ETA
@ DIMD_ETA
Definition: CaloLocalHadDefs.h:68
TauGNNUtils::Variables::Cluster::EM_PROBABILITY
bool EM_PROBABILITY(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
Definition: TauGNNUtils.cxx:900
CaloLCDeadMaterialTool::weight
virtual StatusCode weight(xAOD::CaloCluster *theCluster, const EventContext &ctx) const override
method to weight the cells in a cluster
Definition: CaloLCDeadMaterialTool.cxx:138
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CaloLocalHadDefs::DIMD_EMFRAC
@ DIMD_EMFRAC
Definition: CaloLocalHadDefs.h:66
CaloLocalHadDefs::DIMU_UNKNOWN
@ DIMU_UNKNOWN
Definition: CaloLocalHadDefs.h:73
CaloLCDeadMaterialTool::m_updateSamplingVars
bool m_updateSamplingVars
update also sampling variables
Definition: CaloLCDeadMaterialTool.h:142
CaloLCDeadMaterialTool::sDM_EMB3_TILE0
@ sDM_EMB3_TILE0
Definition: CaloLCDeadMaterialTool.h:50
CaloLocalHadDefs::AREA_DMFIT
@ AREA_DMFIT
Definition: CaloLocalHadDefs.h:21
python.SystemOfUnits.MeV
int MeV
Definition: SystemOfUnits.py:154
skel.it
it
Definition: skel.GENtoEVGEN.py:423
CaloLCCoeffHelper::getDimensionId
static CaloLocalHadDefs::LocalHadDimensionId getDimensionId(const std::string &dimensionName)
Definition: CaloLCCoeffHelper.h:32
CaloLCDeadMaterialTool::m_MaxChangeInCellWeight
float m_MaxChangeInCellWeight
maximum allowed change in cell weights
Definition: CaloLCDeadMaterialTool.h:125
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
CaloCell::e
virtual double e() const override final
get energy (data member) (synonym to method energy()
Definition: CaloCell.h:317
CaloLocalHadDefs::AREA_DMSMPW
@ AREA_DMSMPW
Definition: CaloLocalHadDefs.h:23
CaloLCDeadMaterialTool::sDM_EMB0_EMB1
@ sDM_EMB0_EMB1
Definition: CaloLCDeadMaterialTool.h:49
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
CaloLCDeadMaterialTool::m_absOpt
bool m_absOpt
In Abs Option case, DM calculation has to be handled in a slightly different way.
Definition: CaloLCDeadMaterialTool.h:160
x
#define x
CaloCell_ID_FCS::TileGap3
@ TileGap3
Definition: FastCaloSim_CaloCell_ID.h:36
CaloLocalHadDefs::LocalHadDimensionId
LocalHadDimensionId
enums to identify user dimensions id number DIMC_* - classification, DIMW_*-weighting,...
Definition: CaloLocalHadDefs.h:45
CaloLCDeadMaterialTool::m_recoStatus
int m_recoStatus
Required Reco Status for the clusters in order to be calibrated.
Definition: CaloLCDeadMaterialTool.h:101
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
CaloLCDeadMaterialTool::sDM_EME3_HEC0
@ sDM_EME3_HEC0
Definition: CaloLCDeadMaterialTool.h:53
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
CaloLocalHadCoeff::LocalHadCoeff
std::vector< float > LocalHadCoeff
Correction parameters for one general bin.
Definition: CaloLocalHadCoeff.h:220
m_type
TokenType m_type
the type
Definition: TProperty.cxx:44
CaloLocalHadDefs::BIN_ENTRIES
@ BIN_ENTRIES
Definition: CaloLocalHadDefs.h:29
CaloCluster::cell_iterator
CaloCompositeCellBase< CaloClusterNavigable >::cell_iterator cell_iterator
Iterator on CaloCell s.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:115
CaloLCDeadMaterialTool::m_key
SG::ReadCondHandleKey< CaloLocalHadCoeff > m_key
name of the key for DM cell weights
Definition: CaloLCDeadMaterialTool.h:97
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
lumiFormat.i
int i
Definition: lumiFormat.py:92
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
CaloCell_ID_FCS::TileBar0
@ TileBar0
Definition: FastCaloSim_CaloCell_ID.h:31
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
CaloLocalHadCoeff
Hold binned correction data for local hadronic calibration procedure.
Definition: CaloLocalHadCoeff.h:41
CaloCell::caloDDE
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition: CaloCell.h:305
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::CaloCluster_v1::size
size_t size() const
size method (forwarded from CaloClusterCellLink obj)
Definition: CaloCluster_v1.cxx:996
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CaloLCDeadMaterialTool::m_interpolateDimensionsLookup
std::vector< int > m_interpolateDimensionsLookup
actual set of dimension id's to interpolate (in the DM areas corrected with lookup approach)
Definition: CaloLCDeadMaterialTool.h:153
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::double
double
Definition: CompositeParticle_v1.cxx:159
CaloLCDeadMaterialTool::sDM_UNCLASS
@ sDM_UNCLASS
Definition: CaloLCDeadMaterialTool.h:56
CaloLCCoeffHelper
Definition: CaloLCCoeffHelper.h:15
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
CaloCluster::MomentType
moment_type MomentType
Definition: Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:141
CaloLocalHadDefs::DIMD_ENER
@ DIMD_ENER
Definition: CaloLocalHadDefs.h:70
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
CxxUtils::prefetchNext
void prefetchNext(Iter iter, Iter endIter)
Prefetch next object in sequence.
Definition: prefetch.h:130
CaloLCCoeffHelper::Interpolate
static bool Interpolate(const CaloLocalHadCoeff *m_data, const unsigned int n_area, std::vector< float > &x, CaloLocalHadCoeff::LocalHadCoeff &pars, const std::vector< int > &dim, double xfit=0.)
Definition: CaloLCCoeffHelper.cxx:230
CaloLCDeadMaterialTool::m_interpolate
bool m_interpolate
interpolate correction coefficients
Definition: CaloLCDeadMaterialTool.h:138
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
CaloRecoStatus::TAGGEDEM
@ TAGGEDEM
Definition: CaloRecoStatus.h:38
CaloCell_ID_FCS::HEC0
@ HEC0
Definition: FastCaloSim_CaloCell_ID.h:27
xAOD::CaloCluster_v1::eSample
float eSample(const CaloSample sampling) const
Definition: CaloCluster_v1.cxx:521
a
TList * a
Definition: liststreamerinfos.cxx:10
y
#define y
h
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
CaloDetDescrElement::getSampling
CaloCell_ID::CaloSample getSampling() const
cell sampling
Definition: Calorimeter/CaloDetDescr/CaloDetDescr/CaloDetDescrElement.h:395
CaloLocalHadDefs::DIMD_PHI
@ DIMD_PHI
Definition: CaloLocalHadDefs.h:69
CaloLCDeadMaterialTool::m_interpolateDimensionsFit
std::vector< int > m_interpolateDimensionsFit
actual set of dimension id's to interpolate (in the DM areas corrected with TProfile approach)
Definition: CaloLCDeadMaterialTool.h:150
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
CaloClusterMoment
defines enums and data types for different moments of CaloCluster
Definition: CaloClusterMoment.h:29
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
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
if
if(febId1==febId2)
Definition: LArRodBlockPhysicsV0.cxx:569
CaloLCDeadMaterialTool::sDM_LEAKAGE
@ sDM_LEAKAGE
Definition: CaloLCDeadMaterialTool.h:55
CaloLocalHadDefs::BIN_P0
@ BIN_P0
Definition: CaloLocalHadDefs.h:31
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
beamspotnt.xtype
string xtype
Definition: bin/beamspotnt.py:1509
CaloLocalHadCoeff::LocalHadArea
Definition of correction area.
Definition: CaloLocalHadCoeff.h:145
CaloClusterKineHelper::calculateKine
static void calculateKine(xAOD::CaloCluster *clu, const bool useweight=true, const bool updateLayers=true, const bool useGPUCriteria=false)
Helper class to calculate cluster kinematics based on cells.
Definition: CaloClusterKineHelper.cxx:223
CaloLCDeadMaterialTool::sDM_FCAL
@ sDM_FCAL
Definition: CaloLCDeadMaterialTool.h:54
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
CaloLCDeadMaterialTool::sDM_SCN
@ sDM_SCN
Definition: CaloLCDeadMaterialTool.h:51
CaloLCDeadMaterialTool::m_weightModeDM
int m_weightModeDM
method of assignment of DM energy to cluster
Definition: CaloLCDeadMaterialTool.h:109
CaloLCDeadMaterialTool::m_MinLookupBinNentry
int m_MinLookupBinNentry
minimum number of events in one lookup bin to use
Definition: CaloLCDeadMaterialTool.h:117
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
CaloRecoStatus::UNKNOWNSTATUS
@ UNKNOWNSTATUS
Definition: CaloRecoStatus.h:45
CaloLCDeadMaterialTool::m_interpolateDimensionNames
std::map< std::string, std::vector< std::string > > m_interpolateDimensionNames
vector of names of dimensions to interpolate (for different correction types different set of dimensi...
Definition: CaloLCDeadMaterialTool.h:146
CaloLocalHadDefs::DIMD_SIDE
@ DIMD_SIDE
Definition: CaloLocalHadDefs.h:67
CaloLocalHadDefs::BIN_WEIGHT
@ BIN_WEIGHT
Definition: CaloLocalHadDefs.h:28
CaloLCDeadMaterialTool::m_MinClusterEnergyToDeal
float m_MinClusterEnergyToDeal
Minimum energy of clusters to apply correction.
Definition: CaloLCDeadMaterialTool.h:113
area
double area(double R)
Definition: ConvertStaveServices.cxx:42
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
CaloLocalHadDefs::DIMD_LAMBDA
@ DIMD_LAMBDA
Definition: CaloLocalHadDefs.h:71
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
readCCLHist.float
float
Definition: readCCLHist.py:83
CaloLCDeadMaterialTool::prepare_for_cluster
StatusCode prepare_for_cluster(const xAOD::CaloCluster *theCluster, std::vector< Area > &areas, std::vector< Cell > &cells, float *smp_energy, float &cls_unweighted_energy, const CaloLocalHadCoeff *data) const
Definition: CaloLCDeadMaterialTool.cxx:532
fitman.k
k
Definition: fitman.py:528
CaloLCDeadMaterialTool::sDM_EME0_EME12
@ sDM_EME0_EME12
Definition: CaloLCDeadMaterialTool.h:52
CaloLCDeadMaterialTool::m_interpolateDimensionsSampling
std::vector< int > m_interpolateDimensionsSampling
actual set of dimension id's to interpolate (in the DM areas corrected with sampling weight approach)
Definition: CaloLCDeadMaterialTool.h:156
CaloLocalHadDefs::AREA_DMLOOKUP
@ AREA_DMLOOKUP
Definition: CaloLocalHadDefs.h:22