Definition at line 1 of file AllNeutronAnalysis_save.C.
References b, count, ctime, Double_t, En, Eng, Enth, ev, fi, g, PndMCTrack::GetMomentum(), PndMCTrack::GetMotherID(), PndMCTrack::GetPdgCode(), PndHypGePoint::GetPx(), PndHypGePoint::GetPy(), PndHypGePoint::GetPz(), PndHypGePoint::GetTrackID(), hit_bar, mc_bar, mcpdg, MotherId, Motherpdg, mult, nEvents, outfile, Pi, pos, rtime, CAMath::Sqrt(), timer, TString, vecs, and verbose.
6 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
9 gSystem->Load(
"libHypGe");
16 TString Filename =
"$SIMDATADIR/TripleBall40Offset10_urqmd_pbarC_1_5000Evts.root";
21 TString outfile=
"$SIMDATADIR/Data_Marcell/TripleBall40Offset10_urqmd_pbarC_1_5000Evts_spectrum.root";
22 TFile*
g =
new TFile(Filename);
23 TFile*
fi =
new TFile(outfile,
"RECREATE");
28 TTree *
b=(TTree *) g->Get(
"pndsim") ;
29 TClonesArray*
hit_bar=
new TClonesArray(
"PndHypGePoint");
30 b->SetBranchAddress(
"HypGePoint",&hit_bar);
31 TClonesArray*
mc_bar=
new TClonesArray(
"PndMCTrack");
32 b->SetBranchAddress(
"MCTrack",&mc_bar);
39 string Name =
"Neutrons hitting the germaniums";
40 TH1D* hNHits =
new TH1D(
"hNHits",Name.c_str(),180, 90,180);
41 TH1D* hNAll =
new TH1D(
"hNAll",
"All Neutrons",180, 90,180);
55 Int_t
nEvents = b->GetEntriesFast();
56 cout<<
"Number of Simulated Events: "<<nEvents<<endl;
65 if (!((k*100)% nEvents))
75 cout << hitgam0 << endl;
76 if (hitgam0 != 0 && hitgam1 !=0)
92 hNAll->Fill(180/
TMath::Pi()*NAllMom.Theta());
112 hNAll->Fill(180/
TMath::Pi()*NAllMom.Theta());
134 cout << endl << endl;
135 cout <<
"Macro finished succesfully." << endl;
137 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
" s" << endl;
static T Sqrt(const T &x)
TVector3 GetMomentum() const
Int_t GetMotherID() const