#include <CaloSwEtamod_g3.h>
|
| virtual void | makeCorrection (const Context &myctx, xAOD::CaloCluster *cluster) const override |
| virtual StatusCode | initialize () override |
| | Initialize method.
|
| 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 |
| virtual void | makeCorrection (const Context &myctx, xAOD::CaloCluster *) const =0 |
| 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.
|
| Context | context (const EventContext &ctx) const |
| | Create a Context object.
|
| virtual void | writeConstants (std::ostream &stream, const std::string &name, const EventContext &ctx) const |
| | Dump method (for debugging)
|
| virtual StatusCode | mergeConstants (CaloRec::ToolConstants &out, const EventContext &ctx) const override |
| | Merge our constants into out with the proper prefix.
|
| virtual int | toolVersion () const |
| | Return the version number for this tool.
|
| virtual const std::string & | toolType () const |
| | Return the name of the type of this tool.
|
Definition at line 39 of file CaloSwEtamod_g3.h.
◆ base_class
◆ Constant
◆ Context
◆ CaloSwEtamod_g3()
| CaloSwEtamod_g3::CaloSwEtamod_g3 |
( |
| ) |
|
|
privatedelete |
◆ context()
Create a Context object.
This can then be passed to Constant::operator().
◆ execute() [1/2]
| StatusCode CaloClusterCorrection::execute |
( |
const EventContext & | ctx, |
|
|
xAOD::CaloCluster * | cluster ) const |
|
overrideinherited |
Definition at line 53 of file CaloClusterCorrection.cxx.
55{
57
58#if 0
61 <<
" " << cluster->
etaSample(CaloSampling::EMB1)
62 <<
" " << cluster->
etaSample(CaloSampling::EMB2)
65 <<
" " << cluster->
phiSample(CaloSampling::EMB1)
66 <<
" " << cluster->
phiSample(CaloSampling::EMB2)
68#endif
69
70 return StatusCode::SUCCESS;
71}
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.
47{
50 }
51 return StatusCode::SUCCESS;
52}
#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() [1/2]
◆ makeCorrection() [2/2]
Definition at line 41 of file CaloSwEtamod_g3.cxx.
43{
44 float aeta = fabs (cluster->
etaBE(2));
45 if (aeta > 2.5) return;
46
47 int ieta = m_neta(myctx)/2;
48 if (ieta > 3) return;
49
51
52 float u = fmod (aeta, 0.025);
53 float qetamod = coef[0] + coef[1]*u + coef[2]*u*u;
54
55 setenergy (cluster, qetamod * cluster->
e());
56}
Read-only multidimensional array.
◆ mergeConstants()
Merge our constants into out with the proper prefix.
- Parameters
-
| [out] | out | Object to receive our constants. |
| ctx | Event context. |
◆ setenergy()
| void CaloClusterCorrection::setenergy |
( |
xAOD::CaloCluster * | cluster, |
|
|
float | energy ) const |
|
virtualinherited |
Definition at line 94 of file CaloClusterCorrection.cxx.
95{
96 if (cluster->
e() == 0) {
97 if (energy != 0)
99 <<
"Attempt to rescale zero-energy cluster to energy " <<
energy
100 << " ignored.";
101 return;
102 }
103
105 cluster->
setE(energy);
106
107
108
109 for (int iSample=CaloSampling::PreSamplerB;
110 iSample < CaloSampling::Unknown;
111 ++iSample)
112 {
115 double e = cluster->
eSample(sampling);
116 cluster->
setEnergy(sampling,e*correction) ;
117 }
118 }
119}
#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 74 of file CaloClusterCorrection.cxx.
79{
81 cluster->
setEta(sampling, etam);
82 cluster->
setPhi(sampling, phim);
83
84 cluster->
setEmax(sampling,emax);
87
90}
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.
◆ toolType()
Return the name of the type of this tool.
A saved set of constants includes both the C++ class name and a version number. Normally, the class name is taken from the Gaudi type() method, but that may be changed by overriding this method. This can be used, for example, when there are tools with distinct C++ classes but which are yet similar enough to combine together.
Reimplemented in CaloSwEta1b_g3, CaloSwEta1e_g3, CaloSwEta2b_g3, and CaloSwEta2e_g3.
◆ toolVersion()
Return the version number for this tool.
A saved set of constants includes both the C++ class name and a version number. The idea is that the version number can be bumped whenever there's a backwards-incompatible change; this gives some protection against trying to use an old version of a tool with an incompatible newer set of constants.
If you want a tool to have a version number, override this method. Otherwise, it will default to a version number of 0.
◆ writeConstants()
| virtual void CaloUtils::ToolWithConstants< BASE >::writeConstants |
( |
std::ostream & | stream, |
|
|
const std::string & | name, |
|
|
const EventContext & | ctx ) const |
|
virtualinherited |
Dump method (for debugging)
- Parameters
-
| stream | Ostream to which to write. |
| name | Name to go in output |
| ctx | Event context. |
◆ m_caloMgrKey
◆ m_correction
◆ m_DBHandle
Handle to a ToolConstants conditions object.
Definition at line 534 of file ToolWithConstants.h.
535{ this, "DBHandleKey", "", "" };
◆ m_impl
◆ m_isdummy
If true, then this is a dummy tool that should not be executed.
This is used for the case of reading from COOL using hierarchical tags: we need to have such tags associated with some object in each folder, regardless of whether or not the correction from that folder is actually used. [Every folder that IOVDbSvc knows about at configuration time needs to have a valid object for the configured tag, else IOVDbSvc will raise a fatal error. But we don't know at configuration time which folders we're actually going to need, so we gotta configure all of them.]
Definition at line 560 of file ToolWithConstants.h.
561{this, "isDummy", false };
◆ m_neta
| Constant<int> CaloSwEtamod_g3::m_neta { this, "eta_size", "" } |
|
private |
◆ m_order
Used to fix the ordering of tools when we're initializing from COOL based on a hierarchical tag.
Tools should be executed in order of increasing m_order.
Definition at line 547 of file ToolWithConstants.h.
◆ m_prefix
Prefix for finding our constants within the ToolConstants object.
Definition at line 538 of file ToolWithConstants.h.
539{ this, "prefix", "", "" };
The documentation for this class was generated from the following files: