18 vsprintf(buffer,
fmt,args);
20 return std::string(buffer);
39 double celleta(dde->
eta());
40 double cellphi(dde->
phi());
52 if ( onlyKine )
return true;
61 int fsam((
int)CaloSampling::Unknown);
62 if ( isam < 0 || isam >= fsam ) {
return false; }
83 case CaloSampling::PreSamplerE:
84 case CaloSampling::EME1:
85 case CaloSampling::EME2:
86 case CaloSampling::EME3:
87 case CaloSampling::HEC0:
88 case CaloSampling::HEC1:
89 case CaloSampling::HEC2:
90 case CaloSampling::HEC3:
91 case CaloSampling::FCAL0:
92 case CaloSampling::FCAL1:
93 case CaloSampling::FCAL2:
94 case CaloSampling::MINIFCAL0:
95 case CaloSampling::MINIFCAL1:
96 case CaloSampling::MINIFCAL2:
97 case CaloSampling::MINIFCAL3:
106 if ( sam != CaloSampling::PreSamplerB && sam != CaloSampling::PreSamplerE ) {
107 unsigned int pmask = dde->
is_tile() ? 0x8080 : 0x2000;
125 if ( pClus ==
nullptr ) {
return false; }
129 if ( clk ==
nullptr || clk->
size() == 0 ) {
return false; }
135 auto citer(clk->
begin());
136 while ( citer != clk->
end() && retflg ) {
137 if ( *citer !=
nullptr ) { retflg =
cellAccumulator(**citer,accum,citer.weight(),onlyKine); } ++citer; }
138 if ( !retflg ) {
return false; }
155 if ( onlyKine ) {
return true; }
165 uint32_t samplingPattern(0);
166 for (
int i(0); i<(int)CaloSampling::Unknown; ++i ) {
175 for (
int i(0); i<(int)CaloSampling::Unknown; ++i ) {
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
CaloPhiRange class declaration.
Data object for each calorimeter readout cell.
float time() const
get time (data member)
virtual double e() const override final
get energy (data member) (synonym to method energy()
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
uint16_t provenance() const
get provenance (data member)
Bookkeeping of cells that make up a cluster Simplified replacement for CaloCellLink,...
const_iterator end() const
const end method
size_t size() const
size method
const_iterator begin() const
const begin method
This class groups all DetDescr information related to a CaloCell.
bool is_tile() const
cell belongs to Tile
CaloCell_ID::CaloSample getSampling() const
cell sampling
float eta() const
cell eta
float phi() const
cell phi
static double fix(double phi)
bool setPhi(const CaloSample sampling, const float phi)
Set in a given sampling. Returns false if the sample isn't part of the cluster.
const CaloClusterCellLink * getCellLinks() const
Get a pointer to the CaloClusterCellLink object (const version)
void setTime(flt_t)
Set cluster time.
bool setPhimax(const CaloSample sampling, const float phiMax)
Set the phi of the cell with the highest energy in a particular sampling.
bool setEta(const CaloSample sampling, const float eta)
Set in a given sampling. Returns false if the sample isn't part of the cluster.
bool setEmax(const CaloSample sampling, const float eMax)
Set the Energy of the cell with the highest energy in a particular sampling.
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.
void setSamplingPattern(const unsigned sp, const bool clearSamplingVars=false)
Set sampling pattern (one bit per sampling.
bool setEtamax(const CaloSample sampling, const float etaMax)
Set the eta of the cell with the highest energy in a particular sampling.
void clearSamplingData()
Clear the sampling data.
unsigned samplingPattern() const
Access to sampling pattern (one bit per sampling) (Method may be removed later)
void setM(flt_t)
Set Mass for the current signal state.
bool cellAccumulator(const CaloCell &rcell, CaloClusterSignalAccumulator &accum, double weight, bool onlyKine=false)
bool calculateKine(xAOD::CaloCluster *pClus, bool onlyKine=false)
Kinematic updates.
std::string fmtMsg(const char *fmt,...)
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
double proxim(double b, double a)
double cellWeight
Signal weight.
double cellAbsE
Absolute signal.
double accumPhi
Accumulated energy-weighted phi.
int nBarrel
Number of cells in barrel.
double accumTimeNorm
Time normalization.
double accumEta
Accumulated energy-weighted eta.
bool firstCell
Flags first cell.
int nEndcap
Number of cells in endcap.
double accumAbsE
Absolute signal.
double cellAbsWeight
Absolute Signal weight.
valarray_t maxEnergyInSample
Maxmimum energy.
valarray_t energyInSample
Energy.
valarray_t phiMaxEnergyInSample
Phi of maximum energy.
valarray_t etaMaxEnergyInSample
Eta of maximum energy.
valarray_t etaInSample
Eta.
valarray_t phiInSample
Phi.
boolarray_t presenceInSample
Flag for presens of sampling in cluster.
valarray_t posNormInSample
Positive (absolute) normalization energy.
Cache for data accumulator.
Tell the compiler to optimize assuming that FP may trap.
#define CXXUTILS_TRAPPING_FP