CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes
GenEventInfoProduct Class Reference

#include <GenEventInfoProduct.h>

Public Types

typedef gen::PdfInfo PDF
 

Public Member Functions

double alphaQCD () const
 
double alphaQED () const
 
const std::vector< double > & binningValues () const
 
const std::vector< float > & DJRValues () const
 
 GenEventInfoProduct ()
 
 GenEventInfoProduct (const GenEventInfoProduct &other)
 
 GenEventInfoProduct (const HepMC::GenEvent *evt)
 
 GenEventInfoProduct (GenEventInfoProduct &&other)
 
bool hasBinningValues () const
 
bool hasDJRValues () const
 
bool hasPDF () const
 
int nMEPartons () const
 
int nMEPartonsFiltered () const
 
GenEventInfoProductoperator= (const GenEventInfoProduct &other)
 
GenEventInfoProductoperator= (GenEventInfoProduct &&other)
 
const PDFpdf () const
 
double qScale () const
 
void setBinningValues (const std::vector< double > &values)
 
void setDJR (const std::vector< float > &values)
 
void setNMEPartons (int n)
 
void setNMEPartonsFiltered (int n)
 
void setPDF (const PDF *pdf)
 
void setScales (double q=-1., double qcd=-1., double qed=-1.)
 
void setSignalProcessID (unsigned int procID)
 
void setWeights (const std::vector< double > &weights)
 
unsigned int signalProcessID () const
 
double weight () const
 
double weightProduct () const
 
std::vector< double > & weights ()
 
const std::vector< double > & weights () const
 
virtual ~GenEventInfoProduct ()
 

Private Attributes

double alphaQCD_
 
double alphaQED_
 
std::vector< double > binningValues_
 
std::vector< float > DJRValues_
 
int nMEPartons_
 
int nMEPartonsFiltered_
 
std::unique_ptr< PDFpdf_
 
double qScale_
 
unsigned int signalProcessID_
 
std::vector< double > weights_
 

Detailed Description

Definition at line 17 of file GenEventInfoProduct.h.

Member Typedef Documentation

◆ PDF

Definition at line 28 of file GenEventInfoProduct.h.

Constructor & Destructor Documentation

◆ GenEventInfoProduct() [1/4]

GenEventInfoProduct::GenEventInfoProduct ( )

Definition at line 16 of file GenEventInfoProduct.cc.

◆ GenEventInfoProduct() [2/4]

GenEventInfoProduct::GenEventInfoProduct ( const HepMC::GenEvent evt)

Definition at line 19 of file GenEventInfoProduct.cc.

20  : weights_(evt->weights().begin(), evt->weights().end()),
21  signalProcessID_(evt->signal_process_id()),
22  qScale_(evt->event_scale()),
23  alphaQCD_(evt->alphaQCD()),
24  alphaQED_(evt->alphaQED()),
25  nMEPartons_(-1),
27  const HepMC::PdfInfo *hepPDF = evt->pdf_info();
28  if (hepPDF) {
29  PDF pdf;
30 
31  pdf.id = std::make_pair(hepPDF->id1(), hepPDF->id2());
32  pdf.x = std::make_pair(hepPDF->x1(), hepPDF->x2());
33  pdf.xPDF = std::make_pair(hepPDF->pdf1(), hepPDF->pdf2());
34  pdf.scalePDF = hepPDF->scalePDF();
35 
36  setPDF(&pdf);
37  }
38 }

References gen::PdfInfo::id, pdf(), gen::PdfInfo::scalePDF, setPDF(), gen::PdfInfo::x, and gen::PdfInfo::xPDF.

◆ GenEventInfoProduct() [3/4]

GenEventInfoProduct::GenEventInfoProduct ( const GenEventInfoProduct other)

Definition at line 40 of file GenEventInfoProduct.cc.

41  : weights_(other.weights_),
42  signalProcessID_(other.signalProcessID_),
43  qScale_(other.qScale_),
44  alphaQCD_(other.alphaQCD_),
45  alphaQED_(other.alphaQED_),
46  binningValues_(other.binningValues_),
47  DJRValues_(other.DJRValues_),
48  nMEPartons_(other.nMEPartons_),
49  nMEPartonsFiltered_(other.nMEPartons_) {
50  setPDF(other.pdf());
51 }

References trackingPlots::other, and setPDF().

◆ GenEventInfoProduct() [4/4]

GenEventInfoProduct::GenEventInfoProduct ( GenEventInfoProduct &&  other)

Definition at line 53 of file GenEventInfoProduct.cc.

54  : weights_(std::move(other.weights_)),
55  signalProcessID_(other.signalProcessID_),
56  qScale_(other.qScale_),
57  alphaQCD_(other.alphaQCD_),
58  alphaQED_(other.alphaQED_),
59  pdf_(other.pdf_.release()),
60  binningValues_(std::move(other.binningValues_)),
61  DJRValues_(std::move(other.DJRValues_)),
62  nMEPartons_(other.nMEPartons_),
63  nMEPartonsFiltered_(other.nMEPartons_) {}

◆ ~GenEventInfoProduct()

GenEventInfoProduct::~GenEventInfoProduct ( )
virtual

Definition at line 65 of file GenEventInfoProduct.cc.

65 {}

Member Function Documentation

◆ alphaQCD()

double GenEventInfoProduct::alphaQCD ( ) const
inline

Definition at line 42 of file GenEventInfoProduct.h.

42 { return alphaQCD_; }

References alphaQCD_.

Referenced by GenParticles2HepMCConverter::produce().

◆ alphaQED()

double GenEventInfoProduct::alphaQED ( ) const
inline

Definition at line 43 of file GenEventInfoProduct.h.

43 { return alphaQED_; }

References alphaQED_.

Referenced by GenParticles2HepMCConverter::produce().

◆ binningValues()

const std::vector<double>& GenEventInfoProduct::binningValues ( ) const
inline

◆ DJRValues()

const std::vector<float>& GenEventInfoProduct::DJRValues ( ) const
inline

Definition at line 51 of file GenEventInfoProduct.h.

51 { return DJRValues_; }

References DJRValues_.

◆ hasBinningValues()

bool GenEventInfoProduct::hasBinningValues ( ) const
inline

Definition at line 49 of file GenEventInfoProduct.h.

49 { return !binningValues_.empty(); }

References binningValues_.

Referenced by JetTester::analyze(), L1GenTreeProducer::analyze(), and JetTester_HeavyIons::analyze().

◆ hasDJRValues()

bool GenEventInfoProduct::hasDJRValues ( ) const
inline

Definition at line 52 of file GenEventInfoProduct.h.

52 { return !DJRValues_.empty(); }

References DJRValues_.

◆ hasPDF()

bool GenEventInfoProduct::hasPDF ( ) const
inline

Definition at line 46 of file GenEventInfoProduct.h.

46 { return pdf() != nullptr; }

References pdf().

◆ nMEPartons()

int GenEventInfoProduct::nMEPartons ( ) const
inline

Definition at line 54 of file GenEventInfoProduct.h.

54 { return nMEPartons_; }

References nMEPartons_.

◆ nMEPartonsFiltered()

int GenEventInfoProduct::nMEPartonsFiltered ( ) const
inline

Definition at line 56 of file GenEventInfoProduct.h.

56 { return nMEPartonsFiltered_; }

References nMEPartonsFiltered_.

◆ operator=() [1/2]

GenEventInfoProduct & GenEventInfoProduct::operator= ( const GenEventInfoProduct other)

Definition at line 67 of file GenEventInfoProduct.cc.

67  {
68  weights_ = other.weights_;
69  signalProcessID_ = other.signalProcessID_;
70  qScale_ = other.qScale_;
71  alphaQCD_ = other.alphaQCD_;
72  alphaQED_ = other.alphaQED_;
73  binningValues_ = other.binningValues_;
74  DJRValues_ = other.DJRValues_;
75  nMEPartons_ = other.nMEPartons_;
76  nMEPartonsFiltered_ = other.nMEPartonsFiltered_;
77 
78  setPDF(other.pdf());
79 
80  return *this;
81 }

References alphaQCD_, alphaQED_, binningValues_, DJRValues_, nMEPartons_, nMEPartonsFiltered_, trackingPlots::other, qScale_, setPDF(), signalProcessID_, and weights_.

◆ operator=() [2/2]

GenEventInfoProduct & GenEventInfoProduct::operator= ( GenEventInfoProduct &&  other)

Definition at line 83 of file GenEventInfoProduct.cc.

83  {
84  weights_ = std::move(other.weights_);
85  signalProcessID_ = other.signalProcessID_;
86  qScale_ = other.qScale_;
87  alphaQCD_ = other.alphaQCD_;
88  alphaQED_ = other.alphaQED_;
89  binningValues_ = std::move(other.binningValues_);
90  DJRValues_ = std::move(other.DJRValues_);
91  nMEPartons_ = other.nMEPartons_;
92  nMEPartonsFiltered_ = other.nMEPartonsFiltered_;
93  pdf_ = std::move(other.pdf_);
94 
95  return *this;
96 }

References alphaQCD_, alphaQED_, binningValues_, DJRValues_, eostools::move(), nMEPartons_, nMEPartonsFiltered_, trackingPlots::other, pdf_, qScale_, signalProcessID_, and weights_.

◆ pdf()

const PDF* GenEventInfoProduct::pdf ( ) const
inline

◆ qScale()

double GenEventInfoProduct::qScale ( ) const
inline

Definition at line 41 of file GenEventInfoProduct.h.

41 { return qScale_; }

References qScale_.

Referenced by RemovePileUpDominatedEventsGen::filter(), and GenParticles2HepMCConverter::produce().

◆ setBinningValues()

void GenEventInfoProduct::setBinningValues ( const std::vector< double > &  values)
inline

Definition at line 68 of file GenEventInfoProduct.h.

References binningValues_, and contentValuesCheck::values.

◆ setDJR()

void GenEventInfoProduct::setDJR ( const std::vector< float > &  values)
inline

Definition at line 70 of file GenEventInfoProduct.h.

70 { DJRValues_ = values; }

References DJRValues_, and contentValuesCheck::values.

◆ setNMEPartons()

void GenEventInfoProduct::setNMEPartons ( int  n)
inline

Definition at line 72 of file GenEventInfoProduct.h.

72 { nMEPartons_ = n; }

References dqmiodumpmetadata::n, and nMEPartons_.

◆ setNMEPartonsFiltered()

void GenEventInfoProduct::setNMEPartonsFiltered ( int  n)
inline

Definition at line 74 of file GenEventInfoProduct.h.

References dqmiodumpmetadata::n, and nMEPartonsFiltered_.

◆ setPDF()

void GenEventInfoProduct::setPDF ( const PDF pdf)
inline

Definition at line 66 of file GenEventInfoProduct.h.

66 { pdf_.reset(pdf ? new PDF(*pdf) : nullptr); }

References pdf(), and pdf_.

Referenced by GenEventInfoProduct(), and operator=().

◆ setScales()

void GenEventInfoProduct::setScales ( double  q = -1.,
double  qcd = -1.,
double  qed = -1. 
)
inline

Definition at line 64 of file GenEventInfoProduct.h.

64 { qScale_ = q, alphaQCD_ = qcd, alphaQED_ = qed; }

References alphaQCD_, alphaQED_, submitPVResolutionJobs::q, and qScale_.

◆ setSignalProcessID()

void GenEventInfoProduct::setSignalProcessID ( unsigned int  procID)
inline

Definition at line 62 of file GenEventInfoProduct.h.

62 { signalProcessID_ = procID; }

References signalProcessID_.

◆ setWeights()

void GenEventInfoProduct::setWeights ( const std::vector< double > &  weights)
inline

Definition at line 60 of file GenEventInfoProduct.h.

60 { weights_ = weights; }

References weights(), and weights_.

◆ signalProcessID()

unsigned int GenEventInfoProduct::signalProcessID ( ) const
inline

Definition at line 39 of file GenEventInfoProduct.h.

39 { return signalProcessID_; }

References signalProcessID_.

Referenced by GenParticles2HepMCConverter::produce().

◆ weight()

double GenEventInfoProduct::weight ( ) const
inline

◆ weightProduct()

double GenEventInfoProduct::weightProduct ( ) const

Definition at line 98 of file GenEventInfoProduct.cc.

98  {
99  return std::accumulate(weights_.begin(), weights_.end(), 1., std::multiplies<double>());
100 }

References weights_.

◆ weights() [1/2]

std::vector<double>& GenEventInfoProduct::weights ( )
inline

◆ weights() [2/2]

const std::vector<double>& GenEventInfoProduct::weights ( ) const
inline

Definition at line 33 of file GenEventInfoProduct.h.

33 { return weights_; }

References weights_.

Member Data Documentation

◆ alphaQCD_

double GenEventInfoProduct::alphaQCD_
private

Definition at line 85 of file GenEventInfoProduct.h.

