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

classify clusters according to their probability to stem from an em object More...

#include <CaloLCClassificationTool.h>

Inheritance diagram for CaloLCClassificationTool:
Collaboration diagram for CaloLCClassificationTool:

Public Member Functions

virtual ~CaloLCClassificationTool ()
 
virtual CaloRecoStatus::StatusIndicator classify (xAOD::CaloCluster *thisCluster) const override
 method to return the classification status of a cluster. More...
 
virtual StatusCode initialize () override
 
 CaloLCClassificationTool (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

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 em fraction data More...
 
bool m_useSpread
 if set to true the spread of EM probabilities in each bin is taken into account for classification otherwise only the mean is used More...
 
bool m_useNormalizedEnergyDensity
 old data depends on energy density while new data depends on energy density over energy. More...
 
double m_maxProbability
 cut value on EM probability below which all clusters are classified as hadronic More...
 
bool m_storeClassificationProbabilityInAOD
 if true the phase space probability based on single pions that the current cluster stems from a pi0 is saved on AOD as a moment. More...
 
bool m_interpolate
 interpolate correction coefficients More...
 
std::vector< std::string > m_interpolateDimensionNames
 vector of names of dimensions in look-up tables to interpolate More...
 
std::vector< int > m_interpolateDimensions
 actual set of dimension id's to interpolate More...
 
bool m_absOpt
 is set to true, classify neg. 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

classify clusters according to their probability to stem from an em object

Version
$Id: CaloLCClassificationTool.h,v 1.6 2009-01-27 09:09:14 gunal Exp $
Author
Sven Menke menke.nosp@m.@mpp.nosp@m.mu.mp.nosp@m.g.de
Date
27-September-2005 concrete class implementing a IClusterClassificationTool to classify clusters according to their probability to be caused by an electromagnetic decaying particle or shower. Clusters with high em probability should not be weighted. This tool reads its data from pool containing TProfile2D based em-probability data.

Definition at line 28 of file CaloLCClassificationTool.h.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ ~CaloLCClassificationTool()

CaloLCClassificationTool::~CaloLCClassificationTool ( )
virtualdefault

◆ CaloLCClassificationTool()

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

Definition at line 30 of file CaloLCClassificationTool.cxx.

34  m_key("EMFracClassify"),
35  m_useSpread(false),
37  m_maxProbability(0.5),
39  m_interpolate(false),
40  m_absOpt(false)
41 {
42 
43  declareInterface<IClusterClassificationTool>(this);
44  // Name of data object in conditions store
45  declareProperty("ClassificationKey",m_key);
46  // Use Spread of EM probability for estimate
47  declareProperty("UseSpread",m_useSpread);
48  // Use normalized energy density
49  declareProperty("UseNormalizedEnergyDensity",m_useNormalizedEnergyDensity);
50  // Maximal EM probability below which all clusters are considered hadronic
51  declareProperty("MaxProbability",m_maxProbability);
52  // Store the classification Probability as a cluster moment in AOD
53  // (if false it goes to ESD only)
54  declareProperty("StoreClassificationProbabilityInAOD",m_storeClassificationProbabilityInAOD);
55  // Use Interpolation or not
56  declareProperty("Interpolate",m_interpolate);
57  //Use weighting of negative clusters?
58  declareProperty("WeightingOfNegClusters",m_absOpt);
59 
61  m_interpolateDimensionNames[0] = "DIMC_ETA";
62  m_interpolateDimensionNames[1] = "DIMC_EDENS";
63  m_interpolateDimensionNames[2] = "DIMC_LAMBDA";
64  declareProperty("InterpolateDimensionNames", m_interpolateDimensionNames);
65 }

Member Function Documentation

◆ classify()

CaloRecoStatus::StatusIndicator CaloLCClassificationTool::classify ( xAOD::CaloCluster thisCluster) const
overridevirtual

method to return the classification status of a cluster.

Parameters
theClusterthe pointer to the CaloCluster to be classified

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

Implements IClusterClassificationTool.

Definition at line 92 of file CaloLCClassificationTool.cxx.

93 {
94  const CaloLocalHadCoeff* condObject(nullptr);
96  condObject = *rch;
97  if(condObject==nullptr) {
98  ATH_MSG_ERROR("Unable to access conditions object");
100  }
101 
104 
106  double probPi0 = 0;
107  // on ESD only
108  std::vector<float> vars(6);
109  if ( thisCluster->e() > 0 || m_absOpt ) { //with abs option, always weight cluster
110  double log10cluse = log10(thisCluster->e());
111  if( m_absOpt ) log10cluse = log10(fabs(thisCluster->e()));
112  double log10cluseOrig = log10cluse;
113 
114  const CaloLocalHadCoeff::LocalHadDimension *logeDim = condObject->getArea(0)->getDimension(3);
115  double lemax = logeDim->getXmax()-0.5*logeDim->getDx();
116  double lemin = logeDim->getXmin()+0.5*logeDim->getDx();
117  if ( log10cluse > lemax )
118  log10cluse = lemax;
119  if ( log10cluse < lemin )
120  log10cluse = lemin;
121 
122  double m1_dens,center_lambda;
123  //Fixme ... check moavailability ..
124  if (thisCluster->retrieveMoment(CaloCluster::FIRST_ENG_DENS,m1_dens) &&
125  thisCluster->retrieveMoment(CaloCluster::CENTER_LAMBDA,center_lambda)) {
126  if ( m1_dens > 0 && center_lambda > 0) {
127  const double abseta = fabs(thisCluster->eta());
128  double log10edens = log10(m1_dens);
129  if ( m_useNormalizedEnergyDensity ) log10edens -= log10cluseOrig;
130  double log10lambda = log10(center_lambda);
131 
132  vars[CaloLocalHadDefs::DIMC_SIDE] = static_cast<float> ((thisCluster->eta()<0?-1.0:1.0));
133  vars[CaloLocalHadDefs::DIMC_ETA] = static_cast<float> (abseta);
134  vars[CaloLocalHadDefs::DIMC_PHI] = static_cast<float> (thisCluster->phi());
135  vars[CaloLocalHadDefs::DIMC_ENER] = static_cast<float> (log10cluse);
136  vars[CaloLocalHadDefs::DIMC_EDENS] = static_cast<float> (log10edens);
137  vars[CaloLocalHadDefs::DIMC_LAMBDA] = static_cast<float> (log10lambda);
138 
139  bool isDataOK = false;
140  double emProb(0);
141 
142  int iBin = condObject->getBin(0,vars);
143  if ( iBin >= 0 ) {
144  const CaloLocalHadCoeff::LocalHadCoeff * pData = condObject->getCoeff(iBin);
145  if ( pData && (*pData)[CaloLocalHadDefs::BIN_ENTRIES] > 0 ) {
146  isDataOK = true;
147  emProb = (*pData)[CaloLocalHadDefs::BIN_WEIGHT];
148  if (m_useSpread) {
149  double emErr = sqrt((*pData)[CaloLocalHadDefs::BIN_ENTRIES])*(*pData)[CaloLocalHadDefs::BIN_ERROR];
150  emProb += emErr;
151  }
152 
153  if(m_interpolate) {
154  // accesing interpolated coefficients
155  bool isa = CaloLCCoeffHelper::Interpolate(condObject, 0,vars,parint, m_interpolateDimensions);
156  if(isa) {
157  if ( parint[CaloLocalHadDefs::BIN_ENTRIES] > 0 ) {
158  isDataOK = true;
159  emProb = parint[CaloLocalHadDefs::BIN_WEIGHT];
160  if (m_useSpread) {
161  double emErr = sqrt(parint[CaloLocalHadDefs::BIN_ENTRIES])*parint[CaloLocalHadDefs::BIN_ERROR];
162  emProb += emErr;
163  }
164  }
165  }//end if isa
166  }//end if m_interpolate
167  } //end if pData
168  } //end if iBin
169 
170  if(isDataOK) {
171  probPi0 = emProb;
172  if ( emProb < m_maxProbability )
173  recStat = CaloRecoStatus::TAGGEDHAD;
174  else
175  recStat = CaloRecoStatus::TAGGEDEM;
176  }
177 
178  } // if >0
179  } //if got sucessfully retrieved moments
180  else {
181  ATH_MSG_ERROR( "Can not retrieve one or more of the cluster moments "
182  << "CENTER_LAMBDA, FIRST_ENG_DENS for current cluster"
183  << "- classification not possible - "
184  << "you need to enable those moments in the cluster maker!"
185  );
187  }
188  }
189 
190  thisCluster->insertMoment(CaloCluster::EM_PROBABILITY,probPi0);
191  thisCluster->insertMoment(CaloCluster::HAD_WEIGHT,1.0);
192  thisCluster->insertMoment(CaloCluster::OOC_WEIGHT,1.0);
193  thisCluster->insertMoment(CaloCluster::DM_WEIGHT,1.0);
194 
195  return recStat;
196 }

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

Definition at line 67 of file CaloLCClassificationTool.cxx.

68 {
69  ATH_MSG_INFO( "Initializing " << name() );
70 
72 
73  if(m_interpolate) {
74  msg(MSG::INFO) << "Interpolation is ON, dimensions: ";
76  msg() << " " << (*it);
77  }
78  msg() << endmsg;
82  m_interpolateDimensions.push_back(int(id));
83  }else{
84  ATH_MSG_WARNING( "Dimension '" << (*it) << "' is invalid and will be excluded." );
85  }
86  }
87  }
88 
89  return StatusCode::SUCCESS;
90 }

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

Definition at line 29 of file IClusterClassificationTool.h.

29  {
30  static const InterfaceID IID_IClusterClassificationTool("IClusterClassificationTool", 1 , 0);
31  return IID_IClusterClassificationTool;
32  }

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

bool CaloLCClassificationTool::m_absOpt
private

is set to true, classify neg.

Clusters as well

Definition at line 113 of file CaloLCClassificationTool.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 CaloLCClassificationTool::m_interpolate
private

interpolate correction coefficients

Definition at line 100 of file CaloLCClassificationTool.h.

◆ m_interpolateDimensionNames

std::vector<std::string> CaloLCClassificationTool::m_interpolateDimensionNames
private

vector of names of dimensions in look-up tables to interpolate

Definition at line 104 of file CaloLCClassificationTool.h.

◆ m_interpolateDimensions

std::vector<int> CaloLCClassificationTool::m_interpolateDimensions
private

actual set of dimension id's to interpolate

Definition at line 109 of file CaloLCClassificationTool.h.

◆ m_key

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

name of the key for em fraction data

Definition at line 47 of file CaloLCClassificationTool.h.

◆ m_maxProbability

double CaloLCClassificationTool::m_maxProbability
private

cut value on EM probability below which all clusters are classified as hadronic

Useful values are around 0.5. Clusters in Bins with an average EM probability below this cut value are tagged as hadronic. Clusters in Bins with an average EM probability above this value are considered electromagnetic and clusters falling in bins with no information are tagged as unknown.

