-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPHTpcTrackFollower.h
55 lines (44 loc) · 1.8 KB
/
PHTpcTrackFollower.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
/*!
* \file PHTpcTrackFollower.h
* \brief
* \author Dmitry Arkhipkin <[email protected]>
*/
#ifndef PHTPCTRACKFOLLOWER_H_
#define PHTPCTRACKFOLLOWER_H_
#include "PHTpcLookup.h"
#include "externals/kdfinder.hpp"
#include <phfield/PHField.h>
#include "Track.h"
#include <trackbase/TrkrClusterContainer.h>
#include "Fitter.h"
#include "SpacepointMeasurement2.h"
#include <GenFit/KalmanFitter.h>
/// \class PHTpcTrackFollower
///
/// \brief
///
class PHTpcTrackFollower
{
public:
PHTpcTrackFollower();
virtual ~PHTpcTrackFollower() {}
std::vector<PHGenFit2::Track*> followTracks( TrkrClusterContainer* cluster_map,
std::vector< kdfinder::TrackCandidate<double>* >& candidates,
PHField* B, PHTpcLookup* lookup, PHGenFit2::Fitter* fitter );
PHGenFit2::Track* propagateTrack( kdfinder::TrackCandidate<double>* candidate,
PHTpcLookup* lookup, PHGenFit2::Fitter* fitter );
void set_optimization_helix( bool opt = true ) { mOptHelix = opt; }
void set_optimization_precise_fit( bool opt = true ) { mOptPreciseFit = opt; }
protected:
PHGenFit2::Track* candidate_to_genfit( kdfinder::TrackCandidate<double>* candidate );
PHGenFit::SpacepointMeasurement2* hit_to_measurement( std::vector<double>& hit );
int get_track_layer( PHGenFit2::Track* track, int dir = 1 );
int get_track_layer( genfit::Track* gftrack, int dir = 1 );
std::pair<genfit::MeasuredStateOnPlane*,double> get_projected_coordinate( genfit::Track* gftrack, int dir, double radius );
std::pair<genfit::MeasuredStateOnPlane*,double> get_projected_coordinate( genfit::Track* gftrack, int dir, const TVector3& point );
int followTrack( PHGenFit2::Track* track, PHTpcLookup* lookup, PHGenFit2::Fitter* fitter, int dir = 1 );
private:
bool mOptHelix;
bool mOptPreciseFit;
};
#endif /* PHTPCTRACKFOLLOWER_H_ */