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:
DQMEDAnalyzer edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

virtual void analyze (const edm::Event &, const edm::EventSetup &)
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
 MixCollectionValidation (const edm::ParameterSet &)
 
 ~MixCollectionValidation ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 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
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) 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_
 
std::vector< edm::InputTagHepMCProductTags_
 
int maxbunch_
 
int minbunch_
 
edm::ParameterSet mixObjextsSet_
 
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::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
- 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 34 of file MixCollectionValidation.h.

Constructor & Destructor Documentation

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

Definition at line 22 of file MixCollectionValidation.cc.

References edm::ParameterSet::getParameter(), and mixObjextsSet_.

22  :
23  minbunch_(iConfig.getParameter<int>("minBunch")),
24  maxbunch_(iConfig.getParameter<int>("maxBunch")),
25  verbose_(iConfig.getUntrackedParameter<bool>("verbose",false)),
27 {
28  // Histograms will be defined according to the configuration
29  ParameterSet mixObjextsSet_ = iConfig.getParameter<ParameterSet>("mixObjects");
30 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
MixCollectionValidation::~MixCollectionValidation ( )

Definition at line 32 of file MixCollectionValidation.cc.

33 {
34  // do anything here that needs to be done at desctruction time
35  // (e.g. close files, deallocate resources etc.)
36 }

Member Function Documentation

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 128 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.

129 {
130  using namespace edm;
131 
132  if ( HepMCProductTags_.size() > 0 ) {
133  bool gotHepMCProduct;
135  gotHepMCProduct = iEvent.getByToken(crossingFrame_Hep_Token_, crossingFrame);
136 
137  if (gotHepMCProduct){
138  std::auto_ptr<MixCollection<HepMCProduct> >
139  hepMCProduct (new MixCollection<HepMCProduct>(crossingFrame.product ()));
141 
142  fillGenParticleMulti(hitItr, hepMCProduct, nrHepMCProductH_);
143  }
144  }
145 
146  if ( SimTrackTags_.size() > 0 ) {
147  bool gotSimTrack;
148  edm::Handle<CrossingFrame<SimTrack> > crossingFrame;
149  gotSimTrack = iEvent.getByToken(crossingFrame_SimTr_Token_,crossingFrame);
150 
151  if (gotSimTrack){
152  std::auto_ptr<MixCollection<SimTrack> >
153  simTracks (new MixCollection<SimTrack>(crossingFrame.product ()));
155 
156  fillMultiplicity(hitItr, simTracks, nrSimTrackH_);
157  }
158  }
159 
160  if ( SimVertexTags_.size() > 0 ) {
161  bool gotSimVertex;
162  edm::Handle<CrossingFrame<SimVertex> > crossingFrame;
163  std::string SimVertexLabel = SimVertexTags_[0].label();
164  gotSimVertex = iEvent.getByToken(crossingFrame_SimVtx_Token_, crossingFrame);
165 
166  if (gotSimVertex){
167  std::auto_ptr<MixCollection<SimVertex> >
168  simVerteces (new MixCollection<SimVertex>(crossingFrame.product ()));
170 
171  fillMultiplicity(hitItr, simVerteces, nrSimVertexH_);
172  }
173  }
174 
175  if ( PSimHitTags_.size() > 0 ) {
176 
177  edm::Handle<CrossingFrame<PSimHit> > crossingFrame;
178 
179  for ( int i = 0; i < (int)PSimHitTags_.size(); i++ ) {
180  bool gotPSimHit;
181  gotPSimHit = iEvent.getByToken(crossingFrame_PSimHit_Tokens_[i], crossingFrame);
182 
183  if (gotPSimHit){
184  std::auto_ptr<MixCollection<PSimHit> >
185  simHits (new MixCollection<PSimHit>(crossingFrame.product ()));
186 
188 
190 
192  }
193  }
194  }
195 
196  if ( PCaloHitTags_.size() > 0 ) {
197 
198  edm::Handle<CrossingFrame<PCaloHit> > crossingFrame;
199 
200  for ( int i = 0; i < (int)PCaloHitTags_.size(); i++ ) {
201  bool gotPCaloHit;
202  std::string PCaloHitLabel = PCaloHitTags_[i].label()+PCaloHitTags_[i].instance();
203  gotPCaloHit = iEvent.getByToken(crossingFrame_PCaloHit_Tokens_[i], crossingFrame);
204 
205  if (gotPCaloHit){
206  std::auto_ptr<MixCollection<PCaloHit> >
207  caloHits (new MixCollection<PCaloHit>(crossingFrame.product ()));
208 
210 
211  fillMultiplicity(hitItr, caloHits, CaloHitNrmap_[PCaloHitTags_[i].instance()]);
212 
213  fillCaloHitTime(hitItr, caloHits, CaloHitTimemap_[PCaloHitTags_[i].instance()]);
214  }
215  }
216  }
217 
218 }
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:449
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_
T const * product() const
Definition: Handle.h:81
tuple simHits
Definition: trackerHits.py:16
std::vector< edm::InputTag > SimVertexTags_
std::map< std::string, MonitorElement * > CaloHitTimemap_
void fillGenParticleMulti(T1 &theItr_, T2 &theColl_, MonitorElement *theProfile_)
void MixCollectionValidation::bookHistograms ( DQMStore::IBooker iBooker,
edm::Run const &  iRun,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 38 of file MixCollectionValidation.cc.

References DQMStore::IBooker::bookProfile(), CaloHitNrmap_, CaloHitTimemap_, edm::EDConsumerBase::consumes(), crossingFrame_Hep_Token_, crossingFrame_PCaloHit_Tokens_, crossingFrame_PSimHit_Tokens_, crossingFrame_SimTr_Token_, crossingFrame_SimVtx_Token_, edm::ParameterSet::exists(), edm::ParameterSet::getParameter(), edm::ParameterSet::getParameterNames(), HepMCProductTags_, cuy::ii, HLT_25ns14e33_v1_cff::InputTag, diffTwoXMLs::label, maxbunch_, minbunch_, mixObjextsSet_, mergeVDriftHistosByStation::name, cscdqm::h::names, nbin_, nrHepMCProductH_, nrSimTrackH_, nrSimVertexH_, dbtoconf::object, PCaloHitTags_, PSimHitTags_, DQMStore::IBooker::setCurrentFolder(), SimHitNrmap_, SimHitTimemap_, SimTrackTags_, SimVertexTags_, AlCaHLTBitMon_QueryRunRegistry::string, subdets, o2o::tags, and indexGen::title.

39 {
40  iBooker.setCurrentFolder("MixingV/Mixing");
41 
42  std::vector<std::string> names = mixObjextsSet_.getParameterNames();
43 
44  for (std::vector<std::string>::iterator it = names.begin();it!= names.end();++it)
45  {
47  if (!pset.exists("type")) continue; //to allow replacement by empty pset
48  std::string object = pset.getParameter<std::string>("type");
49  std::vector<InputTag> tags = pset.getParameter<std::vector<InputTag> >("input");
50 
51  if ( object == "HepMCProduct" ) {
52 
53  std::string title = "Log10 Number of GenParticle in " + object;
54  std::string name = "NumberOf" + object;
55  nrHepMCProductH_ = iBooker.bookProfile(name,title,nbin_,minbunch_,maxbunch_+1,40,0.,40.);
56 
58  if (HepMCProductTags_.size()) {
59  crossingFrame_Hep_Token_ = consumes<CrossingFrame<HepMCProduct> >(
61  }
62  }
63  else if ( object == "SimTrack" ) {
64 
65  std::string title = "Log10 Number of " + object;
66  std::string name = "NumberOf" + object;
67  nrSimTrackH_ = iBooker.bookProfile(name,title,nbin_,minbunch_,maxbunch_+1,40,0.,40.);
68 
70  if (SimTrackTags_.size()) {
71  crossingFrame_SimTr_Token_ = consumes<CrossingFrame<SimTrack> >(
72  edm::InputTag("mix", SimTrackTags_[0].label()));
73  }
74  }
75  else if ( object == "SimVertex" ) {
76 
77  std::string title = "Log10 Number of " + object;
78  std::string name = "NumberOf" + object;
79  nrSimVertexH_ = iBooker.bookProfile(name,title,nbin_,minbunch_,maxbunch_+1,40,0.,40.);
80 
82  if (SimVertexTags_.size()) {
83  crossingFrame_SimVtx_Token_ = consumes<CrossingFrame<SimVertex> >(
84  edm::InputTag("mix", SimVertexTags_[0].label()));
85  }
86  }
87  else if ( object == "PSimHit" ) {
88  std::vector<std::string> subdets=pset.getParameter<std::vector<std::string> >("subdets");
89  for (unsigned int ii=0;ii<subdets.size();ii++) {
90 
91  std::string title = "Log10 Number of " + subdets[ii];
92  std::string name = "NumberOf" + subdets[ii];
93  SimHitNrmap_[subdets[ii]] = iBooker.bookProfile(name,title,nbin_,minbunch_,maxbunch_+1,40,0.,40.);
94 
95  title = "Time of " + subdets[ii];
96  name = "TimeOf" + subdets[ii];
97  SimHitTimemap_[subdets[ii]] = iBooker.bookProfile(name,title,nbin_,minbunch_,maxbunch_+1,40,-125.,375.);
98 
99  }
100 
101  PSimHitTags_ = tags;
102  for (auto const & it : PSimHitTags_)
104  edm::InputTag("mix", it.label() + it.instance())));
105  }
106  else if ( object == "PCaloHit" ) {
107  std::vector<std::string> subdets=pset.getParameter<std::vector<std::string> >("subdets");
108  for (unsigned int ii=0;ii<subdets.size();ii++) {
109 
110  std::string title = "Log10 Number of " + subdets[ii];
111  std::string name = "NumberOf" + subdets[ii];
112  CaloHitNrmap_[subdets[ii]] = iBooker.bookProfile(name,title,nbin_,minbunch_,maxbunch_+1,40,0.,40.);
113 
114  title = "Time of " + subdets[ii];
115  name = "TimeOf" + subdets[ii];
116  CaloHitTimemap_[subdets[ii]] = iBooker.bookProfile(name,title,nbin_,minbunch_,maxbunch_+1,40,-125.,375.);
117 
118  }
119 
121  for (auto const & it : PCaloHitTags_)
123  edm::InputTag("mix", it.label() + it.instance())));
124  }
125  }
126 }
T getParameter(std::string const &) const
std::map< std::string, MonitorElement * > CaloHitNrmap_
std::vector< edm::EDGetTokenT< CrossingFrame< PCaloHit > > > crossingFrame_PCaloHit_Tokens_
static const HistoName names[]
std::vector< edm::InputTag > HepMCProductTags_
MonitorElement * bookProfile(Args &&...args)
Definition: DQMStore.h:157
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_
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_
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
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_
template<class T1 , class T2 >
void MixCollectionValidation::fillCaloHitTime ( T1 &  theItr_,
T2 &  theColl_,
MonitorElement theProfile_ 
)
private

