CMS 3D CMS Logo

MuonSensitiveDetector.h
Go to the documentation of this file.
1 #ifndef SimG4CMS_Muon_MuonSensitiveDetector_h
2 #define SimG4CMS_Muon_MuonSensitiveDetector_h
3 
25 
26 #include "G4Step.hh"
27 #include "G4StepPoint.hh"
28 #include "G4Track.hh"
29 
30 #include <string>
31 
32 class MuonSlaveSD;
34 class MuonFrameRotation;
35 class UpdatablePSimHit;
36 class MuonSubDetector;
37 class MuonG4Numbering;
38 class SimHitPrinter;
39 class TrackInformation;
40 class G4Track;
43 class SimTrackManager;
44 
46 public SensitiveTkDetector,
47 public Observer<const BeginOfEvent*>,
48 public Observer<const EndOfEvent*>
49  {
50 
51  public:
54  const SimTrackManager*);
55  ~MuonSensitiveDetector() override;
56  G4bool ProcessHits(G4Step *,G4TouchableHistory *) override;
57  uint32_t setDetUnitId(const G4Step *) override;
58  void EndOfEvent(G4HCofThisEvent*) override;
59 
60  void fillHits(edm::PSimHitContainer&, const std::string&) override;
61  void clearHits() override;
62 
63  std::string type();
64 
65  const MuonSlaveSD* GetSlaveMuon() const {
66  return slaveMuon; }
67 
68  private:
69  void update(const BeginOfEvent *) override;
70  void update(const ::EndOfEvent *) override;
71 
75 
76  TrackInformation* getOrCreateTrackInformation( const G4Track* theTrack );
77 
78  private:
84 
85  void storeVolumeAndTrack(const G4Step *);
86  bool newHit(G4Step *);
87  void createHit(G4Step *);
88  void updateHit(G4Step *);
89  void saveHit();
90 
96  Local3DPoint InitialStepPositionVsParent(G4Step * currentStep, G4int levelsUp);
97  Local3DPoint FinalStepPositionVsParent(G4Step * currentStep, G4int levelsUp);
98 
99  G4VPhysicalVolume * thePV;
101  uint32_t theDetUnitId;
102  unsigned int theTrackID;
103 
104  bool printHits;
107 
108  //--- SimTracks cuts
111 
113 
116 };
117 
118 #endif // MuonSensitiveDetector_h
Local3DPoint FinalStepPositionVsParent(G4Step *currentStep, G4int levelsUp)
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override
std::string type()
void storeVolumeAndTrack(const G4Step *)
type of data representation of DDCompactView
Definition: DDCompactView.h:90
MuonSubDetector * detector
void fillHits(edm::PSimHitContainer &, const std::string &) override
Local3DPoint toOrcaUnits(const Local3DPoint &)
G4ProcessTypeEnumerator * theG4ProcessTypeEnumerator
const SimTrackManager * theManager
MuonFrameRotation * theRotation
MuonSensitiveDetector(const std::string &, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
const MuonSlaveSD * GetSlaveMuon() const
uint32_t setDetUnitId(const G4Step *) override
void EndOfEvent(G4HCofThisEvent *) override
MuonSimHitNumberingScheme * numbering
G4TrackToParticleID * myG4TrackToParticleID
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
G4VPhysicalVolume * thePV
std::vector< PSimHit > PSimHitContainer
Local3DPoint InitialStepPositionVsParent(G4Step *currentStep, G4int levelsUp)
TrackInformation * getOrCreateTrackInformation(const G4Track *theTrack)
Local3DPoint toOrcaRef(Local3DPoint in, G4Step *)
MuonG4Numbering * g4numbering