1#ifndef DETSTUDIES_SAMPLINGFRACTIONINLAYERS_H
2#define DETSTUDIES_SAMPLINGFRACTIONINLAYERS_H
5#include "Gaudi/Algorithm.h"
6#include "GaudiKernel/ServiceHandle.h"
9#include "k4FWCore/DataHandle.h"
14class SimCalorimeterHitCollection;
40 virtual StatusCode
execute(
const EventContext&)
const final;
52 mutable DataHandle<edm4hep::SimCalorimeterHitCollection>
m_deposits{
"rec/caloHits", Gaudi::DataHandle::Reader,
this};
54 Gaudi::Property<std::string>
m_activeFieldName{
this,
"activeFieldName",
"",
"Identifier of active material"};
56 Gaudi::Property<int>
m_activeFieldValue{
this,
"activeFieldValue", 0,
"Value of identifier for active material"};
58 Gaudi::Property<std::string>
m_layerFieldName{
this,
"layerFieldName",
"",
"Identifier of layers"};
60 Gaudi::Property<uint>
m_numLayers{
this,
"numLayers", 8,
"Number of layers"};
62 Gaudi::Property<uint>
m_firstLayerId{
this,
"firstLayerId", 0,
"ID of first layer"};
64 Gaudi::Property<std::string>
m_readoutName{
this,
"readoutName",
"",
"Name of the detector readout"};
66 Gaudi::Property<double>
m_energy{
this,
"energyAxis", 500,
"Maximum energy for axis range"};
Histograms of energy deposited in active material and total energy deposited in the calorimeter.
Definition SamplingFractionInLayers.h:29
Gaudi::Property< uint > m_numLayers
Number of layers/cells.
Definition SamplingFractionInLayers.h:60
std::vector< TH1F * > m_totalEnLayers
Definition SamplingFractionInLayers.h:70
Gaudi::Property< std::string > m_layerFieldName
Name of the layer/cell field.
Definition SamplingFractionInLayers.h:58
Gaudi::Property< int > m_activeFieldValue
Value of the active material.
Definition SamplingFractionInLayers.h:56
SamplingFractionInLayers(const std::string &, ISvcLocator *)
Definition SamplingFractionInLayers.cpp:19
Gaudi::Property< uint > m_firstLayerId
Id of the first layer.
Definition SamplingFractionInLayers.h:62
TH1F * m_totalEnergy
Definition SamplingFractionInLayers.h:73
Gaudi::Property< std::string > m_readoutName
Name of the detector readout.
Definition SamplingFractionInLayers.h:64
virtual StatusCode execute(const EventContext &) const final
Fills the histograms.
Definition SamplingFractionInLayers.cpp:80
ServiceHandle< IGeoSvc > m_geoSvc
Pointer to the geometry service.
Definition SamplingFractionInLayers.h:50
TH1F * m_sf
Definition SamplingFractionInLayers.h:81
ServiceHandle< ITHistSvc > m_histSvc
Pointer to the interface of histogram service.
Definition SamplingFractionInLayers.h:48
virtual StatusCode initialize() final
Initialize.
Definition SamplingFractionInLayers.cpp:30
virtual StatusCode finalize() final
Finalize.
Definition SamplingFractionInLayers.cpp:127
std::vector< TH1F * > m_sfLayers
Definition SamplingFractionInLayers.h:79
Gaudi::Property< double > m_energy
Definition SamplingFractionInLayers.h:66
TH1F * m_totalActiveEnergy
Definition SamplingFractionInLayers.h:77
Gaudi::Property< std::string > m_activeFieldName
Name of the active field.
Definition SamplingFractionInLayers.h:54
std::vector< TH1F * > m_activeEnLayers
Definition SamplingFractionInLayers.h:75
DataHandle< edm4hep::SimCalorimeterHitCollection > m_deposits
Handle for the energy deposits.
Definition SamplingFractionInLayers.h:52
virtual ~SamplingFractionInLayers()
Definition SamplingFractionInLayers.cpp:28
Definition EventInformation.h:10