Definition at line 271 of file MixCollectionValidation.cc.

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

Referenced by analyze().

271  {
272 
273  for ( theItr_ = theColl_->begin() ; theItr_ != theColl_->end() ; ++theItr_) {
274 
275  int bunch = (*theItr_).eventId().bunchCrossing();
276  float time = (*theItr_).time();
277  int index = bunch - minbunch_;
278  if ( index >= 0 && index < nbin_ ) { theProfile_->Fill(float(bunch+0.5),time); }
279  else { edm::LogWarning("MixCollectionValidation") << "fillCaloHitTime: bunch number " << bunch << " out of range"; }
280 
281  }
282 
283 }
void Fill(long long x)
template<class T1 , class T2 >
void MixCollectionValidation::fillGenParticleMulti ( T1 &  theItr_,
T2 &  theColl_,
MonitorElement theProfile_ 
)
private

Definition at line 239 of file MixCollectionValidation.cc.

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

Referenced by analyze().

239  {
240 
241  std::vector<int> theMult(nbin_);
242 
243  for ( theItr_ = theColl_->begin() ; theItr_ != theColl_->end() ; ++theItr_) {
244 
245  int bunch = theItr_.bunch();
246  int index = bunch - minbunch_;
247  if ( index >= 0 && index < nbin_ ) { theMult[index] += (*theItr_).GetEvent()->particles_size(); }
248  else { edm::LogWarning("MixCollectionValidation") << "fillMultiplicity: bunch number " << bunch << " out of range"; }
249 
250  }
251 
252  for ( int i = 0; i < nbin_; i++ ) {
253  theProfile_->Fill(float(i+minbunch_+0.5),std::log10(std::max(float(0.1),float(theMult[i]))));
254  }
255 }
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 220 of file MixCollectionValidation.cc.

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

