CMS 3D CMS Logo

EGHcalRecHitSelector.cc
Go to the documentation of this file.
2 
3 #include <limits>
4 
6  : maxDIEta_(config.getParameter<int>("maxDIEta")),
7  maxDIPhi_(config.getParameter<int>("maxDIPhi")),
8  minEnergyHB_(config.getParameter<double>("minEnergyHB")),
9  minEnergyHEDepth1_(config.getParameter<double>("minEnergyHEDepth1")),
10  minEnergyHEDefault_(config.getParameter<double>("minEnergyHEDefault")),
11  towerMapToken_(cc.esConsumes<CaloTowerConstituentsMap, CaloGeometryRecord, edm::Transition::BeginRun>()) {}
12 
15  desc.add<int>("maxDIEta", 5);
16  desc.add<int>("maxDIPhi", 5);
17  desc.add<double>("minEnergyHB", 0.8);
18  desc.add<double>("minEnergyHEDepth1", 0.1);
19  desc.add<double>("minEnergyHEDefault", 0.2);
20  return desc;
21 }
22 
23 int EGHcalRecHitSelector::calDIEta(int iEta1, int iEta2) {
24  int dEta = iEta1 - iEta2;
25  if (iEta1 * iEta2 < 0) { //-ve to +ve transistion and no crystal at zero
26  if (dEta < 0)
27  dEta++;
28  else
29  dEta--;
30  }
31  return dEta;
32 }
33 
34 int EGHcalRecHitSelector::calDIPhi(int iPhi1, int iPhi2) {
35  int dPhi = iPhi1 - iPhi2;
36  if (dPhi > 72 / 2)
37  dPhi -= 72;
38  else if (dPhi < -72 / 2)
39  dPhi += 72;
40  return dPhi;
41 }
42 
44  if (id.subdetId() == HcalBarrel)
45  return minEnergyHB_;
46  else if (id.subdetId() == HcalEndcap) {
47  if (id.depth() == 1)
48  return minEnergyHEDepth1_;
49  else
50  return minEnergyHEDefault_;
51  } else
53 }
static int calDIPhi(int iPhi1, int iPhi2)
ESGetTokenH3DDVariant esConsumes(std::string const &Record, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
Definition: config.py:1
EGHcalRecHitSelector(const edm::ParameterSet &config, edm::ConsumesCollector)
float getMinEnergyHCAL_(HcalDetId id) const
static int calDIEta(int iEta1, int iEta2)
Transition
Definition: Transition.h:12
static edm::ParameterSetDescription makePSetDescription()
HLT enums.