CMS 3D CMS Logo

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 43 of file BPhysicsValidation.h.

Constructor & Destructor Documentation

◆ ParticleMonitor()

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

Definition at line 45 of file BPhysicsValidation.h.

46  : p(p_), name(name_), pdgid(p.getParameter<int>("pdgid")){};

◆ ~ParticleMonitor()

BPhysicsValidation::ParticleMonitor::~ParticleMonitor ( )
inline

Definition at line 47 of file BPhysicsValidation.h.

47 {};

Member Function Documentation

◆ Configure()

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

Definition at line 49 of file BPhysicsValidation.h.

49  {
51  double mass_min = p.getParameter<double>("massmin");
52  double mass_max = p.getParameter<double>("massmax");
53  DQMHelper dqm(&i);
54  i.setCurrentFolder("Generator/BPhysics");
55  // Number of analyzed events
56  pt = dqm.book1dHisto(name + "PT", "P_{t} of the " + pname + "s", 100, 0., 100, "P_{t} (GeV)", "Number of Events");
57  eta = dqm.book1dHisto(name + "ETA", "#eta of the " + pname + "s", 100, -5., 5., "#eta", "Number of Events");
58  phi = dqm.book1dHisto(
59  name + "PHI", "#phi of the " + pname + "s", 100, 0, 2 * TMath::Pi(), "#phi", "Number of Events");
60  mass = dqm.book1dHisto(
61  name + "MASS", "Mass of the " + pname + "s", 100, mass_min, mass_max, "Mass (GeV)", "Number of Events");
62  }

References eta, edm::ParameterSet::getParameter(), mps_fire::i, mass, name, p, phi, Pi, unpackData-CaloStage2::pname, pt, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by BPhysicsValidation::bookHistograms().

◆ Fill()

void BPhysicsValidation::ParticleMonitor::Fill ( const reco::GenParticle p,
double  weight 
)
inline

Definition at line 64 of file BPhysicsValidation.h.

64  {
65  if (abs(p->pdgId()) == abs(pdgid)) {
66  pt->Fill(p->pt(), weight);
67  eta->Fill(p->eta(), weight);
68  phi->Fill(p->phi(), weight);
69  mass->Fill(p->mass(), weight);
70  }
71  }

References funct::abs(), eta, dqm::impl::MonitorElement::Fill(), mass, p, pdgid, phi, pt, and mps_merge::weight.

Referenced by BPhysicsValidation::analyze().

◆ PDGID()

int BPhysicsValidation::ParticleMonitor::PDGID ( )
inline

Definition at line 72 of file BPhysicsValidation.h.

72 { return pdgid; }

References pdgid.

Referenced by BPhysicsValidation::analyze().

Member Data Documentation

◆ eta

MonitorElement * BPhysicsValidation::ParticleMonitor::eta
private

◆ mass

MonitorElement * BPhysicsValidation::ParticleMonitor::mass
private

◆ name

std::string BPhysicsValidation::ParticleMonitor::name
private

◆ p

const edm::ParameterSet BPhysicsValidation::ParticleMonitor::p
private

Definition at line 75 of file BPhysicsValidation.h.

Referenced by Configure(), Fill(), and Electron.Electron::ptErr().

◆ pdgid

int BPhysicsValidation::ParticleMonitor::pdgid
private

Definition at line 77 of file BPhysicsValidation.h.

Referenced by Fill(), and PDGID().

◆ phi

MonitorElement * BPhysicsValidation::ParticleMonitor::phi
private

◆ pt

MonitorElement* BPhysicsValidation::ParticleMonitor::pt
private
BPhysicsValidation::ParticleMonitor::eta
MonitorElement * eta
Definition: BPhysicsValidation.h:78
mps_fire.i
i
Definition: mps_fire.py:428
BPhysicsValidation::ParticleMonitor::pt
MonitorElement * pt
Definition: BPhysicsValidation.h:78
BPhysicsValidation::ParticleMonitor::mass
MonitorElement * mass
Definition: BPhysicsValidation.h:78
mps_merge.weight
weight
Definition: mps_merge.py:88
BPhysicsValidation::ParticleMonitor::pdgid
int pdgid
Definition: BPhysicsValidation.h:77
BPhysicsValidation::ParticleMonitor::p
const edm::ParameterSet p
Definition: BPhysicsValidation.h:75
dqm::impl::MonitorElement::Fill
void Fill(long long x)
Definition: MonitorElement.h:290
BPhysicsValidation::ParticleMonitor::phi
MonitorElement * phi
Definition: BPhysicsValidation.h:78
unpackData-CaloStage2.pname
pname
Definition: unpackData-CaloStage2.py:76
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
DQMHelper
Definition: DQMHelper.h:15
BPhysicsValidation::ParticleMonitor::name
std::string name
Definition: BPhysicsValidation.h:76
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
Pi
const double Pi
Definition: CosmicMuonParameters.h:18
dqm
Definition: DQMStore.h:18
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22