CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HcalTestNumberingTester Class Reference
Inheritance diagram for HcalTestNumberingTester:
edm::one::EDAnalyzer<> edm::one::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

void analyze (edm::Event const &iEvent, edm::EventSetup const &) override
 
void beginJob () override
 
void endJob () override
 
 HcalTestNumberingTester (const edm::ParameterSet &)
 
 ~HcalTestNumberingTester () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer<>
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase &&)=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
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Attributes

const edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecordtokReco_
 
const edm::ESGetToken< HcalDDDSimConstants, HcalSimNumberingRecordtokSim_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from edm::EDConsumerBase
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)
 

Detailed Description

Description: <one line="" class="" summary>="">

Implementation: <Notes on="" implementation>="">

Definition at line 45 of file HcalTestNumberingTest.cc.

Constructor & Destructor Documentation

◆ HcalTestNumberingTester()

HcalTestNumberingTester::HcalTestNumberingTester ( const edm::ParameterSet )
explicit

Definition at line 59 of file HcalTestNumberingTest.cc.

60  : tokSim_(esConsumes<HcalDDDSimConstants, HcalSimNumberingRecord>()),
61  tokReco_(esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord>()) {}

◆ ~HcalTestNumberingTester()

HcalTestNumberingTester::~HcalTestNumberingTester ( )
override

Definition at line 63 of file HcalTestNumberingTest.cc.

63 {}

Member Function Documentation

◆ analyze()

void HcalTestNumberingTester::analyze ( edm::Event const &  iEvent,
edm::EventSetup const &  iSetup 
)
overridevirtual

Implements edm::one::EDAnalyzerBase.

Definition at line 66 of file HcalTestNumberingTest.cc.

66  {
67  const HcalDDDSimConstants* hcs = &iSetup.getData(tokSim_);
68  const HcalDDDRecConstants* hcr = &iSetup.getData(tokReco_);
70  HcalNumberingScheme* schme2 = dynamic_cast<HcalNumberingScheme*>(new HcalTestNumberingScheme(false));
71 
72  for (int type = 0; type < 2; ++type) {
73  HcalSubdetector sub = (type == 0) ? HcalBarrel : HcalEndcap;
74  for (int zs = 0; zs < 2; ++zs) {
75  int zside = 2 * zs - 1;
76  std::pair<int, int> etas = hcr->getEtaRange(type);
77  for (int eta = etas.first; eta <= etas.second; ++eta) {
78  std::vector<std::pair<int, double> > phis = hcr->getPhis(sub, eta);
79  for (unsigned int k = 0; k < phis.size(); ++k) {
80  int phi = phis[k].first;
81  int lmin = (type == 1 && eta == 16) ? 8 : 1;
82  int lmax = (type == 1) ? 19 : ((eta == 16) ? 7 : 17);
83  for (int lay = lmin; lay <= lmax; ++lay) {
84  std::pair<int, int> etd = hcs->getEtaDepth(sub, eta, phi, zside, 0, lay);
85  HcalNumberingFromDDD::HcalID tmp(sub, zs, etd.second, etd.first, phi, phi, lay);
86  uint32_t id1 = schme1->getUnitID(tmp);
87  uint32_t id2 = schme2->getUnitID(tmp);
89  std::string ok = (id1 != id0.rawId()) ? " *** ERROR ***" : " ";
90  edm::LogVerbatim("HcalSim") << "I/P " << sub << ":" << zside * eta << ":" << phi << ":" << lay << " Normal "
91  << std::hex << id1 << std::dec << " " << HcalDetId(id1) << " Test " << std::hex
92  << id2 << std::dec << " " << HcalDetId(id0) << ok;
93  }
94  }
95  }
96  }
97  }
98 }