Definition at line 83 of file CaloLCClassificationTool.h.

◆ m_storeClassificationProbabilityInAOD

bool CaloLCClassificationTool::m_storeClassificationProbabilityInAOD
private

if true the phase space probability based on single pions that the current cluster stems from a pi0 is saved on AOD as a moment.

If false the moment goes to ESD only.

Classification histos report this quantity. The subsequent calibration functions can retrieve this probability if stored as moment and weight the respective calibration by this (or 1 minus it) to avoid overcorrections.

Definition at line 95 of file CaloLCClassificationTool.h.

◆ m_useNormalizedEnergyDensity

bool CaloLCClassificationTool::m_useNormalizedEnergyDensity
private

old data depends on energy density while new data depends on energy density over energy.

This bool is needed to switch.

Classification histos have energy density or normalized energy density for the x-axis. The old cond data is not normalized which causes problems for neutral pions. The new cond data is and this switch selects the proper normalization for the tool.

Definition at line 71 of file CaloLCClassificationTool.h.

◆ m_useSpread

bool CaloLCClassificationTool::m_useSpread
private

if set to true the spread of EM probabilities in each bin is taken into account for classification otherwise only the mean is used

For some regions of phase space the spread in the EM probability values can be quite large. If this property is set to true the EM probability which is maximaly consistent with the current bin is calculated (mean+spread) and in case the property is false just the mean is used to estimate the EM probability.

