CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
< DQMEDAnalyzerGlobalCache
initializeGlobalCache (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,
IdealGeometryRecord
tok_cpv_
 
const edm::ESGetToken
< cms::DDCompactView,
IdealGeometryRecord
tok_cpvc_
 
edm::EDGetTokenT
< edm::HepMCProduct
tok_hepMC_
 
const edm::ESGetToken
< HGCalDDDConstants,
IdealGeometryRecord
tok_hgcal_
 
edm::EDGetTokenT
< edm::PCaloHitContainer
tok_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 ( 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 getUntrackedParameter(std::string const &, T const &) const
const std::vector< double > times_
edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
const std::string nameDetector_
static const unsigned int maxTime_
const std::string caloHitSource_
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
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 ( )
inlineoverride

Definition at line 70 of file HGCalSimHitValidation.cc.

70 {}

Member Function Documentation

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::Event::getByToken(), edm::HandleBase::isValid(), isotrackApplyRegressor::k, AlCaHLTBitMon_ParallelJobs::p, tok_hepMC_, 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
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
edm::EDGetTokenT< edm::HepMCProduct > tok_hepMC_
void analyzeHits(std::vector< PCaloHit > &hits)
bool isValid() const
Definition: HandleBase.h:70
edm::EDGetTokenT< edm::PCaloHitContainer > tok_hits_
void HGCalSimHitValidation::analyzeHits ( std::vector< PCaloHit > &  hits)
private

Definition at line 189 of file HGCalSimHitValidation.cc.

References HGCalSimHitValidation::hitsinfo::cell, HGCalSimHitValidation::hitsinfo::cell2, HGCSiliconDetId::cellU(), HGCSiliconDetId::cellV(), TauDecayModes::dec, relval_parameters_module::energy, HGCalSimHitValidation::hitsinfo::eta, PVValHelper::eta, HGCalSimHitValidation::energysum::eTime, HGCalSimHitValidation::energysum::etotal, fillHitsInfo(), fillMuonTomoHistos(), fillOccupancyMap(), firstLayer_, hgcons_, HitOccupancy_Minus_, HitOccupancy_Plus_, mps_fire::i, HGCScintillatorDetId::ietaAbs(), HGCScintillatorDetId::iphi(), isotrackApplyRegressor::k, HGCScintillatorDetId::layer(), HGCSiliconDetId::layer(), HGCalSimHitValidation::hitsinfo::layer, phase1PixelTopology::layer, HGCalDDDConstants::locateCell(), HGCalDDDConstants::locateCellTrap(), nameDetector_, nTimes_, or, HGCalSimHitValidation::hitsinfo::phi, HGCalSimHitValidation::hitsinfo::sector, HGCalSimHitValidation::hitsinfo::sector2, HGCalDDDConstants::tileTrapezoid(), times_, HGCScintillatorDetId::type(), HGCSiliconDetId::type(), HGCalSimHitValidation::hitsinfo::type, HGCalTestNumbering::unpackHexagonIndex(), verbosity_, HGCalDDDConstants::waferHexagon8(), HGCalDDDConstants::waferType(), HGCSiliconDetId::waferU(), HGCSiliconDetId::waferV(), HGCalDDDConstants::waferZ(), HGCalSimHitValidation::hitsinfo::x, xy(), HGCalSimHitValidation::hitsinfo::y, HGCalSimHitValidation::hitsinfo::z, 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 }
Log< level::Info, true > LogVerbatim
void fillOccupancyMap(std::map< int, int > &OccupancyMap, int layer)
std::vector< MonitorElement * > HitOccupancy_Plus_
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
const std::vector< double > times_
int waferU() const
int cellV() const
int type() const
get/set the type
int zside() const
get the z-side of the cell (1/-1)
int zside(DetId const &)
std::vector< MonitorElement * > HitOccupancy_Minus_
std::pair< float, float > locateCell(int cell, int lay, int type, bool reco) const
int cellU() const
get the cell #&#39;s in u,v or in x,y
constexpr std::array< uint8_t, layerIndexSize > layer
const std::string nameDetector_
int type() const
get the type
int layer() const
get the layer #
std::pair< float, float > locateCellTrap(int lay, int ieta, int iphi, bool reco) const
int waferV() const
bool tileTrapezoid() const
int iphi() const
get the phi index
double waferZ(int layer, bool reco) const
Basic2DVector< T > xy() const
part
Definition: HCALResponse.h:20
int layer() const
get the layer #
int zside() const
get the z-side of the cell (1/-1)
bool waferHexagon8() const
const HGCalDDDConstants * hgcons_
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)
int waferType(DetId const &id, bool fromFile=false) const
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_
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
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_
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_
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, hlt_dqm_clientPB-live_cfg::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
bool HGCalSimHitValidation::defineGeometry ( const DDCompactView ddViewH)
private

