CMS 3D CMS Logo

List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Static Private Attributes
HGCalSimHitValidation Class Reference
Inheritance diagram for HGCalSimHitValidation:
DQMEDAnalyzer edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >

Classes

struct  energysum
 
struct  hitsinfo
 

Public Member Functions

 HGCalSimHitValidation (const edm::ParameterSet &)
 
 ~HGCalSimHitValidation () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &event, edm::EventSetup const &setup) final
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer ()
 
void endLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) final
 
virtual bool getCanSaveByLumi ()
 
- Public Member Functions inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
 EDProducer ()=default
 
 EDProducer (const EDProducer &)=delete
 
bool hasAbilityToProduceInBeginLumis () const final
 
bool hasAbilityToProduceInBeginProcessBlocks () const final
 
bool hasAbilityToProduceInBeginRuns () const final
 
bool hasAbilityToProduceInEndLumis () const final
 
bool hasAbilityToProduceInEndProcessBlocks () const final
 
bool hasAbilityToProduceInEndRuns () const final
 
const EDProduceroperator= (const EDProducer &)=delete
 

Static Public Member Functions

static void fillDescriptions (edm::ConfigurationDescriptions &descriptions)
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static void globalEndJob (DQMEDAnalyzerGlobalCache const *)
 
static void globalEndLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup, LuminosityBlockContext const *context)
 
static void globalEndRunProduce (edm::Run &run, edm::EventSetup const &setup, RunContext const *context)
 
static std::unique_ptr< DQMEDAnalyzerGlobalCacheinitializeGlobalCache (edm::ParameterSet const &)
 

Protected 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
 
- Protected Member Functions inherited from DQMEDAnalyzer
uint64_t meId () const
 

Private Member Functions

void analyzeHits (std::vector< PCaloHit > &hits)
 
TH1F * createHisto (std::string histname, const int nbins, float minIndexX, float maxIndexX, bool isLogX=true)
 
bool defineGeometry (const DDCompactView *ddViewH)
 
bool defineGeometry (const cms::DDCompactView *ddViewH)
 
void fillHitsInfo (std::pair< hitsinfo, energysum > hit_, unsigned int itimeslice, double esum)
 
void fillMuonTomoHistos (int partialType, std::pair< hitsinfo, energysum > hit_)
 
void fillOccupancyMap (std::map< int, int > &OccupancyMap, int layer)
 
void histoSetting (TH1F *&histo, const char *xTitle, const char *yTitle="", Color_t lineColor=kBlack, Color_t markerColor=kBlack, int linewidth=1)
 
void histoSetting (TH2F *&histo, const char *xTitle, const char *yTitle="", Color_t lineColor=kBlack, Color_t markerColor=kBlack, int linewidth=1)
 

Private Attributes

const std::string caloHitSource_
 
std::vector< MonitorElement * > energy_ [maxTime_]
 
std::vector< MonitorElement * > energyFWCK_
 
std::vector< MonitorElement * > energyFWCN_
 
std::vector< MonitorElement * > energyFWF_
 
std::vector< MonitorElement * > energyPWCK_
 
std::vector< MonitorElement * > energyPWCN_
 
std::vector< MonitorElement * > energyPWF_
 
std::vector< MonitorElement * > EtaPhi_Minus_
 
std::vector< MonitorElement * > EtaPhi_Plus_
 
int firstLayer_
 
const bool fromDDD_
 
const HGCalDDDConstantshgcons_
 
std::vector< MonitorElement * > HitOccupancy_Minus_
 
std::vector< MonitorElement * > HitOccupancy_Plus_
 
std::vector< MonitorElement * > hitXYB_
 
std::vector< MonitorElement * > hitXYFWCK_
 
std::vector< MonitorElement * > hitXYFWCN_
 
std::vector< MonitorElement * > hitXYFWF_
 
unsigned int layers_
 
MonitorElementMeanHitOccupancy_Minus_
 
MonitorElementMeanHitOccupancy_Plus_
 
const std::string nameDetector_
 
unsigned int nTimes_
 
bool symmDet_
 
const std::vector< double > times_
 
const edm::ESGetToken< DDCompactView, IdealGeometryRecordtok_cpv_
 
const edm::ESGetToken< cms::DDCompactView, IdealGeometryRecordtok_cpvc_
 
edm::EDGetTokenT< edm::HepMCProducttok_hepMC_
 
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecordtok_hgcal_
 
edm::EDGetTokenT< edm::PCaloHitContainertok_hits_
 
std::map< uint32_t, HepGeom::Transform3D > transMap_
 
const int verbosity_
 

Static Private Attributes

static const unsigned int maxTime_ = 6
 

Additional Inherited Members

- Public Types inherited from DQMEDAnalyzer
typedef dqm::reco::DQMStore DQMStore
 
typedef dqm::reco::MonitorElement MonitorElement
 
- Public Types inherited from edm::stream::EDProducer< edm::GlobalCache< DQMEDAnalyzerGlobalCache >, edm::EndRunProducer, edm::EndLuminosityBlockProducer, edm::Accumulator >
using CacheTypes = CacheContexts< T... >
 
using GlobalCache = typename CacheTypes::GlobalCache
 
using HasAbility = AbilityChecker< T... >
 
using InputProcessBlockCache = typename CacheTypes::InputProcessBlockCache
 
using LuminosityBlockCache = typename CacheTypes::LuminosityBlockCache
 
using LuminosityBlockContext = LuminosityBlockContextT< LuminosityBlockCache, RunCache, GlobalCache >
 
using LuminosityBlockSummaryCache = typename CacheTypes::LuminosityBlockSummaryCache
 
using RunCache = typename CacheTypes::RunCache
 
using RunContext = RunContextT< RunCache, GlobalCache >
 
using RunSummaryCache = typename CacheTypes::RunSummaryCache
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 
unsigned int streamId_
 

Detailed Description

Definition at line 49 of file HGCalSimHitValidation.cc.

Constructor & Destructor Documentation

◆ HGCalSimHitValidation()

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

Definition at line 128 of file HGCalSimHitValidation.cc.

References nameDetector_.

129  : nameDetector_(iConfig.getParameter<std::string>("DetectorName")),
130  caloHitSource_(iConfig.getParameter<std::string>("CaloHitSource")),
131  times_(iConfig.getParameter<std::vector<double> >("TimeSlices")),
132  verbosity_(iConfig.getUntrackedParameter<int>("Verbosity", 0)),
133  fromDDD_(iConfig.getUntrackedParameter<bool>("fromDDD", true)),
134  tok_hgcal_(esConsumes<HGCalDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(
136  tok_cpv_(esConsumes<DDCompactView, IdealGeometryRecord, edm::Transition::BeginRun>()),
137  tok_cpvc_(esConsumes<cms::DDCompactView, IdealGeometryRecord, edm::Transition::BeginRun>()),
138  symmDet_(true),
139  firstLayer_(1) {
140  tok_hepMC_ = consumes<edm::HepMCProduct>(edm::InputTag("generatorSmeared"));
141  tok_hits_ = consumes<edm::PCaloHitContainer>(edm::InputTag("g4SimHits", caloHitSource_));
142  nTimes_ = (times_.size() > maxTime_) ? maxTime_ : times_.size();
143 }
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
const std::vector< double > times_
edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
T getUntrackedParameter(std::string const &, T const &) const
const std::string nameDetector_
static const unsigned int maxTime_
const std::string caloHitSource_
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
const edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > tok_cpvc_
const edm::ESGetToken< DDCompactView, IdealGeometryRecord > tok_cpv_
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > tok_hgcal_

◆ ~HGCalSimHitValidation()

HGCalSimHitValidation::~HGCalSimHitValidation ( )
inlineoverride

Definition at line 70 of file HGCalSimHitValidation.cc.

70 {}

Member Function Documentation

◆ analyze()

void HGCalSimHitValidation::analyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 157 of file HGCalSimHitValidation.cc.

References analyzeHits(), edm::HepMCProduct::GetEvent(), iEvent, edm::HandleBase::isValid(), dqmdumpme::k, AlCaHLTBitMon_ParallelJobs::p, tok_hepMC_, tok_hits_, and verbosity_.

157  {
158  //Generator input
159  if (verbosity_ > 0) {
161  iEvent.getByToken(tok_hepMC_, evtMC);
162  if (!evtMC.isValid()) {
163  edm::LogVerbatim("HGCalValidation") << "no HepMCProduct found";
164  } else {
165  const HepMC::GenEvent* myGenEvent = evtMC->GetEvent();
166  unsigned int k(0);
167  for (HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin(); p != myGenEvent->particles_end();
168  ++p, ++k) {
169  edm::LogVerbatim("HGCalValidation") << "Particle[" << k << "] with pt " << (*p)->momentum().perp() << " eta "
170  << (*p)->momentum().eta() << " phi " << (*p)->momentum().phi();
171  }
172  }
173  }
174 
175  //Now the hits
176  edm::Handle<edm::PCaloHitContainer> theCaloHitContainers;
177  iEvent.getByToken(tok_hits_, theCaloHitContainers);
178  if (theCaloHitContainers.isValid()) {
179  if (verbosity_ > 0)
180  edm::LogVerbatim("HGCalValidation") << " PcalohitItr = " << theCaloHitContainers->size();
181  std::vector<PCaloHit> caloHits;
182  caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
183  analyzeHits(caloHits);
184  } else if (verbosity_ > 0) {
185  edm::LogVerbatim("HGCalValidation") << "PCaloHitContainer does not exist!";
186  }
187 }
Log< level::Info, true > LogVerbatim
edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
void analyzeHits(std::vector< PCaloHit > &hits)
int iEvent
Definition: GenABIO.cc:224
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:37
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
bool isValid() const
Definition: HandleBase.h:70

◆ analyzeHits()

void HGCalSimHitValidation::analyzeHits ( std::vector< PCaloHit > &  hits)
private

Definition at line 189 of file HGCalSimHitValidation.cc.

References hgcalTopologyTester_cfi::cell2, HGCSiliconDetId::cellU(), HGCSiliconDetId::cellV(), TauDecayModes::dec, HCALHighEnergyHPDFilter_cfi::energy, PVValHelper::eta, HGCalSimHitValidation::energysum::eTime, HGCalSimHitValidation::energysum::etotal, fillHitsInfo(), fillMuonTomoHistos(), fillOccupancyMap(), firstLayer_, hgcons_, HitOccupancy_Minus_, HitOccupancy_Plus_, hfClusterShapes_cfi::hits, mps_fire::i, HGCScintillatorDetId::ietaAbs(), HGCScintillatorDetId::iphi(), dqmdumpme::k, HGCScintillatorDetId::layer(), HGCSiliconDetId::layer(), phase1PixelTopology::layer, HGCalDDDConstants::locateCell(), HGCalDDDConstants::locateCellTrap(), nameDetector_, nTimes_, or, hgcalPerformanceValidation::orient, HGCalDDDConstants::tileTrapezoid(), protons_cff::time, times_, HGCScintillatorDetId::type(), HGCSiliconDetId::type(), HGCalTestNumbering::unpackHexagonIndex(), verbosity_, HGCalDDDConstants::waferHexagon8(), HGCalDDDConstants::waferType(), HGCSiliconDetId::waferU(), HGCSiliconDetId::waferV(), HGCalDDDConstants::waferZ(), geometryCSVtoXML::xy, HGCScintillatorDetId::zside(), HGCSiliconDetId::zside(), and ecaldqm::zside().

Referenced by analyze().

189  {
190  std::map<int, int> OccupancyMap_plus, OccupancyMap_minus;
191  OccupancyMap_plus.clear();
192  OccupancyMap_minus.clear();
193 
194  std::map<uint32_t, std::pair<hitsinfo, energysum> > map_hits;
195  map_hits.clear();
196 
197  if (verbosity_ > 0)
198  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " with " << hits.size() << " PcaloHit elements";
199  unsigned int nused(0);
200  for (unsigned int i = 0; i < hits.size(); i++) {
201  double energy = hits[i].energy();
202  double time = hits[i].time();
203  uint32_t id_ = hits[i].id();
204  int cell, sector, subsector(0), layer, zside;
205  int cell2(0), type(0);
206  if (hgcons_->waferHexagon8()) {
207  HGCSiliconDetId detId = HGCSiliconDetId(id_);
208  cell = detId.cellU();
209  cell2 = detId.cellV();
210  sector = detId.waferU();
211  subsector = detId.waferV();
212  type = detId.type();
213  layer = detId.layer();
214  zside = detId.zside();
215  } else if (hgcons_->tileTrapezoid()) {
217  sector = detId.ietaAbs();
218  cell = detId.iphi();
219  subsector = 1;
220  type = detId.type();
221  layer = detId.layer();
222  zside = detId.zside();
223  } else {
224  int subdet;
225  HGCalTestNumbering::unpackHexagonIndex(id_, subdet, zside, layer, sector, type, cell);
226  }
227  nused++;
228  if (verbosity_ > 1)
229  edm::LogVerbatim("HGCalValidation")
230  << "Detector " << nameDetector_ << " zside = " << zside << " sector|wafer = " << sector << ":" << subsector
231  << " type = " << type << " layer = " << layer << " cell = " << cell << ":" << cell2 << " energy = " << energy
232  << " energyem = " << hits[i].energyEM() << " energyhad = " << hits[i].energyHad() << " time = " << time;
233 
234  HepGeom::Point3D<float> gcoord;
235  std::pair<float, float> xy;
236  if (hgcons_->waferHexagon8()) {
237  xy = hgcons_->locateCell(layer, sector, subsector, cell, cell2, false, true);
238  } else if (hgcons_->tileTrapezoid()) {
239  xy = hgcons_->locateCellTrap(layer, sector, cell, false);
240  } else {
241  xy = hgcons_->locateCell(cell, layer, sector, false);
242  }
243  double zp = hgcons_->waferZ(layer, false);
244  if (zside < 0)
245  zp = -zp;
246  float xp = (zp < 0) ? -xy.first : xy.first;
247  gcoord = HepGeom::Point3D<float>(xp, xy.second, zp);
248  double tof = (gcoord.mag() * CLHEP::mm) / CLHEP::c_light;
249  if (verbosity_ > 1)
250  edm::LogVerbatim("HGCalValidation")
251  << std::hex << id_ << std::dec << " global coordinate " << gcoord << " time " << time << ":" << tof;
252  time -= tof;
253 
254  energysum esum;
255  hitsinfo hinfo;
256  if (map_hits.count(id_) != 0) {
257  hinfo = map_hits[id_].first;
258  esum = map_hits[id_].second;
259  } else {
260  hinfo.x = gcoord.x();
261  hinfo.y = gcoord.y();
262  hinfo.z = gcoord.z();
263  hinfo.sector = sector;
264  hinfo.sector2 = subsector;
265  hinfo.cell = cell;
266  hinfo.cell2 = cell2;
267  hinfo.type = type;
268  hinfo.layer = layer - firstLayer_;
269  hinfo.phi = gcoord.getPhi();
270  hinfo.eta = gcoord.getEta();
271  }
272  esum.etotal += energy;
273  for (unsigned int k = 0; k < nTimes_; ++k) {
274  if (time > 0 && time < times_[k])
275  esum.eTime[k] += energy;
276  }
277 
278  if (verbosity_ > 1)
279  edm::LogVerbatim("HGCalValidation") << " ----------------------- gx = " << hinfo.x << " gy = " << hinfo.y
280  << " gz = " << hinfo.z << " phi = " << hinfo.phi << " eta = " << hinfo.eta;
281  map_hits[id_] = std::pair<hitsinfo, energysum>(hinfo, esum);
282  }
283  if (verbosity_ > 0)
284  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " with " << map_hits.size()
285  << " detector elements being hit";
286 
287  std::map<uint32_t, std::pair<hitsinfo, energysum> >::iterator itr;
288  for (itr = map_hits.begin(); itr != map_hits.end(); ++itr) {
289  hitsinfo hinfo = (*itr).second.first;
290  energysum esum = (*itr).second.second;
291  int layer = hinfo.layer;
292  double eta = hinfo.eta;
293  int type, part, orient;
294  int partialType = -1;
295  if (nameDetector_ == "HGCalEESensitive" or nameDetector_ == "HGCalHESiliconSensitive") {
296  HGCSiliconDetId detId = HGCSiliconDetId((*itr).first);
297  std::tie(type, part, orient) = hgcons_->waferType(detId);
298  partialType = part;
299  }
300 
301  for (unsigned int itimeslice = 0; itimeslice < nTimes_; itimeslice++) {
302  fillHitsInfo((*itr).second, itimeslice, esum.eTime[itimeslice]);
303  }
304 
305  if (eta > 0.0)
306  fillOccupancyMap(OccupancyMap_plus, layer);
307  else
308  fillOccupancyMap(OccupancyMap_minus, layer);
309 
310  fillMuonTomoHistos(partialType, (*itr).second);
311  }
312  if (verbosity_ > 0)
313  edm::LogVerbatim("HGCalValidation") << "With map:used:total " << hits.size() << "|" << nused << "|"
314  << map_hits.size() << " hits";
315 
316  for (auto const& itr : OccupancyMap_plus) {
317  int layer = itr.first;
318  int occupancy = itr.second;
319  HitOccupancy_Plus_.at(layer)->Fill(occupancy);
320  }
321  for (auto const& itr : OccupancyMap_minus) {
322  int layer = itr.first;
323  int occupancy = itr.second;
324  HitOccupancy_Minus_.at(layer)->Fill(occupancy);
325  }
326 }
double waferZ(int layer, bool reco) const
Log< level::Info, true > LogVerbatim
void fillOccupancyMap(std::map< int, int > &OccupancyMap, int layer)
std::vector< MonitorElement * > HitOccupancy_Plus_
const std::vector< double > times_
int cellU() const
get the cell #&#39;s in u,v or in x,y
bool waferHexagon8() const
int zside(DetId const &)
std::vector< MonitorElement * > HitOccupancy_Minus_
int type() const
get/set the type
constexpr std::array< uint8_t, layerIndexSize > layer
int layer() const
get the layer #
const std::string nameDetector_
int iphi() const
get the phi index
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
int layer() const
get the layer #
int waferType(DetId const &id, bool fromFile=false) const
int waferU() const
int zside() const
get the z-side of the cell (1/-1)
bool tileTrapezoid() const
int waferV() const
part
Definition: HCALResponse.h:20
int zside() const
get the z-side of the cell (1/-1)
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
int cellV() const
const HGCalDDDConstants * hgcons_
int type() const
get the type
void fillMuonTomoHistos(int partialType, std::pair< hitsinfo, energysum > hit_)
void fillHitsInfo(std::pair< hitsinfo, energysum > hit_, unsigned int itimeslice, double esum)
static void unpackHexagonIndex(const uint32_t &idx, int &subdet, int &z, int &lay, int &wafer, int &celltyp, int &cell)
std::pair< float, float > locateCellTrap(int lay, int ieta, int iphi, bool reco) const

◆ bookHistograms()

void HGCalSimHitValidation::bookHistograms ( DQMStore::IBooker iB,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Implements DQMEDAnalyzer.

Definition at line 511 of file HGCalSimHitValidation.cc.

References dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), createHisto(), energy_, energyFWCK_, energyFWCN_, energyFWF_, energyPWCK_, energyPWCN_, energyPWF_, EtaPhi_Minus_, EtaPhi_Plus_, firstLayer_, histoSetting(), HitOccupancy_Minus_, HitOccupancy_Plus_, hitXYB_, hitXYFWCK_, hitXYFWCN_, hitXYFWF_, layers_, MeanHitOccupancy_Minus_, MeanHitOccupancy_Plus_, nameDetector_, nTimes_, or, pi, dqm::implementation::NavigatorBase::setCurrentFolder(), and cond::impl::to_string().

511  {
512  iB.setCurrentFolder("HGCAL/HGCalSimHitsV/" + nameDetector_);
513 
514  std::ostringstream histoname;
515  for (unsigned int il = 0; il < layers_; ++il) {
516  int ilayer = firstLayer_ + static_cast<int>(il);
517  auto istr1 = std::to_string(ilayer);
518  while (istr1.size() < 2) {
519  istr1.insert(0, "0");
520  }
521  histoname.str("");
522  histoname << "HitOccupancy_Plus_layer_" << istr1;
523  HitOccupancy_Plus_.push_back(iB.book1D(histoname.str().c_str(), "HitOccupancy_Plus", 501, -0.5, 500.5));
524  histoname.str("");
525  histoname << "HitOccupancy_Minus_layer_" << istr1;
526  HitOccupancy_Minus_.push_back(iB.book1D(histoname.str().c_str(), "HitOccupancy_Minus", 501, -0.5, 500.5));
527 
528  histoname.str("");
529  histoname << "EtaPhi_Plus_"
530  << "layer_" << istr1;
531  EtaPhi_Plus_.push_back(iB.book2D(histoname.str().c_str(), "Occupancy", 31, 1.45, 3.0, 72, -CLHEP::pi, CLHEP::pi));
532  histoname.str("");
533  histoname << "EtaPhi_Minus_"
534  << "layer_" << istr1;
535  EtaPhi_Minus_.push_back(
536  iB.book2D(histoname.str().c_str(), "Occupancy", 31, -3.0, -1.45, 72, -CLHEP::pi, CLHEP::pi));
537 
538  for (unsigned int itimeslice = 0; itimeslice < nTimes_; itimeslice++) {
539  histoname.str("");
540  histoname << "energy_time_" << itimeslice << "_layer_" << istr1;
541  energy_[itimeslice].push_back(iB.book1D(histoname.str().c_str(), "energy_", 100, 0, 0.1));
542  }
543 
545  if (nameDetector_ == "HGCalEESensitive" or nameDetector_ == "HGCalHESiliconSensitive") {
546  histoname.str("");
547  histoname << "energy_FullWafer_Fine_layer_" << istr1;
548  TH1F* hEdepFWF = createHisto(histoname.str(), 100, 0., 400., false);
549  histoSetting(hEdepFWF, "Eloss (keV)", "", kRed, kRed, 2);
550  energyFWF_.push_back(iB.book1D(histoname.str().c_str(), hEdepFWF));
551  hEdepFWF->Delete();
552 
553  histoname.str("");
554  histoname << "energy_FullWafer_CoarseThin_layer_" << istr1;
555  TH1F* hEdepFWCN = createHisto(histoname.str(), 100, 0., 400., false);
556  histoSetting(hEdepFWCN, "Eloss (keV)", "", kGreen + 1, kGreen + 1, 2);
557  energyFWCN_.push_back(iB.book1D(histoname.str().c_str(), hEdepFWCN));
558  hEdepFWCN->Delete();
559 
560  histoname.str("");
561  histoname << "energy_FullWafer_CoarseThick_layer_" << istr1;
562  TH1F* hEdepFWCK = createHisto(histoname.str(), 100, 0., 400., false);
563  histoSetting(hEdepFWCK, "Eloss (keV)", "", kMagenta, kMagenta, 2);
564  energyFWCK_.push_back(iB.book1D(histoname.str().c_str(), hEdepFWCK));
565  hEdepFWCK->Delete();
566  }
567 
569 
571  if (nameDetector_ == "HGCalEESensitive" or nameDetector_ == "HGCalHESiliconSensitive") {
572  histoname.str("");
573  histoname << "energy_PartialWafer_Fine_layer_" << istr1;
574  TH1F* hEdepPWF = createHisto(histoname.str(), 100, 0., 400., false);
575  histoSetting(hEdepPWF, "Eloss (keV)", "", kRed, kRed, 2);
576  energyPWF_.push_back(iB.book1D(histoname.str().c_str(), hEdepPWF));
577  hEdepPWF->Delete();
578 
579  histoname.str("");
580  histoname << "energy_PartialWafer_CoarseThin_layer_" << istr1;
581  TH1F* hEdepPWCN = createHisto(histoname.str(), 100, 0., 400., false);
582  histoSetting(hEdepPWCN, "Eloss (keV)", "", kGreen + 1, kGreen + 1, 2);
583  energyPWCN_.push_back(iB.book1D(histoname.str().c_str(), hEdepPWCN));
584  hEdepPWCN->Delete();
585 
586  histoname.str("");
587  histoname << "energy_PartialWafer_CoarseThick_layer_" << istr1;
588  TH1F* hEdepPWCK = createHisto(histoname.str(), 100, 0., 400., false);
589  histoSetting(hEdepPWCK, "Eloss (keV)", "", kMagenta, kMagenta, 2);
590  energyPWCK_.push_back(iB.book1D(histoname.str().c_str(), hEdepPWCK));
591  hEdepPWCK->Delete();
592  }
594 
595  // ///////////// Histograms for the XY distribution of fired cells/scintillator tiles ///////////////
596  if (nameDetector_ == "HGCalEESensitive" or nameDetector_ == "HGCalHESiliconSensitive") {
597  histoname.str("");
598  histoname << "hitXY_FullWafer_Fine_layer_" << istr1;
599  TH2F* hitXYFWF = new TH2F(
600  Form("hitXYFWF_%s", histoname.str().c_str()), histoname.str().c_str(), 100, -300., 300., 100, -300., 300.);
601  histoSetting(hitXYFWF, "x (cm)", "y (cm)", kRed, kRed);
602  hitXYFWF_.push_back(iB.book2D(histoname.str().c_str(), hitXYFWF));
603  hitXYFWF->Delete();
604 
605  histoname.str("");
606  histoname << "hitXY_FullWafer_CoarseThin_layer_" << istr1;
607  TH2F* hitXYFWCN = new TH2F(
608  Form("hitXYFWCN_%s", histoname.str().c_str()), histoname.str().c_str(), 100, -300., 300., 100, -300., 300.);
609  histoSetting(hitXYFWCN, "x (cm)", "y (cm)", kGreen + 1, kGreen + 1);
610  hitXYFWCN_.push_back(iB.book2D(histoname.str().c_str(), hitXYFWCN));
611  hitXYFWCN->Delete();
612 
613  histoname.str("");
614  histoname << "hitXY_FullWafer_CoarseThick_layer_" << istr1;
615  TH2F* hitXYFWCK = new TH2F(
616  Form("hitXYFWCK_%s", histoname.str().c_str()), histoname.str().c_str(), 100, -300., 300., 100, -300., 300.);
617  histoSetting(hitXYFWCK, "x (cm)", "y (cm)", kMagenta, kMagenta);
618  hitXYFWCK_.push_back(iB.book2D(histoname.str().c_str(), hitXYFWCK));
619  hitXYFWCK->Delete();
620  }
621 
622  if (nameDetector_ == "HGCalHEScintillatorSensitive") {
623  histoname.str("");
624  histoname << "hitXY_Scintillator_layer_" << istr1;
625  TH2F* hitXYB = new TH2F(
626  Form("hitXYB_%s", histoname.str().c_str()), histoname.str().c_str(), 100, -300., 300., 100, -300., 300.);
627  histoSetting(hitXYB, "x (cm)", "y (cm)", kBlue, kBlue);
628  hitXYB_.push_back(iB.book2D(histoname.str().c_str(), hitXYB));
629  hitXYB->Delete();
630  }
632  }
633  MeanHitOccupancy_Plus_ = iB.book1D("MeanHitOccupancy_Plus", "MeanHitOccupancy_Plus", layers_, 0.5, layers_ + 0.5);
634  MeanHitOccupancy_Minus_ = iB.book1D("MeanHitOccupancy_Minus", "MeanHitOccupancy_Minus", layers_, 0.5, layers_ + 0.5);
635 }
MonitorElement * MeanHitOccupancy_Plus_
std::vector< MonitorElement * > HitOccupancy_Plus_
virtual void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:32
std::string to_string(const V &value)
Definition: OMSAccess.h:71
std::vector< MonitorElement * > energyPWF_
std::vector< MonitorElement * > HitOccupancy_Minus_
MonitorElement * MeanHitOccupancy_Minus_
const Double_t pi
std::vector< MonitorElement * > energyPWCN_
const std::string nameDetector_
std::vector< MonitorElement * > hitXYFWCK_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
TH1F * createHisto(std::string histname, const int nbins, float minIndexX, float maxIndexX, bool isLogX=true)
std::vector< MonitorElement * > energyFWF_
std::vector< MonitorElement * > EtaPhi_Plus_
std::vector< MonitorElement * > energyFWCN_
std::vector< MonitorElement * > energyFWCK_
std::vector< MonitorElement * > hitXYFWF_
std::vector< MonitorElement * > energyPWCK_
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
std::vector< MonitorElement * > energy_[maxTime_]
void histoSetting(TH1F *&histo, const char *xTitle, const char *yTitle="", Color_t lineColor=kBlack, Color_t markerColor=kBlack, int linewidth=1)
std::vector< MonitorElement * > EtaPhi_Minus_
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
std::vector< MonitorElement * > hitXYFWCN_
std::vector< MonitorElement * > hitXYB_

◆ createHisto()

TH1F * HGCalSimHitValidation::createHisto ( std::string  histname,
const int  nbins,
float  minIndexX,
float  maxIndexX,
bool  isLogX = true 
)
private

Definition at line 637 of file HGCalSimHitValidation.cc.

References PVValHelper::dx, gpuVertexFinder::hist, mps_fire::i, LaserClient_cfi::nbins, and fw3dlego::xbins.

Referenced by bookHistograms().

638  {
639  TH1F* hist = nullptr;
640  if (isLogX) {
641  Double_t xbins[nbins + 1];
642  double dx = (maxIndexX - minIndexX) / nbins;
643  for (int i = 0; i <= nbins; i++) {
644  xbins[i] = TMath::Power(10, (minIndexX + i * dx));
645  }
646  hist = new TH1F(Form("hEdep_%s", histname.c_str()), histname.c_str(), nbins, xbins);
647  } else {
648  hist = new TH1F(Form("hEdep_%s", histname.c_str()), histname.c_str(), nbins, minIndexX, maxIndexX);
649  }
650  return hist;
651 }
const double xbins[]
__shared__ Hist hist

◆ defineGeometry() [1/2]

bool HGCalSimHitValidation::defineGeometry ( const DDCompactView ddViewH)
private

Definition at line 404 of file HGCalSimHitValidation.cc.

References DDTrap::alpha1(), filterCSVwithJSON::copy, DDFilteredView::copyNumbers(), ALCARECOTkAlBeamHalo_cff::filter, DDFilteredView::firstChild(), HGCalDDDConstants::geomMode(), hgcons_, DDFilteredView::logicalPart(), Skims_PA_cff::name, nameDetector_, DDFilteredView::next(), HGCalTestNumbering::packSquareIndex(), idealTransformation::rotation, DDFilteredView::rotation(), fileinputsource_cfi::sec, mkfit::Const::sol, DDLogicalPart::solid(), HGCalGeometryMode::Square, AlCaHLTBitMon_QueryRunRegistry::string, symmDet_, DDFilteredView::translation(), transMap_, funct::true, verbosity_, x, y, and z.

Referenced by dqmBeginRun().

404  {
405  if (verbosity_ > 0)
406  edm::LogVerbatim("HGCalValidation") << "Initialize HGCalDDDConstants (DDD) for " << nameDetector_ << " : "
407  << hgcons_;
408 
410  const DDCompactView& cview = *ddViewH;
411  std::string attribute = "Volume";
413 
415  DDFilteredView fv(cview, filter);
416  bool dodet = fv.firstChild();
417 
418  while (dodet) {
419  const DDSolid& sol = fv.logicalPart().solid();
420  const std::string& name = sol.name().fullname();
421  int isd = (name.find(nameDetector_) == std::string::npos) ? -1 : 1;
422  if (isd > 0) {
423  std::vector<int> copy = fv.copyNumbers();
424  int nsiz = static_cast<int>(copy.size());
425  int lay = (nsiz > 0) ? copy[nsiz - 1] : -1;
426  int sec = (nsiz > 1) ? copy[nsiz - 2] : -1;
427  int zp = (nsiz > 3) ? copy[nsiz - 4] : -1;
428  if (zp != 1)
429  zp = -1;
430  const DDTrap& trp = static_cast<DDTrap>(sol);
431  int subs = (trp.alpha1() > 0 ? 1 : 0);
432  symmDet_ = (trp.alpha1() == 0 ? true : false);
433  uint32_t id = HGCalTestNumbering::packSquareIndex(zp, lay, sec, subs, 0);
434  DD3Vector x, y, z;
435  fv.rotation().GetComponents(x, y, z);
436  const CLHEP::HepRep3x3 rotation(x.X(), y.X(), z.X(), x.Y(), y.Y(), z.Y(), x.Z(), y.Z(), z.Z());
437  const CLHEP::HepRotation hr(rotation);
438  const CLHEP::Hep3Vector h3v(fv.translation().X(), fv.translation().Y(), fv.translation().Z());
439  const HepGeom::Transform3D ht3d(hr, h3v);
440  transMap_.insert(std::make_pair(id, ht3d));
441  if (verbosity_ > 2)
442  edm::LogVerbatim("HGCalValidation") << HGCalDetId(id) << " Transform using " << h3v << " and " << hr;
443  }
444  dodet = fv.next();
445  }
446  if (verbosity_ > 0)
447  edm::LogVerbatim("HGCalValidation") << "Finds " << transMap_.size() << " elements and SymmDet_ = " << symmDet_;
448  }
449  return true;
450 }
Log< level::Info, true > LogVerbatim
HGCalGeometryMode::GeometryMode geomMode() const
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
const std::string nameDetector_
Interface to a Trapezoid.
Definition: DDSolid.h:88
Definition: value.py:1
constexpr float sol
Definition: Config.h:48
double alpha1(void) const
Angle with respect to the y axis from the centre of the side at y=-pDy1 to the centre at y=+pDy1 of t...
Definition: DDSolid.cc:147
std::map< uint32_t, HepGeom::Transform3D > transMap_
const HGCalDDDConstants * hgcons_
static uint32_t packSquareIndex(int z, int lay, int sec, int subsec, int cell)

◆ defineGeometry() [2/2]

bool HGCalSimHitValidation::defineGeometry ( const cms::DDCompactView ddViewH)
private

Definition at line 452 of file HGCalSimHitValidation.cc.

References filterCSVwithJSON::copy, cms::DDFilteredView::copyNos(), ALCARECOTkAlBeamHalo_cff::filter, cms::DDFilteredView::firstChild(), HGCalDDDConstants::geomMode(), hgcons_, Skims_PA_cff::name, cms::DDFilteredView::name(), nameDetector_, HGCalTestNumbering::packSquareIndex(), cms::DDFilteredView::parameters(), idealTransformation::rotation, cms::DDFilteredView::rotation(), fileinputsource_cfi::sec, HGCalGeometryMode::Square, symmDet_, cms::DDFilteredView::translation(), transMap_, funct::true, verbosity_, x, y, and z.

452  {
453  if (verbosity_ > 0)
454  edm::LogVerbatim("HGCalValidation") << "Initialize HGCalDDDConstants (DD4hep) for " << nameDetector_ << " : "
455  << hgcons_;
456 
458  const cms::DDCompactView& cview = *ddViewH;
459  const cms::DDFilter filter("Volume", nameDetector_);
460  cms::DDFilteredView fv(cview, filter);
461 
462  while (fv.firstChild()) {
463  const auto& name = fv.name();
464  int isd = (name.find(nameDetector_) == std::string::npos) ? -1 : 1;
465  if (isd > 0) {
466  const auto& copy = fv.copyNos();
467  int nsiz = static_cast<int>(copy.size());
468  int lay = (nsiz > 0) ? copy[0] : -1;
469  int sec = (nsiz > 1) ? copy[1] : -1;
470  int zp = (nsiz > 3) ? copy[3] : -1;
471  if (zp != 1)
472  zp = -1;
473  const auto& pars = fv.parameters();
474  int subs = (pars[6] > 0 ? 1 : 0);
475  symmDet_ = (pars[6] == 0 ? true : false);
476  uint32_t id = HGCalTestNumbering::packSquareIndex(zp, lay, sec, subs, 0);
477  DD3Vector x, y, z;
478  fv.rotation().GetComponents(x, y, z);
479  const CLHEP::HepRep3x3 rotation(x.X(), y.X(), z.X(), x.Y(), y.Y(), z.Y(), x.Z(), y.Z(), z.Z());
480  const CLHEP::HepRotation hr(rotation);
481  const CLHEP::Hep3Vector h3v(fv.translation().X(), fv.translation().Y(), fv.translation().Z());
482  const HepGeom::Transform3D ht3d(hr, h3v);
483  transMap_.insert(std::make_pair(id, ht3d));
484  if (verbosity_ > 2)
485  edm::LogVerbatim("HGCalValidation") << HGCalDetId(id) << " Transform using " << h3v << " and " << hr;
486  }
487  }
488  if (verbosity_ > 0)
489  edm::LogVerbatim("HGCalValidation") << "Finds " << transMap_.size() << " elements and SymmDet_ = " << symmDet_;
490  }
491  return true;
492 }
Log< level::Info, true > LogVerbatim
HGCalGeometryMode::GeometryMode geomMode() const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > DD3Vector
const std::string nameDetector_
std::map< uint32_t, HepGeom::Transform3D > transMap_
const HGCalDDDConstants * hgcons_
static uint32_t packSquareIndex(int z, int lay, int sec, int subsec, int cell)

◆ dqmBeginRun()

void HGCalSimHitValidation::dqmBeginRun ( const edm::Run ,
const edm::EventSetup iSetup 
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 495 of file HGCalSimHitValidation.cc.

References defineGeometry(), HGCalDDDConstants::firstLayer(), firstLayer_, fromDDD_, edm::EventSetup::getData(), hgcons_, HGCalDDDConstants::layers(), layers_, nameDetector_, tok_cpv_, tok_cpvc_, tok_hgcal_, and verbosity_.

495  {
496  hgcons_ = &iSetup.getData(tok_hgcal_);
497  layers_ = hgcons_->layers(false);
499  if (fromDDD_) {
500  const DDCompactView* pDD = &iSetup.getData(tok_cpv_);
501  defineGeometry(pDD);
502  } else {
503  const cms::DDCompactView* pDD = &iSetup.getData(tok_cpvc_);
504  defineGeometry(pDD);
505  }
506  if (verbosity_ > 0)
507  edm::LogVerbatim("HGCalValidation") << nameDetector_ << " defined with " << layers_ << " Layers with first at "
508  << firstLayer_;
509 }
Log< level::Info, true > LogVerbatim
bool defineGeometry(const DDCompactView *ddViewH)
int firstLayer() const
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
const std::string nameDetector_
unsigned int layers(bool reco) const
bool getData(T &iHolder) const
Definition: EventSetup.h:122
const edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > tok_cpvc_
const HGCalDDDConstants * hgcons_
const edm::ESGetToken< DDCompactView, IdealGeometryRecord > tok_cpv_
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > tok_hgcal_

◆ fillDescriptions()

void HGCalSimHitValidation::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 145 of file HGCalSimHitValidation.cc.

References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, and AlCaHLTBitMon_QueryRunRegistry::string.

145  {
147  std::vector<double> times = {25.0, 1000.0};
148  desc.add<std::string>("DetectorName", "HGCalEESensitive");
149  desc.add<std::string>("CaloHitSource", "HGCHitsEE");
150  desc.add<std::vector<double> >("TimeSlices", times);
151  desc.addUntracked<int>("Verbosity", 0);
152  desc.addUntracked<bool>("TestNumber", true);
153  desc.addUntracked<bool>("fromDDD", true);
154  descriptions.add("hgcalSimHitValidationEE", desc);
155 }
void add(std::string const &label, ParameterSetDescription const &psetDescription)

◆ fillHitsInfo()

void HGCalSimHitValidation::fillHitsInfo ( std::pair< hitsinfo, energysum hit_,
unsigned int  itimeslice,
double  esum 
)
private

Definition at line 336 of file HGCalSimHitValidation.cc.

References energy_, EtaPhi_Minus_, EtaPhi_Plus_, hfClusterShapes_cfi::hits, layers_, nameDetector_, and verbosity_.

Referenced by analyzeHits().

336  {
337  unsigned int ilayer = hits.first.layer;
338  if (ilayer < layers_) {
339  energy_[itimeslice].at(ilayer)->Fill(esum);
340  if (itimeslice == 0) {
341  EtaPhi_Plus_.at(ilayer)->Fill(hits.first.eta, hits.first.phi);
342  EtaPhi_Minus_.at(ilayer)->Fill(hits.first.eta, hits.first.phi);
343  }
344  } else {
345  if (verbosity_ > 0)
346  edm::LogVerbatim("HGCalValidation")
347  << "Problematic Hit for " << nameDetector_ << " at sector " << hits.first.sector << ":" << hits.first.sector2
348  << " layer " << hits.first.layer << " cell " << hits.first.cell << ":" << hits.first.cell2 << " energy "
349  << hits.second.etotal;
350  }
351 }
Log< level::Info, true > LogVerbatim
const std::string nameDetector_
std::vector< MonitorElement * > EtaPhi_Plus_
std::vector< MonitorElement * > energy_[maxTime_]
std::vector< MonitorElement * > EtaPhi_Minus_

◆ fillMuonTomoHistos()

void HGCalSimHitValidation::fillMuonTomoHistos ( int  partialType,
std::pair< hitsinfo, energysum hit_ 
)
private

Definition at line 353 of file HGCalSimHitValidation.cc.

References MillePedeFileConverter_cfg::e, energyFWCK_, energyFWCN_, energyFWF_, energyPWCK_, energyPWCN_, energyPWF_, HGCalSimHitValidation::energysum::eTime, HGCSiliconDetId::HGCalCoarseThick, HGCSiliconDetId::HGCalCoarseThin, HGCSiliconDetId::HGCalFine, hfClusterShapes_cfi::hits, hitXYB_, hitXYFWCK_, hitXYFWCN_, hitXYFWF_, layers_, nameDetector_, or, x, and y.

Referenced by analyzeHits().

353  {
354  hitsinfo hinfo = hits.first;
355  energysum esum = hits.second;
356  double edep =
357  esum.eTime[0] * CLHEP::GeV /
358  CLHEP::keV; //index 0 and 1 corresponds to 25 ns and 1000 ns, respectively. In addititon, chaging energy loss unit to keV.
359 
360  unsigned int ilayer = hinfo.layer;
361  double x = hinfo.x * CLHEP::mm / CLHEP::cm; // chaging length unit to cm.
362  double y = hinfo.y * CLHEP::mm / CLHEP::cm;
363  if (ilayer < layers_) {
364  if (nameDetector_ == "HGCalEESensitive" or nameDetector_ == "HGCalHESiliconSensitive") {
365  // Fill the energy loss histograms for MIP
366  if (!TMath::AreEqualAbs(edep, 0.0, 1.e-5)) { //to avoid peak at zero due Eloss less than 10 mili eV.
367  if (hinfo.type == HGCSiliconDetId::HGCalFine) {
368  if (partialType == 0)
369  energyFWF_.at(ilayer)->Fill(edep);
370  if (partialType > 0)
371  energyPWF_.at(ilayer)->Fill(edep);
372  }
374  if (partialType == 0)
375  energyFWCN_.at(ilayer)->Fill(edep);
376  if (partialType > 0)
377  energyPWCN_.at(ilayer)->Fill(edep);
378  }
380  if (partialType == 0)
381  energyFWCK_.at(ilayer)->Fill(edep);
382  if (partialType > 0)
383  energyPWCK_.at(ilayer)->Fill(edep);
384  }
385  }
386 
387  // Fill the XY distribution of detector hits
388  if (hinfo.type == HGCSiliconDetId::HGCalFine)
389  hitXYFWF_.at(ilayer)->Fill(x, y);
390 
392  hitXYFWCN_.at(ilayer)->Fill(x, y);
393 
395  hitXYFWCK_.at(ilayer)->Fill(x, y);
396 
397  } //is Silicon
398  if (nameDetector_ == "HGCalHEScintillatorSensitive") {
399  hitXYB_.at(ilayer)->Fill(x, y);
400  } //is Scintillator
401  } //layer condition
402 }
std::vector< MonitorElement * > energyPWF_
std::vector< MonitorElement * > energyPWCN_
const std::string nameDetector_
std::vector< MonitorElement * > hitXYFWCK_
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::vector< MonitorElement * > energyFWF_
std::vector< MonitorElement * > energyFWCN_
std::vector< MonitorElement * > energyFWCK_
std::vector< MonitorElement * > hitXYFWF_
std::vector< MonitorElement * > energyPWCK_
std::vector< MonitorElement * > hitXYFWCN_
std::vector< MonitorElement * > hitXYB_

