CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
SUSYDQMAnalyzer Class Reference

#include <SUSYDQMAnalyzer.h>

Inheritance diagram for SUSYDQMAnalyzer:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Public Member Functions

 SUSYDQMAnalyzer (const edm::ParameterSet &)
 
 ~SUSYDQMAnalyzer () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Private Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 

Private Attributes

double _maxAbsEta
 
double _maxNJets
 
double _ptThreshold
 
MonitorElementhCaloAlpha_T
 
MonitorElementhCaloHT
 
MonitorElementhCaloMET
 
MonitorElementhCaloMHT
 
MonitorElementhPFAlpha_T
 
MonitorElementhPFHT
 
MonitorElementhPFMET
 
MonitorElementhPFMHT
 
edm::ParameterSet iConfig
 
std::string SUSYFolder
 
edm::EDGetTokenT
< reco::CaloJetCollection
theCaloJetCollectionToken
 
edm::EDGetTokenT
< reco::CaloMETCollection
theCaloMETCollectionToken
 
edm::EDGetTokenT< std::vector
< reco::PFJet > > 
thePFJetCollectionToken
 
edm::EDGetTokenT
< reco::PFMETCollection
thePFMETCollectionToken
 

Static Private Attributes

static const char * messageLoggerCatregory = "SUSYDQM"
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T...>
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T...>
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (edm::ParameterSet const &)
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 24 of file SUSYDQMAnalyzer.h.

Constructor & Destructor Documentation

SUSYDQMAnalyzer::SUSYDQMAnalyzer ( const edm::ParameterSet pSet)
explicit

Definition at line 71 of file SUSYDQMAnalyzer.cc.

References iConfig, and AlCaHLTBitMon_QueryRunRegistry::string.

71  {
72  iConfig = pSet;
73 
74  SUSYFolder = iConfig.getParameter<std::string>("folderName");
75  // Load parameters
77  consumes<reco::PFMETCollection>(iConfig.getParameter<edm::InputTag>("PFMETCollectionLabel"));
79  consumes<reco::CaloMETCollection>(iConfig.getParameter<edm::InputTag>("CaloMETCollectionLabel"));
80 
81  //remove TCMET and JPT related variables due to anticipated changes in RECO
82  //theTCMETCollectionToken = consumes<reco::METCollection> (iConfig.getParameter<edm::InputTag>("TCMETCollectionLabel"));
83 
85  consumes<reco::CaloJetCollection>(iConfig.getParameter<edm::InputTag>("CaloJetCollectionLabel"));
86  //theJPTJetCollectionToken = consumes<reco::JPTJetCollection> (iConfig.getParameter<edm::InputTag>("JPTJetCollectionLabel"));
88  consumes<std::vector<reco::PFJet> >(iConfig.getParameter<edm::InputTag>("PFJetCollectionLabel"));
89 
90  _ptThreshold = iConfig.getParameter<double>("ptThreshold");
91  _maxNJets = iConfig.getParameter<double>("maxNJets");
92  _maxAbsEta = iConfig.getParameter<double>("maxAbsEta");
93 }
std::string SUSYFolder
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollectionToken
edm::EDGetTokenT< reco::PFMETCollection > thePFMETCollectionToken
edm::EDGetTokenT< reco::CaloMETCollection > theCaloMETCollectionToken
edm::ParameterSet iConfig
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
edm::EDGetTokenT< std::vector< reco::PFJet > > thePFJetCollectionToken
SUSYDQMAnalyzer::~SUSYDQMAnalyzer ( )
override

Definition at line 272 of file SUSYDQMAnalyzer.cc.

272 {}

Member Function Documentation

void SUSYDQMAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 139 of file SUSYDQMAnalyzer.cc.

References funct::abs(), edm::Event::getByToken(), edm::HandleBase::isValid(), metsig::jet, edm::Handle< T >::product(), reco::LeafCandidate::pt(), HT< T >::ScalarSum, and HT< T >::v.

