31 gSystem->Load(
"libFWCoreFWLite");
37 std::cout <<
"Usage : " << argv[0] <<
" [parameters.py]" << std::endl;
54 TH1F* jetPt_ = theDir.
make<TH1F>(
"jetPt",
"pt", 100, 0., 300.);
55 TH1F* jetEta_ = theDir.
make<TH1F>(
"jetEta",
"eta", 100, -3., 3.);
56 TH1F* jetPhi_ = theDir.
make<TH1F>(
"jetPhi",
"phi", 100, -5., 5.);
57 TH1F* disc_ = theDir.
make<TH1F>(
"disc",
"Discriminant", 100, 0.0, 10.0);
58 TH1F* constituentPt_ = theDir.
make<TH1F>(
"constituentPt",
"Constituent pT", 100, 0, 300.0);
61 TFile* inFile = TFile::Open(input_.c_str());
84 if (iEvent > 0 && iEvent % 1 == 0) {
85 std::cout <<
" processing event: " << iEvent << std::endl;
91 event.getByLabel(jets_, jets);
94 for (
unsigned i = 0;
i < jets->size(); ++
i) {
96 jetPt_->Fill((*jets)[
i].
pt());
97 jetEta_->Fill((*jets)[
i].
eta());
98 jetPhi_->Fill((*jets)[
i].
phi());
101 if (svTagInfos !=
nullptr) {
107 std::vector<reco::PFCandidatePtr>
const& pfConstituents = (*jets)[
i].getPFConstituents();
108 for (std::vector<reco::PFCandidatePtr>::const_iterator ibegin = pfConstituents.begin(),
109 iend = pfConstituents.end(),
110 iconstituent = ibegin;
111 iconstituent != iend;
113 constituentPt_->Fill((*iconstituent)->pt());
Event const & toBegin() override
Go to the very first Event.
std::unique_ptr< edm::ProcessDesc > processDesc() const
static void enable()
enable automatic library loading
T * make(const Args &...args) const
make new ROOT object
bool atEnd() const override
unsigned int nVertices() const
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
T getParameter(std::string const &) const
Measurement1D flightDistance(unsigned int index, int dim=0) const