5#include "FairPrimaryGenerator.h"
16 return Init(fileName, 0);
21 if (0 == strncmp(
"/eos",fileName,4) ) {
22 fN = gSystem->Getenv(
"EOSSHIP");
27 LOG(FATAL) <<
"NtupleGenerator_FLUKA: Error opening the Signal file" << fN;
30 LOG(INFO) <<
"NtupleGenerator_FLUKA: Opening input file " << fN;
38 if (
fTree->FindLeaf(
"primaries_") !=
nullptr) {
42 fTree->SetBranchAddress(
"id",&
id);
44 fTree->SetBranchAddress(
"t",&
t);
45 fTree->SetBranchAddress(
"E",&
E);
46 fTree->SetBranchAddress(
"w",&
w);
47 fTree->SetBranchAddress(
"x",&
x);
48 fTree->SetBranchAddress(
"y",&
y);
49 fTree->SetBranchAddress(
"z",&
z);
50 fTree->SetBranchAddress(
"px",&
px);
51 fTree->SetBranchAddress(
"py",&
py);
52 fTree->SetBranchAddress(
"pz",&
pz);
74 if (
fn %10000==0) {LOG(INFO)<<
"reading event "<<
fn;}
76 LOG(WARNING) <<
"No more input events";
81 if (
fTree->FindLeaf(
"primaries_") !=
nullptr) {
83 for(
int i=0; i<nf; i++){
87 cpg->AddTrack(
int(primary->
id),primary->
px,primary->
py,primary->
pz,
88 primary->
x,primary->
y,primary->
z-
SND_Z,-1,
true,primary->
E,
89 primary->
t/1E9,primary->
w,(TMCProcess)primary->
generation);
90 LOG(DEBUG) <<
"NtupleGenerator_FLUKA: add muon " << i <<
"," << int(primary->
id)
91 <<
","<<primary->
px<<
","<<primary->
py<<
","<<primary->
pz<<
","<<primary->
x
93 <<
","<<primary->
E<<
","<<primary->
t<<
"ns,"<<primary->
w;
98 cpg->AddTrack(
int(
id[0]),
px[0],
py[0],
pz[0],
x[0],
y[0],
z[0]-
SND_Z,-1,
true,
E[0],
t[0]/1E9,
w[0],(TMCProcess)
generation[0]);
99 LOG(DEBUG) <<
"NtupleGenerator_FLUKA: add muon " <<
id[0]<<
","<<
px[0]<<
","<<
py[0]<<
","<<
pz[0]<<
","<<
x[0]<<
","<<
y[0]<<
","<<
z[0]-
SND_Z<<
","<<
generation[0]<<
","<<
E[0]<<
","<<
t[0]<<
"ns,"<<
w[0];
virtual ~NtupleGenerator_FLUKA()
virtual Bool_t Init(const char *, int)
Bool_t ReadEvent(FairPrimaryGenerator *)
ClassImp(ecalContFact) ecalContFact