ATLAS Offline Software
Loading...
Searching...
No Matches
TBEMECCellEtaCorrection Class Reference

#include <TBEMECCellEtaCorrection.h>

Inheritance diagram for TBEMECCellEtaCorrection:
Collaboration diagram for TBEMECCellEtaCorrection:

Public Member Functions

 TBEMECCellEtaCorrection (const std::string &type, const std::string &name, const IInterface *parent)
virtual ~TBEMECCellEtaCorrection ()
virtual StatusCode initialize () override
virtual void MakeCorrection (CaloCell *theCell, const EventContext &ctx) const override
virtual StatusCode execute (CaloCellContainer *cellCollection, const EventContext &ctx) const
 AthAlgTool (const std::string &type, const std::string &name, const IInterface *parent)
 Constructor with parameters:
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize () override
 Perform system initialization for an algorithm.
virtual StatusCode sysStart () override
 Handle START transition.
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles.
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles.
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T, V, H > &t)
void updateVHKA (Gaudi::Details::PropertyBase &)
MsgStream & msg () const
bool msgLvl (const MSG::Level lvl) const

Static Public Member Functions

static const InterfaceID & interfaceID ()

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed.

Static Protected Member Functions

static void setenergy (CaloCell *lar_cell, float energy)
static void addenergy (CaloCell *lar_cell, float energy)
static void scaleenergy (CaloCell *lar_cell, float scale)

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey>

Private Attributes

bool m_EMEC_response_eta_correction
double m_EMEC_eta1
double m_EMEC_eta2
double m_EMEC_eta3
double m_EMEC_eta0_1
double m_EMEC_eta0_2
double m_EMEC_beta1
double m_EMEC_alpha1
double m_EMEC_beta2
double m_EMEC_alpha2
double m_ramp_corr
double m_ramp_corr_eta1
double m_ramp_corr_eta2
double m_EMEC_rescale
double m_FCAL_rescale
double m_EMEC_1_scale
double m_EMEC_2_scale
double m_HEC_0_scale
double m_HEC_1_scale
double m_HEC_2_scale
double m_FCAL_0_scale
double m_FCAL_1_scale
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default)
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool m_varHandleArraysDeclared

Detailed Description

Definition at line 28 of file TBEMECCellEtaCorrection.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< AlgTool > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ TBEMECCellEtaCorrection()

TBEMECCellEtaCorrection::TBEMECCellEtaCorrection ( const std::string & type,
const std::string & name,
const IInterface * parent )

Definition at line 17 of file TBEMECCellEtaCorrection.cxx.

20 : CaloCellCorrection(type, name, parent),
22 m_EMEC_eta1(2.5),m_EMEC_eta2(2.8),m_EMEC_eta3(3.2),
31{
32 declareInterface<CaloCellCorrection>(this);
33 // Cell level correction of EMEC eta-dependent response
34 declareProperty("EMEC_beta1",m_EMEC_beta1);
35 declareProperty("EMEC_beta2",m_EMEC_beta2);
36 declareProperty("EMEC_alpha1",m_EMEC_alpha1);
37 declareProperty("EMEC_alpha2",m_EMEC_alpha2);
38 declareProperty("ramp_corr",m_ramp_corr);
39 declareProperty("EMEC_rescale",m_EMEC_rescale);
40 declareProperty("FCAL_rescale",m_FCAL_rescale);
42 declareProperty("MiddleEta",m_EMEC_eta2);
44
45 declareProperty("EMEC1_scale",m_EMEC_1_scale);
46 declareProperty("EMEC2_scale",m_EMEC_2_scale);
47
48 declareProperty("HEC0_scale",m_HEC_0_scale);
49 declareProperty("HEC1_scale",m_HEC_1_scale);
50 declareProperty("HEC2_scale",m_HEC_2_scale);
51
52 declareProperty("FCAL0_scale",m_FCAL_0_scale);
53 declareProperty("FCAL1_scale",m_FCAL_1_scale);
54}
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)

◆ ~TBEMECCellEtaCorrection()

TBEMECCellEtaCorrection::~TBEMECCellEtaCorrection ( )
virtual

Definition at line 88 of file TBEMECCellEtaCorrection.cxx.

89{ }

Member Function Documentation

◆ addenergy()

void CaloCellCorrection::addenergy ( CaloCell * lar_cell,
float energy )
staticprotectedinherited

Definition at line 86 of file CaloCellCorrection.cxx.

87{
88 theCell->addEnergy( energy );
89}

◆ AthAlgTool()

