CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T > Struct Template Reference

Public Member Functions

void bookHistograms (DQMStore &dqmStore)
 
void fillHistograms (int numJets, const edm::Event &evt, double evtWeight)
 
 l1ExtraObjectDistributionT (int minJets, int maxJets, const edm::InputTag &src, const std::string &cut, const std::string &dqmDirectory)
 
 ~l1ExtraObjectDistributionT ()
 

Public Attributes

StringCutObjectSelector< T > * cut_
 
std::string dqmDirectory_
 
MonitorElementhistogramL1ExtraObjectEta_
 
MonitorElementhistogramL1ExtraObjectPhi_
 
MonitorElementhistogramL1ExtraObjectPt_
 
MonitorElementhistogramNumL1ExtraObjects_
 
int maxJets_
 
int minJets_
 
edm::InputTag src_
 

Detailed Description

template<typename T>
struct MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >

Definition at line 1262 of file MCEmbeddingValidationAnalyzer.h.

Constructor & Destructor Documentation

template<typename T>
MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::l1ExtraObjectDistributionT ( int  minJets,
int  maxJets,
const edm::InputTag src,
const std::string &  cut,
const std::string &  dqmDirectory 
)
inline

Definition at line 1264 of file MCEmbeddingValidationAnalyzer.h.

References GOODCOLL_filter_cfg::cut, MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::cut_, MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::dqmDirectory_, MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::maxJets_, and MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::minJets_.

1266  : minJets_(minJets),
1267  maxJets_(maxJets),
1268  src_(src),
1269  cut_(0)
1270  {
1271  if ( cut != "" ) cut_ = new StringCutObjectSelector<T>(cut);
1272  dqmDirectory_ = dqmDirectory;
1273  if ( minJets_ < 0 && maxJets_ < 0 ) dqmDirectory_.append("");
1274  else if ( maxJets_ < 0 ) dqmDirectory_.append(Form("_numJetsGe%i", minJets_));
1275  else if ( minJets_ < 0 ) dqmDirectory_.append(Form("_numJetsLe%i", maxJets_));
1276  else if ( maxJets_ == minJets_ ) dqmDirectory_.append(Form("_numJetsEq%i", minJets_));
1277  else dqmDirectory_.append(Form("_numJets%ito%i", minJets_, maxJets_));
1278  }

Member Function Documentation

template<typename T>
void MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::bookHistograms ( DQMStore dqmStore)
inline

Definition at line 1283 of file MCEmbeddingValidationAnalyzer.h.

References DQMStore::book1D(), MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::dqmDirectory_, MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::histogramL1ExtraObjectEta_, MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::histogramL1ExtraObjectPhi_, MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::histogramL1ExtraObjectPt_, MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::histogramNumL1ExtraObjects_, Pi, and DQMStore::setCurrentFolder().

1284  {
1285  dqmStore.setCurrentFolder(dqmDirectory_.data());
1286  histogramNumL1ExtraObjects_ = dqmStore.book1D("numL1ExtraObjects", "numL1ExtraObjects", 10, -0.5, 9.5);
1287  histogramL1ExtraObjectPt_ = dqmStore.book1D("l1ExtraObjectPt", "l1ExtraObjectPt", 250, 0., 250.);
1288  histogramL1ExtraObjectEta_ = dqmStore.book1D("l1ExtraObjectEta", "l1ExtraObjectEta", 198, -9.9, +9.9);
1289  histogramL1ExtraObjectPhi_ = dqmStore.book1D("l1ExtraObjectPhi", "l1ExtraObjectPhi", 72, -TMath::Pi(), +TMath::Pi());
1290  }
const double Pi
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:994
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:707
template<typename T>
void MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::fillHistograms ( int  numJets,
const edm::Event evt,
double  evtWeight 
)
inline

Definition at line 1291 of file MCEmbeddingValidationAnalyzer.h.

References MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::cut_, MonitorElement::Fill(), edm::Event::getByLabel(), MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::histogramL1ExtraObjectEta_, MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::histogramL1ExtraObjectPhi_, MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::histogramL1ExtraObjectPt_, MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::histogramNumL1ExtraObjects_, MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::maxJets_, MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::minJets_, and MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::src_.

1293  {
1294  if ( (minJets_ == -1 || numJets >= minJets_) &&
1295  (maxJets_ == -1 || numJets <= maxJets_) ) {
1296  typedef std::vector<T> l1ExtraObjectCollection;
1297  edm::Handle<l1ExtraObjectCollection> l1ExtraObjects;
1298  evt.getByLabel(src_, l1ExtraObjects);
1299  int numL1ExtraObjects = 0;
1300  for ( typename l1ExtraObjectCollection::const_iterator l1ExtraObject = l1ExtraObjects->begin();
1301  l1ExtraObject != l1ExtraObjects->end(); ++l1ExtraObject ) {
1302  if ( cut_ && !(*cut_)(*l1ExtraObject) ) continue;
1303  ++numL1ExtraObjects;
1304  histogramL1ExtraObjectPt_->Fill(l1ExtraObject->pt(), evtWeight);
1305  histogramL1ExtraObjectEta_->Fill(l1ExtraObject->eta(), evtWeight);
1306  histogramL1ExtraObjectPhi_->Fill(l1ExtraObject->phi(), evtWeight);
1307  }
1308  histogramNumL1ExtraObjects_->Fill(numL1ExtraObjects, evtWeight);
1309  }
1310  }
void Fill(long long x)
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:420

Member Data Documentation

template<typename T>
std::string MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::dqmDirectory_
template<typename T>
MonitorElement* MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::histogramL1ExtraObjectEta_
template<typename T>
MonitorElement* MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::histogramL1ExtraObjectPhi_
template<typename T>
MonitorElement* MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::histogramL1ExtraObjectPt_
template<typename T>
MonitorElement* MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::histogramNumL1ExtraObjects_
template<typename T>
int MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::maxJets_
template<typename T>
int MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::minJets_