CMS 3D CMS Logo

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
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 

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::CaloJetCollectiontheCaloJetCollectionToken
 
edm::EDGetTokenT< reco::CaloMETCollectiontheCaloMETCollectionToken
 
edm::EDGetTokenT< std::vector< reco::PFJet > > thePFJetCollectionToken
 
edm::EDGetTokenT< reco::PFMETCollectionthePFMETCollectionToken
 

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 >
typedef CacheContexts< T... > CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T... > HasAbility
 
typedef CacheTypes::LuminosityBlockCache LuminosityBlockCache
 
typedef LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCacheLuminosityBlockContext
 
typedef CacheTypes::LuminosityBlockSummaryCache LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache, GlobalCacheRunContext
 
typedef CacheTypes::RunSummaryCache 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< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (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::SUSYDQMAnalyzer ( const edm::ParameterSet pSet)
explicit

Definition at line 71 of file SUSYDQMAnalyzer.cc.

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 }

References edm::ParameterSet::getParameter(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~SUSYDQMAnalyzer()

SUSYDQMAnalyzer::~SUSYDQMAnalyzer ( )
override

Definition at line 272 of file SUSYDQMAnalyzer.cc.

272 {}

Member Function Documentation

◆ analyze()

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

Reimplemented from DQMEDAnalyzer.

Definition at line 139 of file SUSYDQMAnalyzer.cc.

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 }

References funct::abs(), hltExoticaValidator_cfi::CaloHT, iEvent, edm::HandleBase::isValid(), metsig::jet, hltExoticaValidator_cfi::PFHT, edm::Handle< T >::product(), and reco::LeafCandidate::pt().

◆ bookHistograms()

void SUSYDQMAnalyzer::bookHistograms ( DQMStore::IBooker ibooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
overrideprivatevirtual

Implements DQMEDAnalyzer.

Definition at line 97 of file SUSYDQMAnalyzer.cc.

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 }

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

Member Data Documentation

◆ _maxAbsEta

double SUSYDQMAnalyzer::_maxAbsEta
private

Definition at line 45 of file SUSYDQMAnalyzer.h.

◆ _maxNJets

double SUSYDQMAnalyzer::_maxNJets
private

Definition at line 44 of file SUSYDQMAnalyzer.h.

◆ _ptThreshold

double SUSYDQMAnalyzer::_ptThreshold
private

Definition at line 43 of file SUSYDQMAnalyzer.h.

◆ hCaloAlpha_T

MonitorElement* SUSYDQMAnalyzer::hCaloAlpha_T
private

Definition at line 65 of file SUSYDQMAnalyzer.h.

◆ hCaloHT

MonitorElement* SUSYDQMAnalyzer::hCaloHT
private

Definition at line 53 of file SUSYDQMAnalyzer.h.

◆ hCaloMET

MonitorElement* SUSYDQMAnalyzer::hCaloMET
private

Definition at line 57 of file SUSYDQMAnalyzer.h.

◆ hCaloMHT

MonitorElement* SUSYDQMAnalyzer::hCaloMHT
private

Definition at line 61 of file SUSYDQMAnalyzer.h.

◆ hPFAlpha_T

MonitorElement* SUSYDQMAnalyzer::hPFAlpha_T
private

Definition at line 67 of file SUSYDQMAnalyzer.h.

◆ hPFHT

MonitorElement* SUSYDQMAnalyzer::hPFHT
private

Definition at line 55 of file SUSYDQMAnalyzer.h.

◆ hPFMET

MonitorElement* SUSYDQMAnalyzer::hPFMET
private

Definition at line 58 of file SUSYDQMAnalyzer.h.

◆ hPFMHT

MonitorElement* SUSYDQMAnalyzer::hPFMHT
private

Definition at line 63 of file SUSYDQMAnalyzer.h.

◆ iConfig

edm::ParameterSet SUSYDQMAnalyzer::iConfig
private

Definition at line 30 of file SUSYDQMAnalyzer.h.

◆ messageLoggerCatregory

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

Definition at line 48 of file SUSYDQMAnalyzer.h.

◆ SUSYFolder

std::string SUSYDQMAnalyzer::SUSYFolder
private

Definition at line 47 of file SUSYDQMAnalyzer.h.

◆ theCaloJetCollectionToken

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

