22 : minbunch_(iConfig.getParameter<
int>(
"minBunch")),
23 maxbunch_(iConfig.getParameter<
int>(
"maxBunch")),
24 verbose_(iConfig.getUntrackedParameter<
bool>(
"verbose",
false)),
25 nbin_(maxbunch_ - minbunch_ + 1) {
42 for (std::vector<std::string>::iterator it =
names.begin(); it !=
names.end(); ++it) {
44 if (!
pset.exists(
"type"))
47 std::vector<InputTag>
tags =
pset.getParameter<std::vector<InputTag>>(
"input");
49 if (
object ==
"HepMCProduct") {
59 }
else if (
object ==
"SimTrack") {
68 }
else if (
object ==
"SimVertex") {
78 }
else if (
object ==
"PSimHit") {
79 std::vector<std::string>
subdets =
pset.getParameter<std::vector<std::string>>(
"subdets");
95 }
else if (
object ==
"PCaloHit") {
96 std::vector<std::string>
subdets =
pset.getParameter<std::vector<std::string>>(
"subdets");
120 bool gotHepMCProduct;
124 if (gotHepMCProduct) {
125 std::unique_ptr<MixCollection<HepMCProduct>> hepMCProduct(
200 template <
class T1,
class T2>
202 std::vector<int> theMult(
nbin_);
204 for (theItr_ = theColl_->begin(); theItr_ != theColl_->end(); ++theItr_) {
205 int bunch = (*theItr_).eventId().bunchCrossing();
210 edm::LogWarning(
"MixCollectionValidation") <<
"fillMultiplicity: bunch number " << bunch <<
" out of range";
219 template <
class T1,
class T2>
221 std::vector<int> theMult(
nbin_);
223 for (theItr_ = theColl_->begin(); theItr_ != theColl_->end(); ++theItr_) {
224 int bunch = theItr_.bunch();
227 theMult[
index] += (*theItr_).GetEvent()->particles_size();
229 edm::LogWarning(
"MixCollectionValidation") <<
"fillMultiplicity: bunch number " << bunch <<
" out of range";
238 template <
class T1,
class T2>
240 for (theItr_ = theColl_->begin(); theItr_ != theColl_->end(); ++theItr_) {
241 int bunch = (*theItr_).eventId().bunchCrossing();
242 float time = (*theItr_).timeOfFlight();
245 theProfile_->
Fill(
float(bunch + 0.5),
time);
247 edm::LogWarning(
"MixCollectionValidation") <<
"fillSimHitTime: bunch number " << bunch <<
" out of range";
252 template <
class T1,
class T2>
254 for (theItr_ = theColl_->begin(); theItr_ != theColl_->end(); ++theItr_) {
255 int bunch = (*theItr_).eventId().bunchCrossing();
256 float time = (*theItr_).time();
259 theProfile_->
Fill(
float(bunch + 0.5),
time);
261 edm::LogWarning(
"MixCollectionValidation") <<
"fillCaloHitTime: bunch number " << bunch <<
" out of range";