Calibration
IsolatedParticles
src
FindEtaPhi.cc
Go to the documentation of this file.
1
#include "
Calibration/IsolatedParticles/interface/FindEtaPhi.h
"
2
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
3
4
namespace
spr
{
5
6
spr::EtaPhi
getEtaPhi
(
int
ieta
,
int
iphi
,
bool
debug
) {
7
int
ietal = (
ieta
- 1) / 2;
8
int
ietar =
ieta
- ietal - 1;
9
int
iphil = (
iphi
- 1) / 2;
10
int
iphir =
iphi
- iphil - 1;
11
spr::EtaPhi
etaphi
;
12
etaphi
.ietaE[0] = ietal;
13
etaphi
.ietaW[0] = ietar;
14
etaphi
.iphiN[0] = iphil;
15
etaphi
.iphiS[0] = iphir;
16
if
(ietal == ietar && iphil == iphir) {
17
etaphi
.ntrys = 1;
18
}
else
if
(ietal == ietar || iphil == iphir) {
19
etaphi
.ntrys = 2;
20
etaphi
.ietaE[1] = ietar;
21
etaphi
.ietaW[1] = ietal;
22
etaphi
.iphiN[1] = iphir;
23
etaphi
.iphiS[1] = iphil;
24
}
else
{
25
etaphi
.ntrys = 4;
26
etaphi
.ietaE[1] = ietar;
27
etaphi
.ietaW[1] = ietal;
28
etaphi
.iphiN[1] = iphil;
29
etaphi
.iphiS[1] = iphir;
30
etaphi
.ietaE[2] = ietal;
31
etaphi
.ietaW[1] = ietar;
32
etaphi
.iphiN[2] = iphir;
33
etaphi
.iphiS[1] = iphil;
34
etaphi
.ietaE[3] = ietar;
35
etaphi
.ietaW[1] = ietal;
36
etaphi
.iphiN[3] = iphir;
37
etaphi
.iphiS[1] = iphil;
38
}
39
40
if
(
debug
) {
41
edm::LogVerbatim
(
"IsoTrack"
) <<
"getEtaPhi:: Has "
<<
etaphi
.ntrys <<
" possibilites for "
<<
ieta
<<
"X"
<<
iphi
42
<<
" matrix"
;
43
for
(
int
itry = 0; itry <
etaphi
.ntrys; itry++) {
44
edm::LogVerbatim
(
"IsoTrack"
) <<
"Trial "
<< itry <<
" with etaE|etaW "
<<
etaphi
.ietaE[itry] <<
"|"
45
<<
etaphi
.ietaW[itry] <<
" and phiN|PhiS "
<<
etaphi
.iphiN[itry] <<
"|"
46
<<
etaphi
.iphiS[itry];
47
}
48
}
49
return
etaphi
;
50
}
51
}
// namespace spr
fastmath::etaphi
std::pair< T, T > etaphi(T x, T y, T z)
Definition:
FastMath.h:162
edm::LogVerbatim
Log< level::Info, true > LogVerbatim
Definition:
MessageLogger.h:128
LEDCalibrationChannels.iphi
iphi
Definition:
LEDCalibrationChannels.py:64
MessageLogger.h
spr::EtaPhi
Definition:
FindEtaPhi.h:14
FindEtaPhi.h
debug
#define debug
Definition:
HDRShower.cc:19
LEDCalibrationChannels.ieta
ieta
Definition:
LEDCalibrationChannels.py:63
spr::getEtaPhi
void getEtaPhi(HBHERecHitCollection::const_iterator hit, std::vector< int > &RH_ieta, std::vector< int > &RH_iphi, std::vector< double > &RH_ene, bool debug=false)
Definition:
FindDistCone.cc:87
spr
Definition:
CaloConstants.h:6
Generated for CMSSW Reference Manual by
1.8.14