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 
14  desc.add<int>("maxDIEta", 5);
15  desc.add<int>("maxDIPhi", 5);
16  desc.add<double>("minEnergyHB", 0.8);
17  desc.add<double>("minEnergyHEDepth1", 0.1);
18  desc.add<double>("minEnergyHEDefault", 0.2);
19  return desc;
20 }
21 
22 int EGHcalRecHitSelector::calDIEta(int iEta1, int iEta2) {
23  int dEta = iEta1 - iEta2;
24  if (iEta1 * iEta2 < 0) { //-ve to +ve transistion and no crystal at zero
25  if (dEta < 0)
26  dEta++;
27  else
28  dEta--;
29  }
30  return dEta;
31 }
32 
33 int EGHcalRecHitSelector::calDIPhi(int iPhi1, int iPhi2) {
34  int dPhi = iPhi1 - iPhi2;
35  if (dPhi > 72 / 2)
36  dPhi -= 72;
37  else if (dPhi < -72 / 2)
38  dPhi += 72;
39  return dPhi;
40 }
41 
43  if (id.subdetId() == HcalBarrel)
44  return minEnergyHB_;
45  else if (id.subdetId() == HcalEndcap) {
46  if (id.depth() == 1)
47  return minEnergyHEDepth1_;
48  else
49  return minEnergyHEDefault_;
50  } else
52 }
EGHcalRecHitSelector::getMinEnergyHCAL_
float getMinEnergyHCAL_(HcalDetId id) const
Definition: EGHcalRecHitSelector.cc:42
edm::ParameterSetDescription::add
ParameterDescriptionBase * add(U const &iLabel, T const &value)
Definition: ParameterSetDescription.h:95
EGHcalRecHitSelector::minEnergyHEDefault_
float minEnergyHEDefault_
Definition: EGHcalRecHitSelector.h:40
EGHcalRecHitSelector::minEnergyHB_
float minEnergyHB_
Definition: EGHcalRecHitSelector.h:38
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
EGHcalRecHitSelector::EGHcalRecHitSelector
EGHcalRecHitSelector(const edm::ParameterSet &config)
Definition: EGHcalRecHitSelector.cc:5
HcalBarrel
Definition: HcalAssistant.h:33
HLT_2018_cff.dEta
dEta
Definition: HLT_2018_cff.py:12289
config
Definition: config.py:1
EGHcalRecHitSelector::makePSetDescription
static edm::ParameterSetDescription makePSetDescription()
Definition: EGHcalRecHitSelector.cc:12
HLT_2018_cff.dPhi
dPhi
Definition: HLT_2018_cff.py:12290
LEDCalibrationChannels.depth
depth
Definition: LEDCalibrationChannels.py:65
edm::ParameterSet
Definition: ParameterSet.h:36
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
EGHcalRecHitSelector.h
HcalDetId
Definition: HcalDetId.h:12
createfilelist.int
int
Definition: createfilelist.py:10
EGHcalRecHitSelector::minEnergyHEDepth1_
float minEnergyHEDepth1_
Definition: EGHcalRecHitSelector.h:39
EGHcalRecHitSelector::calDIEta
static int calDIEta(int iEta1, int iEta2)
Definition: EGHcalRecHitSelector.cc:22
HcalEndcap
Definition: HcalAssistant.h:34
EGHcalRecHitSelector::calDIPhi
static int calDIPhi(int iPhi1, int iPhi2)
Definition: EGHcalRecHitSelector.cc:33