|
|
|
| HGCalSimHitStudy (const edm::ParameterSet &) |
|
| ~HGCalSimHitStudy () override |
|
| EDAnalyzer ()=default |
|
SerialTaskQueue * | globalLuminosityBlocksQueue () final |
|
SerialTaskQueue * | globalRunsQueue () final |
|
bool | wantsGlobalLuminosityBlocks () const final |
|
bool | wantsGlobalRuns () const final |
|
bool | wantsInputProcessBlocks () const final |
|
bool | wantsProcessBlocks () 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 |
|
std::vector< ESProxyIndex > const & | esGetTokenIndicesVector (edm::Transition iTrans) const |
|
std::vector< ESRecordIndex > const & | esGetTokenRecordIndicesVector (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::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, 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 = InEvent> |
EDConsumerBaseAdaptor< B > | consumes (edm::InputTag tag) noexcept |
|
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<Transition Tr = Transition::Event> |
constexpr auto | esConsumes () noexcept |
|
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag const &tag) |
|
template<Transition Tr = Transition::Event> |
auto | esConsumes (ESInputTag tag) noexcept |
|
template<Transition Tr = Transition::Event> |
ESGetTokenGeneric | esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey) |
| Used with EventSetupRecord::doGet. More...
|
|
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 48 of file HGCalSimHitStudy.cc.
◆ HGCalSimHitStudy()
Definition at line 92 of file HGCalSimHitStudy.cc.
111 if (
name ==
"HCal") {
113 tok_hrndc_ = esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord, edm::Transition::BeginRun>();
114 tok_hgcGeom_.emplace_back(esConsumes<HGCalDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(
119 esConsumes<HGCalDDDConstants, IdealGeometryRecord, edm::Transition::BeginRun>(
edm::ESInputTag{
"",
name}));
References caloHitSources_, heRebuild_, TFileService::kSharedResource, Skims_PA_cff::name, nameDetectors_, source, tok_hgcGeom_, tok_hits_, and tok_hrndc_.
◆ ~HGCalSimHitStudy()
HGCalSimHitStudy::~HGCalSimHitStudy |
( |
| ) |
|
|
inlineoverride |
◆ analyze()
Implements edm::one::EDAnalyzerBase.
Definition at line 149 of file HGCalSimHitStudy.cc.
154 if (theCaloHitContainers.
isValid()) {
156 edm::LogVerbatim(
"HGCalValidation") <<
" PcalohitItr = " << theCaloHitContainers->size();
157 std::vector<PCaloHit> caloHits;
159 for (
auto const&
hit : *(theCaloHitContainers.
product())) {
160 unsigned int id =
hit.
id();
163 caloHits.emplace_back(
hit);
164 caloHits.back().setID(hid.
rawId());
166 edm::LogVerbatim(
"HGCalValidation") <<
"Hit[" << caloHits.size() <<
"] " << hid;
170 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 180 of file HGCalSimHitStudy.cc.
184 std::map<uint32_t, hitsinfo> map_hits;
187 unsigned int nused(0);
191 uint32_t
id =
hit.
id();
194 HepGeom::Point3D<float> gcoord;
199 sector = detId.
iphi();
205 edm::LogVerbatim(
"HGCalValidation") <<
"i/p " << subdet <<
":" <<
zside <<
":" << cell <<
":" << sector <<
":"
207 gcoord = HepGeom::Point3D<float>(rz *
cos(
etaphi.second) / cosh(
etaphi.first),
211 std::pair<float, float>
xy;
215 cell = detId.
cellU();
226 }
else if (
hgcons_[ih]->waferHexagon8()) {
228 subdet = static_cast<int>(detId.
det());
229 cell = detId.
cellU();
239 }
else if (
hgcons_[ih]->tileTrapezoid()) {
241 subdet = static_cast<int>(detId.
det());
242 sector = detId.
ieta();
255 double xp = (zp < 0) ? -
xy.first :
xy.first;
256 gcoord = HepGeom::Point3D<float>(xp,
xy.second, zp);
259 <<
"i/p " << subdet <<
":" <<
zside <<
":" <<
layer <<
":" << sector <<
":" <<
sector2 <<
":" << cell <<
":"
260 <<
cell2 <<
" o/p " <<
xy.first <<
":" <<
xy.second <<
":" << zp;
263 double tof = (gcoord.mag() * CLHEP::mm) / CLHEP::c_light;
266 <<
"Detector " <<
name <<
" zside = " <<
zside <<
" layer = " <<
layer <<
" type = " <<
type
267 <<
" wafer = " << sector <<
":" <<
sector2 <<
" cell = " << cell <<
":" <<
cell2 <<
" positon = " << gcoord
268 <<
" energy = " <<
energy <<
" time = " <<
time <<
":" << tof;
273 if (map_hits.count(
id) != 0) {
277 hinfo.phi = gcoord.getPhi();
278 hinfo.eta = gcoord.getEta();
288 if (
hinfo.layer <= static_cast<int>(
h_XY_.size()))
289 h_XY_[
hinfo.layer - 1]->Fill(gcoord.x(), gcoord.y());
295 h_W1_[ih]->Fill(sector);
296 h_C1_[ih]->Fill(cell);
299 edm::LogVerbatim(
"HGCalValidation") <<
name <<
" with " << map_hits.size() <<
":" << nused <<
" detector elements"
302 for (
auto const&
hit : map_hits) {
306 <<
" ---------------------- eta = " <<
hinfo.eta <<
" phi = " <<
hinfo.phi <<
" layer = " <<
hinfo.layer
307 <<
" 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_, 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(), phase1PixelTopology::layer, layerFront_, Skims_PA_cff::name, hgcalTopologyTester_cfi::sector2, funct::sin(), HcalDetId::subdet(), DetId::subdetId(), protons_cff::time, 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 354 of file HGCalSimHitStudy.cc.
362 name <<
"RZ_AllDetectors";
363 title <<
"R vs Z for All Detectors";
372 for (
int ly = 0; ly <
nLayers_; ++ly) {
375 name <<
"XY_L" << (ly + 1);
376 title <<
"Y vs X at Layer " << (ly + 1);
385 name <<
"EtaPhi_AllDetectors";
386 title <<
"#phi vs #eta for All Detectors";
396 name <<
"EtFiZp_AllDetectors";
397 title <<
"#phi vs #eta (+z) for All Detectors";
407 name <<
"EtFiZm_AllDetectors";
408 title <<
"#phi vs #eta (-z) for All Detectors";
419 name <<
"LayerZp_AllDetectors";
420 title <<
"Energy vs Layer (+z) for All Detectors";
429 name <<
"LayerZm_AllDetectors";
430 title <<
"Energy vs Layer (-z) for All Detectors";
440 name <<
"E_AllDetectors";
441 title <<
"Energy Deposit for All Detectors";
446 h_E_.emplace_back(fs->
make<TH1D>(
name.str().c_str(),
title.str().c_str(), 1000, 0.0, 1.0));
451 name <<
"T_AllDetectors";
452 title <<
"Time for All Detectors";
457 h_T_.emplace_back(fs->
make<TH1D>(
name.str().c_str(),
title.str().c_str(), 1000, 0.0, 200.0));
465 h_Ly_.emplace_back(fs->
make<TH1D>(
name.str().c_str(),
title.str().c_str(), 200, 0, 100));
471 h_W1_.emplace_back(fs->
make<TH1D>(
name.str().c_str(),
title.str().c_str(), 200, -50, 50));
476 h_C1_.emplace_back(fs->
make<TH1D>(
name.str().c_str(),
title.str().c_str(), 720, 0, 360));
482 h_W1_.emplace_back(fs->
make<TH1D>(
name.str().c_str(),
title.str().c_str(), 200, -50, 50));
487 h_W2_.emplace_back(fs->
make<TH1D>(
name.str().c_str(),
title.str().c_str(), 100, -50, 50));
492 h_C1_.emplace_back(fs->
make<TH1D>(
name.str().c_str(),
title.str().c_str(), 100, 0, 50));
497 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_, runGCPTkAlMap::title, zmax_, and zmin_.
◆ beginRun()
Definition at line 331 of file HGCalSimHitStudy.cc.
References edm::EventSetup::getHandle(), HcalDDDRecConstants::getMaxDepth(), hcons_, heRebuild_, hgcons_, dqmdumpme::k, layerFront_, layers_, nameDetectors_, edm::ESHandle< T >::product(), tok_hgcGeom_, tok_hrndc_, and verbosity_.
◆ endRun()
◆ fillDescriptions()
Definition at line 127 of file HGCalSimHitStudy.cc.
129 std::vector<std::string>
names = {
"HGCalEESensitive",
"HGCalHESiliconSensitive",
"HGCalHEScintillatorSensitive"};
130 std::vector<std::string>
sources = {
"HGCHitsEE",
"HGCHitsHEfront",
"HGCHitsHEback"};
131 desc.add<std::vector<std::string> >(
"detectorNames",
names);
132 desc.add<std::vector<std::string> >(
"caloHitSources",
sources);
133 desc.addUntracked<
double>(
"rMin", 0.0);
134 desc.addUntracked<
double>(
"rMax", 3000.0);
135 desc.addUntracked<
double>(
"zMin", 3000.0);
136 desc.addUntracked<
double>(
"zMax", 6000.0);
137 desc.addUntracked<
double>(
"etaMin", 1.0);
138 desc.addUntracked<
double>(
"etaMax", 3.0);
139 desc.addUntracked<
int>(
"nBinR", 300);
140 desc.addUntracked<
int>(
"nBinZ", 300);
141 desc.addUntracked<
int>(
"nBinEta", 200);
142 desc.addUntracked<
int>(
"layers", 50);
143 desc.addUntracked<
int>(
"verbosity", 0);
144 desc.addUntracked<
bool>(
"ifNose",
false);
145 desc.addUntracked<
bool>(
"ifLayer",
false);
146 descriptions.
add(
"hgcalSimHitStudy",
desc);
References edm::ConfigurationDescriptions::add(), submitPVResolutionJobs::desc, 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_hgcGeom_
◆ tok_hits_
◆ tok_hrndc_
◆ verbosity_
const int HGCalSimHitStudy::verbosity_ |
|
private |
◆ zmax_
const double HGCalSimHitStudy::zmax_ |
|
private |
◆ zmin_
const double HGCalSimHitStudy::zmin_ |
|
private |
T const * product() const
const std::vector< std::string > nameDetectors_
std::vector< TH1D * > h_T_
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_
constexpr std::array< uint8_t, layerIndexSize > layer
edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tok_hrndc_
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/set 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
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
Log< level::Info, true > LogVerbatim
std::vector< edm::ESGetToken< HGCalDDDConstants, IdealGeometryRecord > > tok_hgcGeom_
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_
T getParameter(std::string const &) const
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 #