|
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef MUON_MUONSECTORMAPPING_H
6 #define MUON_MUONSECTORMAPPING_H
29 void getSectors(
double phi, std::vector<int>& sectors)
const;
35 return sector % 2 == 0;
68 const int idx = sector % 2;
82 if (sector < 10)
return M_PI * (sector - 1) / 8.;
83 return -
M_PI * (2 - (sector - 1) / 8.);
90 int sliceIndex =
static_cast<int>(
val / 2);
91 double valueInSlice =
val - 2 * sliceIndex;
92 int sector = 2 * sliceIndex + 1;
93 if (valueInSlice > 1.2) ++sector;
99 int sectorNext = sector != 16 ? sector + 1 : 1;
100 int sectorBefore = sector != 1 ? sector - 1 : 16;
101 if (
insideSector(sectorBefore, phi)) sectors.push_back(sectorBefore);
102 if (
insideSector(sector, phi)) sectors.push_back(sector);
103 if (
insideSector(sectorNext, phi)) sectors.push_back(sectorNext);
107 std::vector<int> sectors;
109 return sectors.size() > 1;
113 double sign = toSector ? -1 : 1;
121 if (sector1 == sector2)
return sectorPhi(sector1);
123 int s1 = sector1 < sector2 ? sector1 : sector2;
124 int s2 = sector1 > sector2 ? sector1 : sector2;
125 if (
s2 == 16 && s1 == 1) {
128 }
else if (std::abs(s1 -
s2) > 1) {
129 if (s_debug) std::cout <<
" bad sector combination: not neighbouring " << s1 <<
" " <<
s2 << std::endl;
135 if (phio1 >
M_PI) phio1 -= 2 *
M_PI;
142 if (std::abs(dphi) > 0.3 && s_debug) {
143 std::cout <<
" large dphi detected!!: phi " << phi <<
" sector " << sector <<
" phi " <<
sectorPhi(sector) <<
" " << phi
144 <<
" dphi " << dphi << std::endl;
155 double dphio = phi - phio;
156 if (dphio < -
M_PI) dphio += 2 *
M_PI;
159 double dphi = phio - phi_sec;
161 if (std::abs(dphi) > 0.3 && s_debug) {
162 std::cout <<
" large dphi detected!!: sector " << sector <<
" of hit " << sectorHit <<
" phi ref sector " << phi_sec <<
" hit "
163 << phi <<
" dphi " << dphi << std::endl;
double sectorSize(int sector) const
sector size (exclusive) in radians
double sectorWidth(int sector) const
sector width (with overlap) in radians
double transformRToSector(double r, double phi, int sector, bool toSector=true) const
expresses a radial position from and to the sector coordinate frame, the phi position should always b...
bool closeToSectorBoundary(double phi) const
checks whether the phi position is close to a sector boundary
void getSectors(double phi, std::vector< int > §ors) const
returns the main sector plus neighboring if the phi position is in an overlap region
double transformPhiToSector(double phi, int sector, bool toSector=true) const
transforms a phi position from and to the sector coordinate system in radians
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
static constexpr std::array< double, 2 > s_sectorSize
int getSector(double phi) const
returns the sector corresponding to the phi position
ATLAS_CHECK_FILE_THREAD_SAFETY
bool insideSector(int sector, double phi) const
checks whether the phi position is consistent with sector
static constexpr double s_oneEightsOfPi
double sectorPhi(int sector) const
returns the centeral phi position of a sector in radians
static bool isSmall(int sector)
static constexpr double s_inverseOneEightsOfPi
double transformRToNeighboringSector(double r, int sectorHit, int sectorTarget) const
transform a radial position from one sector frame into another
static constexpr double s_sectorOverlap
double sectorOverlapPhi(int sector1, int sector2) const
returns the phi position of the overlap between the two sectors (which have to be neighboring) in rad...
Define macros for attributes used to control the static checker.
static bool s_debug ATLAS_THREAD_SAFE