IAP GITLAB

Commit b5a7ff6e authored by Ralf Ulrich's avatar Ralf Ulrich

updates, better ROOT integration

parent 0d5a84ad
......@@ -15,6 +15,10 @@ else()
find_package(Geant4 REQUIRED)
endif()
execute_process(COMMAND root-config --etcdir OUTPUT_VARIABLE ROOT_ETC)
string(REGEX REPLACE "\n$" "" ROOT_ETC "${ROOT_ETC}")
LIST(APPEND CMAKE_MODULE_PATH "${ROOT_ETC}/cmake")
find_package(ROOT REQUIRED)
#----------------------------------------------------------------------------
......
# mQsim
\ No newline at end of file
# mQsim
Works with GEANT 4.10.02
File added
......@@ -38,7 +38,7 @@ main(int argc, char** argv)
#endif
if (argc>1 && argc!=4) {
cout << "either start without arguments for GUI, or specify: mu+/mu- nEvt" << endl;
cout << "either start without arguments for GUI, or specify: mu+/mu-/mpc- nEvt mQ" << endl;
return 1;
}
......
......@@ -110,6 +110,9 @@ EventAction::EndOfEventAction(const G4Event* evt)
// average time of PMT hits
for (G4int i=0; i<P_hits; i++) {
cout << "PMT hit=" << ", id=" << (*PHC)[i]->GetHitId() << endl;
G4double time = ( (*PHC)[i]->GetTime() - firstLXeHitTime );
aveTimePmtHits += time / (G4double)P_hits;
hitMap[(*PHC)[i]->GetHitId()]++; // count PE
......@@ -176,8 +179,12 @@ EventAction::EndOfEventAction(const G4Event* evt)
if (edep/keV>0 || nph>0 || nPE>0) {
analysisManager->FillH1(3, i);
count++;
cout << "Cell " << i << " edep=" << edep/keV << "keV ph=" << nph << " yield=" << nph/(edep/keV) << " ph/keV "
<< ", dEdX=" << edep/(length*3.67*g/cm3) / MeV *g/cm2 << " MeV g/cm2" << " nPE=" << nPE
cout << "Cell=" << i
<< ", lay/row/col=" << idLay << "/" << row << "/" << col
<< ", edep=" << edep/keV << "keV, ph=" << nph << ", yield=" << nph/(edep/keV) << " ph/keV "
<< ", length=" << length/cm << " cm"
<< ", dEdX=" << edep/(length*3.67*g/cm3) / MeV *g/cm2 << " MeV g/cm2"
<< ", nPE=" << nPE
<< " eff_opt=" << nPE/nph
<< endl;
......
......@@ -141,7 +141,8 @@ PrimaryGeneratorAction::PrimaryGeneratorAction(const std::string& name)
// data->Close();
if (!fHistEnergy || !fHistZenith) {
cout << "wrong input data" << endl;
cout << "PrimaryGeneratorAction: wrong input data. pdg=" << pdg << endl;
data->ls();
exit(1);
}
......
Markdown is supported
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