9#include "CaloDetDescr/CaloDetDescrElement.h"
32using namespace std::numbers;
47 m_h_cell_e =
new TH1D(
"h_Calo_cell_e",
"cell_e", 100,0.,500.);
52 m_h_cell_log_e =
new TH1D(
"h_Calo_cell_log_e",
"cell_log_e", 100,0.,std::log10(500.));
56 m_h_cell_eta =
new TH1D(
"h_Calo_cell_eta",
"cell_eta", 100,-5.,5.);
64 m_h_cell_radius =
new TH1D(
"h_Calo_cell_radius",
"cell_radius", 100, 0., 6000.);
68 m_h_cell_layer =
new TH1D(
"h_Calo_cell_layer",
"cell_layer", 24, -0.5, 23.5);
88 m_h_xy =
new TH2F(
"h_Calo_xy",
"xy", 100,-4000,4000,100, -4000, 4000);
92 m_h_zr =
new TH2D(
"h_Calo_zr",
"zr", 100,-7000.,7000.,100, 0., 6000.);
96 m_h_etaphi =
new TH2D(
"h_Calo_etaphi",
"eta_phi", 50,-5.,5.,50, -
pi,
pi);
101 m_h_time_e =
new TH2D(
"h_Calo_time_e",
"energy vs time", 100, 0,50, 100,0,500);
104 m_h_eta_e =
new TH2D(
"h_Calo_eta_e",
"energy vs eta", 50, -5,5, 100,0,500);
107 m_h_phi_e =
new TH2D(
"h_Calo_phi_e",
"energy vs phi", 50, -
pi,
pi, 100,0,500);
110 m_h_r_e =
new TH2D(
"h_Calo_r_e",
"energy vs radius", 100, 0,6000, 100,0,500);
121 m_h_calib_eta =
new TH1D(
"h_calib_eta",
"calib. hits eta", 50,-5,5);
127 m_h_calib_zr =
new TH2D(
"h_calib_zr",
"calib. hits z vs r", 100,-7000,7000,1000, 0,6000);
133 m_h_calib_eEM =
new TH1D(
"h_calib_eEM",
"calib. hits EM energy", 100,0,100);
136 m_h_calib_eNonEM =
new TH1D(
"h_calib_nonEM",
"calib. hits non EM energy", 100,0,100);
139 m_h_calib_eInv =
new TH1D(
"h_calib_eInv",
"calib. hits invisible energy", 100,0,100);
142 m_h_calib_eEsc =
new TH1D(
"h_calib_eEsc",
"calib. hits escaped energy", 100,0,100);
145 m_h_calib_eTot =
new TH1D(
"h_calib_eTot",
"calib. hits energy", 100,0,100);
148 m_h_calib_eTotpartID =
new TH1D(
"h_calib_eTotpartID",
"calib. hits partID weighted with energy",600,0,300000);
165 m_tree =
new TTree(
"Calo",
"Calo");
190 return StatusCode::SUCCESS;
222 for (
const auto& i_hit : *hitVec) {
228 double tot_time = 0.;
229 for (
int t=0; t<(i_hit).size(); ++t) tot_e += (i_hit).energy(t);
230 for (
int t=0; t<(i_hit).size(); ++t) tot_time += (i_hit).time(t);
241 m_h_xy->Fill(ddElement->
x(), ddElement->
y());
242 m_h_zr->Fill(ddElement->
z(), ddElement->
r());
249 m_h_r_e->Fill(ddElement->
r(), tot_e);
260 m_time->push_back(tot_time);
273 for (
auto hi : *iter ) {
275 double energy = hi->energy();
276 double time = hi->time();
277 double eta = hitElement->
eta();
278 double phi = hitElement->
phi();
279 double radius = hitElement->
r();
281 float x = hitElement->
x();
282 float y = hitElement->
y();
283 double z = hitElement->
z();
324 if (!geoHit)
continue;
327 double eta = Element->eta();
328 double phi = Element->phi();
329 double radius = Element->r();
330 double z = Element->z();
331 double emEnergy = geoHit.
energyEM();
370 return StatusCode::SUCCESS;
Scalar eta() const
pseudorapidity method
Scalar phi() const
phi method
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_WARNING(x)
Definition of CaloDetDescrManager.
#define CHECK(...)
Evaluate an expression and check for errors.
AtlasHitsVector< TileHit > TileHitVector
const ServiceHandle< StoreGateSvc > & detStore() const
const ServiceHandle< ITHistSvc > & histSvc() const
The standard THistSvc (for writing histograms and TTrees and more to a root file) Returns (kind of) a...
This class groups all DetDescr information related to a CaloCell.
CaloCell_ID::CaloSample getSampling() const
cell sampling
float eta() const
cell eta
float phi() const
cell phi
const CaloDetDescrElement * get_element(const Identifier &cellId) const
get element by its identifier
This class provides the client interface for accessing the detector description information common to...
std::vector< float > * m_calib_eTot
std::vector< float > * m_cell_y
std::vector< float > * m_cell_z
std::vector< float > * m_cell_log_e
TH1 * m_h_cell_layer_Eweight
SG::ReadHandleKeyArray< LArHitContainer > m_caloKeys
std::vector< float > * m_cell_x
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
std::vector< float > * m_cell_phi
std::vector< float > * m_calib_z
std::vector< float > * m_calib_phi
std::vector< float > * m_calib_eInv
TH1 * m_h_cell_eta
Simple variables by Ketevi.
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
BooleanProperty m_useTile
std::vector< float > * m_calib_eEM
std::vector< float > * m_calib_eEsc
const TileDetDescrManager * m_tileMgr
SG::ReadHandleKeyArray< CaloCalibrationHitContainer > m_caloCalibKeys
SG::ReadHandleKey< TileHitVector > m_tileKey
std::vector< float > * m_calib_radius
std::vector< int > * m_cell_layer
std::vector< float > * m_cell_radius
TH1 * m_h_cell_phi_Eweight
std::vector< float > * m_calib_partID
TH1 * m_h_cell_radius_Eweight
std::vector< float > * m_calib_eta
std::vector< float > * m_cell_e
virtual StatusCode initialize() override
std::vector< float > * m_time
std::vector< float > * m_cell_eta
TH1 * m_h_calib_eTotpartID
TH1 * m_h_cell_eta_Eweight
StringProperty m_ntupleFileName
std::vector< float > * m_calib_eNonEM
Adaptor for CaloCalibHits.
double energyTotal() const
const CaloDetDescrElement * getDetDescrElement() const
double energyNonEM() const
double energyEscaped() const
double energyInvisible() const
const T * get(const ReadCondHandleKey< T > &key, const EventContext &ctx)
Convenience function to retrieve an object given a ReadCondHandleKey.