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(G4Step *) override;
58  void EndOfEvent(G4HCofThisEvent*) override;
59 
60  void fillHits(edm::PSimHitContainer&, std::string use) override;
61  std::vector<std::string> getNames() override;
62  std::string type();
63 
64  const MuonSlaveSD* GetSlaveMuon() const {
65  return slaveMuon; }
66 
67  private:
68  void update(const BeginOfEvent *) override;
69  void update(const ::EndOfEvent *) override;
70  void clearHits() override;
71 
75 
76  TrackInformation* getOrCreateTrackInformation( const G4Track* theTrack );
77 
78  private:
84 
85  void storeVolumeAndTrack(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()
uint32_t setDetUnitId(G4Step *) override
type of data representation of DDCompactView
Definition: DDCompactView.h:90
MuonSubDetector * detector
void fillHits(edm::PSimHitContainer &, std::string use) override
G4ProcessTypeEnumerator * theG4ProcessTypeEnumerator
std::vector< std::string > getNames() override
Local3DPoint toOrcaUnits(Local3DPoint)
const SimTrackManager * theManager
MuonFrameRotation * theRotation
const MuonSlaveSD * GetSlaveMuon() const
void EndOfEvent(G4HCofThisEvent *) override
MuonSimHitNumberingScheme * numbering
Local3DPoint toOrcaRef(Local3DPoint in, G4Step *s)
G4TrackToParticleID * myG4TrackToParticleID
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
MuonSensitiveDetector(std::string, const DDCompactView &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
G4VPhysicalVolume * thePV
std::vector< PSimHit > PSimHitContainer
Local3DPoint InitialStepPositionVsParent(G4Step *currentStep, G4int levelsUp)
TrackInformation * getOrCreateTrackInformation(const G4Track *theTrack)
MuonG4Numbering * g4numbering