#include <CaloSwPhimod_g3.h>
|
| virtual void | makeCorrection (const Context &myctx, xAOD::CaloCluster *cluster) const override |
| virtual StatusCode | initialize () override |
| virtual void | setsample (xAOD::CaloCluster *cluster, CaloSampling::CaloSample sampling, float em, float etam, float phim, float emax, float etamax, float phimax, float etas, float phis) const |
| virtual void | setenergy (xAOD::CaloCluster *cluster, float energy) const |
| StatusCode | execute (const EventContext &ctx, xAOD::CaloCluster *cluster) const override |
| virtual StatusCode | execute (const EventContext &ctx, xAOD::CaloClusterContainer *collection) const |
| | Execute on an entire collection of clusters.
|
Definition at line 41 of file CaloSwPhimod_g3.h.
◆ CaloSwPhimod_g3()
| CaloSwPhimod_g3::CaloSwPhimod_g3 |
( |
| ) |
|
|
privatedelete |
◆ execute() [1/2]
Definition at line 52 of file CaloClusterCorrection.cxx.
54{
56
57#if 0
60 <<
" " << cluster->
etaSample(CaloSampling::EMB1)
61 <<
" " << cluster->
etaSample(CaloSampling::EMB2)
64 <<
" " << cluster->
phiSample(CaloSampling::EMB1)
65 <<
" " << cluster->
phiSample(CaloSampling::EMB2)
67#endif
68
69 return StatusCode::SUCCESS;
70}
virtual void makeCorrection(const Context &myctx, xAOD::CaloCluster *) const =0
float phiBE(const unsigned layer) const
Get the phi in one layer of the EM Calo.
float phiSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
virtual double eta() const
The pseudorapidity ( ) of the particle.
virtual double e() const
The total energy of the particle.
virtual double phi() const
The azimuthal angle ( ) of the particle.
float etaSample(const CaloSample sampling) const
Retrieve barycenter in a given sample.
float etaBE(const unsigned layer) const
Get the eta in one layer of the EM Calo.
◆ execute() [2/2]
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.
Definition at line 65 of file CaloClusterProcessor.cxx.
46{
49 }
50 return StatusCode::SUCCESS;
51}
#define ATH_CHECK
Evaluate an expression and check for errors.
StatusCode execute(const EventContext &ctx, xAOD::CaloCluster *cluster) const override
CaloCluster_v1 CaloCluster
Define the latest version of the calorimeter cluster class.
◆ initialize()
| StatusCode CaloClusterCorrection::initialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ makeCorrection()
Implements CaloClusterCorrection.
Definition at line 38 of file CaloSwPhimod_g3.cxx.
40{
41
42 float eta2 = cluster->
etaBE(2);
43 float phi2 = cluster->
phiBE(2);
44 if (eta2 < -900 || phi2 < -900)
45 return;
46
47 float aeta2 = fabs(eta2);
48 float nabs;
49 if (aeta2 < 1.5)
50 nabs = 1024;
51 else if (aeta2 < 2.5)
52 nabs = 768;
53 else
54 nabs = 256.;
55
56 std::vector<float> tab = qphmop (myctx, aeta2);
57 assert (tab.size() == 5);
58 float qphimod =
59 tab[0] +
60 tab[1] * cos(nabs*phi2) +
61 tab[2] * cos(2.*nabs*phi2)+
62 tab[3] * cos(3.*nabs*phi2)+
63 tab[4] * sin(nabs*phi2);
64
65
66 setenergy(cluster, qphimod * cluster->
e());
67
68
69}
◆ qphmop()
| std::vector< float > CaloSwPhimod_g3::qphmop |
( |
const Context & | myctx, |
|
|
float | eta ) const |
|
private |
Definition at line 71 of file CaloSwPhimod_g3.cxx.
73{
74 std::vector<float> coef;
75
77 if (correction.size() == 0) {
79 coef.resize(5);
80 return coef;
81 }
82
83 coef.resize (correction.size(1)-1);
84
85 int i1 = 0;
86 int i2 = 0;
87 if (aeta < correction[0][0]) {
88 for (unsigned int j = 1; j < correction.size(1); j++)
89 coef[j-1] = correction[0][j];
90 return coef;
91 }
92
93 else if (aeta >= correction[0][0]) {
95 if (aeta >= correction[i][0] && aeta < correction[i+1][0]) {
98 break;
99 }
100 }
101 }
102 if (i1 == i2) {
104 i1 = i2-1;
105 }
106
108 if (deta == 0)
109 deta = 1;
110
115 }
116
118}
Constant< CxxUtils::Array< 2 > > m_correction
Calibration constant: tabulated arrays of function parameters.
Read-only multidimensional array.
float j(const xAOD::IParticle &, const xAOD::TrackMeasurementValidation &hit, const Eigen::Matrix3d &jab_inv)
◆ setenergy()
| void CaloClusterCorrection::setenergy |
( |
xAOD::CaloCluster * | cluster, |
|
|
float | energy ) const |
|
virtualinherited |
Definition at line 93 of file CaloClusterCorrection.cxx.
94{
95 if (cluster->
e() == 0) {
96 if (energy != 0)
98 <<
"Attempt to rescale zero-energy cluster to energy " <<
energy
99 << " ignored.";
100 return;
101 }
102
104 cluster->
setE(energy);
105
106
107
108 for (int iSample=CaloSampling::PreSamplerB;
109 iSample < CaloSampling::Unknown;
110 ++iSample)
111 {
114 double e = cluster->
eSample(sampling);
115 cluster->
setEnergy(sampling,e*correction) ;
116 }
117 }
118}
#define REPORT_MESSAGE(LVL)
Report a message.
float eSample(const CaloSample sampling) const
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.
bool hasSampling(const CaloSample s) const
Checks if certain smapling contributes to cluster.
◆ setsample()
| void CaloClusterCorrection::setsample |
( |
xAOD::CaloCluster * | cluster, |
|
|
CaloSampling::CaloSample | sampling, |
|
|
float | em, |
|
|
float | etam, |
|
|
float | phim, |
|
|
float | emax, |
|
|
float | etamax, |
|
|
float | phimax, |
|
|
float | etas, |
|
|
float | phis ) const |
|
virtualinherited |
Definition at line 73 of file CaloClusterCorrection.cxx.
78{
80 cluster->
setEta(sampling, etam);
81 cluster->
setPhi(sampling, phim);
82
83 cluster->
setEmax(sampling,emax);
86
89}
bool setPhi(const CaloSample sampling, const float phi)
Set in a given sampling. Returns false if the sample isn't part of the cluster.
bool setEtasize(const CaloSample sampling, const float etaSize)
Set the cluster size in for a given sampling.
bool setPhisize(const CaloSample sampling, const float phiSize)
Set the cluster size in for a given sampling.
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 setEtamax(const CaloSample sampling, const float etaMax)
Set the eta of the cell with the highest energy in a particular sampling.
◆ m_caloMgrKey
◆ m_correction
| Constant<CxxUtils::Array<2> > CaloSwPhimod_g3::m_correction { this, "correction", "" } |
|
private |
The documentation for this class was generated from the following files: