CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
HGCalRecHitValidation Class Reference
Inheritance diagram for HGCalRecHitValidation:
DQMEDAnalyzer edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Classes

struct  energysum
 
struct  HitsInfo
 

Public Member Functions

void analyze (const edm::Event &, const edm::EventSetup &) override
 
void bookHistograms (DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (const edm::Run &, const edm::EventSetup &) override
 
 HGCalRecHitValidation (const edm::ParameterSet &)
 
 ~HGCalRecHitValidation () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual void dqmBeginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
 DQMEDAnalyzer ()
 
virtual void dqmEndLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void dqmEndRun (edm::Run const &, edm::EventSetup const &)
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) final
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &, edm::EventSetup const &) final
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::one::EDProducer< edm::EndRunProducer, edm::one::WatchRuns, edm::EndLuminosityBlockProducer, edm::one::WatchLuminosityBlocks, edm::Accumulator >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

Private Member Functions

void fillHitsInfo ()
 
void fillHitsInfo (HitsInfo &hits)
 
void fillOccupancyMap (std::map< int, int > &OccupancyMap, int layer)
 
template<class T1 , class T2 >
void recHitValidation (DetId &detId, int layer, const T1 *geom, T2 it)
 

Private Attributes

std::vector< MonitorElement * > energy_
 
std::vector< MonitorElement * > EtaPhi_Minus_
 
std::vector< MonitorElement * > EtaPhi_Plus_
 
int firstLayer_
 
std::vector< MonitorElement * > HitOccupancy_Minus_
 
std::vector< MonitorElement * > HitOccupancy_Plus_
 
bool ifHCAL_
 
unsigned int layers_
 
MonitorElementMeanHitOccupancy_Minus_
 
MonitorElementMeanHitOccupancy_Plus_
 
std::string nameDetector_
 
std::map< int, int > OccupancyMap_minus
 
std::map< int, int > OccupancyMap_plus
 
edm::EDGetToken recHitSource_
 
int verbosity_
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Protected Member Functions inherited from edm::ProducerBase
ProducesCollector producesCollector ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 41 of file HGCalRecHitValidation.cc.

Constructor & Destructor Documentation

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

Definition at line 91 of file HGCalRecHitValidation.cc.

References Exception, edm::ParameterSet::getParameter(), ifHCAL_, nameDetector_, recHitSource_, and groupFilesInBlocks::temp.

92  : nameDetector_(iConfig.getParameter<std::string>("DetectorName")),
93  ifHCAL_(iConfig.getParameter<bool>("ifHCAL")),
94  verbosity_(iConfig.getUntrackedParameter<int>("Verbosity", 0)),
95  firstLayer_(1) {
96  auto temp = iConfig.getParameter<edm::InputTag>("RecHitSource");
97  if (nameDetector_ == "HGCalEESensitive" || nameDetector_ == "HGCalHESiliconSensitive" ||
98  nameDetector_ == "HGCalHEScintillatorSensitive") {
99  recHitSource_ = consumes<HGCRecHitCollection>(temp);
100  } else if (nameDetector_ == "HCal") {
101  if (ifHCAL_)
102  recHitSource_ = consumes<HBHERecHitCollection>(temp);
103  else
104  recHitSource_ = consumes<HGChebRecHitCollection>(temp);
105  } else {
106  throw cms::Exception("BadHGCRecHitSource") << "HGCal DetectorName given as " << nameDetector_ << " must be: "
107  << "\"HGCalHESiliconSensitive\", \"HGCalHESiliconSensitive\", "
108  << "\"HGCalHEScintillatorSensitive\", or \"HCal\"!";
109  }
110 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
HGCalRecHitValidation::~HGCalRecHitValidation ( )
inlineoverride

Member Function Documentation

void HGCalRecHitValidation::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
override

Definition at line 121 of file HGCalRecHitValidation.cc.

References HcalDetId::depth(), edm::EventID::event(), fillHitsInfo(), relativeConstraints::geom, motionPolicyChamber::geom0, HGCalTopology::geomMode(), edm::EventSetup::get(), edm::Event::getByToken(), HcalEndcap, HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, edm::EventBase::id(), ifHCAL_, edm::ESHandleBase::isValid(), edm::HandleBase::isValid(), HGCalDetId::layer(), HGCScintillatorDetId::layer(), HGCSiliconDetId::layer(), ALCARECOPromptCalibProdSiPixelAli0T_cff::mode, nameDetector_, OccupancyMap_minus, OccupancyMap_plus, convertSQLiteXML::ok, edm::Handle< T >::product(), edm::ESHandle< T >::product(), recHitSource_, recHitValidation(), edm::SortedCollection< T, SORT >::size(), DetId::subdetId(), HGCalGeometry::topology(), HGCalGeometryMode::Trapezoid, and verbosity_.

Referenced by ~HGCalRecHitValidation().

121  {
122  OccupancyMap_plus.clear();
123  OccupancyMap_minus.clear();
124 
125  bool ok(true);
126  unsigned int ntot(0), nused(0);
127  if (nameDetector_ == "HCal") {
129  iSetup.get<CaloGeometryRecord>().get(geom);
130  if (!geom.isValid()) {
131  edm::LogVerbatim("HGCalValidation") << "Cannot get valid HGCalGeometry "
132  << "Object for " << nameDetector_;
133  } else {
134  const CaloGeometry* geom0 = geom.product();
135  if (ifHCAL_) {
137  iEvent.getByToken(recHitSource_, hbhecoll);
138  if (hbhecoll.isValid()) {
139  if (verbosity_ > 0)
140  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " with " << hbhecoll->size() << " element(s)";
141  for (const auto& it : *(hbhecoll.product())) {
142  DetId detId = it.id();
143  ntot++;
144  if (detId.subdetId() == HcalEndcap) {
145  nused++;
146  int layer = HcalDetId(detId).depth();
147  recHitValidation(detId, layer, geom0, &it);
148  }
149  }
150  } else {
151  ok = false;
152  edm::LogVerbatim("HGCalValidation") << "HBHERecHitCollection "
153  << "Handle does not exist !!!";
154  }
155  } else {
157  iEvent.getByToken(recHitSource_, hbhecoll);
158  if (hbhecoll.isValid()) {
159  if (verbosity_ > 0)
160  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " with " << hbhecoll->size() << " element(s)";
161  for (const auto& it : *(hbhecoll.product())) {
162  DetId detId = it.id();
163  ntot++;
164  nused++;
165  int layer = HcalDetId(detId).depth();
166  recHitValidation(detId, layer, geom0, &it);
167  }
168  } else {
169  ok = false;
170  edm::LogVerbatim("HGCalValidation") << "HGChebRecHitCollection "
171  << "Handle does not exist !!!";
172  }
173  }
174  }
175  } else {
177  iSetup.get<IdealGeometryRecord>().get(nameDetector_, geom);
178  if (!geom.isValid()) {
179  edm::LogVerbatim("HGCalValidation") << "Cannot get valid HGCalGeometry "
180  << "Object for " << nameDetector_;
181  } else {
182  const HGCalGeometry* geom0 = geom.product();
184  int geomType = (((mode == HGCalGeometryMode::Hexagon8) || (mode == HGCalGeometryMode::Hexagon8Full))
185  ? 1
186  : ((mode == HGCalGeometryMode::Trapezoid) ? 2 : 0));
187 
188  edm::Handle<HGCRecHitCollection> theRecHitContainers;
189  iEvent.getByToken(recHitSource_, theRecHitContainers);
190  if (theRecHitContainers.isValid()) {
191  if (verbosity_ > 0)
192  edm::LogVerbatim("HGCalValidation")
193  << nameDetector_ << " with " << theRecHitContainers->size() << " element(s)";
194  for (const auto& it : *(theRecHitContainers.product())) {
195  ntot++;
196  nused++;
197  DetId detId = it.id();
198  int layer = ((geomType == 0)
199  ? HGCalDetId(detId).layer()
200  : ((geomType == 1) ? HGCSiliconDetId(detId).layer() : HGCScintillatorDetId(detId).layer()));
201  recHitValidation(detId, layer, geom0, &it);
202  }
203  } else {
204  ok = false;
205  edm::LogVerbatim("HGCalValidation") << "HGCRecHitCollection Handle "
206  << "does not exist !!!";
207  }
208  }
209  }
210  if (ok)
211  fillHitsInfo();
212  if (verbosity_ > 0)
213  edm::LogVerbatim("HGCalValidation") << "Event " << iEvent.id().event() << " with " << ntot << " total and " << nused
214  << " used recHits";
215 }
HGCalGeometryMode::GeometryMode geomMode() const
Geometry mode.
Definition: HGCalTopology.h:79
EventNumber_t event() const
Definition: EventID.h:40
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:525
int depth() const
get the tower depth
Definition: HcalDetId.h:164
std::map< int, int > OccupancyMap_minus
int layer() const
get the layer #
const HGCalTopology & topology() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
bool isValid() const
Definition: HandleBase.h:70
Definition: DetId.h:17
T const * product() const
Definition: Handle.h:69
int layer() const
get the layer #
std::map< int, int > OccupancyMap_plus
edm::EventID id() const
Definition: EventBase.h:59
size_type size() const
T get() const
Definition: EventSetup.h:73
bool isValid() const
Definition: ESHandle.h:44
T const * product() const
Definition: ESHandle.h:86
void recHitValidation(DetId &detId, int layer, const T1 *geom, T2 it)
int layer() const
get the layer #
Definition: HGCalDetId.h:46
void HGCalRecHitValidation::bookHistograms ( DQMStore::IBooker iB,
edm::Run const &  ,
edm::EventSetup const &   
)
overridevirtual

Implements DQMEDAnalyzer.

Definition at line 292 of file HGCalRecHitValidation.cc.

References dqm::dqmstoreimpl::DQMStore::IBooker::book1D(), dqm::dqmstoreimpl::DQMStore::IBooker::book2D(), DEFINE_FWK_MODULE, energy_, EtaPhi_Minus_, EtaPhi_Plus_, firstLayer_, HitOccupancy_Minus_, HitOccupancy_Plus_, createfilelist::int, layers_, MeanHitOccupancy_Minus_, MeanHitOccupancy_Plus_, nameDetector_, pi, and dqm::dqmstoreimpl::DQMStore::IBooker::setCurrentFolder().

Referenced by ~HGCalRecHitValidation().

292  {
293  iB.setCurrentFolder("HGCAL/HGCalRecHitsV/" + nameDetector_);
294  std::ostringstream histoname;
295  for (unsigned int il = 0; il < layers_; ++il) {
296  int ilayer = firstLayer_ + (int)(il);
297  auto istr1 = std::to_string(ilayer);
298  while (istr1.size() < 2) {
299  istr1.insert(0, "0");
300  }
301  histoname.str("");
302  histoname << "HitOccupancy_Plus_layer_" << istr1;
303  HitOccupancy_Plus_.push_back(iB.book1D(histoname.str().c_str(), "RecHitOccupancy_Plus", 100, 0, 10000));
304  histoname.str("");
305  histoname << "HitOccupancy_Minus_layer_" << istr1;
306  HitOccupancy_Minus_.push_back(iB.book1D(histoname.str().c_str(), "RecHitOccupancy_Minus", 100, 0, 10000));
307 
308  histoname.str("");
309  histoname << "EtaPhi_Plus_"
310  << "layer_" << istr1;
311  EtaPhi_Plus_.push_back(iB.book2D(histoname.str().c_str(), "Occupancy", 31, 1.45, 3.0, 72, -CLHEP::pi, CLHEP::pi));
312  histoname.str("");
313  histoname << "EtaPhi_Minus_"
314  << "layer_" << istr1;
315  EtaPhi_Minus_.push_back(
316  iB.book2D(histoname.str().c_str(), "Occupancy", 31, -3.0, -1.45, 72, -CLHEP::pi, CLHEP::pi));
317 
318  histoname.str("");
319  histoname << "energy_layer_" << istr1;
320  energy_.push_back(iB.book1D(histoname.str().c_str(), "energy_", 500, 0, 1));
321  } //loop over layers ends here
322 
323  histoname.str("");
324  histoname << "SUMOfRecHitOccupancy_Plus";
326  iB.book1D(histoname.str().c_str(), "SUMOfRecHitOccupancy_Plus", layers_, -0.5, layers_ - 0.5);
327  histoname.str("");
328  histoname << "SUMOfRecHitOccupancy_Minus";
330  iB.book1D(histoname.str().c_str(), "SUMOfRecHitOccupancy_Minus", layers_, -0.5, layers_ - 0.5);
331 }
std::vector< MonitorElement * > EtaPhi_Minus_
std::vector< MonitorElement * > EtaPhi_Plus_
std::vector< MonitorElement * > HitOccupancy_Minus_
const Double_t pi
MonitorElement * MeanHitOccupancy_Plus_
MonitorElement * MeanHitOccupancy_Minus_
std::vector< MonitorElement * > HitOccupancy_Plus_
std::vector< MonitorElement * > energy_
void HGCalRecHitValidation::dqmBeginRun ( const edm::Run ,
const edm::EventSetup iSetup 
)
override

Definition at line 277 of file HGCalRecHitValidation.cc.

References HGCalDDDConstants::firstLayer(), firstLayer_, edm::EventSetup::get(), HcalDDDRecConstants::getMaxDepth(), HGCalDDDConstants::layers(), layers_, and nameDetector_.

Referenced by ~HGCalRecHitValidation().

277  {
278  if (nameDetector_ == "HCal") {
280  iSetup.get<HcalRecNumberingRecord>().get(pHRNDC);
281  const HcalDDDRecConstants* hcons = &(*pHRNDC);
282  layers_ = hcons->getMaxDepth(1);
283  } else {
285  iSetup.get<IdealGeometryRecord>().get(nameDetector_, pHGDC);
286  const HGCalDDDConstants& hgcons_ = (*pHGDC);
287  layers_ = hgcons_.layers(true);
288  firstLayer_ = hgcons_.firstLayer();
289  }
290 }
unsigned int layers(bool reco) const
int getMaxDepth(const int &type) const
T get() const
Definition: EventSetup.h:73
int firstLayer() const
void HGCalRecHitValidation::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 112 of file HGCalRecHitValidation.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), HLT_2018_cff::InputTag, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by ~HGCalRecHitValidation().

112  {
114  desc.add<std::string>("DetectorName", "HGCalEESensitive");
115  desc.add<edm::InputTag>("RecHitSource", edm::InputTag("HGCalRecHit", "HGCEERecHits"));
116  desc.add<bool>("ifHCAL", false);
117  desc.addUntracked<int>("Verbosity", 0);
118  descriptions.add("hgcalRecHitValidationEE", desc);
119 }
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
void HGCalRecHitValidation::fillHitsInfo ( )
private

Definition at line 255 of file HGCalRecHitValidation.cc.

References HitOccupancy_Minus_, HitOccupancy_Plus_, OccupancyMap_minus, and OccupancyMap_plus.

Referenced by analyze(), recHitValidation(), and ~HGCalRecHitValidation().

255  {
256  for (auto const& itr : OccupancyMap_plus) {
257  int layer = itr.first;
258  int occupancy = itr.second;
259  HitOccupancy_Plus_.at(layer)->Fill(occupancy);
260  }
261 
262  for (auto const& itr : OccupancyMap_minus) {
263  int layer = itr.first;
264  int occupancy = itr.second;
265  HitOccupancy_Minus_.at(layer)->Fill(occupancy);
266  }
267 }
std::vector< MonitorElement * > HitOccupancy_Minus_
std::map< int, int > OccupancyMap_minus
std::map< int, int > OccupancyMap_plus
std::vector< MonitorElement * > HitOccupancy_Plus_
void HGCalRecHitValidation::fillHitsInfo ( HitsInfo hits)
private

Definition at line 269 of file HGCalRecHitValidation.cc.

References HGCalRecHitValidation::HitsInfo::energy, energy_, HGCalRecHitValidation::HitsInfo::eta, EtaPhi_Minus_, EtaPhi_Plus_, HGCalRecHitValidation::HitsInfo::layer, and HGCalRecHitValidation::HitsInfo::phi.

269  {
270  unsigned int ilayer = hits.layer;
271  energy_.at(ilayer)->Fill(hits.energy);
272 
273  EtaPhi_Plus_.at(ilayer)->Fill(hits.eta, hits.phi);
274  EtaPhi_Minus_.at(ilayer)->Fill(hits.eta, hits.phi);
275 }
std::vector< MonitorElement * > EtaPhi_Minus_
std::vector< MonitorElement * > EtaPhi_Plus_
std::vector< MonitorElement * > energy_
void HGCalRecHitValidation::fillOccupancyMap ( std::map< int, int > &  OccupancyMap,
int  layer 
)
private

Definition at line 248 of file HGCalRecHitValidation.cc.

Referenced by recHitValidation(), and ~HGCalRecHitValidation().

248  {
249  if (OccupancyMap.find(layer) != OccupancyMap.end())
250  OccupancyMap[layer]++;
251  else
252  OccupancyMap[layer] = 1;
253 }
template<class T1 , class T2 >
void HGCalRecHitValidation::recHitValidation ( DetId detId,
int  layer,
const T1 *  geom,
T2  it 
)
private

Definition at line 218 of file HGCalRecHitValidation.cc.

References HCALHighEnergyHPDFilter_cfi::energy, HGCalRecHitValidation::HitsInfo::energy, HGCalRecHitValidation::HitsInfo::eta, PV3DBase< T, PVType, FrameType >::eta(), fillHitsInfo(), fillOccupancyMap(), firstLayer_, HGCalRecHitValidation::HitsInfo::layer, OccupancyMap_minus, OccupancyMap_plus, HGCalRecHitValidation::HitsInfo::phi, PV3DBase< T, PVType, FrameType >::phi(), verbosity_, HGCalRecHitValidation::HitsInfo::x, PV3DBase< T, PVType, FrameType >::x(), HGCalRecHitValidation::HitsInfo::y, PV3DBase< T, PVType, FrameType >::y(), HGCalRecHitValidation::HitsInfo::z, and PV3DBase< T, PVType, FrameType >::z().

