Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SRecEvent.h
Go to the documentation of this file.
1 /*
2 SRecEvent.h
3 
4 Definition of the class SRecEvent and SRecTrack. SRecTrack is the final track structure of recontructed tracks.
5 Contains nothing but ROOT classes, light-weighted and can be used as input for physics analysis. SRecEvent serves
6 as a container of SRecTrack
7 
8 Added SRecDimuon, containing the dimuon info
9 
10 Author: Kun Liu, liuk@fnal.gov
11 Created: 01-21-2013
12 */
13 
14 #ifndef _SRECTRACK_H
15 #define _SRECTRACK_H
16 
17 #include <GlobalConsts.h>
18 
19 #include <phool/PHObject.h>
20 #include <interface_main/SQTrack.h>
22 
23 #include <iostream>
24 #include <vector>
25 #include <list>
26 #include <string>
27 #include <algorithm>
28 #include <map>
29 #include <cmath>
30 #include <stdexcept>
31 
32 #include <TObject.h>
33 #include <TROOT.h>
34 #include <TMatrixD.h>
35 #include <TVector3.h>
36 #include <TLorentzVector.h>
37 
38 #include <GenFit/MeasuredStateOnPlane.h>
39 
40 #include "SRawEvent.h"
41 
42 class SRecTrack: public SQTrack
43 {
44 public:
45  SRecTrack();
46 
48  void identify(std::ostream& os = std::cout) const { print(os); }
49  void Reset() { *this = SRecTrack(); }
50  int isValid() const;
51  SRecTrack* Clone() const {return (new SRecTrack(*this)); }
52 
54  virtual int get_track_id() const { return 0; }
55  virtual void set_track_id(const int a) { throw std::logic_error(__PRETTY_FUNCTION__); }
56 
57  virtual int get_rec_track_id() const { return 0; }
58  virtual void set_rec_track_id(const int a) { throw std::logic_error(__PRETTY_FUNCTION__); }
59 
60  virtual int get_charge() const { return getCharge(); }
61  virtual void set_charge(const int a) { throw std::logic_error(__PRETTY_FUNCTION__); }
62 
63  virtual int get_num_hits() const { return getNHits(); }
64  virtual void set_num_hits(const int a) { throw std::logic_error(__PRETTY_FUNCTION__); }
65 
66  virtual TVector3 get_pos_vtx() const { return fVertexPos; }
67  virtual void set_pos_vtx(const TVector3 a) { fVertexPos = a; }
68 
69  virtual TVector3 get_pos_st1() const { return getPositionVecSt1(); }
70  virtual void set_pos_st1(const TVector3 a) { throw std::logic_error(__PRETTY_FUNCTION__); }
71 
72  virtual TVector3 get_pos_st3() const { return getPositionVecSt3(); }
73  virtual void set_pos_st3(const TVector3 a) { throw std::logic_error(__PRETTY_FUNCTION__); }
74 
75  virtual TLorentzVector get_mom_vtx() const { return getlvec(fVertexMom); }
76  virtual void set_mom_vtx(const TLorentzVector a) { fVertexMom = a.Vect(); }
77 
78  virtual TLorentzVector get_mom_st1() const { return getlvec(getMomentumVecSt1()); }
79  virtual void set_mom_st1(const TLorentzVector a) { throw std::logic_error(__PRETTY_FUNCTION__); }
80 
81  virtual TLorentzVector get_mom_st3() const { return getlvec(getMomentumVecSt3()); }
82  virtual void set_mom_st3(const TLorentzVector a) { throw std::logic_error(__PRETTY_FUNCTION__); }
83 
84  virtual double get_chisq() const { return fChisq; }
85  virtual double get_chisq_target() const { return fChisqVertex; }
86  virtual double get_chisq_dump() const { return fChisqDump; }
87  virtual double get_chsiq_upstream() const { return fChisqUpstream; }
88 
89  virtual TVector3 get_pos_target() const { return fTargetPos; }
90  virtual TVector3 get_pos_dump() const { return fDumpPos; }
91 
92  virtual TLorentzVector get_mom_target() const { return getlvec(fTargetMom); }
93  virtual TLorentzVector get_mom_dump() const { return getlvec(fDumpMom); }
94 
95  virtual int get_hit_id(const int i) const { return fHitIndex[i]; }
96 
97  inline TLorentzVector getlvec(const TVector3& vec) const { TLorentzVector lvec; lvec.SetVectM(vec, M_MU); return lvec; }
98 
100  Int_t getCharge() const { return (fState[0])[0][0] > 0 ? 1 : -1; }
101  Int_t getNHits() const { return fHitIndex.size(); }
102  Int_t getNHitsInStation(Int_t stationID);
103  Double_t getChisq() const { return fChisq; }
104  Double_t getProb() const;
105  Double_t getQuality() const { return (Double_t)getNHits() - 0.4*getChisq(); }
106 
107  Int_t getHitIndex(Int_t i) { return fHitIndex[i]; }
108  TMatrixD getStateVector(Int_t i) { return fState[i]; }
109  TMatrixD getCovariance(Int_t i) { return fCovar[i]; }
110  Double_t getZ(Int_t i) { return fZ[i]; }
111  Double_t getChisqAtNode(Int_t i) { return fChisqAtNode[i]; }
112 
113  TVector3 getGFPlaneO(Int_t i) { return fGFDetPlaneVec[0][i]; }
114  TVector3 getGFPlaneU(Int_t i) { return fGFDetPlaneVec[1][i]; }
115  TVector3 getGFPlaneV(Int_t i) { return fGFDetPlaneVec[2][i]; }
116  TVectorD getGFAuxInfo(Int_t i) { return fGFAuxInfo[i]; }
117  TVectorD getGFState(Int_t i) { return fGFStateVec[i]; }
118  TMatrixDSym getGFCov(Int_t i) { return fGFCov[i]; }
119 
120  Int_t getNearestNode(Double_t z);
121  void getExpPositionFast(Double_t z, Double_t& x, Double_t& y, Int_t iNode = -1);
122  void getExpPosErrorFast(Double_t z, Double_t& dx, Double_t& dy, Int_t iNode = -1);
123  Double_t getExpMomentumFast(Double_t z, Double_t& px, Double_t& py, Double_t& pz, Int_t iNode = -1);
124  Double_t getExpMomentumFast(Double_t z, Int_t iNode = -1);
125 
126  Double_t getMomentumSt1(Double_t& px, Double_t& py, Double_t& pz) const { return getMomentum(fState.front(), px, py, pz); }
127  Double_t getMomentumSt1() const { Double_t px, py, pz; return getMomentumSt1(px, py, pz); }
128  TVector3 getMomentumVecSt1() const { Double_t px, py, pz; getMomentumSt1(px, py, pz); return TVector3(px, py, pz); }
129 
130  Double_t getMomentumSt3(Double_t& px, Double_t& py, Double_t& pz) const { return getMomentum(fState.back(), px, py, pz); }
131  Double_t getMomentumSt3() const { Double_t px, py, pz; return getMomentumSt3(px, py, pz); }
132  TVector3 getMomentumVecSt3() const { Double_t px, py, pz; getMomentumSt3(px, py, pz); return TVector3(px, py, pz); }
133 
134  Double_t getPositionSt1(Double_t& x, Double_t& y) const { return getPosition(fState.front(), x, y); }
135  Double_t getPositionSt1() const { Double_t x, y; return getPositionSt1(x, y); }
136  TVector3 getPositionVecSt1() const { Double_t x, y; getPositionSt1(x, y); return TVector3(x, y, fZ.front()); }
137 
138  Double_t getPositionSt3(Double_t& x, Double_t& y) const { return getPosition(fState.back(), x, y); }
139  Double_t getPositionSt3() const { Double_t x, y; return getPositionSt3(x, y); }
140  TVector3 getPositionVecSt3() const { Double_t x, y; getPositionSt3(x, y); return TVector3(x, y, fZ.back()); }
141 
142  Double_t getMomentum(const TMatrixD& state, Double_t& px, Double_t& py, Double_t& pz) const;
143  Double_t getPosition(const TMatrixD& state, Double_t& x, Double_t& y) const;
144 
146  Bool_t isKalmanFitted() { return fKalmanStatus > 0; }
147  void setKalmanStatus(Int_t status) { fKalmanStatus = status; }
148 
150  bool operator<(const SRecTrack& elem) const;
151 
153  void setChisq(Double_t chisq) { fChisq = chisq; }
154  void insertHitIndex(Int_t index) { fHitIndex.push_back(index); }
155  void insertStateVector(TMatrixD state) { fState.push_back(state); }
156  void insertCovariance(TMatrixD covar) { fCovar.push_back(covar); }
157  void insertZ(Double_t z) { fZ.push_back(z); }
158  void insertChisq(Double_t chisq) { fChisqAtNode.push_back(chisq); }
159  void insertGFState(const genfit::MeasuredStateOnPlane& msop);
160 
162  void adjustKMag(double kmagStr);
163 
165  bool isVertexValid() const;
166  void setZVertex(Double_t z, bool update = true);
167  void updateVtxHypothesis();
168 
170  void setVertexFast(TVector3 mom, TVector3 pos);
171 
173  void swimToVertex(TVector3* pos = nullptr, TVector3* mom = nullptr, bool hyptest = true);
174 
176  TLorentzVector getMomentumVertex();
177  Double_t getMomentumVertex(Double_t& px, Double_t& py, Double_t& pz) { return getMomentum(fStateVertex, px, py, pz); }
178  Double_t getZVertex() { return fVertexPos[2]; }
179  Double_t getRVertex() { return fVertexPos.Perp(); }
180  TVector3 getVertex() { return fVertexPos; }
181  Double_t getVtxPar(Int_t i) { return fVertexPos[i]; }
182  Double_t getChisqVertex() { return fChisqVertex; }
183 
184  //Get mom/pos at a given location
185  TVector3 getDumpPos() { return fDumpPos; }
186  TVector3 getDumpFacePos() { return fDumpFacePos; }
187  TVector3 getTargetPos() { return fTargetPos; }
188  TVector3 getXVertexPos() { return fXVertexPos; }
189  TVector3 getYVertexPos() { return fYVertexPos; }
190  TVector3 getDumpMom() { return fDumpMom; }
191  TVector3 getDumpFaceMom() { return fDumpFaceMom; }
192  TVector3 getTargetMom() { return fTargetMom; }
193  TVector3 getXVertexMom() { return fXVertexMom; }
194  TVector3 getYVertexMom() { return fYVertexMom; }
195  TVector3 getVertexPos() { return fVertexPos; }
196  TVector3 getVertexMom() { return fVertexMom; }
197  Double_t getChisqDump() { return fChisqDump; }
198  Double_t getChisqTarget() { return fChisqTarget; }
199  Double_t getChisqUpstream() { return fChisqUpstream; }
200 
201  //Set mom/pos at a given location
202  void setDumpPos(TVector3 pos) { fDumpPos = pos; }
203  void setDumpFacePos(TVector3 pos) { fDumpFacePos = pos; }
204  void setTargetPos(TVector3 pos) { fTargetPos = pos; }
205  void setXVertexPos(TVector3 pos) { fXVertexPos = pos; }
206  void setYVertexPos(TVector3 pos) { fYVertexPos = pos; }
207  void setVertexPos(TVector3 pos) { fVertexPos = pos; }
208  void setDumpMom(TVector3 mom) { fDumpMom = mom; }
209  void setDumpFaceMom(TVector3 mom) { fDumpFaceMom = mom; }
210  void setTargetMom(TVector3 mom) { fTargetMom = mom; }
211  void setXVertexMom(TVector3 mom) { fXVertexMom = mom; }
212  void setYVertexMom(TVector3 mom) { fYVertexMom = mom; }
213  void setVertexMom(TVector3 mom) { fVertexMom = mom; }
214  void setChisqDump(Double_t chisq) { fChisqDump = chisq; }
215  void setChisqTarget(Double_t chisq) { fChisqTarget = chisq; }
216  void setChisqUpstream(Double_t chisq) { fChisqUpstream = chisq; }
217  void setChisqVertex(Double_t chisq) { fChisqVertex = chisq; }
218 
219  //Trigger road info
220  void setTriggerRoad(Int_t roadID) { fTriggerID = roadID; }
221  Int_t getTriggerRoad() { return fTriggerID; }
222 
223  //Prop. tube muon ID info
224  void setPTSlope(Double_t slopeX, Double_t slopeY) { fPropSlopeX = slopeX; fPropSlopeY = slopeY; }
225  void setNHitsInPT(Int_t nHitsX, Int_t nHitsY) { fNPropHitsX = nHitsX; fNPropHitsY = nHitsY; }
226  Double_t getPTSlopeX() { return fPropSlopeX; }
227  Double_t getPTSlopeY() { return fPropSlopeY; }
228  Double_t getDeflectionX() { return fState.back()[1][0] - fPropSlopeX; }
229  Double_t getDeflectionY() { return fState.back()[2][0] - fPropSlopeY; }
230  Int_t getNHitsInPTX() { return fNPropHitsX; }
231  Int_t getNHitsInPTY() { return fNPropHitsY; }
232 
233  //Overall track quality cut
234  //bool isValid();
235  bool isTarget();
236  bool isDump();
237 
239  void print(std::ostream& os = std::cout) const;
240 
241 private:
243  Double_t fChisq;
244 
246  std::vector<Int_t> fHitIndex;
247  std::vector<TMatrixD> fState;
248  std::vector<TMatrixD> fCovar;
249  std::vector<Double_t> fZ;
250  std::vector<Double_t> fChisqAtNode;
251 
253  TVector3 fDumpFacePos;
254  TVector3 fDumpPos;
255  TVector3 fTargetPos;
256  TVector3 fXVertexPos;
257  TVector3 fYVertexPos;
258 
259  TVector3 fDumpFaceMom;
260  TVector3 fDumpMom;
261  TVector3 fTargetMom;
262  TVector3 fXVertexMom;
263  TVector3 fYVertexMom;
264 
266  TVector3 fVertexMom; //duplicate information as fStateVertex already contains all the info., just keep it for now
267  TVector3 fVertexPos;
268  Double_t fChisqVertex;
269  TMatrixD fStateVertex;
270  TMatrixD fCovarVertex;
271 
273  Int_t fKalmanStatus;
274 
276  Int_t fTriggerID;
277 
279  Int_t fNPropHitsX;
280  Int_t fNPropHitsY;
281  Double_t fPropSlopeX;
282  Double_t fPropSlopeY;
283 
284  //Chisq of three test position
285  Double_t fChisqTarget;
286  Double_t fChisqDump;
287  Double_t fChisqUpstream;
288 
289  //GenFit track info - only available if the track comes from GF fitter
290  std::vector<TVector3> fGFDetPlaneVec[3];
291  std::vector<TVectorD> fGFAuxInfo;
292  std::vector<TVectorD> fGFStateVec;
293  std::vector<TMatrixDSym> fGFCov;
294 
295  ClassDef(SRecTrack, 11)
296 };
297 
298 class SRecDimuon: public SQDimuon
299 {
300 public:
301 
303  void identify(std::ostream& os = std::cout) const { os << "SRecDimuon: TODO: NOT IMPLEMENTED!" << std::endl; }
304  void Reset() { *this = SRecDimuon(); }
305  int isValid() const;
306  SRecDimuon* Clone() const { return (new SRecDimuon(*this)); }
307 
308  //SQDimuon virtual functions
309  virtual int get_dimuon_id() const { return 0; }
310  virtual void set_dimuon_id(const int a) { throw std::logic_error(__PRETTY_FUNCTION__); }
311 
312  virtual int get_rec_dimuon_id() const { return 0; }
313  virtual void set_rec_dimuon_id(const int a) { throw std::logic_error(__PRETTY_FUNCTION__); }
314 
315  virtual int get_pdg_id() const { return 0; }
316  virtual void set_pdg_id(const int a) { throw std::logic_error(__PRETTY_FUNCTION__); }
317 
318  virtual int get_track_id_pos() const { return trackID_pos; }
319  virtual void set_track_id_pos(const int a) { trackID_pos = a; }
320 
321  virtual int get_track_id_neg() const { return trackID_neg; }
322  virtual void set_track_id_neg(const int a) { trackID_neg = a; }
323 
324  virtual TVector3 get_pos() const { return vtx; }
325  virtual void set_pos(const TVector3 a) { vtx = a; }
326 
327  virtual TLorentzVector get_mom() const { return p_pos + p_neg; }
328  virtual void set_mom(const TLorentzVector a) { throw std::logic_error(__PRETTY_FUNCTION__); }
329 
330  virtual TLorentzVector get_mom_pos() const { return p_pos; }
331  virtual void set_mom_pos(const TLorentzVector a) { p_pos = a; }
332 
333  virtual TLorentzVector get_mom_neg() const { return p_neg; }
334  virtual void set_mom_neg(const TLorentzVector a) { p_neg = a; }
335 
336  virtual double get_mass() const { return mass; }
337  virtual double get_x1() const { return x1; }
338  virtual double get_x2() const { return x2; }
339  virtual double get_xf() const { return xF; }
340 
341  virtual double get_chisq() const { return chisq_kf; }
342 
343  //Get the total momentum of the virtual photon
344  TLorentzVector getVPhoton() { return p_pos + p_neg; }
345 
346  //Calculate the kinematic vairables
347  void calcVariables();
348 
349  //Dimuon quality cut
350  //bool isValid();
351 
352  //Target dimuon
353  bool isTarget();
354 
355  //Dump dimuon
356  bool isDump();
357 
358  //Index of muon track used in host SRecEvent
359  Int_t trackID_pos;
360  Int_t trackID_neg;
361 
362  //4-momentum of the muon tracks after vertex fit
363  TLorentzVector p_pos;
364  TLorentzVector p_neg;
365 
366  //4-momentum of the muon tracks before vertex fit
367  TLorentzVector p_pos_single;
368  TLorentzVector p_neg_single;
369 
370  //3-vector vertex position
371  TVector3 vtx;
372  TVector3 vtx_pos;
373  TVector3 vtx_neg;
374 
375  //Track projections at different location
376  TVector3 proj_target_pos;
377  TVector3 proj_dump_pos;
378  TVector3 proj_target_neg;
379  TVector3 proj_dump_neg;
380 
381  //Kinematic variables
382  Double_t mass;
383  Double_t pT;
384  Double_t xF;
385  Double_t x1;
386  Double_t x2;
387  Double_t costh;
388  Double_t phi;
389  Double_t mass_single;
390  Double_t chisq_single;
391 
392  //Vertex fit chisqs
393  Double_t chisq_kf;
394  Double_t chisq_vx;
395 
396  //Chisq of three test position
397  Double_t chisq_target;
398  Double_t chisq_dump;
399  Double_t chisq_upstream;
400 
401  ClassDef(SRecDimuon, 6)
402 };
403 
404 class SRecEvent: public PHObject
405 {
406 public:
407  SRecEvent();
408 
410  void identify(std::ostream& os = std::cout) const {
411  os
412  << " SRecEvent: { " << fRunID << ", " << fSpillID << ", " << fEventID << " } "
413  << " NTracks: " << fAllTracks.size()
414  << std::endl;
415  }
416  void Reset() {*this = SRecEvent();}
417  int isValid() const {return true;}
418  SRecEvent* Clone() const {return (new SRecEvent(*this));}
419 
421  void setEventInfo(SRawEvent* rawEvent);
422  void setEventInfo(int runID, int spillID, int eventID) { fRunID = runID; fSpillID = spillID; fEventID = eventID; }
423  void setTargetPos(int targetPos) { fTargetPos = targetPos; }
424  void setRecStatus(int status) { fRecStatus += status; }
425 
427  void setRawEvent(SRawEvent* rawEvent);
428 
430  bool isTriggeredBy(Int_t trigger) { return (fTriggerBits & trigger) != 0; }
431 
432  Int_t getRunID() { return fRunID; }
433  Int_t getSpillID() { return fSpillID; }
434  Int_t getEventID() { return fEventID; }
435  Int_t getTargetPos() { return fTargetPos; }
436  Int_t getTriggerBits() { return fTriggerBits; }
437  Int_t getRecStatus() { return fRecStatus; }
438 
439  Int_t getLocalID(Int_t hitID) { return fLocalID[hitID]; }
440 
441  //Event source set/get
442  void setEventSource(Int_t id1, Int_t id2) { fSource1 = id1; fSource2 = id2; }
443  Int_t getSourceID1() { return fSource1; }
444  Int_t getSourceID2() { return fSource2; }
445 
447  Int_t getNTracks() { return fAllTracks.size(); }
448  SRecTrack& getTrack(Int_t i) { return fAllTracks[i]; }
449 
451  std::vector<Int_t> getChargedTrackIDs(Int_t charge);
452 
454  Int_t getNDimuons() { return fDimuons.size(); }
455  SRecDimuon& getDimuon(Int_t i) { return fDimuons[i]; }
456 
458  void insertTrack(SRecTrack trk) { fAllTracks.push_back(trk); }
459  void reIndex() { sort(fAllTracks.begin(), fAllTracks.end()); }
460 
462  void insertDimuon(SRecDimuon dimuon) { fDimuons.push_back(dimuon); }
463 
465  void clear();
466 
467 private:
469  Short_t fRecStatus;
470 
472  Int_t fRunID;
473  Int_t fSpillID;
474  Int_t fEventID;
475 
477  Int_t fTargetPos;
478 
480  Int_t fTriggerBits;
481 
483  std::vector<SRecTrack> fAllTracks;
484 
486  std::vector<SRecDimuon> fDimuons;
487 
489  std::map<Int_t, Int_t> fLocalID;
490 
491  //Event source
492  Int_t fSource1;
493  Int_t fSource2;
494 
495  ClassDef(SRecEvent, 5)
496 };
497 
498 #endif
void Reset()
Clear Event.
Definition: SRecEvent.h:416
virtual TVector3 get_pos_target() const
Definition: SRecEvent.h:89
void setDumpFaceMom(TVector3 mom)
Definition: SRecEvent.h:209
Double_t getPosition(const TMatrixD &state, Double_t &x, Double_t &y) const
Definition: SRecEvent.cxx:332
void insertHitIndex(Int_t index)
Definition: SRecEvent.h:154
void reIndex()
Definition: SRecEvent.h:459
virtual double get_chisq() const
Definition: SRecEvent.h:341
Double_t chisq_target
Definition: SRecEvent.h:397
virtual TLorentzVector get_mom_pos() const
Return the momentum of the positive track at vertex.
Definition: SRecEvent.h:330
Int_t getNDimuons()
Get dimuons.
Definition: SRecEvent.h:454
Int_t getNTracks()
Get tracks.
Definition: SRecEvent.h:447
bool isTarget()
Definition: SRecEvent.cxx:392
ClassDef(SQTrack, 1)
TVector3 getDumpPos()
Definition: SRecEvent.h:185
void insertChisq(Double_t chisq)
Definition: SRecEvent.h:158
void identify(std::ostream &os=std::cout) const
PHObject virtual overloads.
Definition: SRecEvent.h:303
Double_t getMomentumSt3() const
Definition: SRecEvent.h:131
Int_t trackID_pos
Definition: SRecEvent.h:359
Double_t getChisqVertex()
Definition: SRecEvent.h:182
virtual int get_charge() const
Return the charge, i.e. +1 or -1.
Definition: SRecEvent.h:60
virtual int get_track_id() const
SQTrack virtual overloads.
Definition: SRecEvent.h:54
void setTargetPos(int targetPos)
Definition: SRecEvent.h:423
TVector3 getVertex()
Definition: SRecEvent.h:180
TVector3 getDumpFaceMom()
Definition: SRecEvent.h:191
virtual int get_track_id_neg() const
Return the track ID of the negative track.
Definition: SRecEvent.h:321
virtual TLorentzVector get_mom() const
Return the dimuon momentum at vertex.
Definition: SRecEvent.h:327
bool isDump()
Definition: SRecEvent.cxx:397
virtual void set_mom_neg(const TLorentzVector a)
Definition: SRecEvent.h:334
Double_t getChisq() const
Definition: SRecEvent.h:103
void setRecStatus(int status)
Definition: SRecEvent.h:424
virtual TLorentzVector get_mom_vtx() const
Return the track momentum at vertex.
Definition: SRecEvent.h:75
Double_t costh
Definition: SRecEvent.h:387
Double_t getZ(Int_t i)
Definition: SRecEvent.h:110
virtual int get_dimuon_id() const
Return the dimuon ID, which is unique per event(?).
Definition: SRecEvent.h:309
TVector3 vtx_pos
Definition: SRecEvent.h:372
TVector3 proj_target_neg
Definition: SRecEvent.h:378
virtual TVector3 get_pos_dump() const
Definition: SRecEvent.h:90
Int_t getNHitsInPTX()
Definition: SRecEvent.h:230
virtual TVector3 get_pos_vtx() const
Return the track position at vertex.
Definition: SRecEvent.h:66
virtual TLorentzVector get_mom_dump() const
Definition: SRecEvent.h:93
TLorentzVector p_neg
Definition: SRecEvent.h:364
bool isTarget()
Definition: SRecEvent.cxx:645
int isValid() const
isValid returns non zero if object contains vailid data
Definition: SRecEvent.cxx:620
virtual void set_pos_vtx(const TVector3 a)
Definition: SRecEvent.h:67
void setChisqUpstream(Double_t chisq)
Definition: SRecEvent.h:216
Double_t chisq_upstream
Definition: SRecEvent.h:399
void setEventSource(Int_t id1, Int_t id2)
Definition: SRecEvent.h:442
virtual void set_mom_pos(const TLorentzVector a)
Definition: SRecEvent.h:331
TVector3 proj_dump_pos
Definition: SRecEvent.h:377
virtual double get_x1() const
Definition: SRecEvent.h:337
void setChisqDump(Double_t chisq)
Definition: SRecEvent.h:214
virtual double get_x2() const
Definition: SRecEvent.h:338
Double_t x2
Definition: SRecEvent.h:386
void getExpPositionFast(Double_t z, Double_t &x, Double_t &y, Int_t iNode=-1)
Definition: SRecEvent.cxx:267
Double_t mass
Definition: SRecEvent.h:382
void clear()
Clear everything.
Definition: SRecEvent.cxx:729
Int_t getNHitsInStation(Int_t stationID)
Definition: SRecEvent.cxx:149
virtual TLorentzVector get_mom_target() const
Definition: SRecEvent.h:92
Double_t getChisqDump()
Definition: SRecEvent.h:197
TVector3 getDumpMom()
Definition: SRecEvent.h:190
Double_t getChisqTarget()
Definition: SRecEvent.h:198
virtual int get_hit_id(const int i) const
Definition: SRecEvent.h:95
Double_t getMomentum(const TMatrixD &state, Double_t &px, Double_t &py, Double_t &pz) const
Definition: SRecEvent.cxx:322
Int_t getTargetPos()
Definition: SRecEvent.h:435
void insertStateVector(TMatrixD state)
Definition: SRecEvent.h:155
TVector3 getGFPlaneO(Int_t i)
Definition: SRecEvent.h:113
TVector3 getVertexPos()
Definition: SRecEvent.h:195
Double_t getProb() const
Definition: SRecEvent.cxx:163
void identify(std::ostream &os=std::cout) const
PHObject virtual overloads.
Definition: SRecEvent.h:48
void setChisqVertex(Double_t chisq)
Definition: SRecEvent.h:217
void insertZ(Double_t z)
Definition: SRecEvent.h:157
TMatrixDSym getGFCov(Int_t i)
Definition: SRecEvent.h:118
ClassDef(SQDimuon, 1)
void setYVertexPos(TVector3 pos)
Definition: SRecEvent.h:206
void setKalmanStatus(Int_t status)
Definition: SRecEvent.h:147
bool isDump()
Definition: SRecEvent.cxx:661
void setZVertex(Double_t z, bool update=true)
Definition: SRecEvent.cxx:168
Int_t getHitIndex(Int_t i)
Definition: SRecEvent.h:107
int isValid() const
isValid returns non zero if object contains vailid data
Definition: SRecEvent.cxx:371
Int_t getSpillID()
Definition: SRecEvent.h:433
void print(std::ostream &os=std::cout) const
Debugging output.
Definition: SRecEvent.cxx:578
Double_t getPTSlopeX()
Definition: SRecEvent.h:226
TVector3 getXVertexMom()
Definition: SRecEvent.h:193
Double_t x1
Definition: SRecEvent.h:385
void insertDimuon(SRecDimuon dimuon)
Insert dimuon.
Definition: SRecEvent.h:462
SRecDimuon & getDimuon(Int_t i)
Definition: SRecEvent.h:455
TVector3 proj_dump_neg
Definition: SRecEvent.h:379
void setVertexFast(TVector3 mom, TVector3 pos)
Plain setting, no KF-related stuff.
Definition: SRecEvent.cxx:227
virtual void set_track_id(const int a)
Definition: SRecEvent.h:55
void insertCovariance(TMatrixD covar)
Definition: SRecEvent.h:156
void Reset()
Clear Event.
Definition: SRecEvent.h:49
virtual void set_rec_dimuon_id(const int a)
Definition: SRecEvent.h:313
TVector3 getTargetMom()
Definition: SRecEvent.h:192
virtual TLorentzVector get_mom_st1() const
Return the track momentum at Station 1.
Definition: SRecEvent.h:78
SRecDimuon * Clone() const
Definition: SRecEvent.h:306
Int_t getNHits() const
Definition: SRecEvent.h:101
void setDumpPos(TVector3 pos)
Definition: SRecEvent.h:202
virtual void set_pos(const TVector3 a)
Definition: SRecEvent.h:325
Double_t getPositionSt3() const
Definition: SRecEvent.h:139
virtual void set_mom_st3(const TLorentzVector a)
Definition: SRecEvent.h:82
Double_t getQuality() const
Definition: SRecEvent.h:105
TVector3 getVertexMom()
Definition: SRecEvent.h:196
virtual double get_mass() const
Definition: SRecEvent.h:336
Int_t getRunID()
Definition: SRecEvent.h:432
Double_t phi
Definition: SRecEvent.h:388
void setTargetPos(TVector3 pos)
Definition: SRecEvent.h:204
void updateVtxHypothesis()
Definition: SRecEvent.cxx:213
virtual double get_chisq_dump() const
Definition: SRecEvent.h:86
std::vector< Int_t > getChargedTrackIDs(Int_t charge)
Get track IDs.
Definition: SRecEvent.cxx:712
Double_t chisq_kf
Definition: SRecEvent.h:393
Int_t getSourceID2()
Definition: SRecEvent.h:444
Double_t chisq_single
Definition: SRecEvent.h:390
virtual void set_pos_st3(const TVector3 a)
Definition: SRecEvent.h:73
void setTargetMom(TVector3 mom)
Definition: SRecEvent.h:210
TVector3 getTargetPos()
Definition: SRecEvent.h:187
Double_t getPositionSt3(Double_t &x, Double_t &y) const
Definition: SRecEvent.h:138
virtual int get_num_hits() const
Return the number of hits associated to this track.
Definition: SRecEvent.h:63
Int_t getNHitsInPTY()
Definition: SRecEvent.h:231
void setPTSlope(Double_t slopeX, Double_t slopeY)
Definition: SRecEvent.h:224
Int_t getTriggerRoad()
Definition: SRecEvent.h:221
virtual void set_mom_vtx(const TLorentzVector a)
Definition: SRecEvent.h:76
Double_t getPositionSt1(Double_t &x, Double_t &y) const
Definition: SRecEvent.h:134
virtual void set_pos_st1(const TVector3 a)
Definition: SRecEvent.h:70
TVectorD getGFState(Int_t i)
Definition: SRecEvent.h:117
virtual double get_chsiq_upstream() const
Definition: SRecEvent.h:87
TVector3 getPositionVecSt1() const
Definition: SRecEvent.h:136
void getExpPosErrorFast(Double_t z, Double_t &dx, Double_t &dy, Int_t iNode=-1)
Definition: SRecEvent.cxx:288
Double_t getMomentumSt1() const
Definition: SRecEvent.h:127
virtual void set_charge(const int a)
Definition: SRecEvent.h:61
virtual void set_mom_st1(const TLorentzVector a)
Definition: SRecEvent.h:79
void setVertexMom(TVector3 mom)
Definition: SRecEvent.h:213
An SQ interface class to hold one true or reconstructed track.
Definition: SQTrack.h:8
TVector3 getMomentumVecSt1() const
Definition: SRecEvent.h:128
TLorentzVector getMomentumVertex()
Get the vertex info.
Definition: SRecEvent.cxx:340
void setEventInfo(int runID, int spillID, int eventID)
Definition: SRecEvent.h:422
void setXVertexMom(TVector3 mom)
Definition: SRecEvent.h:211
TVectorD getGFAuxInfo(Int_t i)
Definition: SRecEvent.h:116
void setXVertexPos(TVector3 pos)
Definition: SRecEvent.h:205
TVector3 getPositionVecSt3() const
Definition: SRecEvent.h:140
Int_t getTriggerBits()
Definition: SRecEvent.h:436
int isValid() const
isValid returns non zero if object contains vailid data
Definition: SRecEvent.h:417
#define M_MU
Definition: GlobalConsts.h:12
void adjustKMag(double kmagStr)
Fast-adjust of kmag.
Definition: SRecEvent.cxx:363
void insertGFState(const genfit::MeasuredStateOnPlane &msop)
Definition: SRecEvent.cxx:351
TLorentzVector p_neg_single
Definition: SRecEvent.h:368
Double_t getPTSlopeY()
Definition: SRecEvent.h:227
void setNHitsInPT(Int_t nHitsX, Int_t nHitsY)
Definition: SRecEvent.h:225
SRecTrack & getTrack(Int_t i)
Definition: SRecEvent.h:448
void Reset()
Clear Event.
Definition: SRecEvent.h:304
virtual int get_pdg_id() const
Return the GPD ID of parent particle. It is valid only for true dimuon.
Definition: SRecEvent.h:315
Double_t getChisqUpstream()
Definition: SRecEvent.h:199
bool isTriggeredBy(Int_t trigger)
Trigger util.
Definition: SRecEvent.h:430
virtual TVector3 get_pos_st1() const
Return the track position at Station 1.
Definition: SRecEvent.h:69
TLorentzVector p_pos
Definition: SRecEvent.h:363
Bool_t isKalmanFitted()
Fit status.
Definition: SRecEvent.h:146
TVector3 getXVertexPos()
Definition: SRecEvent.h:188
void setYVertexMom(TVector3 mom)
Definition: SRecEvent.h:212
Double_t getDeflectionY()
Definition: SRecEvent.h:229
void insertTrack(SRecTrack trk)
Insert tracks.
Definition: SRecEvent.h:458
virtual void set_pdg_id(const int a)
Definition: SRecEvent.h:316
TVector3 proj_target_pos
Definition: SRecEvent.h:376
TMatrixD getCovariance(Int_t i)
Definition: SRecEvent.h:109
TVector3 getGFPlaneV(Int_t i)
Definition: SRecEvent.h:115
void setEventInfo(SRawEvent *rawEvent)
Set/Get event info.
Definition: SRecEvent.cxx:702
void setDumpMom(TVector3 mom)
Definition: SRecEvent.h:208
void identify(std::ostream &os=std::cout) const
PHObject virtual overloads.
Definition: SRecEvent.h:410
TVector3 vtx_neg
Definition: SRecEvent.h:373
virtual double get_chisq() const
Definition: SRecEvent.h:84
Double_t getExpMomentumFast(Double_t z, Double_t &px, Double_t &py, Double_t &pz, Int_t iNode=-1)
Definition: SRecEvent.cxx:311
virtual void set_mom(const TLorentzVector a)
Definition: SRecEvent.h:328
void setChisqTarget(Double_t chisq)
Definition: SRecEvent.h:215
virtual void set_num_hits(const int a)
Definition: SRecEvent.h:64
TVector3 getMomentumVecSt3() const
Definition: SRecEvent.h:132
Double_t chisq_dump
Definition: SRecEvent.h:398
Double_t getZVertex()
Definition: SRecEvent.h:178
TLorentzVector getVPhoton()
Definition: SRecEvent.h:344
SRecTrack * Clone() const
Definition: SRecEvent.h:51
TVector3 vtx
Definition: SRecEvent.h:371
Double_t pT
Definition: SRecEvent.h:383
Double_t mass_single
Definition: SRecEvent.h:389
Int_t trackID_neg
Definition: SRecEvent.h:360
virtual int get_rec_dimuon_id() const
Return the dimuon ID of associated reconstructed dimuon. Valid only if this object holds truth dimuon...
Definition: SRecEvent.h:312
Double_t getMomentumVertex(Double_t &px, Double_t &py, Double_t &pz)
Definition: SRecEvent.h:177
Double_t getChisqAtNode(Int_t i)
Definition: SRecEvent.h:111
void setRawEvent(SRawEvent *rawEvent)
directly setup everything by raw event
Definition: SRecEvent.cxx:690
TMatrixD getStateVector(Int_t i)
Definition: SRecEvent.h:108
void setDumpFacePos(TVector3 pos)
Definition: SRecEvent.h:203
Int_t getNearestNode(Double_t z)
Definition: SRecEvent.cxx:249
Int_t getLocalID(Int_t hitID)
Definition: SRecEvent.h:439
virtual void set_dimuon_id(const int a)
Definition: SRecEvent.h:310
virtual TLorentzVector get_mom_st3() const
Return the track momentum at Station 3.
Definition: SRecEvent.h:81
virtual TVector3 get_pos_st3() const
Return the track position at Station 3.
Definition: SRecEvent.h:72
void setTriggerRoad(Int_t roadID)
Definition: SRecEvent.h:220
Int_t getCharge() const
Gets.
Definition: SRecEvent.h:100
SRecEvent * Clone() const
Definition: SRecEvent.h:418
Double_t getPositionSt1() const
Definition: SRecEvent.h:135
TVector3 getYVertexMom()
Definition: SRecEvent.h:194
Double_t xF
Definition: SRecEvent.h:384
TVector3 getYVertexPos()
Definition: SRecEvent.h:189
Double_t chisq_vx
Definition: SRecEvent.h:394
TLorentzVector p_pos_single
Definition: SRecEvent.h:367
bool isVertexValid() const
Vertex stuff.
Definition: SRecEvent.cxx:241
virtual double get_chisq_target() const
Definition: SRecEvent.h:85
An SQ interface class to hold one true or reconstructed dimuon.
Definition: SQDimuon.h:8
TVector3 getGFPlaneU(Int_t i)
Definition: SRecEvent.h:114
void setChisq(Double_t chisq)
Sets.
Definition: SRecEvent.h:153
TVector3 getDumpFacePos()
Definition: SRecEvent.h:186
void calcVariables()
Definition: SRecEvent.cxx:593
virtual void set_track_id_pos(const int a)
Definition: SRecEvent.h:319
virtual int get_track_id_pos() const
Return the track ID of the positive track.
Definition: SRecEvent.h:318
virtual int get_rec_track_id() const
Return the track ID of associated reconstructed track. Valid only if this object holds truth track in...
Definition: SRecEvent.h:57
Int_t getSourceID1()
Definition: SRecEvent.h:443
virtual double get_xf() const
Definition: SRecEvent.h:339
TLorentzVector getlvec(const TVector3 &vec) const
Definition: SRecEvent.h:97
bool operator<(const SRecTrack &elem) const
Comparitor.
Definition: SRecEvent.cxx:144
Double_t getMomentumSt3(Double_t &px, Double_t &py, Double_t &pz) const
Definition: SRecEvent.h:130
Double_t getMomentumSt1(Double_t &px, Double_t &py, Double_t &pz) const
Definition: SRecEvent.h:126
virtual void set_track_id_neg(const int a)
Definition: SRecEvent.h:322
Double_t getDeflectionX()
Definition: SRecEvent.h:228
virtual TVector3 get_pos() const
Return the dimuon position at vertex.
Definition: SRecEvent.h:324
void swimToVertex(TVector3 *pos=nullptr, TVector3 *mom=nullptr, bool hyptest=true)
Simple swim to vertex.
Definition: SRecEvent.cxx:402
Int_t getEventID()
Definition: SRecEvent.h:434
Double_t getVtxPar(Int_t i)
Definition: SRecEvent.h:181
Int_t getRecStatus()
Definition: SRecEvent.h:437
virtual TLorentzVector get_mom_neg() const
Return the momentum of the negative track at vertex.
Definition: SRecEvent.h:333
virtual void set_rec_track_id(const int a)
Definition: SRecEvent.h:58
Double_t getRVertex()
Definition: SRecEvent.h:179
void setVertexPos(TVector3 pos)
Definition: SRecEvent.h:207