4 #include "G4UnitsTable.hh" 15 HCname =
"OTOF Hit Process";
20 int nsteps = aHit->
GetPos().size();
24 vector<G4double> Edep = aHit->
GetEdep();
25 for(
int s=0; s<nsteps; s++) Etot = Etot + Edep[s];
30 x = y = z = lx = ly = lz = 0;
31 vector<G4ThreeVector> pos = aHit->
GetPos();
32 vector<G4ThreeVector> Lpos = aHit->
GetLPos();
35 for(
int s=0; s<nsteps; s++)
37 x = x + pos[s].x()*Edep[s]/Etot;
38 y = y + pos[s].y()*Edep[s]/Etot;
39 z = z + pos[s].z()*Edep[s]/Etot;
40 lx = lx + Lpos[s].x()*Edep[s]/Etot;
41 ly = ly + Lpos[s].y()*Edep[s]/Etot;
42 lz = lz + Lpos[s].z()*Edep[s]/Etot;
56 vector<G4double> times = aHit->
GetTime();
57 for(
int s=0; s<nsteps; s++) time = time + times[s]/nsteps;
60 double Ene = aHit->
GetE();
62 out.
raws.push_back(Etot);
63 out.
raws.push_back(x);
64 out.
raws.push_back(y);
65 out.
raws.push_back(z);
66 out.
raws.push_back(lx);
67 out.
raws.push_back(ly);
68 out.
raws.push_back(lz);
69 out.
raws.push_back(time);
74 out.
raws.push_back(Ene);
95 double dLeft = length + lx;
96 double dRight = length - lx;
99 int ADCL = (int) (100*Etot*exp(-dLeft/length/2 ));
100 int ADCR = (int) (100*Etot*exp(-dRight/length/2 ));
103 int TDCL = (int) (100*(time/ns + dLeft/cm/30.0));
104 int TDCR = (int) (100*(time/ns + dRight/cm/30.0));
106 out.
dgtz.push_back(sector);
107 out.
dgtz.push_back(paddle);
108 out.
dgtz.push_back(ADCL);
109 out.
dgtz.push_back(ADCR);
110 out.
dgtz.push_back(TDCL);
111 out.
dgtz.push_back(TDCR);
118 id[
id.size()-1].id_sharing = 1;
vector< double > raws
Raw information.
vector< identifier > GetId()
string HCname
Hit Collection name.
PH_output ProcessHit(MHit *, gemc_opts)
Method to process the hit.
vector< identifier > identity
Identifier.
vector< G4ThreeVector > GetLPos()
vector< identifier > ProcessID(vector< identifier >, G4Step *, detector, gemc_opts)
Method to calculate new identifier.
vector< G4ThreeVector > GetPos()
vector< double > GetTime()
vector< double > dimensions
vector of dimensions. Size, units depends on solid type
vector< double > GetEdep()
vector< int > dgtz
Digitized information.