2 #include "StiDefaultTrackFilter.h"
7 #include "Sti/Base/Parameter.h"
8 #include "Sti/Base/EditableParameter.h"
9 #include "Sti/StiTrack.h"
10 #include "StiDefaultTrackFilter.h"
12 StiDefaultTrackFilter::StiDefaultTrackFilter()
16 StiDefaultTrackFilter::StiDefaultTrackFilter(
const string & name,
const string & description)
21 StiDefaultTrackFilter::~StiDefaultTrackFilter()
24 void StiDefaultTrackFilter::initialize()
26 cout <<
"StiDefaultTrackFilter::initialize() - INFO - Starting" << endl;
27 parameterVector.clear();
28 add(
new EditableParameter(
"Chi2Used",
"Use Chi2",
false,
false, 0,1,1,Parameter::Boolean, StiTrack::kChi2));
29 add(
new EditableParameter(
"Chi2Min",
"Minimum Chi2", 0., 0., 0., 100.,1,Parameter::Double, StiTrack::kChi2));
30 add(
new EditableParameter(
"Chi2Max",
"Maximum Chi2", 20., 20., 0., 100.,1,Parameter::Double, StiTrack::kChi2));
32 add(
new EditableParameter(
"PhiUsed",
"Use Phi",
false,
false, 0,1,1,Parameter::Boolean, StiTrack::kPhi));
33 add(
new EditableParameter(
"PhiMin",
"Minimum Phi", -3.2, -3.2, -3.2, 3.2, 2,Parameter::Double, StiTrack::kPhi));
34 add(
new EditableParameter(
"PhiMax",
"Maximum Phi", 3.2, 3.2, -3.2, 3.2, 2,Parameter::Double, StiTrack::kPhi));
36 add(
new EditableParameter(
"PtUsed",
"Use Pt",
true,
true, 0,1,1,Parameter::Boolean, StiTrack::kPt));
37 add(
new EditableParameter(
"PtMin",
"Minimum Pt", 0.1, 0.1, 0., 100.,2,Parameter::Double, StiTrack::kPt));
38 add(
new EditableParameter(
"PtMax",
"Maximum Pt", 10., 10., 0., 100.,2,Parameter::Double, StiTrack::kPt));
40 add(
new EditableParameter(
"PUsed",
"Use P",
false,
false, 0,1,1,Parameter::Boolean, StiTrack::kP));
41 add(
new EditableParameter(
"PMin",
"Minimum P", 0., 0., 0., 100.,2,Parameter::Double, StiTrack::kP));
42 add(
new EditableParameter(
"PMax",
"Maximum P", 10., 10., 0., 100.,2,Parameter::Double, StiTrack::kP));
44 add(
new EditableParameter(
"EtaUsed",
"Use Eta",
true,
true, 0,1,1,Parameter::Boolean, StiTrack::kPseudoRapidity));
45 add(
new EditableParameter(
"EtaMin",
"Minimum Eta", -0.5, -0.5, -10., 10.,2,Parameter::Double, StiTrack::kPseudoRapidity));
46 add(
new EditableParameter(
"EtaMax",
"Maximum Eta", 0.5, 0.5, -10., 10.,2,Parameter::Double, StiTrack::kPseudoRapidity));
48 add(
new EditableParameter(
"nPtsUsed",
"Use nPts",
true,
true, 0,1,1,Parameter::Boolean, StiTrack::kPointCount));
49 add(
new EditableParameter(
"nPtsMin",
"Minimum nPts", 10., 10., 0., 100.,1,Parameter::Integer, StiTrack::kPointCount));
50 add(
new EditableParameter(
"nPtsMax",
"Maximum nPts", 60., 60., 0., 100.,1,Parameter::Integer, StiTrack::kPointCount));
52 add(
new EditableParameter(
"nGapsUsed",
"Use nGaps",
true,
true, 0,1,1,Parameter::Boolean, StiTrack::kGapCount));
53 add(
new EditableParameter(
"nGapsMin",
"Minimum nGaps", 0., 0., 0., 100.,1,Parameter::Integer, StiTrack::kGapCount));
54 add(
new EditableParameter(
"nGapsMax",
"Maximum nGaps", 3., 3., 0., 100.,1,Parameter::Integer, StiTrack::kGapCount));
56 add(
new EditableParameter(
"chargeUsed",
"Use Charge",
false,
false, 0,1,1,Parameter::Boolean, StiTrack::kCharge));
57 add(
new EditableParameter(
"chargeMin",
"Minimum Charge", -1., -1., -100., 100.,1,Parameter::Integer, StiTrack::kCharge));
58 add(
new EditableParameter(
"chargeMax",
"Maximum Charge", 1., 1., -100., 100.,1,Parameter::Integer, StiTrack::kCharge));
62 bool StiDefaultTrackFilter::accept(
const StiTrack * t)
const
66 ParameterConstIterator iter = begin();
72 parUse = *iter; iter++;
73 parLow = *iter; iter++;
74 parHi = *iter; iter++;
75 if (parUse&&parLow&&parHi)
77 if (parUse->getBoolValue())
80 v = t->getValue(parUse->getKey());
81 low = parLow->getDoubleValue();
82 high = parHi->getDoubleValue();
91 assert(0 &&
"StiDefaultTrackFilter::accept Internal error");
virtual void setDefaults()
Abstract definition of a Track.