#include <CaloClusterBadChannelList.h>
|
| | CaloClusterBadChannelList (const std::string &type, const std::string &name, const IInterface *parent) |
| virtual StatusCode | initialize () override |
| virtual void | makeCorrection (const Context &myctx, xAOD::CaloCluster *cluster) const 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 25 of file CaloClusterBadChannelList.h.
◆ CaloClusterBadChannelList()
| CaloClusterBadChannelList::CaloClusterBadChannelList |
( |
const std::string & | type, |
|
|
const std::string & | name, |
|
|
const IInterface * | parent ) |
◆ execute() [1/2]
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 CaloClusterBadChannelList::initialize |
( |
| ) |
|
|
overridevirtual |
Reimplemented from CaloClusterCorrection.
Definition at line 29 of file CaloClusterBadChannelList.cxx.
30{
32
33
34
37}
#define CHECK(...)
Evaluate an expression and check for errors.
ToolHandle< ICaloBadChanTool > m_badChannelTool
virtual StatusCode initialize() override
SG::Accessor< T, ALLOC > Accessor
◆ makeCorrection()
Implements CaloClusterCorrection.
Definition at line 40 of file CaloClusterBadChannelList.cxx.
42{
44
47 for( ;cellIter!=cellIterEnd;cellIter++) {
48 const CaloCell*
cell = (*cellIter);
49 const Identifier
id =
cell->ID();
51 bool isBad =
cell->badcell();
56
58 if (isBad && !
status.dead()) {
60 }
62 <<
eta <<
" " <<
phi <<
" " << layer <<
" " << myword);
63 badChanList.emplace_back(
eta,
phi, layer, myword);
64 }
65 }
67}
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
static void setBit(ProblemType pb, BitWord &word, bool value=true)
Sets the bit corresponding to "pb" inside the word passed as second argument to "value".
CaloClusterCellLink::iterator cell_iterator
Iterator of the underlying CaloClusterCellLink (non-const version).
const_cell_iterator cell_end() const
const_cell_iterator cell_begin() const
Iterator of the underlying CaloClusterCellLink (const version).
void setBadChannelList(const CaloClusterBadChannelList &bcl)
std::vector< CaloClusterBadChannelData > CaloClusterBadChannelList
◆ 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.
◆ m_badChannelTool
Initial value:{this, "badChannelTool", "CaloBadChanTool"
, "Tool handle for bad channel"}
Definition at line 45 of file CaloClusterBadChannelList.h.
45 {this, "badChannelTool", "CaloBadChanTool"
46 , "Tool handle for bad channel"};
◆ m_caloMgrKey
The documentation for this class was generated from the following files: