CMS 3D CMS Logo

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

#include <RivetAnalyzer.h>

Inheritance diagram for RivetAnalyzer:
edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources > edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void beginJob () override
 
void beginLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 
void beginRun (const edm::Run &, const edm::EventSetup &) override
 
void endJob () override
 List of registered analysis data objects. More...
 
void endLuminosityBlock (const edm::LuminosityBlock &, const edm::EventSetup &) override
 
void endRun (const edm::Run &, const edm::EventSetup &) override
 
 RivetAnalyzer (const edm::ParameterSet &)
 
 ~RivetAnalyzer () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks, edm::one::SharedResources >
 EDAnalyzer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=default
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void normalizeTree ()
 

Private Attributes

std::unique_ptr< Rivet::AnalysisHandler > _analysisHandler
 
std::vector< std::string > _analysisNames
 
std::vector< std::string > _cleanedWeightNames
 
std::string _deselectMultiWeights
 
bool _doFinalize
 
edm::EDGetTokenT< GenEventInfoProduct_genEventInfoCollection
 
edm::EDGetTokenT< GenLumiInfoHeader_genLumiInfoToken
 
edm::EDGetTokenT< edm::HepMCProduct_hepmcCollection
 
bool _isFirstEvent
 
edm::EDGetTokenT< LHEEventProduct_LHECollection
 
const edm::InputTag _lheLabel
 
edm::EDGetTokenT< LHERunInfoProduct_lheRunInfoToken
 
std::vector< std::string > _lheWeightNames
 
std::vector< MonitorElement * > _mes
 
double _NLOSmearing
 
std::string _outFileName
 
bool _produceDQM
 
std::string _selectMultiWeights
 
std::string _setNominalWeightName
 
bool _skipMultiWeights
 
bool _useLHEweights
 
double _weightCap
 
std::vector< std::string > _weightNames
 
double _xsection
 
DQMStoredbe
 

Additional Inherited Members

- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag) noexcept
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 

Detailed Description

Definition at line 22 of file RivetAnalyzer.h.

Member Typedef Documentation

◆ DQMStore

Definition at line 25 of file RivetAnalyzer.h.

◆ MonitorElement

Definition at line 26 of file RivetAnalyzer.h.

Constructor & Destructor Documentation

◆ RivetAnalyzer()

RivetAnalyzer::RivetAnalyzer ( const edm::ParameterSet pset)

Definition at line 19 of file RivetAnalyzer.cc.

20  : _isFirstEvent(true),
21  _outFileName(pset.getParameter<std::string>("OutputFile")),
22  _analysisNames(pset.getParameter<std::vector<std::string> >("AnalysisNames")),
23  //decide whether to finalize the plots or not.
24  //deciding not to finalize them can be useful for further harvesting of many jobs
25  _doFinalize(pset.getParameter<bool>("DoFinalize")),
26  _produceDQM(pset.getParameter<bool>("ProduceDQMOutput")),
27  _lheLabel(pset.getParameter<edm::InputTag>("LHECollection")),
28  _xsection(-1.) {
29  usesResource("Rivet");
30 
31  _hepmcCollection = consumes<HepMCProduct>(pset.getParameter<edm::InputTag>("HepMCCollection"));
32  _genLumiInfoToken = consumes<GenLumiInfoHeader, edm::InLumi>(pset.getParameter<edm::InputTag>("genLumiInfo"));
33 
34  _useLHEweights = pset.getParameter<bool>("useLHEweights");
35  if (_useLHEweights) {
36  _lheRunInfoToken = consumes<LHERunInfoProduct, edm::InRun>(_lheLabel);
37  _LHECollection = consumes<LHEEventProduct>(_lheLabel);
38  }
39 
40  _weightCap = pset.getParameter<double>("weightCap");
41  _NLOSmearing = pset.getParameter<double>("NLOSmearing");
42  _skipMultiWeights = pset.getParameter<bool>("skipMultiWeights");
43  _selectMultiWeights = pset.getParameter<std::string>("selectMultiWeights");
44  _deselectMultiWeights = pset.getParameter<std::string>("deselectMultiWeights");
45  _setNominalWeightName = pset.getParameter<std::string>("setNominalWeightName");
46 
47  //set user cross section if needed
48  _xsection = pset.getParameter<double>("CrossSection");
49 
50  if (_produceDQM) {
51  // book stuff needed for DQM
52  dbe = nullptr;
53  dbe = edm::Service<DQMStore>().operator->();
54  }
55 }

References _deselectMultiWeights, _genLumiInfoToken, _hepmcCollection, _LHECollection, _lheLabel, _lheRunInfoToken, _NLOSmearing, _produceDQM, _selectMultiWeights, _setNominalWeightName, _skipMultiWeights, _useLHEweights, _weightCap, _xsection, dbe, muonDTDigis_cfi::pset, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ ~RivetAnalyzer()

RivetAnalyzer::~RivetAnalyzer ( )
override

Definition at line 57 of file RivetAnalyzer.cc.

57 {}

Member Function Documentation

◆ analyze()

void RivetAnalyzer::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overridevirtual

Set analysis handler weight options

Implements edm::one::EDAnalyzerBase.

Definition at line 118 of file RivetAnalyzer.cc.

118  {
119  //finalize weight names on the first event
120  if (_isFirstEvent) {
121  if (_useLHEweights) {
122  _weightNames.insert(_weightNames.end(), _lheWeightNames.begin(), _lheWeightNames.end());
123  }
124  // clean weight names to be accepted by Rivet plotting
125  for (const std::string& wn : _weightNames) {
126  _cleanedWeightNames.push_back(std::regex_replace(wn, std::regex("[^A-Za-z\\d\\._=]"), "_"));
127  }
128  }
129 
130  //get the hepmc product from the event
132  iEvent.getByToken(_hepmcCollection, evt);
133 
134  // get HepMC GenEvent
135  const HepMC::GenEvent* myGenEvent = evt->GetEvent();
136  std::unique_ptr<HepMC::GenEvent> tmpGenEvtPtr;
137  //if you want to use an external weight or set the cross section we have to clone the GenEvent and change the weight
138  tmpGenEvtPtr = std::make_unique<HepMC::GenEvent>(*(evt->GetEvent()));
139 
140  if (_xsection > 0) {
141  HepMC::GenCrossSection xsec;
142  xsec.set_cross_section(_xsection);
143  tmpGenEvtPtr->set_cross_section(xsec);
144  }
145 
146  std::vector<double> mergedWeights;
147  for (unsigned int i = 0; i < tmpGenEvtPtr->weights().size(); i++) {
148  mergedWeights.push_back(tmpGenEvtPtr->weights()[i]);
149  }
150 
151  if (_useLHEweights) {
152  edm::Handle<LHEEventProduct> lheEventHandle;
153  iEvent.getByToken(_LHECollection, lheEventHandle);
154  for (unsigned int i = 0; i < _lheWeightNames.size(); i++) {
155  mergedWeights.push_back(tmpGenEvtPtr->weights()[0] * lheEventHandle->weights().at(i).wgt /
156  lheEventHandle->originalXWGTUP());
157  }
158  }
159 
160  tmpGenEvtPtr->weights().clear();
161  for (unsigned int i = 0; i < _cleanedWeightNames.size(); i++) {
162  tmpGenEvtPtr->weights()[_cleanedWeightNames[i]] = mergedWeights[i];
163  }
164  myGenEvent = tmpGenEvtPtr.get();
165 
166  //apply the beams initialization on the first event
167  if (_isFirstEvent) {
168  _analysisHandler = std::make_unique<Rivet::AnalysisHandler>();
169  _analysisHandler->addAnalyses(_analysisNames);
170 
172  _analysisHandler->skipMultiWeights(_skipMultiWeights);
173  _analysisHandler->selectMultiWeights(_selectMultiWeights);
174  _analysisHandler->deselectMultiWeights(_deselectMultiWeights);
175  _analysisHandler->setNominalWeightName(_setNominalWeightName);
176  _analysisHandler->setWeightCap(_weightCap);
177  _analysisHandler->setNLOSmearing(_NLOSmearing);
178 
179  _analysisHandler->init(*myGenEvent);
180 
181  _isFirstEvent = false;
182  }
183 
184  //run the analysis
185  _analysisHandler->analyze(*myGenEvent);
186 }

