FairRoot/PandaRoot
Functions
run_ana_eta_c_tpc.C File Reference

Go to the source code of this file.

Functions

int run_ana_eta_c_tpc (int nevts=0)
 

Function Documentation

int run_ana_eta_c_tpc ( int  nevts = 0)

Definition at line 5 of file run_ana_eta_c_tpc.C.

References ctime, Double_t, fabs(), RhoFitterBase::Fit(), Rho4CFitter::FitConserveMasses(), RhoFitterBase::GetChi2(), PndMCTrack::GetMomentum(), PndMCTrack::GetMotherID(), PndMCTrack::GetNPoints(), PndMCTrack::GetPdgCode(), PndMCTrack::GetStartVertex(), h_chi2_4c, h_chi2_vtx, h_chi2b_4c, h_chi2b_vtx, h_etac_4c, h_etac_nocut, h_etac_phimass_4c, h_etac_phimass_vtx, h_etac_phimassfit, h_etac_pid, h_etac_vtx, h_mphi_4c, h_mphi_final_4c, h_mphi_final_massfit, h_mphi_final_vtx, h_mphi_nocuts, h_mphi_pid, h_mphi_vtx, hvpos, hvtxresX, hvtxresY, hvtxresZ, hvzpos, i, inFile, inSimFile, kDCH, kDRC, kDSK, kEMC, kFTS, kGEM, kHYP, kHYPG, kLUMI, kMDT, kMVD, kRPC, kSTT, kTOF, kTPC, Mass, mc_array, mctrack, n_etac_4c, n_etac_vtx, n_events, nc, out, p, p1, p2, printf(), rtime, theta, timer, tree, and TString.

