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 
8 
9 #include "G4LogicalVolume.hh"
10 
12 
13 #include "TProfile.h"
14 #include "TFile.h"
15 
16 class BeginOfJob;
17 class EndOfJob;
18 class BeginOfEvent;
19 class BeginOfTrack;
20 class EndOfTrack;
21 class G4Step;
22 
23 class G4StepPoint;
24 class G4VTouchable;
25 class G4VPhysicalVolume;
26 class G4LogicalVolume;
27 
29  public Observer<const BeginOfJob*>,
30  public Observer<const EndOfJob*>,
31  public Observer<const BeginOfEvent*>,
32  public Observer<const BeginOfTrack*>,
33  public Observer<const G4Step*>,
34  public Observer<const EndOfTrack*>
35 {
36 public:
38  ~TrackingMaterialProducer() override;
39 
40 private:
41  void update(const BeginOfJob*) override;
42  void update(const BeginOfEvent*) override;
43  void update(const BeginOfTrack*) override;
44  void update(const G4Step*) override;
45  void update(const EndOfTrack*) override;
46  void update(const EndOfJob*) override;
47  void produce(edm::Event&, const edm::EventSetup&) override;
48 
49  bool isSelected( const G4VTouchable* touch );
50  bool isSelectedFast( const G4TouchableHistory* touch );
51 
52 private:
54  std::vector<std::string> m_selectedNames;
55  std::vector<const G4LogicalVolume *> m_selectedVolumes;
57  std::vector<MaterialAccountingTrack>* m_tracks;
58  TFile * output_file_;
59  TProfile * radLen_vs_eta_;
60 };
61 
62 #endif // TrackingMaterialProducer_h
MaterialAccountingTrack m_track
TrackingMaterialProducer(const edm::ParameterSet &)
std::vector< MaterialAccountingTrack > * m_tracks
std::vector< const G4LogicalVolume * > m_selectedVolumes
std::vector< std::string > m_selectedNames
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)