13 #include "FWCore/Framework/interface/Frameworkfwd.h" 14 #include "FWCore/Framework/interface/EDAnalyzer.h" 15 #include "FWCore/Framework/interface/Event.h" 16 #include "FWCore/ParameterSet/interface/ParameterSet.h" 19 #include "DataFormats/PatCandidates/interface/Muon.h" 20 #include "DataFormats/PatCandidates/interface/Electron.h" 21 #include "DataFormats/PatCandidates/interface/Photon.h" 22 #include "DataFormats/PatCandidates/interface/MET.h" 23 #include "DataFormats/PatCandidates/interface/Jet.h" 24 #include "DataFormats/JetReco/interface/GenJet.h" 25 #include "DataFormats/PatCandidates/interface/Conversion.h" 26 #include "DataFormats/BeamSpot/interface/BeamSpot.h" 27 #include "DataFormats/VertexReco/interface/Vertex.h" 28 #include "DataFormats/Common/interface/TriggerResults.h" 29 #include "DataFormats/PatCandidates/interface/PackedTriggerPrescales.h" 30 #include "DataFormats/PatCandidates/interface/TriggerObjectStandAlone.h" 31 #include "DataFormats/PatCandidates/interface/PackedCandidate.h" 32 #include "SimDataFormats/PileupSummaryInfo/interface/PileupSummaryInfo.h" 33 #include "SimDataFormats/GeneratorProducts/interface/LHEEventProduct.h" 34 #include "SimDataFormats/GeneratorProducts/interface/GenEventInfoProduct.h" 35 #include "SimDataFormats/GeneratorProducts/interface/GenLumiInfoHeader.h" 81 void writeMET(edm::Handle<pat::METCollection> mets, edm::Handle<pat::METCollection> mets_nohf, edm::Handle<pat::METCollection> mets_puppi);
82 std::vector<reco::Candidate::LorentzVector>
writeJets(edm::Handle<pat::JetCollection> alljets,
83 std::vector<unsigned> &all_baby_jets_idx,
84 edm::Handle<edm::View <reco::GenJet> > genjets,
87 std::vector<std::vector<LVector> > &sysjets,
88 std::vector<double> &jetsMuonEnergyFrac);
90 std::vector<reco::Candidate::LorentzVector> &all_baby_jets,
91 std::vector<unsigned> &all_baby_jet_idx);
92 void writeHiggVars(std::vector<LVector> &baby_jets_p4, std::vector<float> &baby_jets_csv,
93 std::vector<bool> &baby_jets_h1, std::vector<bool> &baby_jets_h2,
94 std::vector<bool> &baby_jets_islep,
int &baby_nbl,
int &baby_nbm,
int &baby_nbt,
95 float &baby_hig_am,
float &baby_hig_dm,
float &baby_hig_drmax,
96 int &baby_hig_bin,
float &baby_mct,
bool isSystemtatic =
false);
97 void writeBBVars(std::vector<reco::Candidate::LorentzVector> &all_baby_jets,
vCands &sig_leps);
104 edm::Handle<pat::PackedCandidateCollection> pfcands,
105 edm::Handle<reco::VertexCollection> vtx,
106 vCands &veto_mus,
vCands &all_mus,
double rhoEventCentral);
108 edm::Handle<pat::PackedCandidateCollection> pfcands,
109 edm::Handle<reco::VertexCollection> vtx,
110 vCands &veto_els,
vCands &all_els,
double rhoEventCentral);
119 void writeTks(edm::Handle<pat::PackedCandidateCollection> pfcands,edm::Handle<reco::VertexCollection> vtx,
double rhoEventCentral);
121 edm::Handle<std::vector<pat::Electron> > &electrons,
122 edm::Handle<reco::ConversionCollection> &conversions,
123 edm::Handle<reco::BeamSpot> &beamspot,
double rho);
126 edm::Handle<edm::TriggerResults> triggerBits,
127 edm::Handle<pat::PackedTriggerPrescales> triggerPrescales);
129 edm::Handle<pat::TriggerObjectStandAloneCollection> triggerObjects,
132 edm::Handle<edm::TriggerResults> filterBits,
133 edm::Handle<reco::VertexCollection> vtx,
134 std::vector<double> jetsMuonEnergyFrac);
136 edm::Handle<std::vector< PileupSummaryInfo > > pu_info);
137 void writeGenInfo(edm::Handle<LHEEventProduct> lhe_info);
138 void writeIFSR(edm::Handle<reco::GenParticleCollection> genParticles,
139 std::vector<reco::Candidate::LorentzVector> &
jets);
150 void writeWeights(
const vCands &sig_leps, edm::Handle<GenEventInfoProduct> &gen_event_info,
151 edm::Handle<LHEEventProduct> &lhe_info);
222 virtual void analyze(
const edm::Event&,
const edm::EventSetup&)
override;
223 virtual void endJob()
override;
228 virtual void beginLuminosityBlock(edm::LuminosityBlock
const&, edm::EventSetup
const&)
override;
edm::InputTag met_nohf_label
edm::EDGetTokenT< pat::TriggerObjectStandAloneCollection > tok_selectedPatTrig_
edm::EDGetTokenT< pat::METCollection > tok_met_
void writeWeights(const vCands &sig_leps, edm::Handle< GenEventInfoProduct > &gen_event_info, edm::Handle< LHEEventProduct > &lhe_info)
bool writeTriggers(const edm::TriggerNames &names, edm::Handle< edm::TriggerResults > triggerBits, edm::Handle< pat::PackedTriggerPrescales > triggerPrescales)
void writeHLTObjects(const edm::TriggerNames &names, edm::Handle< pat::TriggerObjectStandAloneCollection > triggerObjects, vCands &all_mus, vCands &all_els, vCands &photons, const edm::Event &)
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > tok_slimAddPileup_
void setDiLepMass(vCands leptons, baby_float ll_m, baby_float ll_pt1, baby_float ll_pt2, baby_float ll_pt, baby_float ll_eta, baby_float ll_phi, baby_vfloat l_pt, baby_vbool l_inz, baby_float ll_w)
edm::EDGetTokenT< pat::JetCollection > tok_jets_
edm::EDGetTokenT< pat::PackedCandidateCollection > tok_packPFCands_
bmaker_full(const edm::ParameterSet &)
virtual void beginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) override
edm::EDGetTokenT< pat::METCollection > tok_met_noHF_
std::vector< const reco::Candidate * > vCands
edm::EDGetTokenT< pat::METCollection > tok_met_Puppi_
weight_tools * weightTool
edm::EDGetTokenT< bool > tok_badChCandFilter_
edm::EDGetTokenT< GenEventInfoProduct > tok_generator_
edm::EDGetTokenT< pat::PackedTriggerPrescales > tok_patTrig_
std::string btag_label_BC
virtual void analyze(const edm::Event &, const edm::EventSetup &) override
edm::EDGetTokenT< edm::TriggerResults > tok_trigResults_pat_
edm::EDGetTokenT< double > tok_rhoFastJet_centralNeutral_
edm::EDGetTokenT< GenLumiInfoHeader > tok_genlumiheader_
void writeDiLep(vCands &sig_mus, vCands &sig_els, vCands &veto_mus, vCands &veto_els)
void writeMET(edm::Handle< pat::METCollection > mets, edm::Handle< pat::METCollection > mets_nohf, edm::Handle< pat::METCollection > mets_puppi)
vCands writeElectrons(edm::Handle< pat::ElectronCollection > electrons, edm::Handle< pat::PackedCandidateCollection > pfcands, edm::Handle< reco::VertexCollection > vtx, vCands &veto_els, vCands &all_els, double rhoEventCentral)
edm::EDGetTokenT< edm::TriggerResults > tok_trigResults_hlt_
void rebalancedMET(double &MET, double &METPhi)
edm::EDGetTokenT< pat::PhotonCollection > tok_photons_
edm::EDGetTokenT< pat::MuonCollection > tok_muons_
edm::EDGetTokenT< std::vector< PileupSummaryInfo > > tok_addPileup_
void reportTime(const edm::Event &iEvent)
edm::EDGetTokenT< edm::View< reco::GenJet > > tok_genJets_
edm::EDGetTokenT< reco::GenParticleCollection > tok_pruneGenPart_
float &(baby_base::* baby_float)()
edm::EDGetTokenT< bool > tok_HBHENoiseFilter_
void writeVertices(edm::Handle< reco::VertexCollection > vtx, edm::Handle< std::vector< PileupSummaryInfo > > pu_info)
void writeTks(edm::Handle< pat::PackedCandidateCollection > pfcands, edm::Handle< reco::VertexCollection > vtx, double rhoEventCentral)
void writeBBVars(std::vector< reco::Candidate::LorentzVector > &all_baby_jets, vCands &sig_leps)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
edm::EDGetTokenT< LHEEventProduct > tok_extLHEProducer_
edm::EDGetTokenT< std::vector< reco::Conversion > > tok_reducedEgamma_conver_
void setElMuMass(vCands leptons1, vCands leptons2, baby_float ll_m, baby_float ll_pt1, baby_float ll_pt2, baby_float ll_pt, baby_float ll_eta, baby_float ll_phi, baby_float ll_w)
std::vector< bool > &(baby_base::* baby_vbool)()
edm::EDGetTokenT< reco::BeamSpot > tok_offBeamSpot_
edm::EDGetTokenT< edm::TriggerResults > tok_trigResults_reco_
void writeIFSR(edm::Handle< reco::GenParticleCollection > genParticles, std::vector< reco::Candidate::LorentzVector > &jets)
void writeBTagWeights(edm::Handle< pat::JetCollection > alljets, std::vector< reco::Candidate::LorentzVector > &all_baby_jets, std::vector< unsigned > &all_baby_jet_idx)
void writeGenInfo(edm::Handle< LHEEventProduct > lhe_info)
virtual void endJob() override
edm::EDGetTokenT< pat::ElectronCollection > tok_electrons_
edm::EDGetTokenT< bool > tok_HBHEIsoNoiseFilter_
edm::EDGetTokenT< reco::VertexCollection > tok_primVertex_
unsigned int nevents_sample
vCands writePhotons(edm::Handle< pat::PhotonCollection > allphotons, edm::Handle< std::vector< pat::Electron > > &electrons, edm::Handle< reco::ConversionCollection > &conversions, edm::Handle< reco::BeamSpot > &beamspot, double rho)
edm::EDGetTokenT< bool > tok_badPFMuonFilter_
std::vector< TString > trig_name
photon_tools * photonTool
virtual void beginJob() override
void writeHiggVars(std::vector< LVector > &baby_jets_p4, std::vector< float > &baby_jets_csv, std::vector< bool > &baby_jets_h1, std::vector< bool > &baby_jets_h2, std::vector< bool > &baby_jets_islep, int &baby_nbl, int &baby_nbm, int &baby_nbt, float &baby_hig_am, float &baby_hig_dm, float &baby_hig_drmax, int &baby_hig_bin, float &baby_mct, bool isSystemtatic=false)
std::vector< float > &(baby_base::* baby_vfloat)()
vCands writeMuons(edm::Handle< pat::MuonCollection > muons, edm::Handle< pat::PackedCandidateCollection > pfcands, edm::Handle< reco::VertexCollection > vtx, vCands &veto_mus, vCands &all_mus, double rhoEventCentral)
std::vector< reco::Candidate::LorentzVector > writeJets(edm::Handle< pat::JetCollection > alljets, std::vector< unsigned > &all_baby_jets_idx, edm::Handle< edm::View< reco::GenJet > > genjets, vCands &sig_leps, vCands &veto_leps, vCands &photons, vCands &tks, std::vector< std::vector< LVector > > &sysjets, std::vector< double > &jetsMuonEnergyFrac)
void writeLeptons(vCands &leptons)
void writeMC(edm::Handle< reco::GenParticleCollection > genParticles, vCands &all_mus, vCands &all_els, vCands &photons)
void writeFilters(const edm::TriggerNames &fnames, edm::Handle< edm::TriggerResults > filterBits, edm::Handle< reco::VertexCollection > vtx, std::vector< double > jetsMuonEnergyFrac)
double calculateRebalancedMET(unsigned int jetIdx, double mu, double &METPhi)
edm::EDGetTokenT< LHEEventProduct > tok_source_
edm::EDGetTokenT< double > tok_rhoFastJet_all_
std::vector< std::string > inputfiles
std::string btag_label_UDSG
double calculateRescalingFactor(unsigned int jetIdx)