5 gROOT->LoadMacro(
"$VMCWORKDIR/macro/mvd/Tools.C");
6 gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C");
7 gROOT->Macro(
"~/rootlogon.C");
13 TChain *abc=
new TChain(
"pndsim");
14 abc->Add(
"emc_complete.root");
19 abc->SetBranchAddress(
"MCTrack",&mctrack_array);
21 TClonesArray*
hit_array=
new TClonesArray(
"PndEmcHit");
22 abc->SetBranchAddress(
"EmcHit",&hit_array);
27 TClonesArray*
cluster_array=
new TClonesArray(
"PndEmcCluster");
28 abc->SetBranchAddress(
"EmcCluster",&cluster_array);
30 TCanvas*
c1 =
new TCanvas(
"c1",
"c1", 100, 100, 800, 800);
36 Int_t
ncounts = abc->GetEntries();
37 for(
int k = 0; k <
ncounts; k++){
41 cout <<
"Hits: "<<endl;
43 lt->SetTextSize(0.015);
44 Int_t
nhit = hit_array->GetEntries();
56 l=
new TLine(x*4e-3+.5,y*4e-3+.5,x*fak+.5,y*fak+.5);
63 if( hit->
GetMcList().size()==0) cout <<
"Zero List??"<<endl;
64 for(Int_t j=0; j<hit->
GetMcList().size(); j++){
73 lt->DrawLatex(x*(fak+.8e-3)+.5,y*(fak+.8e-3)+.5,mctxt.Data());
76 cout <<
"Clusters: "<<endl;
78 lt->SetTextSize(0.03);
79 Int_t nclu = cluster_array->GetEntries();
80 for (Int_t
i=0;
i<nclu;
i++)
90 fak=4.1e-3+1.5e-3*clu->
energy();
91 l=
new TLine(x*4e-3+.5,y*4e-3+.5,x*fak+.5,y*fak+.5);
97 if( clu->
GetMcList().size()==0) cout <<
"Zero List??"<<endl;
98 for(Int_t j=0; j<clu->
GetMcList().size(); j++){
104 cout <<
"MCIndex: "<<
id<<
": "<<((
PndMCTrack *)mctrack_array->At(
id))->Get4Momentum().E()<<endl;
106 lt->DrawLatex(x*(fak+.8e-3)+.5,y*(fak+.8e-3)+.5,mctxt.Data());
119 case 22: mctxt+=
"#gamma" ;
break;
120 case 11: mctxt+=
"e^{-}" ;
break;
121 case -11: mctxt+=
"e^{+}" ;
break;
122 case 13: mctxt+=
"#mu^{-}" ;
break;
123 case -13: mctxt+=
"#mu^{+}" ;
break;
124 case 111: mctxt+=
"#pi^{0}" ;
break;
125 case 211: mctxt+=
"#pi^{+}" ;
break;
126 case -211: mctxt+=
"#pi^{-}" ;
break;
127 case 2112: mctxt+=
"n" ;
break;
128 case 2212: mctxt+=
"p" ;
break;
129 case 310: mctxt+=
"K^{0}_{S}" ;
break;
130 case 130: mctxt+=
"K^{0}_{L}" ;
break;
131 case 321: mctxt+=
"K^{+}" ;
break;
132 case -321: mctxt+=
"K^{-}" ;
break;
133 default: mctxt+=
"?" ;
break;
152 l=
new TLine(x1*4e-3+.5,y1*4e-3+.5,x*4e-3+.5,y*4e-3+.5);
171 l=
new TLine(x1*4e-3+.5,y1*4e-3+.5,x2*4e-3+.5,y2*4e-3+.5);
void add_mccode(TString &mctxt, Int_t id)
const std::vector< Int_t > & GetMcList() const
const std::vector< Int_t > & GetMcList()
TClonesArray * cluster_array
virtual Double_t GetEnergy() const
a cluster (group of neighboring crystals) of hit emc crystals
represents the deposited energy of one emc crystal from simulation
Double_t GetEnergyCorrected() const
virtual Double_t energy() const
TVector3 GetStartVertex() const
TClonesArray * mctrack_array
Int_t GetMotherID() const
void propagate_mclist(Int_t id, TClonesArray *mctrack_array, Double_t x, Double_t y)