AthAlgTool::AthAlgTool ( const std::string & type,
const std::string & name,
const IInterface * parent )
inherited

Constructor with parameters:

Definition at line 31 of file AthAlgTool.cxx.

◆ declareGaudiProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareGaudiProperty ( Gaudi::Property< T, V, H > & hndl,
const SG::VarHandleKeyType &  )
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158 {
160 hndl.value(),
161 hndl.documentation());
162
163 }

◆ declareProperty()

Gaudi::Details::PropertyBase & AthCommonDataStore< AthCommonMsg< AlgTool > >::declareProperty ( Gaudi::Property< T, V, H > & t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145 {
146 typedef typename SG::HandleClassifier<T>::type htype;
148 }
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>

◆ detStore()

const ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

◆ evtStore()

ServiceHandle< StoreGateSvc > & AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

◆ execute()

StatusCode CaloCellCorrection::execute ( CaloCellContainer * cellCollection,
const EventContext & ctx ) const
virtualinherited

Definition at line 50 of file CaloCellCorrection.cxx.

52{
53
54 ATH_MSG_DEBUG("Executing CaloCellCorrection");
55
56 if (!cellCollection) {
57 ATH_MSG_ERROR( "Cell Correction tool receives invalid cell Collection" );
58 return StatusCode::FAILURE;
59 }
60
61 // Loop over all the CaloCell Objects and call Make Correction.
62 // Note that this is the base class of all the concrete correction
63 // classes which implement a Make Correction method.
64
65 for (CaloCell* cell : *cellCollection) {
66 MakeCorrection ( cell, ctx );
67 }
68
69 // Done, Return success
70
71 return StatusCode::SUCCESS;
72
73}
#define ATH_MSG_ERROR(x)
#define ATH_MSG_DEBUG(x)
virtual void MakeCorrection(CaloCell *cellCollection, const EventContext &ctx) const =0

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase & ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ initialize()

StatusCode TBEMECCellEtaCorrection::initialize ( )
overridevirtual

Definition at line 57 of file TBEMECCellEtaCorrection.cxx.

58{
59 MsgStream log(msgSvc(), name());
60
61 log << MSG::INFO << " TBEMECCellEtaCorrection initialization " << endmsg ;
62
63 // Initialize variables for correction of EMEC response eta-dependance
64 if (m_EMEC_alpha1 == 0 && m_EMEC_alpha2 == 0 && m_EMEC_beta1 == 0 && m_EMEC_beta2 == 0) {
65 log << MSG::INFO << "No correction of EMEC response eta-dependance"
66 <<endmsg;
67 }
68 else {
72 log << MSG::INFO << "Correction of EMEC response eta-dependance is ON;"
73 <<endmsg;
74 log << MSG::INFO << "EMEC_eta0_1, EMEC_alpha1, EMEC_beta1 = " <<
75 m_EMEC_eta0_1 << " " << m_EMEC_alpha1 << " " << m_EMEC_beta1 << endmsg;
76 log << MSG::INFO << "EMEC_eta0_2, EMEC_alpha2, EMEC_beta2 = " <<
77 m_EMEC_eta0_2 << " " << m_EMEC_alpha2 << " " << m_EMEC_beta2 << endmsg;
78 }
79 log << MSG::INFO << "ramp_corr, ramp_corr_eta1, ramp_corr_eta2 = "
81 log << MSG::INFO << "EMEC_rescale = "<<m_EMEC_rescale<<endmsg;
82 log << MSG::INFO << "FCAL_rescale = "<<m_FCAL_rescale<<endmsg;
83 return StatusCode::SUCCESS;
84}
#define endmsg
msgSvc
Provide convenience handles for various services.
Definition StdJOSetup.py:36

◆ inputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ interfaceID()

const InterfaceID & CaloCellCorrection::interfaceID ( )
inlinestaticinherited

Definition at line 51 of file CaloCellCorrection.h.

static const InterfaceID IID_CaloCellCorrection("CaloCellCorrection", 1, 0)

◆ MakeCorrection()

void TBEMECCellEtaCorrection::MakeCorrection ( CaloCell * theCell,
const EventContext & ctx ) const
overridevirtual

Implements CaloCellCorrection.

Definition at line 94 of file TBEMECCellEtaCorrection.cxx.

96{
97 MsgStream log(msgSvc(), name());
98
99 const CaloDetDescrElement* elt = theCell->caloDDE();
100
102 double e = theCell->energy();
103 double eta = theCell->eta();
104 // Cell level correction of EMEC eta-dependent response
105 if (eta > m_EMEC_eta1 && eta < m_EMEC_eta2) {
106 e *= m_EMEC_beta1/
108 }
109 else if (eta > m_EMEC_eta2 && eta < m_EMEC_eta3) {
110 e *= m_EMEC_beta2/
112 }
113 theCell->setEnergy(e);
114 }
115
116 if (elt->is_lar_em_endcap()) {
117 double e = theCell->energy();
118 double eta = theCell->eta();
119 // Temporary ramp correction for EMEC cells with eta=2.85
121 e /= m_ramp_corr;
122 // theCell->setEnergy(e);
123 }
124 // Temporary correction of EMEC mkA->MeV constant
125 e /= m_EMEC_rescale;
126 theCell->setEnergy(e);
127 }
128
129 if (elt->is_lar_fcal()) {
130 double e = theCell->energy();
131 // Temporary correction of EMEC mkA->MeV constant
132 e /= m_FCAL_rescale;
133 theCell->setEnergy(e);
134 }
135
137 switch ( iSamp ) {
138 case CaloCell_ID::EME2 : {
139 theCell->setEnergy(theCell->energy() * m_EMEC_1_scale);
140 break;
141 }
142 case CaloCell_ID::EME3 : {
143 theCell->setEnergy(theCell->energy() * m_EMEC_2_scale);
144 break;
145 }
146 case CaloCell_ID::HEC0 : {
147 theCell->setEnergy(theCell->energy() * m_HEC_0_scale);
148 break;
149 }
150 case CaloCell_ID::HEC1 : {
151 theCell->setEnergy(theCell->energy() * m_HEC_1_scale);
152 break;
153 }
154 case CaloCell_ID::HEC2 : {
155 theCell->setEnergy(theCell->energy() * m_HEC_2_scale);
156 break;
157 }
158 case CaloCell_ID::FCAL0 : {
159 theCell->setEnergy(theCell->energy() * m_FCAL_0_scale);
160 break;
161 }
162 case CaloCell_ID::FCAL1 : {
163 theCell->setEnergy(theCell->energy() * m_FCAL_1_scale);
164 break;
165 }
166 case CaloCell_ID::FCAL2 : {
167 break;
168 }
169 default : {
170 log << MSG::ERROR << "Unknown sampling: "<<iSamp<<endmsg;
171 }
172 }
173
174}
Scalar eta() const
pseudorapidity method
CaloSampling::CaloSample CaloSample
Definition CaloCell_ID.h:53
double energy() const
get energy (data member)
Definition CaloCell.h:327
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition CaloCell.h:321
virtual double eta() const override final
get eta (through CaloDetDescrElement)
Definition CaloCell.h:382
virtual void setEnergy(float energy)
set energy
Definition CaloCell.h:472
CaloCell_ID::CaloSample getSampling() const
cell sampling
bool is_lar_em_endcap() const
cell belongs to EM end cap
bool is_lar_fcal() const
cell belongs to FCAL