Referenced by alphaQCD(), operator=(), and setScales().

◆ alphaQED_

double GenEventInfoProduct::alphaQED_
private

Definition at line 85 of file GenEventInfoProduct.h.

Referenced by alphaQED(), operator=(), and setScales().

◆ binningValues_

std::vector<double> GenEventInfoProduct::binningValues_
private

Definition at line 97 of file GenEventInfoProduct.h.

Referenced by binningValues(), hasBinningValues(), operator=(), and setBinningValues().

◆ DJRValues_

std::vector<float> GenEventInfoProduct::DJRValues_
private

Definition at line 98 of file GenEventInfoProduct.h.

Referenced by DJRValues(), hasDJRValues(), operator=(), and setDJR().

◆ nMEPartons_

int GenEventInfoProduct::nMEPartons_
private

Definition at line 99 of file GenEventInfoProduct.h.

Referenced by nMEPartons(), operator=(), and setNMEPartons().

◆ nMEPartonsFiltered_

int GenEventInfoProduct::nMEPartonsFiltered_
private

Definition at line 100 of file GenEventInfoProduct.h.

Referenced by nMEPartonsFiltered(), operator=(), and setNMEPartonsFiltered().

◆ pdf_

std::unique_ptr<PDF> GenEventInfoProduct::pdf_
private

Definition at line 88 of file GenEventInfoProduct.h.

Referenced by operator=(), pdf(), and setPDF().

◆ qScale_

double GenEventInfoProduct::qScale_
private

Definition at line 84 of file GenEventInfoProduct.h.

Referenced by operator=(), qScale(), and setScales().

◆ signalProcessID_

unsigned int GenEventInfoProduct::signalProcessID_
private

Definition at line 81 of file GenEventInfoProduct.h.

Referenced by operator=(), setSignalProcessID(), and signalProcessID().

◆ weights_

std::vector<double> GenEventInfoProduct::weights_
private

Definition at line 78 of file GenEventInfoProduct.h.

Referenced by operator=(), setWeights(), weight(), weightProduct(), and weights().

GenEventInfoProduct::alphaQED_
double alphaQED_
Definition: GenEventInfoProduct.h:85
GenEventInfoProduct::PDF
gen::PdfInfo PDF
Definition: GenEventInfoProduct.h:28
GenEventInfoProduct::qScale_
double qScale_
Definition: GenEventInfoProduct.h:84
GenEventInfoProduct::pdf
const PDF * pdf() const
Definition: GenEventInfoProduct.h:45
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
gen::PdfInfo::x
std::pair< double, double > x
Definition: PdfInfo.h:13
GenEventInfoProduct::DJRValues_
std::vector< float > DJRValues_
Definition: GenEventInfoProduct.h:98
GenEventInfoProduct::binningValues_
std::vector< double > binningValues_
Definition: GenEventInfoProduct.h:97
GenEventInfoProduct::weights_
std::vector< double > weights_
Definition: GenEventInfoProduct.h:78
GenEventInfoProduct::alphaQCD_
double alphaQCD_
Definition: GenEventInfoProduct.h:85
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
gen::PdfInfo::xPDF
std::pair< double, double > xPDF
Definition: PdfInfo.h:14
GenEventInfoProduct::signalProcessID_
unsigned int signalProcessID_
Definition: GenEventInfoProduct.h:81
trackingPlots.other
other
Definition: trackingPlots.py:1467
submitPVResolutionJobs.q
q
Definition: submitPVResolutionJobs.py:84
GenEventInfoProduct::nMEPartons_
int nMEPartons_
Definition: GenEventInfoProduct.h:99
gen::PdfInfo::scalePDF
double scalePDF
Definition: PdfInfo.h:15
eostools.move
def move(src, dest)
Definition: eostools.py:511
GenEventInfoProduct::pdf_
std::unique_ptr< PDF > pdf_
Definition: GenEventInfoProduct.h:88
gen::PdfInfo::id
std::pair< int, int > id
Definition: PdfInfo.h:12
GenEventInfoProduct::nMEPartonsFiltered_
int nMEPartonsFiltered_
Definition: GenEventInfoProduct.h:100
GenEventInfoProduct::weights
std::vector< double > & weights()
Definition: GenEventInfoProduct.h:32
GenEventInfoProduct::setPDF
void setPDF(const PDF *pdf)
Definition: GenEventInfoProduct.h:66