88 G4double chg=aStep->GetTrack()->GetDefinition()->GetPDGCharge();
89 G4double edep = aStep->GetTotalEnergyDeposit();
90 G4double stepL=aStep->GetStepLength();
91 G4double deltaT=aStep->GetDeltaTime();
92 G4StepPoint* preStep = aStep->GetPreStepPoint();
93 G4ThreeVector pDirection=preStep->GetMomentumDirection();
94 G4String particleName = aStep->GetTrack()->GetDefinition()->GetParticleName();
95 G4Material* scinMaterial = aStep->GetTrack()->GetMaterial();
96 G4double charge = aStep->GetTrack()->GetDefinition()->GetPDGCharge();
97 G4int pdgcode = aStep->GetTrack()->GetDefinition()->GetPDGEncoding();
99 if (chg==0&&edep==0&&stepL==0)
104 G4int trackId = aStep->GetTrack()->GetTrackID();
107 newHit->
SetG4Index(aStep->GetTrack()->GetTrackID());
111 newHit->
SetTrackL(aStep->GetTrack()->GetTrackLength());
112 G4ThreeVector pos=preStep->GetPosition();
114 G4double globalTime=preStep->GetGlobalTime();
126 G4TouchableHistory* theTouchable
127 = (G4TouchableHistory*)(preStep->GetTouchable());
132 G4String name = theTouchable->GetVolume(0)->GetName();
134 G4int partId, scinNb, number,help_mrpc,module_mrpc ;
136 number = theTouchable->GetReplicaNumber(2);
137 help_mrpc = theTouchable->GetReplicaNumber(3);
141 if(name==
"physical_sensitive_detector_west_1")
146 else if(name==
"physical_sensitive_detector_west_2")
151 else if(name==
"physical_sensitive_detector_east_1")
156 else if(name==
"physical_sensitive_detector_east_2")
162 else if(name==
"logical_sensitive_detector_west_1")
165 scinNb = (help_mrpc)*(-0.5)+18.5;
167 else if(name==
"logical_sensitive_detector_west_2")
170 scinNb = (help_mrpc)*(-0.5)+18;
172 else if(name==
"logical_sensitive_detector_east_1")
175 scinNb = (help_mrpc)*(0.5)+0.5;
178 else if(name==
"logical_sensitive_detector_east_2")
181 scinNb =( help_mrpc)*(0.5)+1;
184 else if (name==
"physicalScinBr1")
189 else if (name==
"physicalScinBr2")
194 else if (name==
"physicalScinEcWest")
199 else if (name==
"physicalScinEcEast")
206 else if (name==
"logicalScinBr1" ||name==
"logicalScinBr2")
209 scinNb = (527-number)/3;
211 else if (name==
"logicalScinEcEast")
215 scinNb = (95-number)/2;
217 else if (name==
"logicalScinEcWest")
220 scinNb = (95-number)/2;
242 G4int trackIndex, g4TrackId;
248 m_besTofCollection->insert(newHit);
255 G4int trackIndex, g4TrackId;
258 if (m_trackIndex != trackIndex)
260 m_trackIndex = trackIndex;
271 G4int pdg =
abs(aStep->GetTrack()->GetDefinition()->GetPDGEncoding());
272 if (pdg==12 || pdg==14 || pdg==16)
274 if (flag && aStep->GetTrack()->GetTrackID()==g4TrackId)
276 m_trackIndexes.push_back(trackIndex);
279 m_besTofList->insert(truHit);
283 if (edep<=0)
delete newHit;
313 G4double FanoFactor = 0.2;
314 G4double meanion = eipair->MeanNumberOfIonsAlongStep(step);
315 G4double sig = std::sqrt(FanoFactor*meanion);
316 G4int nion = G4int(G4RandGauss::shoot(meanion,sig) + 0.5);