CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros 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::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 SUSYDQMAnalyzer (const edm::ParameterSet &)
 
 ~SUSYDQMAnalyzer ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
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 edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 22 of file SUSYDQMAnalyzer.h.

Constructor & Destructor Documentation

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

Definition at line 72 of file SUSYDQMAnalyzer.cc.

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

73 {
74  iConfig = pSet;
75 
76  SUSYFolder = iConfig.getParameter<std::string>("folderName");
77  // Load parameters
78  thePFMETCollectionToken = consumes<reco::PFMETCollection> (iConfig.getParameter<edm::InputTag>("PFMETCollectionLabel"));
79  theCaloMETCollectionToken = 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 
84  theCaloJetCollectionToken = consumes<reco::CaloJetCollection> (iConfig.getParameter<edm::InputTag>("CaloJetCollectionLabel"));
85  //theJPTJetCollectionToken = consumes<reco::JPTJetCollection> (iConfig.getParameter<edm::InputTag>("JPTJetCollectionLabel"));
86  thePFJetCollectionToken = consumes<std::vector<reco::PFJet> > (iConfig.getParameter<edm::InputTag>("PFJetCollectionLabel"));
87 
88  _ptThreshold = iConfig.getParameter<double>("ptThreshold");
89  _maxNJets = iConfig.getParameter<double>("maxNJets");
90  _maxAbsEta = iConfig.getParameter<double>("maxAbsEta");
91 
92 }
std::string SUSYFolder
T getParameter(std::string const &) const
edm::EDGetTokenT< reco::CaloJetCollection > theCaloJetCollectionToken
edm::EDGetTokenT< reco::PFMETCollection > thePFMETCollectionToken
edm::EDGetTokenT< reco::CaloMETCollection > theCaloMETCollectionToken
edm::ParameterSet iConfig
edm::EDGetTokenT< std::vector< reco::PFJet > > thePFJetCollectionToken
SUSYDQMAnalyzer::~SUSYDQMAnalyzer ( )

Definition at line 273 of file SUSYDQMAnalyzer.cc.

273  {
274 }

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 141 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.