Definition at line 404 of file HGCalSimHitValidation.cc.

References DDTrap::alpha1(), filterCSVwithJSON::copy, DDFilteredView::copyNumbers(), alcazmumu_cfi::filter, DDFilteredView::firstChild(), DDName::fullname(), hgcons_, DDFilteredView::logicalPart(), DDBase< N, C >::name(), mergeVDriftHistosByStation::name, nameDetector_, DDFilteredView::next(), HGCalTestNumbering::packSquareIndex(), idealTransformation::rotation, DDFilteredView::rotation(), mkfit::Const::sol, DDLogicalPart::solid(), HGCalGeometryMode::Square, AlCaHLTBitMon_QueryRunRegistry::string, symmDet_, DDFilteredView::translation(), transMap_, relativeConstraints::value, 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 
409  if (hgcons_->geomMode() == HGCalGeometryMode::Square) {
410  const DDCompactView& cview = *ddViewH;
411  std::string attribute = "Volume";
413 
414  DDSpecificsMatchesValueFilter filter{DDValue(attribute, value, 0)};
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
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double >> DD3Vector
const N & name() const
Definition: DDBase.h:59
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
A DDSolid represents the shape of a part.
Definition: DDSolid.h:39
const std::string nameDetector_
const std::string fullname() const
Definition: DDName.h:43
Interface to a Trapezoid.
Definition: DDSolid.h:88
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)
bool HGCalSimHitValidation::defineGeometry ( const cms::DDCompactView ddViewH)
private

Definition at line 452 of file HGCalSimHitValidation.cc.

References filterCSVwithJSON::copy, cms::DDFilteredView::copyNos(), alcazmumu_cfi::filter, cms::DDFilteredView::firstChild(), hgcons_, mergeVDriftHistosByStation::name, cms::DDFilteredView::name(), nameDetector_, HGCalTestNumbering::packSquareIndex(), cms::DDFilteredView::parameters(), idealTransformation::rotation, cms::DDFilteredView::rotation(), HGCalGeometryMode::Square, symmDet_, cms::DDFilteredView::translation(), transMap_, verbosity_, x, y, and z.

452  {
453  if (verbosity_ > 0)
454  edm::LogVerbatim("HGCalValidation") << "Initialize HGCalDDDConstants (DD4hep) for " << nameDetector_ << " : "
455  << hgcons_;
456 
457  if (hgcons_->geomMode() == HGCalGeometryMode::Square) {
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
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)
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)
Compact representation of the geometrical detector hierarchy.
Definition: DDCompactView.h:81
bool getData(T &iHolder) const
Definition: EventSetup.h:122
const std::string nameDetector_
unsigned int layers(bool reco) const
const edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > tok_cpvc_
const HGCalDDDConstants * hgcons_
int firstLayer() const
const edm::ESGetToken< DDCompactView, IdealGeometryRecord > tok_cpv_
const edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > tok_hgcal_
void HGCalSimHitValidation::fillDescriptions ( edm::ConfigurationDescriptions descriptions)
static

Definition at line 145 of file HGCalSimHitValidation.cc.

References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), 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 }
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 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_, 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_
void HGCalSimHitValidation::fillMuonTomoHistos ( int  partialType,
std::pair< hitsinfo, energysum hit_ 
)
private

Definition at line 353 of file HGCalSimHitValidation.cc.