References _analysisHandler, _analysisNames, _cleanedWeightNames, _deselectMultiWeights, _hepmcCollection, _isFirstEvent, _LHECollection, _lheWeightNames, _NLOSmearing, _selectMultiWeights, _setNominalWeightName, _skipMultiWeights, _useLHEweights, _weightCap, _weightNames, _xsection, edm::HepMCProduct::GetEvent(), mps_fire::i, iEvent, LHEEventProduct::originalXWGTUP(), AlCaHLTBitMon_QueryRunRegistry::string, and LHEEventProduct::weights().

◆ beginJob()

void RivetAnalyzer::beginJob ( void  )
overridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 59 of file RivetAnalyzer.cc.

59  {
60  //set the environment, very ugly but rivet is monolithic when it comes to paths
61  char* cmsswbase = std::getenv("CMSSW_BASE");
62  char* cmsswrelease = std::getenv("CMSSW_RELEASE_BASE");
63  if (!std::getenv("RIVET_REF_PATH")) {
64  const std::string rivetref = "RIVET_REF_PATH=" + string(cmsswbase) +
65  "/src/GeneratorInterface/RivetInterface/data:" + string(cmsswrelease) +
66  "/src/GeneratorInterface/RivetInterface/data";
67  char* rivetrefCstr = strdup(rivetref.c_str());
68  putenv(rivetrefCstr);
69  free(rivetrefCstr);
70  }
71  if (!std::getenv("RIVET_INFO_PATH")) {
72  const std::string rivetinfo = "RIVET_INFO_PATH=" + string(cmsswbase) +
73  "/src/GeneratorInterface/RivetInterface/data:" + string(cmsswrelease) +
74  "/src/GeneratorInterface/RivetInterface/data";
75  char* rivetinfoCstr = strdup(rivetinfo.c_str());
76  putenv(rivetinfoCstr);
77  free(rivetinfoCstr);
78  }
79 }

References SiStripCommissioningSource_FromEDM_cfg::cmsswbase, and AlCaHLTBitMon_QueryRunRegistry::string.

◆ beginLuminosityBlock()

void RivetAnalyzer::beginLuminosityBlock ( const edm::LuminosityBlock iLumi,
const edm::EventSetup iSetup 
)
override

Definition at line 102 of file RivetAnalyzer.cc.

102  {
103  edm::Handle<GenLumiInfoHeader> genLumiInfoHandle;
104  if (iLumi.getByToken(_genLumiInfoToken, genLumiInfoHandle)) {
105  _weightNames = genLumiInfoHandle->weightNames();
106  }
107 
108  // need to reset the default weight name (or plotting will fail)
109  if (!_weightNames.empty()) {
110  _weightNames[0] = "";
111  } else { // Summer16 samples have 1 weight stored in HepMC but no weightNames
112  _weightNames.push_back("");
113  }
114 }

References _genLumiInfoToken, _weightNames, edm::LuminosityBlock::getByToken(), and GenLumiInfoHeader::weightNames().

◆ beginRun()

void RivetAnalyzer::beginRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
override

Definition at line 81 of file RivetAnalyzer.cc.

