/* * PndOnlineSTTTriplet.h * * Created on: Jan 29, 2013 * Author: mertens */ #ifndef PNDONLINESTTTRIPLET_H_ #define PNDONLINESTTTRIPLET_H_ #include "TObject.h" #include "TVector3.h" #include "TObjArray.h" #include #include #include "PndSttHit.h" #include "PndSttTube.h" namespace PndOnlineSTT { static const Double_t DriftTime = 245.0; } class PndOnlineSttTriplet : public TObject { public: enum TripletStatus {kUnassigned, kAssigned, kExpired, kAssignedBad, kAssignedGood, kConfirmed, kConflict}; PndOnlineSttTriplet(); virtual ~PndOnlineSttTriplet(); Double_t GetMinHitTime() const; Double_t GetMaxHitTime() const; Double_t GetMeanHitTime() const; Double_t GetMinAcceptWindow() const; Double_t GetMaxAcceptWindow() const; Double_t GetMinT0() const; Double_t GetMaxT0() const; Double_t GetMeanT0() const; TVector3 GetCMS(const TObjArray* const tubearray) const; TVector3 GetCMS3D(const TObjArray* const tubearray, TVector2* const zminmax = 0) const; Int_t GetPivotStraw() const; Int_t GetOldestStraw() const; Int_t GetHitCount() const; Int_t GetNeighborCount() const; void SetPivotHit(const PndSttHit* const theHit, const PndSttTube* const theTube); Bool_t AddNeighbor(const PndSttHit* const theHit, const PndSttTube* const theTube, Bool_t override = kFALSE); Bool_t CheckHit(const PndSttHit* const theHit) const; Bool_t HitTooRecent(const PndSttHit* const theHit) const; Bool_t HitTooOld(const PndSttHit* const theHit) const; Bool_t IsActive() const; void SetActive(Bool_t isActive); TripletStatus GetTripletStatus() {return fTripletStatus;}; void SetTripletStatus(TripletStatus newTripletStatus) {fTripletStatus = newTripletStatus;}; void AddMCIndex(Int_t mcindex); void AddTrackIndex(Int_t trackindex); Int_t GetMCIndex(Int_t i) const {return fMCIndexList.at(i);}; Int_t GetTrackIndex(Int_t i) const {return fTrackIndexList.at(i);}; Int_t MajorMCIndex(); Int_t MajorTrackIndex(); Double_t MCIndexMajority(); Double_t TrackIndexMajority(); TVector3 GetPoca() const {return fPoca;}; void SetPoca(const TVector3& newPoca) {fPoca = newPoca;}; void AddTriplet(const PndOnlineSttTriplet& rightTriplet); Double_t MCEventTime; Int_t MCEventEntryNumber; Int_t MCTrackEntryNumber; private: TripletStatus fTripletStatus; Double_t fMinHitTime; Double_t fMaxHitTime; Double_t fHitTimeSum; Int_t fOldestStraw; Bool_t fActive; std::vector fTubes; std::vector fTimes; std::vector fMCIndexList; std::vector fTrackIndexList; std::map fMCIndex; std::map fTrackIndex; TVector3 fPoca; ClassDef(PndOnlineSttTriplet,1); }; #endif /* PNDONLINESTTTRIPLET_H_ */