139  {
140  //###########################################################
141  // HTand MHT
142 
143  //===========================================================
144  // Calo HT, MHT and alpha_T
145 
147 
148  iEvent.getByToken(theCaloJetCollectionToken, CaloJetcoll);
149 
150  if (!CaloJetcoll.isValid())
151  return;
152 
153  std::vector<math::XYZTLorentzVector> Ps;
154  for (reco::CaloJetCollection::const_iterator jet = CaloJetcoll->begin(); jet != CaloJetcoll->end(); ++jet) {
155  if ((jet->pt() > _ptThreshold) && (abs(jet->eta()) < _maxAbsEta)) {
156  if (Ps.size() > _maxNJets) {
157  edm::LogInfo(messageLoggerCatregory) << "NMax Jets exceded..";
158  break;
159  }
160  Ps.push_back(jet->p4());
161  }
162  }
163 
164  hCaloAlpha_T->Fill(alpha_T()(Ps));
165 
167 
168  hCaloHT->Fill(CaloHT.ScalarSum);
169  hCaloMHT->Fill(CaloHT.v.Mod());
170 
171  //===========================================================
172  // PF HT, MHT and alpha_T
173 
175 
176  iEvent.getByToken(thePFJetCollectionToken, PFjetcoll);
177 
178  if (!PFjetcoll.isValid())
179  return;
180 
181  Ps.clear();
182  for (reco::PFJetCollection::const_iterator jet = PFjetcoll->begin(); jet != PFjetcoll->end(); ++jet) {
183  if ((jet->pt() > _ptThreshold) && (abs(jet->eta()) < _maxAbsEta)) {
184  if (Ps.size() > _maxNJets) {
185  edm::LogInfo(messageLoggerCatregory) << "NMax Jets exceded..";
186  break;
187  }
188  Ps.push_back(jet->p4());
189  }
190  }
191  hPFAlpha_T->Fill(alpha_T()(Ps));
192 
194 
195  hPFHT->Fill(PFHT.ScalarSum);
196  hPFMHT->Fill(PFHT.v.Mod());
197 
198  //===========================================================
199  // JPT HT, MHT and alpha_T
200 
201  //edm::Handle<reco::JPTJetCollection> JPTjetcoll;
202 
203  //iEvent.getByToken(theJPTJetCollectionToken, JPTjetcoll);
204 
205  //if(!JPTjetcoll.isValid()) return;
206 
207  //Ps.clear();
208  //for (reco::JPTJetCollection::const_iterator jet = JPTjetcoll->begin(); jet!=JPTjetcoll->end(); ++jet){
209  //if ((jet->pt()>_ptThreshold) && (abs(jet->eta())<_maxAbsEta)){
210  // if(Ps.size()>_maxNJets) {
211  // edm::LogInfo(messageLoggerCatregory)<<"NMax Jets exceded..";
212  // break;
213  // }
214  // Ps.push_back(jet->p4());
215  //}
216  //}
217  //hJPTAlpha_T->Fill( alpha_T()(Ps));
218 
219  //HT<reco::JPTJetCollection> JPTHT(JPTjetcoll, _ptThreshold, _maxAbsEta);
220 
221  //hJPTHT->Fill(JPTHT.ScalarSum);
222  //hJPTMHT->Fill(JPTHT.v.Mod());
223 
224  //###########################################################
225  // MET
226 
227  //===========================================================
228  // Calo MET
229 
231  iEvent.getByToken(theCaloMETCollectionToken, calometcoll);
232 
233  if (!calometcoll.isValid())
234  return;
235 
236  const CaloMETCollection* calometcol = calometcoll.product();
237  const CaloMET* calomet;
238  calomet = &(calometcol->front());
239 
240  hCaloMET->Fill(calomet->pt());
241 
242  //===========================================================
243  // PF MET
244 
246  iEvent.getByToken(thePFMETCollectionToken, pfmetcoll);
247 
248  if (!pfmetcoll.isValid())
249  return;
250 
251  const PFMETCollection* pfmetcol = pfmetcoll.product();
252  const PFMET* pfmet;
253  pfmet = &(pfmetcol->front());
254 
255  hPFMET->Fill(pfmet->pt());
256 
257  //===========================================================
258  // TC MET
259 
260  //edm::Handle<reco::METCollection> tcmetcoll;
261  //iEvent.getByToken(theTCMETCollectionToken, tcmetcoll);
262 
263  //if(!tcmetcoll.isValid()) return;
264 
265  //const METCollection *tcmetcol = tcmetcoll.product();
266  //const MET *tcmet;
267  //tcmet = &(tcmetcol->front());
268 
269  //hTCMET->Fill(tcmet->pt());
270 }
MonitorElement * hCaloMHT
MonitorElement * hCaloHT
double pt() const final
transverse momentum
MonitorElement * hPFAlpha_T
MonitorElement * hPFMHT
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollectionToken
edm::EDGetTokenT< reco::PFMETCollection > thePFMETCollectionToken
MonitorElement * hCaloMET
void Fill(long long x)
Collection of Calo MET.
MonitorElement * hPFHT
MonitorElement * hCaloAlpha_T
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool isValid() const
Definition: HandleBase.h:70
Log< level::Info, false > LogInfo
edm::EDGetTokenT< reco::CaloMETCollection > theCaloMETCollectionToken
T const * product() const
Definition: Handle.h:70
static const char * messageLoggerCatregory
edm::EDGetTokenT< std::vector< reco::PFJet > > thePFJetCollectionToken
Definition: HT.h:21
MonitorElement * hPFMET
Collection of PF MET.
void SUSYDQMAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 97 of file SUSYDQMAnalyzer.cc.

