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  std::vector<MaterialAccountingTrack>* m_tracks;
64  TFile* output_file_;
65  TProfile* radLen_vs_eta_;
66  bool isHGCal;
67  bool isHFNose;
68  static constexpr float innerHGCalEta = 2.4;
69  static constexpr float outerHGCalEta = 2.0;
70  static constexpr float innerHFnoseEta = 4.;
71  static constexpr float outerHFnoseEta = 3.3;
72  std::ofstream outVolumeZpositionTxt;
73 };
74 
75 #endif // TrackingMaterialProducer_h
MaterialAccountingTrack m_track
std::vector< MaterialAccountingTrack > * m_tracks
std::vector< std::string > m_selectedNames
HLT enums.
#define update(a, b)
std::vector< const G4LogicalVolume * > m_selectedVolumes
#define constexpr