k4SimGeant4
Loading...
Searching...
No Matches
SimG4FastSimHistograms.h
Go to the documentation of this file.
1#ifndef SIMG4FAST_G4FASTSIMHISTOGRAMS_H
2#define SIMG4FAST_G4FASTSIMHISTOGRAMS_H
3
4// GAUDI
5#include "Gaudi/Algorithm.h"
6
7// FCCSW
8#include "k4FWCore/DataHandle.h"
9class ITHistSvc;
10
11#include "edm4hep/RecoMCParticleLinkCollection.h"
12
13// datamodel
14namespace edm4hep {
15class ReconstructedParticleCollection;
16}
17
18class TH1F;
19
29class SimG4FastSimHistograms : public Gaudi::Algorithm {
30public:
31 explicit SimG4FastSimHistograms(const std::string&, ISvcLocator*);
36 virtual StatusCode initialize() final;
40 virtual StatusCode execute(const EventContext&) const final;
44 virtual StatusCode finalize() final;
45
46private:
48 mutable DataHandle<edm4hep::RecoMCParticleLinkCollection> m_particlesMCparticles{"ParticlesMCparticles",
49 Gaudi::DataHandle::Reader, this};
51 SmartIF<ITHistSvc> m_histSvc;
52 // Histogram of the smeared particle's momentum
53 TH1F* m_p{nullptr};
54 // Histogram of the smeared particle's pseudorapidity
55 TH1F* m_eta{nullptr};
56 // Histogram of the difference between MC particle's and smeared particle's momentum
57 TH1F* m_diffP{nullptr};
58 // Histogram of the smeared particle's PDG code
59 TH1F* m_pdg{nullptr};
60};
61#endif /* SIMG4FAST_G4FASTSIMHISTOGRAMS_H */
Fast simulation histograms algorithm.
Definition SimG4FastSimHistograms.h:29
SimG4FastSimHistograms(const std::string &, ISvcLocator *)
Definition SimG4FastSimHistograms.cpp:16
TH1F * m_p
Definition SimG4FastSimHistograms.h:53
TH1F * m_pdg
Definition SimG4FastSimHistograms.h:59
virtual StatusCode initialize() final
Initialize.
Definition SimG4FastSimHistograms.cpp:23
TH1F * m_eta
Definition SimG4FastSimHistograms.h:55
DataHandle< edm4hep::RecoMCParticleLinkCollection > m_particlesMCparticles
Handle for the EDM particles and MC particles associations to be read.
Definition SimG4FastSimHistograms.h:48
virtual StatusCode execute(const EventContext &) const final
Fills the histograms.
Definition SimG4FastSimHistograms.cpp:49
virtual ~SimG4FastSimHistograms()
Definition SimG4FastSimHistograms.cpp:21
SmartIF< ITHistSvc > m_histSvc
Pointer to the interface of histogram service.
Definition SimG4FastSimHistograms.h:51
TH1F * m_diffP
Definition SimG4FastSimHistograms.h:57
virtual StatusCode finalize() final
Finalize.
Definition SimG4FastSimHistograms.cpp:64
Definition EventInformation.h:10