35 : flagSimTrack_(
false),
36 flagSimVertex_(
false),
37 flagHepMCProduct_(
false),
43 for (std::vector<std::string>::iterator it =
names.begin(); it !=
names.end(); ++it) {
45 if (!
pset.exists(
"type"))
49 std::vector<InputTag>
tags =
pset.getParameter<std::vector<InputTag>>(
"input");
52 if (
object ==
"SimTrack") {
60 produces<PCrossingFrame<SimTrack>>(
label);
61 consumes<std::vector<SimTrack>>(
tag);
62 LogInfo(
"MixingModule") <<
"Add PCrossingFrame<SimTrack> " <<
object <<
"s with InputTag= " <<
tag.encode()
63 <<
", label will be " <<
label;
67 else if (
object ==
"SimVertex") {
75 produces<PCrossingFrame<SimVertex>>(
label);
76 consumes<std::vector<SimVertex>>(
tag);
77 LogInfo(
"MixingModule") <<
"Add SimVertexContainer " <<
object <<
"s with InputTag= " <<
tag.encode()
78 <<
", label will be " <<
label;
82 else if (
object ==
"PCaloHit") {
85 std::vector<std::string>
subdets =
pset.getParameter<std::vector<std::string>>(
"subdets");
90 else if (
tags.size() > 1)
95 produces<PCrossingFrame<PCaloHit>>(
label);
96 consumes<std::vector<PCaloHit>>(
tag);
97 LogInfo(
"MixingModule") <<
"Add PCrossingFrame<PCaloHit> " <<
object <<
"s with InputTag= " <<
tag.encode()
98 <<
", label will be " <<
label;
106 else if (
object ==
"PSimHit") {
109 std::vector<std::string>
subdets =
pset.getParameter<std::vector<std::string>>(
"subdets");
112 if (
tags.size() == 1)
115 else if (
tags.size() > 1)
120 produces<PCrossingFrame<PSimHit>>(
label);
121 consumes<std::vector<PSimHit>>(
tag);
122 LogInfo(
"MixingModule") <<
"Add PSimHitContainer " <<
object <<
"s with InputTag= " <<
tag.encode()
123 <<
", label will be " <<
label;
131 else if (
object ==
"HepMCProduct") {
140 produces<PCrossingFrame<edm::HepMCProduct>>(
label);
141 consumes<HepMCProduct>(
tag);
142 LogInfo(
"MixingModule") <<
"Add HepMCProduct " <<
object <<
"s with InputTag= " <<
tag.encode()
143 <<
", label will be " <<
label;
145 LogWarning(
"MixingModule") <<
"You did not mix a type of object(" <<
object <<
").";
158 gotTracks =
iEvent.getByLabel(
"mix",
"g4SimHits", cf_simtrack);
162 std::unique_ptr<PCrossingFrame<SimTrack>> pOutTrack(PCFbis);
165 LogInfo(
"MixingModule") <<
" Please, check if the object <SimTrack> has been mixed by the MixingModule!";
173 gotSimVertex =
iEvent.getByLabel(
"mix",
"g4SimHits", cf_simvtx);
177 std::unique_ptr<PCrossingFrame<SimVertex>> pOutVertex(PCFvtx);
180 LogInfo(
"MixingModule") <<
" Please, check if the object <SimVertex> has been mixed by the MixingModule!";
193 std::unique_ptr<PCrossingFrame<PCaloHit>> pOutHCalo(PCFPhCaloHit);
197 <<
" has been mixed by the MixingModule!";
210 std::unique_ptr<PCrossingFrame<PSimHit>> pOutSimHit(PCFSimHit);
214 <<
" has been mixed by the MixingModule!";
221 bool gotHepMCProduct;
223 gotHepMCProduct =
iEvent.getByLabel(
"mix",
"generatorSmeared", cf_hepmc);
224 if (gotHepMCProduct) {
226 std::unique_ptr<PCrossingFrame<edm::HepMCProduct>> pOuthepmcpr(PCFHepMC);
229 LogInfo(
"MixingModule") <<
" Please, check if the object <HepMCProduct> has been mixed by the MixingModule!";