◆ fillOccupancyMap()

void HGCalSimHitValidation::fillOccupancyMap ( std::map< int, int > &  OccupancyMap,
int  layer 
)
private

Definition at line 328 of file HGCalSimHitValidation.cc.

References phase1PixelTopology::layer.

Referenced by analyzeHits().

328  {
329  if (OccupancyMap.find(layer) != OccupancyMap.end()) {
330  ++OccupancyMap[layer];
331  } else {
332  OccupancyMap[layer] = 1;
333  }
334 }
constexpr std::array< uint8_t, layerIndexSize > layer

◆ histoSetting() [1/2]

void HGCalSimHitValidation::histoSetting ( TH1F *&  histo,
const char *  xTitle,
const char *  yTitle = "",
Color_t  lineColor = kBlack,
Color_t  markerColor = kBlack,
int  linewidth = 1 
)
private

Definition at line 653 of file HGCalSimHitValidation.cc.

References timingPdfMaker::histo, RecoTauValidation_cfi::lineColor, RecoTauValidation_cfi::lineWidth, and RecoTauValidation_cfi::markerColor.

Referenced by bookHistograms().

654  {
655  histo->SetStats();
656  histo->SetLineColor(lineColor);
657  histo->SetLineWidth(lineWidth);
658  histo->SetMarkerColor(markerColor);
659  histo->GetXaxis()->SetTitle(xTitle);
660  histo->GetYaxis()->SetTitle(yTitle);
661 }

