4 #include "KiTrack/IHit.h"
5 #include "KiTrack/ISectorConnector.h"
6 #include "KiTrack/ISectorSystem.h"
7 #include "KiTrack/KiTrackExceptions.h"
18 static const int sNFwdLayers = 7;
19 static const int sNFttLayers = 4;
20 static const int sNFstLayers = 3;
21 FwdSystem(
const int ndisks = FwdSystem::sNFwdLayers) : KiTrack::ISectorSystem(), mNDisks(ndisks){};
23 virtual unsigned int getLayer(
int diskid)
const throw(KiTrack::OutOfRange) {
28 std::string getInfoOnSector(
int sec)
const {
return "NOOP"; }
38 set( -999, -999, -999, 0, -1 );
40 McTrack(
double pt,
double eta = -999,
double phi = -999,
int q = 0,
41 int start_vertex = -1) {
42 set( pt, eta, phi, q, start_vertex );
45 void set(
double pt,
double eta = -999,
double phi = -999,
int q = 0,
int start_vertex = -1){
50 mStartVertex = start_vertex;
53 void addHit(KiTrack::IHit *
hit) { mHits.push_back(hit); }
56 double mPt, mEta, mPhi;
57 int mTid, mQ, mStartVertex;
59 std::vector<KiTrack::IHit *> mHits;
68 class FwdHit :
public KiTrack::IHit {
70 FwdHit(
unsigned int id,
float x,
float y,
float z,
int vid,
int tid,
71 TMatrixDSym covmat, std::shared_ptr<McTrack> mcTrack =
nullptr )
81 _covmat.ResizeTo( 3, 3 );
85 int map[] = {0, 0, 0, 0, 0, 1, 2, 0, 0, 3, 4, 5, 6};
97 const KiTrack::ISectorSystem *getSectorSystem()
const {
98 return FwdSystem::sInstance;
101 int getTrackId() {
return _tid;}
105 std::shared_ptr<McTrack> _mcTrack;
111 using Seed_t = std::vector<KiTrack::IHit *>;
116 : _distance(distance) {}
120 virtual std::set<int> getTargetSectors(
int disk) {
124 if (disk > 0 && _distance >= 1)
127 if (disk > 1 && _distance >= 2)
130 if (disk > 2 && _distance >= 3)
133 if (disk > 3 && _distance >= 4)
142 unsigned int _distance;
146 inline double operator()(
Seed_t s) {
return double(s.size()) / FwdSystem::sNFttLayers ; }
151 std::map<unsigned int, unsigned int> hit_counts;
155 for (
auto h : trackA) {
156 hit_counts[
static_cast<FwdHit *
>(h)->_id]++;
160 for (
auto h : trackB) {
161 hit_counts[
static_cast<FwdHit *
>(h)->_id]++;
164 if (hit_counts[static_cast<FwdHit *>(h)->_id] >= 2) {