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