File indexing completed on 2024-04-06 12:20:26
0001
0002 #include "L1Trigger/L1TNtuples/interface/L1AnalysisL1UpgradeDataFormat.h"
0003
0004 void NtupleSummary(const char * file, const char * treepath = "l1UpgradeEmuTree/L1UpgradeTree"){
0005 cout << "INFO: summary of content in file " << file << "\n";
0006 TFile input(file);
0007 TTree * tree = (TTree*) input.Get(treepath);
0008 if (! tree) {
0009 cout << "ERROR: could not open tree.\n";
0010 input.ls();
0011 return;
0012 }
0013 tree->Print();
0014
0015 TH1F * fjetEt = new TH1F("fjetEt","", 20, 0.0, 200.0);
0016 tree->Draw("jetEt>>fjetEt","(jetEt > 10.0) && (abs(jetEta) > 3.0)");
0017 cout << "forward jet count: " << fjetEt->GetEntries() << "\n";
0018
0019 TH1F * jetEt = new TH1F("jetEt","", 20, 0.0, 200.0);
0020 tree->Draw("jetEt>>jetEt","jetEt > 10.0");
0021 cout << "jet count: " << jetEt->GetEntries() << "\n";
0022
0023 TH1F * egEt = new TH1F("egEt","", 20, 0.0, 200.0);
0024 tree->Draw("egEt>>egEt","egEt > 10.0");
0025 cout << "eg count: " << egEt->GetEntries() << "\n";
0026
0027 TH1F * tauEt = new TH1F("tauEt","", 20, 0.0, 200.0);
0028 tree->Draw("tauEt>>tauEt","tauEt > 10.0");
0029 cout << "tau count: " << tauEt->GetEntries() << "\n";
0030
0031 TH1F * muonEt = new TH1F("muonEt","", 20, 0.0, 200.0);
0032 tree->Draw("muonEt>>muonEt","muonEt > 1.0");
0033 cout << "muon count: " << muonEt->GetEntries() << "\n";
0034
0035
0036
0037
0038
0039
0040 }