6 #include "CLHEP/Units/PhysicalConstants.h" 11 map<string, double> dgtz;
12 vector<identifier> identity = aHit->
GetId();
17 int layer = 1*identity[0].id + identity[1].id - 1 ;
19 int sector = identity[2].id;
20 int strip = identity[3].id;
25 cout << log_msg <<
" layer: " << layer <<
" sector: " << sector <<
" Strip: " << strip
26 <<
" x=" << tInfos.
x <<
" y=" << tInfos.
y <<
" z=" << tInfos.
z << endl;
30 dgtz[
"layer"] = layer;
31 dgtz[
"sector"] = sector;
32 dgtz[
"strip"] = strip;
42 G4ThreeVector xyz = aStep->GetPostStepPoint()->GetPosition();
47 vector<identifier> yid = id;
51 int layer = 1*yid[0].id + yid[1].id - 1 ;
53 int sector = yid[2].id;
56 double depe = aStep->GetTotalEnergyDeposit();
58 vector<double> multi_hit = fmts.
FindStrip(layer-1, sector-1, x, y, z, depe);
60 int n_multi_hits = multi_hit.size()/2;
64 yid[3].id = (int) multi_hit[0];
66 yid[0].id_sharing = multi_hit[1];
67 yid[1].id_sharing = multi_hit[1];
68 yid[2].id_sharing = multi_hit[1];
69 yid[3].id_sharing = multi_hit[1];
73 for(
int h=1; h<n_multi_hits; h++)
75 for(
int j=0; j<3; j++)
78 this_id.
name = yid[j].name;
79 this_id.
rule = yid[j].rule;
80 this_id.
id = yid[j].id;
81 this_id.
time = yid[j].time;
83 this_id.
TrackId = yid[j].TrackId;
85 yid.push_back(this_id);
89 this_id.
name = yid[3].name;
90 this_id.
rule = yid[3].rule;
91 this_id.
id = (int) multi_hit[2];
92 this_id.
time = yid[3].time;
94 this_id.
TrackId = yid[3].TrackId;
96 yid.push_back(this_id);
107 map< string, vector <int> > MH;
vector< identifier > processID(vector< identifier >, G4Step *, detector)
vector< identifier > GetId()
int id
manually assing ID. 0 if "ncopy" (will be set at hit processing time)
string name
Name of the detector.
map< string, double > integrateDgt(MHit *, int)
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< double > FindStrip(int layer, int sector, double x, double y, double z, double Edep)
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)