142 {
143  //###########################################################
144  // HTand MHT
145 
146  //===========================================================
147  // Calo HT, MHT and alpha_T
148 
150 
151  iEvent.getByToken(theCaloJetCollectionToken, CaloJetcoll);
152 
153  if(!CaloJetcoll.isValid()) return;
154 
155  std::vector<math::XYZTLorentzVector> Ps;
156  for (reco::CaloJetCollection::const_iterator jet = CaloJetcoll->begin(); jet!=CaloJetcoll->end(); ++jet){
157  if ((jet->pt()>_ptThreshold) && (abs(jet->eta()) < _maxAbsEta)){
158  if(Ps.size()>_maxNJets) {
159  edm::LogInfo(messageLoggerCatregory)<<"NMax Jets exceded..";
160  break;
161  }
162  Ps.push_back(jet->p4());
163  }
164  }
165 
166  hCaloAlpha_T->Fill( alpha_T()(Ps));
167 
169 
170  hCaloHT->Fill(CaloHT.ScalarSum);
171  hCaloMHT->Fill(CaloHT.v.Mod());
172 
173  //===========================================================
174  // PF HT, MHT and alpha_T
175 
177 
178  iEvent.getByToken(thePFJetCollectionToken, PFjetcoll);
179 
180  if(!PFjetcoll.isValid()) return;
181 
182  Ps.clear();
183  for (reco::PFJetCollection::const_iterator jet = PFjetcoll->begin(); jet!=PFjetcoll->end(); ++jet){
184  if ((jet->pt()>_ptThreshold) && (abs(jet->eta()) < _maxAbsEta)){
185  if(Ps.size()>_maxNJets) {
186  edm::LogInfo(messageLoggerCatregory)<<"NMax Jets exceded..";
187  break;
188  }
189  Ps.push_back(jet->p4());
190  }
191  }
192  hPFAlpha_T->Fill( alpha_T()(Ps));
193 
195 
196  hPFHT->Fill(PFHT.ScalarSum);
197  hPFMHT->Fill(PFHT.v.Mod());
198 
199  //===========================================================
200  // JPT HT, MHT and alpha_T
201 
202  //edm::Handle<reco::JPTJetCollection> JPTjetcoll;
203 
204  //iEvent.getByToken(theJPTJetCollectionToken, JPTjetcoll);
205 
206  //if(!JPTjetcoll.isValid()) return;
207 
208  //Ps.clear();
209  //for (reco::JPTJetCollection::const_iterator jet = JPTjetcoll->begin(); jet!=JPTjetcoll->end(); ++jet){
210  //if ((jet->pt()>_ptThreshold) && (abs(jet->eta())<_maxAbsEta)){
211  // if(Ps.size()>_maxNJets) {
212  // edm::LogInfo(messageLoggerCatregory)<<"NMax Jets exceded..";
213  // break;
214  // }
215  // Ps.push_back(jet->p4());
216  //}
217  //}
218  //hJPTAlpha_T->Fill( alpha_T()(Ps));
219 
220  //HT<reco::JPTJetCollection> JPTHT(JPTjetcoll, _ptThreshold, _maxAbsEta);
221 
222  //hJPTHT->Fill(JPTHT.ScalarSum);
223  //hJPTMHT->Fill(JPTHT.v.Mod());
224 
225  //###########################################################
226  // MET
227 
228  //===========================================================
229  // Calo MET
230 
232  iEvent.getByToken(theCaloMETCollectionToken, calometcoll);
233 
234  if(!calometcoll.isValid()) 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()) return;
249 
250  const PFMETCollection *pfmetcol = pfmetcoll.product();
251  const PFMET *pfmet;
252  pfmet = &(pfmetcol->front());
253 
254  hPFMET->Fill(pfmet->pt());
255 
256  //===========================================================
257  // TC MET
258 
259  //edm::Handle<reco::METCollection> tcmetcoll;
260  //iEvent.getByToken(theTCMETCollectionToken, tcmetcoll);
261 
262  //if(!tcmetcoll.isValid()) return;
263 
264  //const METCollection *tcmetcol = tcmetcoll.product();
265  //const MET *tcmet;
266  //tcmet = &(tcmetcol->front());
267 
268  //hTCMET->Fill(tcmet->pt());
269 
270 }
MonitorElement * hCaloMHT
MonitorElement * hCaloHT
MonitorElement * hPFAlpha_T
MonitorElement * hPFMHT
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
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:75
edm::EDGetTokenT< reco::CaloMETCollection > theCaloMETCollectionToken
T const * product() const
Definition: Handle.h:81
static const char * messageLoggerCatregory
edm::EDGetTokenT< std::vector< reco::PFJet > > thePFJetCollectionToken
Definition: HT.h:20
virtual double pt() const final
transverse momentum
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 DQMStore::IBooker::book1D(), dir, DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

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

Member Data Documentation

double SUSYDQMAnalyzer::_maxAbsEta
private

Definition at line 43 of file SUSYDQMAnalyzer.h.

double SUSYDQMAnalyzer::_maxNJets
private

Definition at line 42 of file SUSYDQMAnalyzer.h.

double SUSYDQMAnalyzer::_ptThreshold
private

Definition at line 41 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hCaloAlpha_T
private

Definition at line 63 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hCaloHT
private

Definition at line 51 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hCaloMET
private

Definition at line 55 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hCaloMHT
private

Definition at line 59 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hPFAlpha_T
private

Definition at line 65 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hPFHT
private

Definition at line 53 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hPFMET
private

Definition at line 56 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hPFMHT
private

Definition at line 61 of file SUSYDQMAnalyzer.h.

edm::ParameterSet SUSYDQMAnalyzer::iConfig
private

Definition at line 28 of file SUSYDQMAnalyzer.h.

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

Definition at line 46 of file SUSYDQMAnalyzer.h.

std::string SUSYDQMAnalyzer::SUSYFolder
private

Definition at line 45 of file SUSYDQMAnalyzer.h.

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

Definition at line 35 of file SUSYDQMAnalyzer.h.

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

Definition at line 37 of file SUSYDQMAnalyzer.h.

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

Definition at line 34 of file SUSYDQMAnalyzer.h.

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

Definition at line 33 of file SUSYDQMAnalyzer.h.