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 k4FWCore::DataHandle<edm4hep::SimCalorimeterHitCollection>
m_deposits{
"rec/caloHits",
53 Gaudi::DataHandle::Reader,
this};
55 Gaudi::Property<std::string>
m_activeFieldName{
this,
"activeFieldName",
"",
"Identifier of active material"};
57 Gaudi::Property<int>
m_activeFieldValue{
this,
"activeFieldValue", 0,
"Value of identifier for active material"};
59 Gaudi::Property<std::string>
m_layerFieldName{
this,
"layerFieldName",
"",
"Identifier of layers"};
61 Gaudi::Property<uint>
m_numLayers{
this,
"numLayers", 8,
"Number of layers"};
63 Gaudi::Property<uint>
m_firstLayerId{
this,
"firstLayerId", 0,
"ID of first layer"};
65 Gaudi::Property<std::string>
m_readoutName{
this,
"readoutName",
"",
"Name of the detector readout"};
67 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:61
std::vector< TH1F * > m_totalEnLayers
Definition SamplingFractionInLayers.h:71
Gaudi::Property< std::string > m_layerFieldName
Name of the layer/cell field.
Definition SamplingFractionInLayers.h:59
Gaudi::Property< int > m_activeFieldValue
Value of the active material.
Definition SamplingFractionInLayers.h:57
SamplingFractionInLayers(const std::string &, ISvcLocator *)
Definition SamplingFractionInLayers.cpp:19
k4FWCore::DataHandle< edm4hep::SimCalorimeterHitCollection > m_deposits
Handle for the energy deposits.
Definition SamplingFractionInLayers.h:52
Gaudi::Property< uint > m_firstLayerId
Id of the first layer.
Definition SamplingFractionInLayers.h:63
TH1F * m_totalEnergy
Definition SamplingFractionInLayers.h:74
Gaudi::Property< std::string > m_readoutName
Name of the detector readout.
Definition SamplingFractionInLayers.h:65
virtual StatusCode execute(const EventContext &) const final
Fills the histograms.
Definition SamplingFractionInLayers.cpp:77
ServiceHandle< IGeoSvc > m_geoSvc
Pointer to the geometry service.
Definition SamplingFractionInLayers.h:50
TH1F * m_sf
Definition SamplingFractionInLayers.h:82
ServiceHandle< ITHistSvc > m_histSvc
Pointer to the interface of histogram service.
Definition SamplingFractionInLayers.h:48
virtual StatusCode initialize() final
Initialize.
Definition SamplingFractionInLayers.cpp:27
virtual StatusCode finalize() final
Finalize.
Definition SamplingFractionInLayers.cpp:124
std::vector< TH1F * > m_sfLayers
Definition SamplingFractionInLayers.h:80
Gaudi::Property< double > m_energy
Definition SamplingFractionInLayers.h:67
TH1F * m_totalActiveEnergy
Definition SamplingFractionInLayers.h:78
Gaudi::Property< std::string > m_activeFieldName
Name of the active field.
Definition SamplingFractionInLayers.h:55
std::vector< TH1F * > m_activeEnLayers
Definition SamplingFractionInLayers.h:76
virtual ~SamplingFractionInLayers()
Definition SamplingFractionInLayers.cpp:25
Definition EventInformation.h:10