#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // #include "/home/hep/uoh35620/stuff/analyse-n-tuple/cuts/jacopo.cuts.h" // #include "/home/hep/uoh35620/stuff/analyse-n-tuple/cuts/vava.cuts.h" // #include "/home/hep/uoh35620/stuff/analyse-n-tuple/cuts/vava.high.mv.cuts.h" // #include "/home/hep/uoh35620/stuff/analyse-n-tuple/cuts/vava.high.mu.cuts.h" // #include "/home/hep/uoh35620/stuff/analyse-n-tuple/cuts/thomas.cuts.h" // #include "/home/hep/uoh35620/stuff/analyse-n-tuple/cuts/thomas.looser.trk.chi2.cuts.h" // #include "/home/hep/uoh35620/stuff/analyse-n-tuple/cuts/thomas.dira.cuts.h" // #include "/home/hep/uoh35620/stuff/analyse-n-tuple/cuts/thomas.mod.cuts.h" // #include "/home/hep/uoh35620/stuff/analyse-n-tuple/cuts/thomas.low.mv.cuts.h" // #include "/home/hep/uoh35620/stuff/analyse-n-tuple/cuts/thomas.low.dip.cuts.h" // #include "/home/hep/uoh35620/stuff/analyse-n-tuple/cuts/thomas.with.bac.pid.cuts.h" // #include "/home/hep/uoh35620/stuff/analyse-n-tuple/cuts/thomas.bipchi2.cuts.h" // #include "/home/hep/uoh35620/stuff/analyse-n-tuple/cuts/tmva-ga2.cuts.h" #ifndef _cuts #error A file specifying the cuts must also be included #endif #ifndef Negative_D_Daughter_TRACK_CHI2NDOF_Cut #error Negative_D_Daughter_TRACK_CHI2NDOF_Cut missing from cut header file, update it. Set to >10 to disable it. #endif #ifndef Name_Of_Cuts #error Set a name for these set of cuts #endif Double_t poissonf(Double_t*x,Double_t*par) { return par[0]*TMath::Poisson(x[0],par[1]); } TH1D * IntergrateFromRHS(TH1D* in) { TH1D* out = (TH1D*)in->Clone(); TString graphName = TString("Intergral of "); graphName += in->GetName(); out->SetName(graphName); for(Int_t ii = in->GetSize()-2; ii>0; ii--) (*out)[ii] = ((Double_t)(*out)[ii+1] + (Double_t)(*in)[ii]); out->Scale(1.0/in->GetEntries()); return out; } TH1D * IntergrateFromLHS(TH1D* in) { TH1D* out = (TH1D*)in->Clone(); TString graphName = TString("Intergral of "); graphName += in->GetName(); out->SetName(graphName); for(Int_t ii = 0; iiGetSize()-1; ii++) (*out)[ii] = ((Double_t)(*out)[ii-1] + (Double_t)(*in)[ii]); out->Scale(1.0/in->GetEntries()); return out; } void BachelorAnalsys( TString filenamearg, // filename of the first file to process or the first half of the filename Int_t nDataFiles=-1, // if set to -1 only load filenamearg, if -2 load filenamearg and dataSubFileName, // if >0 load filenamearg+i+dataSubFileName where i goes from 0 to nDataFiles TString dataSubFileName="", // second file to load or second part of the file name Int_t maxEvent=-1, // only process this many events, -1 for all Bool_t plotMPPT = true, // Plot M, p and PT for all particles Bool_t plotNPV = true, // Plot nPV data (efficiencies and nPV on a cut by cut basis) Bool_t plotMassByCut = true, // Plot B and D mass on a cut by cut basis Bool_t plotFD = true, // Plot Flight Distance and Tau data Bool_t plotBkSig = true, // Plot Background(Fringes) and signal comparasons Bool_t plotCos = true, // Plot cos theta of the d and also IPS of the d Bool_t cutOnDaughters = true, Bool_t cutOnBachelor = true, Bool_t cutOnPID = true, Bool_t cutOnDMass = true, Bool_t cutOnEventNr = true, TString dataSubFileName2="", TString dataSubFileName3="" ) { //void BachelorAnalsys(TString filenamearg, Int_t nDataFiles=-1, TString dataSubFileName="", Bool_t plotOthers = true, Int_t onlyNPV = -1, Bool_t cutOnDaughters = true, Bool_t cutOnDMass = true, Bool_t cutOnEventNr = true){ ////////////////////////////////////////////////////////////////// //TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("B2DX_UP_FromHadron_6_7_2010.root");//B2DX_All_7_6_2010.root"); //if (!f) f = new TFile("/home/hep/uoh35620/stuff/stripping/MC/down/all/Bu2DStarplusX.root");//B2DX_All_7_6_2010.root"); //if (!f) f = new TFile(filenamearg);//B2DX_All_7_6_2010.root"); // if (!f) f = new TFile("B2DX_UP_FromHadron_6_7_2010.root");//B2DX_All_7_6_2010.root"); // if (!f) f = new TFile("/home/hep/uoh35620/stuff/analyse-n-tuple/generated/B2DX_Up_MC_2010.root"); // if (!f) f = new TFile("/home/hep/uoh35620/stuff/analyse-n-tuple/generated/B2DX_Down_MC_2010.root"); // if (!f) f = new TFile("/home/hep/uoh35620/stuff/analyse-n-tuple/generated/B2DX_Down_FromHadron_6_7_2010_Wed Jul 14 09:08:00 BST 2010.root"); // if (!f) f = new TFile("/home/hep/uoh35620/stuff/analyse-n-tuple/given/B2DX_Down_FromHadron_18_5_2010.root"); //fChain = (TTree*)gDirectory->Get("BachelorDecayTreeTuple/DecayTree"); // Settings Bool_t eventEffs = true; gROOT->Time(); TChain *fChain = new TChain("BachelorDecayTreeTuple/DecayTree"); TChain *lumiChain = new TChain("GetIntegratedLuminosity/LumiTuple"); if(nDataFiles ==-1) { fChain->Add(filenamearg); lumiChain->Add(filenamearg); } else if (nDataFiles ==-2) { fChain->Add(filenamearg); fChain->Add(dataSubFileName); lumiChain->Add(filenamearg); lumiChain->Add(dataSubFileName); } else if (nDataFiles ==-3) { fChain->Add(filenamearg); fChain->Add(dataSubFileName); fChain->Add(dataSubFileName2); lumiChain->Add(filenamearg); lumiChain->Add(dataSubFileName); lumiChain->Add(dataSubFileName2); } else if (nDataFiles ==-4) { fChain->Add(filenamearg); fChain->Add(dataSubFileName); fChain->Add(dataSubFileName2); fChain->Add(dataSubFileName3); lumiChain->Add(filenamearg); lumiChain->Add(dataSubFileName); lumiChain->Add(dataSubFileName2); lumiChain->Add(dataSubFileName3); } else { for(Int_t nFile = 0; nFile < nDataFiles; nFile++) { stringstream stream; stream << filenamearg << nFile << dataSubFileName; //"/output/B2Dpi_up_6_7_2010.split.direct.root" cout << "Added to Data chain " << stream.str().c_str()<< endl; fChain->Add(stream.str().c_str()); lumiChain->Add(stream.str().c_str()); } } // Declaration of leaf types Float_t B_MINIP; Float_t B_MINIPCHI2; Float_t B_OWNPV_X; Float_t B_OWNPV_Y; Float_t B_OWNPV_Z; Float_t B_OWNPV_XERR; Float_t B_OWNPV_YERR; Float_t B_OWNPV_ZERR; Float_t B_OWNPV_CHI2; Int_t B_OWNPV_NDOF; Float_t B_OWNPV_COV_[3][3]; Float_t B_IP_OWNPV; Float_t B_IPCHI2_OWNPV; Float_t B_FD_OWNPV; Float_t B_FDCHI2_OWNPV; Float_t B_DIRA_OWNPV; Float_t B_ENDVERTEX_X; Float_t B_ENDVERTEX_Y; Float_t B_ENDVERTEX_Z; Float_t B_ENDVERTEX_XERR; Float_t B_ENDVERTEX_YERR; Float_t B_ENDVERTEX_ZERR; Float_t B_ENDVERTEX_CHI2; Int_t B_ENDVERTEX_NDOF; Float_t B_ENDVERTEX_COV_[3][3]; Float_t B_P; Float_t B_PT; Float_t B_PE; Float_t B_PX; Float_t B_PY; Float_t B_PZ; Float_t B_MM; Float_t B_MMERR; Float_t B_M; Float_t B_TAU; Int_t B_ID; Float_t Bachelor_CosTheta; Float_t Bachelor_MINIP; Float_t Bachelor_MINIPCHI2; Float_t Bachelor_OWNPV_X; Float_t Bachelor_OWNPV_Y; Float_t Bachelor_OWNPV_Z; Float_t Bachelor_OWNPV_XERR; Float_t Bachelor_OWNPV_YERR; Float_t Bachelor_OWNPV_ZERR; Float_t Bachelor_OWNPV_CHI2; Int_t Bachelor_OWNPV_NDOF; Float_t Bachelor_OWNPV_COV_[3][3]; Float_t Bachelor_IP_OWNPV; Float_t Bachelor_IPCHI2_OWNPV; Float_t Bachelor_ORIVX_X; Float_t Bachelor_ORIVX_Y; Float_t Bachelor_ORIVX_Z; Float_t Bachelor_ORIVX_XERR; Float_t Bachelor_ORIVX_YERR; Float_t Bachelor_ORIVX_ZERR; Float_t Bachelor_ORIVX_CHI2; Int_t Bachelor_ORIVX_NDOF; Float_t Bachelor_ORIVX_COV_[3][3]; Float_t Bachelor_P; Float_t Bachelor_PT; Float_t Bachelor_PE; Float_t Bachelor_PX; Float_t Bachelor_PY; Float_t Bachelor_PZ; Float_t Bachelor_MM; Float_t Bachelor_M; Int_t Bachelor_ID; Float_t Bachelor_PIDe; Float_t Bachelor_PIDmu; Float_t Bachelor_PIDK; Float_t Bachelor_PIDp; Float_t Bachelor_CaloEcalE; Float_t Bachelor_CaloHcalE; Int_t Bachelor_hasMuon; Int_t Bachelor_isMuon; Int_t Bachelor_hasRich; Int_t Bachelor_hasCalo; Int_t Bachelor_TRACK_Type; Float_t Bachelor_TRACK_CHI2NDOF; Float_t Bachelor_TRACK_PCHI2; Float_t Bachelor_TRACK_GhostProb; Float_t Bachelor_TRACK_CloneDist; Float_t D_CosTheta; Float_t D_MINIP; Float_t D_MINIPCHI2; Float_t D_OWNPV_X; Float_t D_OWNPV_Y; Float_t D_OWNPV_Z; Float_t D_OWNPV_XERR; Float_t D_OWNPV_YERR; Float_t D_OWNPV_ZERR; Float_t D_OWNPV_CHI2; Int_t D_OWNPV_NDOF; Float_t D_OWNPV_COV_[3][3]; Float_t D_IP_OWNPV; Float_t D_IPCHI2_OWNPV; Float_t D_FD_OWNPV; Float_t D_FDCHI2_OWNPV; Float_t D_DIRA_OWNPV; Float_t D_ORIVX_X; Float_t D_ORIVX_Y; Float_t D_ORIVX_Z; Float_t D_ORIVX_XERR; Float_t D_ORIVX_YERR; Float_t D_ORIVX_ZERR; Float_t D_ORIVX_CHI2; Int_t D_ORIVX_NDOF; Float_t D_ORIVX_COV_[3][3]; Float_t D_FD_ORIVX; Float_t D_FDCHI2_ORIVX; Float_t D_DIRA_ORIVX; Float_t D_ENDVERTEX_X; Float_t D_ENDVERTEX_Y; Float_t D_ENDVERTEX_Z; Float_t D_ENDVERTEX_XERR; Float_t D_ENDVERTEX_YERR; Float_t D_ENDVERTEX_ZERR; Float_t D_ENDVERTEX_CHI2; Int_t D_ENDVERTEX_NDOF; Float_t D_ENDVERTEX_COV_[3][3]; Float_t D_P; Float_t D_PT; Float_t D_PE; Float_t D_PX; Float_t D_PY; Float_t D_PZ; Float_t D_MM; Float_t D_MMERR; Float_t D_M; Int_t D_ID; Float_t Negative_D_Daughter_CosTheta; Float_t Negative_D_Daughter_MINIP; Float_t Negative_D_Daughter_MINIPCHI2; Float_t Negative_D_Daughter_OWNPV_X; Float_t Negative_D_Daughter_OWNPV_Y; Float_t Negative_D_Daughter_OWNPV_Z; Float_t Negative_D_Daughter_OWNPV_XERR; Float_t Negative_D_Daughter_OWNPV_YERR; Float_t Negative_D_Daughter_OWNPV_ZERR; Float_t Negative_D_Daughter_OWNPV_CHI2; Int_t Negative_D_Daughter_OWNPV_NDOF; Float_t Negative_D_Daughter_OWNPV_COV_[3][3]; Float_t Negative_D_Daughter_IP_OWNPV; Float_t Negative_D_Daughter_IPCHI2_OWNPV; Float_t Negative_D_Daughter_ORIVX_X; Float_t Negative_D_Daughter_ORIVX_Y; Float_t Negative_D_Daughter_ORIVX_Z; Float_t Negative_D_Daughter_ORIVX_XERR; Float_t Negative_D_Daughter_ORIVX_YERR; Float_t Negative_D_Daughter_ORIVX_ZERR; Float_t Negative_D_Daughter_ORIVX_CHI2; Int_t Negative_D_Daughter_ORIVX_NDOF; Float_t Negative_D_Daughter_ORIVX_COV_[3][3]; Float_t Negative_D_Daughter_P; Float_t Negative_D_Daughter_PT; Float_t Negative_D_Daughter_PE; Float_t Negative_D_Daughter_PX; Float_t Negative_D_Daughter_PY; Float_t Negative_D_Daughter_PZ; Float_t Negative_D_Daughter_MM; Float_t Negative_D_Daughter_M; Int_t Negative_D_Daughter_ID; Float_t Negative_D_Daughter_PIDe; Float_t Negative_D_Daughter_PIDmu; Float_t Negative_D_Daughter_PIDK; Float_t Negative_D_Daughter_PIDp; Float_t Negative_D_Daughter_CaloEcalE; Float_t Negative_D_Daughter_CaloHcalE; Int_t Negative_D_Daughter_hasMuon; Int_t Negative_D_Daughter_isMuon; Int_t Negative_D_Daughter_hasRich; Int_t Negative_D_Daughter_hasCalo; Int_t Negative_D_Daughter_TRACK_Type; Float_t Negative_D_Daughter_TRACK_CHI2NDOF; Float_t Negative_D_Daughter_TRACK_PCHI2; Float_t Negative_D_Daughter_TRACK_GhostProb; Float_t Negative_D_Daughter_TRACK_CloneDist; Float_t Positive_D_Daughter_CosTheta; Float_t Positive_D_Daughter_MINIP; Float_t Positive_D_Daughter_MINIPCHI2; Float_t Positive_D_Daughter_OWNPV_X; Float_t Positive_D_Daughter_OWNPV_Y; Float_t Positive_D_Daughter_OWNPV_Z; Float_t Positive_D_Daughter_OWNPV_XERR; Float_t Positive_D_Daughter_OWNPV_YERR; Float_t Positive_D_Daughter_OWNPV_ZERR; Float_t Positive_D_Daughter_OWNPV_CHI2; Int_t Positive_D_Daughter_OWNPV_NDOF; Float_t Positive_D_Daughter_OWNPV_COV_[3][3]; Float_t Positive_D_Daughter_IP_OWNPV; Float_t Positive_D_Daughter_IPCHI2_OWNPV; Float_t Positive_D_Daughter_ORIVX_X; Float_t Positive_D_Daughter_ORIVX_Y; Float_t Positive_D_Daughter_ORIVX_Z; Float_t Positive_D_Daughter_ORIVX_XERR; Float_t Positive_D_Daughter_ORIVX_YERR; Float_t Positive_D_Daughter_ORIVX_ZERR; Float_t Positive_D_Daughter_ORIVX_CHI2; Int_t Positive_D_Daughter_ORIVX_NDOF; Float_t Positive_D_Daughter_ORIVX_COV_[3][3]; Float_t Positive_D_Daughter_P; Float_t Positive_D_Daughter_PT; Float_t Positive_D_Daughter_PE; Float_t Positive_D_Daughter_PX; Float_t Positive_D_Daughter_PY; Float_t Positive_D_Daughter_PZ; Float_t Positive_D_Daughter_MM; Float_t Positive_D_Daughter_M; Int_t Positive_D_Daughter_ID; Float_t Positive_D_Daughter_PIDe; Float_t Positive_D_Daughter_PIDmu; Float_t Positive_D_Daughter_PIDK; Float_t Positive_D_Daughter_PIDp; Float_t Positive_D_Daughter_CaloEcalE; Float_t Positive_D_Daughter_CaloHcalE; Int_t Positive_D_Daughter_hasMuon; Int_t Positive_D_Daughter_isMuon; Int_t Positive_D_Daughter_hasRich; Int_t Positive_D_Daughter_hasCalo; Int_t Positive_D_Daughter_TRACK_Type; Float_t Positive_D_Daughter_TRACK_CHI2NDOF; Float_t Positive_D_Daughter_TRACK_PCHI2; Float_t Positive_D_Daughter_TRACK_GhostProb; Float_t Positive_D_Daughter_TRACK_CloneDist; Int_t nCandidate; Int_t totCandidates; Int_t EventInSequence; Int_t runNumber; Int_t eventNumber; Int_t BCID; Int_t OdinTCK; Int_t L0DUTCK; Int_t HLTTCK; Int_t nPV; Int_t MCPV; Float_t PVX[40]; //[nPV] Float_t PVY[40]; //[nPV] Float_t PVZ[40]; //[nPV] Float_t PVXERR[40]; //[nPV] Float_t PVYERR[40]; //[nPV] Float_t PVZERR[40]; //[nPV] Float_t PVCHI2[40]; //[nPV] Float_t PVNDOF[40]; //[nPV] Float_t PVNTRACKS[40]; //[nPV] Float_t IntegratedLuminosity; Float_t IntegratedLuminosityErr; Float_t nVelo; // List of branches TBranch *b_B_MINIP; //! TBranch *b_B_MINIPCHI2; //! TBranch *b_B_OWNPV_X; //! TBranch *b_B_OWNPV_Y; //! TBranch *b_B_OWNPV_Z; //! TBranch *b_B_OWNPV_XERR; //! TBranch *b_B_OWNPV_YERR; //! TBranch *b_B_OWNPV_ZERR; //! TBranch *b_B_OWNPV_CHI2; //! TBranch *b_B_OWNPV_NDOF; //! TBranch *b_B_OWNPV_COV_; //! TBranch *b_B_IP_OWNPV; //! TBranch *b_B_IPCHI2_OWNPV; //! TBranch *b_B_FD_OWNPV; //! TBranch *b_B_FDCHI2_OWNPV; //! TBranch *b_B_DIRA_OWNPV; //! TBranch *b_B_ENDVERTEX_X; //! TBranch *b_B_ENDVERTEX_Y; //! TBranch *b_B_ENDVERTEX_Z; //! TBranch *b_B_ENDVERTEX_XERR; //! TBranch *b_B_ENDVERTEX_YERR; //! TBranch *b_B_ENDVERTEX_ZERR; //! TBranch *b_B_ENDVERTEX_CHI2; //! TBranch *b_B_ENDVERTEX_NDOF; //! TBranch *b_B_ENDVERTEX_COV_; //! TBranch *b_B_P; //! TBranch *b_B_PT; //! TBranch *b_B_PE; //! TBranch *b_B_PX; //! TBranch *b_B_PY; //! TBranch *b_B_PZ; //! TBranch *b_B_MM; //! TBranch *b_B_MMERR; //! TBranch *b_B_M; //! TBranch *b_B_TAU; //! TBranch *b_B_ID; //! TBranch *b_Bachelor_CosTheta; //! TBranch *b_Bachelor_MINIP; //! TBranch *b_Bachelor_MINIPCHI2; //! TBranch *b_Bachelor_OWNPV_X; //! TBranch *b_Bachelor_OWNPV_Y; //! TBranch *b_Bachelor_OWNPV_Z; //! TBranch *b_Bachelor_OWNPV_XERR; //! TBranch *b_Bachelor_OWNPV_YERR; //! TBranch *b_Bachelor_OWNPV_ZERR; //! TBranch *b_Bachelor_OWNPV_CHI2; //! TBranch *b_Bachelor_OWNPV_NDOF; //! TBranch *b_Bachelor_OWNPV_COV_; //! TBranch *b_Bachelor_IP_OWNPV; //! TBranch *b_Bachelor_IPCHI2_OWNPV; //! TBranch *b_Bachelor_ORIVX_X; //! TBranch *b_Bachelor_ORIVX_Y; //! TBranch *b_Bachelor_ORIVX_Z; //! TBranch *b_Bachelor_ORIVX_XERR; //! TBranch *b_Bachelor_ORIVX_YERR; //! TBranch *b_Bachelor_ORIVX_ZERR; //! TBranch *b_Bachelor_ORIVX_CHI2; //! TBranch *b_Bachelor_ORIVX_NDOF; //! TBranch *b_Bachelor_ORIVX_COV_; //! TBranch *b_Bachelor_P; //! TBranch *b_Bachelor_PT; //! TBranch *b_Bachelor_PE; //! TBranch *b_Bachelor_PX; //! TBranch *b_Bachelor_PY; //! TBranch *b_Bachelor_PZ; //! TBranch *b_Bachelor_MM; //! TBranch *b_Bachelor_M; //! TBranch *b_Bachelor_ID; //! TBranch *b_Bachelor_PIDe; //! TBranch *b_Bachelor_PIDmu; //! TBranch *b_Bachelor_PIDK; //! TBranch *b_Bachelor_PIDp; //! TBranch *b_Bachelor_CaloEcalE; //! TBranch *b_Bachelor_CaloHcalE; //! TBranch *b_Bachelor_hasMuon; //! TBranch *b_Bachelor_isMuon; //! TBranch *b_Bachelor_hasRich; //! TBranch *b_Bachelor_hasCalo; //! TBranch *b_Bachelor_TRACK_Type; //! TBranch *b_Bachelor_TRACK_CHI2NDOF; //! TBranch *b_Bachelor_TRACK_PCHI2; //! TBranch *b_Bachelor_TRACK_GhostProb; //! TBranch *b_Bachelor_TRACK_CloneDist; //! TBranch *b_D_CosTheta; //! TBranch *b_D_MINIP; //! TBranch *b_D_MINIPCHI2; //! TBranch *b_D_OWNPV_X; //! TBranch *b_D_OWNPV_Y; //! TBranch *b_D_OWNPV_Z; //! TBranch *b_D_OWNPV_XERR; //! TBranch *b_D_OWNPV_YERR; //! TBranch *b_D_OWNPV_ZERR; //! TBranch *b_D_OWNPV_CHI2; //! TBranch *b_D_OWNPV_NDOF; //! TBranch *b_D_OWNPV_COV_; //! TBranch *b_D_IP_OWNPV; //! TBranch *b_D_IPCHI2_OWNPV; //! TBranch *b_D_FD_OWNPV; //! TBranch *b_D_FDCHI2_OWNPV; //! TBranch *b_D_DIRA_OWNPV; //! TBranch *b_D_ORIVX_X; //! TBranch *b_D_ORIVX_Y; //! TBranch *b_D_ORIVX_Z; //! TBranch *b_D_ORIVX_XERR; //! TBranch *b_D_ORIVX_YERR; //! TBranch *b_D_ORIVX_ZERR; //! TBranch *b_D_ORIVX_CHI2; //! TBranch *b_D_ORIVX_NDOF; //! TBranch *b_D_ORIVX_COV_; //! TBranch *b_D_FD_ORIVX; //! TBranch *b_D_FDCHI2_ORIVX; //! TBranch *b_D_DIRA_ORIVX; //! TBranch *b_D_ENDVERTEX_X; //! TBranch *b_D_ENDVERTEX_Y; //! TBranch *b_D_ENDVERTEX_Z; //! TBranch *b_D_ENDVERTEX_XERR; //! TBranch *b_D_ENDVERTEX_YERR; //! TBranch *b_D_ENDVERTEX_ZERR; //! TBranch *b_D_ENDVERTEX_CHI2; //! TBranch *b_D_ENDVERTEX_NDOF; //! TBranch *b_D_ENDVERTEX_COV_; //! TBranch *b_D_P; //! TBranch *b_D_PT; //! TBranch *b_D_PE; //! TBranch *b_D_PX; //! TBranch *b_D_PY; //! TBranch *b_D_PZ; //! TBranch *b_D_MM; //! TBranch *b_D_MMERR; //! TBranch *b_D_M; //! TBranch *b_D_ID; //! TBranch *b_Negative_D_Daughter_CosTheta; //! TBranch *b_Negative_D_Daughter_MINIP; //! TBranch *b_Negative_D_Daughter_MINIPCHI2; //! TBranch *b_Negative_D_Daughter_OWNPV_X; //! TBranch *b_Negative_D_Daughter_OWNPV_Y; //! TBranch *b_Negative_D_Daughter_OWNPV_Z; //! TBranch *b_Negative_D_Daughter_OWNPV_XERR; //! TBranch *b_Negative_D_Daughter_OWNPV_YERR; //! TBranch *b_Negative_D_Daughter_OWNPV_ZERR; //! TBranch *b_Negative_D_Daughter_OWNPV_CHI2; //! TBranch *b_Negative_D_Daughter_OWNPV_NDOF; //! TBranch *b_Negative_D_Daughter_OWNPV_COV_; //! TBranch *b_Negative_D_Daughter_IP_OWNPV; //! TBranch *b_Negative_D_Daughter_IPCHI2_OWNPV; //! TBranch *b_Negative_D_Daughter_ORIVX_X; //! TBranch *b_Negative_D_Daughter_ORIVX_Y; //! TBranch *b_Negative_D_Daughter_ORIVX_Z; //! TBranch *b_Negative_D_Daughter_ORIVX_XERR; //! TBranch *b_Negative_D_Daughter_ORIVX_YERR; //! TBranch *b_Negative_D_Daughter_ORIVX_ZERR; //! TBranch *b_Negative_D_Daughter_ORIVX_CHI2; //! TBranch *b_Negative_D_Daughter_ORIVX_NDOF; //! TBranch *b_Negative_D_Daughter_ORIVX_COV_; //! TBranch *b_Negative_D_Daughter_P; //! TBranch *b_Negative_D_Daughter_PT; //! TBranch *b_Negative_D_Daughter_PE; //! TBranch *b_Negative_D_Daughter_PX; //! TBranch *b_Negative_D_Daughter_PY; //! TBranch *b_Negative_D_Daughter_PZ; //! TBranch *b_Negative_D_Daughter_MM; //! TBranch *b_Negative_D_Daughter_M; //! TBranch *b_Negative_D_Daughter_ID; //! TBranch *b_Negative_D_Daughter_PIDe; //! TBranch *b_Negative_D_Daughter_PIDmu; //! TBranch *b_Negative_D_Daughter_PIDK; //! TBranch *b_Negative_D_Daughter_PIDp; //! TBranch *b_Negative_D_Daughter_CaloEcalE; //! TBranch *b_Negative_D_Daughter_CaloHcalE; //! TBranch *b_Negative_D_Daughter_hasMuon; //! TBranch *b_Negative_D_Daughter_isMuon; //! TBranch *b_Negative_D_Daughter_hasRich; //! TBranch *b_Negative_D_Daughter_hasCalo; //! TBranch *b_Negative_D_Daughter_TRACK_Type; //! TBranch *b_Negative_D_Daughter_TRACK_CHI2NDOF; //! TBranch *b_Negative_D_Daughter_TRACK_PCHI2; //! TBranch *b_Negative_D_Daughter_TRACK_GhostProb; //! TBranch *b_Negative_D_Daughter_TRACK_CloneDist; //! TBranch *b_Positive_D_Daughter_CosTheta; //! TBranch *b_Positive_D_Daughter_MINIP; //! TBranch *b_Positive_D_Daughter_MINIPCHI2; //! TBranch *b_Positive_D_Daughter_OWNPV_X; //! TBranch *b_Positive_D_Daughter_OWNPV_Y; //! TBranch *b_Positive_D_Daughter_OWNPV_Z; //! TBranch *b_Positive_D_Daughter_OWNPV_XERR; //! TBranch *b_Positive_D_Daughter_OWNPV_YERR; //! TBranch *b_Positive_D_Daughter_OWNPV_ZERR; //! TBranch *b_Positive_D_Daughter_OWNPV_CHI2; //! TBranch *b_Positive_D_Daughter_OWNPV_NDOF; //! TBranch *b_Positive_D_Daughter_OWNPV_COV_; //! TBranch *b_Positive_D_Daughter_IP_OWNPV; //! TBranch *b_Positive_D_Daughter_IPCHI2_OWNPV; //! TBranch *b_Positive_D_Daughter_ORIVX_X; //! TBranch *b_Positive_D_Daughter_ORIVX_Y; //! TBranch *b_Positive_D_Daughter_ORIVX_Z; //! TBranch *b_Positive_D_Daughter_ORIVX_XERR; //! TBranch *b_Positive_D_Daughter_ORIVX_YERR; //! TBranch *b_Positive_D_Daughter_ORIVX_ZERR; //! TBranch *b_Positive_D_Daughter_ORIVX_CHI2; //! TBranch *b_Positive_D_Daughter_ORIVX_NDOF; //! TBranch *b_Positive_D_Daughter_ORIVX_COV_; //! TBranch *b_Positive_D_Daughter_P; //! TBranch *b_Positive_D_Daughter_PT; //! TBranch *b_Positive_D_Daughter_PE; //! TBranch *b_Positive_D_Daughter_PX; //! TBranch *b_Positive_D_Daughter_PY; //! TBranch *b_Positive_D_Daughter_PZ; //! TBranch *b_Positive_D_Daughter_MM; //! TBranch *b_Positive_D_Daughter_M; //! TBranch *b_Positive_D_Daughter_ID; //! TBranch *b_Positive_D_Daughter_PIDe; //! TBranch *b_Positive_D_Daughter_PIDmu; //! TBranch *b_Positive_D_Daughter_PIDK; //! TBranch *b_Positive_D_Daughter_PIDp; //! TBranch *b_Positive_D_Daughter_CaloEcalE; //! TBranch *b_Positive_D_Daughter_CaloHcalE; //! TBranch *b_Positive_D_Daughter_hasMuon; //! TBranch *b_Positive_D_Daughter_isMuon; //! TBranch *b_Positive_D_Daughter_hasRich; //! TBranch *b_Positive_D_Daughter_hasCalo; //! TBranch *b_Positive_D_Daughter_TRACK_Type; //! TBranch *b_Positive_D_Daughter_TRACK_CHI2NDOF; //! TBranch *b_Positive_D_Daughter_TRACK_PCHI2; //! TBranch *b_Positive_D_Daughter_TRACK_GhostProb; //! TBranch *b_Positive_D_Daughter_TRACK_CloneDist; //! TBranch *b_nCandidate; //! TBranch *b_totCandidates; //! TBranch *b_EventInSequence; //! TBranch *b_runNumber; //! TBranch *b_eventNumber; //! TBranch *b_BCID; //! TBranch *b_OdinTCK; //! TBranch *b_L0DUTCK; //! TBranch *b_HLTTCK; //! TBranch *b_nPV; //! TBranch *b_MCPV; TBranch *b_PVX; //! TBranch *b_PVY; //! TBranch *b_PVZ; //! TBranch *b_PVXERR; //! TBranch *b_PVYERR; //! TBranch *b_PVZERR; //! TBranch *b_PVCHI2; //! TBranch *b_PVNDOF; //! TBranch *b_PVNTRACKS; //! TBranch *b_IntegratedLuminosity; TBranch *b_IntegratedLuminosityErr; TBranch *b_nVelo; fChain->SetBranchAddress("B_MINIP", &B_MINIP, &b_B_MINIP); fChain->SetBranchAddress("B_MINIPCHI2", &B_MINIPCHI2, &b_B_MINIPCHI2); fChain->SetBranchAddress("B_OWNPV_X", &B_OWNPV_X, &b_B_OWNPV_X); fChain->SetBranchAddress("B_OWNPV_Y", &B_OWNPV_Y, &b_B_OWNPV_Y); fChain->SetBranchAddress("B_OWNPV_Z", &B_OWNPV_Z, &b_B_OWNPV_Z); fChain->SetBranchAddress("B_OWNPV_XERR", &B_OWNPV_XERR, &b_B_OWNPV_XERR); fChain->SetBranchAddress("B_OWNPV_YERR", &B_OWNPV_YERR, &b_B_OWNPV_YERR); fChain->SetBranchAddress("B_OWNPV_ZERR", &B_OWNPV_ZERR, &b_B_OWNPV_ZERR); fChain->SetBranchAddress("B_OWNPV_CHI2", &B_OWNPV_CHI2, &b_B_OWNPV_CHI2); fChain->SetBranchAddress("B_OWNPV_NDOF", &B_OWNPV_NDOF, &b_B_OWNPV_NDOF); fChain->SetBranchAddress("B_OWNPV_COV_", B_OWNPV_COV_, &b_B_OWNPV_COV_); fChain->SetBranchAddress("B_IP_OWNPV", &B_IP_OWNPV, &b_B_IP_OWNPV); fChain->SetBranchAddress("B_IPCHI2_OWNPV", &B_IPCHI2_OWNPV, &b_B_IPCHI2_OWNPV); fChain->SetBranchAddress("B_FD_OWNPV", &B_FD_OWNPV, &b_B_FD_OWNPV); fChain->SetBranchAddress("B_FDCHI2_OWNPV", &B_FDCHI2_OWNPV, &b_B_FDCHI2_OWNPV); fChain->SetBranchAddress("B_DIRA_OWNPV", &B_DIRA_OWNPV, &b_B_DIRA_OWNPV); fChain->SetBranchAddress("B_ENDVERTEX_X", &B_ENDVERTEX_X, &b_B_ENDVERTEX_X); fChain->SetBranchAddress("B_ENDVERTEX_Y", &B_ENDVERTEX_Y, &b_B_ENDVERTEX_Y); fChain->SetBranchAddress("B_ENDVERTEX_Z", &B_ENDVERTEX_Z, &b_B_ENDVERTEX_Z); fChain->SetBranchAddress("B_ENDVERTEX_XERR", &B_ENDVERTEX_XERR, &b_B_ENDVERTEX_XERR); fChain->SetBranchAddress("B_ENDVERTEX_YERR", &B_ENDVERTEX_YERR, &b_B_ENDVERTEX_YERR); fChain->SetBranchAddress("B_ENDVERTEX_ZERR", &B_ENDVERTEX_ZERR, &b_B_ENDVERTEX_ZERR); fChain->SetBranchAddress("B_ENDVERTEX_CHI2", &B_ENDVERTEX_CHI2, &b_B_ENDVERTEX_CHI2); fChain->SetBranchAddress("B_ENDVERTEX_NDOF", &B_ENDVERTEX_NDOF, &b_B_ENDVERTEX_NDOF); fChain->SetBranchAddress("B_ENDVERTEX_COV_", B_ENDVERTEX_COV_, &b_B_ENDVERTEX_COV_); fChain->SetBranchAddress("B_P", &B_P, &b_B_P); fChain->SetBranchAddress("B_PT", &B_PT, &b_B_PT); fChain->SetBranchAddress("B_PE", &B_PE, &b_B_PE); fChain->SetBranchAddress("B_PX", &B_PX, &b_B_PX); fChain->SetBranchAddress("B_PY", &B_PY, &b_B_PY); fChain->SetBranchAddress("B_PZ", &B_PZ, &b_B_PZ); fChain->SetBranchAddress("B_MM", &B_MM, &b_B_MM); fChain->SetBranchAddress("B_MMERR", &B_MMERR, &b_B_MMERR); fChain->SetBranchAddress("B_M", &B_M, &b_B_M); fChain->SetBranchAddress("B_TAU", &B_TAU, &b_B_TAU); fChain->SetBranchAddress("B_ID", &B_ID, &b_B_ID); fChain->SetBranchAddress("Bachelor_CosTheta", &Bachelor_CosTheta, &b_Bachelor_CosTheta); fChain->SetBranchAddress("Bachelor_MINIP", &Bachelor_MINIP, &b_Bachelor_MINIP); fChain->SetBranchAddress("Bachelor_MINIPCHI2", &Bachelor_MINIPCHI2, &b_Bachelor_MINIPCHI2); fChain->SetBranchAddress("Bachelor_OWNPV_X", &Bachelor_OWNPV_X, &b_Bachelor_OWNPV_X); fChain->SetBranchAddress("Bachelor_OWNPV_Y", &Bachelor_OWNPV_Y, &b_Bachelor_OWNPV_Y); fChain->SetBranchAddress("Bachelor_OWNPV_Z", &Bachelor_OWNPV_Z, &b_Bachelor_OWNPV_Z); fChain->SetBranchAddress("Bachelor_OWNPV_XERR", &Bachelor_OWNPV_XERR, &b_Bachelor_OWNPV_XERR); fChain->SetBranchAddress("Bachelor_OWNPV_YERR", &Bachelor_OWNPV_YERR, &b_Bachelor_OWNPV_YERR); fChain->SetBranchAddress("Bachelor_OWNPV_ZERR", &Bachelor_OWNPV_ZERR, &b_Bachelor_OWNPV_ZERR); fChain->SetBranchAddress("Bachelor_OWNPV_CHI2", &Bachelor_OWNPV_CHI2, &b_Bachelor_OWNPV_CHI2); fChain->SetBranchAddress("Bachelor_OWNPV_NDOF", &Bachelor_OWNPV_NDOF, &b_Bachelor_OWNPV_NDOF); fChain->SetBranchAddress("Bachelor_OWNPV_COV_", Bachelor_OWNPV_COV_, &b_Bachelor_OWNPV_COV_); fChain->SetBranchAddress("Bachelor_IP_OWNPV", &Bachelor_IP_OWNPV, &b_Bachelor_IP_OWNPV); fChain->SetBranchAddress("Bachelor_IPCHI2_OWNPV", &Bachelor_IPCHI2_OWNPV, &b_Bachelor_IPCHI2_OWNPV); fChain->SetBranchAddress("Bachelor_ORIVX_X", &Bachelor_ORIVX_X, &b_Bachelor_ORIVX_X); fChain->SetBranchAddress("Bachelor_ORIVX_Y", &Bachelor_ORIVX_Y, &b_Bachelor_ORIVX_Y); fChain->SetBranchAddress("Bachelor_ORIVX_Z", &Bachelor_ORIVX_Z, &b_Bachelor_ORIVX_Z); fChain->SetBranchAddress("Bachelor_ORIVX_XERR", &Bachelor_ORIVX_XERR, &b_Bachelor_ORIVX_XERR); fChain->SetBranchAddress("Bachelor_ORIVX_YERR", &Bachelor_ORIVX_YERR, &b_Bachelor_ORIVX_YERR); fChain->SetBranchAddress("Bachelor_ORIVX_ZERR", &Bachelor_ORIVX_ZERR, &b_Bachelor_ORIVX_ZERR); fChain->SetBranchAddress("Bachelor_ORIVX_CHI2", &Bachelor_ORIVX_CHI2, &b_Bachelor_ORIVX_CHI2); fChain->SetBranchAddress("Bachelor_ORIVX_NDOF", &Bachelor_ORIVX_NDOF, &b_Bachelor_ORIVX_NDOF); fChain->SetBranchAddress("Bachelor_ORIVX_COV_", Bachelor_ORIVX_COV_, &b_Bachelor_ORIVX_COV_); fChain->SetBranchAddress("Bachelor_P", &Bachelor_P, &b_Bachelor_P); fChain->SetBranchAddress("Bachelor_PT", &Bachelor_PT, &b_Bachelor_PT); fChain->SetBranchAddress("Bachelor_PE", &Bachelor_PE, &b_Bachelor_PE); fChain->SetBranchAddress("Bachelor_PX", &Bachelor_PX, &b_Bachelor_PX); fChain->SetBranchAddress("Bachelor_PY", &Bachelor_PY, &b_Bachelor_PY); fChain->SetBranchAddress("Bachelor_PZ", &Bachelor_PZ, &b_Bachelor_PZ); fChain->SetBranchAddress("Bachelor_MM", &Bachelor_MM, &b_Bachelor_MM); fChain->SetBranchAddress("Bachelor_M", &Bachelor_M, &b_Bachelor_M); fChain->SetBranchAddress("Bachelor_ID", &Bachelor_ID, &b_Bachelor_ID); fChain->SetBranchAddress("Bachelor_PIDe", &Bachelor_PIDe, &b_Bachelor_PIDe); fChain->SetBranchAddress("Bachelor_PIDmu", &Bachelor_PIDmu, &b_Bachelor_PIDmu); fChain->SetBranchAddress("Bachelor_PIDK", &Bachelor_PIDK, &b_Bachelor_PIDK); fChain->SetBranchAddress("Bachelor_PIDp", &Bachelor_PIDp, &b_Bachelor_PIDp); fChain->SetBranchAddress("Bachelor_CaloEcalE", &Bachelor_CaloEcalE, &b_Bachelor_CaloEcalE); fChain->SetBranchAddress("Bachelor_CaloHcalE", &Bachelor_CaloHcalE, &b_Bachelor_CaloHcalE); fChain->SetBranchAddress("Bachelor_hasMuon", &Bachelor_hasMuon, &b_Bachelor_hasMuon); fChain->SetBranchAddress("Bachelor_isMuon", &Bachelor_isMuon, &b_Bachelor_isMuon); fChain->SetBranchAddress("Bachelor_hasRich", &Bachelor_hasRich, &b_Bachelor_hasRich); fChain->SetBranchAddress("Bachelor_hasCalo", &Bachelor_hasCalo, &b_Bachelor_hasCalo); fChain->SetBranchAddress("Bachelor_TRACK_Type", &Bachelor_TRACK_Type, &b_Bachelor_TRACK_Type); fChain->SetBranchAddress("Bachelor_TRACK_CHI2NDOF", &Bachelor_TRACK_CHI2NDOF, &b_Bachelor_TRACK_CHI2NDOF); fChain->SetBranchAddress("Bachelor_TRACK_PCHI2", &Bachelor_TRACK_PCHI2, &b_Bachelor_TRACK_PCHI2); fChain->SetBranchAddress("Bachelor_TRACK_GhostProb", &Bachelor_TRACK_GhostProb, &b_Bachelor_TRACK_GhostProb); fChain->SetBranchAddress("Bachelor_TRACK_CloneDist", &Bachelor_TRACK_CloneDist, &b_Bachelor_TRACK_CloneDist); fChain->SetBranchAddress("D_CosTheta", &D_CosTheta, &b_D_CosTheta); fChain->SetBranchAddress("D_MINIP", &D_MINIP, &b_D_MINIP); fChain->SetBranchAddress("D_MINIPCHI2", &D_MINIPCHI2, &b_D_MINIPCHI2); fChain->SetBranchAddress("D_OWNPV_X", &D_OWNPV_X, &b_D_OWNPV_X); fChain->SetBranchAddress("D_OWNPV_Y", &D_OWNPV_Y, &b_D_OWNPV_Y); fChain->SetBranchAddress("D_OWNPV_Z", &D_OWNPV_Z, &b_D_OWNPV_Z); fChain->SetBranchAddress("D_OWNPV_XERR", &D_OWNPV_XERR, &b_D_OWNPV_XERR); fChain->SetBranchAddress("D_OWNPV_YERR", &D_OWNPV_YERR, &b_D_OWNPV_YERR); fChain->SetBranchAddress("D_OWNPV_ZERR", &D_OWNPV_ZERR, &b_D_OWNPV_ZERR); fChain->SetBranchAddress("D_OWNPV_CHI2", &D_OWNPV_CHI2, &b_D_OWNPV_CHI2); fChain->SetBranchAddress("D_OWNPV_NDOF", &D_OWNPV_NDOF, &b_D_OWNPV_NDOF); fChain->SetBranchAddress("D_OWNPV_COV_", D_OWNPV_COV_, &b_D_OWNPV_COV_); fChain->SetBranchAddress("D_IP_OWNPV", &D_IP_OWNPV, &b_D_IP_OWNPV); fChain->SetBranchAddress("D_IPCHI2_OWNPV", &D_IPCHI2_OWNPV, &b_D_IPCHI2_OWNPV); fChain->SetBranchAddress("D_FD_OWNPV", &D_FD_OWNPV, &b_D_FD_OWNPV); fChain->SetBranchAddress("D_FDCHI2_OWNPV", &D_FDCHI2_OWNPV, &b_D_FDCHI2_OWNPV); fChain->SetBranchAddress("D_DIRA_OWNPV", &D_DIRA_OWNPV, &b_D_DIRA_OWNPV); fChain->SetBranchAddress("D_ORIVX_X", &D_ORIVX_X, &b_D_ORIVX_X); fChain->SetBranchAddress("D_ORIVX_Y", &D_ORIVX_Y, &b_D_ORIVX_Y); fChain->SetBranchAddress("D_ORIVX_Z", &D_ORIVX_Z, &b_D_ORIVX_Z); fChain->SetBranchAddress("D_ORIVX_XERR", &D_ORIVX_XERR, &b_D_ORIVX_XERR); fChain->SetBranchAddress("D_ORIVX_YERR", &D_ORIVX_YERR, &b_D_ORIVX_YERR); fChain->SetBranchAddress("D_ORIVX_ZERR", &D_ORIVX_ZERR, &b_D_ORIVX_ZERR); fChain->SetBranchAddress("D_ORIVX_CHI2", &D_ORIVX_CHI2, &b_D_ORIVX_CHI2); fChain->SetBranchAddress("D_ORIVX_NDOF", &D_ORIVX_NDOF, &b_D_ORIVX_NDOF); fChain->SetBranchAddress("D_ORIVX_COV_", D_ORIVX_COV_, &b_D_ORIVX_COV_); fChain->SetBranchAddress("D_FD_ORIVX", &D_FD_ORIVX, &b_D_FD_ORIVX); fChain->SetBranchAddress("D_FDCHI2_ORIVX", &D_FDCHI2_ORIVX, &b_D_FDCHI2_ORIVX); fChain->SetBranchAddress("D_DIRA_ORIVX", &D_DIRA_ORIVX, &b_D_DIRA_ORIVX); fChain->SetBranchAddress("D_ENDVERTEX_X", &D_ENDVERTEX_X, &b_D_ENDVERTEX_X); fChain->SetBranchAddress("D_ENDVERTEX_Y", &D_ENDVERTEX_Y, &b_D_ENDVERTEX_Y); fChain->SetBranchAddress("D_ENDVERTEX_Z", &D_ENDVERTEX_Z, &b_D_ENDVERTEX_Z); fChain->SetBranchAddress("D_ENDVERTEX_XERR", &D_ENDVERTEX_XERR, &b_D_ENDVERTEX_XERR); fChain->SetBranchAddress("D_ENDVERTEX_YERR", &D_ENDVERTEX_YERR, &b_D_ENDVERTEX_YERR); fChain->SetBranchAddress("D_ENDVERTEX_ZERR", &D_ENDVERTEX_ZERR, &b_D_ENDVERTEX_ZERR); fChain->SetBranchAddress("D_ENDVERTEX_CHI2", &D_ENDVERTEX_CHI2, &b_D_ENDVERTEX_CHI2); fChain->SetBranchAddress("D_ENDVERTEX_NDOF", &D_ENDVERTEX_NDOF, &b_D_ENDVERTEX_NDOF); fChain->SetBranchAddress("D_ENDVERTEX_COV_", D_ENDVERTEX_COV_, &b_D_ENDVERTEX_COV_); fChain->SetBranchAddress("D_P", &D_P, &b_D_P); fChain->SetBranchAddress("D_PT", &D_PT, &b_D_PT); fChain->SetBranchAddress("D_PE", &D_PE, &b_D_PE); fChain->SetBranchAddress("D_PX", &D_PX, &b_D_PX); fChain->SetBranchAddress("D_PY", &D_PY, &b_D_PY); fChain->SetBranchAddress("D_PZ", &D_PZ, &b_D_PZ); fChain->SetBranchAddress("D_MM", &D_MM, &b_D_MM); fChain->SetBranchAddress("D_MMERR", &D_MMERR, &b_D_MMERR); fChain->SetBranchAddress("D_M", &D_M, &b_D_M); fChain->SetBranchAddress("D_ID", &D_ID, &b_D_ID); fChain->SetBranchAddress("Negative_D_Daughter_CosTheta", &Negative_D_Daughter_CosTheta, &b_Negative_D_Daughter_CosTheta); fChain->SetBranchAddress("Negative_D_Daughter_MINIP", &Negative_D_Daughter_MINIP, &b_Negative_D_Daughter_MINIP); fChain->SetBranchAddress("Negative_D_Daughter_MINIPCHI2", &Negative_D_Daughter_MINIPCHI2, &b_Negative_D_Daughter_MINIPCHI2); fChain->SetBranchAddress("Negative_D_Daughter_OWNPV_X", &Negative_D_Daughter_OWNPV_X, &b_Negative_D_Daughter_OWNPV_X); fChain->SetBranchAddress("Negative_D_Daughter_OWNPV_Y", &Negative_D_Daughter_OWNPV_Y, &b_Negative_D_Daughter_OWNPV_Y); fChain->SetBranchAddress("Negative_D_Daughter_OWNPV_Z", &Negative_D_Daughter_OWNPV_Z, &b_Negative_D_Daughter_OWNPV_Z); fChain->SetBranchAddress("Negative_D_Daughter_OWNPV_XERR", &Negative_D_Daughter_OWNPV_XERR, &b_Negative_D_Daughter_OWNPV_XERR); fChain->SetBranchAddress("Negative_D_Daughter_OWNPV_YERR", &Negative_D_Daughter_OWNPV_YERR, &b_Negative_D_Daughter_OWNPV_YERR); fChain->SetBranchAddress("Negative_D_Daughter_OWNPV_ZERR", &Negative_D_Daughter_OWNPV_ZERR, &b_Negative_D_Daughter_OWNPV_ZERR); fChain->SetBranchAddress("Negative_D_Daughter_OWNPV_CHI2", &Negative_D_Daughter_OWNPV_CHI2, &b_Negative_D_Daughter_OWNPV_CHI2); fChain->SetBranchAddress("Negative_D_Daughter_OWNPV_NDOF", &Negative_D_Daughter_OWNPV_NDOF, &b_Negative_D_Daughter_OWNPV_NDOF); fChain->SetBranchAddress("Negative_D_Daughter_OWNPV_COV_", Negative_D_Daughter_OWNPV_COV_, &b_Negative_D_Daughter_OWNPV_COV_); fChain->SetBranchAddress("Negative_D_Daughter_IP_OWNPV", &Negative_D_Daughter_IP_OWNPV, &b_Negative_D_Daughter_IP_OWNPV); fChain->SetBranchAddress("Negative_D_Daughter_IPCHI2_OWNPV", &Negative_D_Daughter_IPCHI2_OWNPV, &b_Negative_D_Daughter_IPCHI2_OWNPV); fChain->SetBranchAddress("Negative_D_Daughter_ORIVX_X", &Negative_D_Daughter_ORIVX_X, &b_Negative_D_Daughter_ORIVX_X); fChain->SetBranchAddress("Negative_D_Daughter_ORIVX_Y", &Negative_D_Daughter_ORIVX_Y, &b_Negative_D_Daughter_ORIVX_Y); fChain->SetBranchAddress("Negative_D_Daughter_ORIVX_Z", &Negative_D_Daughter_ORIVX_Z, &b_Negative_D_Daughter_ORIVX_Z); fChain->SetBranchAddress("Negative_D_Daughter_ORIVX_XERR", &Negative_D_Daughter_ORIVX_XERR, &b_Negative_D_Daughter_ORIVX_XERR); fChain->SetBranchAddress("Negative_D_Daughter_ORIVX_YERR", &Negative_D_Daughter_ORIVX_YERR, &b_Negative_D_Daughter_ORIVX_YERR); fChain->SetBranchAddress("Negative_D_Daughter_ORIVX_ZERR", &Negative_D_Daughter_ORIVX_ZERR, &b_Negative_D_Daughter_ORIVX_ZERR); fChain->SetBranchAddress("Negative_D_Daughter_ORIVX_CHI2", &Negative_D_Daughter_ORIVX_CHI2, &b_Negative_D_Daughter_ORIVX_CHI2); fChain->SetBranchAddress("Negative_D_Daughter_ORIVX_NDOF", &Negative_D_Daughter_ORIVX_NDOF, &b_Negative_D_Daughter_ORIVX_NDOF); fChain->SetBranchAddress("Negative_D_Daughter_ORIVX_COV_", Negative_D_Daughter_ORIVX_COV_, &b_Negative_D_Daughter_ORIVX_COV_); fChain->SetBranchAddress("Negative_D_Daughter_P", &Negative_D_Daughter_P, &b_Negative_D_Daughter_P); fChain->SetBranchAddress("Negative_D_Daughter_PT", &Negative_D_Daughter_PT, &b_Negative_D_Daughter_PT); fChain->SetBranchAddress("Negative_D_Daughter_PE", &Negative_D_Daughter_PE, &b_Negative_D_Daughter_PE); fChain->SetBranchAddress("Negative_D_Daughter_PX", &Negative_D_Daughter_PX, &b_Negative_D_Daughter_PX); fChain->SetBranchAddress("Negative_D_Daughter_PY", &Negative_D_Daughter_PY, &b_Negative_D_Daughter_PY); fChain->SetBranchAddress("Negative_D_Daughter_PZ", &Negative_D_Daughter_PZ, &b_Negative_D_Daughter_PZ); fChain->SetBranchAddress("Negative_D_Daughter_MM", &Negative_D_Daughter_MM, &b_Negative_D_Daughter_MM); fChain->SetBranchAddress("Negative_D_Daughter_M", &Negative_D_Daughter_M, &b_Negative_D_Daughter_M); fChain->SetBranchAddress("Negative_D_Daughter_ID", &Negative_D_Daughter_ID, &b_Negative_D_Daughter_ID); fChain->SetBranchAddress("Negative_D_Daughter_PIDe", &Negative_D_Daughter_PIDe, &b_Negative_D_Daughter_PIDe); fChain->SetBranchAddress("Negative_D_Daughter_PIDmu", &Negative_D_Daughter_PIDmu, &b_Negative_D_Daughter_PIDmu); fChain->SetBranchAddress("Negative_D_Daughter_PIDK", &Negative_D_Daughter_PIDK, &b_Negative_D_Daughter_PIDK); fChain->SetBranchAddress("Negative_D_Daughter_PIDp", &Negative_D_Daughter_PIDp, &b_Negative_D_Daughter_PIDp); fChain->SetBranchAddress("Negative_D_Daughter_CaloEcalE", &Negative_D_Daughter_CaloEcalE, &b_Negative_D_Daughter_CaloEcalE); fChain->SetBranchAddress("Negative_D_Daughter_CaloHcalE", &Negative_D_Daughter_CaloHcalE, &b_Negative_D_Daughter_CaloHcalE); fChain->SetBranchAddress("Negative_D_Daughter_hasMuon", &Negative_D_Daughter_hasMuon, &b_Negative_D_Daughter_hasMuon); fChain->SetBranchAddress("Negative_D_Daughter_isMuon", &Negative_D_Daughter_isMuon, &b_Negative_D_Daughter_isMuon); fChain->SetBranchAddress("Negative_D_Daughter_hasRich", &Negative_D_Daughter_hasRich, &b_Negative_D_Daughter_hasRich); fChain->SetBranchAddress("Negative_D_Daughter_hasCalo", &Negative_D_Daughter_hasCalo, &b_Negative_D_Daughter_hasCalo); fChain->SetBranchAddress("Negative_D_Daughter_TRACK_Type", &Negative_D_Daughter_TRACK_Type, &b_Negative_D_Daughter_TRACK_Type); fChain->SetBranchAddress("Negative_D_Daughter_TRACK_CHI2NDOF", &Negative_D_Daughter_TRACK_CHI2NDOF, &b_Negative_D_Daughter_TRACK_CHI2NDOF); fChain->SetBranchAddress("Negative_D_Daughter_TRACK_PCHI2", &Negative_D_Daughter_TRACK_PCHI2, &b_Negative_D_Daughter_TRACK_PCHI2); fChain->SetBranchAddress("Negative_D_Daughter_TRACK_GhostProb", &Negative_D_Daughter_TRACK_GhostProb, &b_Negative_D_Daughter_TRACK_GhostProb); fChain->SetBranchAddress("Negative_D_Daughter_TRACK_CloneDist", &Negative_D_Daughter_TRACK_CloneDist, &b_Negative_D_Daughter_TRACK_CloneDist); fChain->SetBranchAddress("Positive_D_Daughter_CosTheta", &Positive_D_Daughter_CosTheta, &b_Positive_D_Daughter_CosTheta); fChain->SetBranchAddress("Positive_D_Daughter_MINIP", &Positive_D_Daughter_MINIP, &b_Positive_D_Daughter_MINIP); fChain->SetBranchAddress("Positive_D_Daughter_MINIPCHI2", &Positive_D_Daughter_MINIPCHI2, &b_Positive_D_Daughter_MINIPCHI2); fChain->SetBranchAddress("Positive_D_Daughter_OWNPV_X", &Positive_D_Daughter_OWNPV_X, &b_Positive_D_Daughter_OWNPV_X); fChain->SetBranchAddress("Positive_D_Daughter_OWNPV_Y", &Positive_D_Daughter_OWNPV_Y, &b_Positive_D_Daughter_OWNPV_Y); fChain->SetBranchAddress("Positive_D_Daughter_OWNPV_Z", &Positive_D_Daughter_OWNPV_Z, &b_Positive_D_Daughter_OWNPV_Z); fChain->SetBranchAddress("Positive_D_Daughter_OWNPV_XERR", &Positive_D_Daughter_OWNPV_XERR, &b_Positive_D_Daughter_OWNPV_XERR); fChain->SetBranchAddress("Positive_D_Daughter_OWNPV_YERR", &Positive_D_Daughter_OWNPV_YERR, &b_Positive_D_Daughter_OWNPV_YERR); fChain->SetBranchAddress("Positive_D_Daughter_OWNPV_ZERR", &Positive_D_Daughter_OWNPV_ZERR, &b_Positive_D_Daughter_OWNPV_ZERR); fChain->SetBranchAddress("Positive_D_Daughter_OWNPV_CHI2", &Positive_D_Daughter_OWNPV_CHI2, &b_Positive_D_Daughter_OWNPV_CHI2); fChain->SetBranchAddress("Positive_D_Daughter_OWNPV_NDOF", &Positive_D_Daughter_OWNPV_NDOF, &b_Positive_D_Daughter_OWNPV_NDOF); fChain->SetBranchAddress("Positive_D_Daughter_OWNPV_COV_", Positive_D_Daughter_OWNPV_COV_, &b_Positive_D_Daughter_OWNPV_COV_); fChain->SetBranchAddress("Positive_D_Daughter_IP_OWNPV", &Positive_D_Daughter_IP_OWNPV, &b_Positive_D_Daughter_IP_OWNPV); fChain->SetBranchAddress("Positive_D_Daughter_IPCHI2_OWNPV", &Positive_D_Daughter_IPCHI2_OWNPV, &b_Positive_D_Daughter_IPCHI2_OWNPV); fChain->SetBranchAddress("Positive_D_Daughter_ORIVX_X", &Positive_D_Daughter_ORIVX_X, &b_Positive_D_Daughter_ORIVX_X); fChain->SetBranchAddress("Positive_D_Daughter_ORIVX_Y", &Positive_D_Daughter_ORIVX_Y, &b_Positive_D_Daughter_ORIVX_Y); fChain->SetBranchAddress("Positive_D_Daughter_ORIVX_Z", &Positive_D_Daughter_ORIVX_Z, &b_Positive_D_Daughter_ORIVX_Z); fChain->SetBranchAddress("Positive_D_Daughter_ORIVX_XERR", &Positive_D_Daughter_ORIVX_XERR, &b_Positive_D_Daughter_ORIVX_XERR); fChain->SetBranchAddress("Positive_D_Daughter_ORIVX_YERR", &Positive_D_Daughter_ORIVX_YERR, &b_Positive_D_Daughter_ORIVX_YERR); fChain->SetBranchAddress("Positive_D_Daughter_ORIVX_ZERR", &Positive_D_Daughter_ORIVX_ZERR, &b_Positive_D_Daughter_ORIVX_ZERR); fChain->SetBranchAddress("Positive_D_Daughter_ORIVX_CHI2", &Positive_D_Daughter_ORIVX_CHI2, &b_Positive_D_Daughter_ORIVX_CHI2); fChain->SetBranchAddress("Positive_D_Daughter_ORIVX_NDOF", &Positive_D_Daughter_ORIVX_NDOF, &b_Positive_D_Daughter_ORIVX_NDOF); fChain->SetBranchAddress("Positive_D_Daughter_ORIVX_COV_", Positive_D_Daughter_ORIVX_COV_, &b_Positive_D_Daughter_ORIVX_COV_); fChain->SetBranchAddress("Positive_D_Daughter_P", &Positive_D_Daughter_P, &b_Positive_D_Daughter_P); fChain->SetBranchAddress("Positive_D_Daughter_PT", &Positive_D_Daughter_PT, &b_Positive_D_Daughter_PT); fChain->SetBranchAddress("Positive_D_Daughter_PE", &Positive_D_Daughter_PE, &b_Positive_D_Daughter_PE); fChain->SetBranchAddress("Positive_D_Daughter_PX", &Positive_D_Daughter_PX, &b_Positive_D_Daughter_PX); fChain->SetBranchAddress("Positive_D_Daughter_PY", &Positive_D_Daughter_PY, &b_Positive_D_Daughter_PY); fChain->SetBranchAddress("Positive_D_Daughter_PZ", &Positive_D_Daughter_PZ, &b_Positive_D_Daughter_PZ); fChain->SetBranchAddress("Positive_D_Daughter_MM", &Positive_D_Daughter_MM, &b_Positive_D_Daughter_MM); fChain->SetBranchAddress("Positive_D_Daughter_M", &Positive_D_Daughter_M, &b_Positive_D_Daughter_M); fChain->SetBranchAddress("Positive_D_Daughter_ID", &Positive_D_Daughter_ID, &b_Positive_D_Daughter_ID); fChain->SetBranchAddress("Positive_D_Daughter_PIDe", &Positive_D_Daughter_PIDe, &b_Positive_D_Daughter_PIDe); fChain->SetBranchAddress("Positive_D_Daughter_PIDmu", &Positive_D_Daughter_PIDmu, &b_Positive_D_Daughter_PIDmu); fChain->SetBranchAddress("Positive_D_Daughter_PIDK", &Positive_D_Daughter_PIDK, &b_Positive_D_Daughter_PIDK); fChain->SetBranchAddress("Positive_D_Daughter_PIDp", &Positive_D_Daughter_PIDp, &b_Positive_D_Daughter_PIDp); fChain->SetBranchAddress("Positive_D_Daughter_CaloEcalE", &Positive_D_Daughter_CaloEcalE, &b_Positive_D_Daughter_CaloEcalE); fChain->SetBranchAddress("Positive_D_Daughter_CaloHcalE", &Positive_D_Daughter_CaloHcalE, &b_Positive_D_Daughter_CaloHcalE); fChain->SetBranchAddress("Positive_D_Daughter_hasMuon", &Positive_D_Daughter_hasMuon, &b_Positive_D_Daughter_hasMuon); fChain->SetBranchAddress("Positive_D_Daughter_isMuon", &Positive_D_Daughter_isMuon, &b_Positive_D_Daughter_isMuon); fChain->SetBranchAddress("Positive_D_Daughter_hasRich", &Positive_D_Daughter_hasRich, &b_Positive_D_Daughter_hasRich); fChain->SetBranchAddress("Positive_D_Daughter_hasCalo", &Positive_D_Daughter_hasCalo, &b_Positive_D_Daughter_hasCalo); fChain->SetBranchAddress("Positive_D_Daughter_TRACK_Type", &Positive_D_Daughter_TRACK_Type, &b_Positive_D_Daughter_TRACK_Type); fChain->SetBranchAddress("Positive_D_Daughter_TRACK_CHI2NDOF", &Positive_D_Daughter_TRACK_CHI2NDOF, &b_Positive_D_Daughter_TRACK_CHI2NDOF); fChain->SetBranchAddress("Positive_D_Daughter_TRACK_PCHI2", &Positive_D_Daughter_TRACK_PCHI2, &b_Positive_D_Daughter_TRACK_PCHI2); fChain->SetBranchAddress("Positive_D_Daughter_TRACK_GhostProb", &Positive_D_Daughter_TRACK_GhostProb, &b_Positive_D_Daughter_TRACK_GhostProb); fChain->SetBranchAddress("Positive_D_Daughter_TRACK_CloneDist", &Positive_D_Daughter_TRACK_CloneDist, &b_Positive_D_Daughter_TRACK_CloneDist); fChain->SetBranchAddress("nCandidate", &nCandidate, &b_nCandidate); fChain->SetBranchAddress("totCandidates", &totCandidates, &b_totCandidates); fChain->SetBranchAddress("EventInSequence", &EventInSequence, &b_EventInSequence); fChain->SetBranchAddress("runNumber", &runNumber, &b_runNumber); fChain->SetBranchAddress("eventNumber", &eventNumber, &b_eventNumber); fChain->SetBranchAddress("BCID", &BCID, &b_BCID); fChain->SetBranchAddress("OdinTCK", &OdinTCK, &b_OdinTCK); fChain->SetBranchAddress("L0DUTCK", &L0DUTCK, &b_L0DUTCK); fChain->SetBranchAddress("HLTTCK", &HLTTCK, &b_HLTTCK); fChain->SetBranchAddress("nPV", &nPV, &b_nPV); fChain->SetBranchAddress("EVT_Int__nMCPV", &MCPV, &b_MCPV); fChain->SetBranchAddress("PVX", PVX, &b_PVX); fChain->SetBranchAddress("PVY", PVY, &b_PVY); fChain->SetBranchAddress("PVZ", PVZ, &b_PVZ); fChain->SetBranchAddress("PVXERR", PVXERR, &b_PVXERR); fChain->SetBranchAddress("PVYERR", PVYERR, &b_PVYERR); fChain->SetBranchAddress("PVZERR", PVZERR, &b_PVZERR); fChain->SetBranchAddress("PVCHI2", PVCHI2, &b_PVCHI2); fChain->SetBranchAddress("PVNDOF", PVNDOF, &b_PVNDOF); fChain->SetBranchAddress("PVNTRACKS", PVNTRACKS, &b_PVNTRACKS); fChain->SetBranchAddress("nVelo", &nVelo, &b_nVelo); lumiChain->SetBranchAddress("IntegratedLuminosity", &IntegratedLuminosity, &b_IntegratedLuminosity); lumiChain->SetBranchAddress("IntegratedLuminosityErr", &IntegratedLuminosityErr, &b_IntegratedLuminosityErr); ////////////////////////////////////////////////////////////////// std::cout << "Book" << std::endl; // TH1D* h5 = new TH1D("D (K#pi) mass cut on event number","",30,1800,1950); // h5 // TH1D* h2 = new TH1D("D (K#pi) mass cut on B mass","",30,1835,1895); // h2 // TH1D* h1 = new TH1D("B mass cut on event number","",50,5200,5500); // h1 // TH1D* h4 = new TH1D("B mass cut on B mass","",30,5225,5325); //h4 TH1D* fdm1 = new TH1D("D (K#pi) mass, all cuts except D and B mass","",50,1775,2025); // h5 TH1D* fdm2 = new TH1D("D (K#pi) mass, all cuts except D mass","",50,1775,2025); // h2 TH1D* fbm1 = new TH1D("B mass, all cuts except B mass, nPV<2","",100,5000,5500); // h1 TH1D* fbm2 = new TH1D("B mass, all cuts except B mass, any nPV","",100,5000,5500); // h1 TH2D* fbdm = new TH2D("B_M vs D_M","",40,5050,5500,40,1750,2100); TH1D* b1 = new TH1D("B mass ","",30,5200,5500); TH1D* b2 = new TH1D("B p","",30,-10,10); TH1D* b3 = new TH1D("B pt","",30,-10,10); TH1D* d1 = new TH1D("D mass","",30,1800,1900); TH1D* d2 = new TH1D("D p","",30,0,50000); TH1D* d3 = new TH1D("D pt","",30,0,50000); TH1D* ba1 = new TH1D("ba mass","",30,0,600); TH1D* ba2 = new TH1D("ba p","",30,0,50000); TH1D* ba3 = new TH1D("ba pt","",30,0,50000); TH1D* dap1 = new TH1D("da+ mass","",30,0,600); TH1D* dap2 = new TH1D("da+ p","",30,0,50000); TH1D* dap3 = new TH1D("da+ pt","",30,0,50000); TH1D* dan1 = new TH1D("da- mass","",30,0,600); TH1D* dan2 = new TH1D("da- p","",30,0,50000); TH1D* dan3 = new TH1D("da- pt","",30,0,50000); TH1D* bm1 = new TH1D("B mass 1","",100,5000,5500); TH1D* bm2 = new TH1D("B mass 2","",100,5000,5500); TH1D* bm3 = new TH1D("B mass 3","",100,5000,5500); TH1D* bm4 = new TH1D("B mass 4","",100,5000,5500); TH1D* bm5 = new TH1D("B mass 5","",100,5000,5500); TH1D* bm6 = new TH1D("B mass 6","",100,5000,5500); TH1D* bm7 = new TH1D("B mass 7","",100,5000,5500); TH1D* bm8 = new TH1D("B mass 8","",100,5000,5500); TH1D* bm9 = new TH1D("B mass 9","",100,5000,5500); TH1D* bm10 = new TH1D("B mass 10","",100,5000,5500); TH1D* dm1 = new TH1D("D mass 1","",50,1800,1900); TH1D* dm2 = new TH1D("D mass 2","",50,1800,1900); TH1D* dm3 = new TH1D("D mass 3","",50,1800,1900); TH1D* dm4 = new TH1D("D mass 4","",50,1800,1900); TH1D* dm5 = new TH1D("D mass 5","",50,1800,1900); TH1D* dm6 = new TH1D("D mass 6","",50,1800,1900); TH1D* dm7 = new TH1D("D mass 7","",50,1800,1900); TH1D* dm8 = new TH1D("D mass 8","",50,1800,1900); TH1D* dm9 = new TH1D("D mass 9","",50,1800,1900); TH1D* dm10 = new TH1D("D mass 10","",50,1800,1900); TH1D* tc1 = new TH1D("totCandidates per event 1","",30,0,30); TH1D* tc2 = new TH1D("totCandidates per event 2","",30,0,30); TH1D* tc3 = new TH1D("totCandidates per event 3","",30,0,30); TH1D* tc4 = new TH1D("totCandidates per event 4","",30,0,30); TH1D* tc5 = new TH1D("totCandidates per event 5","",30,0,30); TH1D* tc6 = new TH1D("totCandidates per event 6","",30,0,30); TH1D* tc7 = new TH1D("totCandidates per event 7","",30,0,30); TH1D* tc8 = new TH1D("totCandidates per event 8","",30,0,30); TH1D* tc9 = new TH1D("totCandidates per event 9","",30,0,30); TH1D* tc10 = new TH1D("totCandidates per event 10","",30,0,30); TH1D* np1 = new TH1D("nPV on event basis 1","",9,1,10); TH1D* np2 = new TH1D("nPV on event basis 2","",9,1,10); TH1D* np3 = new TH1D("nPV on event basis 3","",9,1,10); TH1D* np4 = new TH1D("nPV on event basis 4","",9,1,10); TH1D* np5 = new TH1D("nPV on event basis 5","",9,1,10); TH1D* np6 = new TH1D("nPV on event basis 6","",9,1,10); TH1D* np7 = new TH1D("nPV on event basis 7","",9,1,10); TH1D* np8 = new TH1D("nPV on event basis 8","",9,1,10); TH1D* np9 = new TH1D("nPV on event basis 9","",9,1,10); TH1D* np10 = new TH1D("nPV on event basis 10","",9,1,10); // TH1D* np3 = new TH1D("nPV effeciancy on event basis","",80,0,10); TH1D* ef1 = new TH1D("D_FDCHI2_OWNPV before cut","",50,0,200); TH1D* ef2 = new TH1D("PIDK 321 before cut","",100,-20,20); TH1D* ef3 = new TH1D("PIDK 211 before cut","",100,-20,20); TH1D* ef4 = new TH1D("D_IPCHI2_OWNPV before cut","",100,0,100); TH1D* fd1 = new TH1D("B_FD_OWNPV before cut","",80,0,40); TH1D* fd2 = new TH1D("B_FDCHI2_OWNPV before cut","",80,0,4000); TH1D* fd3 = new TH1D("B_TAU before cut","",100,0,0.01); TH1D* fd4 = new TH1D("B_FD_OWNPV after cut","",80,0,40); TH1D* fd5 = new TH1D("B_FDCHI2_OWNPV after cut","",80,0,4000); TH1D* fd6 = new TH1D("B_TAU after cut","",100,0,0.01); TH2D* si1 = new TH2D("B_M vs D_M signal","",40,5050,5500,40,1750,2100); TH1D* si2 = new TH1D("B_FD_OWNPV signal","",80,0,40); TH1D* si3 = new TH1D("B_FDCHI2_OWNPV signal","",80,0,4000); TH1D* si4 = new TH1D("B_TAU signal","",100,0,0.01); TH1D* si5 = new TH1D("PIDK for 321 signal","",80,-200,200); TH1D* si6 = new TH1D("PIDK for 211 signal","",80,-200,200); TH2D* bk1 = new TH2D("B_M vs D_M background","",40,5050,5500,40,1750,2100); TH1D* bk2 = new TH1D("B_FD_OWNPV background","",80,0,40); TH1D* bk3 = new TH1D("B_FDCHI2_OWNPV background","",80,0,4000); TH1D* bk4 = new TH1D("B_TAU background","",100,0,0.01); TH1D* bk5 = new TH1D("PIDK for 321 background","",80,-200,200); TH1D* bk6 = new TH1D("PIDK for 211 background","",80,-200,200); TH1D* ips1 = new TH1D("D_IPS","",100,0,150); TH2D* ips2 = new TH2D("D_IPS vs FD chi2","",100,0,150,100,0,20000); TH1D* cos1 = new TH1D("D_cos","",100,-1.1,1.1); TH2D* cos2 = new TH2D("D_cos vs FD chi2","",100,0.9995,1,100,0,4000); TH1D* cos4 = new TH1D("D_DIRA_ORIVX","",100,-1.1,1.1); TH1D* cos5 = new TH1D("D_DIRA_OWNPV","",100,-1.1,1.1); TH2D* mpv1 = new TH2D("nPV vs MCPV","nPV vs MCPV;nPV;MCPV",9,1,10,9,1,10); TH1D* mpv2 = new TH1D("MCPV","",9,1,10); TH1D* nbm1 = new TH1D("new B mass plot", "", 50, 4750,5850); TH1D* ndm1 = new TH1D("new D mass plot", "", 50, 1755,1980); TH1D* fishs1 = new TH1D("fisher signal 1", "", 50, -2,2); TH1D* fishs2 = new TH1D("fisher signal 2", "", 50, -2,2); TH1D* fishs3 = new TH1D("fisher signal 3", "", 50, -2,2); TH1D* fishb = new TH1D("fisher background", "", 50, -2,2); TH1D* fishsb = new TH1D("fisher signal and background", "", 50, -2,2); TH1D* fishc = new TH1D("cut on fisher", "", 100,5000,5500); TH1D* dmnpv1 = new TH1D("D (K#pi) mass, nPV==1, all cuts except D and B mass","",50,1775,2025); // h2 TH1D* dmnpv2 = new TH1D("D (K#pi) mass, nPV==2, all cuts except D and B mass","",50,1775,2025); // h2 TH1D* dmnpv3 = new TH1D("D (K#pi) mass, nPV>3, all cuts except D and B mass","",50,1775,2025); // h2 TH1D* dmnpv4 = new TH1D("D (K#pi) mass, nPV==1, all cuts except D mass","",50,1775,2025); // h2 TH1D* dmnpv5 = new TH1D("D (K#pi) mass, nPV==2, all cuts except D mass","",50,1775,2025); // h2 TH1D* dmnpv6 = new TH1D("D (K#pi) mass, nPV>3, all cuts except D mass","",50,1775,2025); // h2 TH1D* bmnpv1 = new TH1D("B mass, nPV==1, all cuts except B mass","",100,5000,5500); // h1 TH1D* bmnpv2 = new TH1D("B mass, nPV==2, all cuts except B mass","",100,5000,5500); // h1 TH1D* bmnpv3 = new TH1D("B mass, nPV>3, all cuts except B mass","",100,5000,5500); // h1 TH2D* nvelobm = new TH2D("nVelo vs B_M background","",50,0,1000,50,5000,5500); ////////////////////////////////////////////////////////////////// std::cout << "Loop" << std::endl; Long64_t nentries = fChain->GetEntries(); Long64_t nbytes = 0, nb = 0; Int_t lastSuccessfulEventNumber = -1; Int_t lastEventNumber = -1; Int_t lastSuccessfulRunNumber = -1; Int_t lastRunNumber = -1; Int_t counter0 = 0; Int_t counter1 = 0; Int_t counter2 = 0; Int_t counter3 = 0; Int_t counter4 = 0; Int_t counter5 = 0; Int_t counter6 = 0; Int_t counter7 = 0; Int_t counter8 = 0; Int_t counter9 = 0; Int_t counter10 = 0; Int_t lastEventAtCounter1 = -1; Int_t lastRunAtCounter1 = -1; Int_t lastEventAtCounter2 = -1; Int_t lastRunAtCounter2 = -1; Int_t lastEventAtCounter3 = -1; Int_t lastRunAtCounter3 = -1; Int_t lastEventAtCounter4 = -1; Int_t lastRunAtCounter4 = -1; Int_t lastEventAtCounter5 = -1; Int_t lastRunAtCounter5 = -1; Int_t lastEventAtCounter6 = -1; Int_t lastRunAtCounter6 = -1; Int_t lastEventAtCounter7 = -1; Int_t lastRunAtCounter7 = -1; Int_t lastEventAtCounter8 = -1; Int_t lastRunAtCounter8 = -1; Int_t lastEventAtCounter9 = -1; Int_t lastRunAtCounter9 = -1; Int_t lastEventAtCounter10 = -1; Int_t lastRunAtCounter10 = -1; Float_t B_M_Sigma = 16.26; Float_t D_M_Sigma = 7.14; Float_t B_M_Official = 5279.5; Float_t D_M_Official = 1864.84; cout << endl << "Name of cuts used: " << Name_Of_Cuts << endl; if (maxEvent == -1) cout << "Processing all availible candidates." << endl; else cout << "Only processing the first " << maxEvent << " candidates." << endl; cout << endl; for (Long64_t jentry=0; jentry 0 && jentry >= maxEvent) break; nb = fChain->GetEntry(jentry); nbytes += nb; counter0++; //if( (onlyNPV == -1) || (nPV > onlyNPV) ) { /* // this was not used so I commented it out Float_t BD_Dist = (sqrt((D_ENDVERTEX_X - B_ENDVERTEX_X)*(D_ENDVERTEX_X - B_ENDVERTEX_X) + (D_ENDVERTEX_Y - B_ENDVERTEX_Y)*(D_ENDVERTEX_Y - B_ENDVERTEX_Y) + (D_ENDVERTEX_Z - B_ENDVERTEX_Z)*(D_ENDVERTEX_Z - B_ENDVERTEX_Z)));*/ Float_t Z_Dist = ((D_ENDVERTEX_Z - B_ENDVERTEX_Z)/sqrt((D_ENDVERTEX_Z - B_ENDVERTEX_Z)*(D_ENDVERTEX_Z - B_ENDVERTEX_Z)))* (sqrt((D_ENDVERTEX_X - B_ENDVERTEX_X)*(D_ENDVERTEX_X - B_ENDVERTEX_X) + (D_ENDVERTEX_Y - B_ENDVERTEX_Y)*(D_ENDVERTEX_Y - B_ENDVERTEX_Y) + (D_ENDVERTEX_Z - B_ENDVERTEX_Z)*(D_ENDVERTEX_Z - B_ENDVERTEX_Z))); Float_t fisher = +6.6262388089e-06 * Positive_D_Daughter_MINIPCHI2 +6.9075887209e-06 * Negative_D_Daughter_MINIPCHI2 +1.32208041844e-05 * Bachelor_MINIPCHI2 -6.94350863858e-05 * Bachelor_PIDK -2.16821894665e-08 * D_FDCHI2_OWNPV +0.000187370097008 * Z_Dist -0.0104721915088 * D_ENDVERTEX_CHI2/D_ENDVERTEX_NDOF +4.46369600399e-05 * D_IPCHI2_OWNPV +8.06301402451e-06 * D_PT -3.63811332464e-07 * B_FDCHI2_OWNPV -0.0108523226013 * B_ENDVERTEX_CHI2/B_ENDVERTEX_NDOF -0.00306243470573 * B_IPCHI2_OWNPV +369.032440984 * B_DIRA_OWNPV -0.00019387762644 * Negative_D_Daughter_PIDK +0.000286621441244 * Positive_D_Daughter_PIDK -369.028625388 ; if(false || ((Positive_D_Daughter_PT > 500) && (Negative_D_Daughter_PT > 500)) ) { if(false || ((Positive_D_Daughter_P > 3000) && (Negative_D_Daughter_P > 3000)) ) { if(false || ((Bachelor_PT > 500) && (Bachelor_P > 3000)) ) { if(abs(B_M-B_M_Official)<((Float_t)B_M_Window_Cut)){ // background in sig region if( (abs(D_M-D_M_Official)<((Float_t)D_M_Window_Cut)) ){ fishb->Fill(fisher); if(fisher>-0.005) fishc->Fill(B_M); } } } } } fishsb->Fill(fisher); if((!eventEffs) || (lastEventAtCounter1 != eventNumber) || ((lastEventAtCounter1 == eventNumber) && (lastRunAtCounter1 != runNumber)) ){ counter1++; lastEventAtCounter1 = eventNumber; lastRunAtCounter1 = runNumber; np1->Fill(nPV); mpv1->Fill(nPV,MCPV); mpv2->Fill(MCPV); if(plotNPV) tc1->Fill(totCandidates); } if(plotMassByCut) { bm1->Fill(B_M); dm1->Fill(D_M); } //D daughters if(!cutOnDaughters || ( (Positive_D_Daughter_PT > Positive_D_Daughter_PT_Cut) && (Positive_D_Daughter_MINIPCHI2 > Positive_D_Daughter_MINIPCHI2_Cut) && (Negative_D_Daughter_PT > Negative_D_Daughter_PT_Cut) && (Negative_D_Daughter_MINIPCHI2 > Negative_D_Daughter_MINIPCHI2_Cut) && (Negative_D_Daughter_P > Negative_D_Daughter_P_Cut) && (Positive_D_Daughter_P > Positive_D_Daughter_P_Cut) && (Negative_D_Daughter_TRACK_CHI2NDOF < Negative_D_Daughter_TRACK_CHI2NDOF_Cut) && (Positive_D_Daughter_TRACK_CHI2NDOF < Positive_D_Daughter_TRACK_CHI2NDOF_Cut) )) { if((!eventEffs) || (lastEventAtCounter2 != eventNumber) || ((lastEventAtCounter2 == eventNumber) && (lastRunAtCounter2 != runNumber)) ){ counter2++; lastEventAtCounter2 = eventNumber; lastRunAtCounter2 = runNumber; np2->Fill(nPV); if(plotNPV) tc2->Fill(totCandidates); } if(plotMassByCut) { bm2->Fill(B_M); dm2->Fill(D_M); } //Bachelor if(!cutOnBachelor || ( (Bachelor_PT > Bachelor_PT_Cut) && (Bachelor_MINIPCHI2 > Bachelor_MINIPCHI2_Cut) && (Bachelor_P > Bachelor_P_Cut) && (abs(Bachelor_ID) == 211) && (Bachelor_PIDK < Bachelor_PIDK_Cut) && (Bachelor_TRACK_CHI2NDOF < Bachelor_TRACK_CHI2NDOF_Cut) )){ if((!eventEffs) || (lastEventAtCounter3 != eventNumber) || ((lastEventAtCounter3 == eventNumber) && (lastRunAtCounter3 != runNumber)) ){ counter3++; lastEventAtCounter3 = eventNumber; lastRunAtCounter3 = runNumber; np3->Fill(nPV); if(plotNPV) tc3->Fill(totCandidates); } if(plotMassByCut) { bm3->Fill(B_M); dm3->Fill(D_M); } //D ef1->Fill(D_FDCHI2_OWNPV); if((D_FDCHI2_OWNPV > D_FDCHI2_OWNPV_Cut) && (Z_Dist > Z_Dist_Cut)){ if(D_ENDVERTEX_CHI2/D_ENDVERTEX_NDOF < D_ENDVERTEX_CHI2_D_ENDVERTEX_NDOF_Cut){ ef4->Fill(D_IPCHI2_OWNPV); if((D_IPCHI2_OWNPV > D_IPCHI2_OWNPV_Cut) && (D_PT > D_PT_Cut)){ if((!eventEffs) || (lastEventAtCounter4 != eventNumber) || ((lastEventAtCounter4 == eventNumber) && (lastRunAtCounter4 != runNumber)) ){ counter4++; lastEventAtCounter4 = eventNumber; lastRunAtCounter4 = runNumber; np4->Fill(nPV); if(plotNPV) tc4->Fill(totCandidates); } if(plotMassByCut) { bm4->Fill(B_M); dm4->Fill(D_M); } if(plotFD) { fd1->Fill(B_FD_OWNPV); // Infront of B cut fd2->Fill(B_FDCHI2_OWNPV); fd3->Fill(B_TAU); } //B if(B_FDCHI2_OWNPV > B_FDCHI2_OWNPV_Cut){ if(B_ENDVERTEX_CHI2/B_ENDVERTEX_NDOF < B_ENDVERTEX_CHI2_B_ENDVERTEX_NDOF_Cut){ if(B_IPCHI2_OWNPV < B_IPCHI2_OWNPV_Cut){ if(B_DIRA_OWNPV > B_DIRA_OWNPV_Cut){ if(plotFD) { fd4->Fill(B_FD_OWNPV); // after B vcut fd5->Fill(B_FDCHI2_OWNPV); fd6->Fill(B_TAU); } if((!eventEffs) || (lastEventAtCounter5 != eventNumber) || ((lastEventAtCounter5 == eventNumber) && (lastRunAtCounter5 != runNumber)) ){ counter5++; lastEventAtCounter5 = eventNumber; lastRunAtCounter5 = runNumber; np5->Fill(nPV); if(plotNPV) tc5->Fill(totCandidates); } if(plotMassByCut) { bm5->Fill(B_M); dm5->Fill(D_M); } if(plotBkSig) { // background - fringes if(abs(B_M-B_M_Official) > (4*B_M_Sigma)) { bk1->Fill(B_M, D_M); bk2->Fill(B_FD_OWNPV); bk3->Fill(B_FDCHI2_OWNPV); bk4->Fill(B_TAU); if (abs(Positive_D_Daughter_ID) == 321) bk5->Fill(Positive_D_Daughter_PIDK); // fill a pion and an kaon graph if (abs(Negative_D_Daughter_ID) == 321) bk5->Fill(Negative_D_Daughter_PIDK); // seperatly so the distributaion if (abs(Positive_D_Daughter_ID) == 211) bk6->Fill(Positive_D_Daughter_PIDK); // of PIDK can be seen for pions if (abs(Negative_D_Daughter_ID) == 211) bk6->Fill(Negative_D_Daughter_PIDK); // and kaons } // signal if((abs(B_M-B_M_Official) < (3*D_M_Sigma)) && (abs(D_M-D_M_Official) < (3*D_M_Sigma)) ) { si1->Fill(B_M, D_M); si2->Fill(B_FD_OWNPV); si3->Fill(B_FDCHI2_OWNPV); si4->Fill(B_TAU); if (abs(Positive_D_Daughter_ID) == 321) si5->Fill(Positive_D_Daughter_PIDK); if (abs(Negative_D_Daughter_ID) == 321) si5->Fill(Negative_D_Daughter_PIDK); if (abs(Positive_D_Daughter_ID) == 211) si6->Fill(Positive_D_Daughter_PIDK); if (abs(Negative_D_Daughter_ID) == 211) si6->Fill(Negative_D_Daughter_PIDK); } } if (abs(Positive_D_Daughter_ID) == 321) ef2->Fill(Positive_D_Daughter_PIDK); if (abs(Negative_D_Daughter_ID) == 321) ef2->Fill(Negative_D_Daughter_PIDK); if (abs(Positive_D_Daughter_ID) == 211) ef3->Fill(Positive_D_Daughter_PIDK); if (abs(Negative_D_Daughter_ID) == 211) ef3->Fill(Negative_D_Daughter_PIDK); fishs3->Fill(fisher); nvelobm->Fill(nVelo, B_M); //PID -- Note: all PIDKs have been changed from 10 if(!cutOnPID || ( ( // using the tigest pid cuts, loosest are k>2 p<10 (abs(Negative_D_Daughter_ID) == 211) && (Negative_D_Daughter_PIDK < Negative_D_Daughter_PIDK_211_Cut) && (abs(Positive_D_Daughter_ID) == 321) && (Positive_D_Daughter_PIDK > Positive_D_Daughter_PIDK_321_Cut) ) || ( (abs(Negative_D_Daughter_ID) == 321) && (Negative_D_Daughter_PIDK > Negative_D_Daughter_PIDK_321_Cut) && (abs(Positive_D_Daughter_ID) == 211) && (Positive_D_Daughter_PIDK < Positive_D_Daughter_PIDK_211_Cut) ) ) ) { if((!eventEffs) || (lastEventAtCounter6 != eventNumber) || ((lastEventAtCounter6 == eventNumber) && (lastRunAtCounter6 != runNumber)) ){ counter6++; lastEventAtCounter6 = eventNumber; lastRunAtCounter6 = runNumber; np6->Fill(nPV); ndm1->Fill(D_M); if(plotNPV) tc6->Fill(totCandidates); } if(plotMassByCut) { bm6->Fill(B_M); dm6->Fill(D_M); } fishs2->Fill(fisher); // if(nVelo < 40.0) { if(true || nPV < 3) { if((!eventEffs) || (lastEventAtCounter7 != eventNumber) || ((lastEventAtCounter7 == eventNumber) && (lastRunAtCounter7 != runNumber)) ){ nbm1->Fill(B_M); counter7++; lastEventAtCounter7 = eventNumber; lastRunAtCounter7 = runNumber; np7->Fill(nPV); } if(plotMassByCut){ bm7->Fill(B_M); dm7->Fill(D_M); } if(plotNPV) tc7->Fill(totCandidates); if((!cutOnEventNr) || (lastSuccessfulEventNumber != eventNumber) || ((lastSuccessfulEventNumber == eventNumber) && (lastSuccessfulRunNumber != runNumber))) { lastSuccessfulEventNumber = eventNumber; lastSuccessfulRunNumber = runNumber; if((!eventEffs) || (lastEventAtCounter8 != eventNumber) || ((lastEventAtCounter8 == eventNumber) && (lastRunAtCounter8 != runNumber)) ){ counter8++; lastEventAtCounter8 = eventNumber; lastRunAtCounter8 = runNumber; np8->Fill(nPV); if(plotNPV) tc8->Fill(totCandidates); } if(plotMassByCut) { bm8->Fill(B_M); dm8->Fill(D_M); } fdm1->Fill(D_M); fbdm->Fill(B_M,D_M); if (nPV == 1) dmnpv1->Fill(D_M); else if (nPV == 2) dmnpv2->Fill(D_M); else if (nPV > 2) dmnpv3->Fill(D_M); if(abs(B_M-B_M_Official)<((Float_t)B_M_Window_Cut)){ fdm2->Fill(D_M); if (nPV == 1) dmnpv4->Fill(D_M); else if (nPV == 2) dmnpv5->Fill(D_M); else if (nPV > 2) dmnpv6->Fill(D_M); } if(!cutOnDMass || (abs(D_M-D_M_Official)<((Float_t)D_M_Window_Cut)) ){ if((!eventEffs) || (lastEventAtCounter9 != eventNumber) || ((lastEventAtCounter9 == eventNumber) && (lastRunAtCounter9 != runNumber)) ){ counter9++; lastEventAtCounter9 = eventNumber; lastRunAtCounter9 = runNumber; np9->Fill(nPV); if(plotNPV) tc9->Fill(totCandidates); } if(plotMassByCut) { bm9->Fill(B_M); dm9->Fill(D_M); } // h1->Fill(B_M); // h5->Fill(D_M); fbm2->Fill(B_M); if (nPV < 3) fbm1->Fill(B_M); if (nPV == 1) bmnpv1->Fill(B_M); else if (nPV == 2) bmnpv2->Fill(B_M); else if (nPV > 2) bmnpv3->Fill(B_M); if(abs(B_M-B_M_Official)<((Float_t)B_M_Window_Cut)){ if((!eventEffs) || (lastEventAtCounter10 != eventNumber) || ((lastEventAtCounter10 == eventNumber) && (lastRunAtCounter10 != runNumber)) ){ counter10++; lastEventAtCounter10 = eventNumber; lastRunAtCounter10 = runNumber; np10->Fill(nPV); if(plotNPV) tc10->Fill(totCandidates); } if(plotMassByCut) { bm10->Fill(B_M); dm10->Fill(D_M); } // h4->Fill(B_M); // h2->Fill(D_M); lastEventNumber = eventNumber; lastRunNumber = runNumber; cout << "candidate in run " << runNumber << " event " << eventNumber //<< " EventInSequence " << EventInSequence << " B and D masses " << B_M << " " << D_M << " " << jentry << "/"<< nentries << endl; if (plotMPPT) { b1->Fill(B_M); b2->Fill(B_P); b3->Fill(B_PT); d1->Fill(D_M); d2->Fill(D_P); d3->Fill(D_PT); ba1->Fill(Bachelor_M); ba2->Fill(Bachelor_P); ba3->Fill(Bachelor_PT); dap1->Fill(Positive_D_Daughter_M); dap2->Fill(Positive_D_Daughter_P); dap3->Fill(Positive_D_Daughter_PT); dan1->Fill(Negative_D_Daughter_M); dan2->Fill(Negative_D_Daughter_P); dan3->Fill(Negative_D_Daughter_PT); }//plotMPPT if(plotCos){ Float_t D_3D_P[3] = { D_PX/D_P, D_PY/D_P, D_PZ/D_P }; Float_t BD_Dist = (sqrt((D_ENDVERTEX_X - B_ENDVERTEX_X)*(D_ENDVERTEX_X - B_ENDVERTEX_X) + (D_ENDVERTEX_Y - B_ENDVERTEX_Y)*(D_ENDVERTEX_Y - B_ENDVERTEX_Y) + (D_ENDVERTEX_Z - B_ENDVERTEX_Z)*(D_ENDVERTEX_Z - B_ENDVERTEX_Z))); Float_t D_3D_X[3] = { (D_ENDVERTEX_X - B_ENDVERTEX_X)/BD_Dist, (D_ENDVERTEX_Y - B_ENDVERTEX_Y)/BD_Dist, (D_ENDVERTEX_Z - B_ENDVERTEX_Z)/BD_Dist }; // dot product of the normalised vectors |vec| = 1 Float_t D_cos = D_3D_P[0]*D_3D_X[0] + D_3D_P[1]*D_3D_X[1] + D_3D_P[2]*D_3D_X[2]; Float_t D_IPS = sqrt(D_IPCHI2_OWNPV); cos1->Fill(D_cos); cos2->Fill(D_cos, D_FDCHI2_OWNPV); cos4->Fill(D_DIRA_ORIVX); cos5->Fill(D_DIRA_OWNPV); ips1->Fill(D_IPS); ips2->Fill(D_IPS, D_FDCHI2_OWNPV); } fishs1->Fill(fisher); }//nPV }//B mass }//D mass } // event nr } } } } } } } } } } //}// nPV }// for loop ///////////////////////////////////////////////////////////////// // Now Draw cout << "Draw" << endl; // gStyle->SetOptFit(1111); Int_t count = 1; TCanvas* c1 = new TCanvas("c1","B and D masses in "+filenamearg,1200,800); c1->SetFillColor(0); c1->SetBorderMode(0); c1->Divide(2,3); // c1->cd(1); h1->Draw(); // c1->cd(2); h5->Draw(); // c1->cd(3); h4->Draw(); // c1->cd(4); h2->Draw(); c1->cd(1); fdm1->Draw(); c1->cd(3); fdm2->Draw(); c1->cd(5); fbm1->Draw(); c1->cd(6); // --- Fraction of Signal --- RooRealVar my_B("my_B","m_{B} (MeV)",5000,5500); RooRealVar fsigK("fsigk","signal fraction k",0.15,0.0,1.0); RooRealVar fsigPi("fsigpi","signal fraction Pi",0.15,0.0,1.0); //RooRealVar nsig("nsig","#signal events",20,0,160); //RooRealVar nback("nback","#background events",100,0,160); // --- Building Gaussian Signal PDF --- RooRealVar SigMeanK("sigmameank","B^- -> DK mass",5220.,5200,5240); RooRealVar SigWidthK("sigwidthk","B^- -> DK mass width",25.,0.,100.); RooGaussian gaussK("gausk","gaussian PDF",my_B,SigMeanK,SigWidthK); RooRealVar SigMeanPi("sigmameanpi","B^- -> Dpi mass",5277.,5269,5389); RooRealVar SigWidthPi("sigwidthpi","B^- -> Dpi mass width",25.,0.,100.); RooGaussian gaussPi("gauspi","gaussian PDF",my_B,SigMeanPi,SigWidthPi); // --- Building Polynomial Background PDF --- RooRealVar slopea("slopea","slopea",0.0,""); RooRealVar slopeb("slopeb","slopeb",0.0,""); RooRealVar slopec("slopec","slopec",-1.0,""); // RooRealVar sloped("sloped","sloped",0.001,-1.0,1.0); // RooRealVar slopee("slopee","slopee",-0.1,-1.0,1.0); RooPolynomial bkk("flat","flat",my_B,RooArgList(slopea,slopeb,slopec)); // --- Construct signal + Background Pdf --- RooAddPdf model("model","model",RooArgList(gaussK,gaussPi,bkk),RooArgList(fsigK,fsigPi)); //RooAddPdf model("model","model",RooArgList(gauss,bkk),RooArgList(nsig,nback)); // RooArgList mydata("my Data"); RooDataHist datafromhist("data","data",RooArgList(my_B),fbm1,1); model.fitTo(datafromhist); // --- Plot the Data and the fit to the data --- RooPlot* Bframe = my_B.frame(); Bframe->SetTitle("B mass"); datafromhist.plotOn(Bframe); model.plotOn(Bframe); cout << "B mass chi2 " << Bframe->chiSquare() << endl; Bframe->Draw(); c1->cd(4); // --- Fraction of Signal --- RooRealVar my_D("my_D","m_{D} (MeV)",1775,2025); RooRealVar fsig2("fsig2","signal fraction2",0.15,0.0,1.0); //RooRealVar nsig("nsig","#signal events",20,0,160); //RooRealVar nback("nback","#background events",100,0,160); // --- Building Gaussian Signal PDF --- RooRealVar SigMean2("sigmamean2","D^- mass",1866.,1800,1900); RooRealVar SigWidth2("sigwidth2","D^- mass width",25.,0.,100.); RooGaussian gauss2("gaus2","gaussian PDF",my_D,SigMean2,SigWidth2); // --- Building Polynomial Background PDF --- RooRealVar slope2("slope2","slope2",0.1,-1.0,1.0); RooPolynomial bkk2("flat2","flat2",my_D,RooArgList(slope2)); // --- Construct signal + Background Pdf --- RooAddPdf model2("model2","model2",RooArgList(gauss2,bkk2),fsig2); //RooAddPdf model("model","model",RooArgList(gauss,bkk),RooArgList(nsig,nback)); // RooArgList mydata("my Data"); RooDataHist datafromhist2("data2","data2",RooArgList(my_D),fdm2,1); model2.fitTo(datafromhist2); // --- Plot the Data and the fit to the data --- RooPlot* Dframe = my_D.frame(); Dframe->SetTitle("D mass"); datafromhist2.plotOn(Dframe); model2.plotOn(Dframe); cout << "D mass chi2 " << Dframe->chiSquare() << endl; Dframe->Draw(); // --- Fraction of Signal --- RooRealVar my_Bz("my_B","m_{B} (MeV)",5000,5500); RooRealVar fsigKz("fsigK","signal fraction K",0.15,0.0,1.0); RooRealVar fsigPiz("fsigPi","signal fraction Pi",0.15,0.0,1.0); //RooRealVar nsig("nsig","#signal events",20,0,160); //RooRealVar nback("nback","#background events",100,0,160); // --- Building Gaussian Signal PDF --- RooRealVar SigMeanKz("sigmameank","B^- -> DK mass",5220.,5200,5240); RooRealVar SigWidthKz("sigwidthk","B^- -> DK mass width",25.,0.,100.); RooGaussian gaussKz("gausk","gaussian PDF",my_Bz,SigMeanKz,SigWidthKz); RooRealVar SigMeanPiz("sigmameanpi","B^- -> DPi mass",5277.,5269,5289); RooRealVar SigWidthPiz("sigwidthpi","B^- -> DPi mass width",25.,0.,100.); RooGaussian gaussPiz("gauspi","gaussian PDF",my_Bz,SigMeanPiz,SigWidthPiz); // --- Building Polynomial Background PDF --- RooRealVar slopeaz("slopea","slopea",0.0,""); RooRealVar slopebz("slopeb","slopeb",0.0,""); RooRealVar slopecz("slopec","slopec",-1.0,""); // RooRealVar sloped("sloped","sloped",0.001,-1.0,1.0); // RooRealVar slopee("slopee","slopee",-0.1,-1.0,1.0); RooPolynomial bkkz("flat","flat",my_Bz,RooArgList(slopeaz,slopebz,slopecz)); // --- Construct signal + Background Pdf --- RooAddPdf modelz("model","model",RooArgList(gaussKz,gaussPiz,bkkz),RooArgList(fsigKz, fsigPiz)); //RooAddPdf model("model","model",RooArgList(gauss,bkk),RooArgList(nsig,nback)); // RooArgList mydata("my Data"); RooDataHist datafromhistz("data","data",RooArgList(my_Bz),fbm2,1); RooCmdArg Range("",0,0,5150,5500); modelz.fitTo(datafromhistz,Range); // --- Plot the Data and the fit to the data --- RooPlot* Bframez = my_Bz.frame(); Bframez->SetTitle("B mass"); datafromhistz.plotOn(Bframez); modelz.plotOn(Bframez); cout << "B massz chi2 " << Bframez->chiSquare() << endl; TFile* outFile = new TFile("outFile.BachelorAnalsys.1.root","RECREATE","B and D masses in "+filenamearg); c1->Write(); // h1->Write(); // h5->Write(); // h4->Write(); // h2->Write(); fdm1->Write(); fdm2->Write(); fbm1->Write(); fbm2->Write(); Bframe->Write(); Bframez->Write(); Dframe->Write(); dmnpv1->Write(); dmnpv2->Write(); dmnpv3->Write(); dmnpv4->Write(); dmnpv5->Write(); dmnpv6->Write(); bmnpv1->Write(); bmnpv2->Write(); bmnpv3->Write(); outFile->Close(); if(plotMPPT){ TCanvas* c2 = new TCanvas("c2","M,P and PT for everything in "+filenamearg,1200,800); c2->SetFillColor(0); c2->SetBorderMode(0); c2->Divide(5,3); c2->cd(1); b1->Draw(); c2->cd(2); d1->Draw(); c2->cd(3); ba1->Draw(); c2->cd(4); dap1->Draw(); c2->cd(5); dan1->Draw(); c2->cd(6); b2->Draw(); c2->cd(7); d2->Draw(); c2->cd(8); ba2->Draw(); c2->cd(9); dap2->Draw(); c2->cd(10); dan2->Draw(); c2->cd(11); b3->Draw(); c2->cd(12); d3->Draw(); c2->cd(13); ba3->Draw(); c2->cd(14); dap3->Draw(); c2->cd(15); dan3->Draw(); c2->cd(); TFile *outFile = new TFile("outFile.BachelorAnalsys.2.root","RECREATE","M,P and PT for everything in "+filenamearg); b1->Write(); b2->Write(); b3->Write(); d1->Write(); d2->Write(); d3->Write(); ba1->Write(); ba2->Write(); ba3->Write(); dap1->Write(); dap2->Write(); dap3->Write(); dan1->Write(); dan2->Write(); dan3->Write(); outFile->Close(); } if(plotMassByCut){ TCanvas* c3b = new TCanvas("c3b","B mass after each cut for "+filenamearg,1200,800); c3b->SetFillColor(0); c3b->SetBorderMode(0); c3b->Divide(3,4); c3b->cd(count++); bm1->Draw(); c3b->cd(count++); bm2->Draw(); c3b->cd(count++); bm3->Draw(); c3b->cd(count++); bm4->Draw(); c3b->cd(count++); bm5->Draw(); c3b->cd(count++); bm6->Draw(); c3b->cd(count++); bm7->Draw(); c3b->cd(count++); bm8->Draw(); c3b->cd(count++); bm9->Draw(); c3b->cd(count++); bm10->Draw(); c3b->cd(); TCanvas* c3d = new TCanvas("c3d","D mass after each cut for "+filenamearg,1200,800); c3d->SetFillColor(0); c3d->SetBorderMode(0); c3d->Divide(3,4); count = 1; c3d->cd(count++); dm1->Draw(); c3d->cd(count++); dm2->Draw(); c3d->cd(count++); dm3->Draw(); c3d->cd(count++); dm4->Draw(); c3d->cd(count++); dm5->Draw(); c3d->cd(count++); dm6->Draw(); c3d->cd(count++); dm7->Draw(); c3d->cd(count++); dm8->Draw(); c3d->cd(count++); dm9->Draw(); c3d->cd(count++); dm10->Draw(); c3d->cd(); TFile *outFile = new TFile("outFile.BachelorAnalsys.3.root","RECREATE","B and D mass after each cut for "+filenamearg); c3b->Write(); c3d->Write(); dm1->Write(); dm2->Write(); dm3->Write(); dm4->Write(); dm5->Write(); dm6->Write(); dm7->Write(); dm8->Write(); dm9->Write(); dm10->Write(); bm1->Write(); bm2->Write(); bm3->Write(); bm4->Write(); bm5->Write(); bm6->Write(); bm7->Write(); bm8->Write(); bm9->Write(); bm10->Write(); fishs1->Write(); fishs2->Write(); fishs3->Write(); fishb->Write(); fishsb->Write(); fishc->Write(); nvelobm->Write(); outFile->Close(); } if(plotNPV) { TCanvas* c3t = new TCanvas("c3t","totCandidates after each cut for "+filenamearg,1200,800); c3t->SetFillColor(0); c3t->SetBorderMode(0); c3t->Divide(3,4); count = 1; c3t->cd(count++); tc1->Draw(); c3t->cd(count++); tc2->Draw(); c3t->cd(count++); tc3->Draw(); c3t->cd(count++); tc4->Draw(); c3t->cd(count++); tc5->Draw(); c3t->cd(count++); tc6->Draw(); c3t->cd(count++); tc7->Draw(); c3t->cd(count++); tc8->Draw(); c3t->cd(count++); tc9->Draw(); c3t->cd(count++); tc10->Draw(); c3t->cd(); TCanvas* c3n = new TCanvas("c3n","effiency as a funct of nPV for "+filenamearg,1200,800); c3n->SetFillColor(0); c3n->SetBorderMode(0); c3n->Divide(3,4); count = 1; TH1D * ph = new TH1D("Poisson distribution","",9,1,10); TRandom * ran = new TRandom(); for(Int_t ifill=0 ; ifill<1000000 ; ifill++) ph->Fill(ran->Poisson(1.0)); TH1D* seff = (TH1D*)np1->Clone(); seff->SetTitle("Stripping efficiency"); seff->Divide(mpv2); seff->Scale(mpv2->GetEntries()/1035993); TH1D* npe2 = (TH1D*)np2->Clone(); seff->SetTitle("efficiency 2"); npe2->Divide(np1); TH1D* npe3 = (TH1D*)np3->Clone(); seff->SetTitle("efficiency 3"); npe3->Divide(np2); TH1D* npe4 = (TH1D*)np4->Clone(); seff->SetTitle("efficiency 4"); npe4->Divide(np3); TH1D* npe5 = (TH1D*)np5->Clone(); seff->SetTitle("efficiency 5"); npe5->Divide(np4); TH1D* npe6 = (TH1D*)np6->Clone(); seff->SetTitle("efficiency 6"); npe6->Divide(np5); TH1D* npe7 = (TH1D*)np7->Clone(); seff->SetTitle("efficiency 7"); npe7->Divide(np6); TH1D* npe8 = (TH1D*)np8->Clone(); seff->SetTitle("efficiency 8"); npe8->Divide(np7); TH1D* npe9 = (TH1D*)np9->Clone(); seff->SetTitle("efficiency 9"); npe9->Divide(np8); TH1D* npe10 = (TH1D*)np10->Clone(); seff->SetTitle("efficiency 10"); npe10->Divide(np9); TH1D* npe1 = (TH1D*)np10->Clone(); seff->SetTitle("efficiency overall"); npe1->Divide(np1); c3n->cd(count++); npe2->Draw(); c3n->cd(count++); npe3->Draw(); c3n->cd(count++); npe4->Draw(); c3n->cd(count++); npe5->Draw(); c3n->cd(count++); npe6->Draw(); c3n->cd(count++); npe7->Draw(); c3n->cd(count++); npe8->Draw(); c3n->cd(count++); npe9->Draw(); c3n->cd(count++); npe10->Draw(); c3n->cd(count++); npe1->Draw(); c3n->cd(); TCanvas* c3e = new TCanvas("c3e","effiency issues for "+filenamearg,1200,800); c3e->SetFillColor(0); c3e->SetBorderMode(0); c3e->Divide(2,2); count = 1; c3e->cd(count++); ef1->Draw(); c3e->cd(count++); ef2->Draw(); c3e->cd(count++); ef3->Draw(); c3e->cd(count++); ef4->Draw(); c3e->cd(); TFile *outFile = new TFile("outFile.BachelorAnalsys.4.root","RECREATE","Eff(nPV), totCands and others for "+filenamearg); tc1->Write(); tc2->Write(); tc3->Write(); tc4->Write(); tc5->Write(); tc6->Write(); tc7->Write(); tc8->Write(); tc9->Write(); tc10->Write(); np1->Write(); np2->Write(); np3->Write(); np4->Write(); np5->Write(); np6->Write(); np7->Write(); np8->Write(); np9->Write(); np10->Write(); npe1->Write(); npe2->Write(); npe3->Write(); npe4->Write(); npe5->Write(); npe6->Write(); npe7->Write(); npe8->Write(); npe9->Write(); npe10->Write(); ef1->Write(); ef2->Write(); ef3->Write(); ef4->Write(); ph->Write(); seff->Write(); ndm1->Write(); nbm1->Write(); outFile->Close(); // decided to start from 2 not one as counter is the second one // Float_t eff2 = npe2; // Float_t eff3 = ((Float_t)counter3)/((Float_t)counter2); // Float_t eff4 = ((Float_t)counter4)/((Float_t)counter3); // Float_t eff5 = ((Float_t)counter5)/((Float_t)counter4); // Float_t eff6 = ((Float_t)counter6)/((Float_t)counter5); // Float_t eff7 = ((Float_t)counter7)/((Float_t)counter6); // Float_t eff8 = ((Float_t)counter8)/((Float_t)counter7); // Float_t eff9 = ((Float_t)counter9)/((Float_t)counter7); // this is 7 and not 8 as cuts from between 7 and 8 dont effect // the ones at 9 see the code // Float_t overalleff = ((Float_t)counter9)/((Float_t)counter1); // Float_t efferr2 = sqrt( (eff2*(1-eff2)) / ((Float_t)counter1) ); // Float_t efferr3 = sqrt( (eff3*(1-eff3)) / ((Float_t)counter2) ); // Float_t efferr4 = sqrt( (eff4*(1-eff4)) / ((Float_t)counter3) ); // Float_t efferr5 = sqrt( (eff5*(1-eff5)) / ((Float_t)counter4) ); // Float_t efferr6 = sqrt( (eff6*(1-eff6)) / ((Float_t)counter5) ); // Float_t efferr7 = sqrt( (eff7*(1-eff7)) / ((Float_t)counter6) ); // Float_t efferr8 = sqrt( (eff8*(1-eff8)) / ((Float_t)counter7) ); // Float_t efferr9 = sqrt( (eff9*(1-eff9)) / ((Float_t)counter7) ); // this is 7 and not 8 as cuts from between 7 and 8 dont effect // the ones at 9 see the code // Float_t overallefferr = sqrt( (overalleff*(1-overalleff)) / ((Float_t)counter1) ); cout << endl << endl << "Cut info: " << endl; printf(" nPV %7i %7i %7i %7i %7i 1-5\n", 1,2,3,4,5); printf("%-3i Strip Eff : %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% \n" , -1, 100.*(*seff)[1], 100.*(*seff)[2], 100.*(*seff)[3], 100.*(*seff)[4], 100.*(*seff)[5], 100.*(*seff)[1]-100.*(*seff)[5] ); printf("%-3i D daughter : %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% \n" , 2, 100.*(*npe2)[1], 100.*(*npe2)[2], 100.*(*npe2)[3], 100.*(*npe2)[4], 100.*(*npe2)[5], 100.*(*npe2)[1]-100.*(*npe2)[5] ); printf("%-3i bachelor : %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% \n" , 3, 100.*(*npe3)[1], 100.*(*npe3)[2], 100.*(*npe3)[3], 100.*(*npe3)[4], 100.*(*npe3)[5], 100.*(*npe3)[1]-100.*(*npe3)[5] ); printf("%-3i after D cut: %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% \n" , 4, 100.*(*npe4)[1], 100.*(*npe4)[2], 100.*(*npe4)[3], 100.*(*npe4)[4], 100.*(*npe4)[5], 100.*(*npe4)[1]-100.*(*npe4)[5] ); printf("%-3i after B cut: %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% \n" , 5, 100.*(*npe5)[1], 100.*(*npe5)[2], 100.*(*npe5)[3], 100.*(*npe5)[4], 100.*(*npe5)[5], 100.*(*npe5)[1]-100.*(*npe5)[5] ); printf("%-3i after PID : %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% \n" , 6, 100.*(*npe6)[1], 100.*(*npe6)[2], 100.*(*npe6)[3], 100.*(*npe6)[4], 100.*(*npe6)[5], 100.*(*npe6)[1]-100.*(*npe6)[5] ); printf("%-3i nPV : %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% \n" , 7, 100.*(*npe7)[1], 100.*(*npe7)[2], 100.*(*npe7)[3], 100.*(*npe7)[4], 100.*(*npe7)[5], 100.*(*npe7)[1]-100.*(*npe7)[5] ); printf("%-3i event nr : %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% \n" , 8, 100.*(*npe8)[1], 100.*(*npe8)[2], 100.*(*npe8)[3], 100.*(*npe8)[4], 100.*(*npe8)[5], 100.*(*npe8)[1]-100.*(*npe8)[5] ); printf("%-3i D mass : %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% \n" , 9, 100.*(*npe9)[1], 100.*(*npe9)[2], 100.*(*npe9)[3], 100.*(*npe9)[4], 100.*(*npe9)[5], 100.*(*npe9)[1]-100.*(*npe9)[5] ); printf("%-3i B mass : %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% \n" , 9, 100.*(*npe10)[1], 100.*(*npe10)[2], 100.*(*npe10)[3], 100.*(*npe10)[4], 100.*(*npe10)[5], 100.*(*npe10)[1]-100.*(*npe10)[5] ); printf(" Overall Eff: %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% \n" , 100.*(*npe1)[1], 100.*(*npe1)[2], 100.*(*npe1)[3], 100.*(*npe1)[4], 100.*(*npe1)[5], 100.*(*npe1)[1]-100.*(*npe1)[5] ); printf(" Error: %6.2f%% %6.2f%% %6.2f%% %6.2f%% %6.2f%% \n" , 100.*sqrt( ((*npe1)[1]*(1-(*npe1)[1]))/((*np1)[1]) ) , 100.*sqrt( ((*npe1)[2]*(1-(*npe1)[2]))/((*np1)[2]) ) , 100.*sqrt( ((*npe1)[3]*(1-(*npe1)[3]))/((*np1)[3]) ) , 100.*sqrt( ((*npe1)[4]*(1-(*npe1)[4]))/((*np1)[4]) ) , 100.*sqrt( ((*npe1)[5]*(1-(*npe1)[5]))/((*np1)[5]) ) ); } if(plotFD){ TCanvas* c4 = new TCanvas("c4","B FD info for "+filenamearg,1200,800); c4->SetFillColor(0); c4->SetBorderMode(0); c4->Divide(2,3); count = 1; c4->cd(count++); fd1->Draw(); c4->cd(count++); fd4->Draw(); c4->cd(count++); fd2->Draw(); c4->cd(count++); fd5->Draw(); c4->cd(count++); fd3->Draw(); c4->cd(count++); fd6->Draw(); TH1D* fdi2 = (TH1D*)fd2->Clone(); fdi2->SetTitle("intergral of fd2"); // Double_t integral = fd2->Integral(); for(Int_t ii = fd2->GetSize()-2; ii>0; ii--) (*fdi2)[ii] = ((Double_t)(*fdi2)[ii+1] + (Double_t)(*fd2)[ii]); fdi2->Scale(1.0/fd2->GetEntries()); /*c4->cd(count++); RooRealVar my_e("my_e","my_e",0,50); RooRealVar fitVarA("fitVarA","fit var a",-.1,-1000,1000); RooRealVar fitVarB("fitVarB","fit var b",-.1,-1000,1000); RooExponential expon("expFit", "exp fit",my_e, fitVarA); RooDataHist datafromhist3("data","data",RooArgList(my_e),fd1,1); expon.fitTo(datafromhist3); RooPlot* fdframe = my_e.frame(); fdframe->SetTitle("B_FD_OWNPV before cut fitted"); datafromhist->plotOn(fdframe); expon.plotOn(fdframe); fdframe->Draw();*/ c4->cd(); TFile *outFile = new TFile("outFile.BachelorAnalsys.5.root","RECREATE","B FD info for "+filenamearg); fd1->Write(); fd2->Write(); fd3->Write(); fd4->Write(); fd5->Write(); fd6->Write(); fdi2->Write(); outFile->Close(); } if(plotBkSig){ TCanvas* c5 = new TCanvas("c5","Signal info for "+filenamearg,1200,800); c5->SetFillColor(0); c5->SetBorderMode(0); c5->Divide(2,3); count = 1; c5->cd(count++); si1->Draw("lego"); c5->cd(count++); si2->Draw(); c5->cd(count++); si3->Draw(); c5->cd(count++); si4->Draw(); c5->cd(count++); si5->Draw(); c5->cd(count++); si6->Draw(); c5->cd(); TCanvas* c6 = new TCanvas("c6","Background info for "+filenamearg,1200,800); c6->SetFillColor(0); c6->SetBorderMode(0); c6->Divide(2,3); count = 1; c6->cd(count++); bk1->Draw("surf"); c6->cd(count++); bk2->Draw(); c6->cd(count++); bk3->Draw(); c6->cd(count++); bk4->Draw(); c6->cd(count++); bk5->Draw(); c6->cd(count++); bk6->Draw(); c6->cd(); TFile* outFile = new TFile("outFile.BachelorAnalsys.6.root","RECREATE","Signal and Background info for "+filenamearg); si1->Write(); si2->Write(); si3->Write(); si4->Write(); si5->Write(); si6->Write(); bk1->Write(); bk2->Write(); bk3->Write(); bk4->Write(); bk5->Write(); bk6->Write(); outFile->Close(); } if(plotCos){ TCanvas* c7 = new TCanvas("c7","cos and ips info of the d for "+filenamearg,1200,800); c7->SetFillColor(0); c7->SetBorderMode(0); c7->Divide(3,3); count = 1; TH1D* cos3 = IntergrateFromRHS(cos1); TH1D* ips3 = IntergrateFromRHS(ips1); c7->cd(count++); cos1->Draw(); c7->cd(count++); cos2->Draw(); c7->cd(count++); cos3->Draw(); c7->cd(count++); ips1->Draw(); c7->cd(count++); ips2->Draw(); c7->cd(count++); ips3->Draw(); c7->cd(count++); mpv1->Draw(); c7->cd(count++); mpv2->Draw(); c7->cd(); TFile *outFile = new TFile("outFile.BachelorAnalsys.7.root","RECREATE","cos and ips info of the d for "+filenamearg); cos1->Write(); cos2->Write(); cos3->Write(); cos4->Write(); cos5->Write(); ips1->Write(); ips2->Write(); ips3->Write(); mpv1->Write(); mpv2->Write(); outFile->Close(); } Long64_t lnentries = lumiChain->GetEntries(); Long64_t lnbytes = 0, lnb = 0; Float_t totLumi = 0.0; Float_t totLumiErr = 0.0; for (Long64_t ljentry=0; ljentryGetEntry(ljentry); lnbytes += lnb; totLumi += IntegratedLuminosity; totLumiErr += IntegratedLuminosityErr; // cout << "Lumi: " << totLumi << " +/- " << IntegratedLuminosityErr << endl; } totLumi *= 1000; totLumiErr *= 1000; // decided to start from 2 not one as counter is the second one Float_t eff2 = ((Float_t)counter2)/((Float_t)counter1); Float_t eff3 = ((Float_t)counter3)/((Float_t)counter2); Float_t eff4 = ((Float_t)counter4)/((Float_t)counter3); Float_t eff5 = ((Float_t)counter5)/((Float_t)counter4); Float_t eff6 = ((Float_t)counter6)/((Float_t)counter5); Float_t eff7 = ((Float_t)counter7)/((Float_t)counter6); Float_t eff8 = ((Float_t)counter8)/((Float_t)counter7); Float_t eff9 = ((Float_t)counter9)/((Float_t)counter8); Float_t eff10 = ((Float_t)counter10)/((Float_t)counter9); // this is 7 and not 8 as cuts from between 7 and 8 dont effect // the ones at 9 see the code Float_t overalleff = ((Float_t)counter10)/((Float_t)counter1); Float_t efferr2 = sqrt( (eff2*(1-eff2)) / ((Float_t)counter1) ); Float_t efferr3 = sqrt( (eff3*(1-eff3)) / ((Float_t)counter2) ); Float_t efferr4 = sqrt( (eff4*(1-eff4)) / ((Float_t)counter3) ); Float_t efferr5 = sqrt( (eff5*(1-eff5)) / ((Float_t)counter4) ); Float_t efferr6 = sqrt( (eff6*(1-eff6)) / ((Float_t)counter5) ); Float_t efferr7 = sqrt( (eff7*(1-eff7)) / ((Float_t)counter6) ); Float_t efferr8 = sqrt( (eff8*(1-eff8)) / ((Float_t)counter7) ); Float_t efferr9 = sqrt( (eff9*(1-eff9)) / ((Float_t)counter8) ); Float_t efferr10 = sqrt( (eff10*(1-eff10)) / ((Float_t)counter9) ); // this is 7 and not 8 as cuts from between 7 and 8 dont effect // the ones at 9 see the code Float_t overallefferr = sqrt( (overalleff*(1-overalleff)) / ((Float_t)counter1) ); cout << endl << endl << "B mass fit" << endl; printf(" sigma : %8.2e MeV +/- %6.2e MeV\n", SigWidthPi.getVal(), SigWidthPi.getError()); printf(" mean : %8.2e MeV +/- %6.2e MeV\n", SigMeanPi.getVal(), SigMeanPi.getError()); printf(" del mean: %8.2e MeV +/- %6.2e MeV\n", abs(B_M_Official - SigMeanPi.getVal()), SigMeanPi.getError()); printf(" fsig : %8.2e +/- %6.2e \n", fsigPi.getVal(), fsigPi.getError()); printf(" N*fsig : %8.2e +/- %6.2e \n", fsigPi.getVal()*fbm1->GetEntries(), fsigPi.getError()*fbm1->GetEntries()); printf(" N : %8.2e\n", fbm1->GetEntries()); cout << endl << endl << "Cut info: " << endl; printf("%-3i tot lumi : %8.2e nb-1 +/- %6.2e nb-1\n", 0, totLumi, totLumiErr); printf("%-3i tot cands : %8i\n", 0, counter0); printf("%-3i evt bfr cut: %8i\n", 1, counter1); printf("%-3i D daughter : %8i %6.2f%% +/- %6.2f%%\n", 2, counter2, 100.*eff2, 100.*efferr2); printf("%-3i bachelor : %8i %6.2f%% +/- %6.2f%%\n", 3, counter3, 100.*eff3, 100.*efferr3); printf("%-3i after D cut: %8i %6.2f%% +/- %6.2f%%\n", 4, counter4, 100.*eff4, 100.*efferr4); printf("%-3i after B cut: %8i %6.2f%% +/- %6.2f%%\n", 5, counter5, 100.*eff5, 100.*efferr5); printf("%-3i after PID : %8i %6.2f%% +/- %6.2f%%\n", 6, counter6, 100.*eff6, 100.*efferr6); printf("%-3i nPV : %8i %6.2f%% +/- %6.2f%%\n", 7, counter7, 100.*eff7, 100.*efferr7); printf("%-3i event num : %8i %6.2f%% +/- %6.2f%%\n", 8, counter8, 100.*eff8, 100.*efferr8); printf("%-3i D mass : %8i %6.2f%% +/- %6.2f%%\n", 9, counter9, 100.*eff9, 100.*efferr9); printf("%-3i B mass : %8i %6.2f%% +/- %6.2f%%\n", 9, counter10, 100.*eff10, 100.*efferr10); printf(" Overall Eff: %15.2f%% +/- %6.2f%%\n", 100.*overalleff, 100.*overallefferr); } int main () { // BachelorAnalsys("../stripping/MCdiffStripCuts/up/all/Bu2DStarplusX.root",-1,"",-1,true,true,true,true,true,true,true,true,true,true,true); // BachelorAnalsys("~/stuff/stripping/MCextraTruthTools/up/all/Bu2DStarplusX.root",-2,"../stripping/MCextraTruthTools/down/all/Bu2DStarplusX.root",-1,true,true,true,true,true,true,true,true,true,true,true); // BachelorAnalsys("~/stuff/stripping/MCsingleTree/down/all/Bu2DStarplusX.root",-2,"~/stuff/stripping/MCsingleTree/up/all/Bu2DStarplusX.root",-1,true,true,true,true,true,true,true,true,true,true,true); // BachelorAnalsys("~/stuff/batch-generate/dataSingleTree/down/all/B2Dpi_Down_6_7_2010.root",-2,"~/stuff/batch-generate/dataSingleTree/up/all/B2Dpi_up_6_7_2010.root",-1,true,true,true,true,true,true,true,true,true,true,true); // BachelorAnalsys("~/stuff/batch-generate/newData/ppd/all/B2Dpi_post_st_pete.root",-3,"~/stuff/batch-generate/dataSingleTree/down/all/B2Dpi_Down_6_7_2010.root",-1,true,true,true,true,true,true,true,true,true,true,true,"~/stuff/batch-generate/dataSingleTree/up/all/B2Dpi_up_6_7_2010.root"); // BachelorAnalsys("~/stuff/batch-generate/newData/ppd/twofiles/B2Dpi_post_st_pete.root",-1,"",100,true,true,true,true,true,true,true,true,true,true,true,"",""); // BachelorAnalsys("~/stuff/batch-generate/newData/ppd/all/B2Dpi_post_st_pete.root",-1,"",-1,true,true,true,true,true,true,true,true,true,true,true,"",""); // BachelorAnalsys("~/stuff/batch-generate/dataLumi/up/all/B2Dpi_Down_6_7_2010.root",-2,"~/stuff/batch-generate/dataLumi/down/all/B2Dpi_Down_6_7_2010.root",-1,true,true,true,true,true,true,true,true,true,true,true,"",""); // BachelorAnalsys("~/stuff/batch-generate/newData/grid/all/B2Dpi_post_st_pete.100.root",-1,"",-1,true,true,true,true,true,true,true,true,true,true,true,"",""); // BachelorAnalsys("~/stuff/batch-generate/str09Data/grid/1000files/B2Dpi_str09.all.except.6.root",-1,"",-1,true,true,true,true,true,true,true,true,true,true,true,"",""); // BachelorAnalsys("~/stuff/batch-generate/str09Data/grid/15k/B2Dpi_str09.half.root",-1,"",-1,true,true,true,true,true,true,true,true,true,true,true,"",""); //BachelorAnalsys("~/stuff/batch-generate/str09Data/grid/15k/B2Dpi_str09.over.half.root",-1,"",-1,true,true,true,true,true,true,true,true,true,true,true,"",""); // BachelorAnalsys("~/stuff/batch-generate/str09Data/grid/merged-all/B2Dpi_str09.part.root",-1,"",-1,true,true,true,true,true,true,true,true,true,true,true,"",""); BachelorAnalsys("/home/hep/uoh35620/stuff/batch-generate/str09Data/grid/merged-all/B2Dpi_str09.most.root",-1,"",-1,true,true,true,true,true,true,true,true,true,true,true,"",""); // BachelorAnalsys("~/stuff/stripping/MCtriggerSettings/down/all/Bu2DStarplusX.root",-1,"~/stuff/stripping/MCsingleTree/up/all/Bu2DStarplusX.root",-1,true,true,true,true,true,true,true,true,true,true,true,"",""); // BachelorAnalsys("~/stuff/batch-generate/newData/ppd/all/B2Dpi_post_st_pete.no-lumi-or-velo.root",-1,"",100,true,true,true,true,true,true,true,true,true,true,true,"",""); // BachelorAnalsys("~/stuff/batch-generate/dataSingleTree/down/all/B2Dpi_Down_6_7_2010.root",-2,"~/stuff/batch-generate/dataSingleTree/up/all/B2Dpi_up_6_7_2010.root",-1,false,false,true,false,false,false,true,true,true,true,true); // BachelorAnalsys("~/gangadir/workspace/uoh35620/LocalXML/49/0/output/B2Dpi_up_6_7_2010.root",-1,"",-1,true,true,true,true,true,true,true,true,true,true,true); //~/gangadir/workspace/uoh35620/LocalXML/50/0/output/Bu2DStarplusX.root } /* TString filenamearg, // filename of the first file to process or the first half of the filename Int_t nDataFiles=-1, // if set to -1 only load filenamearg, if -2 load filenamearg and dataSubFileName, // if >0 load filenamearg+i+dataSubFileName where i goes from 0 to nDataFiles TString dataSubFileName="", // second file to load or second part of the file name Int_t maxEvent=-1, // only process this many events, -1 for all Bool_t plotMPPT = true, // Plot M, p and PT for all particles Bool_t plotNPV = true, // Plot nPV data (efficiencies and nPV on a cut by cut basis) Bool_t plotMassByCut = true, // Plot B and D mass on a cut by cut basis Bool_t plotFD = true, // Plot Flight Distance and Tau data Bool_t plotBkSig = true, // Plot Background(Fringes) and signal comparasons Bool_t plotCos = true, Bool_t cutOnDaughters = true, Bool_t cutOnBachelor = true, Bool_t cutOnPID = true, Bool_t cutOnDMass = true, Bool_t cutOnEventNr = true */