|
|
|
| HGCalSimHitStudy (const edm::ParameterSet &) |
|
| ~HGCalSimHitStudy () override |
|
| EDAnalyzer ()=default |
|
SerialTaskQueue * | globalLuminosityBlocksQueue () final |
|
SerialTaskQueue * | globalRunsQueue () final |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
void | callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func) |
|
| EDAnalyzerBase () |
|
ModuleDescription const & | moduleDescription () const |
|
bool | wantsStreamLuminosityBlocks () const |
|
bool | wantsStreamRuns () const |
|
| ~EDAnalyzerBase () override |
|
std::vector< ConsumesInfo > | consumesInfo () const |
|
void | convertCurrentProcessAlias (std::string const &processName) |
| Convert "@currentProcess" in InputTag process names to the actual current process name. More...
|
|
| EDConsumerBase () |
|
| EDConsumerBase (EDConsumerBase &&)=default |
|
| EDConsumerBase (EDConsumerBase const &)=delete |
|
ESProxyIndex const * | esGetTokenIndices (edm::Transition iTrans) const |
|
ProductResolverIndexAndSkipBit | indexFrom (EDGetToken, BranchType, TypeID const &) const |
|
void | itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
void | itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const |
|
std::vector< ProductResolverIndexAndSkipBit > const & | itemsToGetFrom (BranchType iType) const |
|
void | labelsForToken (EDGetToken iToken, Labels &oLabels) const |
|
void | modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const |
|
EDConsumerBase & | operator= (EDConsumerBase &&)=default |
|
EDConsumerBase const & | operator= (EDConsumerBase const &)=delete |
|
bool | registeredToConsume (ProductResolverIndex, bool, BranchType) const |
|
bool | registeredToConsumeMany (TypeID const &, BranchType) const |
|
ProductResolverIndexAndSkipBit | uncheckedIndexFrom (EDGetToken) const |
|
void | updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet) |
|
void | updateLookup (eventsetup::ESRecordsToProxyIndices const &) |
|
virtual | ~EDConsumerBase () noexcept(false) |
|
|
void | analyze (edm::Event const &, edm::EventSetup const &) override |
|
void | beginJob () override |
|
void | beginRun (edm::Run const &, edm::EventSetup const &) override |
|
void | endRun (edm::Run const &, edm::EventSetup const &) override |
|
EDGetToken | consumes (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | consumes (edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | consumes (TypeToGet const &id, edm::InputTag const &tag) |
|
ConsumesCollector | consumesCollector () |
| Use a ConsumesCollector to gather consumes information from helper functions. More...
|
|
template<typename ProductType , BranchType B = InEvent> |
void | consumesMany () |
|
void | consumesMany (const TypeToGet &id) |
|
template<BranchType B> |
void | consumesMany (const TypeToGet &id) |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes () |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<BranchType B> |
EDGetToken | mayConsume (const TypeToGet &id, edm::InputTag const &tag) |
|
template<typename ProductType , BranchType B = InEvent> |
EDGetTokenT< ProductType > | mayConsume (edm::InputTag const &tag) |
|
Definition at line 49 of file HGCalSimHitStudy.cc.
◆ HGCalSimHitStudy()
◆ ~HGCalSimHitStudy()
HGCalSimHitStudy::~HGCalSimHitStudy |
( |
| ) |
|
|
inlineoverride |
◆ analyze()
Implements edm::one::EDAnalyzerBase.
Definition at line 142 of file HGCalSimHitStudy.cc.
147 if (theCaloHitContainers.
isValid()) {
149 edm::LogVerbatim(
"HGCalValidation") <<
" PcalohitItr = " << theCaloHitContainers->size();
150 std::vector<PCaloHit> caloHits;
152 for (
auto const&
hit : *(theCaloHitContainers.
product())) {
153 unsigned int id =
hit.
id();
156 caloHits.emplace_back(
hit);
157 caloHits.back().setID(hid.
rawId());
159 edm::LogVerbatim(
"HGCalValidation") <<
"Hit[" << caloHits.size() <<
"] " << hid;
163 caloHits.insert(caloHits.end(), theCaloHitContainers->begin(), theCaloHitContainers->end());
References analyzeHits(), HcalEndcap, hcons_, heRebuild_, hit::id, iEvent, edm::HandleBase::isValid(), dqmdumpme::k, nameDetectors_, edm::Handle< T >::product(), DetId::rawId(), HcalHitRelabeller::relabel(), HcalDetId::subdet(), tok_hits_, and verbosity_.
◆ analyzeHits()
void HGCalSimHitStudy::analyzeHits |
( |
int |
ih, |
|
|
const std::string & |
name, |
|
|
const std::vector< PCaloHit > & |
hits |
|
) |
| |
|
private |
Definition at line 173 of file HGCalSimHitStudy.cc.
177 std::map<uint32_t, hitsinfo> map_hits;
180 unsigned int nused(0);
184 uint32_t
id =
hit.
id();
187 HepGeom::Point3D<float> gcoord;
192 sector = detId.
iphi();
193 layer = detId.
depth();
198 edm::LogVerbatim(
"HGCalValidation") <<
"i/p " << subdet <<
":" <<
zside <<
":" << cell <<
":" << sector <<
":"
199 << layer <<
" o/p " <<
etaphi.first <<
":" <<
etaphi.second <<
":" << rz;
200 gcoord = HepGeom::Point3D<float>(rz *
cos(
etaphi.second) / cosh(
etaphi.first),
204 std::pair<float, float>
xy;
208 cell = detId.
cellU();
213 layer = detId.
layer();
222 subdet = static_cast<int>(detId.
det());
223 cell = detId.
cellU();
228 layer = detId.
layer();
235 subdet = static_cast<int>(detId.
det());
236 sector = detId.
ieta();
239 layer = detId.
layer();
241 xy =
hgcons_[ih]->locateCellTrap(layer, sector, cell,
false);
244 xy =
hgcons_[ih]->locateCell(cell, layer, sector,
false);
246 double zp =
hgcons_[ih]->waferZ(layer,
false);
249 double xp = (zp < 0) ? -
xy.first :
xy.first;
250 gcoord = HepGeom::Point3D<float>(xp,
xy.second, zp);
253 <<
"i/p " << subdet <<
":" <<
zside <<
":" << layer <<
":" << sector <<
":" <<
sector2 <<
":" << cell <<
":"
254 <<
cell2 <<
" o/p " <<
xy.first <<
":" <<
xy.second <<
":" << zp;
257 double tof = (gcoord.mag() * CLHEP::mm) / CLHEP::c_light;
260 <<
"Detector " <<
name <<
" zside = " <<
zside <<
" layer = " << layer <<
" type = " <<
type
261 <<
" wafer = " << sector <<
":" <<
sector2 <<
" cell = " << cell <<
":" <<
cell2 <<
" positon = " << gcoord
262 <<
" energy = " <<
energy <<
" time = " <<
time <<
":" << tof;
267 if (map_hits.count(
id) != 0) {
271 hinfo.phi = gcoord.getPhi();
272 hinfo.eta = gcoord.getEta();
282 if (
hinfo.layer <= static_cast<int>(
h_XY_.size()))
283 h_XY_[
hinfo.layer - 1]->Fill(gcoord.x(), gcoord.y());
288 h_Ly_[ih]->Fill(layer);
289 h_W1_[ih]->Fill(sector);
290 h_C1_[ih]->Fill(cell);
293 edm::LogVerbatim(
"HGCalValidation") <<
name <<
" with " << map_hits.size() <<
":" << nused <<
" detector elements"
296 for (
auto const&
hit : map_hits) {
300 <<
" ---------------------- eta = " <<
hinfo.eta <<
" phi = " <<
hinfo.phi <<
" layer = " <<
hinfo.layer
301 <<
" E = " <<
hinfo.energy <<
" T = " <<
hinfo.time;
References funct::abs(), hgcalTopologyTester_cfi::cell2, HFNoseDetId::cellU(), HGCSiliconDetId::cellU(), HFNoseDetId::cellV(), HGCSiliconDetId::cellV(), funct::cos(), HcalDetId::depth(), DetId::det(), HCALHighEnergyHPDFilter_cfi::energy, fastmath::etaphi(), HcalDDDRecConstants::getEtaPhi(), HcalDDDRecConstants::getRZ(), h_C1_, h_C2_, h_E_, h_EtaPhi_, h_EtFiZm_, h_EtFiZp_, h_LayerZm_, h_LayerZp_, h_Ly_, h_RZ_, h_T_, h_W1_, h_W2_, h_XY_, hcons_, heRebuild_, HGCalGeometryMode::Hexagon8, HGCalGeometryMode::Hexagon8Full, hgcons_, hfClusterShapes_cfi::hits, triggerObjects_cff::id, hit::id, HGCScintillatorDetId::ieta(), HcalDetId::ietaAbs(), ifLayer_, ifNose_, HGCScintillatorDetId::iphi(), HcalDetId::iphi(), HGCScintillatorDetId::layer(), HFNoseDetId::layer(), HGCSiliconDetId::layer(), layerFront_, Skims_PA_cff::name, hgcalTopologyTester_cfi::sector2, funct::sin(), HcalDetId::subdet(), DetId::subdetId(), ntuplemaker::time, HGCalGeometryMode::Trapezoid, HGCScintillatorDetId::type(), HFNoseDetId::type(), HGCSiliconDetId::type(), HGCalTestNumbering::unpackHexagonIndex(), verbosity_, HFNoseDetId::waferU(), HGCSiliconDetId::waferU(), HGCSiliconDetId::waferV(), HFNoseDetId::waferV(), geometryCSVtoXML::xy, HGCScintillatorDetId::zside(), HFNoseDetId::zside(), HGCSiliconDetId::zside(), HcalDetId::zside(), and ecaldqm::zside().
Referenced by analyze().
◆ beginJob()
void HGCalSimHitStudy::beginJob |
( |
void |
| ) |
|
|
overrideprotectedvirtual |
Reimplemented from edm::one::EDAnalyzerBase.
Definition at line 350 of file HGCalSimHitStudy.cc.
358 name <<
"RZ_AllDetectors";
359 title <<
"R vs Z for All Detectors";
368 for (
int ly = 0; ly <
nLayers_; ++ly) {
371 name <<
"XY_L" << (ly + 1);
372 title <<
"Y vs X at Layer " << (ly + 1);
381 name <<
"EtaPhi_AllDetectors";
382 title <<
"#phi vs #eta for All Detectors";
392 name <<
"EtFiZp_AllDetectors";
393 title <<
"#phi vs #eta (+z) for All Detectors";
403 name <<
"EtFiZm_AllDetectors";
404 title <<
"#phi vs #eta (-z) for All Detectors";
415 name <<
"LayerZp_AllDetectors";
416 title <<
"Energy vs Layer (+z) for All Detectors";
425 name <<
"LayerZm_AllDetectors";
426 title <<
"Energy vs Layer (-z) for All Detectors";
436 name <<
"E_AllDetectors";
437 title <<
"Energy Deposit for All Detectors";
442 h_E_.emplace_back(fs->
make<TH1D>(
name.str().c_str(),
title.str().c_str(), 1000, 0.0, 1.0));
447 name <<
"T_AllDetectors";
448 title <<
"Time for All Detectors";
453 h_T_.emplace_back(fs->
make<TH1D>(
name.str().c_str(),
title.str().c_str(), 1000, 0.0, 200.0));
461 h_Ly_.emplace_back(fs->
make<TH1D>(
name.str().c_str(),
title.str().c_str(), 200, 0, 100));
467 h_W1_.emplace_back(fs->
make<TH1D>(
name.str().c_str(),
title.str().c_str(), 200, -50, 50));
472 h_C1_.emplace_back(fs->
make<TH1D>(
name.str().c_str(),
title.str().c_str(), 720, 0, 360));
478 h_W1_.emplace_back(fs->
make<TH1D>(
name.str().c_str(),
title.str().c_str(), 200, -50, 50));
483 h_W2_.emplace_back(fs->
make<TH1D>(
name.str().c_str(),
title.str().c_str(), 100, -50, 50));
488 h_C1_.emplace_back(fs->
make<TH1D>(
name.str().c_str(),
title.str().c_str(), 100, 0, 50));
493 h_C2_.emplace_back(fs->
make<TH1D>(
name.str().c_str(),
title.str().c_str(), 100, 0, 50));
References etamax_, etamin_, h_C1_, h_C2_, h_E_, h_EtaPhi_, h_EtFiZm_, h_EtFiZp_, h_LayerZm_, h_LayerZp_, h_Ly_, h_RZ_, h_T_, h_W1_, h_W2_, h_XY_, heRebuild_, ifLayer_, M_PI, TFileService::make(), Skims_PA_cff::name, nameDetectors_, nbinEta_, nbinR_, nbinZ_, nLayers_, rmax_, rmin_, overlapproblemtsosanalyzer_cfi::title, zmax_, and zmin_.
◆ beginRun()
Definition at line 325 of file HGCalSimHitStudy.cc.
337 hgcons_.emplace_back(&(*pHGDC));
References edm::EventSetup::get(), get, HcalDDDRecConstants::getMaxDepth(), hcons_, heRebuild_, hgcons_, dqmdumpme::k, layerFront_, layers_, nameDetectors_, and verbosity_.
◆ endRun()
◆ fillDescriptions()
Definition at line 120 of file HGCalSimHitStudy.cc.
122 std::vector<std::string>
names = {
"HGCalEESensitive",
"HGCalHESiliconSensitive",
"Hcal"};
123 std::vector<std::string>
sources = {
"HGCHitsEE",
"HGCHitsHEfront",
"HcalHits"};
124 desc.
add<std::vector<std::string> >(
"detectorNames",
names);
125 desc.
add<std::vector<std::string> >(
"caloHitSources",
sources);
127 desc.addUntracked<
double>(
"rMax", 3000.0);
128 desc.addUntracked<
double>(
"zMin", 3000.0);
129 desc.addUntracked<
double>(
"zMax", 6000.0);
130 desc.addUntracked<
double>(
"etaMin", 1.0);
131 desc.addUntracked<
double>(
"etaMax", 3.0);
132 desc.addUntracked<
int>(
"nBinR", 300);
133 desc.addUntracked<
int>(
"nBinZ", 300);
134 desc.addUntracked<
int>(
"nBinEta", 200);
135 desc.addUntracked<
int>(
"layers", 50);
136 desc.addUntracked<
int>(
"verbosity", 0);
137 desc.addUntracked<
bool>(
"ifNose",
false);
138 desc.addUntracked<
bool>(
"ifLayer",
false);
139 descriptions.
add(
"hgcalSimHitStudy", desc);
References edm::ConfigurationDescriptions::add(), edm::ParameterSetDescription::add(), edm::ParameterSetDescription::addUntracked(), names, and CalibrationSummaryClient_cfi::sources.
◆ caloHitSources_
const std::vector<std::string> HGCalSimHitStudy::caloHitSources_ |
|
private |
◆ etamax_
const double HGCalSimHitStudy::etamax_ |
|
private |
◆ etamin_
const double HGCalSimHitStudy::etamin_ |
|
private |
◆ h_C1_
std::vector<TH1D*> HGCalSimHitStudy::h_C1_ |
|
private |
◆ h_C2_
std::vector<TH1D*> HGCalSimHitStudy::h_C2_ |
|
private |
◆ h_E_
std::vector<TH1D*> HGCalSimHitStudy::h_E_ |
|
private |
◆ h_EtaPhi_
std::vector<TH2D*> HGCalSimHitStudy::h_EtaPhi_ |
|
private |
◆ h_EtFiZm_
std::vector<TH2D*> HGCalSimHitStudy::h_EtFiZm_ |
|
private |
◆ h_EtFiZp_
std::vector<TH2D*> HGCalSimHitStudy::h_EtFiZp_ |
|
private |
◆ h_LayerZm_
std::vector<TH1D*> HGCalSimHitStudy::h_LayerZm_ |
|
private |
◆ h_LayerZp_
std::vector<TH1D*> HGCalSimHitStudy::h_LayerZp_ |
|
private |
◆ h_Ly_
std::vector<TH1D*> HGCalSimHitStudy::h_Ly_ |
|
private |
◆ h_RZ_
std::vector<TH2D*> HGCalSimHitStudy::h_RZ_ |
|
private |
◆ h_T_
std::vector<TH1D*> HGCalSimHitStudy::h_T_ |
|
private |
◆ h_W1_
std::vector<TH1D*> HGCalSimHitStudy::h_W1_ |
|
private |
◆ h_W2_
std::vector<TH1D*> HGCalSimHitStudy::h_W2_ |
|
private |
◆ h_XY_
std::vector<TH2D*> HGCalSimHitStudy::h_XY_ |
|
private |
◆ hcons_
◆ heRebuild_
std::vector<bool> HGCalSimHitStudy::heRebuild_ |
|
private |
◆ hgcons_
◆ ifLayer_
const bool HGCalSimHitStudy::ifLayer_ |
|
private |
◆ ifNose_
const bool HGCalSimHitStudy::ifNose_ |
|
private |
◆ layerFront_
std::vector<int> HGCalSimHitStudy::layerFront_ |
|
private |
◆ layers_
std::vector<int> HGCalSimHitStudy::layers_ |
|
private |
◆ nameDetectors_
const std::vector<std::string> HGCalSimHitStudy::nameDetectors_ |
|
private |
◆ nbinEta_
const int HGCalSimHitStudy::nbinEta_ |
|
private |
◆ nbinR_
const int HGCalSimHitStudy::nbinR_ |
|
private |
◆ nbinZ_
const int HGCalSimHitStudy::nbinZ_ |
|
private |
◆ nLayers_
const int HGCalSimHitStudy::nLayers_ |
|
private |
◆ rmax_
const double HGCalSimHitStudy::rmax_ |
|
private |
◆ rmin_
const double HGCalSimHitStudy::rmin_ |
|
private |
◆ tok_hits_
◆ verbosity_
const int HGCalSimHitStudy::verbosity_ |
|
private |
◆ zmax_
const double HGCalSimHitStudy::zmax_ |
|
private |
◆ zmin_
const double HGCalSimHitStudy::zmin_ |
|
private |
const std::vector< std::string > nameDetectors_
std::vector< TH1D * > h_T_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
int iphi() const
get the phi index
std::vector< TH2D * > h_EtaPhi_
std::vector< int > layerFront_
T const * product() const
constexpr int iphi() const
get the cell iphi
int zside() const
get the z-side of the cell (1/-1)
std::vector< edm::EDGetTokenT< edm::PCaloHitContainer > > tok_hits_
int layer() const
get the layer #
constexpr Detector det() const
get the detector field from this detid
std::vector< TH1D * > h_LayerZm_
static void unpackHexagonIndex(const uint32_t &idx, int &subdet, int &z, int &lay, int &wafer, int &celltyp, int &cell)
std::vector< TH1D * > h_Ly_
constexpr int depth() const
get the tower depth
T getUntrackedParameter(std::string const &, T const &) const
const std::vector< std::string > caloHitSources_
Sin< T >::type sin(const T &t)
int layer() const
get the layer #
std::vector< TH1D * > h_LayerZp_
void analyzeHits(int, const std::string &, const std::vector< PCaloHit > &)
Cos< T >::type cos(const T &t)
std::vector< TH2D * > h_EtFiZm_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const std::string names[nVars_]
static const std::string source
int zside() const
get the z-side of the cell (1/-1)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
std::vector< TH2D * > h_EtFiZp_
const HcalDDDRecConstants * hcons_
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
int type() const
get the type
std::vector< TH1D * > h_C2_
std::vector< int > layers_
constexpr HcalSubdetector subdet() const
get the subdetector
std::vector< TH1D * > h_E_
int type() const
get the type
int zside() const
get the z-side of the cell (1/-1)
int cellU() const
get the cell #'s in u,v or in x,y
T getParameter(std::string const &) const
DetId relabel(const uint32_t testId) const
std::vector< TH2D * > h_XY_
constexpr uint32_t rawId() const
get the raw id
int cellU() const
get the cell #'s in u,v or in x,y
double getRZ(const int &subdet, const int &ieta, const int &depth) const
std::vector< TH2D * > h_RZ_
static const std::string kSharedResource
std::vector< TH1D * > h_W1_
int type() const
get the type
std::vector< bool > heRebuild_
int getMaxDepth(const int &type) const
Abs< T >::type abs(const T &t)
constexpr int ietaAbs() const
get the absolute value of the cell ieta
std::pair< double, double > getEtaPhi(const int &subdet, const int &ieta, const int &iphi) const
constexpr int zside() const
get the z-side of the cell (1/-1)
std::vector< const HGCalDDDConstants * > hgcons_
std::vector< TH1D * > h_W2_
std::pair< T, T > etaphi(T x, T y, T z)
T * make(const Args &... args) const
make new ROOT object
std::vector< TH1D * > h_C1_
int layer() const
get the layer #