CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
AlphaTVarAnalyzer.cc
Go to the documentation of this file.
2 
5 
8 
11 
12 #include <cmath>
13 
14 // A simple constructor which takes as input only the name of the PF jet collection
17  m_jetCollectionTag(conf.getUntrackedParameter<edm::InputTag>("jetCollectionName",edm::InputTag("hltCaloJetIDPassed"))),
18  m_alphaTVarCollectionTag(conf.getUntrackedParameter<edm::InputTag>("alphaTVarCollectionName")) {
19  //set Token(-s)
20  m_alphaTVarCollectionTagToken_ = consumes<std::vector<double> >(conf.getUntrackedParameter<edm::InputTag>("alphaTVarCollectionName"));
21 }
22 
24 
25 // Function to book the Monitoring Elements.
28  //the full inclusive histograms
30  iBooker,
31  "HTvsAlphaT",
32  "H_{T} vs #alpha_{T} (All Events)",
33  400,0.,4000.,
34  50,0.,1.,
35  "H_{T} [GeV]",
36  "#alpha_{T}");
38  iBooker,
39  "HTvsAlphaTg0p55",
40  "H_{T} (#alpha_{T} > 0.55)",
41  400,0.,4000.,
42  "H_{T} [GeV]");
44  iBooker,
45  "HTvsAlphaTg0p60",
46  "H_{T} (#alpha_{T} > 0.60)",
47  400,0.,4000.,
48  "H_{T} [GeV]");
49 }
50 
51 // Usual analyze method
53  edm::Handle<std::vector<double> > alphaTvar_handle;
54  iEvent.getByToken(m_alphaTVarCollectionTagToken_, alphaTvar_handle);
55 
56  if(alphaTvar_handle->size() > 1){
57  const double AlphaT = alphaTvar_handle->at(0);
58  const double HT = alphaTvar_handle->at(1);
59  m_HTAlphaT->Fill(HT,AlphaT);
60  if(AlphaT > 0.55) m_HTAlphaTg0p55->Fill(HT);
61  if(AlphaT > 0.60) m_HTAlphaTg0p60->Fill(HT);
62  }
63 }
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
T getUntrackedParameter(std::string const &, T const &) const
Definition: AlphaT.h:9
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:449
void prepareBooking(DQMStore::IBooker &)
MonitorElement * m_HTAlphaT
MonitorElement * m_HTAlphaTg0p55
virtual ~AlphaTVarAnalyzer()
void Fill(long long x)
MonitorElement * m_HTAlphaTg0p60
int iEvent
Definition: GenABIO.cc:230
virtual void analyze(const edm::Event &, const edm::EventSetup &)
MonitorElement * bookH1withSumw2(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, const std::string &titleX="", const std::string &titleY="Events", Option_t *option="E1 P")
edm::EDGetTokenT< std::vector< double > > m_alphaTVarCollectionTagToken_
tuple conf
Definition: dbtoconf.py:185
MonitorElement * bookH2withSumw2(DQMStore::IBooker &, const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const std::string &titleX="", const std::string &titleY="", Option_t *option="COLZ")
AlphaTVarAnalyzer(const edm::ParameterSet &)
Definition: HT.h:20
Definition: Run.h:41