81  {
82  if (_useLHEweights) {
83  edm::Handle<LHERunInfoProduct> lheRunInfoHandle;
84  iRun.getByLabel(_lheLabel, lheRunInfoHandle);
85  typedef std::vector<LHERunInfoProduct::Header>::const_iterator headers_const_iterator;
86 
87  std::regex reg("<weight.*> ?(.*?) ?<\\/weight>");
88  for (headers_const_iterator iter = lheRunInfoHandle->headers_begin(); iter != lheRunInfoHandle->headers_end();
89  iter++) {
90  std::vector<std::string> lines = iter->lines();
91  for (unsigned int iLine = 0; iLine < lines.size(); iLine++) {
92  std::smatch match;
93  std::regex_search(lines.at(iLine), match, reg);
94  if (!match.empty()) {
95  _lheWeightNames.push_back(match[1]);
96  }
97  }
98  }
99  }
100 }

References _lheLabel, _lheWeightNames, _useLHEweights, edm::Run::getByLabel(), LHERunInfoProduct::headers_begin(), LHERunInfoProduct::headers_end(), groupFilesInBlocks::lines, and match().

◆ endJob()

void RivetAnalyzer::endJob ( void  )
overridevirtual

List of registered analysis data objects.

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 207 of file RivetAnalyzer.cc.

207 {}

◆ endLuminosityBlock()

void RivetAnalyzer::endLuminosityBlock ( const edm::LuminosityBlock iLumi,
const edm::EventSetup iSetup 
)
override

Definition at line 116 of file RivetAnalyzer.cc.

116 { return; }

◆ endRun()

void RivetAnalyzer::endRun ( const edm::Run iRun,
const edm::EventSetup iSetup 
)
override

Definition at line 188 of file RivetAnalyzer.cc.

188  {
189  if (_doFinalize)
190  _analysisHandler->finalize();
191  else {
192  //if we don't finalize we just want to do the transformation from histograms to DPS
194  //normalizeTree();
195  }
196  _analysisHandler->writeData(_outFileName);
197 
198  return;
199 }

References _analysisHandler, _doFinalize, and _outFileName.

◆ normalizeTree()

void RivetAnalyzer::normalizeTree ( )
private

Definition at line 209 of file RivetAnalyzer.cc.

209  {
210  using namespace YODA;
211  std::vector<string> analyses = _analysisHandler->analysisNames();
212 
213  //tree.ls(".", true);
214  const string tmpdir = "/RivetNormalizeTmp";
215  //tree.mkdir(tmpdir);
216  for (const string& analysis : analyses) {
217  if (_produceDQM) {
218  dbe->setCurrentFolder("Rivet/" + analysis);
219  //global variables that are always present
220  //sumOfWeights
221  TH1F nevent("nEvt", "n analyzed Events", 1, 0., 1.);
222  nevent.SetBinContent(1, _analysisHandler->sumW());
223  _mes.push_back(dbe->book1D("nEvt", &nevent));
224  }
225  //cross section
226  //TH1F xsection("xSection", "Cross Section", 1, 0., 1.);
227  //xsection.SetBinContent(1,_analysisHandler->crossSection());
228  //_mes.push_back(dbe->book1D("xSection",&xsection));
229  //now loop over the histograms
230 
231  /*
232  const vector<string> paths = tree.listObjectNames("/"+analysis, true); // args set recursive listing
233  std::cout << "Number of objects in YODA tree for analysis " << analysis << " = " << paths.size() << std::endl;
234  foreach (const string& path, paths) {
235  IManagedObject* hobj = tree.find(path);
236  if (hobj) {
237  // Weird seg fault on SLC4 when trying to dyn cast an IProfile ptr to a IHistogram
238  // Fix by attempting to cast to IProfile first, only try IHistogram if it fails.
239  IHistogram1D* histo = 0;
240  IProfile1D* prof = dynamic_cast<IProfile1D*>(hobj);
241  if (!prof) histo = dynamic_cast<IHistogram1D*>(hobj);
242 
243  std::cout << "Converting histo " << path << " to DPS" << std::endl;
244  tree.mv(path, tmpdir);
245  const size_t lastslash = path.find_last_of("/");
246  const string basename = path.substr(lastslash+1, path.length() - (lastslash+1));
247  const string tmppath = tmpdir + "/" + basename;
248 
249  // If it's a normal histo:
250  if (histo) {
251  IHistogram1D* tmphisto = dynamic_cast<IHistogram1D*>(tree.find(tmppath));
252  if (tmphisto) {
253  _analysisHandler->datapointsetFactory().create(path, *tmphisto);
254  }
255  //now convert to root and then ME
256  //need aida2flat (from Rivet 1.X) & flat2root here
257  TH1F* h = aida2root<IHistogram1D, TH1F>(histo, basename);
258  if (_produceDQM)
259  _mes.push_back(dbe->book1D(h->GetName(), h));
260  delete h;
261  tree.rm(tmppath);
262  }
263  // If it's a profile histo:
264  else if (prof) {
265  IProfile1D* tmpprof = dynamic_cast<IProfile1D*>(tree.find(tmppath));
266  if (tmpprof) {
267  _analysisHandler->datapointsetFactory().create(path, *tmpprof);
268  }
269  //now convert to root and then ME
270  //need aida2flat (from Rivet 1.X) & flat2root here
271  TProfile* p = aida2root<IProfile1D, TProfile>(prof, basename);
272  if (_produceDQM)
273  _mes.push_back(dbe->bookProfile(p->GetName(), p));
274  delete p;
275  tree.rm(tmppath);
276  }
277  }
278  }
279  */
280  }
281  //tree.rmdir(tmpdir);
282 }

References _analysisHandler, _mes, _produceDQM, hltExoticaValidator_cfi::analyses, dqm::implementation::IBooker::book1D(), dbe, nevent, and dqm::implementation::DQMStore::setCurrentFolder().

Member Data Documentation

◆ _analysisHandler

std::unique_ptr<Rivet::AnalysisHandler> RivetAnalyzer::_analysisHandler
private

Definition at line 61 of file RivetAnalyzer.h.

Referenced by analyze(), endRun(), and normalizeTree().

◆ _analysisNames

std::vector<std::string> RivetAnalyzer::_analysisNames
private

Definition at line 64 of file RivetAnalyzer.h.

Referenced by analyze().

◆ _cleanedWeightNames

std::vector<std::string> RivetAnalyzer::_cleanedWeightNames
private

Definition at line 71 of file RivetAnalyzer.h.

Referenced by analyze().

◆ _deselectMultiWeights

std::string RivetAnalyzer::_deselectMultiWeights
private

Definition at line 55 of file RivetAnalyzer.h.

Referenced by analyze(), and RivetAnalyzer().

◆ _doFinalize

bool RivetAnalyzer::_doFinalize
private

Definition at line 65 of file RivetAnalyzer.h.

Referenced by endRun().

◆ _genEventInfoCollection

edm::EDGetTokenT<GenEventInfoProduct> RivetAnalyzer::_genEventInfoCollection
private

Definition at line 58 of file RivetAnalyzer.h.

◆ _genLumiInfoToken

edm::EDGetTokenT<GenLumiInfoHeader> RivetAnalyzer::_genLumiInfoToken
private

Definition at line 59 of file RivetAnalyzer.h.

Referenced by beginLuminosityBlock(), and RivetAnalyzer().

◆ _hepmcCollection

edm::EDGetTokenT<edm::HepMCProduct> RivetAnalyzer::_hepmcCollection
private

Definition at line 49 of file RivetAnalyzer.h.

Referenced by analyze(), and RivetAnalyzer().

◆ _isFirstEvent

bool RivetAnalyzer::_isFirstEvent
private

Definition at line 62 of file RivetAnalyzer.h.

Referenced by analyze().

◆ _LHECollection

edm::EDGetTokenT<LHEEventProduct> RivetAnalyzer::_LHECollection
private

Definition at line 57 of file RivetAnalyzer.h.

Referenced by analyze(), and RivetAnalyzer().

◆ _lheLabel

const edm::InputTag RivetAnalyzer::_lheLabel
private

Definition at line 67 of file RivetAnalyzer.h.

Referenced by beginRun(), and RivetAnalyzer().

◆ _lheRunInfoToken

edm::EDGetTokenT<LHERunInfoProduct> RivetAnalyzer::_lheRunInfoToken
private

Definition at line 60 of file RivetAnalyzer.h.

Referenced by RivetAnalyzer().

◆ _lheWeightNames

std::vector<std::string> RivetAnalyzer::_lheWeightNames
private

Definition at line 70 of file RivetAnalyzer.h.

Referenced by analyze(), and beginRun().

◆ _mes

std::vector<MonitorElement *> RivetAnalyzer::_mes
private

Definition at line 74 of file RivetAnalyzer.h.

Referenced by normalizeTree().

◆ _NLOSmearing

double RivetAnalyzer::_NLOSmearing
private

Definition at line 52 of file RivetAnalyzer.h.

Referenced by analyze(), and RivetAnalyzer().

◆ _outFileName

std::string RivetAnalyzer::_outFileName
private

Definition at line 63 of file RivetAnalyzer.h.

Referenced by endRun().

◆ _produceDQM

bool RivetAnalyzer::_produceDQM
private

Definition at line 66 of file RivetAnalyzer.h.

Referenced by normalizeTree(), and RivetAnalyzer().

◆ _selectMultiWeights

std::string RivetAnalyzer::_selectMultiWeights
private

Definition at line 54 of file RivetAnalyzer.h.

Referenced by analyze(), and RivetAnalyzer().

◆ _setNominalWeightName

std::string RivetAnalyzer::_setNominalWeightName
private

Definition at line 56 of file RivetAnalyzer.h.

Referenced by analyze(), and RivetAnalyzer().

◆ _skipMultiWeights

bool RivetAnalyzer::_skipMultiWeights
private

Definition at line 53 of file RivetAnalyzer.h.

Referenced by analyze(), and RivetAnalyzer().

◆ _useLHEweights

bool RivetAnalyzer::_useLHEweights
private

Definition at line 50 of file RivetAnalyzer.h.

Referenced by analyze(), beginRun(), and RivetAnalyzer().

◆ _weightCap

double RivetAnalyzer::_weightCap
private

Definition at line 51 of file RivetAnalyzer.h.

Referenced by analyze(), and RivetAnalyzer().

◆ _weightNames

std::vector<std::string> RivetAnalyzer::_weightNames
private

Definition at line 69 of file RivetAnalyzer.h.

Referenced by analyze(), and beginLuminosityBlock().

◆ _xsection

double RivetAnalyzer::_xsection
private

Definition at line 68 of file RivetAnalyzer.h.

Referenced by analyze(), and RivetAnalyzer().

◆ dbe

DQMStore* RivetAnalyzer::dbe
private

Definition at line 73 of file RivetAnalyzer.h.

Referenced by normalizeTree(), and RivetAnalyzer().

