33 gSystem->Load(
"libFWCoreFWLite" );
39 std::cout <<
"Usage : " << argv[0] <<
" [parameters.py]" << std::endl;
56 TH1F* deltaRElecJet_ = theDir.
make<TH1F>(
"deltaRElecJet" ,
"#DeltaR (elec, jet)" , 10, 0., 0.5);
57 TH1F* elecOverJet_ = theDir.make<TH1F>(
"elecOverJet" ,
"E_{elec}/E_{jet}" , 100, 0., 2.);
58 TH1F* nOverlaps_ = theDir.make<TH1F>(
"nOverlaps" ,
"Number of overlaps" , 5, 0., 5.);
61 TFile* inFile = TFile::Open(input_.c_str());
80 if( iEvent==1000 )
break;
83 if(iEvent>0 && iEvent%1==0){
84 std::cout <<
" processing event: " << iEvent << std::endl;
89 event.getByLabel(jets_, jets);
92 for( std::vector<pat::Jet>::const_iterator
jet = jets->begin();
jet != jets->end();
jet++ ){
93 if(
jet->pt()>20 &&
jet==jets->begin()){
95 if(
jet->hasOverlaps(overlaps_)){
98 nOverlaps_->Fill( overlaps.
size() );
102 deltaRElecJet_->Fill( deltaR );
103 elecOverJet_->Fill( (*overlap)->energy()/
jet->energy() );
T getParameter(std::string const &) const
size_type size() const
Size of the RefVector.
int main(int argc, char **argv)
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)
Event const & toBegin()
Go to the very first Event.
const_iterator end() const
auto deltaR(const T1 &t1, const T2 &t2) -> decltype(t1.eta())
double deltaR(double eta1, double eta2, double phi1, double phi2)
virtual bool atEnd() const
TFileDirectory mkdir(const std::string &dir, const std::string &descr="")
create a new subdirectory
boost::shared_ptr< edm::ProcessDesc > processDesc()
T * make() const
make new ROOT object
static void enable()
enable automatic library loading