GEMC  2.2
Geant4 Monte-Carlo Framework
sensitiveDetector.h
Go to the documentation of this file.
1 #ifndef sensitiveDetector_H
6 #define sensitiveDetector_H 1
7 
8 // G4 headers
9 #include "G4VSensitiveDetector.hh"
10 #include "G4Step.hh"
11 #include "G4HCofThisEvent.hh"
12 #include "G4TouchableHistory.hh"
13 
14 // gemc headers
15 #include "sensitiveID.h"
16 #include "detector.h"
17 #include "Hit.h"
18 #include "HitProcess.h"
19 
20 // C++ headers
21 #include <iostream>
22 #include <string>
23 #include <set>
24 using namespace std;
25 
26 
36 {
37  public:
38  sensitiveDetector(G4String, goptions, string factory, int run, string variation, string system);
39  virtual ~sensitiveDetector();
40 
41  virtual void Initialize(G4HCofThisEvent*);
42  virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
43  virtual void EndOfEvent(G4HCofThisEvent*);
44 
45  G4String HCname;
46  map<string, detector> *hallMap;
47  map<string, HitProcess_Factory> *hitProcessMap;
48  set<vector<identifier> > Id_Set;
49 
52 
53  private:
54  MHitCollection *hitCollection;
55  HitProcess *ProcessHitRoutine;
56  int HCID;
57 
58  string hd_msg1;
59  string hd_msg2;
60  string hd_msg3;
61  string catch_v;
62  double verbosity;
63  double RECORD_PASSBY;
64  double RECORD_MIRROR;
65 
66 
67  public:
68  vector<identifier> GetDetectorIdentifier(string name) {return (*hallMap)[name].identity;}
69  string GetDetectorHitType(string name) {return (*hallMap)[name].hitType;}
70  MHitCollection* GetMHitCollection() {if(hitCollection) return hitCollection; else return NULL;}
71  MHit* find_existing_hit(vector<identifier>);
72 };
73 
74 
75 #endif
76 
77 
78 
79 
80 
81 
82 
83 
84 
85 
sensitiveID SDID
sensitiveID used for identification, hit properties and digitization
G4String HCname
Sensitive Detector/Hit Collection Name.
double verbosity
STL namespace.
vector< identifier > GetDetectorIdentifier(string name)
returns detector identity
goptions gemcOpt
gemc option class
map< string, HitProcess_Factory > * hitProcessMap
Hit Process Routine Factory Map.
set< vector< identifier > > Id_Set
Identifier Set. Used to determine if a step is inside a new/existing element.
G4THitsCollection< MHit > MHitCollection
Definition: Hit.h:155
Definition: Hit.h:22
map< string, detector > * hallMap
detector map
string GetDetectorHitType(string name)
returns detector hitType
MHitCollection * GetMHitCollection()
returns hit collection