|
ATLAS Offline Software
|
calculates hadronic cell weights based on cluster and cell quantities
More...
#include <CaloLCWeightTool.h>
|
virtual | ~CaloLCWeightTool () |
|
virtual StatusCode | weight (xAOD::CaloCluster *theCluster, const EventContext &ctx) const override |
| method to weight the cells in a cluster More...
|
|
virtual StatusCode | initialize () override |
|
| CaloLCWeightTool (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 |
|
calculates hadronic cell weights based on cluster and cell quantities
- Version
- $Id: CaloLCWeightTool.h,v 1.8 2009-01-27 09:09:14 gunal Exp $
- Author
- Sven Menke menke.nosp@m.@mpp.nosp@m.mu.mp.nosp@m.g.de
- Date
- 26-August-2009 concrete class implementing a IClusterCellWeightTool to calculate the H1-type cell hadronic weights for cells inside a cluster. The cluster moments and its energy are also used to derive the weights
- therefore the weighting is not called cell-by-cell, but for the entire cluster This tool reads its data from pool containing TProfile2D based weighting data.
Definition at line 33 of file CaloLCWeightTool.h.
◆ StoreGateSvc_t
◆ ~CaloLCWeightTool()
CaloLCWeightTool::~CaloLCWeightTool |
( |
| ) |
|
|
virtualdefault |
◆ CaloLCWeightTool()
CaloLCWeightTool::CaloLCWeightTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ extraDeps_update_handler()
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 CaloLCWeightTool::initialize |
( |
| ) |
|
|
overridevirtual |
Definition at line 59 of file CaloLCWeightTool.cxx.
62 msg(MSG::INFO) <<
"Interpolation is ON, dimensions: ";
64 msg(MSG::INFO) <<
" " << (*it);
72 ATH_MSG_WARNING(
"Dimension '" << (*
it) <<
"' is invalid and will be excluded." );
90 return StatusCode::SUCCESS;
◆ inputHandles()
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.
29 static const InterfaceID IID_IClusterCellWeightTool(
"IClusterCellWeightTool", 1 , 0);
30 return IID_IClusterCellWeightTool;
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ weight()
method to weight the cells in a cluster
- Parameters
-
theCluster | the 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 93 of file CaloLCWeightTool.cxx.
104 return StatusCode::FAILURE;
108 for (
int iArea=0;iArea<
data->getSizeAreaSet();iArea++) {
112 isAmpMap[iSamp] = iArea;
118 double eEM = theCluster->e();
120 std::vector<float> vars(5);
144 for (;itrCell!=itrCellEnd; ++itrCell) {
149 if ( isAmpMap[theSample] >= 0 ) {
151 double energy = fabs(itrCell->
e());
160 volume = myCDDE->
volume();
165 double abseta = fabs(itrCell->
eta());
166 double log10edens = log10(density);
167 double log10cluse = log10(eEM);
170 if ( log10cluse > lemax ) log10cluse = lemax;
178 bool isDataOK =
false;
182 int iBin =
data->getBin(isAmpMap[theSample],vars);
209 weight *= (pi0Prob + (1-pi0Prob)*wData);
211 theCluster->reweightCell(itrCell,
weight);
223 double new_weight (1);
225 ATH_MSG_ERROR(
"Cannot retrieve HAD_WEIGHT cluster moment." );
226 return StatusCode::FAILURE;
229 if ( eEM > 0 || eEM < 0 ) {
230 new_weight *= theCluster->e()/eEM;
234 return StatusCode::SUCCESS;
◆ m_calo_id
◆ m_detStore
◆ m_evtStore
◆ m_interpolate
bool CaloLCWeightTool::m_interpolate |
|
private |
◆ m_interpolateDimensionNames
std::vector<std::string> CaloLCWeightTool::m_interpolateDimensionNames |
|
private |
vector of names of dimensions in look-up tables to interpolate
Definition at line 85 of file CaloLCWeightTool.h.
◆ m_interpolateDimensions
std::vector<int> CaloLCWeightTool::m_interpolateDimensions |
|
private |
◆ m_key
◆ m_noiseCDOKey
◆ m_sampnames
std::vector<std::string> CaloLCWeightTool::m_sampnames |
|
private |
◆ m_signalOverNoiseCut
double CaloLCWeightTool::m_signalOverNoiseCut |
|
private |
minimal signal/elec_noise ratio for a cell to be weighted
Only cells with |energy| above this value times the RMS of the electronics noise are considered in weighting.
Definition at line 56 of file CaloLCWeightTool.h.
◆ m_updateSamplingVars
bool CaloLCWeightTool::m_updateSamplingVars |
|
private |
◆ m_useHadProbability
bool CaloLCWeightTool::m_useHadProbability |
|
private |
look for em-probability moment and apply relative weight only
The classification provides the probability p for the current cluster to be em-like. Hadronic weights are applied with the additional hadronic probablity factor (1-p) to all clusters for the cases EM and HAD.
Definition at line 65 of file CaloLCWeightTool.h.
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
Class defines binning for user dimension.
char data[hepevt_bytes_allocation_ATLAS]
virtual double phi() const override final
get phi (through CaloDetDescrElement)
@ EM_PROBABILITY
Classification probability to be em-like.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
static CaloLocalHadDefs::LocalHadDimensionId getDimensionId(const std::string &dimensionName)
weight_t weight() const
Accessor for weight associated to this cell.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
virtual double e() const override final
get energy (data member) (synonym to method energy()
int calo_sample(const Identifier id) const
returns an int taken from Sampling enum and describing the subCalo to which the Id belongs.
float getNoise(const IdentifierHash h, const int gain) const
Accessor by IdentifierHash and gain.
LocalHadDimensionId
enums to identify user dimensions id number DIMC_* - classification, DIMW_*-weighting,...
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
std::vector< float > LocalHadCoeff
Correction parameters for one general bin.
@ HAD_WEIGHT
Hadronic weight (E_w/E_em)
CaloSampling::CaloSample CaloSample
Hold binned correction data for local hadronic calibration procedure.
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
float getDx() const
return size of bin
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
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.)
float volume() const
cell volume
float getXmax() const
return maximum value for the last bin
CaloGain::CaloGain gain() const
get gain (data member )
StatusCode initialize(bool used=true)
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
static const std::string & getSamplingName(const CaloSampling::CaloSample theSample)
Returns a string (name) for each CaloSampling.
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
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.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
void nextDDE(Iter iter, Iter endIter)
Prefetch next CaloDDE.
virtual double eta() const override final
get eta (through CaloDetDescrElement)