1 |
grimes |
1.1 |
#include "L1UpgradeNtuple.h"
|
2 |
|
|
|
3 |
|
|
#include <vector>
|
4 |
|
|
#include <string>
|
5 |
|
|
#include <iostream>
|
6 |
|
|
#include <fstream>
|
7 |
|
|
|
8 |
|
|
#include <TROOT.h>
|
9 |
|
|
#include <TChain.h>
|
10 |
|
|
#include <TFile.h>
|
11 |
|
|
#include <TTree.h>
|
12 |
|
|
#include <TFriendElement.h>
|
13 |
|
|
#include <TList.h>
|
14 |
|
|
#include <TMatrix.h>
|
15 |
|
|
#include <TH1D.h>
|
16 |
|
|
#include <TH1F.h>
|
17 |
|
|
#include <TH2D.h>
|
18 |
|
|
#include <TH2F.h>
|
19 |
|
|
#include <TCanvas.h>
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisEventDataFormat.h"
|
23 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisGCTDataFormat.h"
|
24 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisGTDataFormat.h"
|
25 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisGMTDataFormat.h"
|
26 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisGTDataFormat.h"
|
27 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisRCTDataFormat.h"
|
28 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisDTTFDataFormat.h"
|
29 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisCSCTFDataFormat.h"
|
30 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisRecoMetDataFormat.h"
|
31 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisRecoJetDataFormat.h"
|
32 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisRecoClusterDataFormat.h"
|
33 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisRecoMuonDataFormat.h"
|
34 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisL1ExtraDataFormat.h"
|
35 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisRecoVertexDataFormat.h"
|
36 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisRecoTrackDataFormat.h"
|
37 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisL1MenuDataFormat.h"
|
38 |
|
|
#include "UserCode/L1TriggerUpgrade/interface/L1AnalysisL1ExtraUpgradeDataFormat.h"
|
39 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisSimulationDataFormat.h"
|
40 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisGeneratorDataFormat.h"
|
41 |
|
|
#include "UserCode/L1TriggerDPG/interface/L1AnalysisCaloTPDataFormat.h"
|
42 |
|
|
|
43 |
|
|
using namespace std;
|
44 |
|
|
|
45 |
|
|
Long64_t L1UpgradeNtuple::GetEntries()
|
46 |
|
|
{
|
47 |
|
|
return nentries_;
|
48 |
|
|
}
|
49 |
|
|
|
50 |
|
|
L1UpgradeNtuple::L1UpgradeNtuple()
|
51 |
|
|
: fChain(NULL), ftreeEmu(NULL), ftreemuon(NULL), ftreereco(NULL), ftreeExtra(NULL), ftreeMenu(NULL),
|
52 |
|
|
ftreeEmuExtra(NULL), ftreeUpgrade(NULL), event_(NULL), gct_(NULL), gmt_(NULL), gt_(NULL),
|
53 |
|
|
rct_(NULL), dttf_(NULL), csctf_(NULL), calo_(NULL), eventEmu_(NULL), gctEmu_(NULL), gmtEmu_(NULL),
|
54 |
|
|
gtEmu_(NULL), rctEmu_(NULL), dttfEmu_(NULL), csctfEmu_(NULL), caloEmu_(NULL), recoMet_(NULL),
|
55 |
|
|
recoMuon_(NULL), recoJet_(NULL), recoBasicCluster_(NULL), recoSuperCluster_(NULL), recoVertex_(NULL),
|
56 |
|
|
recoTrack_(NULL), l1extra_(NULL), l1emuextra_(NULL), l1menu_(NULL), l1upgrade_(NULL), sim_(NULL), gen_(NULL)
|
57 |
|
|
{
|
58 |
|
|
dol1emu=true; doreco=true; domuonreco=true; dol1extra=true; dol1emuextra=true; dol1menu=true; dol1upgrade=true;
|
59 |
|
|
}
|
60 |
|
|
|
61 |
|
|
L1UpgradeNtuple::L1UpgradeNtuple(const std::string & fname)
|
62 |
|
|
: fChain(NULL), ftreeEmu(NULL), ftreemuon(NULL), ftreereco(NULL), ftreeExtra(NULL), ftreeMenu(NULL),
|
63 |
|
|
ftreeEmuExtra(NULL), ftreeUpgrade(NULL), event_(NULL), gct_(NULL), gmt_(NULL), gt_(NULL),
|
64 |
|
|
rct_(NULL), dttf_(NULL), csctf_(NULL), calo_(NULL), eventEmu_(NULL), gctEmu_(NULL), gmtEmu_(NULL),
|
65 |
|
|
gtEmu_(NULL), rctEmu_(NULL), dttfEmu_(NULL), csctfEmu_(NULL), caloEmu_(NULL), recoMet_(NULL),
|
66 |
|
|
recoMuon_(NULL), recoJet_(NULL), recoBasicCluster_(NULL), recoSuperCluster_(NULL), recoVertex_(NULL),
|
67 |
|
|
recoTrack_(NULL), l1extra_(NULL), l1emuextra_(NULL), l1menu_(NULL), l1upgrade_(NULL), sim_(NULL), gen_(NULL)
|
68 |
|
|
{
|
69 |
|
|
dol1emu=true; doreco=true; domuonreco=true; dol1extra=true; dol1emuextra=true; dol1menu=true; dol1upgrade=true;
|
70 |
|
|
Open(fname);
|
71 |
|
|
}
|
72 |
|
|
|
73 |
|
|
bool L1UpgradeNtuple::OpenWithList(const std::string & fname)
|
74 |
|
|
{
|
75 |
|
|
if (!OpenNtupleList(fname)) exit(0);
|
76 |
|
|
if (!CheckFirstFile()) exit(0);
|
77 |
|
|
if (!OpenWithoutInit()) exit(0);
|
78 |
|
|
|
79 |
|
|
std::cout.flush();cout<<"Going to init the available trees..."<<std::endl;std::cout.flush();
|
80 |
|
|
Init();
|
81 |
|
|
|
82 |
|
|
return true;
|
83 |
|
|
}
|
84 |
|
|
|
85 |
|
|
bool L1UpgradeNtuple::Open(const std::string & fname)
|
86 |
|
|
{
|
87 |
|
|
listNtuples.push_back(fname);
|
88 |
|
|
|
89 |
|
|
if (!CheckFirstFile()) exit(0);
|
90 |
|
|
if (!OpenWithoutInit()) exit(0);
|
91 |
|
|
|
92 |
|
|
std::cout.flush();cout<<"Going to init the available trees..."<<std::endl;std::cout.flush();
|
93 |
|
|
Init();
|
94 |
|
|
|
95 |
|
|
return true;
|
96 |
|
|
}
|
97 |
|
|
|
98 |
|
|
bool L1UpgradeNtuple::OpenNtupleList(const std::string & fname)
|
99 |
|
|
{
|
100 |
|
|
std::ifstream flist(fname.c_str());
|
101 |
|
|
if (!flist)
|
102 |
|
|
{
|
103 |
|
|
std::cout << "File "<<fname<<" is not found !"<<std::endl;
|
104 |
|
|
return false;
|
105 |
|
|
}
|
106 |
|
|
|
107 |
|
|
while(!flist.eof())
|
108 |
|
|
{
|
109 |
|
|
std::string str;
|
110 |
|
|
getline(flist,str);
|
111 |
|
|
if (!flist.fail())
|
112 |
|
|
{
|
113 |
|
|
if (str!="") listNtuples.push_back(str);
|
114 |
|
|
}
|
115 |
|
|
}
|
116 |
|
|
|
117 |
|
|
return true;
|
118 |
|
|
}
|
119 |
|
|
|
120 |
|
|
bool L1UpgradeNtuple::CheckFirstFile()
|
121 |
|
|
{
|
122 |
|
|
if (listNtuples.size()==0) return false;
|
123 |
|
|
|
124 |
|
|
rf = TFile::Open(listNtuples[0].c_str());
|
125 |
|
|
|
126 |
|
|
if (rf==0) return false;
|
127 |
|
|
if (rf->IsOpen()==0) return false;
|
128 |
|
|
|
129 |
|
|
TTree * myChain = (TTree*) rf->Get("l1NtupleProducer/L1Tree");
|
130 |
|
|
TTree * mytreeEmu = (TTree*) rf->Get("l1EmulatorTree/L1Tree");
|
131 |
|
|
TTree * mytreemuon = (TTree*) rf->Get("l1MuonRecoTreeProducer/MuonRecoTree");
|
132 |
|
|
TTree * mytreejets = (TTree*) rf->Get("l1RecoTreeProducer/RecoTree");
|
133 |
|
|
TTree * mytreeExtra = (TTree*) rf->Get("l1ExtraTreeProducer/L1ExtraTree");
|
134 |
|
|
TTree * mytreeEmuExtra = (TTree*) rf->Get("l1EmulatorExtraTree/L1ExtraTree");
|
135 |
|
|
TTree * mytreeMenu = (TTree*) rf->Get("l1MenuTreeProducer/L1MenuTree");
|
136 |
|
|
TTree * mytreeUpgrade = (TTree*) rf->Get("l1ExtraUpgradeTreeProducer/L1ExtraUpgradeTree");
|
137 |
|
|
|
138 |
|
|
if (!myChain) {
|
139 |
|
|
std::cout<<"L1Tree not found .... "<<std::endl;
|
140 |
|
|
return false;
|
141 |
|
|
} else {
|
142 |
|
|
std::cout<<"Main tree is found .."<<std::endl;
|
143 |
|
|
}
|
144 |
|
|
|
145 |
|
|
if (!mytreeEmu) {
|
146 |
|
|
std::cout<<"L1TreeEmu not found, it will be skipped..."<<std::endl;
|
147 |
|
|
dol1emu=false;
|
148 |
|
|
} else
|
149 |
|
|
{
|
150 |
|
|
std::cout << "L1TreeEmu is found ..."<<std::endl;
|
151 |
|
|
}
|
152 |
|
|
|
153 |
|
|
if (!mytreejets) {
|
154 |
|
|
std::cout<<"RecoTree not found, it will be skipped..."<<std::endl;
|
155 |
|
|
doreco=false;
|
156 |
|
|
} else
|
157 |
|
|
{
|
158 |
|
|
std::cout << "RecoTree is found ..."<<std::endl;
|
159 |
|
|
}
|
160 |
|
|
|
161 |
|
|
if (!mytreemuon) {
|
162 |
|
|
std::cout<<"MuonRecoTree not found, it will be skipped..."<<std::endl;
|
163 |
|
|
domuonreco=false;
|
164 |
|
|
}
|
165 |
|
|
else
|
166 |
|
|
{
|
167 |
|
|
std::cout << "MuonRecoTree is found ..."<<std::endl;
|
168 |
|
|
}
|
169 |
|
|
|
170 |
|
|
if (!mytreeExtra) {
|
171 |
|
|
std::cout<<"L1ExtraTree not found, it will be skipped..."<<std::endl;
|
172 |
|
|
dol1extra=false;
|
173 |
|
|
}
|
174 |
|
|
else
|
175 |
|
|
{
|
176 |
|
|
std::cout << "L1ExtraTree is found ..."<<std::endl;
|
177 |
|
|
}
|
178 |
|
|
if(!mytreeEmuExtra){
|
179 |
|
|
std::cout<<"L1EmuExtraTree not found, it will be skipped..."<<std::endl;
|
180 |
|
|
dol1emuextra=false;
|
181 |
|
|
}
|
182 |
|
|
else{
|
183 |
|
|
std::cout << "L1EmuExtraTree is found ..."<<std::endl;
|
184 |
|
|
}
|
185 |
|
|
|
186 |
|
|
if (!mytreeMenu) {
|
187 |
|
|
std::cout<<"L1MenuTree not found, it will be skipped..."<<std::endl;
|
188 |
|
|
dol1menu=false;
|
189 |
|
|
}
|
190 |
|
|
else
|
191 |
|
|
{
|
192 |
|
|
std::cout << "L1MenuTree is found ..."<<std::endl;
|
193 |
|
|
}
|
194 |
|
|
|
195 |
|
|
if (!mytreeUpgrade) {
|
196 |
|
|
std::cout<<"L1ExtraUpgradeProducer/L1ExtraUpgradeTree not found, it will be skipped..."<<std::endl;
|
197 |
|
|
dol1upgrade=false;
|
198 |
|
|
}
|
199 |
|
|
else{
|
200 |
|
|
std::cout << "L1UpgradeProducer/L1ExtraTree is found ..."<<std::endl;
|
201 |
|
|
}
|
202 |
|
|
|
203 |
|
|
return true;
|
204 |
|
|
}
|
205 |
|
|
|
206 |
|
|
|
207 |
|
|
bool L1UpgradeNtuple::OpenWithoutInit()
|
208 |
|
|
{
|
209 |
|
|
fChain = new TChain("l1NtupleProducer/L1Tree");
|
210 |
|
|
ftreeEmu = new TChain("l1EmulatorTree/L1Tree");
|
211 |
|
|
ftreemuon = new TChain("l1MuonRecoTreeProducer/MuonRecoTree");
|
212 |
|
|
ftreereco = new TChain("l1RecoTreeProducer/RecoTree");
|
213 |
|
|
ftreeExtra = new TChain("l1ExtraTreeProducer/L1ExtraTree");
|
214 |
|
|
ftreeEmuExtra = new TChain("l1EmulatorExtraTree/L1ExtraTree");
|
215 |
|
|
ftreeMenu = new TChain("l1MenuTreeProducer/L1MenuTree");
|
216 |
|
|
ftreeUpgrade = new TChain("l1ExtraUpgradeTreeProducer/L1ExtraUpgradeTree");
|
217 |
|
|
|
218 |
|
|
for (unsigned int i=0;i<listNtuples.size();i++)
|
219 |
|
|
{
|
220 |
|
|
std::cout << " -- Adding " << listNtuples[i] << std::endl;
|
221 |
|
|
fChain->Add(listNtuples[i].c_str());
|
222 |
|
|
|
223 |
|
|
if (dol1emu) ftreeEmu -> Add(listNtuples[i].c_str());
|
224 |
|
|
if (doreco) ftreereco -> Add(listNtuples[i].c_str());
|
225 |
|
|
if (domuonreco) ftreemuon -> Add(listNtuples[i].c_str());
|
226 |
|
|
if (dol1extra) ftreeExtra -> Add(listNtuples[i].c_str());
|
227 |
|
|
if (dol1emuextra) ftreeEmuExtra ->Add(listNtuples[i].c_str());
|
228 |
|
|
if (dol1menu) ftreeMenu -> Add(listNtuples[i].c_str());
|
229 |
|
|
if (dol1upgrade) ftreeUpgrade -> Add(listNtuples[i].c_str());
|
230 |
|
|
|
231 |
|
|
}
|
232 |
|
|
|
233 |
|
|
if (dol1emu) fChain->AddFriend(ftreeEmu);
|
234 |
|
|
if (doreco) fChain->AddFriend(ftreereco);
|
235 |
|
|
if (domuonreco) fChain->AddFriend(ftreemuon);
|
236 |
|
|
if (dol1extra) fChain->AddFriend(ftreeExtra);
|
237 |
|
|
if (dol1emuextra) fChain->AddFriend(ftreeEmuExtra);
|
238 |
|
|
if (dol1menu) fChain->AddFriend(ftreeMenu);
|
239 |
|
|
if (dol1upgrade) fChain->AddFriend(ftreeUpgrade);
|
240 |
|
|
|
241 |
|
|
return true;
|
242 |
|
|
}
|
243 |
|
|
|
244 |
|
|
L1UpgradeNtuple::~L1UpgradeNtuple()
|
245 |
|
|
{
|
246 |
|
|
// if (ftreemuon) delete ftreemuon;
|
247 |
|
|
// if (ftreereco) delete ftreereco;
|
248 |
|
|
// if (ftreeExtra) delete ftreeExtra;
|
249 |
|
|
// if (ftreeEmuExtra) delete ftreeEmuExtra;
|
250 |
|
|
// if (ftreeMenu) delete ftreeMenu;
|
251 |
|
|
// if (ftreeUpgrade) delete ftreeUpgrade;
|
252 |
|
|
// if (ftreeEmu) delete ftreeEmu;
|
253 |
|
|
// if (fChain) delete fChain;
|
254 |
|
|
// if (rf) delete rf;
|
255 |
|
|
delete fChain;
|
256 |
|
|
delete ftreeEmu;
|
257 |
|
|
delete ftreemuon;
|
258 |
|
|
delete ftreereco;
|
259 |
|
|
delete ftreeExtra;
|
260 |
|
|
delete ftreeEmuExtra;
|
261 |
|
|
delete ftreeMenu;
|
262 |
|
|
delete ftreeUpgrade;
|
263 |
|
|
delete event_;
|
264 |
|
|
delete gct_;
|
265 |
|
|
delete gmt_;
|
266 |
|
|
delete gt_;
|
267 |
|
|
delete rct_;
|
268 |
|
|
delete dttf_;
|
269 |
|
|
delete csctf_;
|
270 |
|
|
delete sim_;
|
271 |
|
|
delete gen_;
|
272 |
|
|
delete calo_;
|
273 |
|
|
delete eventEmu_;
|
274 |
|
|
delete gctEmu_;
|
275 |
|
|
delete gmtEmu_;
|
276 |
|
|
delete gtEmu_;
|
277 |
|
|
delete rctEmu_;
|
278 |
|
|
delete dttfEmu_;
|
279 |
|
|
delete csctfEmu_;
|
280 |
|
|
delete caloEmu_;
|
281 |
|
|
delete recoMet_;
|
282 |
|
|
delete recoJet_;
|
283 |
|
|
delete recoBasicCluster_;
|
284 |
|
|
delete recoSuperCluster_;
|
285 |
|
|
delete recoVertex_;
|
286 |
|
|
delete recoTrack_;
|
287 |
|
|
delete recoMuon_;
|
288 |
|
|
delete l1extra_;
|
289 |
|
|
delete l1emuextra_;
|
290 |
|
|
delete l1menu_;
|
291 |
|
|
delete l1upgrade_;
|
292 |
|
|
}
|
293 |
|
|
|
294 |
|
|
|
295 |
|
|
|
296 |
|
|
Int_t L1UpgradeNtuple::GetEntry(Long64_t entry)
|
297 |
|
|
{
|
298 |
|
|
// Read contents of entry.
|
299 |
|
|
if (!fChain) return 0;
|
300 |
|
|
return fChain->GetEntry(entry);
|
301 |
|
|
}
|
302 |
|
|
|
303 |
|
|
Long64_t L1UpgradeNtuple::LoadTree(Long64_t entry)
|
304 |
|
|
{
|
305 |
|
|
// Set the environment to read one entry
|
306 |
|
|
if (!fChain) return -5;
|
307 |
|
|
Long64_t centry = fChain->LoadTree(entry);
|
308 |
|
|
|
309 |
|
|
if (centry < 0) return centry;
|
310 |
|
|
if (!fChain->InheritsFrom(TChain::Class())) return centry;
|
311 |
|
|
TChain *chain = (TChain*)fChain;
|
312 |
|
|
if (chain->GetTreeNumber() != fCurrent) {
|
313 |
|
|
fCurrent = chain->GetTreeNumber();
|
314 |
|
|
}
|
315 |
|
|
return centry;
|
316 |
|
|
}
|
317 |
|
|
|
318 |
|
|
void L1UpgradeNtuple::Init()
|
319 |
|
|
{
|
320 |
|
|
if (!fChain) return;
|
321 |
|
|
fCurrent = -1;
|
322 |
|
|
/*
|
323 |
|
|
fChain->SetMakeClass(1);
|
324 |
|
|
ftreemuon->SetMakeClass(1);
|
325 |
|
|
ftreereco->SetMakeClass(1);
|
326 |
|
|
ftreeExtra->SetMakeClass(1); */
|
327 |
|
|
|
328 |
|
|
std::cout << "Estimate the number of entries ..."<<std::endl;
|
329 |
|
|
nentries_=fChain->GetEntries();
|
330 |
|
|
std::cout << nentries_ << std::endl;
|
331 |
|
|
event_ = new L1Analysis::L1AnalysisEventDataFormat();
|
332 |
|
|
gct_ = new L1Analysis::L1AnalysisGCTDataFormat();
|
333 |
|
|
gmt_ = new L1Analysis::L1AnalysisGMTDataFormat();
|
334 |
|
|
gt_ = new L1Analysis::L1AnalysisGTDataFormat();
|
335 |
|
|
rct_ = new L1Analysis::L1AnalysisRCTDataFormat();
|
336 |
|
|
dttf_ = new L1Analysis::L1AnalysisDTTFDataFormat();
|
337 |
|
|
csctf_ = new L1Analysis::L1AnalysisCSCTFDataFormat();
|
338 |
|
|
sim_ = new L1Analysis::L1AnalysisSimulationDataFormat();
|
339 |
|
|
gen_ = new L1Analysis::L1AnalysisGeneratorDataFormat();
|
340 |
|
|
calo_ = new L1Analysis::L1AnalysisCaloTPDataFormat();
|
341 |
|
|
|
342 |
|
|
std::cout<<"Setting branch addresses for L1Tree... "<<std::flush;
|
343 |
|
|
|
344 |
|
|
fChain->SetBranchAddress("Event", &event_ );
|
345 |
|
|
fChain->SetBranchAddress("GCT", &gct_ );
|
346 |
|
|
fChain->SetBranchAddress("GMT", &gmt_ );
|
347 |
|
|
fChain->SetBranchAddress("GT", >_ );
|
348 |
|
|
fChain->SetBranchAddress("RCT", &rct_ );
|
349 |
|
|
fChain->SetBranchAddress("CSCTF", &csctf_ );
|
350 |
|
|
fChain->SetBranchAddress("DTTF", &dttf_ );
|
351 |
|
|
fChain->SetBranchAddress("Simulation", &sim_ );
|
352 |
|
|
fChain->SetBranchAddress("Generator", &gen_ );
|
353 |
|
|
fChain->SetBranchAddress("Calo", &calo_ );
|
354 |
|
|
|
355 |
|
|
|
356 |
|
|
if (dol1emu)
|
357 |
|
|
{
|
358 |
|
|
std::cout<<"Setting branch addresses for L1TreeEmu..."<<std::endl;
|
359 |
|
|
|
360 |
|
|
eventEmu_ = new L1Analysis::L1AnalysisEventDataFormat();
|
361 |
|
|
gctEmu_ = new L1Analysis::L1AnalysisGCTDataFormat();
|
362 |
|
|
gmtEmu_ = new L1Analysis::L1AnalysisGMTDataFormat();
|
363 |
|
|
gtEmu_ = new L1Analysis::L1AnalysisGTDataFormat();
|
364 |
|
|
rctEmu_ = new L1Analysis::L1AnalysisRCTDataFormat();
|
365 |
|
|
dttfEmu_ = new L1Analysis::L1AnalysisDTTFDataFormat();
|
366 |
|
|
csctfEmu_ = new L1Analysis::L1AnalysisCSCTFDataFormat();
|
367 |
|
|
caloEmu_ = new L1Analysis::L1AnalysisCaloTPDataFormat();
|
368 |
|
|
|
369 |
|
|
std::cout<<"Setting branch addresses for L1Tree... "<<std::flush;
|
370 |
|
|
|
371 |
|
|
ftreeEmu->SetBranchAddress("Event", &eventEmu_ );
|
372 |
|
|
ftreeEmu->SetBranchAddress("GCT", &gctEmu_ );
|
373 |
|
|
ftreeEmu->SetBranchAddress("GMT", &gmtEmu_ );
|
374 |
|
|
ftreeEmu->SetBranchAddress("GT", >Emu_ );
|
375 |
|
|
ftreeEmu->SetBranchAddress("RCT", &rctEmu_ );
|
376 |
|
|
ftreeEmu->SetBranchAddress("CSCTF", &csctfEmu_ );
|
377 |
|
|
ftreeEmu->SetBranchAddress("DTTF", &dttf_ );
|
378 |
|
|
ftreeEmu->SetBranchAddress("Calo", &caloEmu_ );
|
379 |
|
|
|
380 |
|
|
fChain->AddFriend(ftreeEmu);
|
381 |
|
|
std::cout << "L1TreeEmu " << ftreeEmu->GetEntries() << endl;
|
382 |
|
|
}
|
383 |
|
|
|
384 |
|
|
if (doreco)
|
385 |
|
|
{
|
386 |
|
|
std::cout<<"Setting branch addresses for reco..."<<std::endl;
|
387 |
|
|
|
388 |
|
|
recoMet_ = new L1Analysis::L1AnalysisRecoMetDataFormat();
|
389 |
|
|
recoJet_ = new L1Analysis::L1AnalysisRecoJetDataFormat();
|
390 |
|
|
recoBasicCluster_ = new L1Analysis::L1AnalysisRecoClusterDataFormat();
|
391 |
|
|
recoSuperCluster_ = new L1Analysis::L1AnalysisRecoClusterDataFormat();
|
392 |
|
|
recoVertex_ = new L1Analysis::L1AnalysisRecoVertexDataFormat();
|
393 |
|
|
recoTrack_ = new L1Analysis::L1AnalysisRecoTrackDataFormat();
|
394 |
|
|
|
395 |
|
|
ftreereco->SetBranchAddress("Jet", &recoJet_);
|
396 |
|
|
ftreereco->SetBranchAddress("BasicClusters", &recoBasicCluster_);
|
397 |
|
|
ftreereco->SetBranchAddress("SuperClusters", &recoSuperCluster_);
|
398 |
|
|
ftreereco->SetBranchAddress("Met", &recoMet_);
|
399 |
|
|
ftreereco->SetBranchAddress("Tracks", &recoTrack_);
|
400 |
|
|
ftreereco->SetBranchAddress("Vertices", &recoVertex_);
|
401 |
|
|
fChain->AddFriend(ftreereco);
|
402 |
|
|
std::cout << "RecoTree " << ftreereco->GetEntries() << endl;
|
403 |
|
|
}
|
404 |
|
|
|
405 |
|
|
if (domuonreco)
|
406 |
|
|
{
|
407 |
|
|
std::cout<<"Setting branch addresses for muons... "<<std::endl;
|
408 |
|
|
recoMuon_ = new L1Analysis::L1AnalysisRecoMuonDataFormat() ;
|
409 |
|
|
ftreemuon->SetBranchAddress("Muon",&recoMuon_);
|
410 |
|
|
}
|
411 |
|
|
|
412 |
|
|
if (dol1extra)
|
413 |
|
|
{
|
414 |
|
|
std::cout<<"Setting branch addresses for L1Extra... "<<std::endl;
|
415 |
|
|
l1extra_ = new L1Analysis::L1AnalysisL1ExtraDataFormat();
|
416 |
|
|
ftreeExtra->SetBranchAddress("L1Extra",&l1extra_);
|
417 |
|
|
fChain->AddFriend(ftreeExtra);
|
418 |
|
|
std::cout << "L1ExtraTree: "<< ftreeExtra->GetEntries() << std::endl;
|
419 |
|
|
}
|
420 |
|
|
if ( dol1emuextra){
|
421 |
|
|
std::cout<<"Setting branch addresses for L1EmuExtra... "<<std::endl;
|
422 |
|
|
l1emuextra_ = new L1Analysis::L1AnalysisL1ExtraDataFormat();
|
423 |
|
|
ftreeEmuExtra->SetBranchAddress("L1Extra",&l1emuextra_);
|
424 |
|
|
fChain->AddFriend(ftreeEmuExtra);
|
425 |
|
|
std::cout << "L1EmuExtraTree: "<< ftreeEmuExtra->GetEntries() << std::endl;
|
426 |
|
|
}
|
427 |
|
|
|
428 |
|
|
if (dol1menu)
|
429 |
|
|
{
|
430 |
|
|
std::cout<<"Setting branch addresses for L1Menu... "<<std::endl;
|
431 |
|
|
l1menu_ = new L1Analysis::L1AnalysisL1MenuDataFormat();
|
432 |
|
|
ftreeMenu->SetBranchAddress("L1Menu",&l1menu_);
|
433 |
|
|
}
|
434 |
|
|
if (dol1upgrade)
|
435 |
|
|
{
|
436 |
|
|
std::cout<<"Setting branch addresses for L1Upgrade... "<<std::endl;
|
437 |
|
|
l1upgrade_ = new L1Analysis::L1AnalysisL1ExtraUpgradeDataFormat();
|
438 |
|
|
ftreeUpgrade->SetBranchAddress("L1ExtraUpgrade",&l1upgrade_);
|
439 |
|
|
fChain->AddFriend(ftreeUpgrade);
|
440 |
|
|
std::cout << "L1ExtraUpgradeTree: "<< ftreeUpgrade->GetEntries() << std::endl;
|
441 |
|
|
}
|
442 |
|
|
|
443 |
|
|
}
|