123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372 |
- //////////////////////////////////////////////////////////
- // This class has been automatically generated on
- // Fri Mar 27 23:50:31 2015 by ROOT version 5.34/28
- // from TTree htree/Hadron EMC + TOF tree
- // found on file: 312471_0.root
- //////////////////////////////////////////////////////////
- #ifndef htree_h
- #define htree_h
- #include <TROOT.h>
- #include <TTree.h>
- #include <TFile.h>
- #include <TString.h>
- #include "error.h"
- #include "errno.h"
- // Header file for the classes stored in the TTree if any.
- // Fixed size dimensions of array or collections stored in the TTree if any.
- class htree {
- public :
- TTree *fChain; //!pointer to the analyzed TTree or TChain
- Int_t fCurrent; //!current Tree number in a TChain
- TFile *output;
- // Declaration of leaf types
- Int_t run;
- Float_t bbcz;
- Float_t cent;
- Float_t BbcT;
- Float_t QX10;
- Float_t QX11;
- Float_t QX12;
- Float_t QX13;
- Float_t QX14;
- Float_t QX15;
- Float_t QX16;
- Float_t QX17;
- Float_t QX18;
- Float_t QY10;
- Float_t QY11;
- Float_t QY12;
- Float_t QY13;
- Float_t QY14;
- Float_t QY15;
- Float_t QY16;
- Float_t QY17;
- Float_t QY18;
- Float_t bbcQY10;
- Float_t bbcQY11;
- Float_t bbcQY12;
- Float_t bbcQX10;
- Float_t bbcQX11;
- Float_t bbcQX12;
- Float_t mpcQY10;
- Float_t mpcQY11;
- Float_t mpcQY12;
- Float_t mpcQX10;
- Float_t mpcQX11;
- Float_t mpcQX12;
- Int_t nh;
- Float_t p[42]; //[nh]
- Short_t charge[42]; //[nh]
- Float_t phi0[42]; //[nh]
- Float_t the0[42]; //[nh]
- Short_t dcarm[42]; //[nh]
- Float_t pc3dz[42]; //[nh]
- Float_t pc3dphi[42]; //[nh]
- Float_t alpha[42]; //[nh]
- Float_t phi[42]; //[nh]
- Float_t zed[42]; //[nh]
- Short_t n0[42]; //[nh]
- Float_t tofdz[42]; //[nh]
- Float_t tofdphi[42]; //[nh]
- Float_t pc2dz[42]; //[nh]
- Float_t pc2dphi[42]; //[nh]
- Float_t emcdz[42]; //[nh]
- Float_t emcdphi[42]; //[nh]
- Short_t sect[42]; //[nh]
- Short_t ysect[42]; //[nh]
- Short_t zsect[42]; //[nh]
- Float_t plemc[42]; //[nh]
- Float_t ecent[42]; //[nh]
- Float_t emcrawtdc[42]; //[nh]
- Float_t emcrawadc[42]; //[nh]
- Float_t ecore[42]; //[nh]
- Float_t ttof[42]; //[nh]
- Float_t pltof[42]; //[nh]
- Float_t etof[42]; //[nh]
- Int_t slat[42]; //[nh]
- Int_t rh;
- Float_t phir[47]; //[rh]
- Float_t time[47]; //[rh]
- Float_t qr0[47]; //[rh]
- Float_t etar[47]; //[rh]
- Short_t armr[47]; //[rh]
- Short_t ring[47]; //[rh]
- Int_t chid[47]; //[rh]
- // List of branches
- TBranch *b_run; //!
- TBranch *b_bbcz; //!
- TBranch *b_cent; //!
- TBranch *b_BbcT; //!
- TBranch *b_QX10; //!
- TBranch *b_QX11; //!
- TBranch *b_QX12; //!
- TBranch *b_QX13; //!
- TBranch *b_QX14; //!
- TBranch *b_QX15; //!
- TBranch *b_QX16; //!
- TBranch *b_QX17; //!
- TBranch *b_QX18; //!
- TBranch *b_QY10; //!
- TBranch *b_QY11; //!
- TBranch *b_QY12; //!
- TBranch *b_QY13; //!
- TBranch *b_QY14; //!
- TBranch *b_QY15; //!
- TBranch *b_QY16; //!
- TBranch *b_QY17; //!
- TBranch *b_QY18; //!
- TBranch *b_bbcQY10; //!
- TBranch *b_bbcQY11; //!
- TBranch *b_bbcQY12; //!
- TBranch *b_bbcQX10; //!
- TBranch *b_bbcQX11; //!
- TBranch *b_bbcQX12; //!
- TBranch *b_mpcQY10; //!
- TBranch *b_mpcQY11; //!
- TBranch *b_mpcQY12; //!
- TBranch *b_mpcQX10; //!
- TBranch *b_mpcQX11; //!
- TBranch *b_mpcQX12; //!
- TBranch *b_nh; //!
- TBranch *b_p; //!
- TBranch *b_charge; //!
- TBranch *b_phi0; //!
- TBranch *b_the0; //!
- TBranch *b_dcarm; //!
- TBranch *b_pc3dz; //!
- TBranch *b_pc3dphi; //!
- TBranch *b_alpha; //!
- TBranch *b_phi; //!
- TBranch *b_zed; //!
- TBranch *b_n0; //!
- TBranch *b_tofdz; //!
- TBranch *b_tofdphi; //!
- TBranch *b_pc2dz; //!
- TBranch *b_pc2dphi; //!
- TBranch *b_emcdz; //!
- TBranch *b_emcdphi; //!
- TBranch *b_sect; //!
- TBranch *b_ysect; //!
- TBranch *b_zsect; //!
- TBranch *b_plemc; //!
- TBranch *b_ecent; //!
- TBranch *b_emcrawtdc; //!
- TBranch *b_emcrawadc; //!
- TBranch *b_ecore; //!
- TBranch *b_ttof; //!
- TBranch *b_pltof; //!
- TBranch *b_etof; //!
- TBranch *b_slat; //!
- TBranch *b_rh; //!
- TBranch *b_phir; //!
- TBranch *b_time; //!
- TBranch *b_qr0; //!
- TBranch *b_etar; //!
- TBranch *b_armr; //!
- TBranch *b_ring; //!
- TBranch *b_chid; //!
- htree(TTree *tree=0);
- htree(const char *name, TTree *tree=0);
- virtual ~htree();
- 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();
- virtual Bool_t Notify();
- virtual void Show(Long64_t entry = -1);
- };
- #endif
- #ifdef htree_cxx
- htree::htree(TTree *tree) : fChain(0)
- {
- // 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("312471_0.root");
- if (!f || !f->IsOpen()) {
- f = new TFile("312471_0.root");
- }
- f->GetObject("htree",tree);
- }
- Init(tree);
- }
- htree::htree(const char *name, TTree *tree) : fChain(0)
- {
- // 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(name);
- if (!f || !f->IsOpen()) {
- f = new TFile(name);
- if (f->IsZombie())
- error(EIO, errno, "failed to open input file %s for writing", name);
- }
- f->GetObject("htree",tree);
- }
- Init(tree);
- // prepare output
- TString str = "res-";
- str += name;
- output = new TFile(str.Data(),"recreate");
- if (output->IsZombie())
- error(EIO, errno, "failed to open output file %s for writing", str.Data());
- }
- htree::~htree()
- {
- if (!fChain) return;
- delete fChain->GetCurrentFile();
- output->Close();
- }
- Int_t htree::GetEntry(Long64_t entry)
- {
- // Read contents of entry.
- if (!fChain) return 0;
- return fChain->GetEntry(entry);
- }
- Long64_t htree::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->GetTreeNumber() != fCurrent) {
- fCurrent = fChain->GetTreeNumber();
- Notify();
- }
- return centry;
- }
- void htree::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("run", &run, &b_run);
- fChain->SetBranchAddress("bbcz", &bbcz, &b_bbcz);
- fChain->SetBranchAddress("cent", ¢, &b_cent);
- fChain->SetBranchAddress("BbcT", &BbcT, &b_BbcT);
- fChain->SetBranchAddress("QX10", &QX10, &b_QX10);
- fChain->SetBranchAddress("QX11", &QX11, &b_QX11);
- fChain->SetBranchAddress("QX12", &QX12, &b_QX12);
- fChain->SetBranchAddress("QX13", &QX13, &b_QX13);
- fChain->SetBranchAddress("QX14", &QX14, &b_QX14);
- fChain->SetBranchAddress("QX15", &QX15, &b_QX15);
- fChain->SetBranchAddress("QX16", &QX16, &b_QX16);
- fChain->SetBranchAddress("QX17", &QX17, &b_QX17);
- fChain->SetBranchAddress("QX18", &QX18, &b_QX18);
- fChain->SetBranchAddress("QY10", &QY10, &b_QY10);
- fChain->SetBranchAddress("QY11", &QY11, &b_QY11);
- fChain->SetBranchAddress("QY12", &QY12, &b_QY12);
- fChain->SetBranchAddress("QY13", &QY13, &b_QY13);
- fChain->SetBranchAddress("QY14", &QY14, &b_QY14);
- fChain->SetBranchAddress("QY15", &QY15, &b_QY15);
- fChain->SetBranchAddress("QY16", &QY16, &b_QY16);
- fChain->SetBranchAddress("QY17", &QY17, &b_QY17);
- fChain->SetBranchAddress("QY18", &QY18, &b_QY18);
- fChain->SetBranchAddress("bbcQY10", &bbcQY10, &b_bbcQY10);
- fChain->SetBranchAddress("bbcQY11", &bbcQY11, &b_bbcQY11);
- fChain->SetBranchAddress("bbcQY12", &bbcQY12, &b_bbcQY12);
- fChain->SetBranchAddress("bbcQX10", &bbcQX10, &b_bbcQX10);
- fChain->SetBranchAddress("bbcQX11", &bbcQX11, &b_bbcQX11);
- fChain->SetBranchAddress("bbcQX12", &bbcQX12, &b_bbcQX12);
- fChain->SetBranchAddress("mpcQY10", &mpcQY10, &b_mpcQY10);
- fChain->SetBranchAddress("mpcQY11", &mpcQY11, &b_mpcQY11);
- fChain->SetBranchAddress("mpcQY12", &mpcQY12, &b_mpcQY12);
- fChain->SetBranchAddress("mpcQX10", &mpcQX10, &b_mpcQX10);
- fChain->SetBranchAddress("mpcQX11", &mpcQX11, &b_mpcQX11);
- fChain->SetBranchAddress("mpcQX12", &mpcQX12, &b_mpcQX12);
- fChain->SetBranchAddress("nh", &nh, &b_nh);
- fChain->SetBranchAddress("p", p, &b_p);
- fChain->SetBranchAddress("charge", charge, &b_charge);
- fChain->SetBranchAddress("phi0", phi0, &b_phi0);
- fChain->SetBranchAddress("the0", the0, &b_the0);
- fChain->SetBranchAddress("dcarm", dcarm, &b_dcarm);
- fChain->SetBranchAddress("pc3dz", pc3dz, &b_pc3dz);
- fChain->SetBranchAddress("pc3dphi", pc3dphi, &b_pc3dphi);
- fChain->SetBranchAddress("alpha", alpha, &b_alpha);
- fChain->SetBranchAddress("phi", phi, &b_phi);
- fChain->SetBranchAddress("zed", zed, &b_zed);
- fChain->SetBranchAddress("n0", n0, &b_n0);
- fChain->SetBranchAddress("tofdz", tofdz, &b_tofdz);
- fChain->SetBranchAddress("tofdphi", tofdphi, &b_tofdphi);
- fChain->SetBranchAddress("pc2dz", pc2dz, &b_pc2dz);
- fChain->SetBranchAddress("pc2dphi", pc2dphi, &b_pc2dphi);
- fChain->SetBranchAddress("emcdz", emcdz, &b_emcdz);
- fChain->SetBranchAddress("emcdphi", emcdphi, &b_emcdphi);
- fChain->SetBranchAddress("sect", sect, &b_sect);
- fChain->SetBranchAddress("ysect", ysect, &b_ysect);
- fChain->SetBranchAddress("zsect", zsect, &b_zsect);
- fChain->SetBranchAddress("plemc", plemc, &b_plemc);
- fChain->SetBranchAddress("ecent", ecent, &b_ecent);
- fChain->SetBranchAddress("emcrawtdc", emcrawtdc, &b_emcrawtdc);
- fChain->SetBranchAddress("emcrawadc", emcrawadc, &b_emcrawadc);
- fChain->SetBranchAddress("ecore", ecore, &b_ecore);
- fChain->SetBranchAddress("ttof", ttof, &b_ttof);
- fChain->SetBranchAddress("pltof", pltof, &b_pltof);
- fChain->SetBranchAddress("etof", etof, &b_etof);
- fChain->SetBranchAddress("slat", slat, &b_slat);
- fChain->SetBranchAddress("rh", &rh, &b_rh);
- fChain->SetBranchAddress("phir", phir, &b_phir);
- fChain->SetBranchAddress("time", time, &b_time);
- fChain->SetBranchAddress("qr0", qr0, &b_qr0);
- fChain->SetBranchAddress("etar", etar, &b_etar);
- fChain->SetBranchAddress("armr", armr, &b_armr);
- fChain->SetBranchAddress("ring", ring, &b_ring);
- fChain->SetBranchAddress("chid", chid, &b_chid);
- Notify();
- }
- Bool_t htree::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 htree::Show(Long64_t entry)
- {
- // Print contents of entry.
- // If entry is not specified, print current entry
- if (!fChain) return;
- fChain->Show(entry);
- }
- Int_t htree::Cut(Long64_t entry)
- {
- // This function may be called from Loop.
- // returns 1 if entry is accepted.
- // returns -1 otherwise.
- return 1;
- }
- #endif // #ifdef htree_cxx
|