FairRoot/PandaRoot
plotDiaBnew.C
Go to the documentation of this file.
1 { TChain *mychain = new TChain("pndsim");
2 
3 
4  mychain->Add("run.root");
5  mychain->Add("run_1.root");
6  mychain->Add("run_2.root");
7 
8 
9  gStyle->SetPalette(1);
10 
11 
12 TCut kaons = "HypPoint.fpdgCode==-321 || HypPoint.fpdgCode == 321";
13 TCut pions = "HypPoint.fpdgCode==-211 || HypPoint.fpdgCode == 211";
14 TCut protons = "HypPoint.fpdgCode==2212 || HypPoint.fpdgCode == -2212";
15 TCut lambdas = "HypPoint.fpdgCode==3122" ;
16 TCut electrons = "HypPoint.fpdgCode==11 || HypPoint.fpdgCode == -11";
17 TCut ximin = "HypPoint.fpdgCode==3312";
18 
19 TCut ximstop = "HypPoint.fpdgCode==3312 && HypPoint.fPLout==0.";
20 TCut Secstop = "HypSecTarPoint.fPLout==0.";
21 
22 
23 
24 
25 Double_t mom = "TMath::Sqrt(HypPoint.fPLout*HypPoint.fPLout)";
26 Double_t energy = "TMath::Sqrt(mom*mom + HypPoint.fmass*HypPoint.fmass)";
27 
28  //mychain->Draw("HypSegTarPoint.fdist:HypSegTarPoint.fZin>>histo(00,-77,-72,200,0.5,5)");
29 c1 = new TCanvas("stopping xi- rate momentum distribution");
30 //mychain->SetLineColor(4);
31  mychain->Draw("TMath::Sqrt(HypPoint.fPxin*HypPoint.fPxin+HypPoint.fPyin*HypPoint.fPyin+HypPoint.fPzin*HypPoint.fPzin)>>his(200,-0.4,1.4)", ximin );
32 
33  cout<<"integral of Xi- entering"<< his->Integral()<<endl;
34  //mychain->SetLineColor(2);
35  mychain->Draw("TMath::Sqrt(HypSecTarPoint.fPxin*HypSecTarPoint.fPxin+HypSecTarPoint.fPyin*HypSecTarPoint.fPyin+HypSecTarPoint.fPzin*HypSecTarPoint.fPzin)>>hist(200,-0.4,1.4)","","same" );
36  cout<<"integral of Xi- stopped"<< hist->Integral()<<endl;
37  //hist->Scale(10);
38 
39 
40 
41 }
TCut kaons
Definition: plotDiaBnew.C:12
TCut ximstop
Definition: plotDiaBnew.C:19
TCut protons
Definition: plotDiaBnew.C:14
Double_t mom
Definition: plotDiaBnew.C:25
TCut ximin
Definition: plotDiaBnew.C:17
Double_t
TCut Secstop
Definition: plotDiaBnew.C:20
TCut electrons
Definition: plotDiaBnew.C:16
TCut lambdas
Definition: plotDiaBnew.C:15
TCut pions
Definition: plotDiaBnew.C:13
c1
Definition: plotDiaBnew.C:29
TH1F * hist
Double_t energy
Definition: plotDiaBnew.C:26