50 fTotStepGas = fTotCluster = fMeanCluster = fOverflow = fTotEdep
51 = fStepGas = fCluster = fMaxEnergy = 0.0;
67 fTotStepGas = fTotCluster = fMeanCluster = fOverflow = fTotEdep
68 = fStepGas = fCluster = 0.0;
79 fEgas.resize(fNbins,0.0);
84 G4cout <<
" BinsCluster= " << binsCluster <<
" BinsE= " << fNbins
85 <<
" Emax(keV)= " << fMaxEnergy/
keV <<
G4endl;
86 G4cout <<
" WidthALICE(keV)= " << fWidthALICE/
keV
87 <<
" FactorALICE= " << fFactorALICE <<
G4endl;
101 fMeanCluster *= norm;
112 G4cout <<
" ====================================================" <<
G4endl;
113 G4cout <<
" Beam Particle: "
119 G4cout <<
" ================== run summary =====================" <<
G4endl;
121 G4cout <<
" End of Run TotNbofEvents = "
123 G4cout <<
" Energy(keV) per ADC channel = "
124 << 1.0/(
keV*fFactorALICE) << G4endl;
127 G4cout <<
" Mean energy deposit in absorber = " <<
128 y1/
keV <<
" +- " << y2*std::sqrt(norm)/
keV <<
" keV; ";
129 if(y1 > 0.0) {
G4cout <<
" RMS/Emean = " << y2/y1; }
131 G4cout <<
" Mean number of steps in absorber= "
132 << fTotStepGas <<
"; mean number of ion-clusters = "
133 << fTotCluster <<
" MeanCluster= " << fMeanCluster
137 G4cout <<
" ====== Energy deposit distribution Noverflows= " << fOverflow
141 std::ofstream fileOut(
"distribution.out", std::ios::out );
142 fileOut.setf( std::ios::scientific, std::ios::floatfield );
146 fileOut << fNbins <<
G4endl;
148 for(
G4int j=0; j<fNbins; ++j)
150 G4cout << std::setw(5) << j << std::setw(10) << x1/
keV
151 << std::setw(12) << fEgas[j] << std::setw(12) << fEgas[j]*norm
153 fileOut << x1/
keV <<
"\t" << fEgas[j] <<
G4endl;
161 analysisManager->ScaleH1(1,norm);
162 analysisManager->ScaleH1(2,norm);
163 analysisManager->ScaleH1(3,norm*normf);
165 G4cout <<
" ================== run end ==========================" <<
G4endl;
182 fTotStepGas += fStepGas;
183 fTotCluster += fCluster;
185 if(fWidthALICE > 0.0) {
191 G4int idx =
G4int(fTotEdep*fNbins/fMaxEnergy);
193 if(idx < 0) { fEgas[0] += 1.0; }
194 if(idx >= fNbins) { fOverflow += 1.0; }
195 else { fEgas[idx] += 1.0; }
199 analysisManager->FillH1(1,fTotEdep/
keV,1.0);
200 analysisManager->FillH1(2,fCluster,1.0);
201 analysisManager->FillH1(3,fTotEdep*fFactorALICE,1.0);
202 fEdep.fill(fTotEdep, 1.0);
209 const Run* localRun =
static_cast<const Run*
>(run);
211 fTotStepGas += localRun->fTotStepGas;
212 fTotCluster += localRun->fTotCluster;
213 fMeanCluster += localRun->fMeanCluster;
214 fOverflow += localRun->fOverflow;
220 for(
G4int j=0; j<fNbins; ++j)
222 fEgas[j] += localRun->fEgas[j];
233 G4cout <<
"Run::AddEnergy: e(keV)= " << edep/
keV
G4double GetMaxEnergy() const
void AddEnergy(G4double edep)
ThreeVector shoot(const G4int Ap, const G4int Af)
virtual void Merge(const G4Run *)
G4double MeanNumberOfIonsAlongStep(const G4ParticleDefinition *, const G4Material *, G4double edepTotal, G4double edepNIEL=0.0)
Definition of the TestParameters class.
static G4LossTableManager * Instance()
static constexpr double mm
G4int GetNumberBins() const
G4int GetNumberBinsCluster() const
G4double GetFactorALICE() const
const G4ParticleDefinition * GetBeamParticle() const
void SetVerbose(G4int val)
const G4StatDouble * GetStat() const
const G4String & GetParticleName() const
G4double GetPositionZ() const
G4GLOB_DLL std::ostream G4cout
G4int GetNumberOfEvent() const
G4int SampleNumberOfIonsAlongStep(const G4Step *)
G4ElectronIonPair * ElectronIonPair()
G4double GetEnergySmear() const
G4double GetNormFactor() const
G4double GetBeamEnergy() const
T max(const T t1, const T t2)
brief Return the largest of the two arguments
static constexpr double MeV
G4Track * GetTrack() const
static constexpr double keV
virtual void Merge(const G4Run *)
G4CsvAnalysisManager G4AnalysisManager