////////////////////////////////////////////////////////// // This class has been automatically generated on // Fri Apr 17 10:02:31 2009 by ROOT version 5.18/00 // from TTree trkeff/Tracking Efficiency // found on file: hd_root_1344002.root ////////////////////////////////////////////////////////// #ifndef hd_res_charged_selector_h #define hd_res_charged_selector_h #include #include #include #include class hd_res_charged_selector : public TSelector { public : TTree *fChain; //!pointer to the analyzed TTree or TChain // Declaration of leaf types //track *E; UInt_t fUniqueID; UInt_t fBits; TVector3 pthrown; TVector3 pfit; TVector3 pfit_wire; TVector3 pcan; Double_t trk_chisq; Int_t trk_Ndof; Double_t trk_chisq_wb; Int_t trk_Ndof_wb; Double_t delta_pt_over_pt; Double_t delta_theta; Double_t delta_phi; Bool_t isreconstructable; Int_t Nstereo; Int_t Ncdc; Int_t Nfdc; Int_t NLR_bad_stereo; Int_t NLR_bad; ULong_t event; // List of branches TBranch *b_E_fUniqueID; //! TBranch *b_E_fBits; //! TBranch *b_E_pthrown; //! TBranch *b_E_pfit; //! TBranch *b_E_pfit_wire; //! TBranch *b_E_pcan; //! TBranch *b_E_trk_chisq; //! TBranch *b_E_trk_Ndof; //! TBranch *b_E_trk_chisq_wb; //! TBranch *b_E_trk_Ndof_wb; //! TBranch *b_E_delta_pt_over_pt; //! TBranch *b_E_delta_theta; //! TBranch *b_E_delta_phi; //! TBranch *b_E_isreconstructable; //! TBranch *b_E_Nstereo; //! TBranch *b_E_Ncdc; //! TBranch *b_E_Nfdc; //! TBranch *b_E_NLR_bad_stereo; //! TBranch *b_E_NLR_bad; //! TBranch *b_E_event; //! hd_res_charged_selector(TTree * /*tree*/ =0) { } virtual ~hd_res_charged_selector() { } virtual Int_t Version() const { return 2; } virtual void Begin(TTree *tree); virtual void SlaveBegin(TTree *tree); virtual void Init(TTree *tree); virtual Bool_t Notify(); virtual Bool_t Process(Long64_t entry); virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; } virtual void SetOption(const char *option) { fOption = option; } virtual void SetObject(TObject *obj) { fObject = obj; } virtual void SetInputList(TList *input) { fInput = input; } virtual TList *GetOutputList() const { return fOutput; } virtual void SlaveTerminate(); virtual void Terminate(); //--------- My histograms --------- // Efficiency TH2D *eff_vs_p_vs_theta; TH2D *eff_numerator; TH2D *eff_denominator; TH2D *eff_denominator_nhits_cut; TH2D *eff_vs_p_vs_theta_wb; TH2D *eff_numerator_wb; TH2D *prob_vs_theta; TH2D *prob_vs_theta_wb; // MomRes TH3D *momRes3D; TH3D *trans_momRes3D; // ThetaRes TH3D *thetaRes3D; // ThetaRes TH3D *phiRes3D; // Nhits TH2D *Ncdchits; TH2D *Nfdchits; // Chisq TH3D *trk_chisq_per_Ndof; int Nevents_processed; ClassDef(hd_res_charged_selector,0); }; #endif #ifdef hd_res_charged_selector_cxx void hd_res_charged_selector::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; fChain->SetMakeClass(1); fChain->SetBranchAddress("fUniqueID", &fUniqueID, &b_E_fUniqueID); fChain->SetBranchAddress("fBits", &fBits, &b_E_fBits); fChain->SetBranchAddress("pthrown", &pthrown, &b_E_pthrown); fChain->SetBranchAddress("pfit", &pfit, &b_E_pfit); fChain->SetBranchAddress("pfit_wire", &pfit_wire, &b_E_pfit_wire); fChain->SetBranchAddress("pcan", &pcan, &b_E_pcan); fChain->SetBranchAddress("trk_chisq", &trk_chisq, &b_E_trk_chisq); fChain->SetBranchAddress("trk_Ndof", &trk_Ndof, &b_E_trk_Ndof); fChain->SetBranchAddress("trk_chisq_wb", &trk_chisq_wb, &b_E_trk_chisq_wb); fChain->SetBranchAddress("trk_Ndof_wb", &trk_Ndof_wb, &b_E_trk_Ndof_wb); fChain->SetBranchAddress("delta_pt_over_pt", &delta_pt_over_pt, &b_E_delta_pt_over_pt); fChain->SetBranchAddress("delta_theta", &delta_theta, &b_E_delta_theta); fChain->SetBranchAddress("delta_phi", &delta_phi, &b_E_delta_phi); fChain->SetBranchAddress("isreconstructable", &isreconstructable, &b_E_isreconstructable); fChain->SetBranchAddress("Nstereo", &Nstereo, &b_E_Nstereo); fChain->SetBranchAddress("Ncdc", &Ncdc, &b_E_Ncdc); fChain->SetBranchAddress("Nfdc", &Nfdc, &b_E_Nfdc); fChain->SetBranchAddress("NLR_bad_stereo", &NLR_bad_stereo, &b_E_NLR_bad_stereo); fChain->SetBranchAddress("NLR_bad", &NLR_bad, &b_E_NLR_bad); fChain->SetBranchAddress("event", &event, &b_E_event); } Bool_t hd_res_charged_selector::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; } #endif // #ifdef hd_res_charged_selector_cxx