CMS 3D CMS Logo

TkAccumulatingSensitiveDetector.h
Go to the documentation of this file.
1 #ifndef SimG4CMS_TkAccumulatingSensitiveDetector_H
2 #define SimG4CMS_TkAccumulatingSensitiveDetector_H
3 
17 
18 #include "G4Step.hh"
19 #include "G4Track.hh"
20 
21 #include <string>
22 
23 class TrackInformation;
24 class SimTrackManager;
25 class TrackingSlaveSD;
26 class FrameRotation;
27 class UpdatablePSimHit;
30 
32  public Observer<const BeginOfEvent *>,
33  public Observer<const BeginOfTrack *>,
34  public Observer<const BeginOfJob *> {
35 public:
37  const GeometricDet *,
39  edm::ParameterSet const &,
40  const SimTrackManager *);
42  bool ProcessHits(G4Step *, G4TouchableHistory *) override;
43  uint32_t setDetUnitId(const G4Step *) override;
44  void EndOfEvent(G4HCofThisEvent *) override;
45 
46  void fillHits(edm::PSimHitContainer &, const std::string &) override;
47  void clearHits() override;
48 
49 private:
50  void createHit(const G4Step *);
51  void sendHit();
52  void updateHit(const G4Step *);
53  bool newHit(const G4Step *);
54  bool closeHit(const G4Step *);
55 
56 protected:
57  void update(const BeginOfEvent *) override;
58  void update(const BeginOfTrack *) override;
59  void update(const BeginOfJob *) override;
60 
61 private:
62  // data members initialised before run
65  std::unique_ptr<TrackingSlaveSD> slaveLowTof;
66  std::unique_ptr<TrackingSlaveSD> slaveHighTof;
67  std::unique_ptr<FrameRotation> theRotation;
68  std::unique_ptr<const G4ProcessTypeEnumerator> theG4ProcTypeEnumerator;
71  bool printHits;
73  double rTracker2; // tracker volume R^2
74  double rTracker; // tracker volume R
75  double zTracker; // tracker volume Z
76  float theTofLimit;
77  float energyCut;
79 
80  // run time cache
82  uint32_t lastId;
83  int lastTrack;
84 
85  // cache stuff for debugging and printout
88  const G4VPhysicalVolume *oldVolume;
89  float px, py, pz;
90  int eventno;
92 };
93 
94 #endif
TkAccumulatingSensitiveDetector::sendHit
void sendHit()
Definition: TkAccumulatingSensitiveDetector.cc:171
TkAccumulatingSensitiveDetector::printHits
bool printHits
Definition: TkAccumulatingSensitiveDetector.h:71
TkAccumulatingSensitiveDetector::energyCut
float energyCut
Definition: TkAccumulatingSensitiveDetector.h:77
TkAccumulatingSensitiveDetector::lastId
uint32_t lastId
Definition: TkAccumulatingSensitiveDetector.h:82
TkAccumulatingSensitiveDetector::theManager
const SimTrackManager * theManager
Definition: TkAccumulatingSensitiveDetector.h:64
SimTrackManager
Definition: SimTrackManager.h:35
TkAccumulatingSensitiveDetector::EndOfEvent
void EndOfEvent(G4HCofThisEvent *) override
Definition: TkAccumulatingSensitiveDetector.cc:339
TkAccumulatingSensitiveDetector::createHit
void createHit(const G4Step *)
Definition: TkAccumulatingSensitiveDetector.cc:204
TkAccumulatingSensitiveDetector::px
float px
Definition: TkAccumulatingSensitiveDetector.h:89
Observer
Definition: Observer.h:23
TkAccumulatingSensitiveDetector::zTracker
double zTracker
Definition: TkAccumulatingSensitiveDetector.h:75
BeginOfJob.h
TkAccumulatingSensitiveDetector::theTofLimit
float theTofLimit
Definition: TkAccumulatingSensitiveDetector.h:76
TkAccumulatingSensitiveDetector::theNumberingScheme
TrackerG4SimHitNumberingScheme * theNumberingScheme
Definition: TkAccumulatingSensitiveDetector.h:69
TkAccumulatingSensitiveDetector::slaveHighTof
std::unique_ptr< TrackingSlaveSD > slaveHighTof
Definition: TkAccumulatingSensitiveDetector.h:66
SensitiveTkDetector
Definition: SensitiveTkDetector.h:8
TkAccumulatingSensitiveDetector
Definition: TkAccumulatingSensitiveDetector.h:31
TkAccumulatingSensitiveDetector::pname
std::string pname
Definition: TkAccumulatingSensitiveDetector.h:91
TkAccumulatingSensitiveDetector::slaveLowTof
std::unique_ptr< TrackingSlaveSD > slaveLowTof
Definition: TkAccumulatingSensitiveDetector.h:65
TkAccumulatingSensitiveDetector::TkAccumulatingSensitiveDetector
TkAccumulatingSensitiveDetector(const std::string &, const GeometricDet *, const SensitiveDetectorCatalog &, edm::ParameterSet const &, const SimTrackManager *)
Definition: TkAccumulatingSensitiveDetector.cc:41
TkAccumulatingSensitiveDetector::energyHistoryCut
float energyHistoryCut
Definition: TkAccumulatingSensitiveDetector.h:78
TkAccumulatingSensitiveDetector::lastTrack
int lastTrack
Definition: TkAccumulatingSensitiveDetector.h:83
EndOfEvent.h
G4ProcessTypeEnumerator
Definition: G4ProcessTypeEnumerator.h:6
TkAccumulatingSensitiveDetector::newHit
bool newHit(const G4Step *)
Definition: TkAccumulatingSensitiveDetector.cc:314
Observer.h
SensitiveTkDetector.h
TkAccumulatingSensitiveDetector::theRotation
std::unique_ptr< FrameRotation > theRotation
Definition: TkAccumulatingSensitiveDetector.h:67
BeginOfTrack.h
FrameRotation
Definition: FrameRotation.h:8
TkAccumulatingSensitiveDetector::closeHit
bool closeHit(const G4Step *)
Definition: TkAccumulatingSensitiveDetector.cc:331
TkAccumulatingSensitiveDetector::pDD_
const GeometricDet * pDD_
Definition: TkAccumulatingSensitiveDetector.h:63
TkAccumulatingSensitiveDetector::py
float py
Definition: TkAccumulatingSensitiveDetector.h:89
TkAccumulatingSensitiveDetector::globalEntryPoint
Local3DPoint globalEntryPoint
Definition: TkAccumulatingSensitiveDetector.h:86
TkAccumulatingSensitiveDetector::~TkAccumulatingSensitiveDetector
~TkAccumulatingSensitiveDetector() override
Definition: TkAccumulatingSensitiveDetector.cc:102
TkAccumulatingSensitiveDetector::setDetUnitId
uint32_t setDetUnitId(const G4Step *) override
Definition: TkAccumulatingSensitiveDetector.cc:122
TkAccumulatingSensitiveDetector::globalExitPoint
Local3DPoint globalExitPoint
Definition: TkAccumulatingSensitiveDetector.h:87
GeometricDet
Definition: GeometricDet.h:31
TkAccumulatingSensitiveDetector::ProcessHits
bool ProcessHits(G4Step *, G4TouchableHistory *) override
Definition: TkAccumulatingSensitiveDetector.cc:104
BeginOfTrack
Definition: BeginOfTrack.h:6
SensitiveDetectorCatalog
Definition: SensitiveDetectorCatalog.h:10
BeginOfJob
Definition: BeginOfJob.h:8
Point3DBase< float, LocalTag >
TrackerG4SimHitNumberingScheme
Definition: TrackerG4SimHitNumberingScheme.h:12
edm::ParameterSet
Definition: ParameterSet.h:47
TkAccumulatingSensitiveDetector::fillHits
void fillHits(edm::PSimHitContainer &, const std::string &) override
Definition: TkAccumulatingSensitiveDetector.cc:359
UpdatablePSimHit
Definition: UpdatablePSimHit.h:12
TkAccumulatingSensitiveDetector::clearHits
void clearHits() override
Definition: TkAccumulatingSensitiveDetector.cc:354
BeginOfEvent.h
TrackInformation
Definition: TrackInformation.h:12
TkAccumulatingSensitiveDetector::neverAccumulate
bool neverAccumulate
Definition: TkAccumulatingSensitiveDetector.h:72
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:345
TkAccumulatingSensitiveDetector::eventno
int eventno
Definition: TkAccumulatingSensitiveDetector.h:90
GeometricDet.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TkAccumulatingSensitiveDetector::theG4ProcTypeEnumerator
std::unique_ptr< const G4ProcessTypeEnumerator > theG4ProcTypeEnumerator
Definition: TkAccumulatingSensitiveDetector.h:68
TkAccumulatingSensitiveDetector::allowZeroEnergyLoss
bool allowZeroEnergyLoss
Definition: TkAccumulatingSensitiveDetector.h:70
Frameworkfwd.h
TkAccumulatingSensitiveDetector::mySimHit
UpdatablePSimHit * mySimHit
Definition: TkAccumulatingSensitiveDetector.h:81
TkAccumulatingSensitiveDetector::updateHit
void updateHit(const G4Step *)
Definition: TkAccumulatingSensitiveDetector.cc:296
ParameterSetfwd.h
TkAccumulatingSensitiveDetector::rTracker2
double rTracker2
Definition: TkAccumulatingSensitiveDetector.h:73
TkAccumulatingSensitiveDetector::pz
float pz
Definition: TkAccumulatingSensitiveDetector.h:89
edm::PSimHitContainer
std::vector< PSimHit > PSimHitContainer
Definition: PSimHitContainer.h:11
TkAccumulatingSensitiveDetector::oldVolume
const G4VPhysicalVolume * oldVolume
Definition: TkAccumulatingSensitiveDetector.h:88
TkAccumulatingSensitiveDetector::rTracker
double rTracker
Definition: TkAccumulatingSensitiveDetector.h:74