◆ histoSetting() [2/2]

void HGCalSimHitValidation::histoSetting ( TH2F *&  histo,
const char *  xTitle,
const char *  yTitle = "",
Color_t  lineColor = kBlack,
Color_t  markerColor = kBlack,
int  linewidth = 1 
)
private

Definition at line 663 of file HGCalSimHitValidation.cc.

References timingPdfMaker::histo, RecoTauValidation_cfi::lineColor, RecoTauValidation_cfi::lineWidth, and RecoTauValidation_cfi::markerColor.

664  {
665  histo->SetStats();
666  histo->SetLineColor(lineColor);
667  histo->SetLineWidth(lineWidth);
668  histo->SetMarkerColor(markerColor);
669  histo->SetMarkerStyle(kFullCircle);
670  histo->SetMarkerSize(0.6);
671  histo->GetXaxis()->SetTitle(xTitle);
672  histo->GetYaxis()->SetTitle(yTitle);
673 }

Member Data Documentation

◆ caloHitSource_

const std::string HGCalSimHitValidation::caloHitSource_
private

Definition at line 102 of file HGCalSimHitValidation.cc.

◆ energy_

std::vector<MonitorElement*> HGCalSimHitValidation::energy_[maxTime_]
private

Definition at line 121 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillHitsInfo().