Referenced by analyze().

220  {
221 
222  std::vector<int> theMult(nbin_);
223 
224  for ( theItr_ = theColl_->begin() ; theItr_ != theColl_->end() ; ++theItr_) {
225 
226  int bunch = (*theItr_).eventId().bunchCrossing();
227  int index = bunch - minbunch_;
228  if ( index >= 0 && index < nbin_ ) { theMult[index] += 1; }
229  else { edm::LogWarning("MixCollectionValidation") << "fillMultiplicity: bunch number " << bunch << " out of range"; }
230 
231  }
232 
233  for ( int i = 0; i < nbin_; i++ ) {
234  theProfile_->Fill(float(i+minbunch_+0.5),std::log10(std::max(float(0.1),float(theMult[i]))));
235  }
236 }
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 257 of file MixCollectionValidation.cc.

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

Referenced by analyze().

257  {
258 
259  for ( theItr_ = theColl_->begin() ; theItr_ != theColl_->end() ; ++theItr_) {
260 
261  int bunch = (*theItr_).eventId().bunchCrossing();
262  float time = (*theItr_).timeOfFlight();
263  int index = bunch - minbunch_;
264  if ( index >= 0 && index < nbin_ ) { theProfile_->Fill(float(bunch+0.5),time); }
265  else { edm::LogWarning("MixCollectionValidation") << "fillSimHitTime: bunch number " << bunch << " out of range"; }
266 
267  }
268 
269 }
void Fill(long long x)

Member Data Documentation

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

Definition at line 79 of file MixCollectionValidation.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 80 of file MixCollectionValidation.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 60 of file MixCollectionValidation.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 64 of file MixCollectionValidation.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 63 of file MixCollectionValidation.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 61 of file MixCollectionValidation.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 62 of file MixCollectionValidation.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 82 of file MixCollectionValidation.h.

Referenced by analyze(), and bookHistograms().

int MixCollectionValidation::maxbunch_
private

Definition at line 68 of file MixCollectionValidation.h.

Referenced by bookHistograms().

int MixCollectionValidation::minbunch_
private
edm::ParameterSet MixCollectionValidation::mixObjextsSet_
private

Definition at line 43 of file MixCollectionValidation.h.

Referenced by bookHistograms(), and MixCollectionValidation().

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

Definition at line 72 of file MixCollectionValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MixCollectionValidation::nrSimTrackH_
private

Definition at line 73 of file MixCollectionValidation.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* MixCollectionValidation::nrSimVertexH_
private

Definition at line 74 of file MixCollectionValidation.h.

Referenced by analyze(), and bookHistograms().

std::string MixCollectionValidation::outputFile_
private

Definition at line 66 of file MixCollectionValidation.h.

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

Definition at line 86 of file MixCollectionValidation.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 85 of file MixCollectionValidation.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 76 of file MixCollectionValidation.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 77 of file MixCollectionValidation.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 83 of file MixCollectionValidation.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 84 of file MixCollectionValidation.h.

Referenced by analyze(), and bookHistograms().

bool MixCollectionValidation::verbose_
private

Definition at line 70 of file MixCollectionValidation.h.