CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
MixCollectionValidation Class Reference

#include <MixCollectionValidation.h>

Inheritance diagram for MixCollectionValidation:
edm::EDAnalyzer edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
void beginJob ()
 
void endJob ()
 
 MixCollectionValidation (const edm::ParameterSet &)
 
 ~MixCollectionValidation ()
 
- Public Member Functions inherited from edm::EDAnalyzer
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzer ()
 
ModuleDescription const & moduleDescription () const
 
std::string workerType () const
 
virtual ~EDAnalyzer ()
 
- Public Member Functions inherited from edm::EDConsumerBase
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Private Member Functions

template<class T1 , class T2 >
void fillCaloHitTime (T1 &theItr_, T2 &theColl_, MonitorElement *theProfile_)
 
template<class T1 , class T2 >
void fillGenParticleMulti (T1 &theItr_, T2 &theColl_, MonitorElement *theProfile_)
 
template<class T1 , class T2 >
void fillMultiplicity (T1 &theItr_, T2 &theColl_, MonitorElement *theProfile_)
 
template<class T1 , class T2 >
void fillSimHitTime (T1 &theItr_, T2 &theColl_, MonitorElement *theProfile_)
 

Private Attributes

std::map< std::string,
MonitorElement * > 
CaloHitNrmap_
 
std::map< std::string,
MonitorElement * > 
CaloHitTimemap_
 
edm::EDGetTokenT
< CrossingFrame
< edm::HepMCProduct > > 
crossingFrame_Hep_Token_
 
std::vector< edm::EDGetTokenT
< CrossingFrame< PCaloHit > > > 
crossingFrame_PCaloHit_Tokens_
 
std::vector< edm::EDGetTokenT
< CrossingFrame< PSimHit > > > 
crossingFrame_PSimHit_Tokens_
 
edm::EDGetTokenT
< CrossingFrame< SimTrack > > 
crossingFrame_SimTr_Token_
 
edm::EDGetTokenT
< CrossingFrame< SimVertex > > 
crossingFrame_SimVtx_Token_
 
DQMStoredbe_
 
std::vector< edm::InputTagHepMCProductTags_
 
int maxbunch_
 
int minbunch_
 
std::vector< std::string > names_
 
int nbin_
 
MonitorElementnrHepMCProductH_
 
MonitorElementnrSimTrackH_
 
MonitorElementnrSimVertexH_
 
std::string outputFile_
 
std::vector< edm::InputTagPCaloHitTags_
 
std::vector< edm::InputTagPSimHitTags_
 
std::map< std::string,
MonitorElement * > 
SimHitNrmap_
 
std::map< std::string,
MonitorElement * > 
SimHitTimemap_
 
std::vector< edm::InputTagSimTrackTags_
 
std::vector< edm::InputTagSimVertexTags_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::EDAnalyzer
typedef EDAnalyzer ModuleType
 
- Static Public Member Functions inherited from edm::EDAnalyzer
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Detailed Description

Definition at line 35 of file MixCollectionValidation.h.

Constructor & Destructor Documentation

MixCollectionValidation::MixCollectionValidation ( const edm::ParameterSet iConfig)
explicit

Definition at line 22 of file MixCollectionValidation.cc.

References DQMStore::bookProfile(), CaloHitNrmap_, CaloHitTimemap_, edm::EDConsumerBase::consumes(), crossingFrame_Hep_Token_, crossingFrame_PCaloHit_Tokens_, crossingFrame_PSimHit_Tokens_, crossingFrame_SimTr_Token_, crossingFrame_SimVtx_Token_, dbe_, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), HepMCProductTags_, cuy::ii, diffTwoXMLs::label, maxbunch_, minbunch_, mergeVDriftHistosByStation::name, names_, nbin_, nrHepMCProductH_, nrSimTrackH_, nrSimVertexH_, dbtoconf::object, cppFunctionSkipper::operator, outputFile_, PCaloHitTags_, PSimHitTags_, DQMStore::setCurrentFolder(), DQMStore::setVerbose(), DQMStore::showDirStructure(), SimHitNrmap_, SimHitTimemap_, SimTrackTags_, SimVertexTags_, AlCaHLTBitMon_QueryRunRegistry::string, subdets, o2o::tags, indexGen::title, and verbose_.

22  : outputFile_(iConfig.getParameter<std::string>("outputFile")),
23  minbunch_(iConfig.getParameter<int>("minBunch")),
24  maxbunch_(iConfig.getParameter<int>("maxBunch")),
25  verbose_(iConfig.getUntrackedParameter<bool>("verbose",false)),
27 {
28 
29  if ( outputFile_.size() != 0 ) {
30  edm::LogInfo("OutputInfo") << " Ecal SimHits Task histograms will be saved to " << outputFile_.c_str();
31  } else {
32  edm::LogInfo("OutputInfo") << " Ecal SimHits Task histograms will NOT be saved";
33  }
34 
35  // get hold of back-end interface
37  if ( dbe_ ) {
38  if ( verbose_ ) { dbe_->setVerbose(1); }
39  else { dbe_->setVerbose(0); }
40  }
41 
42  if ( dbe_ ) {
43  if ( verbose_ ) dbe_->showDirStructure();
44  }
45 
46  // get hold of back-end interface
48  // dbe_->showDirStructure();
49  dbe_->setCurrentFolder("MixingV/Mixing");
50 
51  // define the histograms according to the configuration
52 
53  ParameterSet ps=iConfig.getParameter<ParameterSet>("mixObjects");
55 
56  for (std::vector<std::string>::iterator it=names_.begin();it!= names_.end();++it)
57  {
58  ParameterSet pset=ps.getParameter<ParameterSet>((*it));
59  if (!pset.exists("type")) continue; //to allow replacement by empty pset
60  std::string object = pset.getParameter<std::string>("type");
61  std::vector<InputTag> tags=pset.getParameter<std::vector<InputTag> >("input");
62 
63  if ( object == "HepMCProduct" ) {
64 
65  std::string title = "Log10 Number of GenParticle in " + object;
66  std::string name = "NumberOf" + object;
67  nrHepMCProductH_ = dbe_->bookProfile(name,title,nbin_,minbunch_,maxbunch_+1,40,0.,40.);
68 
70  if (HepMCProductTags_.size()) {
71  crossingFrame_Hep_Token_ = consumes<CrossingFrame<HepMCProduct> >(
73  }
74  }
75  else if ( object == "SimTrack" ) {
76 
77  std::string title = "Log10 Number of " + object;
78  std::string name = "NumberOf" + object;
79  nrSimTrackH_ = dbe_->bookProfile(name,title,nbin_,minbunch_,maxbunch_+1,40,0.,40.);
80 
82  if (SimTrackTags_.size()) {
83  crossingFrame_SimTr_Token_ = consumes<CrossingFrame<SimTrack> >(
84  edm::InputTag("mix", SimTrackTags_[0].label()));
85  }
86  }
87  else if ( object == "SimVertex" ) {
88 
89  std::string title = "Log10 Number of " + object;
90  std::string name = "NumberOf" + object;
91  nrSimVertexH_ = dbe_->bookProfile(name,title,nbin_,minbunch_,maxbunch_+1,40,0.,40.);
92 
94  if (SimVertexTags_.size()) {
95  crossingFrame_SimVtx_Token_ = consumes<CrossingFrame<SimVertex> >(
96  edm::InputTag("mix", SimVertexTags_[0].label()));
97  }
98  }
99  else if ( object == "PSimHit" ) {
100  std::vector<std::string> subdets=pset.getParameter<std::vector<std::string> >("subdets");
101  for (unsigned int ii=0;ii<subdets.size();ii++) {
102 
103  std::string title = "Log10 Number of " + subdets[ii];
104  std::string name = "NumberOf" + subdets[ii];
105  SimHitNrmap_[subdets[ii]] = dbe_->bookProfile(name,title,nbin_,minbunch_,maxbunch_+1,40,0.,40.);
106 
107  title = "Time of " + subdets[ii];
108  name = "TimeOf" + subdets[ii];
109  SimHitTimemap_[subdets[ii]] = dbe_->bookProfile(name,title,nbin_,minbunch_,maxbunch_+1,40,-125.,375.);
110 
111  }
112 
113  PSimHitTags_ = tags;
114  for (auto const & it : PSimHitTags_)
116  edm::InputTag("mix", it.label() + it.instance())));
117  }
118  else if ( object == "PCaloHit" ) {
119  std::vector<std::string> subdets=pset.getParameter<std::vector<std::string> >("subdets");
120  for (unsigned int ii=0;ii<subdets.size();ii++) {
121 
122  std::string title = "Log10 Number of " + subdets[ii];
123  std::string name = "NumberOf" + subdets[ii];
124  CaloHitNrmap_[subdets[ii]] = dbe_->bookProfile(name,title,nbin_,minbunch_,maxbunch_+1,40,0.,40.);
125 
126  title = "Time of " + subdets[ii];
127  name = "TimeOf" + subdets[ii];
128  CaloHitTimemap_[subdets[ii]] = dbe_->bookProfile(name,title,nbin_,minbunch_,maxbunch_+1,40,-125.,375.);
129 
130  }
131 
133  for (auto const & it : PCaloHitTags_)
135  edm::InputTag("mix", it.label() + it.instance())));
136  }
137  }
138 
139 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::map< std::string, MonitorElement * > CaloHitNrmap_
std::vector< edm::EDGetTokenT< CrossingFrame< PCaloHit > > > crossingFrame_PCaloHit_Tokens_
std::vector< edm::InputTag > HepMCProductTags_
std::vector< edm::EDGetTokenT< CrossingFrame< PSimHit > > > crossingFrame_PSimHit_Tokens_
bool exists(std::string const &parameterName) const
checks if a parameter exists
std::map< std::string, MonitorElement * > SimHitTimemap_
int ii
Definition: cuy.py:588
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
edm::EDGetTokenT< CrossingFrame< SimVertex > > crossingFrame_SimVtx_Token_
std::vector< edm::InputTag > PSimHitTags_
std::map< std::string, MonitorElement * > SimHitNrmap_
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1268
void setVerbose(unsigned level)
Definition: DQMStore.cc:631
edm::EDGetTokenT< CrossingFrame< SimTrack > > crossingFrame_SimTr_Token_
std::vector< std::string > getParameterNames() const
char const * subdets[11]
std::vector< edm::InputTag > PCaloHitTags_
tuple tags
Definition: o2o.py:248
std::vector< edm::InputTag > SimTrackTags_
edm::EDGetTokenT< CrossingFrame< edm::HepMCProduct > > crossingFrame_Hep_Token_
list object
Definition: dbtoconf.py:77
std::vector< edm::InputTag > SimVertexTags_
std::map< std::string, MonitorElement * > CaloHitTimemap_
void showDirStructure(void) const
Definition: DQMStore.cc:3332
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:667
std::vector< std::string > names_
MixCollectionValidation::~MixCollectionValidation ( )

Definition at line 141 of file MixCollectionValidation.cc.

142 {
143 
144  // do anything here that needs to be done at desctruction time
145  // (e.g. close files, deallocate resources etc.)
146 }

Member Function Documentation

void MixCollectionValidation::analyze ( const edm::Event iEvent,
const edm::EventSetup iConfig 
)
virtual

Implements edm::EDAnalyzer.

Definition at line 162 of file MixCollectionValidation.cc.

References CaloHitNrmap_, CaloHitTimemap_, crossingFrame_Hep_Token_, crossingFrame_PCaloHit_Tokens_, crossingFrame_PSimHit_Tokens_, crossingFrame_SimTr_Token_, crossingFrame_SimVtx_Token_, fillCaloHitTime(), fillGenParticleMulti(), fillMultiplicity(), fillSimHitTime(), edm::Event::getByToken(), HepMCProductTags_, i, instance, nrHepMCProductH_, nrSimTrackH_, nrSimVertexH_, PCaloHitTags_, edm::Handle< T >::product(), PSimHitTags_, SimHitNrmap_, trackerHits::simHits, SimHitTimemap_, SimTrackTags_, SimVertexTags_, and AlCaHLTBitMon_QueryRunRegistry::string.

163 {
164 
165  using namespace edm;
166 
167  if ( HepMCProductTags_.size() > 0 ) {
168  bool gotHepMCProduct;
170  gotHepMCProduct = iEvent.getByToken(crossingFrame_Hep_Token_, crossingFrame);
171 
172  if (gotHepMCProduct){
173  std::auto_ptr<MixCollection<HepMCProduct> >
174  hepMCProduct (new MixCollection<HepMCProduct>(crossingFrame.product ()));
176 
177  fillGenParticleMulti(hitItr, hepMCProduct, nrHepMCProductH_);
178  }
179  }
180 
181  if ( SimTrackTags_.size() > 0 ) {
182  bool gotSimTrack;
183  edm::Handle<CrossingFrame<SimTrack> > crossingFrame;
184  gotSimTrack = iEvent.getByToken(crossingFrame_SimTr_Token_,crossingFrame);
185 
186  if (gotSimTrack){
187  std::auto_ptr<MixCollection<SimTrack> >
188  simTracks (new MixCollection<SimTrack>(crossingFrame.product ()));
190 
191  fillMultiplicity(hitItr, simTracks, nrSimTrackH_);
192  }
193  }
194 
195  if ( SimVertexTags_.size() > 0 ) {
196  bool gotSimVertex;
197  edm::Handle<CrossingFrame<SimVertex> > crossingFrame;
198  std::string SimVertexLabel = SimVertexTags_[0].label();
199  gotSimVertex = iEvent.getByToken(crossingFrame_SimVtx_Token_, crossingFrame);
200 
201  if (gotSimVertex){
202  std::auto_ptr<MixCollection<SimVertex> >
203  simVerteces (new MixCollection<SimVertex>(crossingFrame.product ()));
205 
206  fillMultiplicity(hitItr, simVerteces, nrSimVertexH_);
207  }
208  }
209 
210  if ( PSimHitTags_.size() > 0 ) {
211 
212  edm::Handle<CrossingFrame<PSimHit> > crossingFrame;
213 
214  for ( int i = 0; i < (int)PSimHitTags_.size(); i++ ) {
215  bool gotPSimHit;
216  gotPSimHit = iEvent.getByToken(crossingFrame_PSimHit_Tokens_[i], crossingFrame);
217 
218  if (gotPSimHit){
219  std::auto_ptr<MixCollection<PSimHit> >
220  simHits (new MixCollection<PSimHit>(crossingFrame.product ()));
221 
223 
225 
227  }
228  }
229  }
230 
231  if ( PCaloHitTags_.size() > 0 ) {
232 
233  edm::Handle<CrossingFrame<PCaloHit> > crossingFrame;
234 
235  for ( int i = 0; i < (int)PCaloHitTags_.size(); i++ ) {
236  bool gotPCaloHit;
237  std::string PCaloHitLabel = PCaloHitTags_[i].label()+PCaloHitTags_[i].instance();
238  gotPCaloHit = iEvent.getByToken(crossingFrame_PCaloHit_Tokens_[i], crossingFrame);
239 
240  if (gotPCaloHit){
241  std::auto_ptr<MixCollection<PCaloHit> >
242  caloHits (new MixCollection<PCaloHit>(crossingFrame.product ()));
243 
245 
246  fillMultiplicity(hitItr, caloHits, CaloHitNrmap_[PCaloHitTags_[i].instance()]);
247 
248  fillCaloHitTime(hitItr, caloHits, CaloHitTimemap_[PCaloHitTags_[i].instance()]);
249  }
250  }
251  }
252 
253 }
int i
Definition: DBlmapReader.cc:9
std::map< std::string, MonitorElement * > CaloHitNrmap_
std::vector< edm::EDGetTokenT< CrossingFrame< PCaloHit > > > crossingFrame_PCaloHit_Tokens_
std::vector< edm::InputTag > HepMCProductTags_
static PFTauRenderPlugin instance
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:434
std::vector< edm::EDGetTokenT< CrossingFrame< PSimHit > > > crossingFrame_PSimHit_Tokens_
std::map< std::string, MonitorElement * > SimHitTimemap_
void fillCaloHitTime(T1 &theItr_, T2 &theColl_, MonitorElement *theProfile_)
edm::EDGetTokenT< CrossingFrame< SimVertex > > crossingFrame_SimVtx_Token_
void fillMultiplicity(T1 &theItr_, T2 &theColl_, MonitorElement *theProfile_)
std::vector< edm::InputTag > PSimHitTags_
std::map< std::string, MonitorElement * > SimHitNrmap_
void fillSimHitTime(T1 &theItr_, T2 &theColl_, MonitorElement *theProfile_)
edm::EDGetTokenT< CrossingFrame< SimTrack > > crossingFrame_SimTr_Token_
std::vector< edm::InputTag > PCaloHitTags_
std::vector< edm::InputTag > SimTrackTags_
edm::EDGetTokenT< CrossingFrame< edm::HepMCProduct > > crossingFrame_Hep_Token_
tuple simHits
Definition: trackerHits.py:16
T const * product() const
Definition: Handle.h:81
std::vector< edm::InputTag > SimVertexTags_
std::map< std::string, MonitorElement * > CaloHitTimemap_
void fillGenParticleMulti(T1 &theItr_, T2 &theColl_, MonitorElement *theProfile_)
void MixCollectionValidation::beginJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 148 of file MixCollectionValidation.cc.

148  {
149 }
void MixCollectionValidation::endJob ( void  )
virtual

Reimplemented from edm::EDAnalyzer.

Definition at line 152 of file MixCollectionValidation.cc.

References dbe_, outputFile_, and DQMStore::save().

152  {
153  if (outputFile_.size() != 0 && dbe_ ) dbe_->save(outputFile_);
154 }
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
Definition: DQMStore.cc:2540
template<class T1 , class T2 >
void MixCollectionValidation::fillCaloHitTime ( T1 &  theItr_,
T2 &  theColl_,
MonitorElement theProfile_ 
)
private

Definition at line 306 of file MixCollectionValidation.cc.

References MonitorElement::Fill(), cmsHarvester::index, minbunch_, nbin_, and cond::rpcobgas::time.

Referenced by analyze().

306  {
307 
308  for ( theItr_ = theColl_->begin() ; theItr_ != theColl_->end() ; ++theItr_) {
309 
310  int bunch = (*theItr_).eventId().bunchCrossing();
311  float time = (*theItr_).time();
312  int index = bunch - minbunch_;
313  if ( index >= 0 && index < nbin_ ) { theProfile_->Fill(float(bunch+0.5),time); }
314  else { edm::LogWarning("MixCollectionValidation") << "fillCaloHitTime: bunch number " << bunch << " out of range"; }
315 
316  }
317 
318 }
void Fill(long long x)
template<class T1 , class T2 >
void MixCollectionValidation::fillGenParticleMulti ( T1 &  theItr_,
T2 &  theColl_,
MonitorElement theProfile_ 
)
private

