CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
MixingWorker Class Reference

#include <MixingWorker.h>

Public Member Functions

template<>
void addPileups (const int bcr, const EventPrincipal &ep, unsigned int eventNr, int vertexoffset)
 
template<>
void addPileups (const int bcr, const EventPrincipal &ep, unsigned int eventNr, int vertexoffset)
 
template<>
void addPileups (const int bcr, const EventPrincipal &ep, unsigned int eventNr, int vertexoffset)
 
template<>
void addPileups (const int bcr, const EventPrincipal &ep, unsigned int eventNr, int vertexoffset)
 
template<>
void addPileups (const int bcr, const EventPrincipal &ep, unsigned int eventNr, int vertexoffset)
 
template<>
void addPileups (const int bcr, const EventPrincipal &ep, unsigned int eventNr, int vertexoffset)
 
template<>
void addPileups (const int bcr, const EventPrincipal &ep, unsigned int eventNr, int vertexoffset)
 
template<>
void addPileups (const int bcr, const EventPrincipal &ep, unsigned int eventNr, int vertexoffset)
 
template<>
void addPileups (const int bcr, const EventPrincipal &ep, unsigned int eventNr, int vertexoffset)
 
template<>
void addPileups (const int bcr, const EventPrincipal &ep, unsigned int eventNr, int vertexoffset)
 
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< PCaloHit >::addPileups ( const int  bcr,
const EventPrincipal &  ep,
unsigned int  eventNr,
int  vertexoffset 
)

Definition at line 12 of file MixingWorker.cc.

References LogDebug.

12  {
13 
14  boost::shared_ptr<Wrapper<std::vector<PCaloHit> > const> shPtr = edm::getProductByTag<std::vector<PCaloHit> >(ep, tag_);
15 
16  if (shPtr) {
17  LogDebug("MixingModule") <<shPtr->product()->size()<<" pileup objects added, eventNr "<<eventNr;
18  crFrame_->setPileupPtr(shPtr);
19  crFrame_->addPileups(bcr,const_cast< std::vector<PCaloHit> * >(shPtr->product()),eventNr);
20  }
21  }
#define LogDebug(id)
template<>
void MixingWorker< PSimHit >::addPileups ( const int  bcr,
const EventPrincipal &  ep,
unsigned int  eventNr,
int  vertexoffset 
)

Definition at line 24 of file MixingWorker.cc.

References LogDebug.

24  {
25  // changed for high/low treatment
26  boost::shared_ptr<Wrapper<std::vector<PSimHit> > const> shPtr = getProductByTag<std::vector<PSimHit> >(ep, tag_);
27  if (shPtr) {
28  LogDebug("MixingModule") <<shPtr->product()->size()<<" pileup objects added, eventNr "<<eventNr;
29  crFrame_->setPileupPtr(shPtr);
30  crFrame_->addPileups(bcr,const_cast< std::vector<PSimHit> * > (shPtr->product()),eventNr);
31  }
32  }
#define LogDebug(id)
template<>
void MixingWorker< SimTrack >::addPileups ( const int  bcr,
const EventPrincipal &  ep,
unsigned int  eventNr,
int  vertexoffset 
)

Definition at line 35 of file MixingWorker.cc.

References LogDebug.

35  {
36  // changed to transmit vertexoffset
37  boost::shared_ptr<Wrapper<std::vector<SimTrack> > const> shPtr = getProductByTag<std::vector<SimTrack> >(ep, tag_);
38 
39  if (shPtr) {
40  LogDebug("MixingModule") <<shPtr->product()->size()<<" pileup objects added, eventNr "<<eventNr;
41  crFrame_->setPileupPtr(shPtr);
42  crFrame_->addPileups(bcr,const_cast< std::vector<SimTrack> * > (shPtr->product()),eventNr,vertexoffset);
43  }
44  }
#define LogDebug(id)
template<>
void MixingWorker< SimVertex >::addPileups ( const int  bcr,
const EventPrincipal &  ep,
unsigned int  eventNr,
int  vertexoffset 
)

