FlowANA_test.C 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805
  1. #define FlowANA_cxx
  2. #include "FlowANA_test.h"
  3. #include "TH1.h"
  4. #include "TH2.h"
  5. #include "TProfile.h"
  6. #include "TFile.h"
  7. #include "TNtuple.h"
  8. #include "TStyle.h"
  9. #include "TCanvas.h"
  10. #include "TMath.h"
  11. #include "TRandom3.h"
  12. #include "TVector3.h"
  13. #include <iostream>
  14. #include <fstream>
  15. #include <vector>
  16. #include <cstdlib>
  17. #include <sstream>
  18. #include <string>
  19. #include <cmath>
  20. using namespace std;
  21. //List of histograms and Ntuples....
  22. static const int neta = 7;
  23. static const int ndet = 3;
  24. static const int ncent = 6;
  25. static const int nth = 3;
  26. static const int npid = 4;
  27. static const int npt = 11; // 0.5 - 3.6 GeV/c - number of pT bins
  28. static const double bin_w[11]={0.2,0.4,0.6,0.8,1.0,1.2,1.4,1.8,2.3,2.8,4.0};
  29. static const float maxpt = 4.0; // max pt
  30. static const float minpt = 0.2; // min pt
  31. TH1F *hpt[ncent][npt][npid];
  32. TH1F *hv2[ndet][ncent][npt][npid];
  33. TH1F *hv22[ndet][npt][npid];
  34. TH1F *H_Qw[neta];
  35. TH1F *H_EP[nth][neta];
  36. TH1F *H_Qv[nth][neta];
  37. TH1F *HRes[nth][ndet][ncent];
  38. // for centrality determination
  39. TH1F *href1; // PHENIX BBC
  40. TH1F *href2; // PHENIX RXN
  41. TH1F *href3; // STAR TPC
  42. TH1F *href4; // STAR ntracks>2
  43. TH1F *href5; // STAR ntracks>4
  44. TH1F *hbimp; // impact parameter
  45. TH1F *hbimp2; // impact parameter
  46. TH1F *hbimp3; // impact parameter
  47. TH1F *hbimp4; // impact parameter
  48. TH1F *hbimp5; // impact parameter
  49. TH1F *h2pt;
  50. TH1F *h2eta;
  51. TH1F *h2phi;
  52. TH1F *h2phis;
  53. TH1F *h2phirp;
  54. static const double MYPI=3.141592654;
  55. TFile *d_outfile;
  56. void FlowANA::Loop()
  57. {
  58. if (fChain == 0) return;
  59. Int_t nentries = Int_t(fChain->GetEntries());
  60. Int_t nbytes = 0, nb = 0;
  61. for (Int_t jentry=0; jentry<nentries;jentry++) {
  62. Int_t ientry = LoadTree(jentry); //in case of a TChain, ientry is the entry number in the current file
  63. nb = fChain->GetEntry(jentry); nbytes += nb;
  64. ana_event(jentry,ientry);
  65. }
  66. }
  67. void FlowANA::ana_init(char *outfile) {
  68. book_hist(outfile);
  69. gRandom->SetSeed( (unsigned int)time(NULL) );
  70. }
  71. void FlowANA::loop_a_file(char *file) {
  72. TFile *treefile = TFile::Open(file);
  73. TTree *tree = (TTree*)treefile->Get("mctree"); // put the name of the TTree
  74. if(tree == 0) {
  75. cout <<"htree is not found in "<<file<<endl;
  76. treefile->Close();
  77. return;
  78. }
  79. cout << file <<" is opened"<<endl;
  80. Init(tree);
  81. Loop();
  82. treefile->Close();
  83. cout <<"one file processed"<<endl;
  84. }
  85. void FlowANA::ana_end() {
  86. d_outfile->cd();
  87. for( int ieta=0; ieta<neta; ieta++ ){
  88. H_Qw[ieta]->Write();
  89. }
  90. for( int ith=0; ith<3; ith++ ){
  91. for( int ieta=0; ieta<neta; ieta++ ){
  92. H_EP[ith][ieta]->Write();
  93. H_Qv[ith][ieta]->Write();
  94. }
  95. }
  96. for( int ith=0; ith<3; ith++ ){
  97. for( int idet=0; idet<ndet; idet++ ){
  98. for( int icent=0; icent<ncent; icent++ ){
  99. HRes[ith][idet][icent]->Write();
  100. }
  101. }
  102. }
  103. for( int icent=0; icent<ncent; icent++ ){
  104. for( int ipt=0; ipt<npt-1; ipt++ ){
  105. for( int id=0; id<npid; id++ ){
  106. hpt[icent][ipt][id]->Write();
  107. }
  108. }
  109. }
  110. for( int idet=0; idet<ndet; idet++ ){
  111. for( int icent=0; icent<ncent; icent++ ){
  112. for( int ipt=0; ipt<npt-1; ipt++ ){
  113. for( int id=0; id<npid; id++ ){
  114. hv2[idet][icent][ipt][id]->Write();
  115. }
  116. }
  117. }
  118. }
  119. for( int idet=0; idet<ndet; idet++ ){
  120. for( int ipt=0; ipt<npt-1; ipt++ ){
  121. for( int id=0; id<npid; id++ ){
  122. hv22[idet][ipt][id]->Write();
  123. }
  124. }
  125. }
  126. h2pt->Write();
  127. h2eta->Write();
  128. h2phis->Write();
  129. h2phi->Write();
  130. h2phirp->Write();
  131. href1->Write();
  132. href2->Write();
  133. href3->Write();
  134. href4->Write();
  135. href5->Write();
  136. hbimp->Write();
  137. hbimp2->Write();
  138. hbimp3->Write();
  139. hbimp4->Write();
  140. hbimp5->Write();
  141. d_outfile->Close();
  142. } // end of ana_end
  143. void FlowANA::book_hist(char *outfile) {
  144. d_outfile = new TFile(outfile,"recreate");
  145. h2eta = new TH1F("h2eta","eta distribution",200,-7,7);
  146. h2pt = new TH1F("h2pt","pt distribution",200,0,10.0);
  147. href1 = new TH1F("href1","Centrality by BBC (PHENIX)",1000,0,1000);
  148. href2 = new TH1F("href2","Centrality by BBC (PHENIX)",1000,0,1000);
  149. href3 = new TH1F("href3","Centrality by TPC (STAR)",1000,0,1000);
  150. href4 = new TH1F("href4","Centrality by TPC (STAR), ntracks >1",1000,0,1000);
  151. href5 = new TH1F("href5","Centrality by TPC (STAR), ntracks >2",1000,0,1000);
  152. hbimp2 = new TH1F("hbimp2","Imact Parameter",180,0,18);
  153. hbimp3 = new TH1F("hbimp3","Imact Parameter",180,0,18);
  154. hbimp4 = new TH1F("hbimp4","Imact Parameter",180,0,18);
  155. hbimp5 = new TH1F("hbimp5","Imact Parameter",180,0,18);
  156. hbimp = new TH1F("hbimp","Imact Parameter",180,0,18);
  157. h2phi = new TH1F("h2phi","azim. angle", 100, -TMath::Pi(), TMath::Pi()+2.*TMath::Pi()/100 );
  158. h2phis = new TH1F("h2phis","azim. angle (|eta| <0.5)", 100, -TMath::Pi(), TMath::Pi()+2.*TMath::Pi()/100 );
  159. h2phirp = new TH1F("h2phirp","azim. angle", 100, -TMath::Pi(), TMath::Pi()+2.*TMath::Pi()/100 );
  160. for( int ieta=0; ieta<neta; ieta++ ) H_Qw[ieta] = new TH1F( Form("H_Qw_%d",ieta), Form("H_Qw_%d",ieta), 100, 0, 1000 );
  161. for( int ith=0; ith<3; ith++ ){
  162. for( int ieta=0; ieta<neta; ieta++ ){
  163. H_EP[ith][ieta] = new TH1F( Form("H_EP_%d_%d",ith,ieta), Form("H_EP_%d_%d",ith,ieta), 100, -TMath::Pi()/(ith+2.)-0.1, TMath::Pi()/(ith+2.)+0.10 );
  164. H_Qv[ith][ieta] = new TH1F( Form("H_Qv_%d_%d",ith,ieta), Form("H_Qv_%d_%d",ith,ieta), 100, 0, 10 );
  165. }
  166. }
  167. for( int ith=0; ith<3; ith++ ){
  168. for( int idet=0; idet<ndet; idet++ ){
  169. for( int icent=0; icent<ncent; icent++ ){
  170. HRes[ith][idet][icent] = new TH1F( Form("HRes_%d_%d_%d",ith,idet,icent), Form("HRes_%d_%d_%d",ith,idet,icent), 100, -10, 10 );
  171. }
  172. }
  173. }
  174. for( int idet=0; idet<ndet; idet++ ){
  175. for( int icent=0; icent<ncent; icent++ ){
  176. for( int ipt=0; ipt<npt-1; ipt++ ){
  177. for( int id=0; id<npid; id++ ){
  178. hv2[idet][icent][ipt][id] = new TH1F( Form("hv2_%d_%d_%d_%d",idet,icent,ipt,id), Form("hv2_%d_%d_%d_%d",idet,icent,ipt,id), 400, -10, 10 );
  179. }
  180. }
  181. }
  182. }
  183. for( int idet=0; idet<ndet; idet++ ){
  184. for( int ipt=0; ipt<npt-1; ipt++ ){
  185. for( int id=0; id<npid; id++ ){
  186. hv22[idet][ipt][id] = new TH1F( Form("hv22_%d_%d_%d",idet,ipt,id), Form("hv22_%d_%d_%d",idet,ipt,id), 400, -10, 10 );
  187. }
  188. }
  189. }
  190. for( int icent=0; icent<ncent; icent++ ){
  191. for( int ipt=0; ipt<npt-1; ipt++ ){
  192. for( int id=0; id<npid; id++ ){
  193. hpt[icent][ipt][id] = new TH1F( Form("hpt_%d_%d_%d",icent,ipt,id), Form("hpt_%d_%d_%d",icent,ipt,id), 400, 0, 10 );
  194. }
  195. }
  196. }
  197. }
  198. // Analysis for each event !!!!
  199. void FlowANA::ana_event(int jentry, int ientry) {
  200. float phiRP = gRandom->Uniform(0, 2.*TMath::Pi());
  201. // float phiRP = gRandom->Uniform(-1.0*TMath::Pi(),TMath::Pi());
  202. h2phirp->Fill(phiRP);
  203. // centrality cut and vertex +/- 30 cm cut
  204. /*
  205. if(cent>0&&cent<=80){
  206. if(centrality<=5) mycent=0;
  207. else if(centrality<=10) mycent=1;
  208. else if(centrality<=15) mycent=2;
  209. else if(centrality<=20) mycent=3;
  210. else if(centrality<=25) mycent=4;
  211. else if(centrality<=30) mycent=5;
  212. else if(centrality<=35) mycent=6;
  213. else if(centrality<=40) mycent=7;
  214. else if(centrality<=45) mycent=8;
  215. else if(centrality<=50) mycent=9;
  216. else if(centrality<=55) mycent=10;
  217. else mycent=11;
  218. */
  219. if(jentry%1000==0) cout << jentry<<endl;// event counter
  220. float sumQxy[3][7][2] = {{{0}}}; //[ith][eta][x,y]
  221. float multQv[7] = {0}; //[eta]
  222. hbimp->Fill(bimp);
  223. double refMult1 = 0;
  224. double refMult2 = 0;
  225. double Nch_L = 0;
  226. double Nch_R = 0;
  227. double Nch_L2 = 0;
  228. double Nch_R2 = 0;
  229. for(int itrk=0;itrk<nh;itrk++) { //track loop
  230. float pt = sqrt( TMath::Power(momx[itrk], 2.0 ) + TMath::Power(momy[itrk], 2.0 ) );
  231. float oldphi = atan2( momx[itrk], momy[itrk] );
  232. float phi=oldphi;
  233. float the = atan2( pt, momz[itrk] );//atan2(pt/pz)
  234. float eta = -log( tan( 0.5 * the ) );
  235. // phi += phiRP;
  236. // float px = pt * cos(phi);
  237. // float py = pt * sin(phi);
  238. // pt = sqrt( TMath::Power(px, 2.0 ) + TMath::Power(py, 2.0 ) );
  239. h2pt->Fill(pt);
  240. h2eta->Fill(eta);
  241. h2phi->Fill(oldphi);
  242. h2phis->Fill(phi);
  243. if( pt>0.1 && fabs(eta)<0.5 ) refMult1++;
  244. if( pt>0.0 && fabs(eta)<0.5 ) refMult2++;
  245. if(eta >= 3.1 && eta <= 4.0) Nch_R++;
  246. if(eta >= -4.0 && eta <= -3.1) Nch_L++;
  247. if( pt<0.15 || pt>2. ) continue;
  248. int fEta = -1;
  249. // TPC plane
  250. if( eta>-1 && eta<-0.1 ) fEta = 0; // TPC East
  251. if( eta>0.1 && eta<1 ) fEta = 1; // TPC West
  252. if( fabs(eta)<0.1 ) fEta = 2; // TPC Mid
  253. // RXN plane
  254. if( eta>-3.0 && eta<-1.0 ) fEta = 3; // RXN East
  255. if( eta>1.0 && eta<3.0 ) fEta = 4; // RXN West
  256. // BBC plane
  257. if( eta>-5 && eta<-3 ) fEta = 5; //East
  258. if( eta>3.0 && eta<5 ) fEta = 6; //West
  259. // if( fabs(eta)>1.1 && fabs(eta)<2.9 ) fEta = 7; // RXN combined
  260. //if( fabs(eta)>3.0 && fabs(eta)<5.0 ) fEta = 8; // BBC combined
  261. if( fEta>-1 ){
  262. for( int ith=0; ith<3; ith++ ){
  263. sumQxy[ith][fEta][0] += pt * cos( (ith+2.0) * phi );
  264. sumQxy[ith][fEta][1] += pt * sin( (ith+2.0) * phi );
  265. }
  266. multQv[fEta]++;
  267. }// end of eta selection
  268. }// end of track loop
  269. if(Nch_L >= 1 && Nch_R >= 1){
  270. href1 -> Fill(Nch_L + Nch_R);
  271. }
  272. if(Nch_L >= 2 && Nch_R >= 2){
  273. href2 -> Fill(Nch_L + Nch_R);
  274. hbimp2->Fill(bimp);
  275. }
  276. if(refMult1>0){
  277. href3 -> Fill(refMult1);
  278. hbimp3->Fill(bimp);
  279. }
  280. if(refMult2>0){
  281. href4 -> Fill(refMult1);
  282. hbimp4->Fill(bimp);
  283. }
  284. if(refMult1>2){
  285. href5 -> Fill(refMult1);
  286. hbimp5->Fill(bimp);
  287. }
  288. float sumLR=Nch_L + Nch_R;
  289. // int fCent = GetCentrality10_RefMult( refMult1 );// STAR def
  290. //if( fCent<0 ) cout << fCent << endl;
  291. // int fCent = GetCentrality10_RefMultPHENIX(sumLR);
  292. int fCent = GetCentrality10_Bimp(bimp);
  293. //int fCent = GetCentrality10_BimpExp(bimp);
  294. float fEP[3][7]; //[ith][eta]
  295. float fQv[3][7]; //[ith][eta]
  296. for( int ith=0; ith<3; ith++ ){ // flow harmonic loop
  297. for( int ieta=0; ieta<7; ieta++ ){ // ep detector gap
  298. if( multQv[ieta]>5 ){ // multiplicity > 5
  299. fEP[ith][ieta] = atan2( sumQxy[ith][ieta][1], sumQxy[ith][ieta][0] ) / ( ith + 2.0 );
  300. fEP[ith][ieta] = atan2( sin( (ith+2.0)*fEP[ith][ieta] ), cos( (ith+2.0)*fEP[ith][ieta] ) );
  301. fEP[ith][ieta] /= ( ith + 2.0 );
  302. fQv[ith][ieta] = sqrt( TMath::Power( sumQxy[ith][ieta][0],2.0)+TMath::Power( sumQxy[ith][ieta][1], 2.0))/sqrt( multQv[ieta]);
  303. H_Qw[ieta]->Fill( multQv[ieta] );
  304. }else{
  305. fEP[ith][ieta] = -9999;
  306. fQv[ith][ieta] = -9999;
  307. }// end of mult cut selection
  308. } // end of loop on EP detectors
  309. } // end of flow harmonic loop
  310. for( int ith=0; ith<3; ith++ ){ // harmonic loop
  311. for( int ieta=0; ieta<7; ieta++ ){// eta EP detector loop
  312. if( fEP[ith][ieta]>-9000 ){ // EP reconstructed
  313. H_EP[ith][ieta]->Fill( fEP[ith][ieta] );
  314. H_Qv[ith][ieta]->Fill( fQv[ith][ieta] );
  315. }// end of EP reconstructed
  316. }// end of eta loop
  317. }// end of harm loop
  318. //Resolution
  319. for( int ith=0; ith<3; ith++ ){
  320. for( int icb=0; icb<3; icb++ ){
  321. double psi1, psi2, fq1, fq2;
  322. if ( icb==0 ){ psi1 = fEP[ith][0]; psi2 = fEP[ith][1]; fq1 = fQv[ith][0]; fq2 = fQv[ith][1]; } // TPC.E-TPC.W
  323. else if( icb==1 ){ psi1 = fEP[ith][3]; psi2 = fEP[ith][4]; fq1 = fQv[ith][3]; fq2 = fQv[ith][4]; } // RXN.E-RXN.W
  324. else { psi1 = fEP[ith][5]; psi2 = fEP[ith][6]; fq1 = fQv[ith][5]; fq2 = fQv[ith][6]; } // BBC.E-BBC.W
  325. if( psi1<-9000 || psi2<-9000 ) continue;
  326. if( fq1<0 || fq2<0 ) continue;
  327. double dPsi = ( ith + 2. ) * ( psi1 - psi2 );
  328. dPsi = atan2( sin(dPsi), cos(dPsi) );
  329. if(fCent>-1&&fCent<6){
  330. HRes[ith][icb][fCent]->Fill(cos(dPsi) );
  331. }
  332. }
  333. }
  334. // refmult star
  335. //float res2tpc[6]={0.503463,0.71591,0.749962,0.708934,0.61689,0.475386};
  336. //float res2rxn[6]={0.547883,0.791309,0.824213,0.793991,0.709638,0.561604};
  337. //float res2bbc[6]={0.252904,0.377894,0.401809,0.366931,0.300508,0.223784};
  338. // phenix ala cent
  339. // float res2tpc[6]={0.482228,0.704061,0.749667,0.7259,0.655706,0.541163};
  340. //float res2rxn[6]={ 0.526791,0.780304,0.824815,0.806745,0.746894,0.634004};
  341. //float res2bbc[6]={0.241286,0.375359,0.40532,0.384438,0.326188,0.250811};
  342. // 11.5 gev
  343. float res2tpc[6] = {0.323761,0.434068,0.433521,0.383028,0.307532,0.250556};
  344. float res2rxn[6] = {0.212259,0.333732,0.340171,0.303697,0.247778,0.206723};
  345. float res2bbc[6]={0.248559,0.383837,0.40206,0.373202,0.299496,0.2273};
  346. if(fCent>=0&&fCent<6){
  347. for(int itrk=0;itrk<nh;itrk++) { //track loop
  348. float pt = sqrt( TMath::Power(momx[itrk], 2.0 ) + TMath::Power(momy[itrk], 2.0 ) );
  349. float oldphi = atan2( momx[itrk], momy[itrk] );
  350. float phi=oldphi;
  351. float the = atan2( pt, momz[itrk] );//atan2(pt/pz)
  352. float eta = -log( tan( 0.5 * the ) );
  353. // phi += phiRP;
  354. // float px = pt * cos(phi);
  355. // float py = pt * sin(phi);
  356. // pt = sqrt( TMath::Power(px, 2.0 ) + TMath::Power(py, 2.0 ) );
  357. if( pt<0.2 || pt>4.0 ) continue;
  358. int ipt = 0;
  359. for(int i=0; i<npt-1;i++){
  360. if(pt>=bin_w[i] && pt<bin_w[i+1]) ipt = i;
  361. }// end of ipt loop
  362. float v2tpc=-999.0;
  363. float v2rxn=-999.0;
  364. float v2bbc=-999.0;
  365. if(eta>0&&eta<1.0){
  366. v2tpc = cos(2.0 * (phi-fEP[0][0]) )/res2tpc[fCent];
  367. v2rxn = cos(2.0 * (phi-fEP[0][3]) )/res2rxn[fCent];
  368. v2bbc = cos(2.0 * (phi-fEP[0][5]) )/res2bbc[fCent];
  369. }
  370. if(eta<0&&eta>-1.0){
  371. v2tpc = cos(2.0 * (phi-fEP[0][1]) )/res2tpc[fCent];
  372. v2rxn = cos(2.0 * (phi-fEP[0][4]) )/res2rxn[fCent];
  373. v2bbc = cos(2.0 * (phi-fEP[0][6]) )/res2bbc[fCent];
  374. }
  375. if(fabs(eta)<1.0){
  376. hv2[0][fCent][ipt][0]->Fill(v2tpc);
  377. hv2[1][fCent][ipt][0]->Fill(v2rxn);
  378. hv2[2][fCent][ipt][0]->Fill(v2bbc);
  379. hpt[fCent][ipt][0]->Fill(pt);
  380. if(fCent>0&&fCent<4){
  381. hv22[0][ipt][0]->Fill(v2tpc);
  382. hv22[1][ipt][0]->Fill(v2rxn);
  383. hv22[2][ipt][0]->Fill(v2bbc);
  384. }
  385. if ( pdg[itrk]==211){
  386. hv2[0][fCent][ipt][1]->Fill(v2tpc);
  387. hv2[1][fCent][ipt][1]->Fill(v2rxn);
  388. hv2[2][fCent][ipt][1]->Fill(v2bbc);
  389. hpt[fCent][ipt][1]->Fill(pt);
  390. if(fCent>0&&fCent<4){
  391. hv22[0][ipt][1]->Fill(v2tpc);
  392. hv22[1][ipt][1]->Fill(v2rxn);
  393. hv22[2][ipt][1]->Fill(v2bbc);
  394. }
  395. }// end of pion selection
  396. if ( pdg[itrk]==321){
  397. hv2[0][fCent][ipt][2]->Fill(v2tpc);
  398. hv2[1][fCent][ipt][2]->Fill(v2rxn);
  399. hv2[2][fCent][ipt][2]->Fill(v2bbc);
  400. hpt[fCent][ipt][2]->Fill(pt);
  401. if(fCent>0&&fCent<4){
  402. hv22[0][ipt][2]->Fill(v2tpc);
  403. hv22[1][ipt][2]->Fill(v2rxn);
  404. hv22[2][ipt][2]->Fill(v2bbc);
  405. }
  406. }// end of kaon selection
  407. if ( pdg[itrk]==2212){
  408. hv2[0][fCent][ipt][3]->Fill(v2tpc);
  409. hv2[1][fCent][ipt][3]->Fill(v2rxn);
  410. hv2[2][fCent][ipt][3]->Fill(v2bbc);
  411. hpt[fCent][ipt][3]->Fill(pt);
  412. if(fCent>0&&fCent<4){
  413. hv22[0][ipt][3]->Fill(v2tpc);
  414. hv22[1][ipt][3]->Fill(v2rxn);
  415. hv22[2][ipt][3]->Fill(v2bbc);
  416. }
  417. }// end of proton selection
  418. }
  419. }// end of the track loop
  420. }// end of centrality selection
  421. }
  422. // Urqmd 7.7 GeV
  423. int FlowANA::GetCentrality10_RefMult( double refMult ){
  424. int fcent;
  425. if ( refMult>=268 ) fcent = 0; // 0-10%
  426. else if( refMult>=185 ) fcent = 1; //10-20%
  427. else if( refMult>=126 ) fcent = 2; //20-30%
  428. else if( refMult>=83 ) fcent = 3; //30-40%
  429. else if( refMult>=52 ) fcent = 4; //40-50%
  430. else if( refMult>= 21 ) fcent = 5; //50-60%
  431. else if( refMult>= 17 ) fcent = 6; //60-70%
  432. else if( refMult>= 9 ) fcent = 7; //70-80%
  433. else fcent =-1;
  434. return fcent;
  435. }
  436. int FlowANA::GetCentrality10_RefMultPHENIX( double refMult ){
  437. int fcent;
  438. if ( refMult>=516 ) fcent = 0; // 0-10%
  439. else if( refMult>=382 ) fcent = 1; //10-20%
  440. else if( refMult>=280 ) fcent = 2; //20-30%
  441. else if( refMult>=199 ) fcent = 3; //30-40%
  442. else if( refMult>=137 ) fcent = 4; //40-50%
  443. else if( refMult>= 90 ) fcent = 5; //50-60%
  444. else if( refMult>= 55 ) fcent = 6; //60-70%
  445. else if( refMult>= 31 ) fcent = 7; //70-80%
  446. else fcent =-1;
  447. return fcent;
  448. }
  449. int FlowANA::GetCentrality10_Bimp( float bimp ){
  450. int fcent;
  451. if ( bimp<4.5 ) fcent = 0; // 0-10%
  452. else if( bimp<6.3 ) fcent = 1; //10-20%
  453. else if( bimp<7.73 ) fcent = 2; //20-30%
  454. else if( bimp<8.92 ) fcent = 3; //30-40%
  455. else if( bimp<9.99) fcent = 4; //40-50%
  456. else if( bimp<10.83) fcent = 5; //50-60%
  457. else if( bimp<11.78) fcent = 6; //60-70%
  458. else if( bimp<12.61) fcent = 7; //70-80%
  459. else fcent =-1;
  460. return fcent;
  461. }
  462. int FlowANA::GetCentrality10_BimpExp( float bimp ){
  463. int fcent;
  464. if ( bimp<4.68 ) fcent = 0; // 0-10%
  465. else if( bimp<6.47 ) fcent = 1; //10-20%
  466. else if( bimp<7.99 ) fcent = 2; //20-30%
  467. else if( bimp<9.31 ) fcent = 3; //30-40%
  468. else if( bimp<10.48 ) fcent = 4; //40-50%
  469. else if( bimp<11.49 ) fcent = 5; //50-60%
  470. else if( bimp<12.35) fcent = 6; //60-70%
  471. else if( bimp<13.0) fcent = 7; //70-80%
  472. else fcent =-1;
  473. return fcent;
  474. }