6 #include "CLHEP/Units/PhysicalConstants.h" 11 map<string, double> dgtz;
12 vector<identifier> identity = aHit->
GetId();
17 int layer = 2*identity[0].id + identity[1].id - 2 ;
18 int sector = identity[2].id;
19 int strip = identity[3].id;
24 cout << log_msg <<
" layer: " << layer <<
" sector: " << sector <<
" Strip: " << strip
25 <<
" x=" << tInfos.
x <<
" y=" << tInfos.
y <<
" z=" << tInfos.
z << endl;
28 dgtz[
"layer"] = layer;
29 dgtz[
"sector"] = sector;
30 dgtz[
"strip"] = strip;
40 G4ThreeVector xyz = aStep->GetPostStepPoint()->GetPosition();
45 vector<identifier> yid = id;
49 int layer = 2*yid[0].id + yid[1].id - 2 ;
52 double depe = aStep->GetTotalEnergyDeposit();
54 vector<double> multi_hit = ftms.
FindStrip(layer-1, x, y, z, depe);
56 int n_multi_hits = multi_hit.size()/2;
60 yid[3].id = (int) multi_hit[0];
62 yid[0].id_sharing = multi_hit[1];
63 yid[1].id_sharing = multi_hit[1];
64 yid[2].id_sharing = multi_hit[1];
65 yid[3].id_sharing = multi_hit[1];
69 for(
int h=1; h<n_multi_hits; h++)
71 for(
int j=0; j<3; j++)
74 this_id.
name = yid[j].name;
75 this_id.
rule = yid[j].rule;
76 this_id.
id = yid[j].id;
77 this_id.
time = yid[j].time;
79 this_id.
TrackId = yid[j].TrackId;
81 yid.push_back(this_id);
85 this_id.
name = yid[3].name;
86 this_id.
rule = yid[3].rule;
87 this_id.
id = (int) multi_hit[2];
88 this_id.
time = yid[3].time;
90 this_id.
TrackId = yid[3].TrackId;
92 yid.push_back(this_id);
101 map< string, vector <int> > MH;
map< string, double > integrateDgt(MHit *, int)
vector< identifier > GetId()
int id
manually assing ID. 0 if "ncopy" (will be set at hit processing time)
string name
Name of the detector.
vector< double > FindStrip(int layer, double x, double y, double z, double Edep)
double TimeWindow
Time Window. If abs(steptime - time) is smaller than TimeWindow, it's the same hit.
int TrackId
If Time Window is 0, it's a "flux" detector: if it's the same track, it's the same hit...
vector< identifier > processID(vector< identifier >, G4Step *, detector)
double id_sharing
A single step can generate multiple identifiers. This variable represent the percentage sharing of th...
double time
Time of the first step.
string rule
"manual" or "ncopy"
map< string, vector< int > > multiDgt(MHit *, int)