////////////////////////////////////////////////////////// // This class has been automatically generated on // Tue Jul 20 15:50:54 2010 by ROOT version 5.27/04 // from TTree CPmix/CPMixTree // found on file: b0b0_run1_1.root ////////////////////////////////////////////////////////// #ifndef CPmix_h #define CPmix_h #include #include #include #include #include class CPmix { public : TTree *fChain; //!pointer to the analyzed TTree or TChain Int_t fCurrent; //!current Tree number in a TChain // Declaration of leaf types Float_t Mnu2; Float_t BetaGamma; Float_t Wevt; Int_t LPId; Float_t PxLep; Float_t PyLep; Float_t PzLep; Float_t PrbPil; Float_t ZVDec; Float_t eVDec; Int_t EvtKnd; Float_t zDec; Float_t zTag; Float_t deltaT; Int_t OscTag; Int_t IsSgn; Int_t nTk; Int_t TkTag[17]; //[nTk] Float_t TkPx[17]; //[nTk] Float_t TkPy[17]; //[nTk] Float_t TkPz[17]; //[nTk] Float_t TkPVt[17]; //[nTk] Float_t TkZVt[17]; //[nTk] Float_t TkeVt[17]; //[nTk] Int_t TkPVec[17]; //[nTk] // List of branches TBranch *b_Mnu2; //! TBranch *b_BetaGamma; //! TBranch *b_Wevt; //! TBranch *b_LPId; //! TBranch *b_PxLep; //! TBranch *b_PyLep; //! TBranch *b_PzLep; //! TBranch *b_PrbPil; //! TBranch *b_ZVDec; //! TBranch *b_eVDec; //! TBranch *b_EvtKnd; //! TBranch *b_zDec; //! TBranch *b_zTag; //! TBranch *b_deltaT; //! TBranch *b_OscTag; //! TBranch *b_IsSgn; //! TBranch *b_nTk; //! TBranch *b_TkTag; //! TBranch *b_TkPx; //! TBranch *b_TkPy; //! TBranch *b_TkPz; //! TBranch *b_TkPVt; //! TBranch *b_TkZVt; //! TBranch *b_TkeVt; //! TBranch *b_TkPVec; //! CPmix(TTree *tree=0); virtual ~CPmix(); virtual Int_t Cut(Long64_t entry); virtual Int_t GetEntry(Long64_t entry); virtual Long64_t LoadTree(Long64_t entry); virtual void Init(TTree *tree); virtual void Loop( int nmax=999999 , int step=1, char* FileName="Output.hist" ); virtual Bool_t Notify(); virtual void Show(Long64_t entry = -1); virtual int Hfill( char* hName , Double_t var, Int_t n, Double_t xmin, Double_t xmax, Double_t w ) ; virtual int Hfill( char* hName , int ijk, Double_t var, Int_t n, Double_t xmin, Double_t xmax, Double_t w ) ; virtual int Hfill( char* hName , Double_t xvar, Int_t nx, Double_t xmin, Double_t xmax, Double_t yvar, Int_t ny, Double_t ymin, Double_t ymax, Double_t w ) ; virtual int GetCharge( int ) ; virtual int GetTrackSource( int ) ; virtual double GetMass( int ) ; virtual void ComputeTrackSum( int i , int *Q , TLorentzVector *Tk, double *ZV, double *eV, int* nel, int *nmu, int *nka, int* ntot ) ; virtual double CosAng( TLorentzVector *a, TLorentzVector *b ) ; virtual double DeltaM( TLorentzVector *a, TLorentzVector *b ) ; virtual double MissingMass( TLorentzVector *a, TLorentzVector *b ) ; virtual double SquareMissingMass( TLorentzVector *a, TLorentzVector *b ) ; virtual bool GoodTrack( int i ) ; virtual double ComputeChi2( double z, int lowercut, int uppercut ) ; virtual void analyze(); virtual void EndJob( char* OutputFileName ) ; virtual void SaveHist( char* FileName ); virtual void NormalizeBySlice( TH2F* h ) ; virtual void NormalizeHist( TH1F* h ) ; }; #endif #ifdef CPmix_cxx CPmix::CPmix(TTree *tree) { // if parameter tree is not specified (or zero), connect the file // used to generate this class and read the Tree. if (tree == 0) { TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("b0b0_run1_1.root"); if (!f) { f = new TFile("b0b0_run1_1.root"); } tree = (TTree*)gDirectory->Get("CPmix"); } Init(tree); } CPmix::~CPmix() { if (!fChain) return; delete fChain->GetCurrentFile(); } Int_t CPmix::GetEntry(Long64_t entry) { // Read contents of entry. if (!fChain) return 0; return fChain->GetEntry(entry); } Long64_t CPmix::LoadTree(Long64_t entry) { // Set the environment to read one entry if (!fChain) return -5; Long64_t centry = fChain->LoadTree(entry); if (centry < 0) return centry; if (!fChain->InheritsFrom(TChain::Class())) return centry; TChain *chain = (TChain*)fChain; if (chain->GetTreeNumber() != fCurrent) { fCurrent = chain->GetTreeNumber(); Notify(); } return centry; } void CPmix::Init(TTree *tree) { // The Init() function is called when the selector needs to initialize // a new tree or chain. Typically here the branch addresses and branch // pointers of the tree will be set. // It is normally not necessary to make changes to the generated // code, but the routine can be extended by the user if needed. // Init() will be called many times when running on PROOF // (once per file to be processed). // Set branch addresses and branch pointers if (!tree) return; fChain = tree; fCurrent = -1; fChain->SetMakeClass(1); fChain->SetBranchAddress("Mnu2", &Mnu2, &b_Mnu2); fChain->SetBranchAddress("BetaGamma", &BetaGamma, &b_BetaGamma); fChain->SetBranchAddress("Wevt", &Wevt, &b_Wevt); fChain->SetBranchAddress("LPId", &LPId, &b_LPId); fChain->SetBranchAddress("PxLep", &PxLep, &b_PxLep); fChain->SetBranchAddress("PyLep", &PyLep, &b_PyLep); fChain->SetBranchAddress("PzLep", &PzLep, &b_PzLep); fChain->SetBranchAddress("PrbPil", &PrbPil, &b_PrbPil); fChain->SetBranchAddress("ZVDec", &ZVDec, &b_ZVDec); fChain->SetBranchAddress("eVDec", &eVDec, &b_eVDec); fChain->SetBranchAddress("EvtKnd", &EvtKnd, &b_EvtKnd); fChain->SetBranchAddress("zDec", &zDec, &b_zDec); fChain->SetBranchAddress("zTag", &zTag, &b_zTag); fChain->SetBranchAddress("deltaT", &deltaT, &b_deltaT); fChain->SetBranchAddress("OscTag", &OscTag, &b_OscTag); fChain->SetBranchAddress("IsSgn", &IsSgn, &b_IsSgn); fChain->SetBranchAddress("nTk", &nTk, &b_nTk); fChain->SetBranchAddress("TkTag", TkTag, &b_TkTag); fChain->SetBranchAddress("TkPx", TkPx, &b_TkPx); fChain->SetBranchAddress("TkPy", TkPy, &b_TkPy); fChain->SetBranchAddress("TkPz", TkPz, &b_TkPz); fChain->SetBranchAddress("TkPVt", TkPVt, &b_TkPVt); fChain->SetBranchAddress("TkZVt", TkZVt, &b_TkZVt); fChain->SetBranchAddress("TkeVt", TkeVt, &b_TkeVt); fChain->SetBranchAddress("TkPVec", TkPVec, &b_TkPVec); Notify(); } Bool_t CPmix::Notify() { // The Notify() function is called when a new file is opened. This // can be either for a new TTree in a TChain or when when a new TTree // is started when using PROOF. It is normally not necessary to make changes // to the generated code, but the routine can be extended by the // user if needed. The return value is currently not used. return kTRUE; } void CPmix::Show(Long64_t entry) { // Print contents of entry. // If entry is not specified, print current entry if (!fChain) return; fChain->Show(entry); } Int_t CPmix::Cut(Long64_t entry) { // This function may be called from Loop. // returns 1 if entry is accepted. // returns -1 otherwise. if( PrbPil < 0.001 ) return -1 ; if( eVDec <= 0 ) return -2 ; if( eVDec > 0.05 ) return -3 ; return 1; } #endif // #ifdef CPmix_cxx