////////////////////////////////////////////////////////// // This class has been automatically generated on // Sat Aug 8 22:12:21 2009 by ROOT version 5.18/00 // from TTree trkeff/Tracking Efficiency // found on file: ALT1_proton_no_truth177433.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 *F; UInt_t fUniqueID; UInt_t fBits; TVector3 pthrown; Int_t event; Int_t track; Int_t Ncdc; Int_t Nfdc; Int_t mech; Double_t dtheta_mech; Double_t dp_mech; UInt_t can_fUniqueID; UInt_t can_fBits; TVector3 can_p; Float_t can_trk_chisq; Int_t can_trk_Ndof; Int_t can_Ncdc; Int_t can_Nfdc; UInt_t trk_fUniqueID; UInt_t trk_fBits; TVector3 trk_p; Float_t trk_trk_chisq; Int_t trk_trk_Ndof; Int_t trk_Ncdc; Int_t trk_Nfdc; UInt_t part_fUniqueID; UInt_t part_fBits; TVector3 part_p; Float_t part_trk_chisq; Int_t part_trk_Ndof; Int_t part_Ncdc; Int_t part_Nfdc; // List of branches TBranch *b_F_fUniqueID; //! TBranch *b_F_fBits; //! TBranch *b_F_pthrown; //! TBranch *b_F_event; //! TBranch *b_F_track; //! TBranch *b_F_Ncdc; //! TBranch *b_F_Nfdc; //! TBranch *b_F_mech; //! TBranch *b_F_dtheta_mech; //! TBranch *b_F_dp_mech; //! TBranch *b_F_can_fUniqueID; //! TBranch *b_F_can_fBits; //! TBranch *b_F_can_p; //! TBranch *b_F_can_trk_chisq; //! TBranch *b_F_can_trk_Ndof; //! TBranch *b_F_can_Ncdc; //! TBranch *b_F_can_Nfdc; //! TBranch *b_F_trk_fUniqueID; //! TBranch *b_F_trk_fBits; //! TBranch *b_F_trk_p; //! TBranch *b_F_trk_trk_chisq; //! TBranch *b_F_trk_trk_Ndof; //! TBranch *b_F_trk_Ncdc; //! TBranch *b_F_trk_Nfdc; //! TBranch *b_F_part_fUniqueID; //! TBranch *b_F_part_fBits; //! TBranch *b_F_part_p; //! TBranch *b_F_part_trk_chisq; //! TBranch *b_F_part_trk_Ndof; //! TBranch *b_F_part_Ncdc; //! TBranch *b_F_part_Nfdc; //! 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 Histogams ------ // Efficiency TH2D *eff_vs_p_vs_theta; TH2D *eff_numerator; TH2D *eff_denominator; TH2D *eff_vs_p_vs_theta_wb; TH2D *eff_numerator_wb; TH2D *eff_denominator_wb; TH2D *prob_vs_theta; TH2D *prob_vs_theta_wb; // MomRes TH3D *momRes; TH3D *trans_momRes; // Theta and phi res. TH3D *thetaRes; TH3D *phiRes; // Nhits TH2D *Ncdchits; TH2D *Nfdchits; TH2D *Ncdchits_on_track; TH2D *Nfdchits_on_track; TH2D *Ncdchits_on_track_wb; TH2D *Nfdchits_on_track_wb; // Chisq TH3D *chisq_per_Ndof; TH3D *chisq_per_Ndof_wb; 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_F_fUniqueID); fChain->SetBranchAddress("fBits", &fBits, &b_F_fBits); fChain->SetBranchAddress("pthrown", &pthrown, &b_F_pthrown); fChain->SetBranchAddress("event", &event, &b_F_event); fChain->SetBranchAddress("track", &track, &b_F_track); fChain->SetBranchAddress("Ncdc", &Ncdc, &b_F_Ncdc); fChain->SetBranchAddress("Nfdc", &Nfdc, &b_F_Nfdc); fChain->SetBranchAddress("mech", &mech, &b_F_mech); fChain->SetBranchAddress("dtheta_mech", &dtheta_mech, &b_F_dtheta_mech); fChain->SetBranchAddress("dp_mech", &dp_mech, &b_F_dp_mech); fChain->SetBranchAddress("can.fUniqueID", &can_fUniqueID, &b_F_can_fUniqueID); fChain->SetBranchAddress("can.fBits", &can_fBits, &b_F_can_fBits); fChain->SetBranchAddress("can.p", &can_p, &b_F_can_p); fChain->SetBranchAddress("can.trk_chisq", &can_trk_chisq, &b_F_can_trk_chisq); fChain->SetBranchAddress("can.trk_Ndof", &can_trk_Ndof, &b_F_can_trk_Ndof); fChain->SetBranchAddress("can.Ncdc", &can_Ncdc, &b_F_can_Ncdc); fChain->SetBranchAddress("can.Nfdc", &can_Nfdc, &b_F_can_Nfdc); fChain->SetBranchAddress("trk.fUniqueID", &trk_fUniqueID, &b_F_trk_fUniqueID); fChain->SetBranchAddress("trk.fBits", &trk_fBits, &b_F_trk_fBits); fChain->SetBranchAddress("trk.p", &trk_p, &b_F_trk_p); fChain->SetBranchAddress("trk.trk_chisq", &trk_trk_chisq, &b_F_trk_trk_chisq); fChain->SetBranchAddress("trk.trk_Ndof", &trk_trk_Ndof, &b_F_trk_trk_Ndof); fChain->SetBranchAddress("trk.Ncdc", &trk_Ncdc, &b_F_trk_Ncdc); fChain->SetBranchAddress("trk.Nfdc", &trk_Nfdc, &b_F_trk_Nfdc); fChain->SetBranchAddress("part.fUniqueID", &part_fUniqueID, &b_F_part_fUniqueID); fChain->SetBranchAddress("part.fBits", &part_fBits, &b_F_part_fBits); fChain->SetBranchAddress("part.p", &part_p, &b_F_part_p); fChain->SetBranchAddress("part.trk_chisq", &part_trk_chisq, &b_F_part_trk_chisq); fChain->SetBranchAddress("part.trk_Ndof", &part_trk_Ndof, &b_F_part_trk_Ndof); fChain->SetBranchAddress("part.Ncdc", &part_Ncdc, &b_F_part_Ncdc); fChain->SetBranchAddress("part.Nfdc", &part_Nfdc, &b_F_part_Nfdc); } 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