Definition at line 1 of file NeutronAnalysis.C.
References b, c2, count, ctime, Double_t, En, Eng, Enth, ev, fi, g, gamTde, PndHypGePoint::GetDetectorID(), PndHypGePoint::GetpdgCode(), PndHypGePoint::GetPx(), PndHypGePoint::GetPy(), PndHypGePoint::GetPz(), hit_bar, i, 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*
gamTde =
new TH1D(
"gamTde",Name.c_str(),150, 150,180);
41 TH1D* hCrystalHit =
new TH1D(
"hCrystalHit",
"Crystals hit by neutrons",1700,1,1700);
47 TH1D *hNoHits =
new TH1D(
"Number of Hits",
"Number of Hits", 16,0,15);
55 Int_t
nEvents = b->GetEntriesFast();
56 cout<<
"Number of Simulated Events: "<<nEvents<<endl;
65 if (!((k*100)% nEvents))
70 for (Int_t
i=0;
i<hit_bar->GetEntriesFast();
i++)
93 TCanvas*
c2 =
new TCanvas(
"c2",
"c2",800,600);
107 cout << endl << endl;
108 cout <<
"Macro finished succesfully." << endl;
110 cout <<
"Real time " << rtime <<
" s, CPU time " << ctime <<
" s" << endl;
static T Sqrt(const T &x)
Int_t GetDetectorID() const
Double_t GetpdgCode() const