24 TFile* f = TFile::Open(fileName,
"RECREATE");
25 TTree* summary =
new TTree(
"summary",
"");
27 int tree_hash, tree_calo, tree_layer, tree_iEta, tree_iPhi, tree_feb, tree_channel, tree_index;
28 float tree_chi2, tree_refitChi2;
29 float tree_time, tree_energy, tree_adcMax, tree_refitTime, tree_refitADCMax;
31 summary->Branch(
"hash", &tree_hash,
"hash/I");
32 summary->Branch(
"calo", &tree_calo,
"calo/I");
33 summary->Branch(
"layer", &tree_layer,
"layer/I");
34 summary->Branch(
"iEta", &tree_iEta,
"iEta/I");
35 summary->Branch(
"iPhi", &tree_iPhi,
"iPhi/I");
36 summary->Branch(
"feb", &tree_feb,
"feb/I");
37 summary->Branch(
"channel", &tree_channel,
"channel/I");
38 summary->Branch(
"index", &tree_index,
"index/I");
39 summary->Branch(
"time", &tree_time,
"time/F");
40 summary->Branch(
"energy", &tree_energy,
"energy/F");
41 summary->Branch(
"adcMax", &tree_adcMax,
"adcMax/F");
42 summary->Branch(
"refitTime", &tree_refitTime,
"refitTime/F");
43 summary->Branch(
"chi2", &tree_chi2,
"chi2/F");
44 summary->Branch(
"refitChi2", &tree_refitChi2,
"refitChi2/F");
45 summary->Branch(
"refitADCMax", &tree_refitADCMax,
"refitADCMax/F");
47 for (
unsigned int i = 0; i <
nChannels(); i++) {
49 if (!history || !history->
isValid())
continue;
51 if (i%1000 == 0) cout <<
"-> History hash = " << i << endl;
62 for (
unsigned int j = 0; j < history->
nData(); j++) {
64 tree_chi2 = history->
chi2(j);
68 tree_refitChi2 = refitHistory->
chi2(j);
70 tree_refitADCMax = refitHistory->
data(j)->
adcMax();
77 cout <<
"Closing file..." << endl;
double chi2(int i, int lwb=-1, int upb=-1, int chi2Params=DefaultChi2, ShapeErrorType shapeErrorType=BestShapeError, unsigned int *nDof=0) const
const CellInfo * cellInfo() const
const Data * data(unsigned int i) const
unsigned int nData() const
History * refit(Chi2Params pars=DefaultChi2) const