void run_his_gridka(TString spliting ="500", TString runID="202", TString mode="stt" ) //histo nEvents is used for selector { Int_t nEntries = 1000; ///////////////////////////////////////////////////////////////////////////////////////////////////////// // Access of trees in the Simulation files ///////////////////////////////////////////////////////////////////////////////////////////////////////// gROOT->LoadMacro("$VMCWORKDIR/gconfig/rootlogon.C"); rootlogon(); //evt_points_stt_r202_39 //In Gridka connection TString base ="/panda/user/p/pbarprod/tdr11/output/sig/run"+runID+"/"+spliting+"/"; TString inSimFile = base+"evt_points_"+mode+"_r"+runID+"_"+spliting+".root"; TString inPidFile = base+"evt_pid_"+mode+"_r"+runID+"_"+spliting+".root"; TString OutFile = base+"evt_his_"+mode+"_r"+runID+"_"+spliting+".root"; //////////////////////////////////////////////////////////////////////////////////////////////////////////// // commom part //////////////////////////////////////////////////////////////////////////////////////////////////////////// TFile *inFile = TFile::Open(inSimFile,"READ"); TTree *tree=(TTree *) inFile->Get("cbmsim") ; TClonesArray* mc_array=new TClonesArray("PndMCTrack"); tree->SetBranchAddress("MCTrack",&mc_array); TH1F *h_charge = new TH1F("h_charge", "reconstructed tracks", 29,-14.5,14.5); TH1F *h_tracks = new TH1F("h_tracks", "reconstructed charged tracks", 21, -0.5, 20.5); TH2F *h_tracks_2D = new TH2F("h_tracks_2D","; # of + tracks ; # of - tracks", 12, -0.5, 11.5, 12, -0.5, 11.5); /********************************************************************************/ TH1F *h_gen_psi_mom = new TH1F("h_gen_psi_mom", "Momentum GeV/c^{2}", 100, 0, 10); TH1F *h_gen_psi_the = new TH1F("h_gen_psi_the", "#theta (deg.)", 100, 0, 10); TH2F *h_gen_psi_cor = new TH2F("h_gen_psi_cor", "P vs #theta", 100, 0, 10, 100, 0, 10); TH1F *h_gen_dplus_mom = new TH1F("h_gen_dplus_mom", "Momentum GeV/c^{2}", 100, 0, 5); TH1F *h_gen_dplus_the = new TH1F("h_gen_dplus_the", "#theta (deg.)", 100, 0, 10); TH2F *h_gen_dplus_cor = new TH2F("h_gen_dplus_cor", "P vs #theta", 100, 0, 5, 100, 0, 10); TH1F *h_gen_kminus_mom = new TH1F("h_gen_kminus_mom", "Momentum GeV/c^{2}", 100, 0, 4); TH1F *h_gen_kminus_the = new TH1F("h_gen_kminus_the", "#theta (deg.)", 100, 0, 180); TH2F *h_gen_kminus_cor = new TH2F("h_gen_kminus_cor", "P vs #theta", 100, 0, 4, 100, 0, 180); TH1F *h_gen_pplus1_mom = new TH1F("h_gen_pplus1_mom", "Momentum GeV/c^{2}", 100, 0, 4); TH1F *h_gen_pplus1_the = new TH1F("h_gen_pplus1_the", "#theta (deg.)", 100, 0, 180); TH2F *h_gen_pplus1_cor = new TH2F("h_gen_pplus1_cor", "P vs #theta", 100, 0, 4, 100, 0, 180); TH1F *h_gen_pplus2_mom = new TH1F("h_gen_pplus2_mom", "Momentum GeV/c^{2}", 100, 0, 4); TH1F *h_gen_pplus2_the = new TH1F("h_gen_pplus2_the", "#theta (deg.)", 100, 0, 180); TH2F *h_gen_pplus2_cor = new TH2F("h_gen_pplus2_cor", "P vs #theta", 100, 0, 4, 100, 0, 180); TH1F *h_gen_dminus_mom = new TH1F("h_gen_dminus_mom", "Momentum GeV/c^{2}", 100, 0, 5); TH1F *h_gen_dminus_the = new TH1F("h_gen_dminus_the", "#theta (deg.)", 100, 0, 10); TH2F *h_gen_dminus_cor = new TH2F("h_gen_dminus_cor", "P vs #theta", 100, 0, 5, 100, 0, 180); TH1F *h_gen_kplus_mom = new TH1F("h_gen_kplus_mom", "Momentum GeV/c^{2}", 100, 0, 4); TH1F *h_gen_kplus_the = new TH1F("h_gen_kplus_the", "#theta (deg.)", 100, 0, 180); TH2F *h_gen_kplus_cor = new TH2F("h_gen_kplus_cor", "P vs #theta", 100, 0, 4, 100, 0, 180); TH1F *h_gen_pminus1_mom = new TH1F("h_gen_pminus1_mom","Momentum GeV/c^{2}", 100, 0, 4); TH1F *h_gen_pminus1_the = new TH1F("h_gen_pminus1_the","#theta (deg.)", 100, 0, 180); TH2F *h_gen_pminus1_cor = new TH2F("h_gen_pminus1_cor","P vs #theta", 100, 0, 4, 100, 0, 180); TH1F *h_gen_pminus2_mom = new TH1F("h_gen_pminus2_mom","Momentum GeV/c^{2}", 100, 0, 4); TH1F *h_gen_pminus2_the = new TH1F("h_gen_pminus2_the","#theta (deg.)", 100, 0, 180); TH2F *h_gen_pminus2_cor = new TH2F("h_gen_pminus2_cor","P vs #theta", 100, 0, 4, 100, 0, 180); /********************************************************************************/ TH1F *h_dplus_mass = new TH1F("h_dplus_mass", "D^{+}(K^{-} #pi^{+} #pi^{+}) invariant mass", 200, 1.8693-0.5, 1.8693+0.5); TH1F *h_dminus_mass = new TH1F("h_dminus_mass", "D^{-}(K^{+} #pi^{-} #pi^{-}) invariant mass", 200, 1.8693-0.5, 1.8693+0.5); TH1F *h_psi_mass_raw = new TH1F("h_psi_mass_raw", "psi(3770) (D^{+} D^{-}) invariant mass raw", 200, 3.7699-0.2, 3.7699+0.8); TH1F *h_dplus_mass_fit = new TH1F("h_dplus_mass_fit", "D^{+}(K^{-} #pi^{+} #pi^{+}) invariant mass (fitted)", 200, 1.8693-0.5, 1.8693+0.5); TH1F *h_dminus_mass_fit = new TH1F("h_dminus_mass_fit","D^{-}(K^{+} #pi^{-} #pi^{-}) invariant mass (fitted)", 200, 1.8693-0.5, 1.8693+0.5); TH1F *h_psi_4cfit_chi2 = new TH1F("h_psi_4cfit_chi2", "Global #chi^{2} of 4cfit", 100, 0, 200); TH1F *h_psi_4cfit_mass = new TH1F("h_psi_4cfit_mass", "psi(3770) (D^{+} D^{-}) invariant mass (4C-fit)", 200, 3.7699-0.1, 3.7699+0.1); TH1F *h_psi_4cfit_massf = new TH1F("h_psi_4cfit_massf","psi(3770) (D^{+} D^{-}) invariant mass (4C-fail)", 200, 3.7699-0.2, 3.7699+0.8); TH1F *h_psi_4cfit_massc = new TH1F("h_psi_4cfit_massc","psi(3770) (D^{+} D^{-}) invariant mass (4C-can)", 200, 3.7699-0.2, 3.7699+0.8); TH1F *h_psi_kinef_chi2 = new TH1F("h_psi_kinef_chi2", "#chi^{2} of kinematicfit", 100, 0,400); TH1F *h_psi_kinef_prob = new TH1F("h_psi_kinef_prob", "Prob. of kinematicfit", 100, 0, 1); TH1F *h_psi_kinef_pull = new TH1F("h_psi_kinef_pull", "Pull of kinematicfit", 100,-5, 5); TH1F *h_psi_kinef_chi2_2= new TH1F("h_psi_kinef_chi2_2", "#chi^{2} of kinematicfit", 100, 0,400); TH1F *h_psi_kinef_prob_2= new TH1F("h_psi_kinef_prob_2", "Prob. of kinematicfit", 100, 0, 1); TH1F *h_psi_kinef_pull_2= new TH1F("h_psi_kinef_pull_2", "Pull of kinematicfit", 100,-5, 5); TH1F *h_psi_kinef_mass = new TH1F("h_psi_kinef_mass", "psi(3770) (D^{+} D^{-}) invariant mass (Kinefit)", 200, 3.7699-0.2, 3.7699+0.8); TH1F *h_psi_kinef_massf = new TH1F("h_psi_kinef_massf","psi(3770) (D^{+} D^{-}) invariant mass (Kine-fail)", 200, 3.7699-0.2, 3.7699+0.8); TH1F *h_psi_kinef_massc = new TH1F("h_psi_kinef_massc","psi(3770) (D^{+} D^{-}) invariant mass (Kine-can)", 200, 3.7699-0.2, 3.7699+0.8); TH1F *h_psi_kinef_mass2 = new TH1F("h_psi_kinef_mass2","psi(3770) (D^{+} D^{-}) invariant mass (Kinefit-MC)",200, 3.7699-0.2, 3.7699+0.8); TH1F *h_psi_kinef_mass3 = new TH1F("h_psi_kinef_mass3","psi(3770) (D^{+} D^{-}) invariant mass (Kinefit-MC)",200, 3.7699-0.2, 3.7699+0.8); TH2F *h_psi_kinef_p2dxy = new TH2F("h_psi_kinef_p2dxy","(x,y) projection of fitted decay vertex", 100,-0.5,0.5, 100, -0.5,0.5); TH2F *h_psi_kinef_p2drz = new TH2F("h_psi_kinef_p2drz","(r,z) projection of fitted decay vertex", 100,-1.0,1.0, 100, -0.5,0.5); TH1F *h_psi_kinef_dist1 = new TH1F("h_psi_kinef_dist1","Proper decay time #tau_{Psi(3770)}[ns]", 100,0,1); TH1F *h_psi_kinef_dist2 = new TH1F("h_psi_kinef_dist2","Proper decay time #tau_{Psi(3770)}[ns]", 100,0,1); TH1F *h_psi_vtx_chi2 = new TH1F("h_psi_vtx_chi2", "#chi^{2} of vertexfit", 100, 0,500); TH1F *h_psi_vtx_prob = new TH1F("h_psi_vtx_prob", "Prob. of vertexfit", 100, 0, 1); TH1F *h_psi_vtx_pull = new TH1F("h_psi_vtx_pull", "Pull of vertexfit", 100,-5, 5); TH1F *h_psi_vtx_mass = new TH1F("h_psi_vtx_mass", "psi(3770) (D^{+} D^{-}) invariant mass (vertexfit)", 200, 3.7699-0.2, 3.7699+0.8); TH1F *h_psi_vtx_massf = new TH1F("h_psi_vtx_massf","psi(3770) (D^{+} D^{-}) invariant mass (vertexf-fail)", 200, 3.7699-0.2, 3.7699+0.8); TH1F *h_psi_vtx_massc = new TH1F("h_psi_vtx_massc","psi(3770) (D^{+} D^{-}) invariant mass (vertexf-can)", 200, 3.7699-0.2, 3.7699+0.8); TH2F *h_psi_vtx_p2d = new TH2F("h_psi_vtx_p2d","(x,y) projection of fitted decay vertex", 100,-0.5,0.5, 100, -0.5,0.5); TH3F *h_psi_vtx_p3d = new TH3F("h_psi_vtx_p3d","(x,y,z) of fitted decay vertex",100,-0.5,0.5, 100, -0.5,0.5, 100, -1.0,1.0); TH1F *h_psi_vtx_dist1 = new TH1F("h_psi_vtx_dist1","Proper decay time #tau_{Psi(3770)}[ns]", 100,0,1); TH1F *h_psi_vtx_dist2 = new TH1F("h_psi_vtx_dist2","Proper decay time #tau_{Psi(3770)}[ns]", 100,0,1); TH1F *h_km_mom_1d = new TH1F("h_km_mom_1d", "Momentum GeV/c^{2}", 100, 0, 4); TH1F *h_km_mom_mc = new TH1F("h_km_mom_mc", "#Delta P GeV/c^{2}", 100, -0.4,0.4); TH1F *h_km_the_1d = new TH1F("h_km_the_1d", "#theta (deg.)", 100, 0,180); TH1F *h_km_the_mc = new TH1F("h_km_the_mc", "#Delta #theta (deg.)", 100, -1.0,1.0); TH2F *h_km_mom_the = new TH2F("h_km_mom_the", "P vs #theta ", 100, 0, 4, 100, 0,180); TH1F *h_pp1_mom_1d = new TH1F("h_pp1_mom_1d", "Momentum GeV/c^{2}", 100, 0, 4); TH1F *h_pp1_mom_mc = new TH1F("h_pp1_mom_mc", "#Delta P GeV/c^{2}", 100, -0.4,0.4); TH1F *h_pp1_the_1d = new TH1F("h_pp1_the_1d", "#theta (deg.)", 100, 0,180); TH1F *h_pp1_the_mc = new TH1F("h_pp1_the_mc", "#Delta #theta (deg.)", 100, -1.0,1.0); TH2F *h_pp1_mom_the= new TH2F("h_pp1_mom_the","P vs #theta", 100, 0, 4, 100, 0,180); TH1F *h_pp2_mom_1d = new TH1F("h_pp2_mom_1d", "Momentum GeV/c^{2}", 100, 0, 4); TH1F *h_pp2_mom_mc = new TH1F("h_pp2_mom_mc", "#Delta P GeV/c^{2}", 100, -0.4,0.4); TH1F *h_pp2_the_1d = new TH1F("h_pp2_the_1d", "#theta (deg.)", 100, 0,180); TH1F *h_pp2_the_mc = new TH1F("h_pp2_the_mc", "#Delta #theta (deg.)", 100, -1.0,1.0); TH2F *h_pp2_mom_the= new TH2F("h_pp2_mom_the","P vs #theta", 100, 0, 4, 100, 0,180); TH1F *h_kp_mom_1d = new TH1F("h_kp_mom_1d", "Momentum GeV/c^{2}", 100, 0, 4); TH1F *h_kp_mom_mc = new TH1F("h_kp_mom_mc", "#Delta P GeV/c^{2}", 100, -0.4,0.4); TH1F *h_kp_the_1d = new TH1F("h_kp_the_1d", "#theta (deg.)", 100, 0,180); TH1F *h_kp_the_mc = new TH1F("h_kp_the_mc", "#Delta #theta (deg.)", 100, -1.0,1.0); TH2F *h_kp_mom_the = new TH2F("h_kp_mom_the", "P vs #theta ", 100, 0, 4, 100, 0,180); TH1F *h_pm1_mom_1d = new TH1F("h_pm1_mom_1d", "Momentum GeV/c^{2}", 100, 0, 4); TH1F *h_pm1_mom_mc = new TH1F("h_pm1_mom_mc", "#Delta P GeV/c^{2}", 100, -0.4,0.4); TH1F *h_pm1_the_1d = new TH1F("h_pm1_the_1d", "#theta (deg.)", 100, 0,180); TH1F *h_pm1_the_mc = new TH1F("h_pm1_the_mc", "#Delta #theta (deg.)", 100, -1.0,1.0); TH2F *h_pm1_mom_the= new TH2F("h_pm1_mom_the", "P vs #theta", 100, 0, 4, 100, 0,180); TH1F *h_pm2_mom_1d = new TH1F("h_pm2_mom_1d", "Momentum GeV/c^{2}", 100, 0, 4); TH1F *h_pm2_mom_mc = new TH1F("h_pm2_mom_mc", "#Delta P GeV/c^{2}", 100, -0.4,0.4); TH1F *h_pm2_the_1d = new TH1F("h_pm2_the_1d", "#theta (deg.)", 100, 0,180); TH1F *h_pm2_the_mc = new TH1F("h_pm2_the_mc", "#Delta #theta (deg.)", 100, -1.0,1.0); TH2F *h_pm2_mom_the= new TH2F("h_pm2_mom_the", "P vs #theta", 100, 0, 4, 100, 0,180); TH1F *h_counter = new TH1F("h_counter", "counter", 10, 0, 10); TH2F *h_dalitz_gen_dplus = new TH2F("h_dalitz_gen_dplus", "Dalitz; m^{2}(K^{-}#pi^{+}_{2}) ; m^{2}(K^{-}#pi^{+}_{3})", 200, 0, 3.5, 200, 0, 3.5); TH2F *h_dalitz_gen_dminus = new TH2F("h_dalitz_gen_dminus", "Dalitz; m^{2}(K^{+}#pi^{-}_{2}) ; m^{2}(K^{+}#pi^{-}_{3})", 200, 0, 3.5, 200, 0, 3.5); TH2F *h_dalitz_before_dplus = new TH2F("h_dalitz_before_dplus", "Dalitz; m^{2}(K^{-}#pi^{+}_{2}) ; m^{2}(K^{-}#pi^{+}_{3})", 200, 0, 3.5, 200, 0, 3.5); TH2F *h_dalitz_before_dminus = new TH2F("h_dalitz_before_dminus", "Dalitz; m^{2}(K^{+}#pi^{-}_{2}) ; m^{2}(K^{+}#pi^{-}_{3})", 200, 0, 3.5, 200, 0, 3.5); TH2F *h_dalitz_after_dplus = new TH2F("h_dalitz_after_dplus", "Dalitz; m^{2}(K^{-}#pi^{+}_{2}) ; m^{2}(K^{-}#pi^{+}_{3})", 200, 0, 3.5, 200, 0, 3.5); TH2F *h_dalitz_after_dminus = new TH2F("h_dalitz_after_dminus", "Dalitz; m^{2}(K^{+}#pi^{-}_{2}) ; m^{2}(K^{+}#pi^{-}_{3})", 200, 0, 3.5, 200, 0, 3.5); TH1F *h_dpkpi1_mass_gen = new TH1F("h_dpkpi1_mass_gen", ";m(K^{-} #pi^{+});# of evt./(10 MeV/c)", 300, 0, 3); TH1F *h_dpkpi2_mass_gen = new TH1F("h_dpkpi2_mass_gen", ";m(K^{-} #pi^{+});# of evt./(10 MeV/c)", 300, 0, 3); TH1F *h_dmkpi1_mass_gen = new TH1F("h_dmkpi1_mass_gen", ";m(K^{+} #pi^{-});# of evt./(10 MeV/c)", 300, 0, 3); TH1F *h_dmkpi2_mass_gen = new TH1F("h_dmkpi2_mass_gen", ";m(K^{+} #pi^{-});# of evt./(10 MeV/c)", 300, 0, 3); TH1F *h_dpkpi1_mass_after = new TH1F("h_dpkpi1_mass_after", ";m(K^{-} #pi^{+});# of evt./(10 MeV/c)", 300, 0, 3); TH1F *h_dpkpi2_mass_after = new TH1F("h_dpkpi2_mass_after", ";m(K^{-} #pi^{+});# of evt./(10 MeV/c)", 300, 0, 3); TH1F *h_dmkpi1_mass_after = new TH1F("h_dmkpi1_mass_after", ";m(K^{+} #pi^{-});# of evt./(10 MeV/c)", 300, 0, 3); TH1F *h_dmkpi2_mass_after = new TH1F("h_dmkpi2_mass_after", ";m(K^{+} #pi^{-});# of evt./(10 MeV/c)", 300, 0, 3); TH1F *h_dpkpi1_mass_fit = new TH1F("h_dpkpi1_mass_fit", ";m(K^{-} #pi^{+});# of evt./(10 MeV/c)", 300, 0, 3); TH1F *h_dpkpi2_mass_fit = new TH1F("h_dpkpi2_mass_fit", ";m(K^{-} #pi^{+});# of evt./(10 MeV/c)", 300, 0, 3); TH1F *h_dmkpi1_mass_fit = new TH1F("h_dmkpi1_mass_fit", ";m(K^{+} #pi^{-});# of evt./(10 MeV/c)", 300, 0, 3); TH1F *h_dmkpi2_mass_fit = new TH1F("h_dmkpi2_mass_fit", ";m(K^{+} #pi^{-});# of evt./(10 MeV/c)", 300, 0, 3); TH2F *h_eoverp_pion = new TH2F("h_eoverp_pion", "pion; p(GeV/c); E/p", 100, 0, 5, 100, 0, 1.1); TH2F *h_eoverp_kaon = new TH2F("h_eoverp_kaon", "kaon; p(GeV/c); E/p", 100, 0, 5, 100, 0, 1.1); /***************************************************************************************************/ // /***************************************************************************************************/ // the candidates lists we need TCandList pcharge, mcharge, mct; TCandList kam, pip;//For Dplus TCandList kap, pim;//For Dminus TCandList Dplus, Dminus, Psi; TPidMassSelector *DMassSel=new TPidMassSelector("Dselector", 1.8693, 0.15); //TLorentzVector ini(0,0,6.23164,7.24015);//What is this??? for J/psi //TLorentzVector ini(0, 0, 15.0, 15.02931650);//Px,Py,Pz,E simple? TLorentzVector ini(0, 0, 6.58291, 7.58771);//Px,Py,Pz,E //incident 4-mom : (7.58771, 0, 0, 6.58291), m = 3.77341 //direct psi(3770) decay //incident 4-mom : (7.57359, 0, 0, 6.56865), m = 3.7699 //resonance with ppbarSystem PndEventReader evr(inPidFile); if (nEntries==0) nEntries = evr.GetEntries(); cout << "Analysis with total nEntries " << nEntries << "\n"; int i=0, j=0, k=0; while (evr.GetEvent() && i++GetEntry(i); int n=0; double gen_p0,gen_p1,gen_p2,gen_p3,gen_p4,gen_p5 ; double gen_t0,gen_t1,gen_t2,gen_t3,gen_t4,gen_t5 ; for(Int_t mc=0;mcGetEntriesFast();mc++) { PndMCTrack *mctrack=(PndMCTrack*)mc_array->At(mc); if (mctrack->GetMotherID()!=-1) continue; double mom=mctrack->GetMomentum().Mag(); double the=mctrack->GetMomentum().Theta()*TMath::RadToDeg(); //cout<GetPdgCode()<GetPdgCode()== -321){ h_gen_kminus_mom->Fill(mom); h_gen_kminus_the->Fill(the); h_gen_kminus_cor->Fill(mom,the); gen_p0 = mom; gen_t0 = the;} if(mc==1 && mctrack->GetPdgCode()== 211){ h_gen_pplus1_mom->Fill(mom); h_gen_pplus1_the->Fill(the); h_gen_pplus1_cor->Fill(mom,the); gen_p1 = mom; gen_t1 = the;} if(mc==2 && mctrack->GetPdgCode()== 211){ h_gen_pplus2_mom->Fill(mom); h_gen_pplus2_the->Fill(the); h_gen_pplus2_cor->Fill(mom,the); gen_p2 = mom; gen_t2 = the;} if(mc==3 && mctrack->GetPdgCode()== 321){ h_gen_kplus_mom->Fill(mom); h_gen_kplus_the->Fill(the); h_gen_kplus_cor->Fill(mom,the); gen_p3 = mom; gen_t3 = the;} if(mc==4 && mctrack->GetPdgCode()== -211){ h_gen_pminus1_mom->Fill(mom); h_gen_pminus1_the->Fill(the);h_gen_pminus1_cor->Fill(mom,the); gen_p4 = mom; gen_t4 = the;} if(mc==5 && mctrack->GetPdgCode()== -211){ h_gen_pminus2_mom->Fill(mom); h_gen_pminus2_the->Fill(the);h_gen_pminus2_cor->Fill(mom,the); gen_p5 = mom; gen_t5 = the;} } evr.FillList(pcharge,"PionVeryLoosePlus"); evr.FillList(mcharge,"PionVeryLooseMinus"); //if(pcharge.GetLength() < 3) continue; //if(ncharge.GetLength() < 3) continue; int positive = pcharge.GetLength(); int negative = -1 * mcharge.GetLength(); h_charge->Fill(positive); h_charge->Fill(negative); int ntracks = pcharge.GetLength() + mcharge.GetLength(); h_tracks->Fill(ntracks); h_tracks_2D->Fill(positive, -1*negative); evr.FillList(kam,"KaonVeryLooseMinus"); evr.FillList(pip,"PionVeryLoosePlus"); evr.FillList(kap,"KaonVeryLoosePlus"); evr.FillList(pim,"PionVeryLooseMinus"); //Is it safe? mass have been set by hand! for (Int_t l=0;lGetPDG()->GetParticle(-311)->Mass()); } for (Int_t l=0;lGetPDG()->GetParticle(211)->Mass()); } for (Int_t l=0;lGetPDG()->GetParticle(311)->Mass()); } for (Int_t l=0;lGetPDG()->GetParticle(-211)->Mass()); } for (j=0; jcd(); h_charge -> Write(); h_tracks -> Write(); h_tracks_2D -> Write(); h_counter -> Write(); h_gen_psi_mom -> Write(); h_gen_psi_the -> Write(); h_gen_psi_cor -> Write(); h_gen_dplus_mom -> Write(); h_gen_dplus_the -> Write(); h_gen_dplus_cor -> Write(); h_gen_kminus_mom -> Write(); h_gen_kminus_the -> Write(); h_gen_kminus_cor -> Write(); h_gen_pplus1_mom -> Write(); h_gen_pplus1_the -> Write(); h_gen_pplus1_cor -> Write(); h_gen_pplus2_mom -> Write(); h_gen_pplus2_the -> Write(); h_gen_pplus2_cor -> Write(); h_gen_dminus_mom -> Write(); h_gen_dminus_the -> Write(); h_gen_dminus_cor -> Write(); h_gen_kplus_mom -> Write(); h_gen_kplus_the -> Write(); h_gen_kplus_cor -> Write(); h_gen_pminus1_mom -> Write(); h_gen_pminus1_the -> Write(); h_gen_pminus1_cor -> Write(); h_gen_pminus2_mom -> Write(); h_gen_pminus2_the -> Write(); h_gen_pminus2_cor -> Write(); h_dplus_mass -> Write(); h_dminus_mass -> Write(); h_psi_mass_raw -> Write(); h_dplus_mass_fit -> Write(); h_dminus_mass_fit -> Write(); h_psi_4cfit_chi2 -> Write(); h_psi_4cfit_mass -> Write(); h_psi_4cfit_massf -> Write(); h_psi_4cfit_massc -> Write(); h_psi_kinef_chi2 -> Write(); h_psi_kinef_prob -> Write(); h_psi_kinef_pull -> Write(); h_psi_kinef_chi2_2 -> Write(); h_psi_kinef_prob_2 -> Write(); h_psi_kinef_pull_2 -> Write(); h_psi_kinef_mass -> Write(); h_psi_kinef_massf -> Write(); h_psi_kinef_massc -> Write(); h_psi_kinef_mass2 -> Write(); h_psi_kinef_mass3 -> Write(); h_psi_kinef_p2dxy -> Write(); h_psi_kinef_p2drz -> Write(); h_psi_kinef_dist1 -> Write(); h_psi_kinef_dist2 -> Write(); h_psi_vtx_chi2 -> Write(); h_psi_vtx_prob -> Write(); h_psi_vtx_pull -> Write(); h_psi_vtx_mass -> Write(); h_psi_vtx_massf -> Write(); h_psi_vtx_massc -> Write(); h_psi_vtx_p2d -> Write(); h_psi_vtx_p3d -> Write(); h_psi_vtx_dist1 -> Write(); h_psi_vtx_dist2 -> Write(); h_km_mom_1d -> Write(); h_km_mom_mc -> Write(); h_km_the_1d -> Write(); h_km_the_mc -> Write(); h_km_mom_the -> Write(); h_pp1_mom_1d -> Write(); h_pp1_mom_mc -> Write(); h_pp1_the_1d -> Write(); h_pp1_the_mc -> Write(); h_pp1_mom_the-> Write(); h_pp2_mom_1d -> Write(); h_pp2_mom_mc -> Write(); h_pp2_the_1d -> Write(); h_pp2_the_mc -> Write(); h_pp2_mom_the-> Write(); h_kp_mom_1d -> Write(); h_kp_mom_mc -> Write(); h_kp_the_1d -> Write(); h_kp_the_mc -> Write(); h_kp_mom_the -> Write(); h_pm1_mom_1d -> Write(); h_pm1_mom_mc -> Write(); h_pm1_the_1d -> Write(); h_pm1_the_mc -> Write(); h_pm1_mom_the-> Write(); h_pm2_mom_1d -> Write(); h_pm2_mom_mc -> Write(); h_pm2_the_1d -> Write(); h_pm2_the_mc -> Write(); h_pm2_mom_the-> Write(); h_dalitz_gen_dplus->Write(); h_dalitz_gen_dminus->Write(); h_dalitz_before_dplus->Write(); h_dalitz_before_dminus->Write(); h_dalitz_after_dplus->Write(); h_dalitz_after_dminus->Write(); h_dpkpi1_mass_gen->Write(); h_dpkpi2_mass_gen->Write(); h_dmkpi1_mass_gen->Write(); h_dmkpi2_mass_gen->Write(); h_dpkpi1_mass_after->Write(); h_dpkpi2_mass_after->Write(); h_dmkpi1_mass_after->Write(); h_dmkpi2_mass_after->Write(); h_dpkpi1_mass_fit->Write(); h_dpkpi2_mass_fit->Write(); h_dmkpi1_mass_fit->Write(); h_dmkpi2_mass_fit->Write(); h_eoverp_pion->Write(); h_eoverp_kaon->Write(); histo->Write(); histo->Close(); //exit(0); }