|
ATLAS Offline Software
|
Apply miscalibration in EM calorimeter at cell level.
More...
#include <LArCellEmMiscalib.h>
|
| LArCellEmMiscalib (const std::string &type, const std::string &name, const IInterface *parent) |
|
virtual | ~LArCellEmMiscalib ()=default |
|
virtual StatusCode | initialize () override |
| Constructor. More...
|
|
virtual void | MakeCorrection (CaloCell *theCell, const EventContext &ctx) const override |
|
virtual StatusCode | execute (CaloCellContainer *cellCollection, const EventContext &ctx) const |
|
ServiceHandle< StoreGateSvc > & | evtStore () |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | evtStore () const |
| The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
const ServiceHandle< StoreGateSvc > & | detStore () const |
| The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc . More...
|
|
virtual StatusCode | sysInitialize () override |
| Perform system initialization for an algorithm. More...
|
|
virtual StatusCode | sysStart () override |
| Handle START transition. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | inputHandles () const override |
| Return this algorithm's input handles. More...
|
|
virtual std::vector< Gaudi::DataHandle * > | outputHandles () const override |
| Return this algorithm's output handles. More...
|
|
Gaudi::Details::PropertyBase & | declareProperty (Gaudi::Property< T > &t) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &) |
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &) |
| Declare a new Gaudi property. More...
|
|
Gaudi::Details::PropertyBase * | declareProperty (const std::string &name, T &property, const std::string &doc="none") |
| Declare a new Gaudi property. More...
|
|
void | updateVHKA (Gaudi::Details::PropertyBase &) |
|
MsgStream & | msg () const |
|
MsgStream & | msg (const MSG::Level lvl) const |
|
bool | msgLvl (const MSG::Level lvl) const |
|
Apply miscalibration in EM calorimeter at cell level.
\ G.Unal (based on other similar tools from K.Voss)
- Date
- October 25, 2006
Definition at line 35 of file LArCellEmMiscalib.h.
◆ StoreGateSvc_t
◆ LArCellEmMiscalib()
LArCellEmMiscalib::LArCellEmMiscalib |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~LArCellEmMiscalib()
virtual LArCellEmMiscalib::~LArCellEmMiscalib |
( |
| ) |
|
|
virtualdefault |
◆ addenergy()
void CaloCellCorrection::addenergy |
( |
CaloCell * |
lar_cell, |
|
|
float |
energy |
|
) |
| |
|
staticprotectedinherited |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleBase
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 245 of file AthCommonDataStore.h.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation string for the property. |
This is the version for types that derive from SG::VarHandleKey
. The property value object is put on the input and output lists as appropriate; then we forward to the base class.
Definition at line 221 of file AthCommonDataStore.h.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This is the generic version, for types that do not derive from SG::VarHandleKey
. It just forwards to the base class version of declareProperty
.
Definition at line 333 of file AthCommonDataStore.h.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation string for the property. |
This dispatches to either the generic declareProperty
or the one for VarHandle/Key/KeyArray.
Definition at line 352 of file AthCommonDataStore.h.
◆ declareProperty() [6/6]
◆ detStore()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
Definition at line 58 of file CaloCellCorrection.cxx.
64 if (!cellCollection) {
65 ATH_MSG_ERROR(
"Cell Correction tool receives invalid cell Collection" );
66 return StatusCode::FAILURE;
79 return StatusCode::SUCCESS;
◆ extraDeps_update_handler()
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 LArCellEmMiscalib::initialize |
( |
| ) |
|
|
overridevirtual |
◆ initOnce()
void LArCellEmMiscalib::initOnce |
( |
const EventContext & |
ctx | ) |
|
|
private |
◆ inputHandles()
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()
static const InterfaceID& CaloCellCorrection::interfaceID |
( |
| ) |
|
|
inlinestaticinherited |
◆ MakeCorrection()
void LArCellEmMiscalib::MakeCorrection |
( |
CaloCell * |
theCell, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
overridevirtual |
◆ msg() [1/2]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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.
◆ region()
int LArCellEmMiscalib::region |
( |
int |
barrelec, |
|
|
double |
eta, |
|
|
double |
phi |
|
) |
| |
|
staticprivate |
Definition at line 168 of file LArCellEmMiscalib.cxx.
173 if (iphi>15) iphi=15;
174 if (abs(barrelec)==1) {
175 int ieta=(
int)(
eta*(1./0.2));
177 iregion=16*ieta+iphi;
178 if (barrelec==1) iregion=iregion+128;
180 if (abs(barrelec)==2) {
183 else if(
eta<1.6) ieta=1;
184 else if(
eta<1.8) ieta=2;
185 else if(
eta<2.0) ieta=3;
186 else if(
eta<2.1) ieta=4;
187 else if(
eta<2.3) ieta=5;
189 iregion=16*ieta+iphi;
190 if (barrelec==-2) iregion=iregion+256;
191 if (barrelec==2) iregion=iregion+256+112;
193 if (abs(barrelec)==3) {
197 if (barrelec==-3) iregion=iregion+256+224;
198 if (barrelec==3) iregion=iregion+256+224+32;
◆ renounce()
◆ renounceArray()
◆ scaleenergy()
void CaloCellCorrection::scaleenergy |
( |
CaloCell * |
lar_cell, |
|
|
float |
scale |
|
) |
| |
|
staticprotectedinherited |
◆ setenergy()
void CaloCellCorrection::setenergy |
( |
CaloCell * |
lar_cell, |
|
|
float |
energy |
|
) |
| |
|
staticprotectedinherited |
◆ smearingPerRegion()
void LArCellEmMiscalib::smearingPerRegion |
( |
CLHEP::HepRandomEngine * |
engine | ) |
|
|
private |
Definition at line 122 of file LArCellEmMiscalib.cxx.
125 for (
int i=0;
i<544;
i++) {
130 for (
int i=0;
i<544;
i++) {
132 int ieta,iphi,barrelec,ii;
137 else if (iregion<256) {
141 else if (iregion<(256+112)) {
145 else if (iregion<(256+224)) {
147 ii=iregion-(256+112);
149 else if (iregion<(256+224+32)) {
151 ii=iregion-(256+224);
155 ii=iregion-(256+224+32);
159 ATH_MSG_DEBUG(
"iregion,barrelec,ieta,iphi,spread " << iregion <<
" "
160 << barrelec <<
" " << ieta <<
" " << iphi <<
" " <<
m_spread1[
i] );
◆ sysInitialize()
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_calib
std::vector<float> LArCellEmMiscalib::m_calib |
|
private |
◆ m_calodetdescrmgr
◆ m_caloIdMgr
◆ m_caloMgrKey
◆ m_detStore
◆ m_evtStore
◆ m_initOnce
std::once_flag LArCellEmMiscalib::m_initOnce |
|
mutableprivate |
◆ m_larem_id
◆ m_ncellem
unsigned int LArCellEmMiscalib::m_ncellem |
|
private |
◆ m_rngSvc
◆ m_seed
int LArCellEmMiscalib::m_seed |
|
private |
◆ m_sigmaPerCell
double LArCellEmMiscalib::m_sigmaPerCell |
|
private |
◆ m_sigmaPerRegion
double LArCellEmMiscalib::m_sigmaPerRegion |
|
private |
◆ m_spread1
std::vector<float> LArCellEmMiscalib::m_spread1 |
|
private |
◆ m_undo
bool LArCellEmMiscalib::m_undo |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
const CaloDetDescrManager * m_calodetdescrmgr
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Scalar phi() const
phi method
size_type channel_hash_max() const
One more than the largest channel (cell) hash code.
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
ServiceHandle< IAthRNGSvc > m_rngSvc
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
const LArEM_ID * getEM_ID(void) const
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
bool msgLvl(const MSG::Level lvl) const
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
#define ATH_MSG_VERBOSE(x)
Identifier channel_id(const ExpandedIdentifier &exp_id) const
Build a cell identifier from an expanded identifier.
void initOnce(const EventContext &ctx)
const LArEM_ID * m_larem_id
float eta_raw() const
cell eta_raw
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
double energy() const
get energy (data member)
CaloCell_ID::SUBCALO getSubCalo() const
cell subcalo
virtual void MakeCorrection(CaloCell *cellCollection, const EventContext &ctx) const =0
IdentifierHash calo_hash() const
cell calo hash
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< float > m_calib
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
const CaloIdManager * m_caloIdMgr
CaloCellCorrection(const std::string &type, const std::string &name, const IInterface *parent)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
void smearingPerRegion(CLHEP::HepRandomEngine *engine)
static int region(int barrelec, double eta, double phi)
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
A wrapper class for event-slot-local random engines.
int barrel_ec(const Identifier id) const
return barrel_ec according to :
std::vector< float > m_spread1
StatusCode initialize(bool used=true)
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
std::once_flag m_initOnce
Data object for each calorimeter readout cell.
static void setenergy(CaloCell *lar_cell, float energy)
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
#define ATLAS_THREAD_SAFE
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Apply miscalibration in EM calorimeter at cell level.
float phi_raw() const
cell phi_raw