CMS 3D CMS Logo

List of all members | Public Member Functions
MixingWorker Class Reference

#include <MixingWorker.h>

Public Member Functions

template<>
void addPileups (const EventPrincipal &ep, ModuleCallingContext const *mcc, unsigned int eventNr)
 
template<>
void addPileups (const EventPrincipal &ep, ModuleCallingContext const *, unsigned int eventNr)
 
template<>
void addSignals (const Event &e)
 
template<>
bool checkSignal (const Event &e)
 

Detailed Description

MixingWorker is an auxiliary class for the MixingModule

Author
Ursula Berthon, LLR Palaiseau
Version
1st Version JMarch 2008

Member Function Documentation

template<>
void MixingWorker< HepMCProduct >::addPileups ( const EventPrincipal &  ep,
ModuleCallingContext const *  mcc,
unsigned int  eventNr 
)

Definition at line 12 of file MixingWorker.cc.

References LogDebug, and GlobalPosition_Frontier_DevDB_cff::tag.

12  {
13  // HepMCProduct does not come as a vector....
14  for(InputTag const& tag : allTags_) {
15  std::shared_ptr<Wrapper<HepMCProduct> const> shPtr = getProductByTag<HepMCProduct>(ep, tag, mcc);
16  if(shPtr) {
17  LogDebug("MixingModule") << "HepMC pileup objects added, eventNr " << eventNr << " Tag " << tag << std::endl;
18  crFrame_->setPileupPtr(shPtr);
19  crFrame_->addPileups(*shPtr->product());
20  break;
21  }
22  }
23  }
#define LogDebug(id)
template<>
void MixingWorker< HepMCProduct >::addPileups ( const EventPrincipal &  ep,
ModuleCallingContext const *  ,
unsigned int  eventNr 
)
template<>
void MixingWorker< HepMCProduct >::addSignals ( const Event e)

Definition at line 26 of file MixingWorker.cc.

References LogDebug, and GlobalPosition_Frontier_DevDB_cff::tag.

26  {
27  //HepMC - here the interface is different!!!
28  bool got = false;
29  Handle<HepMCProduct> result_t;
30  for(InputTag const& tag : allTags_) {
31  got = e.getByLabel(tag, result_t);
32  if (got) {
33  LogDebug("MixingModule") << "adding HepMCProduct from signal event with " << tag;
34  crFrame_->addSignals(result_t.product(), e.id());
35  break;
36  }
37  }
38  if(!got) {
39  LogInfo("MixingModule") << "!!!!!!! Did not get any signal data for HepMCProduct with " << allTags_[0];
40  }
41  }
#define LogDebug(id)
template<>
bool MixingWorker< HepMCProduct >::checkSignal ( const Event e)

Definition at line 44 of file MixingWorker.cc.

References lumiQTWidget::t, and GlobalPosition_Frontier_DevDB_cff::tag.

44  {
45  bool got = false;
46  Handle<HepMCProduct> result_t;
47  for(InputTag const& tag : allTags_) {
48  got = e.getByLabel(tag, result_t);
49  if(got) {
50  InputTag t = InputTag(tag.label(), tag.instance());
51  LogInfo("MixingModule") <<" Will create a CrossingFrame for HepMCProduct with "
52  << " with InputTag= "<< t.encode();
53  break;
54  }
55  }
56  return got;
57  }