References alignCSCRings::e, energyFWCK_, energyFWCN_, energyFWF_, energyPWCK_, energyPWCN_, energyPWF_, HGCalSimHitValidation::energysum::eTime, HGCSiliconDetId::HGCalCoarseThick, HGCSiliconDetId::HGCalCoarseThin, HGCSiliconDetId::HGCalFine, hitXYB_, hitXYFWCK_, hitXYFWCN_, hitXYFWF_, HGCalSimHitValidation::hitsinfo::layer, layers_, nameDetector_, or, HGCalSimHitValidation::hitsinfo::type, x, HGCalSimHitValidation::hitsinfo::x, y, and HGCalSimHitValidation::hitsinfo::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  }
373  if (hinfo.type == HGCSiliconDetId::HGCalCoarseThin) {
374  if (partialType == 0)
375  energyFWCN_.at(ilayer)->Fill(edep);
376  if (partialType > 0)
377  energyPWCN_.at(ilayer)->Fill(edep);
378  }
379  if (hinfo.type == HGCSiliconDetId::HGCalCoarseThick) {
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 
391  if (hinfo.type == HGCSiliconDetId::HGCalCoarseThin)
392  hitXYFWCN_.at(ilayer)->Fill(x, y);
393 
394  if (hinfo.type == HGCSiliconDetId::HGCalCoarseThick)
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 }
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::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
std::vector< MonitorElement * > energyPWF_
std::vector< MonitorElement * > energyPWCN_
const std::string nameDetector_
std::vector< MonitorElement * > hitXYFWCK_
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_
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
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.

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 }
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.

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

const std::string HGCalSimHitValidation::caloHitSource_
private

Definition at line 102 of file HGCalSimHitValidation.cc.

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

Definition at line 121 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillHitsInfo().

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

Definition at line 122 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

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

Definition at line 122 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

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

Definition at line 122 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

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

Definition at line 123 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

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

Definition at line 123 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

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

Definition at line 123 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

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

Definition at line 118 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillHitsInfo().

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

Definition at line 118 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillHitsInfo().

int HGCalSimHitValidation::firstLayer_
private

Definition at line 114 of file HGCalSimHitValidation.cc.

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

const bool HGCalSimHitValidation::fromDDD_
private

Definition at line 106 of file HGCalSimHitValidation.cc.

Referenced by dqmBeginRun().

const HGCalDDDConstants* HGCalSimHitValidation::hgcons_
private

Definition at line 103 of file HGCalSimHitValidation.cc.

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

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

Definition at line 117 of file HGCalSimHitValidation.cc.

Referenced by analyzeHits(), and bookHistograms().

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

Definition at line 117 of file HGCalSimHitValidation.cc.

Referenced by analyzeHits(), and bookHistograms().

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

Definition at line 124 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

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

Definition at line 124 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

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

Definition at line 124 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

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

Definition at line 124 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms(), and fillMuonTomoHistos().

unsigned int HGCalSimHitValidation::layers_
private
const unsigned int HGCalSimHitValidation::maxTime_ = 6
staticprivate

Definition at line 120 of file HGCalSimHitValidation.cc.

MonitorElement * HGCalSimHitValidation::MeanHitOccupancy_Minus_
private

Definition at line 119 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms().

MonitorElement* HGCalSimHitValidation::MeanHitOccupancy_Plus_
private

Definition at line 119 of file HGCalSimHitValidation.cc.

Referenced by bookHistograms().

const std::string HGCalSimHitValidation::nameDetector_
private
unsigned int HGCalSimHitValidation::nTimes_
private

Definition at line 125 of file HGCalSimHitValidation.cc.

Referenced by analyzeHits(), and bookHistograms().

bool HGCalSimHitValidation::symmDet_
private

Definition at line 112 of file HGCalSimHitValidation.cc.

Referenced by defineGeometry().

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

Definition at line 104 of file HGCalSimHitValidation.cc.

Referenced by analyzeHits().

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

Definition at line 108 of file HGCalSimHitValidation.cc.

Referenced by dqmBeginRun().

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

Definition at line 109 of file HGCalSimHitValidation.cc.

Referenced by dqmBeginRun().

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

Definition at line 111 of file HGCalSimHitValidation.cc.

Referenced by analyze().

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

Definition at line 107 of file HGCalSimHitValidation.cc.

Referenced by dqmBeginRun().

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

Definition at line 110 of file HGCalSimHitValidation.cc.

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

Definition at line 115 of file HGCalSimHitValidation.cc.

Referenced by defineGeometry().

const int HGCalSimHitValidation::verbosity_
private