Definition at line 274 of file MixCollectionValidation.cc.

References MonitorElement::Fill(), i, cmsHarvester::index, bookConverter::max, minbunch_, and nbin_.

Referenced by analyze().

274  {
275 
276  std::vector<int> theMult(nbin_);
277 
278  for ( theItr_ = theColl_->begin() ; theItr_ != theColl_->end() ; ++theItr_) {
279 
280  int bunch = theItr_.bunch();
281  int index = bunch - minbunch_;
282  if ( index >= 0 && index < nbin_ ) { theMult[index] += (*theItr_).GetEvent()->particles_size(); }
283  else { edm::LogWarning("MixCollectionValidation") << "fillMultiplicity: bunch number " << bunch << " out of range"; }
284 
285  }
286 
287  for ( int i = 0; i < nbin_; i++ ) {
288  theProfile_->Fill(float(i+minbunch_+0.5),std::log10(std::max(float(0.1),float(theMult[i]))));
289  }
290 }
int i
Definition: DBlmapReader.cc:9
void Fill(long long x)
template<class T1 , class T2 >
void MixCollectionValidation::fillMultiplicity ( T1 &  theItr_,
T2 &  theColl_,
MonitorElement theProfile_ 
)
private

Definition at line 255 of file MixCollectionValidation.cc.

