CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
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 const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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,
HcalRecNumberingRecord
tokReco_
 
const edm::ESGetToken
< HcalDDDSimConstants,
HcalSimNumberingRecord
tokSim_
 

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
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< B > consumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, 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)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes () noexcept
 
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...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

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

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

Definition at line 45 of file HcalTestNumberingTest.cc.

Constructor & Destructor Documentation

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

Definition at line 59 of file HcalTestNumberingTest.cc.

60  : tokSim_(esConsumes<HcalDDDSimConstants, HcalSimNumberingRecord>()),
61  tokReco_(esConsumes<HcalDDDRecConstants, HcalRecNumberingRecord>()) {}
const edm::ESGetToken< HcalDDDSimConstants, HcalSimNumberingRecord > tokSim_
const edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tokReco_
HcalTestNumberingTester::~HcalTestNumberingTester ( )
override

Definition at line 63 of file HcalTestNumberingTest.cc.

63 {}

Member Function Documentation

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

Implements edm::one::EDAnalyzerBase.

Definition at line 66 of file HcalTestNumberingTest.cc.

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

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);
88  DetId id0 = HcalHitRelabeller::relabel(id2, hcr);
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 }
const edm::ESGetToken< HcalDDDSimConstants, HcalSimNumberingRecord > tokSim_
Log< level::Info, true > LogVerbatim
const edm::ESGetToken< HcalDDDRecConstants, HcalRecNumberingRecord > tokReco_
virtual uint32_t getUnitID(const HcalNumberingFromDDD::HcalID &id)
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
int zside(DetId const &)
HcalSubdetector
Definition: HcalAssistant.h:31
std::vector< std::pair< int, double > > getPhis(const int &subdet, const int &ieta) const
Definition: DetId.h:17
std::pair< int, int > getEtaDepth(const int &det, int etaR, const int &phi, const int &zside, int depth, const int &lay) const
DetId relabel(const uint32_t testId) const
std::pair< int, int > getEtaRange(const int &i) const
tmp
align.sh
Definition: createJobs.py:716
void HcalTestNumberingTester::beginJob ( void  )
inlineoverridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 50 of file HcalTestNumberingTest.cc.

50 {}
void HcalTestNumberingTester::endJob ( void  )
inlineoverridevirtual

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 52 of file HcalTestNumberingTest.cc.

52 {}

Member Data Documentation

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

Definition at line 56 of file HcalTestNumberingTest.cc.

Referenced by analyze().

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

Definition at line 55 of file HcalTestNumberingTest.cc.

Referenced by analyze().