![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
#include <CaloHitAnalysis.h>
|
| CaloHitAnalysis (const std::string &name, ISvcLocator *pSvcLocator) |
|
| ~CaloHitAnalysis () |
|
virtual StatusCode | initialize () override |
|
virtual StatusCode | execute () override |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
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 | 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 |
|
Definition at line 27 of file CaloHitAnalysis.h.
◆ StoreGateSvc_t
◆ CaloHitAnalysis()
CaloHitAnalysis::CaloHitAnalysis |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
pSvcLocator |
|
) |
| |
◆ ~CaloHitAnalysis()
CaloHitAnalysis::~CaloHitAnalysis |
( |
| ) |
|
|
inline |
◆ 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);
◆ 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.
◆ 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.
◆ 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()
StatusCode CaloHitAnalysis::execute |
( |
| ) |
|
|
overridevirtual |
Definition at line 184 of file CaloHitAnalysis.cxx.
210 std::string lArKey [4] = {
"LArHitEMB",
"LArHitEMEC",
"LArHitFCAL",
"LArHitHEC"};
211 for (
unsigned int i=0;
i<4;
i++) {
214 for (
auto hi : *iter ) {
216 double energy = hi->energy();
217 double time = hi->time();
218 double eta = hitElement->
eta();
219 double phi = hitElement->
phi();
220 double radius = hitElement->
r();
221 float x = hitElement->
x();
222 float y = hitElement->
y();
223 double z = hitElement->
z();
253 for (
const auto& i_hit : *hitVec) {
259 double tot_time = 0.;
260 for (
int t=0;
t<(i_hit).
size(); ++
t) tot_e += (i_hit).energy(
t);
261 for (
int t=0;
t<(i_hit).
size(); ++
t) tot_time += (i_hit).time(
t);
283 m_time->push_back(tot_time);
289 std::string LArCalibKey [3] = {
"LArCalibrationHitActive",
"LArCalibrationHitInactive",
"LArCalibrationHitDeadMaterial"};
290 for (
unsigned int j=0; j<3; j++) {
297 if (!geoHit)
continue;
299 double eta = Element->
eta();
300 double phi = Element->
phi();
302 double z = Element->
z();
303 double emEnergy = geoHit.energyEM();
304 double nonEmEnergy = geoHit.energyNonEM();
305 double invEnergy = geoHit.energyInvisible();
306 double escEnergy = geoHit.energyEscaped();
307 double totEnergy = geoHit.energyTotal();
308 double particleID = (*hit_i).particleID();
337 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
◆ extraOutputDeps()
const DataObjIDColl & AthAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 50 of file AthAlgorithm.cxx.
57 return Algorithm::extraOutputDeps();
◆ initialize()
StatusCode CaloHitAnalysis::initialize |
( |
| ) |
|
|
overridevirtual |
now add branches and leaves to the tree
Definition at line 48 of file CaloHitAnalysis.cxx.
75 m_h_xy =
new TH2F(
"h_Calo_xy",
"xy", 100,-4000,4000,100, -4000, 4000);
79 m_h_zr =
new TH2D(
"h_Calo_zr",
"zr", 100,-7000.,7000.,100, 0., 6000.);
83 m_h_etaphi =
new TH2D(
"h_Calo_etaphi",
"eta_phi", 50,-5.,5.,50, -3.1416, 3.1416);
88 m_h_time_e =
new TH2D(
"h_Calo_time_e",
"energy vs time", 100, 0,50, 100,0,500);
91 m_h_eta_e =
new TH2D(
"h_Calo_eta_e",
"energy vs eta", 50, -5,5, 100,0,500);
94 m_h_phi_e =
new TH2D(
"h_Calo_phi_e",
"energy vs phi", 50, -3.1416,3.1416, 100,0,500);
97 m_h_r_e =
new TH2D(
"h_Calo_r_e",
"energy vs radius", 100, 0,6000, 100,0,500);
114 m_h_calib_rz =
new TH2D(
"h_calib_rz",
"calib. hits r vs z", 100,-7000,7000,1000, 0,6000);
117 m_h_calib_etaphi =
new TH2D(
"h_calib_etaphi",
"calib. hits eta vs phi",50,-5.,5., 50,-3.1416,3.1416);
152 m_tree =
new TTree(
"Calo",
"Calo");
180 return StatusCode::SUCCESS;
◆ 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.
◆ 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.
◆ renounce()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ 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::string CaloHitAnalysis::m_calib |
|
private |
◆ m_calib_eEM
std::vector<float>* CaloHitAnalysis::m_calib_eEM {nullptr} |
|
private |
◆ m_calib_eEsc
std::vector<float>* CaloHitAnalysis::m_calib_eEsc {nullptr} |
|
private |
◆ m_calib_eInv
std::vector<float>* CaloHitAnalysis::m_calib_eInv {nullptr} |
|
private |
◆ m_calib_eNonEM
std::vector<float>* CaloHitAnalysis::m_calib_eNonEM {nullptr} |
|
private |
◆ m_calib_eta
std::vector<float>* CaloHitAnalysis::m_calib_eta {nullptr} |
|
private |
◆ m_calib_eTot
std::vector<float>* CaloHitAnalysis::m_calib_eTot {nullptr} |
|
private |
◆ m_calib_partID
std::vector<float>* CaloHitAnalysis::m_calib_partID {nullptr} |
|
private |
◆ m_calib_phi
std::vector<float>* CaloHitAnalysis::m_calib_phi {nullptr} |
|
private |
◆ m_calib_radius
std::vector<float>* CaloHitAnalysis::m_calib_radius {nullptr} |
|
private |
◆ m_calib_z
std::vector<float>* CaloHitAnalysis::m_calib_z {nullptr} |
|
private |
◆ m_caloMgrKey
Initial value:{ this
, "CaloDetDescrManager"
, "CaloDetDescrManager"
, "SG Key for CaloDetDescrManager in the Condition Store" }
Definition at line 91 of file CaloHitAnalysis.h.
◆ m_cell_e
std::vector<float>* CaloHitAnalysis::m_cell_e {nullptr} |
|
private |
◆ m_cell_eta
std::vector<float>* CaloHitAnalysis::m_cell_eta {nullptr} |
|
private |
◆ m_cell_phi
std::vector<float>* CaloHitAnalysis::m_cell_phi {nullptr} |
|
private |
◆ m_cell_radius
std::vector<float>* CaloHitAnalysis::m_cell_radius {nullptr} |
|
private |
◆ m_cell_x
std::vector<float>* CaloHitAnalysis::m_cell_x {nullptr} |
|
private |
◆ m_cell_y
std::vector<float>* CaloHitAnalysis::m_cell_y {nullptr} |
|
private |
◆ m_cell_z
std::vector<float>* CaloHitAnalysis::m_cell_z {nullptr} |
|
private |
◆ m_detStore
◆ m_evtStore
◆ m_expert
std::string CaloHitAnalysis::m_expert |
|
private |
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_h_calib_eEM
TH1* CaloHitAnalysis::m_h_calib_eEM {nullptr} |
|
private |
◆ m_h_calib_eEsc
TH1* CaloHitAnalysis::m_h_calib_eEsc {nullptr} |
|
private |
◆ m_h_calib_eInv
TH1* CaloHitAnalysis::m_h_calib_eInv {nullptr} |
|
private |
◆ m_h_calib_eNonEM
TH1* CaloHitAnalysis::m_h_calib_eNonEM {nullptr} |
|
private |
◆ m_h_calib_eta
TH1* CaloHitAnalysis::m_h_calib_eta {nullptr} |
|
private |
◆ m_h_calib_etaphi
TH2* CaloHitAnalysis::m_h_calib_etaphi {nullptr} |
|
private |
◆ m_h_calib_eTot
TH1* CaloHitAnalysis::m_h_calib_eTot {nullptr} |
|
private |
◆ m_h_calib_eTotpartID
TH1* CaloHitAnalysis::m_h_calib_eTotpartID {nullptr} |
|
private |
◆ m_h_calib_phi
TH1* CaloHitAnalysis::m_h_calib_phi {nullptr} |
|
private |
◆ m_h_calib_rz
TH2* CaloHitAnalysis::m_h_calib_rz {nullptr} |
|
private |
◆ m_h_cell_e
TH1* CaloHitAnalysis::m_h_cell_e {nullptr} |
|
private |
◆ m_h_cell_eta
TH1* CaloHitAnalysis::m_h_cell_eta {nullptr} |
|
private |
◆ m_h_cell_phi
TH1* CaloHitAnalysis::m_h_cell_phi {nullptr} |
|
private |
◆ m_h_cell_radius
TH1* CaloHitAnalysis::m_h_cell_radius {nullptr} |
|
private |
◆ m_h_eta_e
TH2* CaloHitAnalysis::m_h_eta_e {nullptr} |
|
private |
◆ m_h_etaphi
TH2* CaloHitAnalysis::m_h_etaphi {nullptr} |
|
private |
◆ m_h_phi_e
TH2* CaloHitAnalysis::m_h_phi_e {nullptr} |
|
private |
◆ m_h_r_e
TH2* CaloHitAnalysis::m_h_r_e {nullptr} |
|
private |
◆ m_h_time_e
TH2* CaloHitAnalysis::m_h_time_e {nullptr} |
|
private |
◆ m_h_xy
TH2* CaloHitAnalysis::m_h_xy {nullptr} |
|
private |
◆ m_h_zr
TH2* CaloHitAnalysis::m_h_zr {nullptr} |
|
private |
◆ m_ntupleFileName
std::string CaloHitAnalysis::m_ntupleFileName |
|
private |
◆ m_path
std::string CaloHitAnalysis::m_path |
|
private |
◆ m_thistSvc
◆ m_tileID
◆ m_tileMgr
◆ m_time
std::vector<float>* CaloHitAnalysis::m_time {nullptr} |
|
private |
◆ m_tree
TTree* CaloHitAnalysis::m_tree {nullptr} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
JetConstituentVector::iterator iterator
bool is_tile_aux(const Identifier &id) const
std::string m_ntupleFileName
TH1 * m_h_calib_eTotpartID
std::vector< float > * m_calib_z
Adaptor for CaloCalibHits.
std::vector< float > * m_calib_partID
Scalar phi() const
phi method
Scalar eta() const
pseudorapidity method
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
This class groups all DetDescr information related to a CaloCell. Provides a generic interface for al...
std::vector< float > * m_calib_phi
std::vector< float > * m_cell_y
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
std::vector< float > * m_cell_radius
std::vector< float > * m_time
std::vector< float > * m_calib_radius
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::vector< float > * m_calib_eTot
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
ServiceHandle< ITHistSvc > m_thistSvc
std::vector< float > * m_calib_eEsc
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
const TileDetDescrManager * m_tileMgr
std::vector< float > * m_calib_eInv
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::vector< float > * m_calib_eNonEM
TH1 * m_h_cell_eta
Simple variables by Ketevi.
#define CHECK(...)
Evaluate an expression and check for errors.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
std::vector< float > * m_cell_z
CaloDetDescrElement * get_cell_element(unsigned int cell_hash) const
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
std::vector< float > * m_calib_eEM
std::vector< float > * m_cell_e
StatusCode initialize(bool used=true)
DataObjIDColl m_extendedExtraObjects
This class provides the client interface for accessing the detector description information common to...
def time(flags, cells_name, *args, **kw)
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
float eta() const
cell eta
AthAlgorithm()
Default constructor:
std::vector< float > * m_cell_eta
float phi() const
cell phi
std::vector< float > * m_calib_eta
Identifier cell_id(const Identifier &any_id) const
std::vector< float > * m_cell_phi
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
std::vector< float > * m_cell_x