CMS 3D CMS Logo

HLTMuonMatchAndPlot.h
Go to the documentation of this file.
1 #ifndef DQMOffline_Trigger_HLTMuonMatchAndPlot_H
2 #define DQMOffline_Trigger_HLTMuonMatchAndPlot_H
3 
4 
17 // Base Class Headers
18 
24 
27 
39 
41 
42 #include <vector>
43 #include "TFile.h"
44 #include "TNtuple.h"
45 #include "TString.h"
46 #include "TPRegexp.h"
47 
48 
51 
53 
54 const double NOMATCH = 999.;
55 const std::string EFFICIENCY_SUFFIXES[2] = {"denom", "numer"};
56 
57 
60 
62 {
63 
64  public:
65 
68 
69  // Analyzer Methods
70  void beginRun(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &);
74  const edm::TriggerNames&);
75  void endRun(const edm::Run &, const edm::EventSetup &);
76 
77  // Helper Methods
78  void fillEdges(size_t & nBins, float * & edges, const std::vector<double>& binning);
79  template <class T> void
80  fillMapFromPSet(std::map<std::string, T> &, const edm::ParameterSet&, const std::string&);
81  template <class T1, class T2> std::vector<size_t>
82  matchByDeltaR(const std::vector<T1> &, const std::vector<T2> &,
83  const double maxDeltaR = NOMATCH);
84 
85  private:
86 
87  // Internal Methods
89  void book2D(DQMStore::IBooker &, const std::string&, const std::string&, const std::string&, const std::string&);
91  const reco::MuonCollection &,
92  const reco::BeamSpot &,
93  bool,
95  double, double);
96 
99  const trigger::TriggerEvent &,
100  bool hasTriggerCuts,
101  const StringCutObjectSelector<trigger::TriggerObject>& triggerSelector);
102 
103  // Input from Configuration File
106  std::vector<std::string> requiredTriggers_;
107  std::map<std::string, std::vector<double> > binParams_;
108  std::map<std::string, double> plotCuts_;
111 
112  // Member Variables
114  unsigned int cutMinPt_;
118  std::map<std::string, MonitorElement *> hists_;
119 
120  // Selectors
123 
125  double targetZ0Cut_;
126  double targetD0Cut_;
130  double probeZ0Cut_;
131  double probeD0Cut_;
132 
135 
136 };
137 
138 #endif
reco::MuonCollection selectedMuons(const reco::MuonCollection &, const reco::BeamSpot &, bool, const StringCutObjectSelector< reco::Muon > &, double, double)
StringCutObjectSelector< reco::Muon > probeMuonSelector_
The single EDProduct to be saved for each event (AOD case)
Definition: TriggerEvent.h:25
const std::string EFFICIENCY_SUFFIXES[2]
edm::ParameterSet targetParams_
std::map< std::string, std::vector< double > > binParams_
std::map< std::string, MonitorElement * > hists_
std::vector< Muon > MuonCollection
collection of Muon objects
Definition: MuonFwd.h:9
HLTMuonMatchAndPlot(const edm::ParameterSet &, std::string, std::string, bool)
Constructor.
std::vector< std::string > requiredTriggers_
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
const double NOMATCH
void book2D(DQMStore::IBooker &, const std::string &, const std::string &, const std::string &, const std::string &)
std::vector< size_t > matchByDeltaR(const std::vector< T1 > &, const std::vector< T2 > &, const double maxDeltaR=NOMATCH)
void fillMapFromPSet(std::map< std::string, T > &, const edm::ParameterSet &, const std::string &)
trigger::TriggerObjectCollection selectedTriggerObjects(const trigger::TriggerObjectCollection &, const trigger::TriggerEvent &, bool hasTriggerCuts, const StringCutObjectSelector< trigger::TriggerObject > &triggerSelector)
math::XYZTLorentzVector LorentzVector
void book1D(DQMStore::IBooker &, std::string, const std::string &, std::string)
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:81
void analyze(edm::Handle< reco::MuonCollection > &, edm::Handle< reco::BeamSpot > &, edm::Handle< reco::VertexCollection > &, edm::Handle< trigger::TriggerEvent > &, edm::Handle< edm::TriggerResults > &, const edm::TriggerNames &)
StringCutObjectSelector< reco::Muon > targetMuonSelector_
edm::ParameterSet probeParams_
StringCutObjectSelector< trigger::TriggerObject > triggerSelector_
void endRun(const edm::Run &, const edm::EventSetup &)
std::map< std::string, double > plotCuts_
void fillEdges(size_t &nBins, float *&edges, const std::vector< double > &binning)
Definition: Run.h:42
void beginRun(DQMStore::IBooker &, const edm::Run &, const edm::EventSetup &)