Referenced by analyze(), and ~HGCalRecHitValidation().

218  {
219  const GlobalPoint& global = geom->getPosition(detId);
220  double energy = it->energy();
221 
222  float globalx = global.x();
223  float globaly = global.y();
224  float globalz = global.z();
225 
226  HitsInfo hinfo;
227  hinfo.energy = energy;
228  hinfo.x = globalx;
229  hinfo.y = globaly;
230  hinfo.z = globalz;
231  hinfo.layer = layer - firstLayer_;
232  hinfo.phi = global.phi();
233  hinfo.eta = global.eta();
234 
235  if (verbosity_ > 1)
236  edm::LogVerbatim("HGCalValidation") << "-------------------------- gx = " << globalx << " gy = " << globaly
237  << " gz = " << globalz << " phi = " << hinfo.phi << " eta = " << hinfo.eta
238  << " lay = " << hinfo.layer;
239 
240  fillHitsInfo(hinfo);
241 
242  if (hinfo.eta > 0)
243  fillOccupancyMap(OccupancyMap_plus, hinfo.layer);
244  else
245  fillOccupancyMap(OccupancyMap_minus, hinfo.layer);
246 }
Geom::Phi< T > phi() const
Definition: PV3DBase.h:66
T y() const
Definition: PV3DBase.h:60
std::map< int, int > OccupancyMap_minus
T z() const
Definition: PV3DBase.h:61
void fillOccupancyMap(std::map< int, int > &OccupancyMap, int layer)
T eta() const
Definition: PV3DBase.h:73
std::map< int, int > OccupancyMap_plus
T x() const
Definition: PV3DBase.h:59

Member Data Documentation

std::vector<MonitorElement*> HGCalRecHitValidation::energy_
private

Definition at line 84 of file HGCalRecHitValidation.cc.

Referenced by bookHistograms(), and fillHitsInfo().

std::vector<MonitorElement*> HGCalRecHitValidation::EtaPhi_Minus_
private

Definition at line 83 of file HGCalRecHitValidation.cc.

Referenced by bookHistograms(), and fillHitsInfo().

std::vector<MonitorElement*> HGCalRecHitValidation::EtaPhi_Plus_
private

Definition at line 82 of file HGCalRecHitValidation.cc.

Referenced by bookHistograms(), and fillHitsInfo().

int HGCalRecHitValidation::firstLayer_
private

Definition at line 78 of file HGCalRecHitValidation.cc.

Referenced by bookHistograms(), dqmBeginRun(), and recHitValidation().

std::vector<MonitorElement*> HGCalRecHitValidation::HitOccupancy_Minus_
private

Definition at line 86 of file HGCalRecHitValidation.cc.

Referenced by bookHistograms(), and fillHitsInfo().

std::vector<MonitorElement*> HGCalRecHitValidation::HitOccupancy_Plus_
private

Definition at line 85 of file HGCalRecHitValidation.cc.

Referenced by bookHistograms(), and fillHitsInfo().

bool HGCalRecHitValidation::ifHCAL_
private

Definition at line 75 of file HGCalRecHitValidation.cc.

Referenced by analyze(), and HGCalRecHitValidation().

unsigned int HGCalRecHitValidation::layers_
private

Definition at line 77 of file HGCalRecHitValidation.cc.

Referenced by bookHistograms(), and dqmBeginRun().

MonitorElement* HGCalRecHitValidation::MeanHitOccupancy_Minus_
private

Definition at line 88 of file HGCalRecHitValidation.cc.

Referenced by bookHistograms().

MonitorElement* HGCalRecHitValidation::MeanHitOccupancy_Plus_
private

Definition at line 87 of file HGCalRecHitValidation.cc.

Referenced by bookHistograms().

std::string HGCalRecHitValidation::nameDetector_
private
std::map<int, int> HGCalRecHitValidation::OccupancyMap_minus
private

Definition at line 80 of file HGCalRecHitValidation.cc.

Referenced by analyze(), fillHitsInfo(), and recHitValidation().

std::map<int, int> HGCalRecHitValidation::OccupancyMap_plus
private

Definition at line 79 of file HGCalRecHitValidation.cc.

Referenced by analyze(), fillHitsInfo(), and recHitValidation().

edm::EDGetToken HGCalRecHitValidation::recHitSource_
private

Definition at line 74 of file HGCalRecHitValidation.cc.

Referenced by analyze(), and HGCalRecHitValidation().

int HGCalRecHitValidation::verbosity_
private

Definition at line 76 of file HGCalRecHitValidation.cc.

Referenced by analyze(), and recHitValidation().