|
ATLAS Offline Software
|
Go to the documentation of this file.
14 TVector3 theVertexVector(vertexToCorrectTo.
x(), vertexToCorrectTo.
y(), vertexToCorrectTo.
z());
20 TLorentzVector theNewVector(0.0,0.0,0.0,0.0);
21 theNewVector.SetPtEtaPhiM(fe.
pt(), fe.
eta(), fe.
phi(), fe.
m());
29 float clusterEta = theFourVector.Eta();
32 float centerMag = accCenterMag(fe);
34 float radius = centerMag/cosh(clusterEta);
36 float EtaVertexCorrection = 0.0, PhiVertexCorrection = 0.0;
37 float clusterPhi = theFourVector.Phi();
39 if (
radius > 1.0 && centerMag > 1
e-3){
40 EtaVertexCorrection = (-vertexToCorrectTo.Z()/cosh(clusterEta) + (vertexToCorrectTo.X()*
cos(clusterPhi) + vertexToCorrectTo.Y()*
sin(clusterPhi))*tanh(clusterEta))/
radius;
41 PhiVertexCorrection = (vertexToCorrectTo.X()*
sin(clusterPhi) - vertexToCorrectTo.Y()*
cos(clusterPhi))/
radius;
44 float etaVertexCorrected = clusterEta + EtaVertexCorrection;
45 float p = std::sqrt(theFourVector.E()*theFourVector.E()-theFourVector.M()*theFourVector.M());
46 float ptVertexCorrected =
p/cosh(etaVertexCorrected);
47 theFourVector.SetPtEtaPhiM(ptVertexCorrected, etaVertexCorrected, clusterPhi + PhiVertexCorrection, theFourVector.M());
56 if(cluster !=
nullptr){
57 double tmpValue(-99.);
59 value =
static_cast<float>(tmpValue);
67 if(!momentName.empty()){
69 if(
acc.isAvailable(fe)){
81 if(accEPerSampling.
isAvailable(fe))
return accEPerSampling(fe);
114 std::vector<float>
result(28, 0);
115 result[0] = accPreSamplerB(fe);
119 result[4] = accPreSamplerE(fe);
127 result[12] = accTileBar0(fe);
128 result[13] = accTileBar1(fe);
129 result[14] = accTileBar2(fe);
130 result[15] = accTileGap1(fe);
131 result[16] = accTileGap2(fe);
132 result[17] = accTileGap3(fe);
133 result[18] = accTileExt0(fe);
134 result[19] = accTileExt1(fe);
135 result[20] = accTileExt2(fe);
136 result[21] = accFCAL0(fe);
137 result[22] = accFCAL1(fe);
138 result[23] = accFCAL2(fe);
139 result[24] = accMINIFCAL0(fe);
140 result[25] = accMINIFCAL1(fe);
141 result[26] = accMINIFCAL2(fe);
142 result[27] = accMINIFCAL3(fe);
186 return xAOD::Type::Other;
192 const std::string& attributeName,
199 float float_moment = moment;
200 feAttribute(theFE) = float_moment;
206 const std::string& attributeName,
210 feAttribute(theFE) = theCluster.
eSample(sampling);
215 const std::array< std::pair<xAOD::CaloCluster::MomentType, const std::string>, 12> momentAttributePairs{{
230 for (
const auto & [moment,attribute]:momentAttributePairs) this->
addMoment(moment,attribute,theCluster,theFE);
235 const std::array< std::pair<xAOD::CaloCluster::MomentType, const std::string>, 4> momentAttributePairs{{
242 for (
const auto & [moment,attribute]:momentAttributePairs) this->
addMoment(moment,attribute,theCluster,theFE);
248 static const std::array< std::pair<xAOD::CaloCluster::CaloSample, const SG::AuxElement::Accessor<float>>, 28> samplingAttributePairs{{
279 for (
const auto & [sampling,attribute]:samplingAttributePairs) {
280 attribute(theFE) = theCluster.
eSample(sampling);
@ CENTER_MAG
Cluster Centroid ( )
@ SECOND_R
Second Moment in .
float x() const
Returns the x position.
void addStandardSamplingEnergies(xAOD::FlowElement &theFE, const xAOD::CaloCluster &theCluster)
void addSamplingEnergy(const xAOD::CaloCluster::CaloSample &sampling, const std::string &attributeName, const xAOD::CaloCluster &theCluster, xAOD::FlowElement &theFE)
@ ENG_FRAC_CORE
Energy fraction of the sum of the hottest cells in each sampling.
void addStandardMoments(xAOD::FlowElement &theFE, const xAOD::CaloCluster &theCluster)
@ EM_PROBABILITY
Classification probability to be em-like.
virtual double m() const override
The invariant mass of the particle.
Helper class to provide type-safe access to aux data.
std::size_t nOtherObjects() const
@ AVG_LAR_Q
Sum(E_cell_LAr^2 Q_cell_LAr)/Sum(E_cell_LAr^2)
std::string getClusterMomentName(xAOD::CaloCluster::MomentType momentType)
void addStandardCalHitMoments(xAOD::FlowElement &theFE, const xAOD::CaloCluster &theCluster)
@ CENTER_LAMBDA
Shower depth at Cluster Centroid.
bool addMoment(const xAOD::CaloCluster::MomentType &momentType, const std::string &attributeName, const xAOD::CaloCluster &theCluster, xAOD::FlowElement &theFE)
Function to add cluster moments onto FE.
virtual double phi() const override
The azimuthal angle ( ) of the particle.
Helper class to provide constant type-safe access to aux data.
virtual double pt() const override
@ ENG_FRAC_MAX
Energy fraction of hottest cell.
std::vector< float > getEnergiesPerSampling(const xAOD::FlowElement &fe)
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
@ SECOND_LAMBDA
Second Moment in .
MomentType
Enums to identify different moments.
TrackCaloCluster_v1 TrackCaloCluster
Reference the current persistent version:
TrackParticle_v1 TrackParticle
Reference the current persistent version:
FillNeutralFlowElements()
Description of a calorimeter cluster.
@ CELL_SIG_SAMPLING
CaloSample of the cell with the largest |E|/sig.
@ ENG_CALIB_TOT
Calibration Hit energy inside the cluster.
void vertexCorrectTheFourVector(const xAOD::FlowElement &fe, const TVector3 &vertexToCorrectTo, TLorentzVector &theFourVector)
@ ENG_CALIB_FRAC_EM
Calibration Hit energy inside the cluster caused by e/gamma/pi0.
@ ISOLATION
Energy weighted fraction of non-clustered perimeter cells.
@ ENG_CALIB_FRAC_REST
Calibration Hit energy inside the cluster caused by other particles.
signal_t signalType() const
@ ParticleFlow
The object is a particle-flow object.
bool retrieveMoment(MomentType type, double &value) const
Retrieve individual moment.
float z() const
Returns the z position.
@ FIRST_ENG_DENS
First Moment in E/V.
xAOD::Type::ObjectType signalToXAODType(const xAOD::FlowElement &fe)
@ ENG_BAD_CELLS
Total em-scale energy of bad cells in this cluster.
@ AVG_TILE_Q
Sum(E_cell_Tile^2 Q_cell_Tile)/Sum(E_cell_Tile^2)
struct TBPatternUnitContext Muon
virtual double eta() const override
The pseudorapidity ( ) of the particle.
float eSample(const CaloSample sampling) const
bool getClusterMoment(const xAOD::FlowElement &fe, xAOD::CaloCluster::MomentType momentType, float &value)
Class describing a Vertex.
@ SIGNIFICANCE
Cluster significance.
const xAOD::IParticle * otherObject(std::size_t i) const
float y() const
Returns the y position.
@ LATERAL
Normalized lateral moment.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
@ DELTA_ALPHA
Angular shower axis deviation ( ) from IP-to-Center.
@ ENG_CALIB_FRAC_HAD
Calibration Hit energy inside the cluster caused by charged pi+ and pi-.
@ CELL_SIGNIFICANCE
Cell significance = E/sig of the cell with the largest |E|/sig.
@ LONGITUDINAL
Normalized longitudinal moment.
TLorentzVector getVertexCorrectedFourVec(const xAOD::FlowElement &fe, const xAOD::Vertex &vertexToCorrectTo)
@ N_BAD_CELLS
number of bad cells
@ ENG_POS
Total positive Energy of this cluster.
A detector object made of other lower level object(s)
@ BADLARQ_FRAC
Energy fraction of LAr cells with quality larger than a given cut.