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:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

 SUSYDQMAnalyzer (const edm::ParameterSet &)
 
 ~SUSYDQMAnalyzer ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 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
 
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 &)
 
virtual void beginJob ()
 
virtual void beginRun (const edm::Run &, const edm::EventSetup &iSetup)
 
virtual void endRun (const edm::Run &, const edm::EventSetup &)
 

Private Attributes

double _maxAbsEta
 
double _maxNJets
 
double _ptThreshold
 
DQMStoredqm
 
MonitorElementhCaloAlpha_T
 
MonitorElementhCaloHT
 
MonitorElementhCaloMET
 
MonitorElementhCaloMHT
 
MonitorElementhJPTAlpha_T
 
MonitorElementhJPTHT
 
MonitorElementhJPTMHT
 
MonitorElementhPFAlpha_T
 
MonitorElementhPFHT
 
MonitorElementhPFMET
 
MonitorElementhPFMHT
 
MonitorElementhTCMET
 
edm::ParameterSet iConfig
 
std::string SUSYFolder
 
edm::InputTag theCaloJetCollectionLabel
 
edm::InputTag theCaloMETCollectionLabel
 
edm::InputTag theJPTJetCollectionLabel
 
edm::InputTag thePFJetCollectionLabel
 
edm::InputTag thePFMETCollectionLabel
 
edm::InputTag theTCMETCollectionLabel
 

Static Private Attributes

static const char * messageLoggerCatregory = "SUSYDQM"
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- 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 18 of file SUSYDQMAnalyzer.h.

Constructor & Destructor Documentation

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

Definition at line 275 of file SUSYDQMAnalyzer.cc.

275  {
276 }

Member Function Documentation

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

Implements edm::EDAnalyzer.

Definition at line 141 of file SUSYDQMAnalyzer.cc.

