Hall A ROOT/C++ Analyzer (podd)
Loading...
Searching...
No Matches
THaTrackProj.h
Go to the documentation of this file.
1#ifndef Podd_THaTrackProj_h_
2#define Podd_THaTrackProj_h_
3
5//
6// THaTrackProj
7//
9
10#include "TObject.h"
11#include "DataType.h" // for kBig
12
13class THaTrackProj : public TObject {
14
15public:
16 explicit THaTrackProj( Double_t x=kBig, Double_t y=kBig, Double_t pathl=kBig,
17 Double_t dx=kBig, Int_t ch=-1 )
18 : fX(x), fY(y), fPathl(pathl), fdX(dx), fChannel(ch),
19 fIsOK(x<0.5*kBig&&y<0.5*kBig) {}
20 virtual ~THaTrackProj() = default;
21
22 virtual void Clear( Option_t* opt="" );
23 virtual void Print( Option_t* opt="" ) const;
24
25 Double_t GetX() const { return fX; }
26 Double_t GetY() const { return fY; }
27 Double_t GetdX() const { return fdX; }
28 Double_t GetPathLen() const { return fPathl; }
29 Int_t GetChannel() const { return fChannel; }
30 Bool_t IsOK() const { return fIsOK; }
31
32 void Set( Double_t x, Double_t y, Double_t pathl, Double_t dx, Int_t ch )
33 { fX = x; fY = y; fPathl = pathl; fdX = dx; fChannel = ch; fIsOK = true; }
34 void SetdX( Double_t dx ) { fdX = dx; }
35 void SetChannel( Int_t ch ) { fChannel = ch; }
36 void SetOK( Bool_t ok ) { fIsOK = ok; }
37
38protected:
39 Double_t fX; // x-coord of track crossing in detector coords (m)
40 Double_t fY; // y-coord of track crossing in detector coords (m)
41 Double_t fPathl; // Pathlength from tracking reference plane (m)
42 Double_t fdX; // x-pos diff betw hit and and track proj (m)
43 Int_t fChannel; // Detector element number (starting at 0)
44 Bool_t fIsOK; // True if data valid (within defined detector area)
45
46 public:
47 ClassDef(THaTrackProj,2) // Track coordinates projected to detector plane
48};
49
50#endif
int Int_t
const Data_t kBig
Definition DataType.h:15
bool Bool_t
double Double_t
const char Option_t
#define ClassDef(name, id)
virtual void Print(Option_t *opt="") const
Double_t fdX
void SetdX(Double_t dx)
Bool_t IsOK() const
Double_t GetPathLen() const
virtual ~THaTrackProj()=default
void Set(Double_t x, Double_t y, Double_t pathl, Double_t dx, Int_t ch)
Double_t GetdX() const
Double_t fY
Double_t fX
THaTrackProj(Double_t x=kBig, Double_t y=kBig, Double_t pathl=kBig, Double_t dx=kBig, Int_t ch=-1)
Double_t GetX() const
Double_t GetY() const
void SetOK(Bool_t ok)
Double_t fPathl
void SetChannel(Int_t ch)
virtual void Clear(Option_t *opt="")
Int_t GetChannel() const
Double_t y[n]
Double_t x[n]