Hall C ROOT/C++ Analyzer (hcana)
Loading...
Searching...
No Matches
THcHallCSpectrometer.h
Go to the documentation of this file.
1#ifndef ROOT_THcHallCSpectrometer
2#define ROOT_THcHallCSpectrometer
3
5//
6// THcHallCSpectrometer
7//
9
10#include "THaSpectrometer.h"
11
12#include <vector>
13
14#include "TClonesArray.h"
16#include "THcHitList.h"
17#include "THcRawHodoHit.h"
19#include "THcDC.h"
20
21//#include "THaTrackingDetector.h"
22//#include "THcHitList.h"
23#include "THcSpacePoint.h"
25#include "THcDriftChamber.h"
26#include "TMath.h"
27
28#include "THaSubDetector.h"
29#include "TClonesArray.h"
30#include <iostream>
31#include <fstream>
32
33
34//class THaScintillator;
35
37
38public:
39 THcHallCSpectrometer( const char* name, const char* description );
40 virtual ~THcHallCSpectrometer();
41
42 virtual Int_t ReadDatabase( const TDatime& date );
43 virtual void EnforcePruneLimits();
44 virtual void CalculateTargetQuantities(THaTrack* track,Double_t& gbeam_y,Double_t& xptar,Double_t& ytar,Double_t& yptar,Double_t& delta);
46 virtual Int_t TrackCalc();
47 virtual Int_t BestTrackSimple();
48 virtual Int_t BestTrackUsingScin();
49 virtual Int_t BestTrackUsingPrune();
51
52 virtual Int_t Decode( const THaEvData& );
53
54 virtual Int_t ReadRunDatabase( const TDatime& date );
56
58 Bool_t GetTrSorting() const;
59
60 // Mass of nominal detected particle type
64
65 virtual void AddEvtType(int evtype);
66 virtual void SetEvtType(int evtype);
67 virtual Bool_t IsMyEvent(Int_t evtype) const;
68 virtual Int_t GetNumTypes() { return eventtypes.size(); };
69 virtual Bool_t IsPresent() {return fPresent;};
70
72
73protected:
75
80 // Bool_t* fKeep;
81 // Int_t* fReject;
82
96
102
114
117
118 // Int_t** fHodScinHit; // [4] Array
119
122
124 struct reconTerm {
128 for(Int_t i=0;i<4;i++) {
129 Coeff[i] = 0.0;
130 }
131 for(Int_t i=0;i<5;i++) {
132 Exp[i] = 0;
133 }
134 }
135 };
136 std::vector<reconTerm> fReconTerms;
137 // Double_t fReconCoeff[fMaxReconElements][4];
138 // Int_t fReconExponents[fMaxReconElements][5];
146 Double_t fThetaOffset; // Zero order term in yptar optics matrix (rad)
147 Double_t fPhiOffset; // Zero order term in xptar optics matrix (rad)
148 Double_t fDeltaOffset; // Zero order term in delta optics matrix (%)
149 Double_t fThetaCentralOffset; // Offset of Central spectrometer angle (rad)
150 Double_t fOopCentralOffset; //Offset of central out-of-plane angle (rad)
151 Double_t fPCentralOffset; // Offset Central spectrometer momentum (%)
152 Double_t fTheta_lab; // Central spectrometer angle (deg)
153 Double_t fPhi_lab; // Central spectrometer angle (deg)
154 Double_t fMispointing_x; // Spectrometer Verticcal Mispointing
155 Double_t fMispointing_y; // Spectrometer Horizontal Mispointing
156 // For spectrometer central momentum use fPcentral in THaSpectrometer.h
157 // THaScintillator *sc_ref; // calculate time track hits this plane
158
159 // Flag for fProperties indicating that tracks are to be sorted by chi2
160 static const UInt_t kSortTracks = BIT(16);
161
162 std::vector<Int_t> eventtypes;
164
165 ClassDef(THcHallCSpectrometer,0) //A Hall C Spectrometer
166};
167
168#endif
169
int Int_t
unsigned int UInt_t
bool Bool_t
const Bool_t kFALSE
double Double_t
#define ClassDef(name, id)
#define BIT(n)
Option_t Option_t TPoint TPoint const char mode
Double_t fPcentral
Analyze a package of horizontal drift chambers.
Definition THcDC.h:23
A standard Hall C spectrometer apparatus.
virtual Bool_t IsMyEvent(Int_t evtype) const
virtual Int_t TrackTimes(TClonesArray *tracks)
Bool_t SHMSDipoleExitWindow(Double_t x_dip, Double_t y_dip)
virtual void CalculateTargetQuantities(THaTrack *track, Double_t &gbeam_y, Double_t &xptar, Double_t &ytar, Double_t &yptar, Double_t &delta)
Transport focal plane track to target.
virtual void EnforcePruneLimits()
Enforce minimum values for the prune cuts.
virtual Int_t Decode(const THaEvData &)
Bool_t HMSDipoleExitWindow(Double_t x_dip, Double_t y_dip)
virtual Int_t BestTrackUsingScin()
Choose best track using closeness to scintillator hits.
virtual Int_t ReadDatabase(const TDatime &date)
Loads parameters to characterize a Hall C spectrometer.
static const UInt_t kSortTracks
virtual void SetEvtType(int evtype)
virtual void AddEvtType(int evtype)
Double_t GetParticleMass() const
virtual Int_t BestTrackUsingPrune()
Choose best track after pruning.
std::vector< Int_t > eventtypes
Bool_t InsideDipoleExitWindow(Double_t x_fp, Double_t xp_fp, Double_t y_fp, Double_t yp_fp)
std::vector< reconTerm > fReconTerms
virtual Int_t BestTrackSimple()
Choose best track based on Chisq.
virtual Int_t FindVertices(TClonesArray &tracks)
Reconstruct target coordinates.
virtual Int_t DefineVariables(EMode mode=kDefine)
Bool_t SetTrSorting(Bool_t set=kFALSE)
Double_t GetBetaAtPcentral() const
virtual Int_t ReadRunDatabase(const TDatime &date)
Generic hodoscope consisting of multiple planes with multiple paddles with phototubes on both ends.
Double_t Sqrt(Double_t x)
void tracks()