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 //------------------------------------------------------------------------------
15 // A simple constructor which takes as inoput only the name of the PF jet collection
18  m_jetCollectionTag(conf.getUntrackedParameter<edm::InputTag>("jetCollectionName",edm::InputTag("hltCaloJetIDPassed"))),
19  m_alphaTVarCollectionTag(conf.getUntrackedParameter<edm::InputTag>("alphaTVarCollectionName")){
20 }
21 
22 //------------------------------------------------------------------------------
23 // Nothing to destroy: the DQM service thinks about everything
25 
26 //------------------------------------------------------------------------------
27 // Usual analyze method
29 
30  edm::Handle<std::vector<double> > alphaTvar_handle;
31  iEvent.getByLabel(m_alphaTVarCollectionTag,alphaTvar_handle);
32 
33  if(alphaTvar_handle->size() > 1){
34  const double AlphaT = alphaTvar_handle->at(0);
35  const double HT = alphaTvar_handle->at(1);
36  m_HTAlphaT->Fill(HT,AlphaT);
37  if(AlphaT > 0.55) m_HTAlphaTg0p55->Fill(HT);
38  if(AlphaT > 0.60) m_HTAlphaTg0p60->Fill(HT);
39 
40  }
41 
42 }
43 
45 }
46 
47 //------------------------------------------------------------------------------
48 // Function to book the Monitoring Elements.
50 
51  //the full inclusive histograms
52  m_HTAlphaT = bookH2withSumw2("HTvsAlphaT",
53  "H_{T} vs #alpha_{T} (All Events)",
54  400,0.,4000.,
55  50,0.,1.,
56  "H_{T} [GeV]",
57  "#alpha_{T}");
58  m_HTAlphaTg0p55 = bookH1withSumw2("HTvsAlphaTg0p55",
59  "H_{T} (#alpha_{T} > 0.55)",
60  400,0.,4000.,
61  "H_{T} [GeV]");
62 
63  m_HTAlphaTg0p60 = bookH1withSumw2("HTvsAlphaTg0p60",
64  "H_{T} (#alpha_{T} > 0.60)",
65  400,0.,4000.,
66  "H_{T} [GeV]");
67 }
68 
Definition: AlphaT.h:9
MonitorElement * bookH2withSumw2(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")
MonitorElement * bookH1withSumw2(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")
MonitorElement * m_HTAlphaT
virtual void endRun(edm::Run const &, edm::EventSetup const &)
edm::InputTag m_alphaTVarCollectionTag
MonitorElement * m_HTAlphaTg0p55
virtual ~AlphaTVarAnalyzer()
void Fill(long long x)
MonitorElement * m_HTAlphaTg0p60
int iEvent
Definition: GenABIO.cc:243
virtual void analyze(const edm::Event &, const edm::EventSetup &)
virtual void bookMEs()
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
tuple conf
Definition: dbtoconf.py:185
AlphaTVarAnalyzer(const edm::ParameterSet &)
Definition: HT.h:20
Definition: Run.h:33