36 #include <TLorentzVector.h>
38 #include <GenFit/MeasuredStateOnPlane.h>
55 virtual void set_track_id(
const int a) {
throw std::logic_error(__PRETTY_FUNCTION__); }
58 virtual void set_rec_track_id(
const int a) {
throw std::logic_error(__PRETTY_FUNCTION__); }
61 virtual void set_charge(
const int a) {
throw std::logic_error(__PRETTY_FUNCTION__); }
64 virtual void set_num_hits(
const int a) {
throw std::logic_error(__PRETTY_FUNCTION__); }
67 virtual void set_pos_vtx(
const TVector3 a) { fVertexPos = a; }
70 virtual void set_pos_st1(
const TVector3 a) {
throw std::logic_error(__PRETTY_FUNCTION__); }
73 virtual void set_pos_st3(
const TVector3 a) {
throw std::logic_error(__PRETTY_FUNCTION__); }
76 virtual void set_mom_vtx(
const TLorentzVector a) { fVertexMom = a.Vect(); }
79 virtual void set_mom_st1(
const TLorentzVector a) {
throw std::logic_error(__PRETTY_FUNCTION__); }
82 virtual void set_mom_st3(
const TLorentzVector a) {
throw std::logic_error(__PRETTY_FUNCTION__); }
95 virtual int get_hit_id(
const int i)
const {
return fHitIndex[i]; }
97 inline TLorentzVector
getlvec(
const TVector3& vec)
const { TLorentzVector lvec; lvec.SetVectM(vec,
M_MU);
return lvec; }
100 Int_t
getCharge()
const {
return (fState[0])[0][0] > 0 ? 1 : -1; }
101 Int_t
getNHits()
const {
return fHitIndex.size(); }
110 Double_t
getZ(Int_t i) {
return fZ[i]; }
118 TMatrixDSym
getGFCov(Int_t i) {
return fGFCov[i]; }
123 Double_t
getExpMomentumFast(Double_t z, Double_t& px, Double_t& py, Double_t& pz, Int_t iNode = -1);
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;
158 void insertChisq(Double_t chisq) { fChisqAtNode.push_back(chisq); }
159 void insertGFState(
const genfit::MeasuredStateOnPlane& msop);
166 void setZVertex(Double_t z,
bool update =
true);
173 void swimToVertex(TVector3* pos =
nullptr, TVector3* mom =
nullptr,
bool hyptest =
true);
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; }
239 void print(std::ostream& os = std::cout)
const;
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;
253 TVector3 fDumpFacePos;
256 TVector3 fXVertexPos;
257 TVector3 fYVertexPos;
259 TVector3 fDumpFaceMom;
262 TVector3 fXVertexMom;
263 TVector3 fYVertexMom;
268 Double_t fChisqVertex;
269 TMatrixD fStateVertex;
270 TMatrixD fCovarVertex;
281 Double_t fPropSlopeX;
282 Double_t fPropSlopeY;
285 Double_t fChisqTarget;
287 Double_t fChisqUpstream;
290 std::vector<TVector3> fGFDetPlaneVec[3];
291 std::vector<TVectorD> fGFAuxInfo;
292 std::vector<TVectorD> fGFStateVec;
293 std::vector<TMatrixDSym> fGFCov;
303 void identify(std::ostream& os = std::cout)
const { os <<
"SRecDimuon: TODO: NOT IMPLEMENTED!" << std::endl; }
310 virtual void set_dimuon_id(
const int a) {
throw std::logic_error(__PRETTY_FUNCTION__); }
316 virtual void set_pdg_id(
const int a) {
throw std::logic_error(__PRETTY_FUNCTION__); }
328 virtual void set_mom(
const TLorentzVector a) {
throw std::logic_error(__PRETTY_FUNCTION__); }
410 void identify(std::ostream& os = std::cout)
const {
412 <<
" SRecEvent: { " << fRunID <<
", " << fSpillID <<
", " << fEventID <<
" } "
413 <<
" NTracks: " << fAllTracks.size()
422 void setEventInfo(
int runID,
int spillID,
int eventID) { fRunID = runID; fSpillID = spillID; fEventID = eventID; }
459 void reIndex() { sort(fAllTracks.begin(), fAllTracks.end()); }
483 std::vector<SRecTrack> fAllTracks;
486 std::vector<SRecDimuon> fDimuons;
489 std::map<Int_t, Int_t> fLocalID;
virtual TVector3 get_pos_target() const
void setDumpFaceMom(TVector3 mom)
Double_t getPosition(const TMatrixD &state, Double_t &x, Double_t &y) const
void insertHitIndex(Int_t index)
virtual double get_chisq() const
virtual TLorentzVector get_mom_pos() const
Return the momentum of the positive track at vertex.
Int_t getNDimuons()
Get dimuons.
Int_t getNTracks()
Get tracks.
void insertChisq(Double_t chisq)
void identify(std::ostream &os=std::cout) const
PHObject virtual overloads.
Double_t getMomentumSt3() const
Double_t getChisqVertex()
virtual int get_charge() const
Return the charge, i.e. +1 or -1.
virtual int get_track_id() const
SQTrack virtual overloads.
void setTargetPos(int targetPos)
TVector3 getDumpFaceMom()
virtual int get_track_id_neg() const
Return the track ID of the negative track.
virtual TLorentzVector get_mom() const
Return the dimuon momentum at vertex.
virtual void set_mom_neg(const TLorentzVector a)
Double_t getChisq() const
void setRecStatus(int status)
virtual TLorentzVector get_mom_vtx() const
Return the track momentum at vertex.
virtual int get_dimuon_id() const
Return the dimuon ID, which is unique per event(?).
virtual TVector3 get_pos_dump() const
virtual TVector3 get_pos_vtx() const
Return the track position at vertex.
virtual TLorentzVector get_mom_dump() const
int isValid() const
isValid returns non zero if object contains vailid data
virtual void set_pos_vtx(const TVector3 a)
void setChisqUpstream(Double_t chisq)
void setEventSource(Int_t id1, Int_t id2)
virtual void set_mom_pos(const TLorentzVector a)
virtual double get_x1() const
void setChisqDump(Double_t chisq)
virtual double get_x2() const
void getExpPositionFast(Double_t z, Double_t &x, Double_t &y, Int_t iNode=-1)
void clear()
Clear everything.
Int_t getNHitsInStation(Int_t stationID)
virtual TLorentzVector get_mom_target() const
Double_t getChisqTarget()
virtual int get_hit_id(const int i) const
Double_t getMomentum(const TMatrixD &state, Double_t &px, Double_t &py, Double_t &pz) const
void insertStateVector(TMatrixD state)
TVector3 getGFPlaneO(Int_t i)
void identify(std::ostream &os=std::cout) const
PHObject virtual overloads.
void setChisqVertex(Double_t chisq)
TMatrixDSym getGFCov(Int_t i)
void setYVertexPos(TVector3 pos)
void setKalmanStatus(Int_t status)
void setZVertex(Double_t z, bool update=true)
Int_t getHitIndex(Int_t i)
int isValid() const
isValid returns non zero if object contains vailid data
void print(std::ostream &os=std::cout) const
Debugging output.
void insertDimuon(SRecDimuon dimuon)
Insert dimuon.
SRecDimuon & getDimuon(Int_t i)
void setVertexFast(TVector3 mom, TVector3 pos)
Plain setting, no KF-related stuff.
virtual void set_track_id(const int a)
void insertCovariance(TMatrixD covar)
virtual void set_rec_dimuon_id(const int a)
virtual TLorentzVector get_mom_st1() const
Return the track momentum at Station 1.
SRecDimuon * Clone() const
void setDumpPos(TVector3 pos)
virtual void set_pos(const TVector3 a)
Double_t getPositionSt3() const
virtual void set_mom_st3(const TLorentzVector a)
Double_t getQuality() const
virtual double get_mass() const
void setTargetPos(TVector3 pos)
void updateVtxHypothesis()
virtual double get_chisq_dump() const
std::vector< Int_t > getChargedTrackIDs(Int_t charge)
Get track IDs.
virtual void set_pos_st3(const TVector3 a)
void setTargetMom(TVector3 mom)
Double_t getPositionSt3(Double_t &x, Double_t &y) const
virtual int get_num_hits() const
Return the number of hits associated to this track.
void setPTSlope(Double_t slopeX, Double_t slopeY)
virtual void set_mom_vtx(const TLorentzVector a)
Double_t getPositionSt1(Double_t &x, Double_t &y) const
virtual void set_pos_st1(const TVector3 a)
TVectorD getGFState(Int_t i)
virtual double get_chsiq_upstream() const
TVector3 getPositionVecSt1() const
void getExpPosErrorFast(Double_t z, Double_t &dx, Double_t &dy, Int_t iNode=-1)
Double_t getMomentumSt1() const
virtual void set_charge(const int a)
virtual void set_mom_st1(const TLorentzVector a)
void setVertexMom(TVector3 mom)
An SQ interface class to hold one true or reconstructed track.
TVector3 getMomentumVecSt1() const
TLorentzVector getMomentumVertex()
Get the vertex info.
void setEventInfo(int runID, int spillID, int eventID)
void setXVertexMom(TVector3 mom)
TVectorD getGFAuxInfo(Int_t i)
void setXVertexPos(TVector3 pos)
TVector3 getPositionVecSt3() const
int isValid() const
isValid returns non zero if object contains vailid data
void adjustKMag(double kmagStr)
Fast-adjust of kmag.
void insertGFState(const genfit::MeasuredStateOnPlane &msop)
TLorentzVector p_neg_single
void setNHitsInPT(Int_t nHitsX, Int_t nHitsY)
SRecTrack & getTrack(Int_t i)
virtual int get_pdg_id() const
Return the GPD ID of parent particle. It is valid only for true dimuon.
Double_t getChisqUpstream()
bool isTriggeredBy(Int_t trigger)
Trigger util.
virtual TVector3 get_pos_st1() const
Return the track position at Station 1.
Bool_t isKalmanFitted()
Fit status.
void setYVertexMom(TVector3 mom)
Double_t getDeflectionY()
void insertTrack(SRecTrack trk)
Insert tracks.
virtual void set_pdg_id(const int a)
TMatrixD getCovariance(Int_t i)
TVector3 getGFPlaneV(Int_t i)
void setEventInfo(SRawEvent *rawEvent)
Set/Get event info.
void setDumpMom(TVector3 mom)
void identify(std::ostream &os=std::cout) const
PHObject virtual overloads.
virtual double get_chisq() const
Double_t getExpMomentumFast(Double_t z, Double_t &px, Double_t &py, Double_t &pz, Int_t iNode=-1)
virtual void set_mom(const TLorentzVector a)
void setChisqTarget(Double_t chisq)
virtual void set_num_hits(const int a)
TVector3 getMomentumVecSt3() const
TLorentzVector getVPhoton()
SRecTrack * Clone() const
virtual int get_rec_dimuon_id() const
Return the dimuon ID of associated reconstructed dimuon. Valid only if this object holds truth dimuon...
Double_t getMomentumVertex(Double_t &px, Double_t &py, Double_t &pz)
Double_t getChisqAtNode(Int_t i)
void setRawEvent(SRawEvent *rawEvent)
directly setup everything by raw event
TMatrixD getStateVector(Int_t i)
void setDumpFacePos(TVector3 pos)
Int_t getNearestNode(Double_t z)
Int_t getLocalID(Int_t hitID)
virtual void set_dimuon_id(const int a)
virtual TLorentzVector get_mom_st3() const
Return the track momentum at Station 3.
virtual TVector3 get_pos_st3() const
Return the track position at Station 3.
void setTriggerRoad(Int_t roadID)
Int_t getCharge() const
Gets.
SRecEvent * Clone() const
Double_t getPositionSt1() const
TLorentzVector p_pos_single
bool isVertexValid() const
Vertex stuff.
virtual double get_chisq_target() const
An SQ interface class to hold one true or reconstructed dimuon.
TVector3 getGFPlaneU(Int_t i)
void setChisq(Double_t chisq)
Sets.
TVector3 getDumpFacePos()
virtual void set_track_id_pos(const int a)
virtual int get_track_id_pos() const
Return the track ID of the positive track.
virtual int get_rec_track_id() const
Return the track ID of associated reconstructed track. Valid only if this object holds truth track in...
virtual double get_xf() const
TLorentzVector getlvec(const TVector3 &vec) const
bool operator<(const SRecTrack &elem) const
Comparitor.
Double_t getMomentumSt3(Double_t &px, Double_t &py, Double_t &pz) const
Double_t getMomentumSt1(Double_t &px, Double_t &py, Double_t &pz) const
virtual void set_track_id_neg(const int a)
Double_t getDeflectionX()
virtual TVector3 get_pos() const
Return the dimuon position at vertex.
void swimToVertex(TVector3 *pos=nullptr, TVector3 *mom=nullptr, bool hyptest=true)
Simple swim to vertex.
Double_t getVtxPar(Int_t i)
virtual TLorentzVector get_mom_neg() const
Return the momentum of the negative track at vertex.
virtual void set_rec_track_id(const int a)
void setVertexPos(TVector3 pos)