◆ energyFWCK_

std::vector<MonitorElement*> HGCalSimHitValidation::energyFWCK_
private

Definition at line 122 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

◆ energyFWCN_

std::vector<MonitorElement*> HGCalSimHitValidation::energyFWCN_
private

Definition at line 122 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

◆ energyFWF_

std::vector<MonitorElement*> HGCalSimHitValidation::energyFWF_
private

Definition at line 122 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

◆ energyPWCK_

std::vector<MonitorElement*> HGCalSimHitValidation::energyPWCK_
private

Definition at line 123 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

◆ energyPWCN_

std::vector<MonitorElement*> HGCalSimHitValidation::energyPWCN_
private

Definition at line 123 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

◆ energyPWF_

std::vector<MonitorElement*> HGCalSimHitValidation::energyPWF_
private

Definition at line 123 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

◆ EtaPhi_Minus_

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

Definition at line 118 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillHitsInfo().

◆ EtaPhi_Plus_

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

Definition at line 118 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillHitsInfo().

◆ firstLayer_

int HGCalSimHitValidation::firstLayer_
private

Definition at line 114 of file HGCalSimHitValidation.cc.

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

◆ fromDDD_

const bool HGCalSimHitValidation::fromDDD_
private

Definition at line 106 of file HGCalSimHitValidation.cc.

