CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
WMuNuSelector Class Reference
Inheritance diagram for WMuNuSelector:
edm::EDFilter edm::ProducerBase edm::ProductRegistryHelper

Public Member Functions

virtual void beginJob ()
 
virtual void endJob ()
 
virtual bool filter (edm::Event &, const edm::EventSetup &)
 
void init_histograms ()
 
 WMuNuSelector (const edm::ParameterSet &)
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
virtual ~EDFilter ()
 
- Public Member Functions inherited from edm::ProducerBase
 ProducerBase ()
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
boost::function< void(const
BranchDescription &)> 
registrationCallback () const
 used by the fwk to register list of products More...
 
virtual ~ProducerBase ()
 

Private Attributes

double acopCut_
 
double dxyCut_
 
double eJetMin_
 
double etaCut_
 
std::map< std::string, TH1D * > h1_
 
std::map< std::string, TH2D * > h2_
 
bool isAlsoTrackerMuon_
 
bool isCombinedIso_
 
double isoCut03_
 
bool isRelativeIso_
 
edm::InputTag jetTag_
 
double metMax_
 
double metMin_
 
double mtMax_
 
double mtMin_
 
edm::InputTag muonTag_
 
const std::string muonTrig_
 
double nacop
 
double nall
 
double ncharge
 
double nid
 
double niso
 
int nJetMax_
 
double nkin
 
double nmass
 
double normalizedChi2Cut_
 
double npresel
 
double nsel
 
double ntrig
 
bool plotHistograms_
 
double ptCut_
 
double ptThrForZ1_
 
double ptThrForZ2_
 
int selectByCharge_
 
int trackerHitsCut_
 
edm::InputTag trigTag_
 
edm::InputTag WMuNuCollectionTag_
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter ModuleType
 
typedef WorkerT< EDFilterWorkerType
 
- Public Types inherited from edm::ProducerBase
typedef
ProductRegistryHelper::TypeLabelList 
TypeLabelList
 
- Static Public Member Functions inherited from edm::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDFilter
CurrentProcessingContext const * currentContext () const
 
- Protected Member Functions inherited from edm::ProducerBase
template<class TProducer , class TMethod >
void callWhenNewProductsRegistered (TProducer *iProd, TMethod iMethod)
 

Detailed Description

Definition at line 29 of file WMuNuSelector.cc.

Constructor & Destructor Documentation

WMuNuSelector::WMuNuSelector ( const edm::ParameterSet cfg)

Definition at line 106 of file WMuNuSelector.cc.

106  :
107  // Fast selection (no histograms)
108  plotHistograms_(cfg.getUntrackedParameter<bool> ("plotHistograms", true)),
109 
110  // Input collections
111  trigTag_(cfg.getUntrackedParameter<edm::InputTag> ("TrigTag", edm::InputTag("TriggerResults::HLT"))),
112  muonTag_(cfg.getUntrackedParameter<edm::InputTag> ("MuonTag", edm::InputTag("muons"))),
113  jetTag_(cfg.getUntrackedParameter<edm::InputTag> ("JetTag", edm::InputTag("sisCone5CaloJets"))),
114  WMuNuCollectionTag_(cfg.getUntrackedParameter<edm::InputTag> ("WMuNuCollectionTag", edm::InputTag("WMuNus"))),
115 
116 
117  // Preselection cuts
118  muonTrig_(cfg.getUntrackedParameter<std::string>("MuonTrig", "HLT_Mu9")),
119  ptThrForZ1_(cfg.getUntrackedParameter<double>("PtThrForZ1", 20.)),
120  ptThrForZ2_(cfg.getUntrackedParameter<double>("PtThrForZ2", 10.)),
121  eJetMin_(cfg.getUntrackedParameter<double>("EJetMin", 999999.)),
122  nJetMax_(cfg.getUntrackedParameter<int>("NJetMax", 999999)),
123 
124 
125  // Main cuts
126  ptCut_(cfg.getUntrackedParameter<double>("PtCut", 25.)),
127  etaCut_(cfg.getUntrackedParameter<double>("EtaCut", 2.1)),
128  isRelativeIso_(cfg.getUntrackedParameter<bool>("IsRelativeIso", true)),
129  isCombinedIso_(cfg.getUntrackedParameter<bool>("IsCombinedIso", false)),
130  isoCut03_(cfg.getUntrackedParameter<double>("IsoCut03", 0.1)),
131  mtMin_(cfg.getUntrackedParameter<double>("MtMin", 50.)),
132  mtMax_(cfg.getUntrackedParameter<double>("MtMax", 200.)),
133  metMin_(cfg.getUntrackedParameter<double>("MetMin", -999999.)),
134  metMax_(cfg.getUntrackedParameter<double>("MetMax", 999999.)),
135  acopCut_(cfg.getUntrackedParameter<double>("AcopCut", 2.)),
136 
137  // Muon quality cuts
138  dxyCut_(cfg.getUntrackedParameter<double>("DxyCut", 0.2)),
139  normalizedChi2Cut_(cfg.getUntrackedParameter<double>("NormalizedChi2Cut", 10.)),
140  trackerHitsCut_(cfg.getUntrackedParameter<int>("TrackerHitsCut", 11)),
141  isAlsoTrackerMuon_(cfg.getUntrackedParameter<bool>("IsAlsoTrackerMuon", true)),
142 
143  // W+/W- Selection
144  selectByCharge_(cfg.getUntrackedParameter<int>("SelectByCharge", 0))
145 {
146 }
T getUntrackedParameter(std::string const &, T const &) const
edm::InputTag trigTag_
const std::string muonTrig_
bool isAlsoTrackerMuon_
double ptThrForZ1_
edm::InputTag WMuNuCollectionTag_
edm::InputTag muonTag_
edm::InputTag jetTag_
double ptThrForZ2_
double normalizedChi2Cut_

Member Function Documentation

void WMuNuSelector::beginJob ( void  )
virtual

Reimplemented from edm::EDFilter.

Definition at line 148 of file WMuNuSelector.cc.

References h1_, h2_, M_PI, TFileDirectory::make(), nacop, nall, ncharge, nid, niso, nkin, npresel, nsel, ntrig, and plotHistograms_.