References TauDecayModes::dec, PVValHelper::eta, EnergyCorrector::etas, edm::EventSetup::getData(), HcalDDDSimConstants::getEtaDepth(), HcalDDDRecConstants::getEtaRange(), HcalDDDRecConstants::getPhis(), HcalNumberingScheme::getUnitID(), HcalBarrel, HcalEndcap, globals_cff::id1, globals_cff::id2, dqmdumpme::k, convertSQLiteXML::ok, phi, DetId::rawId(), HcalHitRelabeller::relabel(), AlCaHLTBitMon_QueryRunRegistry::string, createJobs::tmp, tokReco_, tokSim_, and ecaldqm::zside().

◆ beginJob()

void HcalTestNumberingTester::beginJob ( void  )
inlineoverridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 50 of file HcalTestNumberingTest.cc.

50 {}

◆ endJob()

void HcalTestNumberingTester::endJob ( void  )
inlineoverridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 52 of file HcalTestNumberingTest.cc.

52 {}

Member Data Documentation

◆ tokReco_

const edm::ESGetToken<HcalDDDRecConstants, HcalRecNumberingRecord> HcalTestNumberingTester::tokReco_
private

Definition at line 56 of file HcalTestNumberingTest.cc.

Referenced by analyze().

◆ tokSim_

const edm::ESGetToken<HcalDDDSimConstants, HcalSimNumberingRecord> HcalTestNumberingTester::tokSim_
private

Definition at line 55 of file HcalTestNumberingTest.cc.

Referenced by analyze().

HcalNumberingScheme::getUnitID
virtual uint32_t getUnitID(const HcalNumberingFromDDD::HcalID &id)
Definition: HcalNumberingScheme.cc:19
HcalDDDRecConstants::getPhis
std::vector< std::pair< int, double > > getPhis(const int &subdet, const int &ieta) const
Definition: HcalDDDRecConstants.cc:373
HcalNumberingFromDDD::HcalID
Definition: HcalNumberingFromDDD.h:21
ecaldqm::zside
int zside(DetId const &)
Definition: EcalDQMCommonUtils.cc:189
globals_cff.id1
id1
Definition: globals_cff.py:33
HcalBarrel
Definition: HcalAssistant.h:33
createJobs.tmp
tmp
align.sh
Definition: createJobs.py:716
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
HcalDDDSimConstants
Definition: HcalDDDSimConstants.h:24
DetId
Definition: DetId.h:17
EnergyCorrector.etas
etas
Definition: EnergyCorrector.py:45
PVValHelper::eta
Definition: PVValidationHelpers.h:70
dqmdumpme.k
k
Definition: dqmdumpme.py:60
HcalDDDSimConstants::getEtaDepth
std::pair< int, int > getEtaDepth(const int &det, int etaR, const int &phi, const int &zside, int depth, const int &lay) const
Definition: HcalDDDSimConstants.cc:252
HcalTestNumberingScheme
Definition: HcalTestNumberingScheme.h:11
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:40
HcalDetId
Definition: HcalDetId.h:12
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
HcalNumberingScheme
Definition: HcalNumberingScheme.h:13
HcalSubdetector
HcalSubdetector
Definition: HcalAssistant.h:31
DDAxes::phi
HcalHitRelabeller::relabel
DetId relabel(const uint32_t testId) const
Definition: HcalHitRelabeller.cc:49
DetId::rawId
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
HcalDDDRecConstants::getEtaRange
std::pair< int, int > getEtaRange(const int &i) const
Definition: HcalDDDRecConstants.h:74
HcalEndcap
Definition: HcalAssistant.h:34
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition: MessageLogger.h:128
HcalDDDRecConstants
Definition: HcalDDDRecConstants.h:23
globals_cff.id2
id2
Definition: globals_cff.py:34
TauDecayModes.dec
dec
Definition: TauDecayModes.py:142
HcalTestNumberingTester::tokSim_
const edm::ESGetToken< HcalDDDSimConstants, HcalSimNumberingRecord > tokSim_
Definition: HcalTestNumberingTest.cc:55
HcalTestNumberingTester::tokReco_
const edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tokReco_
Definition: HcalTestNumberingTest.cc:56