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 Member Functions | Private Attributes
HLTMuonBPAG Class Reference

#include <HLTMuonBPAG.h>

Inheritance diagram for HLTMuonBPAG:
HLTMuonMatchAndPlot

Public Member Functions

void analyze (const edm::Event &iEvent)
 
void begin ()
 
void finish ()
 
 HLTMuonBPAG (const edm::ParameterSet &pset, std::string triggerName, std::vector< std::string > moduleNames, MuonSelectionStruct inputSelection, MuonSelectionStruct inputTagSelection, std::string customName, std::vector< std::string > validTriggers, const edm::Run &currentRun, const edm::EventSetup &currentEventSetup)
 Constructor. More...
 
bool selectAndMatchMuons (const edm::Event &iEvent, std::vector< MatchStruct > &myRecMatches, std::vector< std::vector< HltFakeStruct > > &myHltFakeCands)
 
- Public Member Functions inherited from HLTMuonMatchAndPlot
virtual MonitorElementbookIt (TString name, TString title, std::vector< double >)
 
virtual MonitorElementbookIt (TString name, TString title, int nbins, float *xBinLowEdges)
 
TString calcHistoSuffix (std::string moduleName)
 
virtual void endRun (const edm::Run &r, const edm::EventSetup &c)
 
virtual void fillPlots (std::vector< MatchStruct > &myRecMatches, std::vector< std::vector< HltFakeStruct > > &myHltFakeCands)
 
 HLTMuonMatchAndPlot (const edm::ParameterSet &pset, std::string triggerName, std::vector< std::string > moduleNames, MuonSelectionStruct inputSelection, std::string customName, std::vector< std::string > validTriggers, const edm::Run &currentRun, const edm::EventSetup &currentEventSetup)
 Constructor. More...
 
bool selectAndMatchMuons (const edm::Event &iEvent, std::vector< MatchStruct > &myRecMatches, std::vector< std::vector< HltFakeStruct > > &myHltFakeCands, MuonSelectionStruct muonSelection)
 
virtual ~HLTMuonMatchAndPlot ()
 

Private Member Functions

MonitorElementbook2DVarBins (TString name, TString title, int nBinsX, double *xBinLowEdges, int nBinsY, double yMin, double yMax)
 

Private Attributes

TString ALLKEY
 
std::map< TString,
MonitorElement * > 
diMuonMass
 
std::map< TString,
MonitorElement * > 
diMuonMassVsEta
 
std::map< TString,
MonitorElement * > 
diMuonMassVsPhi
 
std::map< TString,
MonitorElement * > 
diMuonMassVsPt
 
std::map< TString,
MonitorElement * > 
probeMuonPt
 
std::vector< std::vector
< HltFakeStruct > > 
tagHltFakeCands
 
std::vector< MatchStructtagRecMatches
 
MuonSelectionStruct tagSelection
 
std::vector< double > theMassParameters
 

Additional Inherited Members

- Public Attributes inherited from HLTMuonMatchAndPlot
std::vector< std::vector
< HltFakeStruct > > 
hltFakeCands
 
std::vector< MatchStructrecMatches
 
- Protected Member Functions inherited from HLTMuonMatchAndPlot
virtual bool applyTrackSelection (MuonSelectionStruct mySelection, reco::Muon candMuon)
 
virtual bool applyTriggerSelection (MuonSelectionStruct mySelection, const edm::Event &event)
 
int findGenMatch (double eta, double phi, double maxDeltaR, std::vector< MatchStruct > matches)
 
const reco::CandidatefindMother (const reco::Candidate *)
 
int findRecMatch (double eta, double phi, double maxdeltaR, std::vector< MatchStruct > matches)
 
void getAodTriggerObjectsForModule (edm::InputTag collectionTag, edm::Handle< trigger::TriggerEvent > aodTriggerEvent, trigger::TriggerObjectCollection trigObjs, std::vector< trigger::TriggerObject > &foundObjects, MuonSelectionStruct muonSelection)
 
reco::TrackRef getCandTrackRef (MuonSelectionStruct mySelection, reco::Muon candMuon)
 
int getCharge (int pdgId)
 
void moveOverflow (MonitorElement *myElement)
 
- Protected Attributes inherited from HLTMuonMatchAndPlot
std::vector< MonitorElement * > allHltCandEta
 
std::vector< MonitorElement * > allHltCandPhi
 
std::vector< MonitorElement * > allHltCandPt
 
reco::BeamSpot beamSpot
 
edm::InputTag BeamSpotInputTag
 
std::vector< MonitorElement * > booked1DMonitorElements
 
bool createStandAloneHistos
 
DQMStoredbe_
 
int eventNumber
 
std::vector< MonitorElement * > fakeHltCandEta
 
std::vector< MonitorElement * > fakeHltCandPhi
 
std::vector< MonitorElement * > fakeHltCandPt
 
bool foundBeamSpot
 
std::vector< MonitorElement * > hBeamSpotZ0Rec
 
std::vector< MonitorElement * > hChargeFlipMatched
 
std::vector< MonitorElement * > hDeltaRMatched
 
std::vector< MonitorElement * > hIsolationRec
 
std::string histoFileName
 
int HLT_PLOT_OFFSET
 
edm::InputTag HltAodInputTag
 
edm::InputTag HltRawInputTag
 
std::vector< MonitorElement * > hMatchedDeltaPhi
 
MonitorElementhNumObjects
 
MonitorElementhNumOrphansRec
 
std::vector< MonitorElement * > hPassCharge
 
std::vector< MonitorElement * > hPassD0BeamRec
 
std::vector< MonitorElement * > hPassD0Rec
 
std::vector< MonitorElement * > hPassEtaRec
 
std::vector< MonitorElement * > hPassExaclyOneMuonMaxPtRec
 
std::vector< MonitorElement * > hPassMatchPtRec
 
std::vector< MonitorElement * > hPassMaxPtRec
 
std::vector< MonitorElement * > hPassPhiRec
 
std::vector< MonitorElement * > hPassPtRec
 
std::vector< MonitorElement * > hPassPtRecExactlyOne
 
std::vector< MonitorElement * > hPassZ0BeamRec
 
std::vector< MonitorElement * > hPassZ0Rec
 
std::vector< MonitorElement * > hPhiVsEtaRec
 
std::vector< MonitorElement * > hResoEtaAodRec
 
std::vector< MonitorElement * > hResoPhiAodRec
 
std::vector< MonitorElement * > hResoPtAodRec
 
bool includeOverflow
 
bool isIsolatedPath
 
bool isL1Path
 
bool isL2Path
 
bool isL3Path
 
bool makeNtuple
 
std::string matchType
 
MonitorElementmeNumberOfEvents
 
MuonSelectionStruct mySelection
 
int numBinsInPtHisto
 
unsigned int numHltLabels
 
unsigned int numL1Cands
 
float ptBins [100]
 
std::vector< MonitorElement * > rawMatchHltCandEta
 
std::vector< MonitorElement * > rawMatchHltCandPhi
 
std::vector< MonitorElement * > rawMatchHltCandPt
 
edm::InputTag RecoMuonInputTag
 
bool requireL1SeedForHLTPaths
 
std::vector< std::string > selectedValidTriggers
 
std::string theAodL1Label
 
std::string theAodL2Label
 
std::vector< double > theChargeFlipParameters
 
std::vector< double > theChargeParameters
 
std::vector< double > theD0Parameters
 
std::vector< double > theDRParameters
 
std::vector< double > theEtaParameters
 
TFile * theFile
 
std::vector< std::string > theHltCollectionLabels
 
std::string theHltProcessName
 
std::vector< double > theIsolationParameters
 
std::string theL1CollectionLabel
 
double theL1DrCut
 
std::string theL1SeedModuleForHLTPath
 
double theL2DrCut
 
double theL3DrCut
 
double theMaxEtaCut
 
std::vector< double > theMaxPtParameters
 
double theMinPtCut
 
int theMotherParticleId
 
std::vector< double > theNSigmas
 
TNtuple * theNtuple
 
std::string theNtupleFileName
 
float theNtuplePars [100]
 
std::string theNtuplePath
 
unsigned int theNumberOfObjects
 
std::vector< double > thePhiEtaParameters2d
 
std::vector< double > thePhiParameters
 
std::vector< double > thePhiParameters0Pi
 
std::vector< double > thePtParameters
 
std::vector< double > theResParameters
 
std::string theTriggerName
 
std::vector< double > theZ0Parameters
 
edm::InputTag TriggerResultLabel
 
bool useAod
 
bool useFullDebugInformation
 
bool useMuonFromReco
 
bool useOldLabels
 
- Static Protected Attributes inherited from HLTMuonMatchAndPlot
static const int NEG_CHARGE = -1
 
static const int POS_CHARGE = 1
 

Detailed Description

Definition at line 57 of file HLTMuonBPAG.h.

Constructor & Destructor Documentation

HLTMuonBPAG::HLTMuonBPAG ( const edm::ParameterSet pset,
std::string  triggerName,
std::vector< std::string >  moduleNames,
MuonSelectionStruct  inputSelection,
MuonSelectionStruct  inputTagSelection,
std::string  customName,
std::vector< std::string >  validTriggers,
const edm::Run currentRun,
const edm::EventSetup currentEventSetup 
)

Constructor.

Definition at line 60 of file HLTMuonBPAG.cc.

References edm::ParameterSet::getUntrackedParameter(), and LogTrace.

66  : HLTMuonMatchAndPlot(pset, triggerName, moduleNames, probeSelection, customName, validTriggers, currentRun, currentEventSetup),
67  tagSelection(inputTagSelection)
68 
69 {
70 
71 
72  LogTrace ("HLTMuonVal") << "\n\n Inside HLTMuonBPAG Constructor";
73  LogTrace ("HLTMuonVal") << "The trigger name is " << triggerName
74  << "and we've done all the other intitializations";
75 
76  LogTrace ("HLTMuonVal") << "exiting constructor\n\n";
77 
78  ALLKEY = "ALL";
79 
80  // pick up the mass parameters
81  theMassParameters = pset.getUntrackedParameter< vector<double> >("MassParameters");
82 
83 }
std::vector< double > theMassParameters
Definition: HLTMuonBPAG.h:100
T getUntrackedParameter(std::string const &, T const &) const
#define LogTrace(id)
HLTMuonMatchAndPlot(const edm::ParameterSet &pset, std::string triggerName, std::vector< std::string > moduleNames, MuonSelectionStruct inputSelection, std::string customName, std::vector< std::string > validTriggers, const edm::Run &currentRun, const edm::EventSetup &currentEventSetup)
Constructor.
TString ALLKEY
Definition: HLTMuonBPAG.h:90
MuonSelectionStruct tagSelection
Definition: HLTMuonBPAG.h:104

Member Function Documentation

void HLTMuonBPAG::analyze ( const edm::Event iEvent)
virtual

Reimplemented from HLTMuonMatchAndPlot.

Definition at line 99 of file HLTMuonBPAG.cc.

References j, LogTrace, and ExpressReco_HICollisions_FallBack::pt.

100 {
101 
102  LogTrace ("HLTMuonVal") << "Inside of BPAG analyze method!"
103  << "calling my match and plot module's analyze..."
104  << endl;
105 
106  // Make sure you are valid before proceeding
107 
108 
109  // Do some top specific selection, then call the muon matching
110  // if the event looks top-like
111 
112 
114  //
115  // Call the other analyze method
116  //
118 
119 
120 
121  //LogTrace("HLTMuonVal") << "Calling muon selection for muon ana" << endl;
122 
123  // Call analyze to get everything
124 
125  //HLTMuonMatchAndPlot::analyze(iEvent);
126 
127  // separate calls
128 
129  LogTrace ("HLTMuonVal") << "BPAG: calling subclass matching routine" << endl;
130 
131  // select and match muons
133 
134 
135  LogTrace ("HLTMuonVal") << "BPAG: returned from muon ana, now in BAPG module"
136  << endl
137  << " muon ana stored size probe muons = "
138  << recMatches.size()
139  << " tag muons size = "
140  << tagRecMatches.size()
141  << endl;
142 
143  // vector<HLTMuonMatchAndPlot::MatchStruct>::const_iterator iRecMuon;
144 
145  //int numCands = 0;
146 
147  for (unsigned iTag = 0;
148  iTag < tagRecMatches.size();
149  iTag ++) {
150 
151  // We should check to see that
152  // each tag passed a tag trigger
153 
154  bool passedHLT = false;
155 
156  LogTrace ("HLTMuonVal") << "CRASH: tagRecMatches[iTag].hltCands.size() = "
157  << theHltCollectionLabels.size() << endl
158  << "CRASH: theHltCollectionLabels.size() = "
159  << theHltCollectionLabels.size()
160  << endl;
161 
162 // cout << "==========================================================================" << endl
163 // << " Run = " << iEvent.id().run() << " Event = " << iEvent.id().event() << endl
164 // << " tagRecMatches[iTag].hltCands.size() = " << tagRecMatches[iTag].hltCands.size() << endl
165 // << " theHltCollectionLabels.size() = " << theHltCollectionLabels.size() << endl
166 // << "" << endl;
167 
168 
169 
170  if ( theHltCollectionLabels.size() <= tagRecMatches[iTag].hltCands.size()) {
171  for ( size_t jCollLabel = 0; jCollLabel < theHltCollectionLabels.size(); jCollLabel++ ) {
172  if ( tagRecMatches[iTag].hltCands[jCollLabel].pt() > 0 ) {
173  passedHLT = true;
174  }
175  }
176  }
177 
178  LogTrace ("HLTMuonVal") << "===BPAG=== Did Tag # " << iTag << " pass the trigger? "
179  << ((passedHLT) ? "YES" : "NO") << endl
180  << " if no, then we will skip it as a tag..." << endl;
181 
182  if (!passedHLT) continue;
183 
184  for ( unsigned int iProbe = 0;
185  iProbe < recMatches.size();
186  iProbe++ ) {
187 
188 
189  LogTrace ("HLTMuonVal") << "Probe = " << iProbe << endl
190  << " Pt = " << endl
191  << recMatches[iProbe].recCand->pt()
192  << " eta = " << endl
193  << recMatches[iProbe].recCand->eta()
194  << " phi = " << endl
195  << recMatches[iProbe].recCand->phi()
196  << endl << endl
197  << "Tag = " << iTag
198  << " Pt = " << endl
199  << tagRecMatches[iTag].recCand->pt()
200  << " eta = " << endl
201  << tagRecMatches[iTag].recCand->eta()
202  << " phi = " << endl
203  << tagRecMatches[iTag].recCand->phi()
204  << endl;
205 
206  if ( recMatches[iProbe].recCand->charge() * tagRecMatches[iTag].recCand->charge() > 0 ){
207  LogTrace ("HLTMuonVal") << "Tag and Probe don't have opp charges, skipping to next probe"
208  << endl;
209 
210  continue;
211  }
212 
213  LorentzVector tagPlusProbe = (recMatches[iProbe].recCand->p4() + tagRecMatches[iTag].recCand->p4());
214 
215  double invariantMass = tagPlusProbe.mass();
216  double ptProbe = recMatches[iProbe].recCand->pt();
217  double etaProbe = recMatches[iProbe].recCand->eta();
218  double phiProbe = recMatches[iProbe].recCand->phi();
219 
221  //
222  // Fill Plots for All
223  //
225 
226  diMuonMassVsPt[ALLKEY]->Fill(ptProbe, invariantMass);
227  diMuonMassVsEta[ALLKEY]->Fill(etaProbe, invariantMass);
228  diMuonMassVsPhi[ALLKEY]->Fill(phiProbe, invariantMass);
229 
230  diMuonMass[ALLKEY]->Fill(invariantMass);
231 
233  //
234  // Fill Plots for L1
235  //
237 
238 
239  if ( (recMatches[iProbe].l1Cand.pt() > 0) && ((useFullDebugInformation) || (isL1Path)) ) {
240  TString myLabel = calcHistoSuffix(theL1CollectionLabel);
241 
242  diMuonMassVsPt[myLabel]->Fill(ptProbe, invariantMass);
243  diMuonMassVsEta[myLabel]->Fill(etaProbe, invariantMass);
244  diMuonMassVsPhi[myLabel]->Fill(phiProbe, invariantMass);
245 
246  diMuonMass[myLabel]->Fill(invariantMass);
247  }
248 
250  //
251  // Fill Plots for HLT
252  //
254 
255  LogTrace ("HLTMuonVal") << "The size of the HLT collection labels = " << theHltCollectionLabels.size()
256  << ", and the size of recMatches[" << iProbe << "].hltCands = "
257  << recMatches[iProbe].hltCands.size()
258  << endl;
259 
260  for ( size_t j = 0; j < theHltCollectionLabels.size(); j++ ) {
261  if ( recMatches[iProbe].hltCands[j].pt() > 0 ) {
262  TString myLabel = calcHistoSuffix (theHltCollectionLabels[j]);
263 
264  LogTrace ("HLTMuonVal") << "filling plot ... Looking up the plot label " << myLabel
265  << endl;
266 
267  // Do the existence check for each plot
268  // print out the results only for the first one
269 
270  if (diMuonMassVsPt.find(myLabel) != diMuonMassVsPt.end()){
271  LogTrace ("HLTMuonVal") << "Found a plot corresponding to label = "
272  << myLabel << endl;
273 
274  diMuonMassVsPt[myLabel]->Fill(ptProbe, invariantMass);
275 
276 
277  } else {
278  LogTrace ("HLTMuonVal") << "Didn't find a plot corresponding to your label" << endl;
279  }
280 
281  if (diMuonMass.find(myLabel) != diMuonMass.end())
282  diMuonMass[myLabel]->Fill(invariantMass);
283 
284  if (diMuonMassVsEta.find(myLabel) != diMuonMassVsEta.end())
285  diMuonMassVsEta[myLabel]->Fill(etaProbe, invariantMass);
286 
287  if (diMuonMassVsPhi.find(myLabel) != diMuonMassVsPhi.end())
288  diMuonMassVsPhi[myLabel]->Fill(phiProbe, invariantMass);
289 
290  }
291  }
292 
293 
294 
295  //numCands++;
296  } // end loop over probes
297  } // end loop over tags
298 
299  LogTrace ("HLTMuonVal") << "-----End of BPAG plotter analyze method-----" << endl;
300 } // Done filling histograms
std::map< TString, MonitorElement * > diMuonMassVsPt
Definition: HLTMuonBPAG.h:94
TString calcHistoSuffix(std::string moduleName)
math::XYZTLorentzVector LorentzVector
Definition: HLTMuonBPAG.h:55
std::map< TString, MonitorElement * > diMuonMassVsPhi
Definition: HLTMuonBPAG.h:96
std::string theL1CollectionLabel
int j
Definition: DBlmapReader.cc:9
std::vector< MatchStruct > recMatches
#define LogTrace(id)
std::vector< std::vector< HltFakeStruct > > hltFakeCands
std::vector< std::string > theHltCollectionLabels
std::vector< MatchStruct > tagRecMatches
Definition: HLTMuonBPAG.h:105
TString ALLKEY
Definition: HLTMuonBPAG.h:90
bool selectAndMatchMuons(const edm::Event &iEvent, std::vector< MatchStruct > &myRecMatches, std::vector< std::vector< HltFakeStruct > > &myHltFakeCands)
Definition: HLTMuonBPAG.cc:496
std::map< TString, MonitorElement * > diMuonMassVsEta
Definition: HLTMuonBPAG.h:95
std::map< TString, MonitorElement * > diMuonMass
Definition: HLTMuonBPAG.h:97
void HLTMuonBPAG::begin ( void  )
virtual

Reimplemented from HLTMuonMatchAndPlot.

Definition at line 305 of file HLTMuonBPAG.cc.

References DQMStore::cd(), dbe_, h, i, testEve_cfg::level, LogTrace, jptDQMConfig_cff::massBins, and DQMStore::setCurrentFolder().

306 {
307 
308  TString myLabel, newFolder;
309  vector<TH1F*> h;
310 
311  LogTrace ("HLTMuonVal") << "Inside begin for BPAG analyzer" << endl;
312 
313 
314  //LogTrace ("HLTMuonVal") << "Calling begin for muon analyzer" << endl;
315  //HLTMuonMatchAndPlot::begin();
316 
317  //LogTrace ("HLTMuonVal") << "Continuing with top analyzer begin" << endl;
318 
319  if ( dbe_ ) {
320  dbe_->cd();
321  dbe_->setCurrentFolder("HLT/Muon");
322 
323 
324  // JMS I think this is trimming all L1 names to
325  // to be L1Filtered
326  myLabel = theL1CollectionLabel;
327  myLabel = myLabel(myLabel.Index("L1"),myLabel.Length());
328  myLabel = myLabel(0,myLabel.Index("Filtered")+8);
329 
330 
331  // JMS Old way of doing things
332  //newFolder = "HLT/Muon/Distributions/" + theTriggerName;
333  newFolder = "HLT/Muon/Distributions/" + theTriggerName + "/" + mySelection.customLabel;
334 
335 
336 
337  dbe_->setCurrentFolder( newFolder.Data() );
338 
339  vector<string> binLabels;
340  binLabels.push_back( theL1CollectionLabel.c_str() );
341  for ( size_t i = 0; i < theHltCollectionLabels.size(); i++ )
342  binLabels.push_back( theHltCollectionLabels[i].c_str() );
343 
344 
345  //------- Define labels for plots -------
346 
347  if (useOldLabels) {
348  myLabel = theL1CollectionLabel;
349  myLabel = myLabel(myLabel.Index("L1"),myLabel.Length());
350  myLabel = myLabel(0,myLabel.Index("Filtered")+8);
351  } else {
352  myLabel = "L1Filtered";
353  }
354 
355  //------ Definte the plots themselves------------------------
356 
357  //----- define temporary vectors that
358  //----- give you dimensions
359 
360 
361  // vector<double> massVsPtBins; // not used
362  // massVsPtBins.push_back(5); // pt from 0 to 20 in 5 bins
363  // massVsPtBins.push_back(0.0);
364  // massVsPtBins.push_back(20.0);
365  // massVsPtBins.push_back(50); // mass: 10 bins from 0 to 6
366  // massVsPtBins.push_back(0.0);
367  // massVsPtBins.push_back(6.0);
368 
369  int nPtBins = ((int) thePtParameters.size()) - 1;
370  int nMassBins = (theMassParameters.size() > 0) ? ((int)theMassParameters[0]) : 50;
371  double minMass = (theMassParameters.size() > 1) ? theMassParameters[1] : 0;
372  double maxMass = (theMassParameters.size() > 2) ? theMassParameters[2] : 6;;
373 
374  double ptBinLowEdges[100]; // set to a large maximum
375 
376  unsigned maxPtBin = (thePtParameters.size() > 100) ? thePtParameters.size() : 100;
377 
378  for (unsigned i = 0; i < maxPtBin; i++)
379  ptBinLowEdges[i] = thePtParameters[i];
380 
381  vector<double> evenPtBins;
382  evenPtBins.push_back(10);
383  evenPtBins.push_back(0);
384  evenPtBins.push_back(20);
385 
386 
387 
388 
389 
390 
391  vector<double> massVsEtaBins;
392  massVsEtaBins.push_back(theEtaParameters[0]); // |eta| < 2.1 in 5 bins
393  massVsEtaBins.push_back(theEtaParameters[1]);
394  massVsEtaBins.push_back(theEtaParameters[2]);
395  massVsEtaBins.push_back(nMassBins);
396  massVsEtaBins.push_back(minMass); // mass: 10 bins from 0 to 6
397  massVsEtaBins.push_back(maxMass);
398 
399  vector<double> massVsPhiBins;
400  massVsPhiBins.push_back(thePhiParameters[0]); // -pi < phi < pi in 5 bins
401  massVsPhiBins.push_back(thePhiParameters[1]);
402  massVsPhiBins.push_back(thePhiParameters[2]);
403  massVsPhiBins.push_back(nMassBins);
404  massVsPhiBins.push_back(minMass); // mass: 10 bins from 0 to 6
405  massVsPhiBins.push_back(maxMass);
406 
407 
408 
409  vector<double> massBins;
410  massBins.push_back(nMassBins);
411  massBins.push_back(minMass);
412  massBins.push_back(maxMass);
413 
415  //
416  // ALL + L1 plots
417  //
419 
420 
421  //diMuonMassVsPt[ALLKEY] = bookIt("diMuonMassVsPt_All", "Mass Vs Probe Pt", massVsPtBins);
422  diMuonMassVsPt[ALLKEY] = book2DVarBins("diMuonMassVsPt_All", "Mass Vs Probe Pt; Pt; Mass", nPtBins, ptBinLowEdges, nMassBins, minMass, maxMass);
423  diMuonMassVsEta[ALLKEY] = bookIt("diMuonMassVsEta_All", "Mass Vs Probe Eta; #eta ; Mass", massVsEtaBins);
424  diMuonMassVsPhi[ALLKEY] = bookIt("diMuonMassVsPhi_All", "Mass Vs Probe Phi", massVsPhiBins);
425 
426  diMuonMass[ALLKEY] = bookIt("diMuonMass_All", "Mass of Dimuons; Mass", massBins);
427 
428  probeMuonPt[ALLKEY] = bookIt("probeMuonPt_All", "Probe Muon PT; Probe Pt", evenPtBins);
429 
430 
432  diMuonMassVsPt[myLabel] = book2DVarBins("diMuonMassVsPt_" + myLabel, "Mass Vs Probe Pt; Pt; Mass", nPtBins, ptBinLowEdges, nMassBins, minMass, maxMass);
433  diMuonMassVsEta[myLabel] = bookIt("diMuonMassVsEta_" + myLabel, "Mass Vs Probe Eta; #eta; Mass " + myLabel, massVsEtaBins);
434  diMuonMassVsPhi[myLabel] = bookIt("diMuonMassVsPhi_" + myLabel, "Mass Vs Probe Phi; #phi; Mass " + myLabel, massVsPhiBins);
435 
436  diMuonMass[myLabel] = bookIt("diMuonMass_" + myLabel, "Mass of Dimuons; mass " + myLabel, massBins);
437  probeMuonPt[myLabel] = bookIt("probeMuonPt_" + myLabel, "Probe Muon PT; Pt" + myLabel, evenPtBins);
438 
439  }
440 
441 
443  //
444  // HLT plots
445  //
447 
448 
449  // we won't enter this loop if we don't have an hlt label
450  // we won't have an hlt label is this is a l1 path
451  for ( unsigned int i = 0; i < theHltCollectionLabels.size(); i++ ) {
452 
453  if (useOldLabels) {
454  myLabel = theHltCollectionLabels[i];
455  TString level = ( myLabel.Contains("L2") ) ? "L2" : "L3";
456  myLabel = myLabel(myLabel.Index(level),myLabel.Length());
457  myLabel = myLabel(0,myLabel.Index("Filtered")+8);
458  } else {
459  TString tempString = theHltCollectionLabels[i];
460  TString level = ( tempString.Contains("L2") ) ? "L2" : "L3";
461  myLabel = level + "Filtered";
462  } // end if useOldLabels
463 
464 
465  // Book for L2, L3
466  diMuonMassVsPt[myLabel] = book2DVarBins("diMuonMassVsPt_" + myLabel, "Mass Vs Probe Pt; Pt; Mass" + myLabel, nPtBins, ptBinLowEdges, nMassBins, minMass, maxMass);
467  diMuonMassVsEta[myLabel] = bookIt("diMuonMassVsEta_" + myLabel, "Mass Vs Probe Eta; #eta; Mass " + myLabel, massVsEtaBins);
468  diMuonMassVsPhi[myLabel] = bookIt("diMuonMassVsPhi_" + myLabel, "Mass Vs Probe Phi; #phi; Mass " + myLabel, massVsPhiBins);
469 
470  diMuonMass[myLabel] = bookIt("diMuonMass_" + myLabel, "Mass of Dimuons; Mass " + myLabel, massBins);
471  probeMuonPt[myLabel] = bookIt("probeMuonPt_" + myLabel, "Probe Muon PT; Pt "+ myLabel, evenPtBins);
472 
473  }// end for each collection label
474 
475  map<TString, MonitorElement*>::const_iterator iPlot;
476 
477  LogTrace ("HLTMuonVal") << "BPAG::begin dumping some plot names " << endl;
478  for (iPlot = diMuonMassVsPt.begin();
479  iPlot != diMuonMassVsPt.end();
480  iPlot++){
481 
482  LogTrace("HLTMuonVal") << "BPAG: PLOT Key = " << iPlot->first << endl;
483  }
484 
485 
486  }// end if dbe_ exists
487 
488 }// end begin method
std::vector< double > theMassParameters
Definition: HLTMuonBPAG.h:100
virtual MonitorElement * bookIt(TString name, TString title, std::vector< double >)
int i
Definition: DBlmapReader.cc:9
std::map< TString, MonitorElement * > diMuonMassVsPt
Definition: HLTMuonBPAG.h:94
MonitorElement * book2DVarBins(TString name, TString title, int nBinsX, double *xBinLowEdges, int nBinsY, double yMin, double yMax)
Definition: HLTMuonBPAG.cc:586
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:214
std::map< TString, MonitorElement * > probeMuonPt
Definition: HLTMuonBPAG.h:98
std::vector< double > theEtaParameters
std::map< TString, MonitorElement * > diMuonMassVsPhi
Definition: HLTMuonBPAG.h:96
std::string theL1CollectionLabel
std::vector< double > thePtParameters
std::vector< double > thePhiParameters
#define LogTrace(id)
std::vector< std::string > theHltCollectionLabels
MuonSelectionStruct mySelection
TString ALLKEY
Definition: HLTMuonBPAG.h:90
tuple level
Definition: testEve_cfg.py:34
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
std::map< TString, MonitorElement * > diMuonMassVsEta
Definition: HLTMuonBPAG.h:95
std::map< TString, MonitorElement * > diMuonMass
Definition: HLTMuonBPAG.h:97
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
MonitorElement * HLTMuonBPAG::book2DVarBins ( TString  name,
TString  title,
int  nBinsX,
double *  xBinLowEdges,
int  nBinsY,
double  yMin,
double  yMax 
)
private

Definition at line 586 of file HLTMuonBPAG.cc.

References DQMStore::book2D(), and dbe_.

586  {
587 
588  TH2F *tempHist = new TH2F(name, title, nBinsX, xBinLowEdges, nBinsY, yMin, yMax);
589  tempHist->Sumw2();
590  MonitorElement * returnedME = dbe_->book2D(name.Data(), tempHist);
591  delete tempHist;
592  return returnedME;
593 
594 }
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:647
void HLTMuonBPAG::finish ( )
virtual

Reimplemented from HLTMuonMatchAndPlot.

Definition at line 87 of file HLTMuonBPAG.cc.

References HLTMuonMatchAndPlot::finish().

88 {
89 
90  // you could do something else in here
91  // but for now, just do what the base class
92  // would have done
93 
95 }
bool HLTMuonBPAG::selectAndMatchMuons ( const edm::Event iEvent,
std::vector< MatchStruct > &  myRecMatches,
std::vector< std::vector< HltFakeStruct > > &  myHltFakeCands 
)
virtual

Reimplemented from HLTMuonMatchAndPlot.

Definition at line 496 of file HLTMuonBPAG.cc.

References LogTrace, and HLTMuonMatchAndPlot::selectAndMatchMuons().

499  {
500 
501  // Initialize this match
502  argRecMatches.clear();
503  tagRecMatches.clear();
504 
505  // call select with a reco muon PROBE selection
506  HLTMuonMatchAndPlot::selectAndMatchMuons(iEvent, argRecMatches, argHltFakeCands, mySelection);
507 
508 
509 
510  // call select with a reco muon tag selection argument
511  // First, intialize a probe selection
512  // Some day this should come from the driver
513 
514  //StringCutObjectSelector<Muon> tempRecoSelector("pt > 1 && abs(eta) < 1.4");
515  //StringCutObjectSelector<TriggerObject> tempHltSelector("pt > 1 && abs(eta) < 1.4");
516  string customName = "bpagTag";
517  //double d0Cut = 2.0;
518  //double z0Cut = 50;
519  string trkCol = "innerTrack";
520  std::vector<std::string> reqTrigs;
521 
522  //MuonSelectionStruct tagSelection(tempRecoSelector, tempHltSelector,
523  // customName, d0Cut, z0Cut, trkCol, reqTrigs);
524 
525  //==========================
526  // tagRecMatches
527  // and tagHltFakeCands
528  // are private members
529  //==========================
530 
532 
533 
534  // now you have two vectors, one with probes and one with tags
535 
536 
537  LogTrace ("HLTMuonVal") << "Printing tags and probes!!!"
538  << "NTAGS = " << tagRecMatches.size() << endl
539  << "NPROBES = " << argRecMatches.size() << endl
540  << endl;
541 
542 
543 
544  for (unsigned iProbe = 0;
545  iProbe < argRecMatches.size();
546  iProbe++) {
547 
548  LogTrace ("HLTMuonVal") << "Probe # " << iProbe
549  << " PT = " << argRecMatches[iProbe].recCand->pt()
550  << " ETA = " << argRecMatches[iProbe].recCand->eta()
551  << " PHI = " << argRecMatches[iProbe].recCand->phi()
552  << endl;
553 
554 
555  }
556 
557  for (unsigned iTag = 0;
558  iTag < tagRecMatches.size();
559  iTag++) {
560 
561  LogTrace ("HLTMuonVal") << "Tag # " << iTag
562  << " PT = " << tagRecMatches[iTag].recCand->pt()
563  << " ETA = " << tagRecMatches[iTag].recCand->eta()
564  << " PHI = " << tagRecMatches[iTag].recCand->phi()
565  << endl;
566 
567 
568  }
569 
570  // you may have overlapping tags & probes
571  // but you've sucessfully searched for them, so return true
572 
573  return true;
574 
575 }
virtual bool selectAndMatchMuons(const edm::Event &iEvent, std::vector< MatchStruct > &myRecMatches, std::vector< std::vector< HltFakeStruct > > &myHltFakeCands)
std::vector< std::vector< HltFakeStruct > > tagHltFakeCands
Definition: HLTMuonBPAG.h:106
#define LogTrace(id)
MuonSelectionStruct mySelection
std::vector< MatchStruct > tagRecMatches
Definition: HLTMuonBPAG.h:105
MuonSelectionStruct tagSelection
Definition: HLTMuonBPAG.h:104

Member Data Documentation

TString HLTMuonBPAG::ALLKEY
private

Definition at line 90 of file HLTMuonBPAG.h.

std::map<TString, MonitorElement*> HLTMuonBPAG::diMuonMass
private

Definition at line 97 of file HLTMuonBPAG.h.

std::map<TString, MonitorElement*> HLTMuonBPAG::diMuonMassVsEta
private

Definition at line 95 of file HLTMuonBPAG.h.

std::map<TString, MonitorElement*> HLTMuonBPAG::diMuonMassVsPhi
private

Definition at line 96 of file HLTMuonBPAG.h.

std::map<TString, MonitorElement*> HLTMuonBPAG::diMuonMassVsPt
private

Definition at line 94 of file HLTMuonBPAG.h.

std::map<TString, MonitorElement*> HLTMuonBPAG::probeMuonPt
private

Definition at line 98 of file HLTMuonBPAG.h.

std::vector< std::vector<HltFakeStruct> > HLTMuonBPAG::tagHltFakeCands
private

Definition at line 106 of file HLTMuonBPAG.h.

std::vector<MatchStruct> HLTMuonBPAG::tagRecMatches
private

Definition at line 105 of file HLTMuonBPAG.h.

MuonSelectionStruct HLTMuonBPAG::tagSelection
private

Definition at line 104 of file HLTMuonBPAG.h.

std::vector<double> HLTMuonBPAG::theMassParameters
private

Definition at line 100 of file HLTMuonBPAG.h.