forked from JeffersonLab/SBS-offline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSBSGEMPolarimeterTracker.h
83 lines (61 loc) · 2.96 KB
/
SBSGEMPolarimeterTracker.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
#ifndef SBSGEMPOLARIMETERTRACKER_H
#define SBSGEMPOLARIMETERTRACKER_H 1
#include <vector>
#include <THaTrackingDetector.h>
#include "SBSGEMTrackerBase.h"
class THaRunBase;
class THaApparatus;
class THaEvData;
class SBSGEMPlane;
class THaCrateMap;
class THaTrack;
class TClonesArray;
//class THaSpectrometer;
class SBSGEMPolarimeterTracker : public THaNonTrackingDetector, public SBSGEMTrackerBase {
public:
explicit SBSGEMPolarimeterTracker( const char *name, const char *description = "",
THaApparatus *app = nullptr );
virtual ~SBSGEMPolarimeterTracker();
virtual void Clear( Option_t* opt="" );
virtual Int_t Decode( const THaEvData& );
virtual EStatus Init( const TDatime& date );
virtual Int_t ReadDatabase( const TDatime& date );
// We're going to need to override ReadGeometry for the GEM tracker classes since our definition of the module orientation angles differs from the standard definition
// in THaDetectorBase:
//virtual Int_t ReadGeometry( FILE *file, const TDatime &date, Bool_t required = false );
virtual Int_t CoarseProcess( TClonesArray& tracks );
virtual Int_t FineProcess( TClonesArray& tracks );
virtual Int_t DefineVariables( EMode mode = kDefine );
virtual void Print(const Option_t* opt) const;
virtual void SetDebug( Int_t level );
virtual Int_t Begin( THaRunBase* r=0 );
virtual Int_t End( THaRunBase* r=0 );
// virtual bool PassedOpticsConstraint( TVector3 track_origin, TVector3 track_direction, bool coarsecheck=false );
//Loop on all found tracks and calculate sclose, zclose, theta, phi:
void CalcScatteringParameters();
void SetFrontTrack( TVector3 track_origin, TVector3 track_direction );
void SetFrontTrack( double x, double y, double theta, double phi );
bool HasFrontTrack() const { return fFrontTrackIsSet; }
private:
// std::vector <SBSGEMModule *> fPlanes; storing the modules moved to SBSGEMTrackerBase
//Not sure if we'll need this "test track" array for the polarimeter context.
//bool fFrontTrackInitialized;
//bool fUseFrontTrackConstraint;
//"Front tracks" array for polarimeter tracking:
//TClonesArray *fFrontTracks;
//bool fIsMC; moved to SBSGEMTrackerBase
//Add additional track properties we want to store:
//For the time being, we will only consider one possible "front track":
double fFrontTrackX;
double fFrontTrackY;
double fFrontTrackXp;
double fFrontTrackYp;
bool fFrontTrackIsSet;
std::vector<double> fTrackTheta; //Polar scattering angle relative to front track
std::vector<double> fTrackPhi; //Azimuthal scattering angle relative to front track
std::vector<double> fTrackSClose; //distance of closest approach relative to front track
std::vector<double> fTrackZClose; //Z of point of closest approach relative to front track.
//THaCrateMap *fCrateMap; //Does this do anything? Not as far as I can tell. I wish someone would have commented about why they added this. AJRP
ClassDef(SBSGEMPolarimeterTracker, 0);
};
#endif