32 #include "TClonesArray.h"
34 #include "LaserBeams.h"
36 #include "StThreeVectorF.hh"
37 #include "StHelixModel.h"
38 #include "StDcaGeometry.h"
40 #include "TGeoMatrix.h"
41 #if defined(__CINT__) || defined(__CLING__)
46 #include "StPrimaryVertex.h"
53 Int_t Sector, Raft, Bundle, Mirror;
61 virtual void Print(
const Option_t* opt=
"")
const {
63 cout << Form(
"Raft:%2i,%2i,%1i,%1i,%9.4f,%9.4f",
64 Sector, Raft, Bundle, Mirror, Theta, Phi) << endl;
65 cout <<
" XyzL: " << XyzL <<
" U: " << XyzU <<
" B: " << XyzB << endl;
66 cout <<
" dirL: " << dirL <<
" U: " << dirU <<
" B: " << dirB << endl;
74 void Clear(Option_t *opt=
"") {
if (opt) {}; memset(first, 0, last - first); chisq = -1;}
91 virtual void Print(
const Option_t* opt=
"")
const {
93 cout << Form(
"FitDV:%5i,%2i,%9.4f,%9.4f,%9.4f,%9.4f,%9.4f",
94 N, Sector, offset, slope, doffset, dslope, chisq)
104 LaserB() : IsValid(1), Sector(0), Raft(0), Bundle(0), Mirror(0),
105 Theta(0), Phi(0), ThetaG(0), PhiG(0) {}
108 Int_t Sector, Raft, Bundle, Mirror;
120 Double_t ThetaG, PhiG;
121 virtual void Print(
const Option_t* opt=
"")
const {
123 cout <<
"LaserB:" << IsValid <<
" S/R/B/M = " << Sector <<
"/" << Raft <<
"/" << Bundle <<
"/" << Mirror
124 <<
" xyz B:" << XyzB <<
" U: " << XyzU <<
" L: " << XyzL <<
" G: " << XyzG << endl;
125 cout <<
"\tdir B:" << dirB <<
" U: " << dirU <<
" L: " << dirL <<
" G: " << dirG << endl;
126 cout <<
"\tTheta L: " << Theta <<
" G: " << ThetaG <<
" Phi L: " << Phi <<
" G: " << PhiG
147 Float_t fDriftDistance;
148 Float_t fInnerSectorzOffset;
149 Float_t fOuterSectorzOffset;
150 Float_t ftriggerTimeOffset;
156 EventHeader() : fEvtNum(0), fRun(0), fDate(0), fTime(0), fOnlClock(0), fBField(0), fScaleY(0) { }
158 void Set(Int_t i, Int_t r, Int_t d, Int_t t) { fEvtNum = i; fRun = r; fDate = d; fTime = t; }
159 void SetE(Float_t tz, Float_t dv, Float_t ck) {
160 ftZero = tz; fDriVel = dv; fClock = ck; }
161 void SetE(Float_t tz, Float_t dv, Float_t ck, Float_t tg) {
162 ftZero = tz; fDriVel = dv; fClock = ck; fTrigger = tg; }
163 void SetDriftDistance(Double_t p) {fDriftDistance = p;}
164 void SetInnerSectorzOffset(Double_t p) {fInnerSectorzOffset= p;}
165 void SetOuterSectorzOffset(Double_t p) {fOuterSectorzOffset= p;}
166 void SettriggerTimeOffset(Double_t p) {ftriggerTimeOffset= p;}
167 void SetOnlClock(Double_t p) {fOnlClock = p;}
168 void SetBField(Float_t p) {fBField = p;}
169 Int_t GetEvtNum()
const {
return fEvtNum; }
170 Int_t GetRun()
const {
return fRun; }
171 Int_t GetDate()
const {
return fDate; }
172 Int_t GetTime()
const {
return fTime; }
173 Float_t tZeor() {
return ftZero;}
174 Float_t DriftVel() {
return fDriVel;}
175 Float_t Clock() {
return fClock;}
176 Float_t OnlClock() {
return fOnlClock;}
177 Float_t Trigger() {
return fTrigger;}
178 Float_t DriftDistance() {
return fDriftDistance;}
179 Float_t InnerSectorzOffset() {
return fInnerSectorzOffset;}
180 Float_t OuterSectorzOffset() {
return fOuterSectorzOffset;}
181 Float_t triggerTimeOffset() {
return ftriggerTimeOffset;}
182 Float_t GetBField() {
return fBField;}
194 UInt_t numberOfDaughter;
195 virtual void Print(
const Option_t* opt=
"")
const {
197 cout <<
"Vertex: WE = " << WestEast <<
" XYZ L: " << XyzL <<
" G: " << Xyz <<
" Nd " << numberOfDaughter << endl;
201 class Hit :
public TObject {
221 class Track :
public TObject {
231 UShort_t mNumberOfPossiblePointsTpc;
232 Float_t mImpactParameter;
235 UShort_t mNumberOfFitPointsTpc;
236 UShort_t mPrimaryVertexUsedInFit;
271 void SetPredictions(TGeoHMatrix *Raft2Tpc = 0, TGeoHMatrix *Bundle2Tpc = 0, TGeoHMatrix *Mirror2Tpc = 0);
272 virtual void Print(
const Option_t* opt=
"")
const {
274 cout <<
"Track F: " << Flag <<
" Vtx: " <<
Vertex <<
" Sec/Key = " << mSector <<
"/" << mKey << endl;
275 cout <<
"\tgeoIn pxyz " << fgeoIn.momentum() <<
" geoIn xyz " << fgeoIn.origin() << endl;
276 cout <<
"\tgeoOut pxyz " << fgeoOut.momentum() <<
" geoOut xyz " << fgeoOut.origin() << endl;
277 cout <<
"\tTheta " << fTheta <<
" Phi " << fPhi << endl;
278 cout <<
"\tXyzP M " << XyzPM <<
" B: " << XyzPB <<
" U: " << XyzPU <<
" L: " << XyzPL <<
" G: " << XyzP << endl;
279 cout <<
"\tdirP M " << dirPM <<
" B: " << dirPB <<
" U: " << dirPU <<
" L: " << dirPL <<
" G: " << dirP << endl;
280 cout <<
"\tdU : " << dU << endl;
282 cout <<
"\tdTheta " << dTheta <<
" dPhi " << dPhi << endl;
293 TClonesArray *fVertices;
294 TClonesArray *fTracks;
298 TClonesArray *Vertices(){
return fVertices;}
299 TClonesArray *Tracks() {
return fTracks;}
300 TClonesArray *Hits() {
return fHits;}
301 TClonesArray *Fit() {
return fFit;}
304 static TClonesArray *fgTracks;
305 static TClonesArray *fgHits;
306 static TClonesArray *fgVertices;
307 static TClonesArray *fgFit;
311 void Clear(Option_t *option =
"");
313 void SetNtrack(Int_t n) { fNtrack = n; }
314 void SetNhit(Int_t n) { fNhit = n; }
315 void SetHeader(Int_t i, Int_t run, Int_t date, Int_t time);
316 void SetHeader(Int_t i, Int_t run, Int_t date, Int_t time,
317 Float_t tzero, Float_t drivel, Float_t clock);
318 void SetHeader(Int_t i, Int_t run, Int_t date, Int_t time,
319 Float_t tzero, Float_t drivel, Float_t clock, Float_t trigger);
320 void SetDVWest(Float_t dv) {fEvtHdr.fDriVelWest = dv;}
321 void SetDVEast(Float_t dv) {fEvtHdr.fDriVelEast = dv;}
322 void SetScaleY(Float_t sY) {fEvtHdr.fScaleY = sY;}
325 Hit *AddHit(
StTpcHit *tpcHit = 0, Int_t trackKey = 0);
326 void AddTrackFit(
Track *t = 0);
327 Int_t GetNtrack()
const {
return fNtrack; }
328 Int_t GetNhit()
const {
return fNhit; }
330 TClonesArray *GetTracks()
const {
return fTracks; }
331 TClonesArray *GetHits()
const {
return fHits; }
bool fit()
Perform linear fits in zx- and zy-plane.