1#ifndef DETSTUDIES_ENERGYINCALOLAYERS_H
2#define DETSTUDIES_ENERGYINCALOLAYERS_H
5#include "Gaudi/Algorithm.h"
8#include "k4FWCore/DataHandle.h"
9#include "k4Interface/IGeoSvc.h"
12#include "edm4hep/CalorimeterHitCollection.h"
13#include "edm4hep/MCParticleCollection.h"
14#include "podio/UserDataCollection.h"
41 virtual StatusCode
execute(
const EventContext&)
const final;
49 mutable k4FWCore::DataHandle<edm4hep::CalorimeterHitCollection>
m_deposits{
"det/caloDeposits",
50 Gaudi::DataHandle::Reader,
this};
52 mutable k4FWCore::DataHandle<edm4hep::MCParticleCollection>
m_particle{
"det/particles", Gaudi::DataHandle::Reader,
55 mutable k4FWCore::DataHandle<podio::UserDataCollection<double>>
m_energyInLayer{
"energyInLayer",
56 Gaudi::DataHandle::Writer,
this};
58 mutable k4FWCore::DataHandle<podio::UserDataCollection<double>>
m_energyInCryo{
"energyInCryo",
59 Gaudi::DataHandle::Writer,
this};
61 mutable k4FWCore::DataHandle<podio::UserDataCollection<double>>
m_particleVec{
"particleVec",
62 Gaudi::DataHandle::Writer,
this};
68 Gaudi::Property<size_t>
m_numLayers{
this,
"numLayers", 11,
"Number of layers"};
71 this,
"samplingFractions", {},
"Values of sampling fraction per layer"};
73 Gaudi::Property<std::string>
m_readoutName{
this,
"readoutName",
"",
"Name of the readout"};
Sums energy deposited in every calorimeter layer separately, sums also energy deposited in the dead m...
Definition EnergyInCaloLayers.h:30
k4FWCore::DataHandle< podio::UserDataCollection< double > > m_particleVec
Handle for initial particle vector.
Definition EnergyInCaloLayers.h:61
k4FWCore::DataHandle< edm4hep::CalorimeterHitCollection > m_deposits
Handle for the energy deposits.
Definition EnergyInCaloLayers.h:49
EnergyInCaloLayers(const std::string &, ISvcLocator *)
Definition EnergyInCaloLayers.cpp:13
virtual StatusCode initialize() final
Initialize.
Definition EnergyInCaloLayers.cpp:25
ServiceHandle< IGeoSvc > m_geoSvc
Pointer to the geometry service.
Definition EnergyInCaloLayers.h:65
virtual ~EnergyInCaloLayers()
Definition EnergyInCaloLayers.cpp:23
k4FWCore::DataHandle< podio::UserDataCollection< double > > m_energyInLayer
Handle for vector with energy deposited in every layer.
Definition EnergyInCaloLayers.h:55
virtual StatusCode execute(const EventContext &) const final
Fills the histograms.
Definition EnergyInCaloLayers.cpp:59
Gaudi::Property< size_t > m_numLayers
Number of layers/cells cells.
Definition EnergyInCaloLayers.h:68
Gaudi::Property< std::vector< double > > m_samplingFractions
Values of sampling fraction.
Definition EnergyInCaloLayers.h:70
Gaudi::Property< std::string > m_readoutName
Name of the detector readout.
Definition EnergyInCaloLayers.h:73
virtual StatusCode finalize() final
Finalize.
Definition EnergyInCaloLayers.cpp:143
k4FWCore::DataHandle< podio::UserDataCollection< double > > m_energyInCryo
Handle for vector with energy deposited in cryostat and in its parts.
Definition EnergyInCaloLayers.h:58
k4FWCore::DataHandle< edm4hep::MCParticleCollection > m_particle
Handle for the particle.
Definition EnergyInCaloLayers.h:52