#include <MMT_Road.h>
|
| MMT_Road (const char sector, const int roadSize, const int UpX, const int DownX, const int UpUV, const int DownUV, const int xthr, const int uvthr, const int iroadx, const int iroadu=-1, const int iroadv=-1) |
|
| ~MMT_Road ()=default |
|
void | addHits (std::vector< std::shared_ptr< MMT_Hit > > &hits) |
|
double | avgSofX () const |
|
double | avgSofUV (const int uv1, const int uv2) const |
|
double | avgZofUV (const int uv1, const int uv2) const |
|
bool | checkCoincidences (const int bcwind) const |
|
unsigned int | countHits () const |
|
unsigned int | countRealHits () const |
|
unsigned int | countUVHits (bool flag) const |
|
unsigned int | countXHits (bool flag) const |
|
bool | evaluateLowRes () const |
|
bool | horizontalCheck () const |
|
void | incrementAge (const int bcwind) |
|
const std::vector< std::unique_ptr< MMT_Hit > > & | getHitVector () const |
|
int | getRoadSize () const |
|
int | getRoadSizeUpX () const |
|
int | getRoadSizeDownX () const |
|
int | getRoadSizeUpUV () const |
|
int | getRoadSizeDownUV () const |
|
char | getSector () const |
|
int | getXthreshold () const |
|
int | getUVthreshold () const |
|
int | iRoadx () const |
|
int | iRoadu () const |
|
int | iRoadv () const |
|
bool | matureCheck (const int bcwind) const |
|
double | mxl () const |
|
void | reset () |
|
bool | stereoCheck () const |
|
Definition at line 12 of file MMT_Road.h.
◆ MMT_Road()
MMT_Road::MMT_Road |
( |
const char |
sector, |
|
|
const int |
roadSize, |
|
|
const int |
UpX, |
|
|
const int |
DownX, |
|
|
const int |
UpUV, |
|
|
const int |
DownUV, |
|
|
const int |
xthr, |
|
|
const int |
uvthr, |
|
|
const int |
iroadx, |
|
|
const int |
iroadu = -1 , |
|
|
const int |
iroadv = -1 |
|
) |
| |
◆ ~MMT_Road()
◆ addHits()
void MMT_Road::addHits |
( |
std::vector< std::shared_ptr< MMT_Hit > > & |
hits | ) |
|
Definition at line 23 of file MMT_Road.cxx.
24 for (
const auto &hit_i :
hits) {
25 if (
m_sector != hit_i->getSector())
continue;
28 unsigned short int olow = 0, ohigh = 0;
34 else if (hit_i->isU()) {
39 else if (hit_i->isV()) {
46 double val = hit_i->getShift();
47 double slow =
val + (
m_roadSize*iroad + 0.5 - olow )*hit_i->getPitchOverZ();
48 double shigh =
val + (
m_roadSize*(iroad+1) + 0.5 + ohigh)*hit_i->getPitchOverZ();
50 val = hit_i->getRZSlope();
51 bool has_hit = (
val > 0.) ? (
val > slow &&
val < shigh) : (
val > shigh &&
val < slow);
52 if (!has_hit)
continue;
55 unsigned short int bo = hit_i->getPlane();
56 auto it = std::find_if(
m_road_hits.begin(),
m_road_hits.end(), [&bo](
const auto &hit) { return (hit->getPlane() == bo); });
59 if (!hit_i->isNoise() && (*it)->isNoise()) {
65 if (has_hit)
continue;
66 m_road_hits.emplace_back(std::make_unique<MMT_Hit>(hit_i.get()));
◆ avgSofUV()
double MMT_Road::avgSofUV |
( |
const int |
uv1, |
|
|
const int |
uv2 |
|
) |
| const |
Definition at line 81 of file MMT_Road.cxx.
82 std::vector<double> sl;
84 int bo = hit->getPlane();
85 if (bo == uv1 || bo == uv2) sl.push_back(hit->getRZSlope());
◆ avgSofX()
double MMT_Road::avgSofX |
( |
| ) |
const |
Definition at line 71 of file MMT_Road.cxx.
72 std::vector<double> sl;
74 int bo = hit->getPlane();
75 if (bo < 2 || bo > 5) sl.push_back(hit->getRZSlope());
◆ avgZofUV()
double MMT_Road::avgZofUV |
( |
const int |
uv1, |
|
|
const int |
uv2 |
|
) |
| const |
Definition at line 91 of file MMT_Road.cxx.
92 std::vector<double> zs;
94 int bo = hit->getPlane();
95 if (bo == uv1 || bo == uv2) zs.push_back(hit->getZ());
◆ checkCoincidences()
bool MMT_Road::checkCoincidences |
( |
const int |
bcwind | ) |
const |
Definition at line 101 of file MMT_Road.cxx.
103 if (!passHorizontalCheck)
return false;
105 if (!passStereoCheck)
return false;
107 return (passHorizontalCheck && passStereoCheck && passMatureCheck);
◆ countHits()
unsigned int MMT_Road::countHits |
( |
| ) |
const |
|
inline |
◆ countRealHits()
unsigned int MMT_Road::countRealHits |
( |
| ) |
const |
Definition at line 110 of file MMT_Road.cxx.
113 if (hit->isNoise() ==
false) nreal++;
◆ countUVHits()
unsigned int MMT_Road::countUVHits |
( |
bool |
flag | ) |
const |
Definition at line 118 of file MMT_Road.cxx.
119 unsigned int nuv = 0;
121 if (hit->getPlane() == 2 || hit->getPlane() == 4) {
122 if (hit->isNoise() ==
flag) nuv++;
124 if (hit->getPlane() == 3 || hit->getPlane() == 5) {
125 if (hit->isNoise() ==
flag) nuv++;
◆ countXHits()
unsigned int MMT_Road::countXHits |
( |
bool |
flag | ) |
const |
Definition at line 131 of file MMT_Road.cxx.
134 if (hit->getPlane() < 2 || hit->getPlane() > 5) {
135 if (hit->isNoise() ==
flag) nx++;
◆ evaluateLowRes()
bool MMT_Road::evaluateLowRes |
( |
| ) |
const |
Definition at line 141 of file MMT_Road.cxx.
142 unsigned int nhits1 = 0, nhits2 = 0;
144 if (hit->getPlane() < 4 && !hit->isNoise()) nhits1++;
145 else if (hit->getPlane() > 3 && !hit->isNoise()) nhits2++;
147 return (nhits1 < 4 || nhits2 < 4);
◆ getHitVector()
const std::vector<std::unique_ptr<MMT_Hit> >& MMT_Road::getHitVector |
( |
| ) |
const |
|
inline |
◆ getRoadSize()
int MMT_Road::getRoadSize |
( |
| ) |
const |
|
inline |
◆ getRoadSizeDownUV()
int MMT_Road::getRoadSizeDownUV |
( |
| ) |
const |
|
inline |
◆ getRoadSizeDownX()
int MMT_Road::getRoadSizeDownX |
( |
| ) |
const |
|
inline |
◆ getRoadSizeUpUV()
int MMT_Road::getRoadSizeUpUV |
( |
| ) |
const |
|
inline |
◆ getRoadSizeUpX()
int MMT_Road::getRoadSizeUpX |
( |
| ) |
const |
|
inline |
◆ getSector()
char MMT_Road::getSector |
( |
| ) |
const |
|
inline |
◆ getUVthreshold()
int MMT_Road::getUVthreshold |
( |
| ) |
const |
|
inline |
◆ getXthreshold()
int MMT_Road::getXthreshold |
( |
| ) |
const |
|
inline |
◆ horizontalCheck()
bool MMT_Road::horizontalCheck |
( |
| ) |
const |
Definition at line 150 of file MMT_Road.cxx.
151 int nx1 = 0, nx2 = 0;
153 if (hit->getPlane() >-1 && hit->getPlane() < 2) nx1++;
154 if (hit->getPlane() > 5 && hit->getPlane() < 8) nx2++;
156 return (nx1 > 0 && nx2 > 0 && (nx1+nx2) >=
m_xthr);
◆ incrementAge()
void MMT_Road::incrementAge |
( |
const int |
bcwind | ) |
|
Definition at line 159 of file MMT_Road.cxx.
160 std::vector<unsigned int> old_ihits;
161 for (
unsigned int j = 0; j <
m_road_hits.size(); j++) {
163 if (
m_road_hits[j]->getAge() > (bcwind-1)) old_ihits.push_back(j);
◆ iRoadu()
int MMT_Road::iRoadu |
( |
| ) |
const |
|
inline |
◆ iRoadv()
int MMT_Road::iRoadv |
( |
| ) |
const |
|
inline |
◆ iRoadx()
int MMT_Road::iRoadx |
( |
| ) |
const |
|
inline |
◆ matureCheck()
bool MMT_Road::matureCheck |
( |
const int |
bcwind | ) |
const |
Definition at line 168 of file MMT_Road.cxx.
170 if (hit->getAge() == (bcwind - 1))
return true;
◆ mxl()
double MMT_Road::mxl |
( |
| ) |
const |
Definition at line 175 of file MMT_Road.cxx.
176 std::vector<double> ys, zs;
178 int bo = hit->getPlane();
179 if (bo < 2 || bo > 5) {
180 ys.push_back(hit->getR());
181 zs.push_back(hit->getZ());
186 double sum_sq_z = std::inner_product(zs.begin(), zs.end(), zs.begin(), 0.0);
187 for (
unsigned int i = 0;
i < ys.size();
i++)
mxl += ys[
i]*( (zs[
i]-avg_z) / (sum_sq_z - zs.size()*
std::pow(avg_z,2)) );
◆ reset()
◆ stereoCheck()
bool MMT_Road::stereoCheck |
( |
| ) |
const |
Definition at line 196 of file MMT_Road.cxx.
202 if (hit->getPlane() == 2 || hit->getPlane() == 4) nu++;
203 if (hit->getPlane() == 3 || hit->getPlane() == 5) nv++;
206 return (nu > 0 && nv > 0 && (nu+nv) >=
m_uvthr);
◆ m_iroadu
◆ m_iroadv
◆ m_iroadx
◆ m_road_hits
std::vector<std::unique_ptr<MMT_Hit> > MMT_Road::m_road_hits |
|
private |
◆ m_roadSize
◆ m_roadSizeDownUV
int MMT_Road::m_roadSizeDownUV |
|
private |
◆ m_roadSizeDownX
int MMT_Road::m_roadSizeDownX |
|
private |
◆ m_roadSizeUpUV
int MMT_Road::m_roadSizeUpUV |
|
private |
◆ m_roadSizeUpX
int MMT_Road::m_roadSizeUpX |
|
private |
◆ m_sector
◆ m_uvthr
◆ m_xthr
The documentation for this class was generated from the following files: