|
ATLAS Offline Software
|
Cluster correction tool which applies local hadronic calibration w eights to the cells. The weight are provided by ICellWeight tools.
More...
#include <CaloClusterLocalCalib.h>
|
virtual StatusCode | initialize () override |
| Tool initialization: load calibration tools specified by jobOptions. More...
|
|
virtual StatusCode | execute (const EventContext &ctx, xAOD::CaloCluster *theCluster) const override |
| Execute on a single cluster. More...
|
|
| CaloClusterLocalCalib (const std::string &type, const std::string &name, const IInterface *parent) |
| Standard AlgTool constructor. More...
|
|
virtual StatusCode | execute (const EventContext &ctx, xAOD::CaloCluster *cluster) const=0 |
| Apply corrections to cluster. More...
|
|
virtual StatusCode | execute (xAOD::CaloCluster *cluster) final |
| Apply corrections to cluster. More...
|
|
virtual StatusCode | execute (const EventContext &ctx, xAOD::CaloClusterContainer *collection) const |
| Apply corrections to cluster. More...
|
|
virtual StatusCode | execute (xAOD::CaloCluster *cluster) final |
| Execute on a single cluster. More...
|
|
virtual StatusCode | execute (const EventContext &ctx, xAOD::CaloClusterContainer *collection) const |
| Execute on an entire collection of clusters. More...
|
|
virtual StatusCode | execute (xAOD::CaloClusterContainer *collection) final |
| Execute on an entire collection of clusters. More...
|
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Cluster correction tool which applies local hadronic calibration w eights to the cells. The weight are provided by ICellWeight tools.
Definition at line 32 of file CaloClusterLocalCalib.h.
◆ StoreGateSvc_t
◆ CaloClusterLocalCalib()
CaloClusterLocalCalib::CaloClusterLocalCalib |
( |
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]
◆ execute() [1/7]
virtual StatusCode CaloClusterProcessor::execute |
Apply corrections to cluster.
◆ execute() [2/7]
Execute on a single cluster.
- Parameters
-
cluster | The cluster to process. |
ctx | The event context. |
Implements CaloClusterProcessor.
Definition at line 59 of file CaloClusterLocalCalib.cxx.
68 bool isSelected (
false);
79 double emprobability(0.);
93 double oldEnergy = theCluster->e();
105 for(;cellIter!=theCluster->cell_end();cellIter++) {
107 double CellEnergy = pCell->
e();
110 if( CellEnergy < 0. ) CellEnergy = -1 * pCell->
e();
112 double cellWeight = cellIter.
weight();
113 myCluster->
addCell(cellIndex,cellWeight);
135 if (
tool->weight(myCluster.get(),ctx).isFailure())
136 msg(MSG::ERROR) <<
" failed to weight cluster " <<
endmsg;
140 std::map<IdentifierHash,double> weightMap;
143 for(;mycellIter!=mycellIterEnd;mycellIter++) {
144 const CaloCell* pCell = *mycellIter;
145 double cellWeight = mycellIter.
weight();
148 weightMap[myHashId] = cellWeight;
154 cellIter = theCluster->cell_begin();
155 for(;cellIter!=theCluster->cell_end();cellIter++) {
158 double weight = weightMap[myHashId];
159 theCluster->reweightCell(cellIter,
weight);
167 double newWeightMoment = theCluster->e()/oldEnergy;
171 if(
m_calibTools[0].typeAndName() ==
"CaloLCOutOfClusterTool/LCOutPi0")
175 newWeightMoment *= ooc_weight;
183 if (
tool->weight(theCluster,ctx).isFailure())
184 msg(MSG::ERROR) <<
" failed to weight cluster " <<
endmsg;
194 return StatusCode::SUCCESS;
◆ execute() [3/7]
StatusCode CaloClusterProcessor::execute |
◆ execute() [4/7]
Execute on an entire collection of clusters.
- Parameters
-
collection | The container of clusters. |
This will iterate over all the clusters in collection
and call execute
on each one individually.
- Parameters
-
collection | The container of clusters. |
ctx | The event context. |
This will iterate over all the clusters in collection
and call execute
on each one individually.
Implements CaloClusterCollectionProcessor.
Reimplemented in CaloClusterRemoveBad.
Definition at line 57 of file CaloClusterProcessor.cxx.
65 return StatusCode::SUCCESS;
◆ execute() [5/7]
StatusCode CaloClusterProcessor::execute |
|
final |
◆ execute() [6/7]
Execute on a single cluster.
- Parameters
-
cluster | The cluster to process. (deprecated) |
Definition at line 43 of file CaloClusterProcessor.cxx.
45 return execute (Gaudi::Hive::currentContext(), cluster);
◆ execute() [7/7]
|
inlinefinalvirtualinherited |
Execute on an entire collection of clusters.
- Parameters
-
collection | The container of clusters. (deprecated) |
Definition at line 49 of file CaloClusterCollectionProcessor.h.
51 return execute (Gaudi::Hive::currentContext(), collection);
◆ 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 CaloClusterLocalCalib::initialize |
( |
| ) |
|
|
overridevirtual |
Tool initialization: load calibration tools specified by jobOptions.
Definition at line 35 of file CaloClusterLocalCalib.cxx.
38 msg(MSG::ERROR) <<
"More than one classification tool specified!" <<
endmsg;
39 return StatusCode::FAILURE;
53 msg(MSG::ERROR) <<
"Please specify at least one valid reco status with ClusterRecoStatus = [...] for this calib tool " <<
endmsg;
54 return StatusCode::FAILURE;
56 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& CaloClusterProcessor::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ 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()
◆ m_absOpt
bool CaloClusterLocalCalib::m_absOpt |
|
private |
◆ m_calibTools
◆ m_classificationTool
◆ m_detStore
◆ m_evtStore
◆ m_recoStatus
std::vector<int> CaloClusterLocalCalib::m_recoStatus |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
static std::unique_ptr< xAOD::CaloCluster > makeCluster(const CaloCellContainer *cellCont)
Creates a valid CaloCluster with a private Aux-Store and CellLink container.
def retrieve(aClass, aKey=None)
ToolHandleArray< IClusterClassificationTool > m_classificationTool
property: Classification tools
bool m_absOpt
if set to true, negative clusters are weighted as well
@ OOC_WEIGHT
Out-of-cluster weight (E_ooc/E_w)
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version)
IdentifierHash calo_cell_hash(const Identifier cellId) const
create hash id from 'global' cell id
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloCluster *theCluster) const override
Execute on a single cluster.
StatusIndicator
reconstruction status word
CaloSampling::CaloSample CaloSample
@ EM_PROBABILITY
Classification probability to be em-like.
virtual void setStatus(const StatusIndicator &statusIndicator)
Set status.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloClusterContainer *collection) const =0
Execute on an entire collection of clusters.
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
void insertMoment(MomentType type, double value)
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
virtual double e() const override final
get energy (data member) (synonym to method energy()
bool setEnergy(const CaloSample sampling, const float e)
Set energy for a given sampling. Returns false if the sample isn't part of the cluster.
uint16_t provenance() const
get provenance (data member)
float time() const
get time (data member)
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
ToolHandleArray< IClusterCellWeightTool > m_calibTools
property: Array of IClusterCellWeightTool
@ DM_WEIGHT
Dead-material weight (E_dm/E_ooc)
void setRawE(flt_t)
Set Energy for signal state UNCALIBRATED.
@ HAD_WEIGHT
Hadronic weight (E_w/E_em)
(Non-const) Iterator class for DataVector/DataList.
@ OWN_ELEMENTS
this data object owns its elements
std::vector< int > m_recoStatus
property: vector of valid Reco Statuses for the clusters in order to be calibrated
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
@ ISOLATION
Energy weighted fraction of non-clustered perimeter cells.
#define CHECK(...)
Evaluate an expression and check for errors.
Helper class for offline cell identifiers.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
@ FIRST_ENG_DENS
First Moment in E/V.
uint16_t quality() const
get quality (data member)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
virtual bool checkStatus(const StatusIndicator &statusIndicator) const
Check status.
CaloClusterProcessor(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
CaloGain::CaloGain gain() const
get gain (data member )
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
Container class for CaloCell.
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
Data object for each calorimeter readout cell.
bool addCell(const unsigned index, const double weight)
Method to add a cell to the cluster (Beware: Kinematics not updated!)
const_cell_iterator cell_end() const
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.
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.
virtual StatusCode execute(const EventContext &ctx, xAOD::CaloCluster *cluster) const =0
Execute on a single cluster.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
reconstruction status indicator
virtual double e() const
The total energy of the particle.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.