References MonitorElement::Fill(), i, cmsHarvester::index, bookConverter::max, minbunch_, and nbin_.

Referenced by analyze().

255  {
256 
257  std::vector<int> theMult(nbin_);
258 
259  for ( theItr_ = theColl_->begin() ; theItr_ != theColl_->end() ; ++theItr_) {
260 
261  int bunch = (*theItr_).eventId().bunchCrossing();
262  int index = bunch - minbunch_;
263  if ( index >= 0 && index < nbin_ ) { theMult[index] += 1; }
264  else { edm::LogWarning("MixCollectionValidation") << "fillMultiplicity: bunch number " << bunch << " out of range"; }
265 
266  }
267 
268  for ( int i = 0; i < nbin_; i++ ) {
269  theProfile_->Fill(float(i+minbunch_+0.5),std::log10(std::max(float(0.1),float(theMult[i]))));
270  }
271 }
int i
Definition: DBlmapReader.cc:9
void Fill(long long x)
template<class T1 , class T2 >
void MixCollectionValidation::fillSimHitTime ( T1 &  theItr_,
T2 &  theColl_,
MonitorElement theProfile_ 
)
private

Definition at line 292 of file MixCollectionValidation.cc.

References MonitorElement::Fill(), cmsHarvester::index, minbunch_, nbin_, and cond::rpcobgas::time.

Referenced by analyze().

292  {
293 
294  for ( theItr_ = theColl_->begin() ; theItr_ != theColl_->end() ; ++theItr_) {
295 
296  int bunch = (*theItr_).eventId().bunchCrossing();
297  float time = (*theItr_).timeOfFlight();
298  int index = bunch - minbunch_;
299  if ( index >= 0 && index < nbin_ ) { theProfile_->Fill(float(bunch+0.5),time); }
300  else { edm::LogWarning("MixCollectionValidation") << "fillSimHitTime: bunch number " << bunch << " out of range"; }
301 
302  }
303 
304 }
void Fill(long long x)

Member Data Documentation

std::map<std::string,MonitorElement *> MixCollectionValidation::CaloHitNrmap_
private

Definition at line 81 of file MixCollectionValidation.h.

Referenced by analyze(), and MixCollectionValidation().

std::map<std::string,MonitorElement *> MixCollectionValidation::CaloHitTimemap_
private

Definition at line 82 of file MixCollectionValidation.h.

Referenced by analyze(), and MixCollectionValidation().

edm::EDGetTokenT<CrossingFrame<edm::HepMCProduct> > MixCollectionValidation::crossingFrame_Hep_Token_
private

Definition at line 62 of file MixCollectionValidation.h.

Referenced by analyze(), and MixCollectionValidation().

