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 Attributes
BPhysicsValidation::ParticleMonitor Class Reference

Public Member Functions

void Configure (DQMStore::IBooker &i)
 
void Fill (const reco::GenParticle *p, double weight)
 
 ParticleMonitor (std::string name_, const edm::ParameterSet &p_)
 
int PDGID ()
 
 ~ParticleMonitor ()
 

Private Attributes

MonitorElementeta
 
MonitorElementmass
 
std::string name
 
const edm::ParameterSet p
 
int pdgid
 
MonitorElementphi
 
MonitorElementpt
 

Detailed Description

Definition at line 48 of file BPhysicsValidation.h.

Constructor & Destructor Documentation

BPhysicsValidation::ParticleMonitor::ParticleMonitor ( std::string  name_,
const edm::ParameterSet p_ 
)
inline

Definition at line 50 of file BPhysicsValidation.h.

50 :p(p_),name(name_),pdgid(p.getParameter<int>("pdgid")){};
T getParameter(std::string const &) const
BPhysicsValidation::ParticleMonitor::~ParticleMonitor ( )
inline

Definition at line 51 of file BPhysicsValidation.h.

51 {};

Member Function Documentation

void BPhysicsValidation::ParticleMonitor::Configure ( DQMStore::IBooker i)
inline

Definition at line 53 of file BPhysicsValidation.h.

References eta, edm::ParameterSet::getParameter(), mass, name, p, phi, Pi, pt, DQMStore::IBooker::setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by BPhysicsValidation::bookHistograms().

53  {
54  std::string pname=p.getParameter<std::string>("pname");
55  double mass_min=p.getParameter<double>("massmin");
56  double mass_max=p.getParameter<double>("massmax");
57  DQMHelper dqm(&i); i.setCurrentFolder("Generator/BPhysics");
58  // Number of analyzed events
59  pt = dqm.book1dHisto(name+"PT", "P_{t} of the "+pname+"s", 100, 0., 100,"P_{t} (GeV)","Number of Events");
60  eta = dqm.book1dHisto(name+"ETA", "#eta of the "+pname+"s", 100, -5., 5.,"#eta","Number of Events");
61  phi = dqm.book1dHisto(name+"PHI", "#phi of the "+pname+"s", 100, 0, 2*TMath::Pi(),"#phi","Number of Events");
62  mass = dqm.book1dHisto(name+"MASS", "Mass of the "+pname+"s", 100, mass_min, mass_max,"Mass (GeV)","Number of Events");
63  }
const double Pi
T getParameter(std::string const &) const
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
void BPhysicsValidation::ParticleMonitor::Fill ( const reco::GenParticle p,
double  weight 
)
inline

Definition at line 65 of file BPhysicsValidation.h.

References funct::abs(), eta, reco::LeafCandidate::eta(), MonitorElement::Fill(), mass, reco::LeafCandidate::mass(), pdgid, reco::LeafCandidate::pdgId(), phi, reco::LeafCandidate::phi(), pt, reco::LeafCandidate::pt(), and histoStyle::weight.

Referenced by BPhysicsValidation::analyze().

65  {
66  if(abs(p->pdgId())==abs(pdgid)){
67  pt->Fill(p->pt(),weight);
68  eta->Fill(p->eta(),weight);
69  phi->Fill(p->phi(),weight);
70  mass->Fill(p->mass(),weight);
71  }
72  }
virtual int pdgId() const
PDG identifier.
virtual float pt() const
transverse momentum
virtual float phi() const
momentum azimuthal angle
void Fill(long long x)
virtual float eta() const
momentum pseudorapidity
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
virtual float mass() const
mass
int weight
Definition: histoStyle.py:50
int BPhysicsValidation::ParticleMonitor::PDGID ( )
inline

Definition at line 73 of file BPhysicsValidation.h.

References pdgid.

Referenced by BPhysicsValidation::analyze().

Member Data Documentation

MonitorElement * BPhysicsValidation::ParticleMonitor::eta
private

Definition at line 79 of file BPhysicsValidation.h.

Referenced by Configure(), and Fill().

MonitorElement * BPhysicsValidation::ParticleMonitor::mass
private

Definition at line 79 of file BPhysicsValidation.h.

Referenced by Configure(), and Fill().

std::string BPhysicsValidation::ParticleMonitor::name
private
const edm::ParameterSet BPhysicsValidation::ParticleMonitor::p
private

Definition at line 76 of file BPhysicsValidation.h.

Referenced by Configure().

int BPhysicsValidation::ParticleMonitor::pdgid
private

Definition at line 78 of file BPhysicsValidation.h.

Referenced by Fill(), and PDGID().

MonitorElement * BPhysicsValidation::ParticleMonitor::phi
private

Definition at line 79 of file BPhysicsValidation.h.

Referenced by Configure(), and Fill().

MonitorElement* BPhysicsValidation::ParticleMonitor::pt
private

Definition at line 79 of file BPhysicsValidation.h.

Referenced by Configure(), and Fill().