Commit a46790aa authored by Andrei Gheata's avatar Andrei Gheata
Browse files

clang-format

parent abeb3903
Pipeline #1062062 passed with stage
in 1 minute and 12 seconds
......@@ -50,18 +50,20 @@ void CMSDataPerPrimary::Print()
<< " Edep = " << std::setw(9) << std::right << fEdep << " [GeV] \n"
<< " Track lenght (charged) = " << std::setw(9) << std::right << fChargedTrackL << " [cm] \n"
<< " Track lenght (neutral) = " << std::setw(9) << std::right << fNeutralTrackL << " [cm] \n"
<< " Time (global-charged) = " << std::setw(9) << std::right << fChargedTrackT/geant::units::ns << " [ns] \n"
<< " Time (global-neutral) = " << std::setw(9) << std::right << fNeutralTrackT/geant::units::ns << " [ns] \n"
<< " Time (global-charged) = " << std::setw(9) << std::right << fChargedTrackT / geant::units::ns
<< " [ns] \n"
<< " Time (global-neutral) = " << std::setw(9) << std::right << fNeutralTrackT / geant::units::ns
<< " [ns] \n"
<< " Steps (charged) = " << std::setw(9) << std::right << fNumChargedSteps << " \n"
<< " Steps (neutral) = " << std::setw(9) << std::right << fNumNeutralSteps << " \n"
<< " Secondary Gammas = " << std::setw(9) << std::right << fNumGammas << " \n"
<< " Secondary Electrons = " << std::setw(9) << std::right << fNumElectrons << " \n"
<< " Secondary Positrons = " << std::setw(9) << std::right << fNumPositrons << " \n";
<< " Secondary Gammas = " << std::setw(9) << std::right << fNumGammas << " \n"
<< " Secondary Electrons = " << std::setw(9) << std::right << fNumElectrons << " \n"
<< " Secondary Positrons = " << std::setw(9) << std::right << fNumPositrons << " \n";
for (size_t i = 0; i < fNumStepPerRegion.size(); ++i)
if( fNumStepPerRegion[i] > 0 )
std::cout << " Steps per reg. " << std::setw(4) << i << " = " << std::setw(13) << std::right
<< fNumStepPerRegion[i] << " \n";
if (fNumStepPerRegion[i] > 0)
std::cout << " Steps per reg. " << std::setw(4) << i << " = " << std::setw(13) << std::right
<< fNumStepPerRegion[i] << " \n";
}
//--------------------------------------------------------------------------------------------------------------------//
......
......@@ -110,7 +110,7 @@ void CMSFullApp::SteppingActions(geant::Track &track, geant::TaskData *td)
(*fDataHandlerEvents)(td).GetDataPerEvent(track.EventSlot()).GetDataPerPrimary(track.PrimaryParticleIndex());
// do the scoring:
// 1. collet charged/neutral steps that were done in the target (do not count the creation step i.e. secondary tracks
// that has just been added in this step)
// that has just been added in this step)
if (track.Status() != geant::kNew) {
if (charge == 0.0) {
dataPerPrimary.AddNeutralStep();
......@@ -128,7 +128,7 @@ void CMSFullApp::SteppingActions(geant::Track &track, geant::TaskData *td)
} else {
dataPerPrimary.AddChargedTrackT(track.GlobalTime());
}
}
}
// Get the MaterialCuts from the LogicalVolume
const geantphysics::MaterialCuts *matCut = static_cast<const geantphysics::MaterialCuts *>(
(const_cast<vecgeom::LogicalVolume *>(track.GetVolume())->GetMaterialCutsPtr()));
......@@ -250,25 +250,25 @@ void CMSFullApp::FinishRun()
double meanLNe = runData.GetNeutralTrackL() * norm;
double rmsLNe = std::sqrt(std::abs(runData.GetNeutralTrackL2() * norm - meanLNe * meanLNe));
double meanTCh = runData.GetChargedTrackT() * norm;
double rmsTCh = std::sqrt(std::abs(runData.GetChargedTrackT2() * norm - meanTCh * meanTCh));
double meanTNe = runData.GetNeutralTrackT() * norm;
double rmsTNe = std::sqrt(std::abs(runData.GetNeutralTrackT2() * norm - meanTNe * meanTNe));
meanTCh = meanTCh/geant::units::ns;
rmsTCh = rmsTCh/geant::units::ns;
meanTNe = meanTNe/geant::units::ns;
rmsTNe = rmsTNe/geant::units::ns;
double meanTCh = runData.GetChargedTrackT() * norm;
double rmsTCh = std::sqrt(std::abs(runData.GetChargedTrackT2() * norm - meanTCh * meanTCh));
double meanTNe = runData.GetNeutralTrackT() * norm;
double rmsTNe = std::sqrt(std::abs(runData.GetNeutralTrackT2() * norm - meanTNe * meanTNe));
meanTCh = meanTCh / geant::units::ns;
rmsTCh = rmsTCh / geant::units::ns;
meanTNe = meanTNe / geant::units::ns;
rmsTNe = rmsTNe / geant::units::ns;
double meanStpCh = runData.GetChargedSteps() * norm;
double rmsStpCh = std::sqrt(std::abs(runData.GetChargedSteps2() * norm - meanStpCh * meanStpCh));
double meanStpNe = runData.GetNeutralSteps() * norm;
double rmsStpNe = std::sqrt(std::abs(runData.GetNeutralSteps2() * norm - meanStpNe * meanStpNe));
double meanNGam = runData.GetGammas() * norm;
double rmsNGam = std::sqrt(std::abs(runData.GetGammas2() * norm - meanNGam * meanNGam));
double meanNElec = runData.GetElectrons() * norm;
double rmsNElec = std::sqrt(std::abs(runData.GetElectrons2() * norm - meanNElec * meanNElec));
double meanNPos = runData.GetPositrons() * norm;
double rmsNPos = std::sqrt(std::abs(runData.GetPositrons2() * norm - meanNPos * meanNPos));
double meanStpCh = runData.GetChargedSteps() * norm;
double rmsStpCh = std::sqrt(std::abs(runData.GetChargedSteps2() * norm - meanStpCh * meanStpCh));
double meanStpNe = runData.GetNeutralSteps() * norm;
double rmsStpNe = std::sqrt(std::abs(runData.GetNeutralSteps2() * norm - meanStpNe * meanStpNe));
double meanNGam = runData.GetGammas() * norm;
double rmsNGam = std::sqrt(std::abs(runData.GetGammas2() * norm - meanNGam * meanNGam));
double meanNElec = runData.GetElectrons() * norm;
double rmsNElec = std::sqrt(std::abs(runData.GetElectrons2() * norm - meanNElec * meanNElec));
double meanNPos = runData.GetPositrons() * norm;
double rmsNPos = std::sqrt(std::abs(runData.GetPositrons2() * norm - meanNPos * meanNPos));
std::cout << " Number of primaries = " << nPrimaries << " " << primName << std::endl;
std::cout << " Total energy deposit per primary = " << meanEdep << " +- " << rmsEdep << " [GeV]" << std::endl;
......@@ -288,10 +288,10 @@ void CMSFullApp::FinishRun()
<< " Positrons = " << meanNPos << " +- " << rmsNPos << std::endl;
std::cout << " Total number of steps is : " << nTotSteps << std::endl;
std::cout << " Steps per region: " << std::endl;
int wdmax=12;
int wdmax = 12;
int numRegion = (vecgeom::Region::GetTheRegionTable()).size();
for (int i = 0; i < numRegion; i++)
if( nTotStepsPerReg[i] > 0 )
if (nTotStepsPerReg[i] > 0)
std::cout << " " << std::setw(3) << std::right << i << ": " << std::right << std::setw(wdmax)
<< nTotStepsPerReg[i] << "\t\t " << std::setw(8) << std::left
<< 100 * (double)nTotStepsPerReg[i] / (double)nTotSteps << " % of the total." << std::endl;
......
......@@ -208,7 +208,7 @@ void PostStepActionPhysModelHandler::DoItVector(geant::Track **gtracks, int N, g
auto track = gtracks[secondaryLTs.GetTrackIndex(i)];
int secGVcode = secondaryLTs.GetGVcode(i); // GV index of this secondary particle
// compute current (post-step point) global time
double gtime = track->GlobalTime() + track->TimeStep(track->GetStep());
double gtime = track->GlobalTime() + track->TimeStep(track->GetStep());
const Particle *secParticle = Particle::GetParticleByInternalCode(secGVcode);
// get a Track geantTrack;
geant::Track &geantTrack = td->GetNewTrack();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment