CMS 3D CMS Logo

List of all members | Public Member Functions
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
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () 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
 
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 const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
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)
 

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)
 
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<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)
 

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 55 of file HcalTestNumberingTest.cc.

55 {}
HcalTestNumberingTester::~HcalTestNumberingTester ( )
override

Definition at line 57 of file HcalTestNumberingTest.cc.

57 {}

Member Function Documentation

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

Implements edm::one::EDAnalyzerBase.

Definition at line 60 of file HcalTestNumberingTest.cc.

References gather_cfg::cout, TauDecayModes::dec, DEFINE_FWK_MODULE, PVValHelper::eta, EnergyCorrector::etas, edm::EventSetup::get(), HcalDDDSimConstants::getEtaDepth(), HcalDDDRecConstants::getEtaRange(), HcalDDDRecConstants::getPhis(), HcalNumberingScheme::getUnitID(), HcalBarrel, HcalEndcap, globals_cff::id1, globals_cff::id2, edm::ESHandleBase::isValid(), dqmdumpme::k, phi, DetId::rawId(), HcalHitRelabeller::relabel(), createJobs::tmp, and ecaldqm::zside().

Referenced by beginJob().

60  {
62  iSetup.get<HcalSimNumberingRecord>().get(pHSNDC);
64  iSetup.get<HcalRecNumberingRecord>().get(pHRNDC);
65 
66  if (pHSNDC.isValid() && pHRNDC.isValid()) {
67  std::cout << "about to de-reference the edm's" << std::endl;
68  HcalDDDSimConstants* hcs = (HcalDDDSimConstants*)(&(*pHSNDC));
69  HcalDDDRecConstants* hcr = (HcalDDDRecConstants*)(&(*pHRNDC));
71  HcalNumberingScheme* schme2 = dynamic_cast<HcalNumberingScheme*>(new HcalTestNumberingScheme(false));
72 
73  for (int type = 0; type < 2; ++type) {
74  HcalSubdetector sub = (type == 0) ? HcalBarrel : HcalEndcap;
75  for (int zs = 0; zs < 2; ++zs) {
76  int zside = 2 * zs - 1;
77  std::pair<int, int> etas = hcr->getEtaRange(type);
78  for (int eta = etas.first; eta <= etas.second; ++eta) {
79  std::vector<std::pair<int, double> > phis = hcr->getPhis(sub, eta);
80  for (unsigned int k = 0; k < phis.size(); ++k) {
81  int phi = phis[k].first;
82  int lmin = (type == 1 && eta == 16) ? 8 : 1;
83  int lmax = (type == 1) ? 19 : ((eta == 16) ? 7 : 17);
84  for (int lay = lmin; lay <= lmax; ++lay) {
85  std::pair<int, int> etd = hcs->getEtaDepth(sub, eta, phi, zside, 0, lay);
86  HcalNumberingFromDDD::HcalID tmp(sub, zs, etd.second, etd.first, phi, phi, lay);
87  uint32_t id1 = schme1->getUnitID(tmp);
88  uint32_t id2 = schme2->getUnitID(tmp);
89  DetId id0 = HcalHitRelabeller::relabel(id2, hcr);
90  std::cout << "I/P " << sub << ":" << zside * eta << ":" << phi << ":" << lay << " Normal " << std::hex
91  << id1 << std::dec << " " << HcalDetId(id1) << " Test " << std::hex << id2 << std::dec << " "
92  << HcalDetId(id0);
93  if (id1 != id0.rawId())
94  std::cout << " *** ERROR ***";
95  std::cout << std::endl;
96  }
97  }
98  }
99  }
100  }
101  }
102 }
type
Definition: HCALResponse.h:21
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
bool isValid() const
Definition: ESHandle.h:44
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.

References analyze(), and iEvent.

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

Reimplemented from edm::one::EDAnalyzerBase.

Definition at line 52 of file HcalTestNumberingTest.cc.

52 {}