1 ///////////////////////////////////////////////////////////
2 // Test macro for AliITStracksV2Pid.root file //
3 // JINR Dubna Jan 2002 //
4 ///////////////////////////////////////////////////////////
6 AliITSScanPIDV2(Int_t evNumber1=0,Int_t evNumber2=0) {
7 //................. Prepare histogramms ................
8 TH2F *qplot = new TH2F("Qtrm","Qtrm vs Pmom",100,0,1.300,100,0,13);
9 TH2F *qplotP= new TH2F("QtrmP","Qtrm vs Pmom",100,0,1.300,100,0,13);
10 TH2F *qplotKa= new TH2F("QtrmKa","Qtrm vs Pmom",100,0,1.300,100,0,13);
11 TH2F *qplotPi= new TH2F("QtrmPi","Qtrm vs Pmom",100,0,1.300,100,0,13);
12 TH2F *qplotE= new TH2F("QtrmE","Qtrm vs Pmom",100,0,1.300,100,0,13);
13 qplotP.SetMarkerStyle(8); qplotP.SetMarkerColor(kBlue); qplotP.SetMarkerSize(.3);
14 qplotKa.SetMarkerStyle(8); qplotKa.SetMarkerColor(kRed); qplotKa.SetMarkerSize(.3);
15 qplotPi.SetMarkerStyle(8); qplotPi.SetMarkerColor(kBlack); qplotPi.SetMarkerSize(.3);
16 qplotE.SetMarkerStyle(8); qplotE.SetMarkerColor(kGreen); qplotE.SetMarkerSize(.3);
17 //......................................................
18 TH1F *signal_mip = new TH1F("signal_mip","Signal (mips) for track",100,0.,15.);
20 TFile *fpid = new TFile("AliITStracksV2Pid.root","read");
25 for (int nev=0; nev<= evNumber2; nev++) {
27 sprintf(tpidname,"TreeT%d",nev);
28 TTree *tracktree=(TTree*)fpid->Get(tpidname);
29 TBranch *tbranch=tracktree->GetBranch("pids");
31 Int_t nentr=tracktree->GetEntries();
32 cout<<"Found PID for "<<nentr<<" ITS V2 tracks on "<<tpidname<<endl;
34 AliITStrackV2Pid *iopid=0;
35 for(Int_t ii=0;ii<nentr;ii++)
37 AliITStrackV2Pid *iopid=new AliITStrackV2Pid;
38 tbranch->SetAddress(&iopid);
39 tracktree->GetEvent(ii);
41 signal_mip->Fill(iopid->fSignal);
43 if(iopid->fPcode ==2212)qplotP.Fill(iopid->fMom,iopid->fSignal);
44 if(iopid->fPcode == 321)qplotKa.Fill(iopid->fMom,iopid->fSignal );
45 if(iopid->fPcode == 211)qplotPi.Fill(iopid->fMom,iopid->fSignal );
46 if(iopid->fPcode == 11)qplotE.Fill(iopid->fMom,iopid->fSignal );
49 if( (iopid->fWp<0.10)||(iopid->fWk<0.0)||(iopid->fWpi<0.0) ){
50 cout<<"PID pcode,fsignal,fmom= "<<iopid->fPcode<<","<<iopid->fSignal<<","<<iopid->fMom<<endl;
51 cout<<"wpi,wka,wp="<<iopid->fWpi<<" "<<iopid->fWk<<" "<<iopid->fWp<<endl;
55 }// Enf for ii (tracks)
56 }// End for nev (events)
58 //...................... Draw histogramms .................
59 TCanvas *c1 = new TCanvas("PID_test","Scan PID ",200,10,900,700);
61 //.........................................................
62 c1->cd(1); gPad->SetFillColor(33);
65 c1->cd(2); //gPad->SetFillColor(33);
67 qplotP.Draw("same"); qplotKa.Draw("same"); qplotPi.Draw("same"); qplotE.Draw("same");
69 AliITSPid *pid =new AliITSPid(100);
70 fcutka.Draw("same"); fcutpr.Draw("same");
71 c1->Print("ITSPIDplot.ps");
73 cout<<"End of file AliITStracksV2Pid.root "<<endl;