31 gSystem->Load(
"libFWCoreFWLite");
37 std::cout <<
"Usage : " << argv[0] <<
" [parameters.py]" << std::endl;
55 TH1F* emfAllJets_ = theDir.
make<TH1F>(
"emfAllJets",
"f_{emf}(All Jets)", 20, 0., 1.);
56 TH1F* emfCleanJets_ = theDir.
make<TH1F>(
"emfCleanJets",
"f_{emf}(Clean Jets)", 20, 0., 1.);
57 TH1F* emfOverlapJets_ = theDir.
make<TH1F>(
"emfOverlapJets",
"f_{emf}(Overlap Jets)", 20, 0., 1.);
58 TH1F* deltaRElecJet_ = theDir.
make<TH1F>(
"deltaRElecJet",
"#DeltaR (elec, jet)", 10, 0., 0.5);
59 TH1F* elecOverJet_ = theDir.
make<TH1F>(
"elecOverJet",
"E_{elec}/E_{jet}", 100, 0., 2.);
60 TH1F* nOverlaps_ = theDir.
make<TH1F>(
"nOverlaps",
"Number of overlaps", 5, 0., 5.);
63 TFile* inFile = TFile::Open(input_.c_str());
86 if (iEvent > 0 && iEvent % 1 == 0) {
87 std::cout <<
" processing event: " << iEvent << std::endl;
92 event.getByLabel(jets_, jets);
95 for (std::vector<pat::Jet>::const_iterator
jet = jets->begin();
jet != jets->end();
jet++) {
96 if (
jet->pt() > 20 &&
jet == jets->begin()) {
97 emfAllJets_->Fill(
jet->emEnergyFraction());
98 if (!
jet->hasOverlaps(overlaps_)) {
99 emfCleanJets_->Fill(
jet->emEnergyFraction());
103 nOverlaps_->Fill(overlaps.
size());
104 emfOverlapJets_->Fill(
jet->emEnergyFraction());
109 deltaRElecJet_->Fill(deltaR);
110 elecOverJet_->Fill((*overlap)->energy() /
jet->energy());
T getParameter(std::string const &) const
Event const & toBegin() override
Go to the very first Event.
size_type size() const
Size of the RefVector.
std::unique_ptr< edm::ProcessDesc > processDesc() const
const_iterator begin() const
bool atEnd() const override
static void enable()
enable automatic library loading
int main(int argc, char *argv[])
const_iterator end() const
T * make(const Args &...args) const
make new ROOT object
constexpr auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory