18 #include "TStopwatch.h" 33 gSystem->Load(
"libFWCoreFWLite");
39 TH1F* jetPt_ = theDir.
make<TH1F>(
"jetPt",
"pt", 100, 0., 300.);
40 TH1F* jetEta_ = theDir.
make<TH1F>(
"jetEta",
"eta", 100, -3., 3.);
41 TH1F* jetPhi_ = theDir.
make<TH1F>(
"jetPhi",
"phi", 100, -5., 5.);
42 TH1F* disc_ = theDir.
make<TH1F>(
"disc",
"Discriminant", 100, 0.0, 10.0);
43 TH1F* constituentPt_ = theDir.
make<TH1F>(
"constituentPt",
"Constituent pT", 100, 0, 300.0);
46 TFile* inFile = TFile::Open(argv[1]);
63 unsigned int nEventsAnalyzed = 0;
70 event.getByLabel(jetLabel, jets);
73 for (
unsigned i = 0;
i < jets->size(); ++
i) {
74 jetPt_->Fill((*jets)[
i].
pt());
75 jetEta_->Fill((*jets)[
i].
eta());
76 jetPhi_->Fill((*jets)[
i].
phi());
78 if (svTagInfos !=
nullptr) {
82 std::vector<CaloTowerPtr>
const& caloConstituents = (*jets)[
i].getCaloConstituents();
83 for (std::vector<CaloTowerPtr>::const_iterator ibegin = caloConstituents.begin(),
84 iend = caloConstituents.end(),
85 iconstituent = ibegin;
88 constituentPt_->Fill((*iconstituent)->pt());
99 Double_t rtime = timer.RealTime();
100 Double_t ctime = timer.CpuTime();
101 printf(
"Analyzed events: %d \n", nEventsAnalyzed);
102 printf(
"RealTime=%f seconds, CpuTime=%f seconds\n", rtime, ctime);
103 printf(
"%4.2f events / RealTime second .\n", (
double)nEventsAnalyzed / rtime);
104 printf(
"%4.2f events / CpuTime second .\n", (
double)nEventsAnalyzed / ctime);
Event const & toBegin() override
Go to the very first Event.
bool atEnd() const override
static void enable()
enable automatic library loading
T * make(const Args &...args) const
make new ROOT object
unsigned int nVertices() const
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
int main(int argc, char *argv[])
Measurement1D flightDistance(unsigned int index, int dim=0) const