#include <LayerNumberConverter.h>
|
int | convertBarrelLayerNumber (int cmsswdet, int cmsswlay, bool useMatched, int isStereo) const |
|
int | convertDiskNumber (int cmsswdet, int cmsswdisk, bool useMatched, int isStereo) const |
|
int | convertLayerNumber (int det, int lay, bool useMatched, int isStereo, bool posZ) const |
|
bool | doesHaveStereo (int det, int lay) const |
|
TkLayout | getEra () const |
|
bool | isPhase1 () const |
|
bool | isPhase2 () const |
|
| LayerNumberConverter (TkLayout layout) |
|
unsigned int | nLayers () const |
|
void | reset (TkLayout layout) |
|
Definition at line 10 of file LayerNumberConverter.h.
◆ LayerNumberConverter()
mkfit::LayerNumberConverter::LayerNumberConverter |
( |
TkLayout |
layout | ) |
|
|
inline |
◆ convertBarrelLayerNumber()
int mkfit::LayerNumberConverter::convertBarrelLayerNumber |
( |
int |
cmsswdet, |
|
|
int |
cmsswlay, |
|
|
bool |
useMatched, |
|
|
int |
isStereo |
|
) |
| const |
|
inline |
Definition at line 73 of file LayerNumberConverter.h.
References lo_, mkfit::phase1, and useMatched.
Referenced by convertLayerNumber().
77 if (cmsswdet == 2 || cmsswdet == 4 || cmsswdet == 6)
84 if (cmsswlay == 1 && isStereo == -1)
86 else if (cmsswlay == 2 && isStereo == -1)
88 else if (cmsswlay == 3 && isStereo == 0)
90 else if (cmsswlay == 4 && isStereo == 0)
94 else if (cmsswdet == 5) {
95 if (cmsswlay == 1 && isStereo == -1)
97 else if (cmsswlay == 2 && isStereo == -1)
99 else if (cmsswlay >= 3 && cmsswlay <= 6 && isStereo == 0)
100 return 6 + cmsswlay + lOffset;
106 if ((cmsswlay == 1 || cmsswlay == 2) && (isStereo == 0 || isStereo == 1)) {
107 return 1 + cmsswlay * 2 + isStereo + lOffset;
108 }
else if (cmsswlay == 3 && isStereo == 0)
110 else if (cmsswlay == 4 && isStereo == 0)
114 else if (cmsswdet == 5) {
115 if ((cmsswlay == 1 || cmsswlay == 2) && (isStereo == 0 || isStereo == 1)) {
116 return 7 + cmsswlay * 2 + isStereo + lOffset;
117 }
else if (cmsswlay >= 3 && cmsswlay <= 6 && isStereo == 0)
118 return 10 + cmsswlay + lOffset;
constexpr bool useMatched
◆ convertDiskNumber()
int mkfit::LayerNumberConverter::convertDiskNumber |
( |
int |
cmsswdet, |
|
|
int |
cmsswdisk, |
|
|
bool |
useMatched, |
|
|
int |
isStereo |
|
) |
| const |
|
inline |
Definition at line 123 of file LayerNumberConverter.h.
References lo_, mkfit::phase1, and useMatched.
Referenced by convertLayerNumber().
124 if (cmsswdet == 1 || cmsswdet == 3 || cmsswdet == 5)
127 return cmsswdisk - 1;
134 if ((isStereo != 0 && isStereo != 1) || cmsswdisk < 1)
137 if (cmsswdet == 4 && cmsswdisk <= 3)
138 return cmsswdisk * 2 + isStereo + lOffset;
140 else if (cmsswdet == 6 && cmsswdisk <= 9)
141 return 6 + cmsswdisk * 2 + isStereo + lOffset;
constexpr bool useMatched
◆ convertLayerNumber()
int mkfit::LayerNumberConverter::convertLayerNumber |
( |
int |
det, |
|
|
int |
lay, |
|
|
bool |
useMatched, |
|
|
int |
isStereo, |
|
|
bool |
posZ |
|
) |
| const |
|
inline |
Definition at line 26 of file LayerNumberConverter.h.
References convertBarrelLayerNumber(), convertDiskNumber(), lo_, mkfit::phase1, mkfit::phase2, and useMatched.
Referenced by MkFitSeedConverter::convertSeeds(), MkFitGeometryESProducer::fillShapeAndPlacement(), and main().
31 return 16 + lay - 1 + (posZ ? 0 : 22);
33 return 4 + (2 * (lay - 1)) + isStereo;
35 return 16 + 12 + (2 * (lay - 1)) + isStereo + (posZ ? 0 : 22);
36 throw std::runtime_error(
"bad subDet");
39 if (det == 1 || det == 3 || det == 5) {
51 disk += 25 + 2 * lOffset;
constexpr bool useMatched
int convertDiskNumber(int cmsswdet, int cmsswdisk, bool useMatched, int isStereo) const
int convertBarrelLayerNumber(int cmsswdet, int cmsswlay, bool useMatched, int isStereo) const
◆ doesHaveStereo()
bool mkfit::LayerNumberConverter::doesHaveStereo |
( |
int |
det, |
|
|
int |
lay |
|
) |
| const |
|
inline |
Definition at line 56 of file LayerNumberConverter.h.
References lo_, and mkfit::phase2.
58 if (det == 1 || det == 2)
60 if (det == 4 || det == 5)
62 throw std::runtime_error(
"bad subDet");
64 if (det == 3 || det == 5) {
65 return lay == 1 || lay == 2;
67 if (det == 4 || det == 6) {
◆ getEra()
TkLayout mkfit::LayerNumberConverter::getEra |
( |
| ) |
const |
|
inline |
◆ isPhase1()
bool mkfit::LayerNumberConverter::isPhase1 |
( |
| ) |
const |
|
inline |
◆ isPhase2()
bool mkfit::LayerNumberConverter::isPhase2 |
( |
| ) |
const |
|
inline |
◆ nLayers()
unsigned int mkfit::LayerNumberConverter::nLayers |
( |
| ) |
const |
|
inline |
◆ reset()
void mkfit::LayerNumberConverter::reset |
( |
TkLayout |
layout | ) |
|
|
inline |
◆ lo_
TkLayout mkfit::LayerNumberConverter::lo_ |
|
private |