Definition at line 47 of file MixingWorker.cc.

References LogDebug.

47  {
48 
49  // changed to take care of vertexoffset
50  boost::shared_ptr<Wrapper<std::vector<SimVertex> > const> shPtr = getProductByTag<std::vector<SimVertex> >(ep, tag_);
51 
52  if (shPtr) {
53  LogDebug("MixingModule") <<shPtr->product()->size()<<" pileup objects added, eventNr "<<eventNr;
54  vertexoffset+=shPtr->product()->size();
55  crFrame_->setPileupPtr(shPtr);
56  crFrame_->addPileups(bcr,const_cast< std::vector<SimVertex> * > (shPtr->product()),eventNr);
57  }
58  }
#define LogDebug(id)
template<>
void MixingWorker< HepMCProduct >::addPileups ( const int  bcr,
const EventPrincipal &  ep,
unsigned int  eventNr,
int  vertexoffset 
)

Definition at line 61 of file MixingWorker.cc.

References LogDebug.

61  {
62  // HepMCProduct does not come as a vector....
63  boost::shared_ptr<Wrapper<HepMCProduct> const> shPtr = getProductByTag<HepMCProduct>(ep, tag_);
64  if (shPtr) {
65  LogDebug("MixingModule") <<"HepMC pileup objects added, eventNr "<<eventNr << " Tag " << tag_ << std::endl;
66  crFrame_->setPileupPtr(shPtr);
67  crFrame_->addPileups(bcr,const_cast<HepMCProduct*> (shPtr->product()),eventNr);
68  }
69  }
#define LogDebug(id)
template<>
void MixingWorker< PCaloHit >::addPileups ( const int  bcr,
const EventPrincipal &  ep,
unsigned int  eventNr,
int  vertexoffset 
)
template<>
void MixingWorker< PSimHit >::addPileups ( const int  bcr,
const EventPrincipal &  ep,
unsigned int  eventNr,
int  vertexoffset 
)
template<>
void MixingWorker< SimTrack >::addPileups ( const int  bcr,
const EventPrincipal &  ep,
unsigned int  eventNr,
int  vertexoffset 
)
template<>
void MixingWorker< SimVertex >::addPileups ( const int  bcr,
const EventPrincipal &  ep,
unsigned int  eventNr,
int  vertexoffset 
)
template<>
void MixingWorker< HepMCProduct >::addPileups ( const int  bcr,
const EventPrincipal &  ep,
unsigned int  eventNr,
int  vertexoffset 
)
template<>
void MixingWorker< HepMCProduct >::addSignals ( const Event e)

Definition at line 72 of file MixingWorker.cc.

References LogDebug.

72  {
73  //HepMC - here the interface is different!!!
74  Handle<HepMCProduct> result_t;
75  bool got = e.getByLabel(tag_,result_t);
76  if (got) {
77  LogDebug("MixingModule") <<" adding HepMCProduct from signal event with "<<tag_;
78  crFrame_->addSignals(result_t.product(),e.id());
79  } else {
80  LogInfo("MixingModule") <<"!!!!!!! Did not get any signal data for HepMCProduct with "<<tag_;
81  }
82  }
#define LogDebug(id)
template<>
bool MixingWorker< HepMCProduct >::checkSignal ( const Event e)

Definition at line 85 of file MixingWorker.cc.

References lumiQTWidget::t.

85  {
86  bool got;
87  InputTag t;
88 
89  Handle<HepMCProduct> result_t;
90  got = e.getByLabel(tag_,result_t);
91  t = InputTag(tag_.label(),tag_.instance());
92 
93  if (got) {
94  LogInfo("MixingModule") <<" Will create a CrossingFrame for HepMCProduct with "
95  << " with InputTag= "<< t.encode();
96  }
97 
98  return got;
99  }