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
static constexpr float innerHGCalEta
MaterialAccountingTrack m_track
static constexpr float outerHFnoseEta
TrackingMaterialProducer(const edm::ParameterSet &)
static constexpr float outerHGCalEta
const G4VPhysicalVolume * m_track_volume
std::vector< MaterialAccountingTrack > * m_tracks
static constexpr float innerHFnoseEta
std::vector< std::string > m_selectedNames
HLT enums.
std::vector< const G4LogicalVolume * > m_selectedVolumes
void produce(edm::Event &, const edm::EventSetup &) override
void update(const BeginOfJob *) override
This routine will be called when the appropriate signal arrives.
bool isSelected(const G4VTouchable *touch)
bool isSelectedFast(const G4TouchableHistory *touch)