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  //set Token(-s)
22  m_alphaTVarCollectionTagToken_ = consumes<std::vector<double> >(conf.getUntrackedParameter<edm::InputTag>("alphaTVarCollectionName"));
23 }
24 
25 //------------------------------------------------------------------------------
26 // Nothing to destroy: the DQM service thinks about everything
28 
29 //------------------------------------------------------------------------------
30 // Usual analyze method
32 
33  edm::Handle<std::vector<double> > alphaTvar_handle;
34  iEvent.getByToken(m_alphaTVarCollectionTagToken_, alphaTvar_handle);
35 
36 
37  if(alphaTvar_handle->size() > 1){
38  const double AlphaT = alphaTvar_handle->at(0);
39  const double HT = alphaTvar_handle->at(1);
40  m_HTAlphaT->Fill(HT,AlphaT);
41  if(AlphaT > 0.55) m_HTAlphaTg0p55->Fill(HT);
42  if(AlphaT > 0.60) m_HTAlphaTg0p60->Fill(HT);
43 
44  }
45 
46 }
47 
49 }
50 
51 //------------------------------------------------------------------------------
52 // Function to book the Monitoring Elements.
54 
55  //the full inclusive histograms
56  m_HTAlphaT = bookH2withSumw2("HTvsAlphaT",
57  "H_{T} vs #alpha_{T} (All Events)",
58  400,0.,4000.,
59  50,0.,1.,
60  "H_{T} [GeV]",
61  "#alpha_{T}");
62  m_HTAlphaTg0p55 = bookH1withSumw2("HTvsAlphaTg0p55",
63  "H_{T} (#alpha_{T} > 0.55)",
64  400,0.,4000.,
65  "H_{T} [GeV]");
66 
67  m_HTAlphaTg0p60 = bookH1withSumw2("HTvsAlphaTg0p60",
68  "H_{T} (#alpha_{T} > 0.60)",
69  400,0.,4000.,
70  "H_{T} [GeV]");
71 }
72 
T getUntrackedParameter(std::string const &, T const &) const
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")
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
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 &)
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 &)
virtual void bookMEs()
edm::EDGetTokenT< std::vector< double > > m_alphaTVarCollectionTagToken_
tuple conf
Definition: dbtoconf.py:185
AlphaTVarAnalyzer(const edm::ParameterSet &)
Definition: HT.h:20
Definition: Run.h:41