GEMC  2.2
Geant4 Monte-Carlo Framework
identifier.h
Go to the documentation of this file.
1 
6 #ifndef identifier_H
7 #define identifier_H 1
8 
9 // G4 headers
10 #include "G4VTouchable.hh"
11 
12 // C++ headers
13 #include <string>
14 #include <vector>
15 using namespace std;
16 
17 
26 {
27  public:
29  {
30  time = 0;
31  TimeWindow = 0;
32  id_sharing = 1;
33  }
34 
36 
37  string name;
38  string rule;
39  int id;
40  double time;
41  double TimeWindow;
42  int TrackId;
43  double id_sharing;
44 
45  public:
46  friend ostream &operator<<(ostream &stream, vector<identifier>);
47  bool operator== (const identifier& I) const;
48  bool operator< (const identifier& I) const;
49  bool operator> (const identifier& I) const;
50  bool operator<= (const identifier& I) const {return !(*this > I);}
51  bool operator>= (const identifier& I) const {return !(*this < I);}
52  bool operator!= (const identifier& I) const {return !(*this == I);}
53 };
54 
55 
56 // move this somewhere?
57 vector<identifier> SetId(vector<identifier>, G4VTouchable*, double, double, int);
58 
59 // returns vector of identifier from stringstream
60 vector<identifier> get_identifiers(string var);
61 
62 #endif
63 
vector< identifier > get_identifiers(string var)
Definition: identifier.cc:110
STL namespace.
int id
manually assing ID. 0 if "ncopy" (will be set at hit processing time)
Definition: identifier.h:39
string name
Name of the detector.
Definition: identifier.h:37
double TimeWindow
Time Window. If abs(steptime - time) is smaller than TimeWindow, it&#39;s the same hit.
Definition: identifier.h:41
int TrackId
If Time Window is 0, it&#39;s a "flux" detector: if it&#39;s the same track, it&#39;s the same hit...
Definition: identifier.h:42
double id_sharing
A single step can generate multiple identifiers. This variable represent the percentage sharing of th...
Definition: identifier.h:43
double time
Time of the first step.
Definition: identifier.h:40
vector< identifier > SetId(vector< identifier >, G4VTouchable *, double, double, int)
Sets the ncopy ID accordingly to Geant4 Volumes copy number. Sets time, TimeWindow, TrackId.
Definition: identifier.cc:74
string rule
"manual" or "ncopy"
Definition: identifier.h:38