Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hcalTree.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file hcalTree.C
1 
2 // =============================================================================================
3 
4 
6  hLabHelper * hlHelper = hLabHelper::getInstance();
8 
9  // hlHelper->fhcl = new TFile(hlHelper->rootfName,"recreate");
10  hlHelper->thcl = new TTree("thcl","HCal Data Tree");
11  cout<<"hcalTree::hcalTree> HCal Data Tree is created in the directory of "<<hlHelper->rootTempFileName<<endl;
12 
13  hlHelper->thcl ->SetMaxTreeSize(1000000000);
14 
15  hlHelper->thcl->Branch("runnumber" ,&hHelper->runnumber, "runnumber/I");
16  hlHelper->thcl->Branch("eventseq", &hHelper->eventseq, "eventseq/I");
17  hlHelper->thcl->Branch("reject", &hHelper->eventReject, "reject/I");
18  hlHelper->thcl->Branch("trigger", &hHelper->eventTrigger,"trigger/I");
19  TString rawbranch = "adc["; rawbranch += ACTIVECHANNELS; rawbranch += "]["; rawbranch += NSAMPLES; rawbranch += "]/F";
20  hlHelper->thcl->Branch("adc", hHelper->adc, rawbranch);
21  // from hcal object
22  hlHelper->thcl->Branch("amplTotal", &hHelper->t1044->amplTotal, "amplTotal/D");
23  hlHelper->thcl->Branch("eTotal", &hHelper->t1044->eTotal, "eTotal/D");
24  hlHelper->thcl->Branch("calLCG", &hHelper->t1044->calLCG, "calLCG/D");
25  hlHelper->thcl->Branch("scintLCG", &hHelper->t1044->scintLCG, "scintLCG/D");
26 
27  // TString adcbranch = "adc[";
28  // adcbranch += CHTOTAL;
29  // adcbranch += "][";
30  // adcbranch += NSAMPLES;
31  // adcbranch += "]/I";
32  // thcl->Branch("adc",hHelper->adc,adcbranch);
33 
34  // TString pedestalbranch = "pedestal[";
35  // pedestalbranch += CHTOTAL;
36  // pedestalbranch += "]/F";
37  // thcl->Branch("pedestal",hHelper->pedestal,pedestalbranch);
38 
39  // TString rawpeakbranch = "rpeak[";
40  // rawpeakbranch += CHTOTAL;
41  // rpeakbranch += "]/F";
42  // thcl->Branch("rpeak",hHelper->rpeak,rawpeakbranch);
43 
44  // TString rawtimebranch ="rtime[";
45  // rawtimebranch += CHTOTAL;
46  // rawtimebranch += "]/F";
47  // thcl->Branch("rtime",hHelper->rawTime, rawtimebranch);
48 
49  // TString fitpeakbranch = "fpeak[";
50  // calpeakbranch += CHTOTAL;
51  // calpeakbranch += "]/F";
52  // thcl->Branch("fpeak",hHelper->fpeak,fitpeakbranch);
53 
54  // TString fittimebranch ="ftime[";
55  // fittimebranch += CHTOTAL;
56  // fittimebranch += "]/F";
57  // thcl->Branch("ftime",hHelper->fitTime, fittimebranch);
58 
59  // TString fittimermsbranch ="ftrms[";
60  // fittimermsbranch += CHTOTAL;
61  // fittimermsbranch += "]/F";
62  // thcl->Branch("ftime",hHelper->fitTime, fittimermsbranch);
63 
64  // Pressing time histograms
65 
66 
67  // TString triggerbranch = "tag[";
68  // triggerbranch += TAGS;
69  // triggerbranch +="]/F";
70  // W->Branch("tags", wd->tags,triggerbranch);
71  // W->Branch("hits", wd->hits,"hit[4]/F");
72  // // clusters found in inner and outer sections
73  // TString ihcclbranch = "ihccl[6]/F";
74  // W->Branch("ihccl",wd->ihccl,ihcclbranch);
75  // TString ohcclbranch = "ohccl[6]/F";
76  // W->Branch("ohccl",wd->ohccl,ohcclbranch);
77  // // tracks found in inner and outer sections
78  // TString itrackbranch = "itrack[";
79  // itrackbranch += TRLENGTH;
80  // itrackbranch +="]/F";
81  // W->Branch("itrack",wd->itrack,itrackbranch);
82  // TString otrackbranch = "otrack[";
83  // otrackbranch += TRLENGTH;
84  // otrackbranch +="]/F";
85  // W->Branch("otrack",wd->otrack,otrackbranch);
86 
87 
88 
89  // TString ecsumbranch = "ecsum[";
90  // ecsumbranch += ECSUMS;
91  // ecsumbranch +="]/F";
92  // W->Branch("ec_sum",wd->ecadcsum,ecsumbranch);
93 
94  // TString hcsumbranch = "hcsum[";
95  // hcsumbranch += HCSUMS;
96  // hcsumbranch +="]/F";
97  // W->Branch("hcsum",wd->hcadcsum,hcsumbranch);
98 
99  // HODOSCOPE branch
100  // if(psON) {
101  // initPreshowerTree();
102  // initPreshowerUnpacker();
103  // cout<<"PRESHOWER branch initialized for Run "<<rn<<endl;
104  // }
105 
106 }
107 
108 // -----------------------------------------------------------------------------------------------
109 
111  // whatever summary histograms what not
112  // hLabHelper * hlHelper = hLabHelper::getInstance();
113  // hlHelper->thcl->AutoSave("Overwrite");
114  // fhcl -> Close();
115  // thcl -> Write();
116  // fhcl -> Write();
117  ;
118 }