References funct::abs(), edm::Event::getByLabel(), 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.getByLabel(theCaloJetCollectionLabel, 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.getByLabel(thePFJetCollectionLabel, 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 
203 
204  iEvent.getByLabel(theJPTJetCollectionLabel, 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 
221 
222  hJPTHT->Fill(JPTHT.ScalarSum);
223  hJPTMHT->Fill(JPTHT.v.Mod());
224 
225  //###########################################################
226  // MET
227 
228  //===========================================================
229  // Calo MET
230 
232  iEvent.getByLabel(theCaloMETCollectionLabel, 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.getByLabel(thePFMETCollectionLabel, 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 
260  iEvent.getByLabel(theTCMETCollectionLabel, 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 * hJPTHT
MonitorElement * hCaloMHT
edm::InputTag theCaloJetCollectionLabel
MonitorElement * hCaloHT
MonitorElement * hPFAlpha_T
MonitorElement * hPFMHT
MonitorElement * hCaloMET
void Fill(long long x)
Collection of Calo MET.
edm::InputTag thePFMETCollectionLabel
MonitorElement * hPFHT
edm::InputTag thePFJetCollectionLabel
Definition: MET.h:32
MonitorElement * hCaloAlpha_T
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
Collection of MET.
bool isValid() const
Definition: HandleBase.h:76
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
MonitorElement * hTCMET
static const char * messageLoggerCatregory
edm::InputTag theTCMETCollectionLabel
T const * product() const
Definition: Handle.h:81
edm::InputTag theCaloMETCollectionLabel
MonitorElement * hJPTAlpha_T
MonitorElement * hJPTMHT
Definition: HT.h:20
virtual float pt() const GCC11_FINAL
transverse momentum
edm::InputTag theJPTJetCollectionLabel
MonitorElement * hPFMET
Collection of PF MET.
void SUSYDQMAnalyzer::beginJob ( void  )
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 82 of file SUSYDQMAnalyzer.cc.

82  {
83  // Load parameters
84  thePFMETCollectionLabel = iConfig.getParameter<edm::InputTag>("PFMETCollectionLabel");
85  theCaloMETCollectionLabel = iConfig.getParameter<edm::InputTag>("CaloMETCollectionLabel");
86  theTCMETCollectionLabel = iConfig.getParameter<edm::InputTag>("TCMETCollectionLabel");
87 
88  theCaloJetCollectionLabel = iConfig.getParameter<edm::InputTag>("CaloJetCollectionLabel");
89  theJPTJetCollectionLabel = iConfig.getParameter<edm::InputTag>("JPTJetCollectionLabel");
90  thePFJetCollectionLabel = iConfig.getParameter<edm::InputTag>("PFJetCollectionLabel");
91 
92  _ptThreshold = iConfig.getParameter<double>("ptThreshold");
93  _maxNJets = iConfig.getParameter<double>("maxNJets");
94  _maxAbsEta = iConfig.getParameter<double>("maxAbsEta");
95 }
T getParameter(std::string const &) const
edm::InputTag theCaloJetCollectionLabel
edm::InputTag thePFMETCollectionLabel
edm::InputTag thePFJetCollectionLabel
edm::ParameterSet iConfig
edm::InputTag theTCMETCollectionLabel
edm::InputTag theCaloMETCollectionLabel
edm::InputTag theJPTJetCollectionLabel
void SUSYDQMAnalyzer::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 97 of file SUSYDQMAnalyzer.cc.

References dir, and AlCaHLTBitMon_QueryRunRegistry::string.

97  {
98  if( dqm ) {
99  //===========================================================
100  // book HT histos.
101 
103  dir+="HT";
104  dqm->setCurrentFolder(dir);
105  hCaloHT = dqm->book1D("Calo_HT", "", 500, 0., 2000);
106  hPFHT = dqm->book1D("PF_HT" , "", 500, 0., 2000);
107  hJPTHT = dqm->book1D("JPT_HT" , "", 500, 0., 2000);
108 
109  //===========================================================
110  // book MET histos.
111 
112  dir=SUSYFolder;
113  dir+="MET";
114  dqm->setCurrentFolder(dir);
115  hCaloMET = dqm->book1D("Calo_MET", "", 500, 0., 1000);
116  hPFMET = dqm->book1D("PF_MET" , "", 500, 0., 1000);
117  hTCMET = dqm->book1D("TC_MET" , "", 500, 0., 1000);
118 
119  //===========================================================
120  // book MHT histos.
121 
122  dir=SUSYFolder;
123  dir+="MHT";
124  dqm->setCurrentFolder(dir);
125  hCaloMHT = dqm->book1D("Calo_MHT", "", 500, 0., 1000);
126  hPFMHT = dqm->book1D("PF_MHT" , "", 500, 0., 1000);
127  hJPTMHT = dqm->book1D("JPT_MHT" , "", 500, 0., 1000);
128 
129  //===========================================================
130  // book alpha_T histos.
131 
132  dir=SUSYFolder;
133  dir+="Alpha_T";
134  dqm->setCurrentFolder(dir);
135  hCaloAlpha_T = dqm->book1D("Calo_AlphaT", "", 100, 0., 1.);
136  hJPTAlpha_T = dqm->book1D("PF_AlphaT" , "", 100, 0., 1.);
137  hPFAlpha_T = dqm->book1D("JPT_AlphaT" , "", 100, 0., 1.);
138  }
139 }
MonitorElement * hJPTHT
std::string SUSYFolder
MonitorElement * hCaloMHT
MonitorElement * hCaloHT
MonitorElement * hPFAlpha_T
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:873
MonitorElement * hPFMHT
MonitorElement * hCaloMET
MonitorElement * hPFHT
MonitorElement * hCaloAlpha_T
MonitorElement * hTCMET
dbl *** dir
Definition: mlp_gen.cc:35
MonitorElement * hJPTAlpha_T
MonitorElement * hJPTMHT
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:585
MonitorElement * hPFMET
void SUSYDQMAnalyzer::endRun ( const edm::Run ,
const edm::EventSetup  
)
privatevirtual

Reimplemented from edm::EDAnalyzer.

Definition at line 272 of file SUSYDQMAnalyzer.cc.

272  {
273 }

Member Data Documentation

double SUSYDQMAnalyzer::_maxAbsEta
private

Definition at line 41 of file SUSYDQMAnalyzer.h.

double SUSYDQMAnalyzer::_maxNJets
private

Definition at line 40 of file SUSYDQMAnalyzer.h.

double SUSYDQMAnalyzer::_ptThreshold
private

Definition at line 39 of file SUSYDQMAnalyzer.h.

DQMStore* SUSYDQMAnalyzer::dqm
private

Definition at line 46 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hCaloAlpha_T
private

Definition at line 62 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hCaloHT
private

Definition at line 50 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hCaloMET
private

Definition at line 54 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hCaloMHT
private

Definition at line 58 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hJPTAlpha_T
private

Definition at line 63 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hJPTHT
private

Definition at line 51 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hJPTMHT
private

Definition at line 59 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hPFAlpha_T
private

Definition at line 64 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hPFHT
private

Definition at line 52 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hPFMET
private

Definition at line 55 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hPFMHT
private

Definition at line 60 of file SUSYDQMAnalyzer.h.

MonitorElement* SUSYDQMAnalyzer::hTCMET
private

Definition at line 56 of file SUSYDQMAnalyzer.h.

edm::ParameterSet SUSYDQMAnalyzer::iConfig
private

Definition at line 24 of file SUSYDQMAnalyzer.h.

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

Definition at line 44 of file SUSYDQMAnalyzer.h.

std::string SUSYDQMAnalyzer::SUSYFolder
private

Definition at line 43 of file SUSYDQMAnalyzer.h.

edm::InputTag SUSYDQMAnalyzer::theCaloJetCollectionLabel
private

Definition at line 35 of file SUSYDQMAnalyzer.h.

edm::InputTag SUSYDQMAnalyzer::theCaloMETCollectionLabel
private

Definition at line 31 of file SUSYDQMAnalyzer.h.

edm::InputTag SUSYDQMAnalyzer::theJPTJetCollectionLabel
private

Definition at line 37 of file SUSYDQMAnalyzer.h.

edm::InputTag SUSYDQMAnalyzer::thePFJetCollectionLabel
private

Definition at line 36 of file SUSYDQMAnalyzer.h.

edm::InputTag SUSYDQMAnalyzer::thePFMETCollectionLabel
private

Definition at line 32 of file SUSYDQMAnalyzer.h.

edm::InputTag SUSYDQMAnalyzer::theTCMETCollectionLabel
private

Definition at line 33 of file SUSYDQMAnalyzer.h.