#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 |
|
| 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 71 of file LayerNumberConverter.h.
References lo_, mkfit::phase1, and useMatched.
Referenced by convertLayerNumber().
75 if (cmsswdet == 2 || cmsswdet == 4 || cmsswdet == 6)
82 if (cmsswlay == 1 && isStereo == -1)
84 else if (cmsswlay == 2 && isStereo == -1)
86 else if (cmsswlay == 3 && isStereo == 0)
88 else if (cmsswlay == 4 && isStereo == 0)
92 else if (cmsswdet == 5) {
93 if (cmsswlay == 1 && isStereo == -1)
95 else if (cmsswlay == 2 && isStereo == -1)
97 else if (cmsswlay >= 3 && cmsswlay <= 6 && isStereo == 0)
98 return 6 + cmsswlay + lOffset;
104 if ((cmsswlay == 1 || cmsswlay == 2) && (isStereo == 0 || isStereo == 1)) {
105 return 1 + cmsswlay * 2 + isStereo + lOffset;
106 }
else if (cmsswlay == 3 && isStereo == 0)
108 else if (cmsswlay == 4 && isStereo == 0)
112 else if (cmsswdet == 5) {
113 if ((cmsswlay == 1 || cmsswlay == 2) && (isStereo == 0 || isStereo == 1)) {
114 return 7 + cmsswlay * 2 + isStereo + lOffset;
115 }
else if (cmsswlay >= 3 && cmsswlay <= 6 && isStereo == 0)
116 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 121 of file LayerNumberConverter.h.
References lo_, mkfit::phase1, and useMatched.
Referenced by convertLayerNumber().
122 if (cmsswdet == 1 || cmsswdet == 3 || cmsswdet == 5)
125 return cmsswdisk - 1;
132 if ((isStereo != 0 && isStereo != 1) || cmsswdisk < 1)
135 if (cmsswdet == 4 && cmsswdisk <= 3)
136 return cmsswdisk * 2 + isStereo + lOffset;
138 else if (cmsswdet == 6 && cmsswdisk <= 9)
139 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 24 of file LayerNumberConverter.h.
References convertBarrelLayerNumber(), convertDiskNumber(), lo_, mkfit::phase1, mkfit::phase2, and useMatched.
Referenced by MkFitSeedConverter::convertSeeds(), MkFitGeometryESProducer::fillShapeAndPlacement(), and main().
29 return 16 + lay - 1 + (posZ ? 0 : 22);
31 return 4 + (2 * (lay - 1)) + isStereo;
33 return 16 + 12 + (2 * (lay - 1)) + isStereo + (posZ ? 0 : 22);
34 throw std::runtime_error(
"bad subDet");
37 if (det == 1 || det == 3 || det == 5) {
49 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 54 of file LayerNumberConverter.h.
References lo_, and mkfit::phase2.
56 if (det == 1 || det == 2)
58 if (det == 4 || det == 5)
60 throw std::runtime_error(
"bad subDet");
62 if (det == 3 || det == 5) {
63 return lay == 1 || lay == 2;
65 if (det == 4 || det == 6) {
◆ getEra()
TkLayout mkfit::LayerNumberConverter::getEra |
( |
| ) |
const |
|
inline |
◆ nLayers()
unsigned int mkfit::LayerNumberConverter::nLayers |
( |
| ) |
const |
|
inline |
◆ reset()
void mkfit::LayerNumberConverter::reset |
( |
TkLayout |
layout | ) |
|
|
inline |
◆ lo_
TkLayout mkfit::LayerNumberConverter::lo_ |
|
private |