33 gSystem->Load(
"libFWCoreFWLite" );
39 std::cout <<
"Usage : " << argv[0] <<
" [parameters.py]" << std::endl;
56 TH1F* emfAllJets_ = theDir.
make<TH1F>(
"emfAllJets" ,
"f_{emf}(All Jets)" , 20, 0., 1.);
57 TH1F* emfCleanJets_ = theDir.make<TH1F>(
"emfCleanJets" ,
"f_{emf}(Clean Jets)" , 20, 0., 1.);
58 TH1F* emfOverlapJets_= theDir.make<TH1F>(
"emfOverlapJets",
"f_{emf}(Overlap Jets)", 20, 0., 1.);
59 TH1F* deltaRElecJet_ = theDir.make<TH1F>(
"deltaRElecJet" ,
"#DeltaR (elec, jet)" , 10, 0., 0.5);
60 TH1F* elecOverJet_ = theDir.make<TH1F>(
"elecOverJet" ,
"E_{elec}/E_{jet}" , 100, 0., 2.);
61 TH1F* nOverlaps_ = theDir.make<TH1F>(
"nOverlaps" ,
"Number of overlaps" , 5, 0., 5.);
64 TFile* inFile = TFile::Open(input_.c_str());
83 if( iEvent==1000 )
break;
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() );
104 nOverlaps_->Fill( overlaps.
size() );
105 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.
const_iterator begin() const
bool overlap(const reco::Muon &muon1, const reco::Muon &muon2, double pullX=1.0, double pullY=1.0, bool checkAdjacentChambers=false)
virtual bool atEnd() const override
static void enable()
enable automatic library loading
int main(int argc, char *argv[])
const_iterator end() const
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
T * make(const Args &...args) const
make new ROOT object
double deltaR(double eta1, double eta2, double phi1, double phi2)
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
std::shared_ptr< edm::ProcessDesc > processDesc() const