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