◆ msg()

MsgStream & AthCommonMsg< AlgTool >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24 {
25 return this->msgStream();
26 }

◆ msgLvl()

bool AthCommonMsg< AlgTool >::msgLvl ( const MSG::Level lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30 {
31 return this->msgLevel(lvl);
32 }

◆ outputHandles()

virtual std::vector< Gaudi::DataHandle * > AthCommonDataStore< AthCommonMsg< AlgTool > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > AthCommonDataStore< AthCommonMsg< AlgTool > >::renounce ( T & h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381 {
382 h.renounce();
384 }
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::renounceArray ( SG::VarHandleKeyArray & handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364 {
366 }

◆ scaleenergy()

void CaloCellCorrection::scaleenergy ( CaloCell * lar_cell,
float scale )
staticprotectedinherited

Definition at line 91 of file CaloCellCorrection.cxx.

92{
93 theCell->scaleEnergy( scale );
94}

◆ setenergy()

void CaloCellCorrection::setenergy ( CaloCell * lar_cell,
float energy )
staticprotectedinherited

Definition at line 81 of file CaloCellCorrection.cxx.

82{
83 theCell->setEnergy( energy );
84}

◆ sysInitialize()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysInitialize ( )
overridevirtualinherited

Perform system initialization for an algorithm.

We override this to declare all the elements of handle key arrays at the end of initialization. See comments on updateVHKA.

Reimplemented in asg::AsgMetadataTool, AthCheckedComponent< AthAlgTool >, AthCheckedComponent<::AthAlgTool >, and DerivationFramework::CfAthAlgTool.

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< AlgTool > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< AlgTool > >::updateVHKA ( Gaudi::Details::PropertyBase & )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308 {
309 // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310 // << " size: " << m_vhka.size() << endmsg;
311 for (auto &a : m_vhka) {
313 for (auto k : keys) {
314 k->setOwner(this);
315 }
316 }
317 }
std::vector< SG::VarHandleKeyArray * > m_vhka

Member Data Documentation

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_EMEC_1_scale

double TBEMECCellEtaCorrection::m_EMEC_1_scale
private

Definition at line 62 of file TBEMECCellEtaCorrection.h.

◆ m_EMEC_2_scale

double TBEMECCellEtaCorrection::m_EMEC_2_scale
private

Definition at line 63 of file TBEMECCellEtaCorrection.h.

◆ m_EMEC_alpha1

double TBEMECCellEtaCorrection::m_EMEC_alpha1
private

Definition at line 51 of file TBEMECCellEtaCorrection.h.

◆ m_EMEC_alpha2

double TBEMECCellEtaCorrection::m_EMEC_alpha2
private

Definition at line 53 of file TBEMECCellEtaCorrection.h.

◆ m_EMEC_beta1

double TBEMECCellEtaCorrection::m_EMEC_beta1
private

Definition at line 50 of file TBEMECCellEtaCorrection.h.

◆ m_EMEC_beta2

double TBEMECCellEtaCorrection::m_EMEC_beta2
private

Definition at line 52 of file TBEMECCellEtaCorrection.h.

◆ m_EMEC_eta0_1

double TBEMECCellEtaCorrection::m_EMEC_eta0_1
private

Definition at line 48 of file TBEMECCellEtaCorrection.h.

◆ m_EMEC_eta0_2

double TBEMECCellEtaCorrection::m_EMEC_eta0_2
private

Definition at line 49 of file TBEMECCellEtaCorrection.h.

◆ m_EMEC_eta1

double TBEMECCellEtaCorrection::m_EMEC_eta1
private

Definition at line 45 of file TBEMECCellEtaCorrection.h.

◆ m_EMEC_eta2

double TBEMECCellEtaCorrection::m_EMEC_eta2
private

Definition at line 46 of file TBEMECCellEtaCorrection.h.

◆ m_EMEC_eta3

double TBEMECCellEtaCorrection::m_EMEC_eta3
private

Definition at line 47 of file TBEMECCellEtaCorrection.h.

◆ m_EMEC_rescale

double TBEMECCellEtaCorrection::m_EMEC_rescale
private

Definition at line 59 of file TBEMECCellEtaCorrection.h.

◆ m_EMEC_response_eta_correction

bool TBEMECCellEtaCorrection::m_EMEC_response_eta_correction
private

Definition at line 44 of file TBEMECCellEtaCorrection.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< AlgTool > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_FCAL_0_scale

double TBEMECCellEtaCorrection::m_FCAL_0_scale
private

Definition at line 67 of file TBEMECCellEtaCorrection.h.

◆ m_FCAL_1_scale

double TBEMECCellEtaCorrection::m_FCAL_1_scale
private

Definition at line 68 of file TBEMECCellEtaCorrection.h.

◆ m_FCAL_rescale

double TBEMECCellEtaCorrection::m_FCAL_rescale
private

Definition at line 60 of file TBEMECCellEtaCorrection.h.

◆ m_HEC_0_scale

double TBEMECCellEtaCorrection::m_HEC_0_scale
private

Definition at line 64 of file TBEMECCellEtaCorrection.h.

◆ m_HEC_1_scale

double TBEMECCellEtaCorrection::m_HEC_1_scale
private

Definition at line 65 of file TBEMECCellEtaCorrection.h.

◆ m_HEC_2_scale

double TBEMECCellEtaCorrection::m_HEC_2_scale
private

Definition at line 66 of file TBEMECCellEtaCorrection.h.

◆ m_ramp_corr

double TBEMECCellEtaCorrection::m_ramp_corr
private

Definition at line 55 of file TBEMECCellEtaCorrection.h.

◆ m_ramp_corr_eta1

double TBEMECCellEtaCorrection::m_ramp_corr_eta1
private

Definition at line 56 of file TBEMECCellEtaCorrection.h.

◆ m_ramp_corr_eta2

double TBEMECCellEtaCorrection::m_ramp_corr_eta2
private

Definition at line 57 of file TBEMECCellEtaCorrection.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< AlgTool > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< AlgTool > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files: