CMS 3D CMS Logo

TrackingMaterialProducer.h
Go to the documentation of this file.
1 #ifndef TrackingMaterialProducer_h
2 #define TrackingMaterialProducer_h
3 #include <string>
4 #include <vector>
5 #include <fstream>
6 
9 
10 #include "G4LogicalVolume.hh"
11 
13 
14 #include "TProfile.h"
15 #include "TFile.h"
16 
17 class BeginOfJob;
18 class EndOfJob;
19 class BeginOfEvent;
20 class BeginOfTrack;
21 class EndOfTrack;
22 class G4Step;
23 
24 class G4StepPoint;
25 class G4VTouchable;
26 class G4VPhysicalVolume;
27 class G4LogicalVolume;
28 class G4TouchableHistory;
29 namespace edm {
30  class ParameterSet;
31 }
32 
34  public Observer<const BeginOfJob*>,
35  public Observer<const EndOfJob*>,
36  public Observer<const BeginOfEvent*>,
37  public Observer<const BeginOfTrack*>,
38  public Observer<const G4Step*>,
39  public Observer<const EndOfTrack*> {
40 public:
42  ~TrackingMaterialProducer() override;
43 
44 private:
45  void update(const BeginOfJob*) override;
46  void update(const BeginOfEvent*) override;
47  void update(const BeginOfTrack*) override;
48  void update(const G4Step*) override;
49  void update(const EndOfTrack*) override;
50  void update(const EndOfJob*) override;
51  void produce(edm::Event&, const edm::EventSetup&) override;
52 
53  bool isSelected(const G4VTouchable* touch);
54  bool isSelectedFast(const G4TouchableHistory* touch);
55 
56 private:
58  std::vector<std::string> m_selectedNames;
59  std::vector<const G4LogicalVolume*> m_selectedVolumes;
61  double m_hgcalzfront;
63  const G4VPhysicalVolume* m_track_volume;
64  std::vector<MaterialAccountingTrack>* m_tracks;
65  TFile* output_file_;
66  TProfile* radLen_vs_eta_;
67  bool isHGCal;
68  bool isHFNose;
69  static constexpr float innerHGCalEta = 2.4;
70  static constexpr float outerHGCalEta = 2.0;
71  static constexpr float innerHFnoseEta = 4.;
72  static constexpr float outerHFnoseEta = 3.3;
73  std::ofstream outVolumeZpositionTxt;
74 };
75 
76 #endif // TrackingMaterialProducer_h
Observer
Definition: Observer.h:23
TrackingMaterialProducer::isSelectedFast
bool isSelectedFast(const G4TouchableHistory *touch)
Definition: TrackingMaterialProducer.cc:186
edm
HLT enums.
Definition: AlignableModifier.h:19
SimProducer.h
TrackingMaterialProducer::isHGCal
bool isHGCal
Definition: TrackingMaterialProducer.h:67
TrackingMaterialProducer::m_tracks
std::vector< MaterialAccountingTrack > * m_tracks
Definition: TrackingMaterialProducer.h:64
TrackingMaterialProducer::m_selectedNames
std::vector< std::string > m_selectedNames
Definition: TrackingMaterialProducer.h:58
TrackingMaterialProducer::outVolumeZpositionTxt
std::ofstream outVolumeZpositionTxt
Definition: TrackingMaterialProducer.h:73
EndOfTrack
Definition: EndOfTrack.h:6
Observer.h
TrackingMaterialProducer::outerHFnoseEta
static constexpr float outerHFnoseEta
Definition: TrackingMaterialProducer.h:72
TrackingMaterialProducer::radLen_vs_eta_
TProfile * radLen_vs_eta_
Definition: TrackingMaterialProducer.h:66
TrackingMaterialProducer::isSelected
bool isSelected(const G4VTouchable *touch)
Definition: TrackingMaterialProducer.cc:356
MaterialAccountingTrack.h
TrackingMaterialProducer::outerHGCalEta
static constexpr float outerHGCalEta
Definition: TrackingMaterialProducer.h:70
TrackingMaterialProducer::m_track_volume
const G4VPhysicalVolume * m_track_volume
Definition: TrackingMaterialProducer.h:63
BeginOfTrack
Definition: BeginOfTrack.h:6
BeginOfJob
Definition: BeginOfJob.h:8
TrackingMaterialProducer::innerHFnoseEta
static constexpr float innerHFnoseEta
Definition: TrackingMaterialProducer.h:71
TrackingMaterialProducer::update
void update(const BeginOfJob *) override
This routine will be called when the appropriate signal arrives.
Definition: TrackingMaterialProducer.cc:118
TrackingMaterialProducer::output_file_
TFile * output_file_
Definition: TrackingMaterialProducer.h:65
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ParameterSet
Definition: ParameterSet.h:47
ParameterSet
Definition: Functions.h:16
SimProducer
Definition: SimProducer.h:64
TrackingMaterialProducer::innerHGCalEta
static constexpr float innerHGCalEta
Definition: TrackingMaterialProducer.h:69
MaterialAccountingTrack
Definition: MaterialAccountingTrack.h:10
BeginOfEvent
Definition: BeginOfEvent.h:6
edm::EventSetup
Definition: EventSetup.h:57
TrackingMaterialProducer::~TrackingMaterialProducer
~TrackingMaterialProducer() override
Definition: TrackingMaterialProducer.cc:110
TrackingMaterialProducer::m_track
MaterialAccountingTrack m_track
Definition: TrackingMaterialProducer.h:62
TrackingMaterialProducer::m_txtOutFile
std::string m_txtOutFile
Definition: TrackingMaterialProducer.h:60
TrackingMaterialProducer::isHFNose
bool isHFNose
Definition: TrackingMaterialProducer.h:68
TrackingMaterialProducer
Definition: TrackingMaterialProducer.h:33
TrackingMaterialProducer::m_hgcalzfront
double m_hgcalzfront
Definition: TrackingMaterialProducer.h:61
TrackingMaterialProducer::TrackingMaterialProducer
TrackingMaterialProducer(const edm::ParameterSet &)
Definition: TrackingMaterialProducer.cc:80
TrackingMaterialProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: TrackingMaterialProducer.cc:348
edm::Event
Definition: Event.h:73
TrackingMaterialProducer::m_primaryTracks
bool m_primaryTracks
Definition: TrackingMaterialProducer.h:57
TrackingMaterialProducer::m_selectedVolumes
std::vector< const G4LogicalVolume * > m_selectedVolumes
Definition: TrackingMaterialProducer.h:59