Definition at line 60 of file CaloLCClassificationTool.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:
CaloLocalHadDefs::DIMC_ENER
@ DIMC_ENER
Definition: CaloLocalHadDefs.h:50
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
CaloLocalHadCoeff::LocalHadDimension
Class defines binning for user dimension.
Definition: CaloLocalHadCoeff.h:47
CaloLocalHadDefs::DIMC_LAMBDA
@ DIMC_LAMBDA
Definition: CaloLocalHadDefs.h:52
TauGNNUtils::Variables::Cluster::CENTER_LAMBDA
bool CENTER_LAMBDA(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
Definition: TauGNNUtils.cxx:831
CaloLocalHadDefs::BIN_ERROR
@ BIN_ERROR
Definition: CaloLocalHadDefs.h:30
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
CaloRecoStatus::StatusIndicator
StatusIndicator
reconstruction status word
Definition: CaloRecoStatus.h:37
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
CaloRecoStatus::TAGGEDUNKNOWN
@ TAGGEDUNKNOWN
Definition: CaloRecoStatus.h:41
TauGNNUtils::Variables::Cluster::EM_PROBABILITY
bool EM_PROBABILITY(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
Definition: TauGNNUtils.cxx:900
AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
CaloLocalHadDefs::DIMU_UNKNOWN
@ DIMU_UNKNOWN
Definition: CaloLocalHadDefs.h:73
skel.it
it
Definition: skel.GENtoEVGEN.py:423
CaloLCCoeffHelper::getDimensionId
static CaloLocalHadDefs::LocalHadDimensionId getDimensionId(const std::string &dimensionName)
Definition: CaloLCCoeffHelper.h:32
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
xAOD::CaloCluster_v1::insertMoment
void insertMoment(MomentType type, double value)
Definition: CaloCluster_v1.cxx:754
CaloLCClassificationTool::m_interpolateDimensionNames
std::vector< std::string > m_interpolateDimensionNames
vector of names of dimensions in look-up tables to interpolate
Definition: CaloLCClassificationTool.h:104
CaloLocalHadCoeff::LocalHadDimension::getXmin
float getXmin() const
return minimum value for the first bin
Definition: CaloLocalHadCoeff.h:102
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
CaloLocalHadDefs::LocalHadDimensionId
LocalHadDimensionId
enums to identify user dimensions id number DIMC_* - classification, DIMW_*-weighting,...
Definition: CaloLocalHadDefs.h:45
CaloLocalHadDefs::DIMC_PHI
@ DIMC_PHI
Definition: CaloLocalHadDefs.h:49
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
CaloLCClassificationTool::m_interpolate
bool m_interpolate
interpolate correction coefficients
Definition: CaloLCClassificationTool.h:100
CaloLCClassificationTool::m_maxProbability
double m_maxProbability
cut value on EM probability below which all clusters are classified as hadronic
Definition: CaloLCClassificationTool.h:83
CaloLocalHadDefs::BIN_ENTRIES
@ BIN_ENTRIES
Definition: CaloLocalHadDefs.h:29
CaloLocalHadDefs::DIMC_EDENS
@ DIMC_EDENS
Definition: CaloLocalHadDefs.h:51
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
CaloLocalHadCoeff
Hold binned correction data for local hadronic calibration procedure.
Definition: CaloLocalHadCoeff.h:41
test_pyathena.parent
parent
Definition: test_pyathena.py:15
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CaloLocalHadCoeff::LocalHadDimension::getDx
float getDx() const
return size of bin
Definition: CaloLocalHadCoeff.h:108
xAOD::CaloCluster_v1::retrieveMoment
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
Definition: CaloCluster_v1.cxx:738
AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
CaloLCClassificationTool::m_interpolateDimensions
std::vector< int > m_interpolateDimensions
actual set of dimension id's to interpolate
Definition: CaloLCClassificationTool.h:109
CaloLCCoeffHelper
Definition: CaloLCCoeffHelper.h:15
AthAlgTool::AthAlgTool
AthAlgTool()
Default constructor:
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
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
CaloLocalHadDefs::DIMC_SIDE
@ DIMC_SIDE
Definition: CaloLocalHadDefs.h:47
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
CaloLocalHadCoeff::LocalHadDimension::getXmax
float getXmax() const
return maximum value for the last bin
Definition: CaloLocalHadCoeff.h:105
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:192
CaloLCClassificationTool::m_absOpt
bool m_absOpt
is set to true, classify neg.
Definition: CaloLCClassificationTool.h:113
CaloLCClassificationTool::m_useSpread
bool m_useSpread
if set to true the spread of EM probabilities in each bin is taken into account for classification ot...
Definition: CaloLCClassificationTool.h:60
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
CaloRecoStatus::TAGGEDEM
@ TAGGEDEM
Definition: CaloRecoStatus.h:38
CaloLocalHadDefs::DIMC_ETA
@ DIMC_ETA
Definition: CaloLocalHadDefs.h:48
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CaloLCClassificationTool::m_storeClassificationProbabilityInAOD
bool m_storeClassificationProbabilityInAOD
if true the phase space probability based on single pions that the current cluster stems from a pi0 i...
Definition: CaloLCClassificationTool.h:95
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
TauGNNUtils::Variables::Cluster::FIRST_ENG_DENS
bool FIRST_ENG_DENS(const xAOD::TauJet &, const xAOD::CaloVertexedTopoCluster &cluster, double &out)
Definition: TauGNNUtils.cxx:893
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
CaloLCClassificationTool::m_key
SG::ReadCondHandleKey< CaloLocalHadCoeff > m_key
name of the key for em fraction data
Definition: CaloLCClassificationTool.h:47
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
CaloLocalHadDefs::BIN_WEIGHT
@ BIN_WEIGHT
Definition: CaloLocalHadDefs.h:28
CaloRecoStatus::TAGGEDHAD
@ TAGGEDHAD
Definition: CaloRecoStatus.h:39
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
CaloLCClassificationTool::m_useNormalizedEnergyDensity
bool m_useNormalizedEnergyDensity
old data depends on energy density while new data depends on energy density over energy.
Definition: CaloLCClassificationTool.h:71
fitman.k
k
Definition: fitman.py:528