1#ifndef DETSTUDIES_ENERGYINCALOLAYERS_H
2#define DETSTUDIES_ENERGYINCALOLAYERS_H
5#include "Gaudi/Algorithm.h"
8#include "k4Interface/IGeoSvc.h"
9#include "k4FWCore/DataHandle.h"
12#include "edm4hep/CalorimeterHitCollection.h"
13#include "edm4hep/MCParticleCollection.h"
14#include "podio/UserDataCollection.h"
42 virtual StatusCode
execute(
const EventContext&)
const final;
50 mutable DataHandle<edm4hep::CalorimeterHitCollection>
m_deposits{
"det/caloDeposits", Gaudi::DataHandle::Reader,
this};
52 mutable DataHandle<edm4hep::MCParticleCollection>
m_particle{
"det/particles", Gaudi::DataHandle::Reader,
this};
54 mutable DataHandle<podio::UserDataCollection<double>>
m_energyInLayer {
"energyInLayer", Gaudi::DataHandle::Writer,
this};
56 mutable DataHandle<podio::UserDataCollection<double>>
m_energyInCryo {
"energyInCryo", Gaudi::DataHandle::Writer,
this};
58 mutable DataHandle<podio::UserDataCollection<double>>
m_particleVec {
"particleVec", Gaudi::DataHandle::Writer,
this};
64 Gaudi::Property<size_t>
m_numLayers{
this,
"numLayers", 11,
"Number of layers"};
67 this,
"samplingFractions", {},
"Values of sampling fraction per layer"};
69 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:31
DataHandle< podio::UserDataCollection< double > > m_energyInCryo
Handle for vector with energy deposited in cryostat and in its parts.
Definition EnergyInCaloLayers.h:56
EnergyInCaloLayers(const std::string &, ISvcLocator *)
Definition EnergyInCaloLayers.cpp:15
DataHandle< edm4hep::MCParticleCollection > m_particle
Handle for the particle.
Definition EnergyInCaloLayers.h:52
virtual StatusCode initialize() final
Initialize.
Definition EnergyInCaloLayers.cpp:29
ServiceHandle< IGeoSvc > m_geoSvc
Pointer to the geometry service.
Definition EnergyInCaloLayers.h:61
virtual ~EnergyInCaloLayers()
Definition EnergyInCaloLayers.cpp:26
DataHandle< podio::UserDataCollection< double > > m_energyInLayer
Handle for vector with energy deposited in every layer.
Definition EnergyInCaloLayers.h:54
virtual StatusCode execute(const EventContext &) const final
Fills the histograms.
Definition EnergyInCaloLayers.cpp:63
Gaudi::Property< size_t > m_numLayers
Number of layers/cells cells.
Definition EnergyInCaloLayers.h:64
Gaudi::Property< std::vector< double > > m_samplingFractions
Values of sampling fraction.
Definition EnergyInCaloLayers.h:66
Gaudi::Property< std::string > m_readoutName
Name of the detector readout.
Definition EnergyInCaloLayers.h:69
virtual StatusCode finalize() final
Finalize.
Definition EnergyInCaloLayers.cpp:147
DataHandle< edm4hep::CalorimeterHitCollection > m_deposits
Handle for the energy deposits.
Definition EnergyInCaloLayers.h:50
DataHandle< podio::UserDataCollection< double > > m_particleVec
Handle for initial particle vector.
Definition EnergyInCaloLayers.h:58