StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
checkPIDInFlowPicoDST.C
1 #include "/afs/rhic.bnl.gov/star/replicas/DEV/StRoot/StEventUtilities/BetheBlochFunction.hh"
2 
3 void checkPIDInFlowPicoDST(){
4 
5 
6  TChain* chain = new TChain("FlowTree");
7 
8  chain->Add("/star/data10/GC/aihong/P01glPIDFlowPicoDST/st_physics_2269001_raw_0001.event.root.flowpicoevent.root");
9 
10  chain->Add("/star/data10/GC/aihong/P01glPIDFlowPicoDST/st_physics_2269001_raw_0003.event.root.flowpicoevent.root");
11  chain->Add("/star/data10/GC/aihong/P01glPIDFlowPicoDST/st_physics_2269001_raw_0005.event.root.flowpicoevent.root");
12 
13 
14 
15  chain->Add("/star/data10/GC/aihong/P01glPIDFlowPicoDST/st_physics_2269001_raw_0004.event.root.flowpicoevent.root");
16  chain->Add("/star/data10/GC/aihong/P01glPIDFlowPicoDST/st_physics_2269001_raw_0008.event.root.flowpicoevent.root");
17  chain->Add("/star/data10/GC/aihong/P01glPIDFlowPicoDST/st_physics_2269001_raw_0015.event.root.flowpicoevent.root");
18 
19 
20 
21  chain->Add("/star/data10/GC/aihong/P01glPIDFlowPicoDST/st_physics_2269001_raw_0009.event.root.flowpicoevent.root");
22  chain->Add("/star/data10/GC/aihong/P01glPIDFlowPicoDST/st_physics_2269001_raw_0012.event.root.flowpicoevent.root");
23  chain->Add("/star/data10/GC/aihong/P01glPIDFlowPicoDST/st_physics_2269001_raw_0016.event.root.flowpicoevent.root");
24  // chain->Add("/star/data10/GC/aihong/P01glPIDFlowPicoDST/st_physics_2269001_raw_0011.event.root.flowpicoevent.root");
25  chain->Add("/star/data10/GC/aihong/P01glPIDFlowPicoDST/st_physics_2269001_raw_0014.event.root.flowpicoevent.root");
26  chain->Add("/star/data10/GC/aihong/P01glPIDFlowPicoDST/st_physics_2269001_raw_0013.event.root.flowpicoevent.root");
27  chain->Add("/star/data10/GC/aihong/P01glPIDFlowPicoDST/st_physics_2269001_raw_0006.event.root.flowpicoevent.root");
28  chain->Add("/star/data10/GC/aihong/P01glPIDFlowPicoDST/st_physics_2269001_raw_0002.event.root.flowpicoevent.root");
29 
30 
31 
32 
33  float dedxBegin =0.;
34  float dedxEnd =1.0e-5;
35  float pBegin =0.;
36  float pEnd =2.;
37 
38  TH2D* PionHist =
39  new TH2D("PionHist","PionHist", 100, pBegin,pEnd, 100,dedxBegin,dedxEnd);
40  PionHist->SetMarkerColor(6);
41 
42  TH2D* KaonHist =
43  new TH2D(*PionHist);
44  KaonHist->SetName("KaonHist"); KaonHist->SetTitle("KaonHist");
45  KaonHist->SetMarkerColor(2);
46 
47 
48  TH2D* ProtonHist =
49  new TH2D(*PionHist);
50  ProtonHist->SetName("ProtonHist"); ProtonHist->SetTitle("ProtonHist");
51  ProtonHist->SetMarkerColor(3);
52 
53  TH2D* ElectronHist =
54  new TH2D(*PionHist);
55  ElectronHist->SetName("ElectronHist"); ElectronHist->SetTitle("ElectronHist");
56  ElectronHist->SetMarkerColor(4);
57 
58 
59  TH2D* LowProbHist =
60  new TH2D(*PionHist);
61  LowProbHist->SetName("LowProbHist"); LowProbHist->SetTitle("LowProbHist");
62  LowProbHist->SetMarkerColor(1);
63 
64 
65  TH2D* ExtrapHist =
66  new TH2D(*PionHist);
67  ExtrapHist->SetName("ExtrapHist"); ExtrapHist->SetTitle("ExtrapHist");
68  ExtrapHist->SetMarkerColor(7);
69 
70 
71  chain->Draw("mDedx: (mPt/sqrt(1-(tanh(mEta)*tanh(mEta)))) >>PionHist","mMostLikelihoodProb>0.25 && (mMostLikelihoodPID == 8 || mMostLikelihoodPID == 9) && mNdedxPts>15 && mCharge<5 && mDca >3 ");
72 
73  chain->Draw("mDedx: (mPt/sqrt(1-(tanh(mEta)*tanh(mEta)))) >>KaonHist","mMostLikelihoodProb>0.25 && (mMostLikelihoodPID == 11 || mMostLikelihoodPID == 12) && mNdedxPts>15 && mCharge<5 && mDca >3");
74 
75  chain->Draw("mDedx: (mPt/sqrt(1-(tanh(mEta)*tanh(mEta)))) >>ProtonHist","mMostLikelihoodProb>0.25 && (mMostLikelihoodPID == 14 || mMostLikelihoodPID == 15) && mNdedxPts>15 && mCharge<5 && mDca >3");
76 
77  chain->Draw("mDedx: (mPt/sqrt(1-(tanh(mEta)*tanh(mEta)))) >>ElectronHist","mMostLikelihoodProb>0.25 && (mMostLikelihoodPID == 2 || mMostLikelihoodPID == 3) && mNdedxPts>15 && mCharge<5 && mDca >3");
78 
79  chain->Draw("mDedx: (mPt/sqrt(1-(tanh(mEta)*tanh(mEta)))) >>LowProbHist","mMostLikelihoodProb<0.25 && mNdedxPts>15 && mCharge<5 && mDca >3");
80  chain->Draw("mDedx: (mPt/sqrt(1-(tanh(mEta)*tanh(mEta)))) >>ExtrapHist","mExtrapTag==1 && mCharge<5 && mDca >3");
81 
82 
83  PionHist->Draw();
84  KaonHist->Draw("SAME");
85  ProtonHist->Draw("SAME");
86  ElectronHist->Draw("SAME");
87  LowProbHist->Draw("SAME");
88  // ExtrapHist->Draw("SAME");
89 
90 
91 
92 
93 
94 
95  double mPStart=0.05;
96  double mPEnd=2.;
97  int NParameters=7;
98 
99 TF1* EBandCenter
100  =new TF1("EBandCenter",BetheBlochFunction, mPStart,mPEnd, NParameters);
101 TF1* PiBandCenter
102  =new TF1("PiBandCenter",BetheBlochFunction, mPStart,mPEnd, NParameters);
103 TF1* KBandCenter
104  =new TF1("KBandCenter",BetheBlochFunction, mPStart,mPEnd, NParameters);
105 TF1* PBandCenter
106  =new TF1("PBandCenter",BetheBlochFunction, mPStart,mPEnd, NParameters);
107 
108 
109  double offsetPar = 3.01022e-07;
110  double scalePar = 4.68971e-07;
111 
112 
113 
114  double turnOver = 0.0199;
115  double firstPar = 1.09344;
116 
117  Double_t electronPars[7]
118  ={ firstPar, turnOver, offsetPar, 1, 0.511e-3, scalePar, 0.0005 };
119  Double_t pionPars[7]
120  ={ firstPar, turnOver, offsetPar, 1, 0.13957, scalePar, 0.0005 };
121  Double_t kaonPars[7]
122  ={ firstPar, turnOver, offsetPar, 1, 0.49368, scalePar, 0.0005 };
123  Double_t antiprotonPars[7]
124  ={ firstPar, turnOver, offsetPar, 1, 0.93827, scalePar, 0.0005 };
125 
126  EBandCenter->SetParameters(&electronPars[0]);
127  PiBandCenter->SetParameters(&pionPars[0]);
128  KBandCenter->SetParameters(&kaonPars[0]);
129  PBandCenter->SetParameters(&antiprotonPars[0]);
130 
131 
132  EBandCenter->Draw("SAME");
133  PiBandCenter->Draw("SAME");
134  KBandCenter->Draw("SAME");
135  PBandCenter->Draw("SAME");
136 
137 
138 }
139