Definition at line 37 of file SUSYDQMAnalyzer.h.

◆ theCaloMETCollectionToken

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

Definition at line 39 of file SUSYDQMAnalyzer.h.

◆ thePFJetCollectionToken

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

Definition at line 36 of file SUSYDQMAnalyzer.h.

◆ thePFMETCollectionToken

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

Definition at line 35 of file SUSYDQMAnalyzer.h.

SUSYDQMAnalyzer::hPFMHT
MonitorElement * hPFMHT
Definition: SUSYDQMAnalyzer.h:63
hltExoticaValidator_cfi.PFHT
PFHT
Definition: hltExoticaValidator_cfi.py:226
edm::Handle::product
T const * product() const
Definition: Handle.h:70
SUSYDQMAnalyzer::thePFMETCollectionToken
edm::EDGetTokenT< reco::PFMETCollection > thePFMETCollectionToken
Definition: SUSYDQMAnalyzer.h:35
SUSYDQMAnalyzer::_maxAbsEta
double _maxAbsEta
Definition: SUSYDQMAnalyzer.h:45
SUSYDQMAnalyzer::SUSYFolder
std::string SUSYFolder
Definition: SUSYDQMAnalyzer.h:47
PFMETCollection
Collection of PF MET.
SUSYDQMAnalyzer::theCaloJetCollectionToken
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollectionToken
Definition: SUSYDQMAnalyzer.h:37
edm::LogInfo
Definition: MessageLogger.h:254
SUSYDQMAnalyzer::hCaloHT
MonitorElement * hCaloHT
Definition: SUSYDQMAnalyzer.h:53
SUSYDQMAnalyzer::thePFJetCollectionToken
edm::EDGetTokenT< std::vector< reco::PFJet > > thePFJetCollectionToken
Definition: SUSYDQMAnalyzer.h:36
SUSYDQMAnalyzer::iConfig
edm::ParameterSet iConfig
Definition: SUSYDQMAnalyzer.h:30
reco::LeafCandidate::pt
double pt() const final
transverse momentum
Definition: LeafCandidate.h:146
edm::Handle< reco::CaloJetCollection >
reco::CaloMET
Definition: CaloMET.h:21
SUSYDQMAnalyzer::hPFHT
MonitorElement * hPFHT
Definition: SUSYDQMAnalyzer.h:55
HT
Definition: HT.h:21
SUSYDQMAnalyzer::messageLoggerCatregory
static const char * messageLoggerCatregory
Definition: SUSYDQMAnalyzer.h:48
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
SUSYDQMAnalyzer::hCaloAlpha_T
MonitorElement * hCaloAlpha_T
Definition: SUSYDQMAnalyzer.h:65
SUSYDQMAnalyzer::_ptThreshold
double _ptThreshold
Definition: SUSYDQMAnalyzer.h:43
hltExoticaValidator_cfi.CaloHT
CaloHT
Definition: hltExoticaValidator_cfi.py:227
SUSYDQMAnalyzer::_maxNJets
double _maxNJets
Definition: SUSYDQMAnalyzer.h:44
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SUSYDQMAnalyzer::hCaloMHT
MonitorElement * hCaloMHT
Definition: SUSYDQMAnalyzer.h:61
reco::PFMET
Definition: PFMET.h:18
SUSYDQMAnalyzer::hCaloMET
MonitorElement * hCaloMET
Definition: SUSYDQMAnalyzer.h:57
iEvent
int iEvent
Definition: GenABIO.cc:224
SUSYDQMAnalyzer::hPFAlpha_T
MonitorElement * hPFAlpha_T
Definition: SUSYDQMAnalyzer.h:67
alpha_T
Definition: alpha_T.h:10
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
metsig::jet
Definition: SignAlgoResolutions.h:47
SUSYDQMAnalyzer::theCaloMETCollectionToken
edm::EDGetTokenT< reco::CaloMETCollection > theCaloMETCollectionToken
Definition: SUSYDQMAnalyzer.h:39
CaloMETCollection
Collection of Calo MET.
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::HandleBase::isValid
bool isValid() const
Definition: HandleBase.h:70
edm::InputTag
Definition: InputTag.h:15
SUSYDQMAnalyzer::hPFMET
MonitorElement * hPFMET
Definition: SUSYDQMAnalyzer.h:58
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23