EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PndTrackCand.h
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file PndTrackCand.h
1 //-----------------------------------------------------------
2 // File and Version Information:
3 // $Id$
4 //
5 // Description:
6 // Implementation of class PndTrackCand
7 // see PndTrackCand.hh for details
8 //
9 // Environment:
10 // Software developed for the PANDA Detector at FAIR.
11 //
12 // Author List:
13 // Tobias Stockmanns (IKP - Juelich) during the Panda Meeting 03/09
14 //
15 //
16 //-----------------------------------------------------------
17 
18 #ifndef PNDTRACKCAND_HH
19 #define PNDTRACKCAND_HH
20 
21 // Root Class Headers ----------------
22 #include "PndTrackCandHit.h"
23 #include "FairTimeStamp.h"
24 
25 #include "TObject.h"
26 #include "TVector3.h"
27 #include "TString.h"
28 
29 #include <iostream>
30 #include <vector>
31 #include <map>
32 
33 typedef std::multimap<Double_t, std::pair<Int_t, Int_t> >::const_iterator mapIter;
34 
35 class PndTrackCand : public FairTimeStamp {
36 public:
37 
38  // Constructors/Destructors ---------
39  PndTrackCand();
40  ~PndTrackCand();
41 
42  // operators
43  bool operator== (const PndTrackCand& rhs);
44 
45  // Accessors -----------------------
47  if (sorted == false)
48  Sort();
49  return fHitId.at(i);
50  }
51  UInt_t GetNHits() const {return fHitId.size();}
52  int getMcTrackId() const {return fMcTrackId;}
53  TVector3 getPosSeed() const {return fPosSeed;}
54  //TVector3 getDirSeed() const {return fDirSeed;}
55  //double getQoverPseed() const {return fQoverPseed;}
56  TVector3 getMomSeed() const {return fMomSeed;}
57  double getChargeSeed() const {return fChargeSeed;}
58 
59  UInt_t GetNHitsDet(UInt_t detId);
60  std::vector<PndTrackCandHit> &_GetSortedHits();
61  void Sort();
62 
63  // Modifiers -----------------------
64  void AddHit(UInt_t detId, UInt_t hitId, Double_t rho);
65  void AddHit(TString branchName, UInt_t hitId, Double_t rho);
66  void AddHit(FairLink link, Double_t rho);
67  void DeleteHit(UInt_t detId, UInt_t hitId);
68  Int_t HitInTrack(UInt_t detId, UInt_t hitId);
69  void setMcTrackId(int i){fMcTrackId=i;}
70  //void setTrackSeed(const TVector3& p,const TVector3& d,double qop){
71  //fPosSeed=p;fDirSeed=d;fQoverPseed=qop;
72  //}
73  void setTrackSeed(const TVector3& p,const TVector3& m,double charge){
75  }
76 
77  void CalcTimeStamp();
78 
79  void ResetLinks();
80 
81  void Print();
82 
83 private:
84  // Private Data Members ------------
85  std::vector<PndTrackCandHit> fHitId;
86  bool sorted;
87  int fMcTrackId; //track id for MC simulation
88  TVector3 fPosSeed;
89  TVector3 fMomSeed;//fDirSeed;
90  double fChargeSeed;//fQoverPseed;
91  Int_t fVerbose;
92 public:
94 };
95 
96 #endif
97 
98 //--------------------------------------------------------------
99 // $Log$
100 //--------------------------------------------------------------