////////////////////////////////////////////////////////// // This class has been automatically generated on // Wed Nov 1 13:53:23 2006 by ROOT version 4.00/08 // from TTree T/Hall A Analyzer Output DST // found on file: ../../root/e03104_1880.root ////////////////////////////////////////////////////////// #ifndef E03104_h #define E03104_h #include #include #include class E03104 { public : // Int_t fCurrent; //!current Tree number in a TChain // newstyle: true if we're using a file from q05_hbook (i.e. old hallA) // // cstyle: true if we're using a file from hall C gep/gep2gamma // // false if we're using the original root file (E03104) // Bool_t newstyle; Bool_t cstyle; // Declaration of leaf types Int_t Ndata_L_tr_ph; Double_t L_tr_ph[5]; //[Ndata.L.tr.ph] Int_t Ndata_L_tr_tg_dp; Double_t L_tr_tg_dp[5]; //[Ndata.L.tr.tg_dp] Int_t Ndata_L_tr_tg_ph; Double_t L_tr_tg_ph[5]; //[Ndata.L.tr.tg_ph] Int_t Ndata_L_tr_tg_th; Double_t L_tr_tg_th[5]; //[Ndata.L.tr.tg_th] Int_t Ndata_L_tr_tg_y; Double_t L_tr_tg_y[5]; //[Ndata.L.tr.tg_y] Int_t Ndata_L_tr_th; Double_t L_tr_th[5]; //[Ndata.L.tr.th] Int_t Ndata_R_tr_tg_dp; Double_t R_tr_tg_dp[10]; //[Ndata.R.tr.tg_dp] Int_t Ndata_R_tr_tg_ph; Double_t R_tr_tg_ph[10]; //[Ndata.R.tr.tg_ph] Int_t Ndata_R_tr_tg_th; Double_t R_tr_tg_th[10]; //[Ndata.R.tr.tg_th] Int_t Ndata_R_tr_tg_y; Double_t R_tr_tg_y[10]; //[Ndata.R.tr.tg_y] Double_t Beam_HL_helicity; Double_t EKxc_R_Q2; Double_t EKxc_R_q_x; Double_t EKxc_R_q_y; Double_t EKxc_R_q_z; Double_t L_fpp_conetest; Double_t L_fpp_coneteste; Double_t L_fpp_ntrackfu; Double_t L_fpp_ntrackfv; Double_t L_fpp_ph_az; Double_t L_fpp_sclose; Double_t L_fpp_th_az; Double_t L_fpp_zclose; Double_t L_gold_p; Double_t L_gold_ph; Double_t L_gold_th; Double_t L_gold_x; Double_t L_gold_y; Double_t L_tr_n; Double_t R_gold_p; Double_t R_gold_ph; Double_t R_gold_th; Double_t R_gold_x; Double_t R_gold_y; Double_t R_tr_n; Double_t ReactPt_L_z; Double_t ReactPt_R_z; Double_t SK_Erecoil; Double_t SK_Mrecoil; Double_t SK_pmiss; //THaEvent *Event_Branch; UInt_t fEvtHdr_fEvtNum; Int_t fEvtHdr_fEvtType; Int_t fEvtHdr_fEvtLen; Double_t fEvtHdr_fEvtTime; Int_t fEvtHdr_fHelicity; Int_t fEvtHdr_fRun; // for the new format: Float_t Thtra; Float_t Phtra; Float_t Dppc; Float_t Ph_tgt; Float_t Th_tgt; Float_t Y_tgt; Float_t Ph_tgte; Float_t Th_tgte; Float_t Helicite; Float_t Ph_fpp; Float_t Th_fpp; Float_t Pzclose; Float_t Pp; Float_t Ytra; Float_t E_miss; Float_t P_miss; // for hall C format: Float_t evid; Float_t trigtype; Float_t ctimeh; Float_t ctimeb; Float_t nh1; Float_t nh2; Float_t nb; Float_t h1time; Float_t h2time; Float_t btime; Float_t Q2; Float_t Q2_h; Float_t Q2_b; Float_t E_e; Float_t P_p; Float_t Pel_hthe; Float_t delta; Float_t xfp; Float_t yfp; Float_t xpfp; Float_t ypfp; Float_t xptar; Float_t yptar; Float_t ytar; Float_t epsilon; Float_t etheta; Float_t ephi; Float_t ptheta; Float_t pphi; Float_t Emiss; Float_t Pmiss; Float_t Pmissx; Float_t Pmissy; Float_t Pmissz; Float_t W2; Float_t Mmiss; Float_t helicite; Float_t ntrack1; Float_t ntrack2; Float_t trk1; Float_t zclos1; Float_t sclos1; Float_t conet1; Float_t theta1; Float_t phi1; Float_t trk2; Float_t zclos2; Float_t sclos2; Float_t conet2; Float_t theta2; Float_t phi2; // List of branches (not used) // the //! stuff apparently means something to ROOT // see the ROOT documentation /* TBranch *b_Ndata_L_tr_ph; //! TBranch *b_L_tr_ph; //! TBranch *b_Ndata_L_tr_tg_dp; //! TBranch *b_L_tr_tg_dp; //! TBranch *b_Ndata_L_tr_tg_ph; //! TBranch *b_L_tr_tg_ph; //! TBranch *b_Ndata_L_tr_tg_th; //! TBranch *b_L_tr_tg_th; //! TBranch *b_Ndata_L_tr_tg_y; //! TBranch *b_L_tr_tg_y; //! TBranch *b_Ndata_L_tr_th; //! TBranch *b_L_tr_th; //! TBranch *b_Ndata_R_tr_tg_dp; //! TBranch *b_R_tr_tg_dp; //! TBranch *b_Ndata_R_tr_tg_ph; //! TBranch *b_R_tr_tg_ph; //! TBranch *b_Ndata_R_tr_tg_th; //! TBranch *b_R_tr_tg_th; //! TBranch *b_Ndata_R_tr_tg_y; //! TBranch *b_R_tr_tg_y; //! TBranch *b_Beam_HL_helicity; //! TBranch *b_EKxc_R_Q2; //! TBranch *b_EKxc_R_q_x; //! TBranch *b_EKxc_R_q_y; //! TBranch *b_EKxc_R_q_z; //! TBranch *b_L_fpp_conetest; //! TBranch *b_L_fpp_coneteste; //! TBranch *b_L_fpp_ntrackfu; //! TBranch *b_L_fpp_ntrackfv; //! TBranch *b_L_fpp_ph_az; //! TBranch *b_L_fpp_sclose; //! TBranch *b_L_fpp_th_az; //! TBranch *b_L_fpp_zclose; //! TBranch *b_L_gold_p; //! TBranch *b_L_gold_ph; //! TBranch *b_L_gold_th; //! TBranch *b_L_gold_x; //! TBranch *b_L_gold_y; //! TBranch *b_L_tr_n; //! TBranch *b_R_gold_p; //! TBranch *b_R_gold_ph; //! TBranch *b_R_gold_th; //! TBranch *b_R_gold_x; //! TBranch *b_R_gold_y; //! TBranch *b_R_tr_n; //! TBranch *b_ReactPt_L_z; //! TBranch *b_ReactPt_R_z; //! TBranch *b_SK_Erecoil; //! TBranch *b_SK_Mrecoil; //! TBranch *b_SK_pmiss; //! TBranch *b_Event_Branch_fEvtHdr_fEvtNum; //! TBranch *b_Event_Branch_fEvtHdr_fEvtType; //! TBranch *b_Event_Branch_fEvtHdr_fEvtLen; //! TBranch *b_Event_Branch_fEvtHdr_fEvtTime; //! TBranch *b_Event_Branch_fEvtHdr_fHelicity; //! TBranch *b_Event_Branch_fEvtHdr_fRun; //! */ E03104(TTree *tree=0); ~E03104(); // Int_t Cut(Int_t entry); // Int_t GetEntry(Int_t entry); // Int_t LoadTree(Int_t entry); private: void Init(TTree *tree); TTree *fChain; //!pointer to the analyzed TTree or TChain // void Loop(); // Bool_t Notify(); // void Show(Int_t entry = -1); }; #endif #ifdef E03104_cxx E03104::E03104(TTree *tree) { if (tree == 0) { cout << "Uh oh. No tree to initialize.\n"; exit(1); } // 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("../../root/e03104_1880.root"); if (!f) f = new TFile("../../root/e03104_1880.root"); tree = (TTree*)gDirectory->Get("T"); }*/ Init(tree); } E03104::~E03104() { if (!fChain) return; delete fChain->GetCurrentFile(); } /* Int_t E03104::GetEntry(Int_t entry) { // Read contents of entry. if (!fChain) return 0; return fChain->GetEntry(entry); } Int_t E03104::LoadTree(Int_t entry) { // Set the environment to read one entry if (!fChain) return -5; Int_t centry = fChain->LoadTree(entry); if (centry < 0) return centry; if (fChain->IsA() != TChain::Class()) return centry; TChain *chain = (TChain*)fChain; if (chain->GetTreeNumber() != fCurrent) { fCurrent = chain->GetTreeNumber(); Notify(); } return centry; } */ void E03104::Init(TTree *tree) { // The Init() function is called when the selector needs to initialize // a new tree or chain. Typically here the branch addresses 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 with PROOF. // Set branch addresses if (tree == 0) return; fChain = tree; //fCurrent = -1; // SetMakeClass(1) is called because this file was apparently generated automatically by ROOT // not quite sure what it does fChain->SetMakeClass(1); // if we are using the original root file, which contains // Ndata.L.tr.ph (among other variables), then newstyle = false. // Otherwise newstyle = true newstyle = (fChain->GetBranch("Ndata.L.tr.ph") == NULL); if (newstyle) { cstyle = (fChain->GetBranch("P.zclose") == NULL); if (cstyle) { fChain->SetBranchAddress("evid",&evid); fChain->SetBranchAddress("trigtype",&trigtype); fChain->SetBranchAddress("ctimeh",&ctimeh); fChain->SetBranchAddress("ctimeb",&ctimeb); fChain->SetBranchAddress("nh1",&nh1); fChain->SetBranchAddress("nh2",&nh2); fChain->SetBranchAddress("nb",&nb); fChain->SetBranchAddress("h1time",&h1time); fChain->SetBranchAddress("h2time",&h2time); fChain->SetBranchAddress("btime",&btime); fChain->SetBranchAddress("Q2",&Q2); fChain->SetBranchAddress("Q2_h",&Q2_h); fChain->SetBranchAddress("Q2_b",&Q2_b); fChain->SetBranchAddress("E_e",&E_e); fChain->SetBranchAddress("P_p",&P_p); fChain->SetBranchAddress("Pel_hthe",&Pel_hthe); fChain->SetBranchAddress("delta",&delta); fChain->SetBranchAddress("xfp",&xfp); fChain->SetBranchAddress("yfp",&yfp); fChain->SetBranchAddress("xpfp",&xpfp); fChain->SetBranchAddress("ypfp",&ypfp); fChain->SetBranchAddress("xptar",&xptar); fChain->SetBranchAddress("yptar",&yptar); fChain->SetBranchAddress("ytar",&ytar); fChain->SetBranchAddress("epsilon",&epsilon); fChain->SetBranchAddress("etheta",ðeta); fChain->SetBranchAddress("ephi",&ephi); fChain->SetBranchAddress("ptheta",&ptheta); fChain->SetBranchAddress("pphi",&pphi); fChain->SetBranchAddress("Emiss",&Emiss); fChain->SetBranchAddress("Pmiss",&Pmiss); fChain->SetBranchAddress("Pmissx",&Pmissx); fChain->SetBranchAddress("Pmissy",&Pmissy); fChain->SetBranchAddress("Pmissz",&Pmissz); fChain->SetBranchAddress("W2",&W2); fChain->SetBranchAddress("Mmiss",&Mmiss); fChain->SetBranchAddress("helicite",&helicite); fChain->SetBranchAddress("ntrack1",&ntrack1); fChain->SetBranchAddress("ntrack2",&ntrack2); fChain->SetBranchAddress("trk1",&trk1); fChain->SetBranchAddress("zclos1",&zclos1); fChain->SetBranchAddress("sclos1",&sclos1); fChain->SetBranchAddress("conet1",&conet1); fChain->SetBranchAddress("theta1",&theta1); fChain->SetBranchAddress("phi1",&phi1); fChain->SetBranchAddress("trk2",&trk2); fChain->SetBranchAddress("zclos2",&zclos2); fChain->SetBranchAddress("sclos2",&sclos2); fChain->SetBranchAddress("conet2",&conet2); fChain->SetBranchAddress("theta2",&theta2); fChain->SetBranchAddress("phi2",&phi2); } else { fChain->SetBranchAddress("Thtra",&Thtra); fChain->SetBranchAddress("Phtra",&Phtra); fChain->SetBranchAddress("Dppc",&Dppc); fChain->SetBranchAddress("Ph_tgt",&Ph_tgt); fChain->SetBranchAddress("Th_tgt",&Th_tgt); fChain->SetBranchAddress("Y_tgt",&Y_tgt); fChain->SetBranchAddress("Ph_tgte",&Ph_tgte); fChain->SetBranchAddress("Th_tgte",&Th_tgte); fChain->SetBranchAddress("Helicite",&Helicite); fChain->SetBranchAddress("Ph_fpp",&Ph_fpp); fChain->SetBranchAddress("Th_fpp",&Th_fpp); fChain->SetBranchAddress("P.zclose",&Pzclose); fChain->SetBranchAddress("Pp",&Pp); fChain->SetBranchAddress("Ytra",&Ytra); fChain->SetBranchAddress("E_miss",&E_miss); fChain->SetBranchAddress("P_miss",&P_miss); } } else { // we're using the old format fChain->SetBranchAddress("Ndata.L.tr.ph",&Ndata_L_tr_ph); fChain->SetBranchAddress("L.tr.ph",L_tr_ph); fChain->SetBranchAddress("Ndata.L.tr.tg_dp",&Ndata_L_tr_tg_dp); fChain->SetBranchAddress("L.tr.tg_dp",L_tr_tg_dp); fChain->SetBranchAddress("Ndata.L.tr.tg_ph",&Ndata_L_tr_tg_ph); fChain->SetBranchAddress("L.tr.tg_ph",L_tr_tg_ph); fChain->SetBranchAddress("Ndata.L.tr.tg_th",&Ndata_L_tr_tg_th); fChain->SetBranchAddress("L.tr.tg_th",L_tr_tg_th); fChain->SetBranchAddress("Ndata.L.tr.tg_y",&Ndata_L_tr_tg_y); fChain->SetBranchAddress("L.tr.tg_y",L_tr_tg_y); fChain->SetBranchAddress("Ndata.L.tr.th",&Ndata_L_tr_th); fChain->SetBranchAddress("L.tr.th",L_tr_th); fChain->SetBranchAddress("Ndata.R.tr.tg_dp",&Ndata_R_tr_tg_dp); fChain->SetBranchAddress("R.tr.tg_dp",R_tr_tg_dp); fChain->SetBranchAddress("Ndata.R.tr.tg_ph",&Ndata_R_tr_tg_ph); fChain->SetBranchAddress("R.tr.tg_ph",R_tr_tg_ph); fChain->SetBranchAddress("Ndata.R.tr.tg_th",&Ndata_R_tr_tg_th); fChain->SetBranchAddress("R.tr.tg_th",R_tr_tg_th); fChain->SetBranchAddress("Ndata.R.tr.tg_y",&Ndata_R_tr_tg_y); fChain->SetBranchAddress("R.tr.tg_y",R_tr_tg_y); fChain->SetBranchAddress("Beam.HL.helicity",&Beam_HL_helicity); fChain->SetBranchAddress("EKxc_R.Q2",&EKxc_R_Q2); fChain->SetBranchAddress("EKxc_R.q_x",&EKxc_R_q_x); fChain->SetBranchAddress("EKxc_R.q_y",&EKxc_R_q_y); fChain->SetBranchAddress("EKxc_R.q_z",&EKxc_R_q_z); fChain->SetBranchAddress("L.fpp.conetest",&L_fpp_conetest); fChain->SetBranchAddress("L.fpp.coneteste",&L_fpp_coneteste); fChain->SetBranchAddress("L.fpp.ntrackfu",&L_fpp_ntrackfu); fChain->SetBranchAddress("L.fpp.ntrackfv",&L_fpp_ntrackfv); fChain->SetBranchAddress("L.fpp.ph_az",&L_fpp_ph_az); fChain->SetBranchAddress("L.fpp.sclose",&L_fpp_sclose); fChain->SetBranchAddress("L.fpp.th_az",&L_fpp_th_az); fChain->SetBranchAddress("L.fpp.zclose",&L_fpp_zclose); fChain->SetBranchAddress("L.gold.p",&L_gold_p); fChain->SetBranchAddress("L.gold.ph",&L_gold_ph); fChain->SetBranchAddress("L.gold.th",&L_gold_th); fChain->SetBranchAddress("L.gold.x",&L_gold_x); fChain->SetBranchAddress("L.gold.y",&L_gold_y); fChain->SetBranchAddress("L.tr.n",&L_tr_n); fChain->SetBranchAddress("R.gold.p",&R_gold_p); fChain->SetBranchAddress("R.gold.ph",&R_gold_ph); fChain->SetBranchAddress("R.gold.th",&R_gold_th); fChain->SetBranchAddress("R.gold.x",&R_gold_x); fChain->SetBranchAddress("R.gold.y",&R_gold_y); fChain->SetBranchAddress("R.tr.n",&R_tr_n); fChain->SetBranchAddress("ReactPt_L.z",&ReactPt_L_z); fChain->SetBranchAddress("ReactPt_R.z",&ReactPt_R_z); fChain->SetBranchAddress("SK.Erecoil",&SK_Erecoil); fChain->SetBranchAddress("SK.Mrecoil",&SK_Mrecoil); fChain->SetBranchAddress("SK.pmiss",&SK_pmiss); fChain->SetBranchAddress("fEvtHdr.fEvtNum",&fEvtHdr_fEvtNum); fChain->SetBranchAddress("fEvtHdr.fEvtType",&fEvtHdr_fEvtType); fChain->SetBranchAddress("fEvtHdr.fEvtLen",&fEvtHdr_fEvtLen); fChain->SetBranchAddress("fEvtHdr.fEvtTime",&fEvtHdr_fEvtTime); fChain->SetBranchAddress("fEvtHdr.fHelicity",&fEvtHdr_fHelicity); fChain->SetBranchAddress("fEvtHdr.fRun",&fEvtHdr_fRun); } // Notify(); } /* Bool_t E03104::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. Typically here the branch pointers // will be retrieved. It is normally not necessary to make changes // to the generated code, but the routine can be extended by the // user if needed. // Get branch pointers b_Ndata_L_tr_ph = fChain->GetBranch("Ndata.L.tr.ph"); b_L_tr_ph = fChain->GetBranch("L.tr.ph"); b_Ndata_L_tr_tg_dp = fChain->GetBranch("Ndata.L.tr.tg_dp"); b_L_tr_tg_dp = fChain->GetBranch("L.tr.tg_dp"); b_Ndata_L_tr_tg_ph = fChain->GetBranch("Ndata.L.tr.tg_ph"); b_L_tr_tg_ph = fChain->GetBranch("L.tr.tg_ph"); b_Ndata_L_tr_tg_th = fChain->GetBranch("Ndata.L.tr.tg_th"); b_L_tr_tg_th = fChain->GetBranch("L.tr.tg_th"); b_Ndata_L_tr_tg_y = fChain->GetBranch("Ndata.L.tr.tg_y"); b_L_tr_tg_y = fChain->GetBranch("L.tr.tg_y"); b_Ndata_L_tr_th = fChain->GetBranch("Ndata.L.tr.th"); b_L_tr_th = fChain->GetBranch("L.tr.th"); b_Ndata_R_tr_tg_dp = fChain->GetBranch("Ndata.R.tr.tg_dp"); b_R_tr_tg_dp = fChain->GetBranch("R.tr.tg_dp"); b_Ndata_R_tr_tg_ph = fChain->GetBranch("Ndata.R.tr.tg_ph"); b_R_tr_tg_ph = fChain->GetBranch("R.tr.tg_ph"); b_Ndata_R_tr_tg_th = fChain->GetBranch("Ndata.R.tr.tg_th"); b_R_tr_tg_th = fChain->GetBranch("R.tr.tg_th"); b_Ndata_R_tr_tg_y = fChain->GetBranch("Ndata.R.tr.tg_y"); b_R_tr_tg_y = fChain->GetBranch("R.tr.tg_y"); b_Beam_HL_helicity = fChain->GetBranch("Beam.HL.helicity"); b_EKxc_R_Q2 = fChain->GetBranch("EKxc_R.Q2"); b_EKxc_R_q_x = fChain->GetBranch("EKxc_R.q_x"); b_EKxc_R_q_y = fChain->GetBranch("EKxc_R.q_y"); b_EKxc_R_q_z = fChain->GetBranch("EKxc_R.q_z"); b_L_fpp_conetest = fChain->GetBranch("L.fpp.conetest"); b_L_fpp_coneteste = fChain->GetBranch("L.fpp.coneteste"); b_L_fpp_ntrackfu = fChain->GetBranch("L.fpp.ntrackfu"); b_L_fpp_ntrackfv = fChain->GetBranch("L.fpp.ntrackfv"); b_L_fpp_ph_az = fChain->GetBranch("L.fpp.ph_az"); b_L_fpp_sclose = fChain->GetBranch("L.fpp.sclose"); b_L_fpp_th_az = fChain->GetBranch("L.fpp.th_az"); b_L_fpp_zclose = fChain->GetBranch("L.fpp.zclose"); b_L_gold_p = fChain->GetBranch("L.gold.p"); b_L_gold_ph = fChain->GetBranch("L.gold.ph"); b_L_gold_th = fChain->GetBranch("L.gold.th"); b_L_gold_x = fChain->GetBranch("L.gold.x"); b_L_gold_y = fChain->GetBranch("L.gold.y"); b_L_tr_n = fChain->GetBranch("L.tr.n"); b_R_gold_p = fChain->GetBranch("R.gold.p"); b_R_gold_ph = fChain->GetBranch("R.gold.ph"); b_R_gold_th = fChain->GetBranch("R.gold.th"); b_R_gold_x = fChain->GetBranch("R.gold.x"); b_R_gold_y = fChain->GetBranch("R.gold.y"); b_R_tr_n = fChain->GetBranch("R.tr.n"); b_ReactPt_L_z = fChain->GetBranch("ReactPt_L.z"); b_ReactPt_R_z = fChain->GetBranch("ReactPt_R.z"); b_SK_Erecoil = fChain->GetBranch("SK.Erecoil"); b_SK_Mrecoil = fChain->GetBranch("SK.Mrecoil"); b_SK_pmiss = fChain->GetBranch("SK.pmiss"); b_Event_Branch_fEvtHdr_fEvtNum = fChain->GetBranch("fEvtHdr.fEvtNum"); b_Event_Branch_fEvtHdr_fEvtType = fChain->GetBranch("fEvtHdr.fEvtType"); b_Event_Branch_fEvtHdr_fEvtLen = fChain->GetBranch("fEvtHdr.fEvtLen"); b_Event_Branch_fEvtHdr_fEvtTime = fChain->GetBranch("fEvtHdr.fEvtTime"); b_Event_Branch_fEvtHdr_fHelicity = fChain->GetBranch("fEvtHdr.fHelicity"); b_Event_Branch_fEvtHdr_fRun = fChain->GetBranch("fEvtHdr.fRun"); return kTRUE; } void E03104::Show(Int_t entry) { // Print contents of entry. // If entry is not specified, print current entry if (!fChain) return; fChain->Show(entry); } Int_t E03104::Cut(Int_t entry) { // This function may be called from Loop. // returns 1 if entry is accepted. // returns -1 otherwise. return 1; }*/ #endif // #ifdef E03104_cxx