References dqm::implementation::IBooker::book1D(), DeadROC_duringRun::dir, dqm::implementation::NavigatorBase::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

97  {
98  // if( dqm ) {
99  //===========================================================
100  // book HT histos.
102  dir += "HT";
103  ibooker.setCurrentFolder(dir);
104  hCaloHT = ibooker.book1D("Calo_HT", "", 500, 0., 2000);
105  hPFHT = ibooker.book1D("PF_HT", "", 500, 0., 2000);
106  //hJPTHT = ibooker.book1D("JPT_HT" , "", 500, 0., 2000);
107  //===========================================================
108  // book MET histos.
109 
110  dir = SUSYFolder;
111  dir += "MET";
112  ibooker.setCurrentFolder(dir);
113  hCaloMET = ibooker.book1D("Calo_MET", "", 500, 0., 1000);
114  hPFMET = ibooker.book1D("PF_MET", "", 500, 0., 1000);
115  //hTCMET = ibooker.book1D("TC_MET" , "", 500, 0., 1000);
116 
117  //===========================================================
118  // book MHT histos.
119 
120  dir = SUSYFolder;
121  dir += "MHT";
122  ibooker.setCurrentFolder(dir);
123  hCaloMHT = ibooker.book1D("Calo_MHT", "", 500, 0., 1000);
124  hPFMHT = ibooker.book1D("PF_MHT", "", 500, 0., 1000);
125  //hJPTMHT = ibooker.book1D("JPT_MHT" , "", 500, 0., 1000);
126 
127  //===========================================================
128  // book alpha_T histos.
129 
130  dir = SUSYFolder;
131  dir += "Alpha_T";
132  ibooker.setCurrentFolder(dir);
133  hCaloAlpha_T = ibooker.book1D("Calo_AlphaT", "", 100, 0., 1.);
134  //hJPTAlpha_T = ibooker.book1D("PF_AlphaT" , "", 100, 0., 1.);
135  hPFAlpha_T = ibooker.book1D("PF_AlphaT", "", 100, 0., 1.);
136  // }
137 }
std::string SUSYFolder
MonitorElement * hCaloMHT
MonitorElement * hCaloHT
MonitorElement * hPFAlpha_T
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
MonitorElement * hPFMHT
MonitorElement * hCaloMET
MonitorElement * hPFHT
MonitorElement * hCaloAlpha_T
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
MonitorElement * hPFMET

Member Data Documentation

double SUSYDQMAnalyzer::_maxAbsEta
private

Definition at line 45 of file SUSYDQMAnalyzer.h.

double SUSYDQMAnalyzer::_maxNJets
private

Definition at line 44 of file SUSYDQMAnalyzer.h.

double SUSYDQMAnalyzer::_ptThreshold
private

Definition at line 43 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hCaloAlpha_T
private

Definition at line 65 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hCaloHT
private

Definition at line 53 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hCaloMET
private

Definition at line 57 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hCaloMHT
private

Definition at line 61 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hPFAlpha_T
private

Definition at line 67 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hPFHT
private

Definition at line 55 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hPFMET
private

Definition at line 58 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hPFMHT
private

Definition at line 63 of file SUSYDQMAnalyzer.h.

edm::ParameterSet SUSYDQMAnalyzer::iConfig
private

Definition at line 30 of file SUSYDQMAnalyzer.h.

const char * SUSYDQMAnalyzer::messageLoggerCatregory = "SUSYDQM"
staticprivate

Definition at line 48 of file SUSYDQMAnalyzer.h.

std::string SUSYDQMAnalyzer::SUSYFolder
private

Definition at line 47 of file SUSYDQMAnalyzer.h.

edm::EDGetTokenT<reco::CaloJetCollection> SUSYDQMAnalyzer::theCaloJetCollectionToken
private

Definition at line 37 of file SUSYDQMAnalyzer.h.

edm::EDGetTokenT<reco::CaloMETCollection> SUSYDQMAnalyzer::theCaloMETCollectionToken
private

Definition at line 39 of file SUSYDQMAnalyzer.h.

edm::EDGetTokenT<std::vector<reco::PFJet> > SUSYDQMAnalyzer::thePFJetCollectionToken
private

Definition at line 36 of file SUSYDQMAnalyzer.h.

edm::EDGetTokenT<reco::PFMETCollection> SUSYDQMAnalyzer::thePFMETCollectionToken
private

Definition at line 35 of file SUSYDQMAnalyzer.h.