PandaRoot
PndTrackCollection.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 /*
14  * PndTrackCollection.h
15  *
16  * Created on: Jul 28, 2016
17  * Author: kibellus
18  */
19 
20 #ifndef PNDTOOLS_PNDFORWARDTRACKFINDER_PNDTRACKCOLLECTION_H_
21 #define PNDTOOLS_PNDFORWARDTRACKFINDER_PNDTRACKCOLLECTION_H_
22 
23 #include <vector>
24 
25 #include "PndLineApproximation.h"
26 
27 using namespace std;
28 
30  public:
32  virtual ~PndTrackCollection();
33  void add(PndLineApproximation l, Bool_t skewed);
34  PndLine getCurrLine() { return fCurrLine; }
35  PndLine getLastLine() { return (*fLines)[fLines->size() - 1].getLine(); }
36  vector<PndLineApproximation> *getLines() { return fLines; }
37  PndTrack getPndTrack(map<Int_t, PndFtsHit *> orgHits);
38  vector<PndFtsHit *> getHits()
39  {
40  vector<PndFtsHit *> result;
41  for (size_t i = 0; i < fLines->size(); i++) {
42  for (size_t j = 0; j < (*fLines)[i].getHits().size(); j++) {
43  result.push_back((*fLines)[i].getHits()[j]);
44  }
45  }
46  return result;
47  }
48  vector<PndFtsHit *> fHits;
49  void addHit(PndFtsHit *h) { fHits.push_back(h); }
50  Double_t getDistTo(PndLine l, Int_t layer);
51 
52  private:
53  std::vector<PndLineApproximation> *fLines;
54  PndLine fCurrLine;
55  PndFtsHit *copyHit(PndFtsHit *h);
56  void refitAllHits();
57  void refitAllTracks();
58  void refitHit(PndLine &l, PndFtsHit *hit);
59 };
60 
61 #endif /* PNDTOOLS_PNDFORWARDTRACKFINDER_PNDTRACKCOLLECTION_H_ */
vector< PndFtsHit * > fHits
STL namespace.
unsigned int i
Definition: P4_F32vec4.h:33
void addHit(PndFtsHit *h)
vector< PndLineApproximation > * getLines()
vector< PndFtsHit * > getHits()