93 std::vector<Handle<std::vector<T> > >
handles;
95 for (
size_t itag = 0; itag < tags_.size(); ++itag) {
96 LogInfo(
"HiEmbedding") <<
"itag " << itag;
97 LogInfo(
"HiEmbedding") <<
"label " << tags_[itag].label();
98 LogInfo(
"HiEmbedding") <<
"instance " << tags_[itag].instance();
104 <<
"One of the sub-events is missing the product with type " << object_ <<
", instance "
105 << tags_[itag].instance() <<
" whereas the other one is fine.";
110 crFrame->addSignals(
handles[0].product(),
e.id());
111 for (
size_t itag = 1; itag < tags_.size(); ++itag) {
112 std::vector<T>* product =
const_cast<std::vector<T>*
>(
handles[itag].product());
114 for (
auto&
item : *product) {
117 crFrame->addPileups(*product);
126 std::vector<Handle<HepMCProduct> >
handles;
128 for (
size_t itag = 0; itag < tags_.size(); ++itag) {
134 <<
"One of the sub-events is missing the product with type " << object_ <<
", instance "
135 << tags_[itag].instance() <<
" whereas the other one is fine.";
140 crFrame->addSignals(
handles[0].product(),
e.id());
141 for (
size_t itag = 1; itag < tags_.size(); ++itag) {
143 crFrame->addPileups(*product);
178 std::vector<std::string> simtags =
pset.getParameter<std::vector<std::string> >(
"srcSIM");
179 std::vector<std::string> gentags =
pset.getParameter<std::vector<std::string> >(
"srcGEN");
181 if (simtags.size() != gentags.size())
182 LogError(
"MixingInput") <<
"Generator and Simulation input lists are not matching each other" << endl;
184 for (std::vector<string>::iterator it =
names.begin(); it !=
names.end(); ++it) {
186 if (!pstag.
exists(
"type"))
189 std::vector<InputTag>
tags = pstag.
getParameter<std::vector<InputTag> >(
"input");
192 for (
size_t itag = 0; itag <
tags.size(); ++itag) {
194 std::vector<InputTag>
inputs;
197 if (
object ==
"HepMCProduct")
198 signal = gentags[
input];
200 signal = simtags[
input];
206 if (
object ==
"HepMCProduct") {
208 produces<CrossingFrame<HepMCProduct> >(
label);
209 consumes<HepMCProduct>(
tag);
210 }
else if (
object ==
"SimTrack") {
212 produces<CrossingFrame<SimTrack> >(
label);
213 consumes<std::vector<SimTrack> >(
tag);
214 }
else if (
object ==
"SimVertex") {
216 produces<CrossingFrame<SimVertex> >(
label);
217 consumes<std::vector<SimVertex> >(
tag);
218 }
else if (
object ==
"PSimHit") {
220 produces<CrossingFrame<PSimHit> >(
label);
221 consumes<std::vector<PSimHit> >(
tag);
222 }
else if (
object ==
"PCaloHit") {
224 produces<CrossingFrame<PCaloHit> >(
label);
225 consumes<std::vector<PCaloHit> >(
tag);
227 LogInfo(
"Error") <<
"What the hell is this object?!";
229 LogInfo(
"HiMixingModule") <<
"Will mix " <<
object <<
"s with InputTag= " <<
tag.encode() <<
", label will be "
234 produces<PileupMixingContent>();
237 HiMixingModule::~HiMixingModule() {
250 for (
size_t i = 0;
i < workers_.size(); ++
i) {
251 (workers_[
i])->addSignals(
iEvent);
254 std::unique_ptr<PileupMixingContent> PileupMixing_ =
266 if (
object ==
"HepMCProduct")
267 lookfor =
"edm::" +
object;
268 else if (
object ==
"edm::HepMCProduct")
271 lookfor =
"std::vector<" +
object +
">";
273 for (edm::ProductRegistry::ProductList::const_iterator it = reg->
productList().begin();
292 LogWarning(
"MixingModule") <<
"!!!!!!!!!Could not find in registry requested object: " <<
object <<
" with "
293 <<
tag <<
".\nWill NOT be considered for mixing!!!!!!!!!";