Referenced by dqmBeginRun().

◆ hgcons_

const HGCalDDDConstants* HGCalSimHitValidation::hgcons_
private

Definition at line 103 of file HGCalSimHitValidation.cc.

Referenced by analyzeHits(), defineGeometry(), and dqmBeginRun().

◆ HitOccupancy_Minus_

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

Definition at line 117 of file HGCalSimHitValidation.cc.

Referenced by analyzeHits(), and bookHistograms().

◆ HitOccupancy_Plus_

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

Definition at line 117 of file HGCalSimHitValidation.cc.

Referenced by analyzeHits(), and bookHistograms().

◆ hitXYB_

std::vector<MonitorElement*> HGCalSimHitValidation::hitXYB_
private

Definition at line 124 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

◆ hitXYFWCK_

std::vector<MonitorElement*> HGCalSimHitValidation::hitXYFWCK_
private

Definition at line 124 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

◆ hitXYFWCN_

std::vector<MonitorElement*> HGCalSimHitValidation::hitXYFWCN_
private

Definition at line 124 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

◆ hitXYFWF_

std::vector<MonitorElement*> HGCalSimHitValidation::hitXYFWF_
private

Definition at line 124 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

◆ layers_

unsigned int HGCalSimHitValidation::layers_
private

◆ maxTime_

const unsigned int HGCalSimHitValidation::maxTime_ = 6
staticprivate

Definition at line 120 of file HGCalSimHitValidation.cc.

◆ MeanHitOccupancy_Minus_

MonitorElement * HGCalSimHitValidation::MeanHitOccupancy_Minus_
private

Definition at line 119 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms().

◆ MeanHitOccupancy_Plus_

MonitorElement* HGCalSimHitValidation::MeanHitOccupancy_Plus_
private

Definition at line 119 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms().

◆ nameDetector_

const std::string HGCalSimHitValidation::nameDetector_
private

◆ nTimes_

unsigned int HGCalSimHitValidation::nTimes_
private

Definition at line 125 of file HGCalSimHitValidation.cc.

Referenced by analyzeHits(), and bookHistograms().

◆ symmDet_

bool HGCalSimHitValidation::symmDet_
private

Definition at line 112 of file HGCalSimHitValidation.cc.

Referenced by defineGeometry().

◆ times_

const std::vector<double> HGCalSimHitValidation::times_
private

Definition at line 104 of file HGCalSimHitValidation.cc.

Referenced by analyzeHits().

◆ tok_cpv_

const edm::ESGetToken<DDCompactView, IdealGeometryRecord> HGCalSimHitValidation::tok_cpv_
private

Definition at line 108 of file HGCalSimHitValidation.cc.

Referenced by dqmBeginRun().

◆ tok_cpvc_

const edm::ESGetToken<cms::DDCompactView, IdealGeometryRecord> HGCalSimHitValidation::tok_cpvc_
private

Definition at line 109 of file HGCalSimHitValidation.cc.

Referenced by dqmBeginRun().

◆ tok_hepMC_

edm::EDGetTokenT<edm::HepMCProduct> HGCalSimHitValidation::tok_hepMC_
private

Definition at line 111 of file HGCalSimHitValidation.cc.

Referenced by analyze().

◆ tok_hgcal_

const edm::ESGetToken<HGCalDDDConstants, IdealGeometryRecord> HGCalSimHitValidation::tok_hgcal_
private

Definition at line 107 of file HGCalSimHitValidation.cc.

Referenced by dqmBeginRun().

◆ tok_hits_

edm::EDGetTokenT<edm::PCaloHitContainer> HGCalSimHitValidation::tok_hits_
private

Definition at line 110 of file HGCalSimHitValidation.cc.

Referenced by analyze().

◆ transMap_

std::map<uint32_t, HepGeom::Transform3D> HGCalSimHitValidation::transMap_
private

Definition at line 115 of file HGCalSimHitValidation.cc.

Referenced by defineGeometry().

◆ verbosity_

const int HGCalSimHitValidation::verbosity_
private