148  {
149  nall = 0;
150  ntrig=0;
151  npresel=0;
152  ncharge = 0;
153  nkin=0;
154  nid=0;
155  nacop=0;
156  niso=0;
157  nsel = 0;
158 
159  if(plotHistograms_){
161  h1_["hNWCand_sel"] =fs->make<TH1D>("NWCand_sel","Nb. of WCandidates passing pre-selection (ordered by pt)",10,0.,10.);
162  h1_["hPtMu_sel"] =fs->make<TH1D>("ptMu_sel","Pt mu",100,0.,100.);
163  h1_["hEtaMu_sel"] =fs->make<TH1D>("etaMu_sel","Eta mu",50,-2.5,2.5);
164  h1_["hd0_sel"] =fs->make<TH1D>("d0_sel","Impact parameter",1000,-1.,1.);
165  h1_["hNHits_sel"] =fs->make<TH1D>("NumberOfValidHits_sel","Number of Hits in Silicon",100,0.,100.);
166  h1_["hNormChi2_sel"] =fs->make<TH1D>("NormChi2_sel","Chi2/ndof of global track",1000,0.,50.);
167  h1_["hTracker_sel"] =fs->make<TH1D>("isTrackerMuon_sel","is Tracker Muon?",2,0.,2.);
168  h1_["hMET_sel"] =fs->make<TH1D>("MET_sel","Missing Transverse Energy (GeV)", 300,0.,300.);
169  h1_["hTMass_sel"] =fs->make<TH1D>("TMass_sel","Rec. Transverse Mass (GeV)",300,0.,300.);
170  h1_["hAcop_sel"] =fs->make<TH1D>("Acop_sel","Mu-MET acoplanarity",50,0.,M_PI);
171  h1_["hPtSum_sel"] =fs->make<TH1D>("ptSum_sel","Track Isolation, Sum pT (GeV)",200,0.,100.);
172  h1_["hPtSumN_sel"] =fs->make<TH1D>("ptSumN_sel","Track Isolation, Sum pT/pT",1000,0.,10.);
173  h1_["hCal_sel"] =fs->make<TH1D>("Cal_sel","Calorimetric isolation, HCAL+ECAL (GeV)",200,0.,100.);
174  h1_["hIsoTotN_sel"] =fs->make<TH1D>("isoTotN_sel","(Sum pT + Cal)/pT",1000,0.,10.);
175  h1_["hIsoTot_sel"] =fs->make<TH1D>("isoTot_sel","(Sum pT + Cal)",200,0.,100.);
176  h2_["hTMass_PtSum_inclusive"] =fs->make<TH2D>("TMass_PtSum_inclusive","Rec. Transverse Mass (GeV) vs Sum pT (GeV)",200,0.,100.,300,0.,300.);
177  h2_["hTMass_PtSumNorm_inclusive"] =fs->make<TH2D>("TMass_PtSumNorm_inclusive","Rec. Transverse Mass (GeV) vs Sum Pt / Pt", 1000,0,10,300,0,300);
178  h2_["hTMass_TotIsoNorm_inclusive"]=fs->make<TH2D>("TMass_TotIsoNorm_inclusive","Rec. Transverse Mass (GeV) vs (Sum Pt + Cal)/Pt", 10000,0,10,200,0,200);
179  h2_["hMET_PtSum_inclusive"] =fs->make<TH2D>("MET_PtSum_inclusive","Missing Transverse Energy (GeV) vs Sum Pt (GeV)",200,0.,100.,300,0.,300.);
180  h2_["hMET_PtSumNorm_inclusive"] =fs->make<TH2D>("MET_PtSumNorm_inclusive","Missing Transverse Energy (GeV) vs Sum Pt/Pt",1000,0,10,300,0,300);
181  h2_["hMET_TotIsoNorm_inclusive"]=fs->make<TH2D>("MET_TotIsoNorm_inclusive","Missing Transverse Energy (GeV) vs (SumPt + Cal)/Pt",10000,0,10,200,0,200);
182  }
183 }
std::map< std::string, TH1D * > h1_
#define M_PI
Definition: BFit3D.cc:3
T * make() const
make new ROOT object
std::map< std::string, TH2D * > h2_
void WMuNuSelector::endJob ( void  )
virtual

Reimplemented from edm::EDFilter.

Definition at line 186 of file WMuNuSelector.cc.

References cond::ecalcond::all, nacop, nall, ncharge, nid, niso, nkin, npresel, nsel, ntrig, selectByCharge_, and mathSSE::sqrt().

186  {
187  double all = nall;
188  double epresel = npresel/all;
189  double etrig = ntrig/all;
190  double ekin = nkin/all;
191  double eid = nid/all;
192  double eacop = nacop/all;
193  double eiso = niso/all;
194  double esel = nsel/all;
195 
196  LogVerbatim("") << "\n>>>>>> W SELECTION SUMMARY BEGIN >>>>>>>>>>>>>>>";
197  LogVerbatim("") << "Total number of events analyzed: " << nall << " [events]";
198  LogVerbatim("") << "Total number of events triggered: " << ntrig << " [events]";
199  LogVerbatim("") << "Total number of events pre-selected: " << npresel << " [events]";
200  LogVerbatim("") << "Total number of events after kinematic cuts: " << nkin << " [events]";
201  LogVerbatim("") << "Total number of events after Muon ID cuts: " << nid << " [events]";
202  LogVerbatim("") << "Total number of events after Acop cut: " << nacop << " [events]";
203  LogVerbatim("") << "Total number of events after iso cut: " << niso << " [events]";
204  LogVerbatim("") << "Total number of events selected: " << nsel << " [events]";
205  LogVerbatim("") << "Efficiencies:";
206  LogVerbatim("") << "Trigger Efficiency: " << "(" << setprecision(4) << etrig*100. <<" +/- "<< setprecision(2) << sqrt(etrig*(1-etrig)/all)*100. << ")%";
207  LogVerbatim("") << "Pre-Selection Efficiency: " << "(" << setprecision(4) << epresel*100. <<" +/- "<< setprecision(2) << sqrt(epresel*(1-epresel)/all)*100. << ")%";
208  LogVerbatim("") << "Pt, Eta Selection Efficiency: " << "(" << setprecision(4) << ekin*100. <<" +/- "<< setprecision(2) << sqrt(ekin*(1-ekin)/all)*100. << ")%";
209  LogVerbatim("") << "MuonID Efficiency: " << "(" << setprecision(4) << eid*100. <<" +/- "<< setprecision(2) << sqrt(eid*(1-eid)/all)*100. << ")%";
210  LogVerbatim("") << "Acop Efficiency: " << "(" << setprecision(4) << eacop*100. <<" +/- "<< setprecision(2) << sqrt(eacop*(1-eacop)/all)*100. << ")%";
211  LogVerbatim("") << "Iso Efficiency: " << "(" << setprecision(4) << eiso*100. <<" +/- "<< setprecision(2) << sqrt(eiso*(1-eiso)/all)*100. << ")%";
212  LogVerbatim("") << "Selection Efficiency: " << "(" << setprecision(4) << esel*100. <<" +/- "<< setprecision(2) << sqrt(esel*(1-esel)/nall)*100. << ")%";
213 
214  if ( fabs(selectByCharge_)==1 ){
215  esel = nsel/ncharge;
216  LogVerbatim("") << "\n>>>>>> W+(-) SELECTION >>>>>>>>>>>>>>>";
217  LogVerbatim("") << "Total number of W+(-) events pre-selected: " << ncharge << " [events]";
218  LogVerbatim("") << "Total number of events selected: " << nsel << " [events]";
219  LogVerbatim("") << "Selection Efficiency only W+(-): " << "(" << setprecision(4) << esel*100. <<" +/- "<< setprecision(2) << sqrt(esel*(1-esel)/ncharge)*100. << ")%";
220  }
221  LogVerbatim("") << ">>>>>> W SELECTION SUMMARY END >>>>>>>>>>>>>>>\n";
222 }
T sqrt(T t)
Definition: SSEVec.h:28
bool WMuNuSelector::filter ( edm::Event ev,
const edm::EventSetup  
)
virtual

Implements edm::EDFilter.

Definition at line 224 of file WMuNuSelector.cc.

References reco::WMuNuCandidate::acop(), acopCut_, FitTarget::Cal, reco::LeafCandidate::charge(), eJetMin_, reco::MuonIsolation::emEt, reco::WMuNuCandidate::eT(), reco::LeafCandidate::et(), eta(), reco::LeafCandidate::eta(), etaCut_, edm::Event::getByLabel(), reco::WMuNuCandidate::getMuon(), reco::WMuNuCandidate::getNeutrino(), muon::GlobalMuonPromptTight, reco::Muon::globalTrack(), h1_, h2_, reco::MuonIsolation::hadEt, i, isCombinedIso_, reco::Muon::isGlobalMuon(), muon::isGoodMuon(), ExpressReco_HICollisions_FallBack::iso, isoCut03_, reco::Muon::isolationR03(), isRelativeIso_, reco::Muon::isTrackerMuon(), metsig::jet, jetTag_, LogTrace, reco::WMuNuCandidate::massT(), CaloMET_cfi::met, metMax_, mtMax_, ExpressReco_HICollisions_FallBack::muonCollection, muonTag_, muonTrig_, nacop, nall, ncharge, nid, niso, nJetMax_, nkin, normalizedChi2Cut_, npresel, nsel, ntrig, plotHistograms_, reco::LeafCandidate::pt(), ExpressReco_HICollisions_FallBack::pt, ptCut_, ptThrForZ1_, ptThrForZ2_, reco::LeafCandidate::px(), reco::LeafCandidate::py(), selectByCharge_, reco::MuonIsolation::sumPt, trackerHitsCut_, edm::TriggerNames::triggerIndex(), edm::Event::triggerNames(), trigTag_, and WMuNuCollectionTag_.

