Neutral Particle Spectrometer analysis code
Loading...
Searching...
No Matches
THcNPSTrackInfo.h
Go to the documentation of this file.
1#ifndef ROOT_THcNPSTrackInfo
2#define ROOT_THcNPSTrackInfo
3
4#include "THaPhysicsModule.h"
5#include "TVector3.h"
6
10class THcNPSCluster;
11
13
14 public:
15 THcNPSTrackInfo( const char* name, const char* description,
16 const char* spectro = "",
17 const char* vertex_module = "");
18
19 virtual ~THcNPSTrackInfo();
20
21 virtual EStatus Init( const TDatime& run_time );
22 virtual void Clear( Option_t* opt="" );
23 virtual Int_t Process( const THaEvData& );
24 void SetSpectrometer( const char* name ) { fSpectroName = name; } // Treat it as a spectrometer assuming we make it so in the future
25 TVector3& GetVertex() { return fVertex; }
26 bool HasVertex() const { return fHasVertex; }
28 { fVertex.SetXYZ(vx, vy, vz); fHasVertex = true; }
29 void SetVertex( const TVector3& vertex ) { fVertex = vertex; fHasVertex = true; }
30
31 protected:
32
33 virtual Int_t DefineVariables( EMode mode = kDefine );
34 //virtual Int_t ReadRunDatabase( const TDatime& date );
35
36 TString fSpectroName; // not actually spectrometer, but in case we make the NPS as THcHallCSpectrometer in the future..
41
45
46 class NPSTrack {
47 public:
48 Double_t fP; // same as NPS cluster Energy
49 Double_t fPx; // Momentum in lab
50 Double_t fPy; // Momentum in lab
51 Double_t fPz; // Momentum in lab
52 Double_t fX; // position on the detector plane
53 Double_t fY; // position on the detector plane
54 Int_t fMult; // cluster size
55 };
56 std::vector<NPSTrack> fNPSTrk;
57
58 public:
59 std::vector<NPSTrack> GetTracks() { return fNPSTrk; }
60
61
63
64};
65
66#endif /* ROOT_THcNPSTrackInfo */
int Int_t
double Double_t
const char Option_t
#define ClassDef(name, id)
A dummy spectrometer apparatus for testing detectors.
Generic segmented shower detector.
TVector3 & GetVertex()
std::vector< NPSTrack > fNPSTrk
TString fVertexModuleName
THcReactionPoint * fVertexModule
void SetVertex(const TVector3 &vertex)
THcNPSCalorimeter * fNPSCalo
virtual void Clear(Option_t *opt="")
void SetSpectrometer(const char *name)
virtual ~THcNPSTrackInfo()
THcNPSApparatus * fSpectro
virtual Int_t DefineVariables(EMode mode=kDefine)
bool HasVertex() const
void SetVertex(Double_t vx, Double_t vy, Double_t vz)
virtual Int_t Process(const THaEvData &)
std::vector< NPSTrack > GetTracks()
void SetXYZ(Double_t x, Double_t y, Double_t z)
double * vertex