29 template<
typename T,
typename Comp>
31 for (
int i=2;
i>=0; --
i) {
32 if (
comp(val,cuts[
i]) )
return mvaVal[
i];
62 fillArrayF(
maxChi2,cfg,
"maxChi2");
63 fillArrayF(maxChi2n,cfg,
"maxChi2n");
65 fillArrayI(min3DLayers,cfg,
"min3DLayers");
66 fillArrayI(minLayers,cfg,
"minLayers");
67 fillArrayI(maxLostLayers,cfg,
"maxLostLayers");
68 fillArrayF(maxDz,cfg,
"maxDz");
69 fillArrayF(maxDr,cfg,
"maxDr");
84 ret =
std::min(ret,
cut(nLayers,minLayers,std::greater_equal<int>()));
85 if (ret==-1.
f)
return ret;
87 ret =
std::min(ret,
cut(chi2(trk)/
float(nLayers),maxChi2n,std::less_equal<float>()));
88 if (ret==-1.
f)
return ret;
90 if (ret==-1.
f)
return ret;
92 ret =
std::min(ret,
cut(n3DLayers(trk),min3DLayers,std::greater_equal<int>()));
93 if (ret==-1.
f)
return ret;
95 if (ret==-1.
f)
return ret;
96 ret =
std::min(ret,
cut(lostLayers(trk),maxLostLayers,std::less_equal<int>()));
99 if (ret==-1.
f)
return ret;
100 Point bestVertex = getBestVertex(trk,vertices);
101 ret =
std::min(ret,
cut(dz(trk,bestVertex), maxDz,std::less_equal<float>()));
102 ret =
std::min(ret,
cut(dr(trk,bestVertex), maxDr,std::less_equal<float>()));
113 static const char *
name() {
return "TrackCutClassifier";}
116 desc.
add<std::vector<int>>(
"minPixelHits",{0,0,1});
117 desc.
add<std::vector<int>>(
"minLayers",{3,4,5});
118 desc.
add<std::vector<int>>(
"min3DLayers",{1,2,3});
119 desc.
add<std::vector<int>>(
"maxLostLayers",{99,3,3});
120 desc.
add<std::vector<double>>(
"maxChi2",{9999.,25.,16.});
121 desc.
add<std::vector<double>>(
"maxChi2n",{9999.,1.0,0.4});
133 int maxLostLayers[3];
T getParameter(std::string const &) const
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
#define DEFINE_FWK_MODULE(type)
std::vector< Vertex > VertexCollection
collection of Vertex objects
int pixelLayersWithMeasurement() const
int trackerLayersWithMeasurement() const
T x() const
Cartesian x coordinate.
int numberOfValidStripLayersWithMonoAndStereo(uint16_t stripdet, uint16_t layer) const
Abs< T >::type abs(const T &t)
ParameterDescriptionBase * add(U const &iLabel, T const &value)
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
int trackerLayersWithoutMeasurement(HitCategory category) const
int numberOfValidPixelHits() const
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...