37 msg(MSG::INFO) <<
"Interpolation is ON, dimensions: ";
39 msg(MSG::INFO) <<
" " << (*it);
47 ATH_MSG_WARNING(
"Dimension '" << (*it) <<
"' is invalid and will be excluded." );
59 for (
int iSamp=0;iSamp<CaloSampling::Unknown;iSamp++) {
65 return StatusCode::SUCCESS;
79 return StatusCode::FAILURE;
82 std::vector<int> isAmpMap(CaloSampling::Unknown,-1);
83 for (
int iArea=0;iArea<
data->getSizeAreaSet();iArea++) {
84 for (
int iSamp=0;iSamp<CaloSampling::Unknown;iSamp++) {
87 isAmpMap[iSamp] = iArea;
93 double eEM = theCluster->
e();
95 std::vector<float> vars(5);
119 for (;itrCell!=itrCellEnd; ++itrCell) {
124 if ( isAmpMap[theSample] >= 0 ) {
126 double energy = fabs(itrCell->
e());
128 if ( std::isfinite(sigma) && sigma > 0 )
129 ratio = energy/sigma;
135 volume = myCDDE->
volume();
138 density = energy/volume;
140 double abseta = fabs(itrCell->
eta());
141 double log10edens = log10(density);
142 double log10cluse = log10(eEM);
145 if ( log10cluse > lemax ) log10cluse = lemax;
153 bool isDataOK =
false;
157 int iBin =
data->getBin(isAmpMap[theSample],vars);
184 weight *= (pi0Prob + (1-pi0Prob)*wData);
198 double new_weight (1);
200 ATH_MSG_ERROR(
"Cannot retrieve HAD_WEIGHT cluster moment." );
201 return StatusCode::FAILURE;
204 if ( eEM > 0 || eEM < 0 ) {
205 new_weight *= theCluster->
e()/eEM;
209 return StatusCode::SUCCESS;
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
char data[hepevt_bytes_allocation_ATLAS]
CaloSampling::CaloSample CaloSample
virtual double e() const override final
get energy (data member) (synonym to method energy()
virtual double phi() const override final
get phi (through CaloDetDescrElement)
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
virtual double eta() const override final
get eta (through CaloDetDescrElement)
CaloGain::CaloGain gain() const
get gain (data member )
Identifier ID() const
get ID (from cached data member) non-virtual and inline for fast access
weight_t weight() const
Accessor for weight associated to this cell.
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 class groups all DetDescr information related to a CaloCell.
float volume() const
cell volume
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.)
static CaloLocalHadDefs::LocalHadDimensionId getDimensionId(const std::string &dimensionName)
Class defines binning for user dimension.
float getDx() const
return size of bin
float getXmax() const
return maximum value for the last bin
Hold binned correction data for local hadronic calibration procedure.
std::vector< float > LocalHadCoeff
Correction parameters for one general bin.
float getNoise(const IdentifierHash h, const int gain) const
Accessor by IdentifierHash and gain.
virtual bool checkStatus(const StatusIndicator &statusIndicator) const
Check status.
static const std::string & getSamplingName(const CaloSampling::CaloSample theSample)
Returns a string (name) for each CaloSampling.
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
void reweightCell(cell_iterator it, const double weight)
Method to reweight a cell in the cluster (Beware: Kinematics not updated!)
CaloClusterCellLink::iterator cell_iterator
Iterator of the underlying CaloClusterCellLink (non-const version)
virtual double e() const
The total energy of the particle.
void insertMoment(MomentType type, double value)
const_cell_iterator cell_end() const
@ EM_PROBABILITY
Classification probability to be em-like.
@ HAD_WEIGHT
Hadronic weight (E_w/E_em)
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version)
CaloRecoStatus & recoStatus()
Accesssor to CaloRecoStatus (non-const)
void nextDDE(Iter iter, Iter endIter)
Prefetch next CaloDDE.
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
LocalHadDimensionId
enums to identify user dimensions id number DIMC_* - classification, DIMW_*-weighting,...