6 {
7  TString OutFile="etac_histo_tpc.root";
8 
11 
12  gStyle->SetOptFit(1011);
13 
14  TStopwatch timer;
15  timer.Start();
16 
17  gROOT->Macro("$VMCWORKDIR/gconfig/rootlogon.C");
18 
19  TString inPidFile = "evt_pid_tpc.root";
20  TString inSimFile = "evt_points_tpc.root";
21 
22  TFile *inFile = TFile::Open(inSimFile,"READ");
23  TTree *tree=(TTree *) inFile->Get("pndsim") ;
24  tree->AddFriend("pndsim",inPidFile);
25 
26  TClonesArray* mc_array=new TClonesArray("PndMCTrack");
27  tree->SetBranchAddress("MCTrack",&mc_array);
28 
29  FairMCEventHeader* evthead;
30  tree->SetBranchAddress("MCEventHeader.", &evthead);
31 
32  TFile *out = TFile::Open(OutFile,"RECREATE");
33 
34  // the PndEventReader takes care about file/event handling
35  PndEventReader evr(inPidFile);
36 
37  TH1F *h_etac_nocut=new TH1F("h_etac_nocut","#eta_{c}m(#phi,#phi), (no cuts);E, GeV",100,2.5,3.5);
38  TH1F *h_mphi_nocuts=new TH1F("h_mphi_nocuts","#phi: m(K+ K-) (no cuts);E, GeV",100,0.95,1.5);
39 
40  TH1F *h_etac_pid=new TH1F("h_etac_pid","#eta_{c}m(#phi,#phi), (MC PID);E, GeV",100,2.5,3.5);
41  TH1F *h_mphi_pid=new TH1F("h_mphi_pid","#phi: m(K+ K-) (MC PID);E, GeV",100,0.95,1.5);
42 
43  TH1F *h_etac_4c=new TH1F("h_etac_4c","#eta_{c}m(#phi,#phi), 4C-fit;E, GeV",100,2.5,3.5);
44  TH1F *h_etac_4c_refit=new TH1F("h_etac_4c_refit","#eta_{c}m(#phi,#phi), 4C-fit;E, GeV",100,2.5,3.5);
45  TH1F *h_mphi_4c=new TH1F("h_mphi_4c","#phi: m(K+ K-) (4C-fit);E, GeV",100,0.95,1.5);
46 
47  TH1F *h_etac_vtx=new TH1F("h_etac_vtx","#eta_{c}m(#phi,#phi), Vertex fit;E, GeV",100,2.5,3.5);
48  TH1F *h_mphi_vtx=new TH1F("h_mphi_vtx","#phi: m(K+ K-) (Vertex fit);E, GeV",100,0.95,1.5);
49 
50  TH1F *h_etac_vtx_cut=new TH1F("h_etac_vtx_cut","#eta_{c}m(#phi,#phi), Vertex fit;E, GeV",100,2.5,3.5);
51  TH1F *h_mphi_vtx_cut=new TH1F("h_mphi_vtx_cut","#phi: m(K+ K-) (Vertex fit);E, GeV",100,0.95,1.5);
52 
53  TH1F *h_etac_phimass_4c=new TH1F("h_etac_phimass_4c","#eta_{c}m(#phi,#phi), (cut on #phi mass);E, GeV",100,2.8,3.2);
54  TH1F *h_mphi_final_4c=new TH1F("h_mphi_final_4c","#phi: m(K+ K-);E, GeV",100,0.95,1.1);
55 
56  TH1F *h_etac_phimass_vtx=new TH1F("h_etac_phimass_vtx","#eta_{c}m(#phi,#phi), (cut on #phi mass);E, GeV",100,2.8,3.2);
57  TH1F *h_mphi_final_vtx=new TH1F("h_mphi_final_vtx","#phi: m(K+ K-);E, GeV",100,0.95,1.1);
58 
59  TH1F *h_etac_phimass_vtx_cut=new TH1F("h_etac_phimass_vtx_cut","#eta_{c}m(#phi,#phi), (cut on #phi mass);E, GeV",100,2.8,3.2);
60  TH1F *h_mphi_final_vtx_cut=new TH1F("h_mphi_final_vtx_cut","#phi: m(K+ K-);E, GeV",100,0.95,1.1);
61 
62  TH1F *h_etac_phimassfit=new TH1F("h_etac_phimassfit","#eta_{c}m(#phi,#phi);E, GeV",100,2.8,3.2);
63  TH1F *h_mphi_final_massfit=new TH1F("h_mphi_final_massfit","#phi: m(K+ K-);E, GeV",100,0.95,1.1);
64 
65  TH1F *nc=new TH1F("nc","n charged",20,0,20);
66 
67  TH1F *h_chi2_4c=new TH1F("h_chi2_4c","#chi^{2} 4C-fit;#chi^{2}/N_{df}",100,0,100);
68  TH1F *h_chi2b_4c=new TH1F("h_chi2b_4c","#chi^{2} 4C-fit;#chi^{2}/N_{df}",100,0,100);
69  TH1F *h_chi2_vtx=new TH1F("h_chi2_vtx","#chi^{2} vertex;#chi^{2}/N_{df}",100,0,100);
70  TH1F *h_chi2b_vtx=new TH1F("h_chi2b_vtx","#chi^{2} vertex;#chi^{2}/N_{df}",100,0,100);
71 
72  TH1F *h_chi2_mass=new TH1F("h_chi2_mass","#chi^{2} Mass constraint fit;#chi^{2}",100,0,100);
73 
74  TH2F *hvpos = new TH2F("hvpos","(x,y) projection of fitted decay vertex",100,-5,5,100,-5,5);
75  TH1F *hvzpos = new TH1F("hvzpos","z position of fitted decay vertex",100,-10,10);
76  TH1F *hvtxresX = new TH1F("hvtxresX","X resolution of fitted decay vertex",100,-0.1,0.1);
77  TH1F *hvtxresY = new TH1F("hvtxresY","Y resolution of fitted decay vertex",100,-0.1,0.1);
78  TH1F *hvtxresZ = new TH1F("hvtxresZ","Z resolution of fitted decay vertex",100,-0.1,0.1);
79 
80  TH2F *h_theta_p = new TH2F("h_theta_p","Theta vs p",100,0,180,100,0,3);
81  TH2F *h_dp_p = new TH2F("h_dp_p","Delta p vs p",100,0,3,100,0,3);
82  TH2F *h_dp_theta = new TH2F("h_dp_theta","Delta p vs theta",100,0,3,100,0,180);
83  TH1F *h_dp=new TH1F("h_dp","Delta p",100,0,3);
84  TH1F *h_dp_low=new TH1F("h_dp_low","Delta p",100,0,3);
85  TH1F *h_dp_high=new TH1F("h_dp_high","Delta p",100,0,3);
86 
87  TPidMassSelector *phiMassSel=new TPidMassSelector("phi",1.02,0.2);
88 
89  TPidPlusSelector *kplusSel=new TPidPlusSelector("kplus");
90  TPidMinusSelector *kminusSel=new TPidMinusSelector("kminus");
91 
92  // the candidates lists we need
93  TCandList p1, p2, phi1, phi1_pid, phi1_massfit, etac, etac_pid, etac_nocut, etac_massfit;
94  TCandList etac_vtx;
95  int n_reco_4c=0, n_reco_vtx=0, n_reco_vtx_cut=0;
96  // Number of events in file and number of reconstructed eta_c to store in root file
97  TH1F *n_events=new TH1F("n_events","total number of events",1,0,1);
98  TH1F *n_etac_4c=new TH1F("n_etac_4c","number of reconstructed eta_c (4C-fit)",1,0,1);
99  TH1F *n_etac_vtx=new TH1F("n_etac_vtx","number of reconstructed eta_c (Vertex fit)",1,0,1);
100  TH1F *n_etac_vtx_cut=new TH1F("n_etac_vtx_cut","number of reconstructed eta_c (Vertex fit)",1,0,1);
101  TLorentzVector ini(0,0,3.6772,4.7333);
102 
103  if (nevts==0) nevts=evr.GetEntries();
104 
105  n_events->SetBinContent(1,nevts);
106  // cout << "nevts " << nevts << "\n";
107  int i=0,j=0, k=0, l=0;
108 
109  TH1F *h_acc_tpc=new TH1F("h_acc_tpc","TPC acceptance",6,0,6);
110  // Acceptance
111  int nEntries = tree->GetEntriesFast();
112  for (Int_t j=0; j< nEntries; j++)
113  {
114  tree->GetEntry(j);
115  int mccount=0;
116  for (Int_t mc = 0; mc < mc_array->GetEntriesFast(); mc++)
117  {
118  PndMCTrack *mctrack = (PndMCTrack*)mc_array->At(mc);
119  if (mctrack->GetMotherID()!=-1) continue;
120  if (mctrack->GetNPoints(kTPC)) mccount++;
121  }
122  h_acc_tpc->Fill(mccount);
123  }
124 
125 
126  // *************
127  // this is the loop through the events ... as simple as this...
128  // ****************
129  while (evr.GetEvent() && i++<nevts)
130  {
131  etac_vtx.Cleanup();
132  phi1_massfit.Cleanup();
133  //cout << "evt: " << i << endl;
134  if ((i%100)==0) cout<<"evt " << i << "\n";
135  //if (!((i+1)%100)) cout<<"evt " << i << "\n";
136  evr.FillList(p1,"Charged");
137  evr.FillList(p2,"Charged");
138 
139  double theta, p, p_mc, delta_p;
140  for (Int_t l=0;l<p1.GetLength();l++){
141  p=p1[l].GetMicroCandidate().GetMomentum().Mag();
142  theta=p1[l].GetMicroCandidate().GetMomentum().Theta()*TMath::RadToDeg();
143  h_theta_p->Fill(theta,p);
144  PndMCTrack *mcTrack =
145  (PndMCTrack*)mc_array->At(p1[l].GetMicroCandidate().GetMcIndex());
146  if (mcTrack==0) continue;
147  p_mc=mctrack->GetMomentum().Mag();
148  delta_p=p-p_mc;
149  h_dp_p->Fill(delta_p,p_mc);
150  h_dp_theta->Fill(delta_p,theta);
151  h_dp->Fill(delta_p);
152  if (p_mc<0.5)
153  h_dp_low->Fill(delta_p);
154  else
155  h_dp_high->Fill(delta_p);
156  }
157 
158  p1.Select(kplusSel);
159  p2.Select(kminusSel);
160 
161  int nchrg=p1.GetLength()+p2.GetLength();
162  nc->Fill(nchrg);
163 
164  for (j=0;j<p1.GetLength();++j) {
165  p1[j].SetMass(TRho::Instance()->GetPDG()->GetParticle(321)->Mass());
166  }
167  for (j=0;j<p2.GetLength();++j) {
168  p2[j].SetMass(TRho::Instance()->GetPDG()->GetParticle(321)->Mass());
169  }
170 
171  phi1.Combine(p1,p2);
172 
173  for (j=0;j<phi1.GetLength();++j) h_mphi_nocuts->Fill(phi1[j].M());
174 
175  phi1.Select(phiMassSel);
176  etac_nocut.Combine(phi1,phi1);
177 
178  for (l=0;l<etac_nocut.GetLength();++l) {
179  h_etac_nocut->Fill(etac_nocut[l].M());
180  }
181 
182  tree->GetEntry(i-1);
183  TVector3 mcVertex, mcD1Vertex, mcD2vertex;
184  evthead->GetVertex(mcVertex);
185 
186  // MC PID
187  // Leave only kaons in particle lists
188  int n_removed=0;
189  int ii=0;
190  for (l=0;l<p1.GetLength();++l) {
191  ii=l-n_removed;
192  if (p1[ii].GetMicroCandidate().GetMcIndex()>-1){
193  PndMCTrack *mcTrack =
194  (PndMCTrack*)mc_array->At(p1[ii].GetMicroCandidate().GetMcIndex());
195  if (mcTrack!=0)
196  {
197  if ((mcTrack->GetPdgCode()!=321))
198  {
199  p1.Remove(p1[ii]);
200  n_removed++;
201  }
202  if (mcTrack==0) mcD1Vertex = mcTrack->GetStartVertex();
203  if (mcTrack==2) mcD2Vertex = mcTrack->GetStartVertex();
204  }
205  else
206  {
207  std::cout<<"stt h: " << p1[ii].GetMicroCandidate().GetSttHits() << std::endl;
208  std::cout<<"Kaon list 1, element "<<l<<" has no assosiated mcTRack"<<std::endl;
209  }
210  }
211  }
212 
213  n_removed=0;
214  ii=0;
215  for (l=0;l<p2.GetLength();++l) {
216  ii=l-n_removed;
217  if (p2[ii].GetMicroCandidate().GetMcIndex()>-1){
218  PndMCTrack *mcTrack =
219  (PndMCTrack*)mc_array->At(p2[ii].GetMicroCandidate().GetMcIndex());
220  if (mcTrack!=0)
221  {
222  if ((mcTrack->GetPdgCode()!=-321))
223  {
224  p2.Remove(p2[ii]);
225  n_removed++;
226  }
227  if (mcTrack==1) mcD1Vertex = mcTrack->GetStartVertex();
228  if (mcTrack==3) mcD2Vertex = mcTrack->GetStartVertex();
229  }
230  else
231  {
232  std::cout<<"stt h: " << p2[ii].GetMicroCandidate().GetSttHits() << std::endl;
233  std::cout<<"Kaon list 2, element "<<l<<" has no assosiated mcTRack"<<std::endl;
234  }
235  }
236  }
237 
238  phi1_pid.Combine(p1,p2);
239 
240  for (j=0;j<phi1_pid.GetLength();++j) h_mphi_pid->Fill(phi1_pid[j].M());
241  phi1_pid.Select(phiMassSel);
242  etac.Combine(phi1_pid,phi1_pid);
243 
244  for (l=0;l<etac.GetLength();++l) {
245  h_etac_pid->Fill(etac[l].M());
246  }
247 
249  int best_i=0;
250  double best_chi2=10000;
251  TCandidate *ccfit = new TCandidate();
252  double m_phi1, m_phi2;
253  for (l=0;l<etac.GetLength();++l) {
254  Rho4CFitter fitter(etac[l],ini);
255  fitter.FitConserveMasses();
256  double chi2=fitter.GetChi2();
257  if (chi2<best_chi2)
258  {
259  best_chi2=chi2;
260  best_i = l;
261  ccfit = (TCandidate*)fitter.FittedCand(etac[l]);
262  TCandidate *phi1best = fitter.FittedCand(*(etac[l].Daughter(0)));
263  TCandidate *phi2best = fitter.FittedCand(*(etac[l].Daughter(1)));
264  TCandidate *k1best = fitter.FittedCand(*(etac[l].Daughter(0)->Daughter(0)));
265  TCandidate *k2best = fitter.FittedCand(*(etac[l].Daughter(0)->Daughter(1)));
266  TCandidate *k3best = fitter.FittedCand(*(etac[l].Daughter(1)->Daughter(0)));
267  TCandidate *k4best = fitter.FittedCand(*(etac[l].Daughter(1)->Daughter(1)));
268  TLorentzVector tlvk1 = k1best->P4();
269  TLorentzVector tlvk2 = k2best->P4();
270  TLorentzVector tlvk3 = k3best->P4();
271  TLorentzVector tlvk4 = k4best->P4();
272  m_phi1= (tlvk1+tlvk2).M();
273  m_phi2= (tlvk3+tlvk4).M();
274  }
275  h_chi2_4c->Fill(chi2/9); // Ndf=3N-3=9
276  }
277 
278  if(/*(best_chi2<270)&&*/(etac.GetLength()!=0))
279  {
280  h_chi2b_4c->Fill(best_chi2/9); // Ndf=3N-3=9
281  h_etac_4c->Fill(etac[best_i].M());
282  h_etac_4c_refit->Fill(ccfit->M());
283  h_mphi_4c->Fill(m_phi1);
284  h_mphi_4c->Fill(m_phi2);
285  h_mphi_final_4c->Fill(m_phi1);
286  h_mphi_final_4c->Fill(m_phi2);
287  if (((m_phi1>1.02-0.02)&&(m_phi1<1.02+0.02))
288  && ((m_phi2>1.02-0.02)&&(m_phi2<1.02+0.02)))
289  {
290  h_etac_phimass_4c->Fill(etac[best_i].M());
291  if ((etac[best_i].M()>2.9)&&(etac[best_i].M()<3.06))
292  n_reco_4c++;
293  }
294  }
295 
297  TCandidate *k1, *k2, *k3, *k4, *phi1tmp, *phi2tmp, *etac_tmp;
298 
299  //Combine 4 kaons directly to candidates
300  for (j=0;j<etac.GetLength();++j)
301  {
302  phi1tmp=etac[j].Daughter(0);
303  phi2tmp=etac[j].Daughter(1);
304 
305  k1=phi1tmp->Daughter(0);
306  k2=phi1tmp->Daughter(1);
307  k3=phi2tmp->Daughter(0);
308  k4=phi2tmp->Daughter(1);
309 
310  etac_tmp=k1->Combine(*k2,*k3,*k4);
311  etac_vtx.Add(*etac_tmp);
312  }
313 
314  for (l=0;l<etac_vtx.GetLength();++l) {
315  h_etac_pid->Fill(etac_vtx[l].M());
316  }
317 
318  int best_i=0;
319  double best_chi2=10000;
320  TCandidate *etacfit_best=0;
321  TCandidate *k1fit_best=0, *k2fit_best=0, *k3fit_best=0, *k4fit_best=0;
322  TCandidate *phi1fit_best, *phi2fit_best;
323  TVector3 bestPos;
324  Float_t etacvtx_mass;
325  for (j=0;j<etac_vtx.GetLength();++j)
326  {
327  RhoKinVtxFitter vtxfitter(etac_vtx[j]); // instantiate a vertex fitter
328  vtxfitter.Fit(); // do the vertex fit
329 
330  TCandidate *etacfit=vtxfitter.FittedCand(etac_vtx[j]); // request the fitted EtaC candidate
331  TVector3 etacVtx=etacfit->Pos(); // and the decay vertex position
332  double chi2_vtx=vtxfitter.GlobalChi2();
333  h_chi2_vtx->Fill(chi2_vtx/5); // Number degree of freedom 2N-3=5
334  // plot mass and vtx x,y projection after fit
335  hvpos->Fill(etacVtx.X(),etacVtx.Y());
336  hvzpos->Fill(etacVtx.Z());
337  if(chi2_vtx<best_chi2)
338  {
339  best_chi2=chi2_vtx;
340  best_i=l;
341  etacfit_best=etacfit;
342  k1fit_best=vtxfitter.FittedCand(*(etacfit_best->Daughter(0)));
343  k2fit_best=vtxfitter.FittedCand(*(etacfit_best->Daughter(1)));
344  k3fit_best=vtxfitter.FittedCand(*(etacfit_best->Daughter(2)));
345  k4fit_best=vtxfitter.FittedCand(*(etacfit_best->Daughter(3)));
346  etacvtx_mass = etacfit_best->M();
347  bestPos = etacfit->Pos();
348  }
349 
350  }
351  if(/*(best_chi2<150)&&*/(etac.GetLength()!=0)&&(k1fit_best!=0)&&(k3fit_best!=0))
352  {
353  //h_etac_vtx->Fill(etacfit_best->M());
354  h_chi2b_vtx->Fill(best_chi2/5);
355  h_etac_vtx->Fill(etacvtx_mass);
356  phi1fit_best=k1fit_best->Combine(*k2fit_best);
357  phi2fit_best=k3fit_best->Combine(*k4fit_best);
358  double m_phi1=phi1fit_best->M();
359  double m_phi2=phi2fit_best->M();
360  h_mphi_vtx->Fill(m_phi1);
361  h_mphi_vtx->Fill(m_phi2);
362  h_mphi_final_vtx->Fill(m_phi1);
363  h_mphi_final_vtx->Fill(m_phi2);
364  hvtxresX->Fill(mcVertex.X()-bestPos.X());
365  hvtxresY->Fill(mcVertex.Y()-bestPos.Y());
366  hvtxresZ->Fill(mcVertex.Z()-bestPos.Z());
367  if ((fabs(bestPos.Z())<2.)&&(bestPos.Perp()<1.))
368  {
369  h_etac_vtx_cut->Fill(etacvtx_mass);
370  h_mphi_vtx_cut->Fill(m_phi1);
371  h_mphi_vtx_cut->Fill(m_phi2);
372  h_mphi_final_vtx_cut->Fill(m_phi1);
373  h_mphi_final_vtx_cut->Fill(m_phi2);
374  }
375 
376  if (((m_phi1>1.02-0.02)&&(m_phi1<1.02+0.02))&&
377  ((m_phi2>1.02-0.02)&&(m_phi2<1.02+0.02)))
378  {
379  h_etac_phimass_vtx->Fill(etacvtx_mass);
380  if ((etacvtx_mass>2.9)&&(etacvtx_mass<3.06))
381  n_reco_vtx++;
382  if ((fabs(bestPos.Z())<2.)&&(bestPos.Perp()<1.))
383  {
384  h_etac_phimass_vtx->Fill(etacvtx_mass);
385  if ((etacvtx_mass>2.9)&&(etacvtx_mass<3.06))
386  n_reco_vtx_cut++;
387  }
388  }
389  }
390 
391 // ////////////// phi mass fit /////////////
392 // for (l=0;l<phi1_pid.GetLength();++l) {
393 // RhoKinFitter kinfitter(phi1_pid[l]);
394 // // set it's mass constraint to phi mass
395 // kinfitter.AddMassConstraint(1.02);
396 // kinfitter.Fit();
397 // TCandidate phifit=kinfitter.GetFitted(phi1_pid[l]);
398 // h_mphi_final_massfit->Fill(phifit.M());
399 // phi1_massfit.Add(phifit);
400 //
401 // double chi2=kinfitter.GlobalChi2();
402 // h_chi2_mass->Fill(chi2);
403 // }
404 //
405 // etac_massfit.Combine(phi1_massfit,phi1_massfit);
406 //
407 // for (l=0;l<etac_massfit.GetLength();++l) {
408 // double m_phi1=etac_massfit[l].Daughter(0)->M();
409 // double m_phi2=etac_massfit[l].Daughter(1)->M();
410 // if (((m_phi1>1.02-0.03)&&(m_phi1<1.02+0.03))&&
411 // ((m_phi2>1.02-0.03)&&(m_phi2<1.02+0.03)))
412 // {
413 // h_etac_phimassfit->Fill(etac_massfit[l].M());
414 // }
415 // }
416 
417 
418  }
419  std::cout<<"Number of reconstructed eta_c (4C) = "<<n_reco_4c<<std::endl;
420  std::cout<<"Number of reconstructed eta_c (Vertex fit)= "<<n_reco_vtx<<std::endl;
421  std::cout<<"Number of reconstructed eta_c (Vertex fit, R,Z cut)= "<<n_reco_vtx_cut<<std::endl;
422  n_etac_4c->SetBinContent(1,n_reco_4c);
423  n_etac_vtx->SetBinContent(1,n_reco_vtx);
424  n_etac_vtx_cut->SetBinContent(1,n_reco_vtx_cut);
425 
426  out->cd();
427  n_etac_4c->Write();
428  n_etac_vtx->Write();
429  n_etac_vtx_cut->Write();
430  n_events->Write();
431  h_etac_nocut->Write();
432  h_etac_pid->Write();
433  h_etac_vtx->Write();
434  h_etac_vtx_cut->Write();
435  h_etac_4c->Write();
436  h_etac_4c_refit->Write();
437  h_etac_phimass_4c->Write();
438  h_etac_phimass_vtx->Write();
439  h_etac_phimass_vtx_cut->Write();
440  h_etac_phimassfit->Write();
441 
442  h_mphi_nocuts->Write();
443  h_mphi_pid->Write();
444  h_mphi_vtx->Write();
445  h_mphi_vtx_cut->Write();
446  h_mphi_4c->Write();
447  h_mphi_final_4c->Write();
448  h_mphi_final_vtx->Write();
449  h_mphi_final_vtx_cut->Write();
450  h_mphi_final_massfit->Write();
451 
452  nc->Write();
453 
454  h_chi2_4c->Write();
455  h_chi2b_4c->Write();
456  h_chi2_vtx->Write();
457  h_chi2b_vtx->Write();
458  h_chi2_mass->Write();
459  hvzpos->Write();
460  hvpos->Write();
461 
462  hvtxresX->Write();
463  hvtxresY->Write();
464  hvtxresZ->Write();
465 
466  h_theta_p->Write();
467  h_dp_p->Write();
468  h_dp_theta->Write();
469  h_dp->Write();
470  h_dp_low->Write();
471  h_dp_high->Write();
472 
473  h_acc_tpc->Write();
474 
475  out->Save();
476 
477  timer.Stop();
478  Double_t rtime = timer.RealTime();
479  Double_t ctime = timer.CpuTime();
480  printf("RealTime=%f seconds, CpuTime=%f seconds\n",rtime,ctime);
481 
482  return 0;
483 }
PndMCTrack * mctrack
TH1F * h_mphi_final_massfit
TH1F * h_etac_4c
Definition: plot_eta_c.C:24
Double_t p
Definition: anasim.C:58
printf("RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime)
TH1F * h_etac_pid
Definition: plot_eta_c.C:18
TH1F * hvtxresX
TH1F * h_mphi_nocuts
Definition: plot_eta_c.C:27
Int_t i
Definition: run_full.C:25
TTree * tree
Definition: plot_dirc.C:12
TH1F * nc
Definition: plot_eta_c.C:38
Int_t GetNPoints(DetectorId detId) const
Definition: PndMCTrack.cxx:120
Int_t GetPdgCode() const
Definition: PndMCTrack.h:73
TH2F * hvpos
Definition: plot_eta_c.C:47
TVector3 GetMomentum() const
Definition: PndMCTrack.h:78
TClonesArray * mc_array
Definition: anaLmdCluster.C:25
TH1F * h_etac_phimass_4c
TH1F * h_mphi_final_4c
TH1F * h_mphi_4c
Definition: plot_eta_c.C:33
TH1F * n_etac_vtx
TH1F * h_mphi_pid
Definition: plot_eta_c.C:29
TString inFile
Definition: hit_dirc.C:8
TH1F * h_mphi_final_vtx
TH1F * h_chi2_vtx
Definition: plot_eta_c.C:43
TH1F * h_chi2_4c
Definition: plot_eta_c.C:41
TString inSimFile
TH1F * h_etac_phimassfit
Double_t
TH1F * h_chi2b_4c
TStopwatch timer
Definition: hit_dirc.C:51
TH1F * hvzpos
Definition: plot_eta_c.C:45
TH1F * h_etac_phimass_vtx
TH1F * h_etac_nocut
Definition: plot_eta_c.C:16
friend F32vec4 fabs(const F32vec4 &a)
Definition: P4_F32vec4.h:47
TFile * out
Definition: reco_muo.C:20
Double_t ctime
Definition: hit_dirc.C:114
TVectorD * n_events
Definition: plot_eta_c.C:14
TPad * p2
Definition: hist-t7.C:117
TH1F * hvtxresZ
TPad * p1
Definition: hist-t7.C:116
TH1F * h_mphi_vtx
Definition: plot_eta_c.C:31
TH1F * h_chi2b_vtx
TVector3 GetStartVertex() const
Definition: PndMCTrack.h:76
Int_t GetMotherID() const
Definition: PndMCTrack.h:74
Double_t rtime
Definition: hit_dirc.C:113
TH1F * h_etac_vtx
Definition: plot_eta_c.C:22
TH1F * n_etac_4c
TH1F * hvtxresY