42 , fMaxNofHitsInValidationGate(3)
43 , fMaxNofBranches(512)
44 , fMaxNofMissingHits()
76 static Int_t eventNo = 0;
123 vector<CbmLitTrack*> branches;
127 for (Int_t iStation = 0; iStation <
fNofStations; iStation++) {
131 map<Int_t, pair<CbmLitTrackParam, Bool_t>> binParamMap;
132 vector<Int_t>::const_iterator itBins;
133 for (itBins = bins.begin(); itBins != bins.end(); itBins++) {
134 binParamMap[*itBins] = make_pair<CbmLitTrackParam, Bool_t>(
CbmLitTrackParam(),
true);
139 Int_t nofBranches = branches.size();
140 for (Int_t iBranch = 0; iBranch < nofBranches; iBranch++) {
156 map<Int_t, pair<CbmLitTrackParam, Bool_t>>::iterator itMap;
157 for (itMap = binParamMap.begin(); itMap != binParamMap.end(); itMap++) {
158 (*itMap).second.first = par;
161 (*itMap).second.second =
false;
166 map<litfloat, pair<const CbmLitHit*, CbmLitTrackParam>> chiHitPar;
171 assert(binParamMap.find(bin) != binParamMap.end());
172 if (!binParamMap[bin].second)
continue;
187 bool hitInside = (pixelHit->
GetX() < (tpar.
GetX() + devX)) && (pixelHit->
GetX() > (tpar.
GetX() - devX))
188 && (pixelHit->
GetY() < (tpar.
GetY() + devY)) && (pixelHit->
GetY() > (tpar.
GetY() - devY))
191 if (!hitInside)
continue;
194 litfloat chi = std::numeric_limits<litfloat>::max();
195 fFilter->Update(&tpar, hit, chi);
198 if (hitInValidationGate) {
199 chiHitPar[chi] = make_pair(hit, tpar);
203 Int_t nofHitsInValidationGate = chiHitPar.size();
205 if (nofHitsInValidationGate == 1) {
207 const map<litfloat, pair<const CbmLitHit*, CbmLitTrackParam>>::const_iterator it = chiHitPar.begin();
208 branch->
AddHit((*it).second.first);
214 else if (nofHitsInValidationGate > 1) {
219 map<litfloat, pair<const CbmLitHit*, CbmLitTrackParam>>::const_iterator it;
220 for (it = chiHitPar.begin(); it != chiHitPar.end(); it++) {
223 if (it != chiHitPar.begin()) branches.push_back(tbranch);
224 tbranch->
AddHit((*it).second.first);
247 Int_t nofBranches = branches.size();
248 if (nofBranches > 0) {
252 *track = *branches.front();
256 for_each(branches.begin(), branches.end(),
DeleteObject());
268 for (Int_t hit = 0; hit < track->
GetNofHits(); hit++) {
Base data class for hits.
Track reconstruction using branching method.
Interface for track fitter algorithm.
Data class for track parameters.
Interface for track selection algorithm.
Interface for track update algorithm.
Base data class for track.
static vector< vector< QAHit > > hits
std::vector< CbmTofHit * >::iterator HitPtrIterator
std::vector< CbmTofTrack * >::iterator TrackPtrIterator
std::vector< CbmTofHit * >::const_iterator HitPtrConstIterator
std::vector< CbmTofTrack * > TrackPtrVector
std::vector< CbmTofHit * > HitPtrVector
friend fvec sqrt(const fvec &a)
void Clear()
Clear array of hits.
void Arrange()
Must be called after all hits are added.
void SetNofStations(Int_t nofStations)
Set number of stations.
void AddHit(CbmLitHit *hit)
Add hit.
litfloat GetZPosByBin(Int_t station, Int_t bin) const
Return Z positions of hit.
litfloat GetMinZPos(Int_t station) const
Return minimum Z position of hits.
const vector< Int_t > & GetZPosBins(Int_t station) const
Return Z positions of hits.
litfloat GetMaxErrY(Int_t station) const
Int_t GetBinByZPos(Int_t station, litfloat zPos) const
Return bin number for hit Z position.
litfloat GetMaxErrX(Int_t station) const
litfloat GetMaxErrT(Int_t station) const
const HitPtrVector & GetHits(Int_t station)
Return array of hits.
Base data class for hits.
LitHitType GetType() const
Base data class for pixel hits.
static LitStatus DoSortChiSqOverNDF(TrackPtrIterator itBegin, TrackPtrIterator itEnd)
Sort array of tracks by quality using (chi square / NDF).
virtual ~CbmLitTrackFinderBranch()
Destructor.
TrackSelectionPtr fFinalSelection
TrackSelectionPtr fSeedSelection
void ArrangeHits(HitPtrIterator itBegin, HitPtrIterator itEnd)
vector< litfloat > fChiSqPixelHitCut
void FollowTracks(TrackPtrIterator itBegin, TrackPtrIterator itEnd)
Main track following procedure.
void RemoveHits(TrackPtrIterator itBegin, TrackPtrIterator itEnd)
Write already used hits to a used hits set.
vector< Int_t > fMaxNofMissingHits
void CopyToOutput(TrackPtrIterator itBegin, TrackPtrIterator itEnd, TrackPtrVector &tracks)
Copy tracks to output array.
Int_t fMaxNofHitsInValidationGate
vector< litfloat > fSigmaCoef
vector< litfloat > fChiSqStripHitCut
void InitTrackSeeds(TrackPtrIterator itBegin, TrackPtrIterator itEnd)
Initialize track seeds.
std::set< Int_t > fUsedSeedsSet
TrackPropagatorPtr fPropagator
std::set< Int_t > fUsedHitsSet
LitStatus DoFind(HitPtrVector &hits, TrackPtrVector &trackSeeds, TrackPtrVector &tracks)
Inherited from CbmLitTrackFinder.
CbmLitTrackFinderBranch()
Constructor.
Data class for track parameters.
litfloat GetCovariance(int index) const
Base data class for track.
void SetParamLast(const CbmLitTrackParam *par)
Int_t GetPreviousTrackId() const
void SetNofMissingHits(Int_t nofMissingHits)
Int_t GetNofMissingHits() const
const CbmLitHit * GetHit(Int_t index) const
const CbmLitTrackParam * GetParamLast() const
void SetChi2(litfloat chi2)
void AddHit(const CbmLitHit *hit)
Add hit to track. No additional memory is allocated for hit.
LitTrackQa GetQuality() const
Bool_t CheckParams() const
Return true if track parameters are correct.
void SetLastStationId(Int_t lastPlaneId)
Int_t NDF(const CbmLitTrack *track)