8 #include "boost/shared_ptr.hpp"
16 boost::shared_ptr<Wrapper<std::vector<PSimHit> >
const> shPtr = getProductByTag<std::vector<PSimHit> >(ep, tag_);
18 LogDebug(
"MixingModule") <<shPtr->product()->size()<<
" pileup objects added, eventNr "<<eventNr;
19 crFrame_->setPileupPtr(shPtr);
20 crFrame_->addPileups(bcr,
const_cast< std::vector<PSimHit> *
> (shPtr->product()),eventNr);
23 boost::shared_ptr<Wrapper<PCrossingFrame<PSimHit> >
const> shPtr = getProductByTag<PCrossingFrame<PSimHit> >(ep, tag_);
25 crFrame_->setPileupPtr(shPtr);
27 LogDebug(
"MixingModule") <<
"Add PCrossingFrame<PSimHit>, eventNr " << secSourceCF_->getEventID();
28 copyPCrossingFrame(secSourceCF_);
31 LogDebug(
"MixingModule") <<
"Could not get the PCrossingFrame<PSimHit>!";
41 boost::shared_ptr<Wrapper<std::vector<SimTrack> >
const> shPtr = getProductByTag<std::vector<SimTrack> >(ep, tag_);
44 LogDebug(
"MixingModule") <<shPtr->product()->size()<<
" pileup objects added, eventNr "<<eventNr;
45 crFrame_->setPileupPtr(shPtr);
46 crFrame_->addPileups(bcr,
const_cast< std::vector<SimTrack> *
> (shPtr->product()),eventNr,vertexoffset);
51 boost::shared_ptr<Wrapper<PCrossingFrame<SimTrack> >
const> shPtr = getProductByTag<PCrossingFrame<SimTrack> >(ep, tag_);
54 crFrame_->setPileupPtr(shPtr);
56 LogDebug(
"MixingModule") <<
"Add PCrossingFrame<SimTrack>, eventNr " << secSourceCF_->getEventID();
59 copyPCrossingFrame(secSourceCF_);
62 LogDebug(
"MixingModule") <<
"Could not get the PCrossingFrame<SimTrack>!";
73 boost::shared_ptr<Wrapper<std::vector<SimVertex> >
const> shPtr = getProductByTag<std::vector<SimVertex> >(ep, tag_);
76 LogDebug(
"MixingModule") <<shPtr->product()->size()<<
" pileup objects added, eventNr "<<eventNr;
77 vertexoffset+=shPtr->product()->size();
78 crFrame_->setPileupPtr(shPtr);
79 crFrame_->addPileups(bcr,
const_cast< std::vector<SimVertex> *
> (shPtr->product()),eventNr);
84 boost::shared_ptr<Wrapper<PCrossingFrame<SimVertex> >
const> shPtr = getProductByTag<PCrossingFrame<SimVertex> >(ep, tag_);
87 crFrame_->setPileupPtr(shPtr);
89 LogDebug(
"MixingModule") <<
"Add PCrossingFrame<SimVertex>, eventNr " << secSourceCF_->getEventID();
91 copyPCrossingFrame(secSourceCF_);
94 LogDebug(
"MixingModule") <<
"Could not get the PCrossingFrame<SimVertex>!";
104 boost::shared_ptr<Wrapper<HepMCProduct>
const> shPtr = getProductByTag<HepMCProduct>(ep, tag_);
106 LogDebug(
"MixingModule") <<
"HepMC pileup objects added, eventNr "<<eventNr;
107 crFrame_->setPileupPtr(shPtr);
108 crFrame_->addPileups(bcr,const_cast<HepMCProduct*> (shPtr->product()),eventNr);
113 boost::shared_ptr<Wrapper<PCrossingFrame<HepMCProduct> >
const> shPtr = getProductByTag<PCrossingFrame<HepMCProduct> >(ep, tag_);
116 crFrame_->setPileupPtr(shPtr);
118 LogDebug(
"MixingModule") <<
"Add PCrossingFrame<HepMCProduct>, eventNr " << secSourceCF_->getEventID();
120 copyPCrossingFrame(secSourceCF_);
123 LogDebug(
"MixingModule") <<
"Could not get the PCrossingFrame<HepMCProduct>!";
133 bool got = e.getByLabel(tagSignal_,result_t);
135 LogDebug(
"MixingModule") <<
" adding HepMCProduct from signal event with "<<tagSignal_;
136 crFrame_->addSignals(result_t.product(),e.id());
138 else LogInfo(
"MixingModule") <<
"!!!!!!! Did not get any signal data for HepMCProduct with "<<tagSignal_;
143 bool got = e.getByLabel(tag_,result_t);
145 LogDebug(
"MixingModule") <<
" adding HepMCProduct from signal event with "<<tag_;
146 crFrame_->addSignals(result_t.product(),e.id());
148 else LogInfo(
"MixingModule") <<
"!!!!!!! Did not get any signal data for HepMCProduct with "<<tag_;
162 got = e.getByLabel(tagSignal_,result_t);
163 t = InputTag(tagSignal_.label(),tagSignal_.instance());
166 got = e.getByLabel(tag_,result_t);
167 t = InputTag(tag_.label(),tag_.instance());
171 LogInfo(
"MixingModule") <<
" Will create a CrossingFrame for HepMCProduct with "
172 <<
" with InputTag= "<< t.encode();
virtual void addPileups(const int bcr, const EventPrincipal &ep, unsigned int eventNr, int vertexoffset)
virtual void addSignals(const edm::Event &e)
virtual bool checkSignal(const edm::Event &e)