CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonSensitiveDetector.h
Go to the documentation of this file.
1 #ifndef SimG4CMS_Muon_MuonSensitiveDetector_h
2 #define SimG4CMS_Muon_MuonSensitiveDetector_h
3 
24 
25 #include "G4Step.hh"
26 #include "G4StepPoint.hh"
27 #include "G4Track.hh"
28 
29 #include <string>
30 
31 class MuonSlaveSD;
33 class MuonFrameRotation;
34 class UpdatablePSimHit;
35 class MuonSubDetector;
36 class MuonG4Numbering;
37 class SimHitPrinter;
38 class TrackInformation;
39 class G4Track;
42 class SimTrackManager;
43 
45 public SensitiveTkDetector,
46 public Observer<const BeginOfEvent*>,
47 public Observer<const EndOfEvent*>
48  {
49 
50  public:
53  const SimTrackManager*);
54  virtual ~MuonSensitiveDetector();
55  virtual G4bool ProcessHits(G4Step *,G4TouchableHistory *);
56  virtual uint32_t setDetUnitId(G4Step *);
57  virtual void EndOfEvent(G4HCofThisEvent*);
58 
60  std::vector<std::string> getNames();
61  std::string type();
62 
63  const MuonSlaveSD* GetSlaveMuon() const {
64  return slaveMuon; }
65 
66  private:
67  void update(const BeginOfEvent *);
68  void update(const ::EndOfEvent *);
69  virtual void clearHits();
70 
74 
75  TrackInformation* getOrCreateTrackInformation( const G4Track* theTrack );
76 
77  private:
83 
84  void storeVolumeAndTrack(G4Step *);
85  bool newHit(G4Step *);
86  void createHit(G4Step *);
87  void updateHit(G4Step *);
88  void saveHit();
89 
95  Local3DPoint InitialStepPositionVsParent(G4Step * currentStep, G4int levelsUp);
96  Local3DPoint FinalStepPositionVsParent(G4Step * currentStep, G4int levelsUp);
97 
98  G4VPhysicalVolume * thePV;
100  uint32_t theDetUnitId;
101  unsigned int theTrackID;
102 
103  bool printHits;
106 
107  //--- SimTracks cuts
110 
112 
115 };
116 
117 #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:77
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)
UpdatablePSimHit * theHit
MuonG4Numbering * g4numbering
virtual G4bool ProcessHits(G4Step *, G4TouchableHistory *)