Referenced by python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filter(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setDataAccessor(), and python.Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView().

224  {
225  nall++;
226 
227  // Repeat Pre-Selection Cuts just in case...
228  // Muon collection
230  if (!ev.getByLabel(muonTag_, muonCollection)) {
231  LogError("") << ">>> Muon collection does not exist !!!";
232  return 0;
233  }
234  unsigned int muonCollectionSize = muonCollection->size();
235 
236  // Trigger
237  Handle<TriggerResults> triggerResults;
238  if (!ev.getByLabel(trigTag_, triggerResults)) {
239  LogError("") << ">>> TRIGGER collection does not exist !!!";
240  return 0;
241  }
242  const edm::TriggerNames & triggerNames = ev.triggerNames(*triggerResults);
243  bool trigger_fired = false;
244  int itrig1 = triggerNames.triggerIndex(muonTrig_);
245  if (triggerResults->accept(itrig1)) trigger_fired = true;
246  LogTrace("") << ">>> Trigger bit: " << trigger_fired << " (" << muonTrig_ << ")";
247 
248  // Loop to reject/control Z->mumu is done separately
249  unsigned int nmuonsForZ1 = 0;
250  unsigned int nmuonsForZ2 = 0;
251  for (unsigned int i=0; i<muonCollectionSize; i++) {
252  const Muon& mu = muonCollection->at(i);
253  if (!mu.isGlobalMuon()) continue;
254  double pt = mu.pt();
255  if (pt>ptThrForZ1_) nmuonsForZ1++;
256  if (pt>ptThrForZ2_) nmuonsForZ2++;
257  }
258  LogTrace("") << "> Z rejection: muons above " << ptThrForZ1_ << " [GeV]: " << nmuonsForZ1;
259  LogTrace("") << "> Z rejection: muons above " << ptThrForZ2_ << " [GeV]: " << nmuonsForZ2;
260 
261  // Jet collection
262  Handle<View<Jet> > jetCollection;
263  if (!ev.getByLabel(jetTag_, jetCollection)) {
264  LogError("") << ">>> JET collection does not exist !!!";
265  return 0;
266  }
267  unsigned int jetCollectionSize = jetCollection->size();
268  int njets = 0;
269  for (unsigned int i=0; i<jetCollectionSize; i++) {
270  const Jet& jet = jetCollection->at(i);
271  if (jet.et()>eJetMin_) njets++;
272  }
273  LogTrace("") << ">>> Total number of jets: " << jetCollectionSize;
274  LogTrace("") << ">>> Number of jets above " << eJetMin_ << " [GeV]: " << njets;
275 
276 
277  // Beam spot
278  Handle<reco::BeamSpot> beamSpotHandle;
279  if (!ev.getByLabel(InputTag("offlineBeamSpot"), beamSpotHandle)) {
280  LogTrace("") << ">>> No beam spot found !!!";
281  return false;
282  }
283 
284 
285 
286  // Get WMuNu candidates from file:
287 
289  if (!ev.getByLabel(WMuNuCollectionTag_,WMuNuCollection) ) {
290  LogTrace("") << ">>> WMuNu not found !!!";
291  return false;
292  }
293 
294  if(WMuNuCollection->size() < 1) {LogTrace("")<<"No WMuNu Candidates in the Event!"; return 0;}
295  if(WMuNuCollection->size() > 1) {LogTrace("")<<"This event contains more than one W Candidate";}
296 
297  // W->mu nu selection criteria
298 
299  LogTrace("") << "> WMuNu Candidate with: ";
300  const WMuNuCandidate& WMuNu = WMuNuCollection->at(0);
301  // WMuNuCandidates are ordered by Pt!
302  // The Inclusive Selection WMuNu Candidate is the first one
303 
304  const reco::Muon & mu = WMuNu.getMuon();
305  const reco::MET & met =WMuNu.getNeutrino();
306  if(plotHistograms_){
307  h1_["hNWCand_sel"]->Fill(WMuNuCollection->size());
308  }
309 
310 
311  // Preselection cuts:
312 
313  if (!trigger_fired) {LogTrace("")<<"Event did not fire the Trigger"; return 0;}
314  ntrig++;
315 
316  if (nmuonsForZ1>=1 && nmuonsForZ2>=2) {LogTrace("")<<"Z Candidate!!"; return 0;}
317  if (njets>nJetMax_) {LogTrace("")<<"NJets > threshold"; return 0;}
318 
319  npresel++;
320 
321  // Select Ws by charge:
322 
323  if (selectByCharge_*WMuNu.charge()==-1){ ncharge++;}
324 
325 
326  // W->mu nu selection criteria
327 
328  if (!mu.isGlobalMuon()) return 0;
329 
330  reco::TrackRef gm = mu.globalTrack();
331  //reco::TrackRef tk = mu.innerTrack();
332 
333  // Pt,eta cuts
334  double pt = mu.pt();
335  double eta = mu.eta();
336  LogTrace("") << "\t... Muon pt, eta: " << pt << " [GeV], " << eta;
337  if(plotHistograms_){ h1_["hPtMu_sel"]->Fill(pt);}
338  if (pt<ptCut_) return 0;
339  if(plotHistograms_){ h1_["hEtaMu_sel"]->Fill(eta);}
340  if (fabs(eta)>etaCut_) return 0;
341 
342  nkin++;
343 
344 
345  // d0, chi2, nhits quality cuts
346  double dxy = gm->dxy(beamSpotHandle->position());
347  double normalizedChi2 = gm->normalizedChi2(); LogTrace("")<<"Im here"<<endl;
348  double trackerHits = gm->hitPattern().numberOfValidTrackerHits();
349  LogTrace("") << "\t... Muon dxy, normalizedChi2, trackerHits, isTrackerMuon?: " << dxy << " [cm], "<<normalizedChi2 << ", "<<trackerHits << ", " << mu.isTrackerMuon();
350 
351  if(plotHistograms_){ h1_["hd0_sel"]->Fill(dxy);}
352  if (!muon::isGoodMuon(mu,muon::GlobalMuonPromptTight) ) return 0;
353  if(plotHistograms_){ h1_["hNormChi2_sel"]->Fill(normalizedChi2);}
354  if (normalizedChi2>normalizedChi2Cut_) return 0;
355  if(plotHistograms_){ h1_["hNHits_sel"]->Fill(trackerHits);}
356  if (trackerHits<trackerHitsCut_) return 0;
357  if(plotHistograms_){ h1_["hTracker_sel"]->Fill(mu.isTrackerMuon());}
358  if (!mu.isTrackerMuon()) return 0;
359 
360  nid++;
361 
362  // Acoplanarity cuts
363  double acop = WMuNu.acop();
364  LogTrace("") << "\t... acoplanarity: " << acop;
365 
366  // Isolation cuts
367  double SumPt = mu.isolationR03().sumPt; double isovar=SumPt;
368  double Cal = mu.isolationR03().emEt + mu.isolationR03().hadEt; if(isCombinedIso_)isovar+=Cal;
369  if(plotHistograms_){
370  h1_["hPtSum_sel"]->Fill(SumPt);
371  h1_["hPtSumN_sel"]->Fill(SumPt/pt);
372  h1_["hCal_sel"]->Fill(Cal);
373  h1_["hIsoTot_sel"]->Fill( (SumPt+Cal));
374  h1_["hIsoTotN_sel"]->Fill( (SumPt+Cal) / pt );
375  }
376 
377  if (isRelativeIso_) isovar /= pt;
378  bool iso = (isovar<=isoCut03_);
379  LogTrace("") << "\t... isolation value" << isovar <<", isolated? " <<iso ;
380 
381  double met_et = met.pt();
382  LogTrace("") << "\t... Met pt: "<<WMuNu.getNeutrino().pt()<<"[GeV]";
383 
384 
385  double massT = WMuNu.massT();
386  double w_et = WMuNu.eT();
387 
388  LogTrace("") << "\t... W mass, W_et, W_px, W_py: " << massT << ", " << w_et << ", " << WMuNu.px() << ", " << WMuNu.py() << " [GeV]";
389 
390 
391  // Plot 2D Histograms before final cuts
392  if(plotHistograms_ && acop<acopCut_){
393  h2_["hTMass_PtSum_inclusive"]->Fill(SumPt,massT);
394  h2_["hTMass_PtSumNorm_inclusive"]->Fill(SumPt/pt,massT);
395  h2_["hTMass_TotIsoNorm_inclusive"]->Fill((SumPt+Cal)/pt,massT);
396  h2_["hMET_PtSum_inclusive"]->Fill(SumPt,met_et);
397  h2_["hMET_PtSumNorm_inclusive"]->Fill(SumPt/pt,met_et);
398  h2_["hMET_TotIsoNorm_inclusive"]->Fill((SumPt+Cal)/pt,met_et);
399  }
400 
401  if (!iso) return 0;
402 
403  niso++;
404 
405  if(plotHistograms_){ h1_["hAcop_sel"]->Fill(acop);}
406  if (acop>=acopCut_) return 0;
407 
408  nacop++;
409 
410  if(plotHistograms_){
411  h1_["hMET_sel"]->Fill(met_et);
412  h1_["hTMass_sel"]->Fill(massT);
413  }
414 
415 
416  if (massT<=mtMin_ || massT>=mtMax_) return 0;
417  if (met_et<=metMin_ || met_et>=metMax_) return 0;
418 
419  LogTrace("") << ">>>> Event ACCEPTED";
420  nsel++;
421 
422 
423  // (To be continued ;-) )
424 
425  return true;
426 }
float hadEt
hcal sum-Et
Definition: MuonIsolation.h:9
int i
Definition: DBlmapReader.cc:9
edm::InputTag trigTag_
const std::string muonTrig_
virtual edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const
Definition: Event.cc:208
float sumPt
sum-pt of tracks
Definition: MuonIsolation.h:7
virtual double et() const
transverse energy
bool isTrackerMuon() const
Definition: Muon.h:149
Base class for all types of Jets.
Definition: Jet.h:21
bool isGlobalMuon() const
Definition: Muon.h:148
double ptThrForZ1_
T eta() const
virtual double eta() const
momentum pseudorapidity
static const char * Cal
Definition: FitHist_fwd.h:6
edm::InputTag WMuNuCollectionTag_
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
Definition: MET.h:32
edm::InputTag muonTag_
double eT() const
float emEt
ecal sum-Et
Definition: MuonIsolation.h:8
virtual int charge() const
electric charge
double acop() const
std::map< std::string, TH1D * > h1_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:359
#define LogTrace(id)
bool isGoodMuon(const reco::Muon &muon, SelectionType type, reco::Muon::ArbitrationType arbitrationType=reco::Muon::SegmentAndTrackArbitration)
main GoodMuon wrapper call
virtual double px() const
x coordinate of momentum vector
virtual double pt() const
transverse momentum
double massT() const
edm::InputTag jetTag_
std::map< std::string, TH2D * > h2_
double ptThrForZ2_
double normalizedChi2Cut_
const reco::Muon & getMuon() const
const reco::MET & getNeutrino() const
virtual double py() const
y coordinate of momentum vector
const MuonIsolation & isolationR03() const
Definition: Muon.h:109
virtual TrackRef globalTrack() const
reference to Track reconstructed in both tracked and muon detector
Definition: Muon.h:44
void WMuNuSelector::init_histograms ( )

Member Data Documentation

double WMuNuSelector::acopCut_
private

Definition at line 56 of file WMuNuSelector.cc.

Referenced by filter().

double WMuNuSelector::dxyCut_
private

Definition at line 58 of file WMuNuSelector.cc.

double WMuNuSelector::eJetMin_
private

Definition at line 45 of file WMuNuSelector.cc.

Referenced by filter().

double WMuNuSelector::etaCut_
private

Definition at line 48 of file WMuNuSelector.cc.

Referenced by filter().

std::map<std::string,TH1D*> WMuNuSelector::h1_
private

Definition at line 73 of file WMuNuSelector.cc.

Referenced by beginJob(), and filter().

std::map<std::string,TH2D*> WMuNuSelector::h2_
private

Definition at line 74 of file WMuNuSelector.cc.

Referenced by beginJob(), and filter().

bool WMuNuSelector::isAlsoTrackerMuon_
private

Definition at line 61 of file WMuNuSelector.cc.

bool WMuNuSelector::isCombinedIso_
private

Definition at line 50 of file WMuNuSelector.cc.

Referenced by filter().

double WMuNuSelector::isoCut03_
private

Definition at line 51 of file WMuNuSelector.cc.

Referenced by filter().

bool WMuNuSelector::isRelativeIso_
private

Definition at line 49 of file WMuNuSelector.cc.

Referenced by filter().

edm::InputTag WMuNuSelector::jetTag_
private

Definition at line 40 of file WMuNuSelector.cc.

Referenced by filter().

double WMuNuSelector::metMax_
private

Definition at line 55 of file WMuNuSelector.cc.

Referenced by filter().

double WMuNuSelector::metMin_
private

Definition at line 54 of file WMuNuSelector.cc.

double WMuNuSelector::mtMax_
private

Definition at line 53 of file WMuNuSelector.cc.

Referenced by filter().

double WMuNuSelector::mtMin_
private

Definition at line 52 of file WMuNuSelector.cc.

edm::InputTag WMuNuSelector::muonTag_
private

Definition at line 39 of file WMuNuSelector.cc.

Referenced by filter().

const std::string WMuNuSelector::muonTrig_
private

Definition at line 42 of file WMuNuSelector.cc.

Referenced by filter().

double WMuNuSelector::nacop
private

Definition at line 69 of file WMuNuSelector.cc.

Referenced by beginJob(), endJob(), and filter().

double WMuNuSelector::nall
private

Definition at line 65 of file WMuNuSelector.cc.

Referenced by beginJob(), endJob(), and filter().

double WMuNuSelector::ncharge
private

Definition at line 68 of file WMuNuSelector.cc.

Referenced by beginJob(), endJob(), and filter().

double WMuNuSelector::nid
private

Definition at line 69 of file WMuNuSelector.cc.

Referenced by beginJob(), endJob(), and filter().

double WMuNuSelector::niso
private

Definition at line 69 of file WMuNuSelector.cc.

Referenced by beginJob(), endJob(), and filter().

int WMuNuSelector::nJetMax_
private

Definition at line 46 of file WMuNuSelector.cc.

Referenced by filter().

double WMuNuSelector::nkin
private

Definition at line 69 of file WMuNuSelector.cc.

Referenced by beginJob(), endJob(), and filter().

double WMuNuSelector::nmass
private

Definition at line 69 of file WMuNuSelector.cc.

double WMuNuSelector::normalizedChi2Cut_
private

Definition at line 59 of file WMuNuSelector.cc.

Referenced by filter().

double WMuNuSelector::npresel
private

Definition at line 66 of file WMuNuSelector.cc.

Referenced by beginJob(), endJob(), and filter().

double WMuNuSelector::nsel
private

Definition at line 67 of file WMuNuSelector.cc.

Referenced by beginJob(), endJob(), and filter().

double WMuNuSelector::ntrig
private

Definition at line 66 of file WMuNuSelector.cc.

Referenced by beginJob(), endJob(), and filter().

bool WMuNuSelector::plotHistograms_
private

Definition at line 37 of file WMuNuSelector.cc.

Referenced by beginJob(), and filter().

double WMuNuSelector::ptCut_
private

Definition at line 47 of file WMuNuSelector.cc.

Referenced by filter().

double WMuNuSelector::ptThrForZ1_
private

Definition at line 43 of file WMuNuSelector.cc.

Referenced by filter().

double WMuNuSelector::ptThrForZ2_
private

Definition at line 44 of file WMuNuSelector.cc.

Referenced by filter().

int WMuNuSelector::selectByCharge_
private

Definition at line 63 of file WMuNuSelector.cc.

Referenced by endJob(), and filter().

int WMuNuSelector::trackerHitsCut_
private

Definition at line 60 of file WMuNuSelector.cc.

Referenced by filter().

edm::InputTag WMuNuSelector::trigTag_
private

Definition at line 38 of file WMuNuSelector.cc.

Referenced by filter().

edm::InputTag WMuNuSelector::WMuNuCollectionTag_
private

Definition at line 41 of file WMuNuSelector.cc.

Referenced by filter().