std::vector< edm::EDGetTokenT<CrossingFrame<PCaloHit> > > MixCollectionValidation::crossingFrame_PCaloHit_Tokens_
private

Definition at line 66 of file MixCollectionValidation.h.

Referenced by analyze(), and MixCollectionValidation().

std::vector< edm::EDGetTokenT<CrossingFrame<PSimHit> > > MixCollectionValidation::crossingFrame_PSimHit_Tokens_
private

Definition at line 65 of file MixCollectionValidation.h.

Referenced by analyze(), and MixCollectionValidation().

edm::EDGetTokenT<CrossingFrame<SimTrack> > MixCollectionValidation::crossingFrame_SimTr_Token_
private

Definition at line 63 of file MixCollectionValidation.h.

Referenced by analyze(), and MixCollectionValidation().

edm::EDGetTokenT<CrossingFrame<SimVertex> > MixCollectionValidation::crossingFrame_SimVtx_Token_
private

Definition at line 64 of file MixCollectionValidation.h.

Referenced by analyze(), and MixCollectionValidation().

DQMStore* MixCollectionValidation::dbe_
private

Definition at line 84 of file MixCollectionValidation.h.

Referenced by endJob(), and MixCollectionValidation().

std::vector<edm::InputTag> MixCollectionValidation::HepMCProductTags_
private

Definition at line 87 of file MixCollectionValidation.h.

Referenced by analyze(), and MixCollectionValidation().

int MixCollectionValidation::maxbunch_
private

Definition at line 70 of file MixCollectionValidation.h.

Referenced by MixCollectionValidation().

int MixCollectionValidation::minbunch_
private
std::vector<std::string> MixCollectionValidation::names_
private

Definition at line 86 of file MixCollectionValidation.h.

Referenced by MixCollectionValidation().

int MixCollectionValidation::nbin_
private
MonitorElement* MixCollectionValidation::nrHepMCProductH_
private

Definition at line 74 of file MixCollectionValidation.h.

Referenced by analyze(), and MixCollectionValidation().

MonitorElement* MixCollectionValidation::nrSimTrackH_
private

Definition at line 75 of file MixCollectionValidation.h.

Referenced by analyze(), and MixCollectionValidation().

MonitorElement* MixCollectionValidation::nrSimVertexH_
private

Definition at line 76 of file MixCollectionValidation.h.

Referenced by analyze(), and MixCollectionValidation().

std::string MixCollectionValidation::outputFile_
private

Definition at line 68 of file MixCollectionValidation.h.

Referenced by endJob(), and MixCollectionValidation().

std::vector<edm::InputTag> MixCollectionValidation::PCaloHitTags_
private

Definition at line 91 of file MixCollectionValidation.h.

Referenced by analyze(), and MixCollectionValidation().

std::vector<edm::InputTag> MixCollectionValidation::PSimHitTags_
private

Definition at line 90 of file MixCollectionValidation.h.

Referenced by analyze(), and MixCollectionValidation().

std::map<std::string,MonitorElement *> MixCollectionValidation::SimHitNrmap_
private

Definition at line 78 of file MixCollectionValidation.h.

Referenced by analyze(), and MixCollectionValidation().

std::map<std::string,MonitorElement *> MixCollectionValidation::SimHitTimemap_
private

Definition at line 79 of file MixCollectionValidation.h.

Referenced by analyze(), and MixCollectionValidation().

std::vector<edm::InputTag> MixCollectionValidation::SimTrackTags_
private

Definition at line 88 of file MixCollectionValidation.h.

Referenced by analyze(), and MixCollectionValidation().

std::vector<edm::InputTag> MixCollectionValidation::SimVertexTags_
private

Definition at line 89 of file MixCollectionValidation.h.

Referenced by analyze(), and MixCollectionValidation().

bool MixCollectionValidation::verbose_
private

Definition at line 72 of file MixCollectionValidation.h.

Referenced by MixCollectionValidation().