64 #include "TLorentzVector.h"
77 using namespace trigger;
88 typedef std::vector<edm::InputTag> vtag;
93 triggerToken_ = consumes< edm::TriggerResults> ( theTriggerResultsCollection );
96 jetLabels_ = ps.
getParameter<std::vector<edm::InputTag> >(
"jetLabels");
97 for ( std::vector<edm::InputTag>::const_iterator jetlabel = jetLabels_.begin(),
98 jetlabelEnd = jetLabels_.end(); jetlabel != jetlabelEnd; ++jetlabel ) {
101 jetPtMins_ = ps.
getParameter<std::vector<double> > (
"jetPtMins");
106 PFMETToken_ = consumes<std::vector<reco::PFMET> > ( PFMETLabel_ );
137 bei_->setCurrentFolder(
"Physics/B2G");
141 bool isConfigChanged =
false;
145 const std::string hltProcessName = theTriggerResultsCollection.process();
146 isValidHltConfig_ = hltConfigProvider_.init( run, eSetup, hltProcessName, isConfigChanged );
170 std::stringstream
ss;
171 ss <<
"Physics/B2G/" << jetLabels_[
icoll].label();
173 pfJet_pt .push_back( bei->
book1D(
"pfJet_pt",
"Pt of PFJet (GeV)", 50, 0.0, 1000) );
174 pfJet_y .push_back( bei->
book1D(
"pfJet_y",
"Rapidity of PFJet", 60, -6.0, 6.0) );
175 pfJet_phi .push_back( bei->
book1D(
"pfJet_phi",
"#phi of PFJet (radians)",60, -3.14159, 3.14159) );
176 pfJet_m .push_back( bei->
book1D(
"pfJet_m",
"Mass of PFJet (GeV)", 50, 0.0, 500) );
177 pfJet_chef .push_back( bei->
book1D(
"pfJet_pfchef",
"PFJetID CHEF", 50, 0.0 , 1.0));
178 pfJet_nhef .push_back( bei->
book1D(
"pfJet_pfnhef",
"PFJetID NHEF", 50, 0.0 , 1.0));
179 pfJet_cemf .push_back( bei->
book1D(
"pfJet_pfcemf",
"PFJetID CEMF", 50, 0.0 , 1.0));
180 pfJet_nemf .push_back( bei->
book1D(
"pfJet_pfnemf",
"PFJetID NEMF", 50, 0.0 , 1.0));
182 boostedJet_subjetPt .push_back( bei->
book1D(
"boostedJet_subjetPt",
"Pt of subjets (GeV)", 50, 0.0 , 500));
183 boostedJet_subjetY .push_back( bei->
book1D(
"boostedJet_subjetY",
"Rapidity of subjets", 60, -6.0, 6.0));
184 boostedJet_subjetPhi .push_back( bei->
book1D(
"boostedJet_subjetPhi",
"#phi of subjets (radians)", 60, -3.14159, 3.14159));
185 boostedJet_subjetM .push_back( bei->
book1D(
"boostedJet_subjetM",
"Mass of subjets (GeV)", 50, 0.0 , 250.));
186 boostedJet_subjetN .push_back( bei->
book1D(
"boostedJet_subjetN",
"Number of subjets", 10, 0, 10));
187 boostedJet_massDrop .push_back( bei->
book1D(
"boostedJet_massDrop",
"Mass drop for W-like jets", 50, 0.0 , 1.0));
188 boostedJet_minMass .push_back( bei->
book1D(
"boostedJet_minMass",
"Minimum Mass Pairing for top-like jets", 50, 0.0 , 250.0));
193 pfMet_pt = bei->
book1D(
"pfMet_pt",
"Pf Missing p_{T}; GeV", 50, 0.0 , 500);
194 pfMet_phi = bei->
book1D(
"pfMet_phi",
"Pf Missing p_{T} #phi;#phi (radians)", 35, -3.5, 3.5 );
207 analyzeEventInterpretation(iEvent, iSetup);
222 bool ValidPFJets = iEvent.
getByToken(jetTokens_[
icoll], pfJetCollection );
223 if(!ValidPFJets)
continue;
233 jetEnd = pfjets.
end();
235 if(
jet->pt()<jetPtMins_[
icoll])
continue;
237 pfJet_y [
icoll]->Fill(
jet->rapidity());
238 pfJet_phi [
icoll]->Fill(
jet->phi());
256 if ( basicjet != 0 ) {
257 boostedJet_subjetN[
icoll]->Fill(
jet->numberOfDaughters() );
259 for (
unsigned int ida = 0; ida <
jet->numberOfDaughters(); ++ida ) {
261 boostedJet_subjetPt [
icoll]->Fill ( subjet->
pt() );
263 boostedJet_subjetPhi[
icoll]->Fill ( subjet->
phi() );
264 boostedJet_subjetM [
icoll]->Fill ( subjet->
mass() );
269 if ( jetLabels_[icoll].
label() ==
"cmsTopTagPFJetsCHS") {
272 if (
jet->numberOfDaughters() > 2 ) {
275 boostedJet_minMass[
icoll]->Fill ( -1.0 );
279 }
else if ( jetLabels_[icoll].
label() ==
"ca8PFJetsCHSPruned" ) {
280 if (
jet->numberOfDaughters() > 1 ) {
284 boostedJet_massDrop[
icoll]->Fill( da0->
mass() /
jet->mass() );
286 boostedJet_massDrop[
icoll]->Fill( da1->
mass() /
jet->mass() );
289 boostedJet_massDrop[
icoll]->Fill( -1.0 );
303 bool ValidPFMET = iEvent.
getByToken(PFMETToken_, pfMETCollection);
304 if(!ValidPFMET)
return;
306 pfMet_pt->Fill( (*pfMETCollection)[0].
pt() );
307 pfMet_phi->Fill( (*pfMETCollection)[0].
phi() );
T getParameter(std::string const &) const
boost::indirect_iterator< typename seq_t::const_iterator > const_iterator
void bookHistos(DQMStore *bei)
virtual float mass() const =0
mass
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void cd(void)
go to top directory (ie. root)
float chargedHadronEnergyFraction() const
chargedHadronEnergyFraction
virtual void beginLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &context)
virtual float phi() const =0
momentum azimuthal angle
virtual double rapidity() const =0
rapidity
Jets made from CaloTowers.
Jets made from PFObjects.
virtual void endRun(edm::Run const &run, edm::EventSetup const &eSetup)
float neutralEmEnergyFraction() const
neutralEmEnergyFraction
virtual float pt() const =0
transverse momentum
float neutralHadronEnergyFraction() const
neutralHadronEnergyFraction
float chargedEmEnergyFraction() const
chargedEmEnergyFraction
B2GDQM(const edm::ParameterSet &ps)
virtual void beginRun(edm::Run const &run, edm::EventSetup const &eSetup)
const_iterator begin() const
const_iterator end() const
virtual void analyzeEventInterpretation(edm::Event const &e, edm::EventSetup const &eSetup)
virtual void endLuminosityBlock(edm::LuminosityBlock const &lumiSeg, edm::EventSetup const &c)
void setCurrentFolder(const std::string &fullpath)
virtual void analyze(edm::Event const &e, edm::EventSetup const &eSetup)