RivetAnalyzer::_cleanedWeightNames
std::vector< std::string > _cleanedWeightNames
Definition: RivetAnalyzer.h:71
nevent
int nevent
Definition: AMPTWrapper.h:84
mps_fire.i
i
Definition: mps_fire.py:428
RivetAnalyzer::_lheRunInfoToken
edm::EDGetTokenT< LHERunInfoProduct > _lheRunInfoToken
Definition: RivetAnalyzer.h:60
RivetAnalyzer::_xsection
double _xsection
Definition: RivetAnalyzer.h:68
RivetAnalyzer::_useLHEweights
bool _useLHEweights
Definition: RivetAnalyzer.h:50
LHEEventProduct::originalXWGTUP
double originalXWGTUP() const
Definition: LHEEventProduct.h:34
RivetAnalyzer::_doFinalize
bool _doFinalize
Definition: RivetAnalyzer.h:65
RivetAnalyzer::_genLumiInfoToken
edm::EDGetTokenT< GenLumiInfoHeader > _genLumiInfoToken
Definition: RivetAnalyzer.h:59
RivetAnalyzer::_isFirstEvent
bool _isFirstEvent
Definition: RivetAnalyzer.h:62
LHERunInfoProduct::headers_end
headers_const_iterator headers_end() const
Definition: LHERunInfoProduct.h:59
RivetAnalyzer::_lheWeightNames
std::vector< std::string > _lheWeightNames
Definition: RivetAnalyzer.h:70
edm::Handle
Definition: AssociativeIterator.h:50
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
RivetAnalyzer::_skipMultiWeights
bool _skipMultiWeights
Definition: RivetAnalyzer.h:53
LHERunInfoProduct::headers_begin
headers_const_iterator headers_begin() const
Definition: LHERunInfoProduct.h:58
edm::LuminosityBlock::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: LuminosityBlock.h:319
GenLumiInfoHeader::weightNames
const std::vector< std::string > & weightNames() const
Definition: GenLumiInfoHeader.h:25
dqm::implementation::DQMStore::setCurrentFolder
void setCurrentFolder(std::string const &fullpath) override
Definition: DQMStore.h:569
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
groupFilesInBlocks.lines
lines
Definition: groupFilesInBlocks.py:95
RivetAnalyzer::_hepmcCollection
edm::EDGetTokenT< edm::HepMCProduct > _hepmcCollection
Definition: RivetAnalyzer.h:49
RivetAnalyzer::_mes
std::vector< MonitorElement * > _mes
Definition: RivetAnalyzer.h:74
match
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
RivetAnalyzer::_NLOSmearing
double _NLOSmearing
Definition: RivetAnalyzer.h:52
LHEEventProduct::weights
const std::vector< WGT > & weights() const
Definition: LHEEventProduct.h:35
edm::Service
Definition: Service.h:30
iEvent
int iEvent
Definition: GenABIO.cc:224
hltExoticaValidator_cfi.analyses
analyses
Definition: hltExoticaValidator_cfi.py:54
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:34
RivetAnalyzer::_lheLabel
const edm::InputTag _lheLabel
Definition: RivetAnalyzer.h:67
RivetAnalyzer::dbe
DQMStore * dbe
Definition: RivetAnalyzer.h:73
RivetAnalyzer::_analysisNames
std::vector< std::string > _analysisNames
Definition: RivetAnalyzer.h:64
RivetAnalyzer::_analysisHandler
std::unique_ptr< Rivet::AnalysisHandler > _analysisHandler
Definition: RivetAnalyzer.h:61
RivetAnalyzer::_weightNames
std::vector< std::string > _weightNames
Definition: RivetAnalyzer.h:69
RivetAnalyzer::_produceDQM
bool _produceDQM
Definition: RivetAnalyzer.h:66
RivetAnalyzer::_LHECollection
edm::EDGetTokenT< LHEEventProduct > _LHECollection
Definition: RivetAnalyzer.h:57
edm::Run::getByLabel
bool getByLabel(std::string const &label, Handle< PROD > &result) const
Definition: Run.h:281
RivetAnalyzer::_deselectMultiWeights
std::string _deselectMultiWeights
Definition: RivetAnalyzer.h:55
RivetAnalyzer::_weightCap
double _weightCap
Definition: RivetAnalyzer.h:51
edm::InputTag
Definition: InputTag.h:15
RivetAnalyzer::_outFileName
std::string _outFileName
Definition: RivetAnalyzer.h:63
RivetAnalyzer::_setNominalWeightName
std::string _setNominalWeightName
Definition: RivetAnalyzer.h:56
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
dqm::implementation::IBooker::book1D
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
RivetAnalyzer::_selectMultiWeights
std::string _selectMultiWeights
Definition: RivetAnalyzer.h:54
SiStripCommissioningSource_FromEDM_cfg.cmsswbase
cmsswbase
Definition: SiStripCommissioningSource_FromEDM_cfg.py:7