![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
6 #include "GaudiKernel/MsgStream.h"
7 #include "GaudiKernel/ListItem.h"
19 const std::string&
name,
22 m_classificationTool(this),
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;
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;
155 for(;cellIter!=theCluster->
cell_end();cellIter++) {
158 double weight = weightMap[myHashId];
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;
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
virtual StatusCode initialize() override
Tool initialization: load calibration tools specified by jobOptions.
bool m_absOpt
if set to true, negative clusters are weighted as well
@ OOC_WEIGHT
Out-of-cluster weight (E_ooc/E_w)
double eSample(sampling_type sampling) const
Retrieve energy in a given sampling.
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version)
void reweightCell(const CaloCell *pCell, double weight)
Reweight a cell with kinematic update.
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)
weight_t weight() const
Accessor for weight associated to this cell.
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()
cell_iterator cell_end() const
Retrieve a STL-type end() iterator for the cell store.
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)
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
Definition of CaloDetDescrManager.
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
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)
@ 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
::StatusCode StatusCode
StatusCode definition for legacy code.
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
void insertMoment(const moment_type &momType, const moment_value &momValue, bool useLink=true)
Set individual moment.
@ ISOLATION
Energy weighted fraction of non-clustered perimeter cells.
Principal data class for CaloCell clusters.
CaloClusterLocalCalib(const std::string &type, const std::string &name, const IInterface *parent)
Standard AlgTool constructor.
Helper class for offline cell identifiers.
@ FIRST_ENG_DENS
First Moment in E/V.
uint16_t quality() const
get quality (data member)
virtual bool checkStatus(const StatusIndicator &statusIndicator) const
Check status.
cell_iterator cell_begin() const
Retrieve a STL-type begin() iterator for the cell store.
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.
Data object for each calorimeter readout cell.
void push_back(CaloCell *)
reimplementation of const push_back
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
virtual double e() const
Retrieve energy independent of signal state.
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.
bool retrieveMoment(const moment_type &momType, moment_value &momValue, bool useLink=true) const
Retrieve individual moment.
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.
reconstruction status indicator
virtual double e() const
The total energy of the particle.