|
|
Go to the documentation of this file.
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";
std::vector< edm::InputTag > SimVertexTags_
T const * product() const
void analyze(const edm::Event &, const edm::EventSetup &) override
void fillGenParticleMulti(T1 &theItr_, T2 &theColl_, MonitorElement *theProfile_)
static const std::string subdets[7]
virtual void setCurrentFolder(std::string const &fullpath)
~MixCollectionValidation() override
edm::EDGetTokenT< CrossingFrame< SimVertex > > crossingFrame_SimVtx_Token_
Log< level::Warning, false > LogWarning
void fillSimHitTime(T1 &theItr_, T2 &theColl_, MonitorElement *theProfile_)
edm::EDGetTokenT< CrossingFrame< SimTrack > > crossingFrame_SimTr_Token_
const std::string names[nVars_]
std::vector< edm::EDGetTokenT< CrossingFrame< PCaloHit > > > crossingFrame_PCaloHit_Tokens_
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
edm::EDGetTokenT< CrossingFrame< edm::HepMCProduct > > crossingFrame_Hep_Token_
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
MonitorElement * nrSimTrackH_
edm::ParameterSet mixObjextsSet_
std::vector< std::string > getParameterNames() const
void fillMultiplicity(T1 &theItr_, T2 &theColl_, MonitorElement *theProfile_)
MonitorElement * nrHepMCProductH_
static PFTauRenderPlugin instance
void fillCaloHitTime(T1 &theItr_, T2 &theColl_, MonitorElement *theProfile_)
std::vector< edm::InputTag > PCaloHitTags_
std::vector< edm::InputTag > PSimHitTags_
std::map< std::string, MonitorElement * > SimHitTimemap_
std::vector< edm::EDGetTokenT< CrossingFrame< PSimHit > > > crossingFrame_PSimHit_Tokens_
std::map< std::string, MonitorElement * > CaloHitTimemap_
T getParameter(std::string const &) const
std::map< std::string, MonitorElement * > SimHitNrmap_
std::vector< edm::InputTag > SimTrackTags_
std::map< std::string, MonitorElement * > CaloHitNrmap_
std::vector< edm::InputTag > HepMCProductTags_
MonitorElement * nrSimVertexH_
MixCollectionValidation(const edm::ParameterSet &)