CMS 3D CMS Logo

TkAccumulatingSensitiveDetector.h
Go to the documentation of this file.
1 #ifndef SimG4CMS_TkAccumulatingSensitiveDetector_H
2 #define SimG4CMS_TkAccumulatingSensitiveDetector_H
3 
14 
15 #include "G4Step.hh"
16 #include "G4Track.hh"
17 
18 #include <string>
19 
20 class TrackInformation;
21 class SimTrackManager;
22 class TrackingSlaveSD;
23 class FrameRotation;
24 class UpdatablePSimHit;
27 
29  public Observer<const BeginOfEvent *>,
30  public Observer<const BeginOfTrack *>,
31  public Observer<const BeginOfJob *> {
32 public:
34  const edm::EventSetup &,
36  edm::ParameterSet const &,
37  const SimTrackManager *);
39  bool ProcessHits(G4Step *, G4TouchableHistory *) override;
40  uint32_t setDetUnitId(const G4Step *) override;
41  void EndOfEvent(G4HCofThisEvent *) override;
42 
43  void fillHits(edm::PSimHitContainer &, const std::string &) override;
44  void clearHits() override;
45 
46 private:
47  void createHit(const G4Step *);
48  void sendHit();
49  void updateHit(const G4Step *);
50  bool newHit(const G4Step *);
51  bool closeHit(const G4Step *);
52 
53 protected:
54  void update(const BeginOfEvent *) override;
55  void update(const BeginOfTrack *) override;
56  void update(const BeginOfJob *) override;
57 
58 private:
59  // data members initialised before run
61  std::unique_ptr<TrackingSlaveSD> slaveLowTof;
62  std::unique_ptr<TrackingSlaveSD> slaveHighTof;
63  std::unique_ptr<FrameRotation> theRotation;
64  std::unique_ptr<const G4ProcessTypeEnumerator> theG4ProcTypeEnumerator;
67  bool printHits;
69  double rTracker2; // tracker volume R^2
70  double rTracker; // tracker volume R
71  double zTracker; // tracker volume Z
72  float theTofLimit;
73  float energyCut;
75 
76  // run time cache
78  uint32_t lastId;
79  int lastTrack;
80 
81  // cache stuff for debugging and printout
84  const G4VPhysicalVolume *oldVolume;
85  float px, py, pz;
86  int eventno;
88 };
89 
90 #endif
TkAccumulatingSensitiveDetector::sendHit
void sendHit()
Definition: TkAccumulatingSensitiveDetector.cc:175
TkAccumulatingSensitiveDetector::printHits
bool printHits
Definition: TkAccumulatingSensitiveDetector.h:67
TkAccumulatingSensitiveDetector::energyCut
float energyCut
Definition: TkAccumulatingSensitiveDetector.h:73
TkAccumulatingSensitiveDetector::lastId
uint32_t lastId
Definition: TkAccumulatingSensitiveDetector.h:78
TkAccumulatingSensitiveDetector::theManager
const SimTrackManager * theManager
Definition: TkAccumulatingSensitiveDetector.h:60
SimTrackManager
Definition: SimTrackManager.h:35
TkAccumulatingSensitiveDetector::EndOfEvent
void EndOfEvent(G4HCofThisEvent *) override
Definition: TkAccumulatingSensitiveDetector.cc:343
TkAccumulatingSensitiveDetector::createHit
void createHit(const G4Step *)
Definition: TkAccumulatingSensitiveDetector.cc:208
TkAccumulatingSensitiveDetector::px
float px
Definition: TkAccumulatingSensitiveDetector.h:85
Observer
Definition: Observer.h:23
TkAccumulatingSensitiveDetector::zTracker
double zTracker
Definition: TkAccumulatingSensitiveDetector.h:71
BeginOfJob.h
TkAccumulatingSensitiveDetector::theTofLimit
float theTofLimit
Definition: TkAccumulatingSensitiveDetector.h:72
TkAccumulatingSensitiveDetector::theNumberingScheme
TrackerG4SimHitNumberingScheme * theNumberingScheme
Definition: TkAccumulatingSensitiveDetector.h:65
TkAccumulatingSensitiveDetector::slaveHighTof
std::unique_ptr< TrackingSlaveSD > slaveHighTof
Definition: TkAccumulatingSensitiveDetector.h:62
SensitiveTkDetector
Definition: SensitiveTkDetector.h:8
TkAccumulatingSensitiveDetector
Definition: TkAccumulatingSensitiveDetector.h:28
TkAccumulatingSensitiveDetector::pname
std::string pname
Definition: TkAccumulatingSensitiveDetector.h:87
TkAccumulatingSensitiveDetector::slaveLowTof
std::unique_ptr< TrackingSlaveSD > slaveLowTof
Definition: TkAccumulatingSensitiveDetector.h:61
TkAccumulatingSensitiveDetector::energyHistoryCut
float energyHistoryCut
Definition: TkAccumulatingSensitiveDetector.h:74
TkAccumulatingSensitiveDetector::lastTrack
int lastTrack
Definition: TkAccumulatingSensitiveDetector.h:79
EndOfEvent.h
G4ProcessTypeEnumerator
Definition: G4ProcessTypeEnumerator.h:6
TkAccumulatingSensitiveDetector::newHit
bool newHit(const G4Step *)
Definition: TkAccumulatingSensitiveDetector.cc:318
Observer.h
SensitiveTkDetector.h
TkAccumulatingSensitiveDetector::theRotation
std::unique_ptr< FrameRotation > theRotation
Definition: TkAccumulatingSensitiveDetector.h:63
BeginOfTrack.h
FrameRotation
Definition: FrameRotation.h:8
TkAccumulatingSensitiveDetector::closeHit
bool closeHit(const G4Step *)
Definition: TkAccumulatingSensitiveDetector.cc:335
TkAccumulatingSensitiveDetector::py
float py
Definition: TkAccumulatingSensitiveDetector.h:85
TkAccumulatingSensitiveDetector::globalEntryPoint
Local3DPoint globalEntryPoint
Definition: TkAccumulatingSensitiveDetector.h:82
TkAccumulatingSensitiveDetector::~TkAccumulatingSensitiveDetector
~TkAccumulatingSensitiveDetector() override
Definition: TkAccumulatingSensitiveDetector.cc:106
TkAccumulatingSensitiveDetector::setDetUnitId
uint32_t setDetUnitId(const G4Step *) override
Definition: TkAccumulatingSensitiveDetector.cc:126
TkAccumulatingSensitiveDetector::globalExitPoint
Local3DPoint globalExitPoint
Definition: TkAccumulatingSensitiveDetector.h:83
TkAccumulatingSensitiveDetector::ProcessHits
bool ProcessHits(G4Step *, G4TouchableHistory *) override
Definition: TkAccumulatingSensitiveDetector.cc:108
BeginOfTrack
Definition: BeginOfTrack.h:6
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
BeginOfJob
Definition: BeginOfJob.h:8
Point3DBase< float, LocalTag >
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TrackerG4SimHitNumberingScheme
Definition: TrackerG4SimHitNumberingScheme.h:12
edm::ParameterSet
Definition: ParameterSet.h:47
TkAccumulatingSensitiveDetector::fillHits
void fillHits(edm::PSimHitContainer &, const std::string &) override
Definition: TkAccumulatingSensitiveDetector.cc:369
UpdatablePSimHit
Definition: UpdatablePSimHit.h:12
TkAccumulatingSensitiveDetector::clearHits
void clearHits() override
Definition: TkAccumulatingSensitiveDetector.cc:364
BeginOfEvent.h
TrackInformation
Definition: TrackInformation.h:8
TkAccumulatingSensitiveDetector::neverAccumulate
bool neverAccumulate
Definition: TkAccumulatingSensitiveDetector.h:68
TrackingSlaveSD
Definition: TrackingSlaveSD.h:11
BeginOfEvent
Definition: BeginOfEvent.h:6
TkAccumulatingSensitiveDetector::update
void update(const BeginOfEvent *) override
This routine will be called when the appropriate signal arrives.
Definition: TkAccumulatingSensitiveDetector.cc:349
edm::EventSetup
Definition: EventSetup.h:57
TkAccumulatingSensitiveDetector::eventno
int eventno
Definition: TkAccumulatingSensitiveDetector.h:86
TkAccumulatingSensitiveDetector::theG4ProcTypeEnumerator
std::unique_ptr< const G4ProcessTypeEnumerator > theG4ProcTypeEnumerator
Definition: TkAccumulatingSensitiveDetector.h:64
TkAccumulatingSensitiveDetector::allowZeroEnergyLoss
bool allowZeroEnergyLoss
Definition: TkAccumulatingSensitiveDetector.h:66
TkAccumulatingSensitiveDetector::mySimHit
UpdatablePSimHit * mySimHit
Definition: TkAccumulatingSensitiveDetector.h:77
TkAccumulatingSensitiveDetector::updateHit
void updateHit(const G4Step *)
Definition: TkAccumulatingSensitiveDetector.cc:300
TkAccumulatingSensitiveDetector::rTracker2
double rTracker2
Definition: TkAccumulatingSensitiveDetector.h:69
TkAccumulatingSensitiveDetector::pz
float pz
Definition: TkAccumulatingSensitiveDetector.h:85
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
TkAccumulatingSensitiveDetector::TkAccumulatingSensitiveDetector
TkAccumulatingSensitiveDetector(const std::string &, const edm::EventSetup &, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: TkAccumulatingSensitiveDetector.cc:46
TkAccumulatingSensitiveDetector::oldVolume
const G4VPhysicalVolume * oldVolume
Definition: TkAccumulatingSensitiveDetector.h:84
TkAccumulatingSensitiveDetector::rTracker
double rTracker
Definition: TkAccumulatingSensitiveDetector.h:70