// Fast Digitization #ifndef PNDFTSHGEOMATRICTRACKER_H #define PNDFTSHGEOMATRICTRACKER_H 1 #include "FairTask.h" #include "PndGeoFtsPar.h" #include "TVector3.h" #include #include #include class PndFtsHit; class PndFtsHitInfo; class TClonesArray; class TObjectArray; class PndFtsGeometricTracker : public FairTask { public: /** Default constructor **/ PndFtsGeometricTracker(); /** Destructor **/ ~PndFtsGeometricTracker(); /** Virtual method Init **/ virtual InitStatus Init(); /** Virtual method Exec **/ virtual void Exec(Option_t* opt); //PndFtsHit* AddHit(Int_t detID, Int_t tubeID, Int_t chamberID, Int_t layerID, Int_t skew, Int_t iPoint, TVector3& pos, TVector3& dpos, Double_t p, Double_t rsim, Double_t closestDistanceError, Double_t depcharge); //PndFtsHitInfo* AddHitInfo(Int_t fileNumber, Int_t eventNumber, Int_t trackID, Int_t pointID, Int_t nMerged, Bool_t isFake); // dummy funkcja void AddDataHit( Int_t evtNr, Int_t detID, Int_t tubeID, Int_t chamberID, Int_t layerID, Int_t skew, Int_t iHit, TVector3& pos, TVector3& dpos, Double_t p, Double_t rsim, Double_t closestDistanceError, Double_t depcharge, Double_t tid, Double_t mmx=0,Double_t mmy=0, Double_t mmz=0); void FoldZPosWithResolution(Double_t &zpos, Double_t &zposError, TVector3 localInPos, TVector3 localOutPos); Double_t GetError(Double_t); /** set persistence flag **/ void SetPersistence(Bool_t persistence) { fPersistence = persistence; } void SwitchOnOverlap(){fOverlap = kTRUE;} private: void SetParContainers(); struct DataHitUnit; std::vector DataHit; //! std::vector DataHitIn; //! std::vector DataHitOut; //! /** Input array of PndFtsPoints **/ //TClonesArray* fPointArray; /** Output array of PndFtsHits **/ TClonesArray* fHitArray; //TClonesArray* fOverlapHitArray; TObjArray *fVolumeArray; /** Output array of PndFtsHitInfo **/ //TClonesArray* fHitInfoArray; Int_t fevtn; PndGeoFtsPar* fFtsParameters; /** object persistence **/ Bool_t fPersistence; //! Bool_t fOverlap; //! TClonesArray* fTubeArray; TClonesArray* fTrackCandArray; TClonesArray* fTrackArray; PndFtsGeometricTracker(const PndFtsGeometricTracker& L); PndFtsGeometricTracker& operator= (const PndFtsGeometricTracker&) {return *this;} // STRUCTURE TO HOLD DATA SET FOR THE TRACK CANDIDATE struct DataHitUnit { DataHitUnit(Int_t a, Int_t b, Int_t c, Int_t d, Int_t e, Int_t f, Int_t g, Double_t da, Double_t db, Double_t dc, Double_t dd, Double_t de, Double_t df, Double_t dg, Double_t dh, Double_t di, Double_t dj, Double_t tid=0, Double_t mmx=0,Double_t mmy=0,Double_t mmz=0) : evtNr(a), detID(b), tubeID(c), chamberID(d), layerID(e), skew(f), iHit(g), x(da), y(db), z(dc), dx(dd), dy(de), dz(df), p(dg), r(dh), closestDistanceError(di), depcharge(dj), trackID(tid), mx(mmx), my(mmy), mz(mmz), active(true) { /*std::cout <<"CTOR MOM = " << mom << std::endl;*/ } Int_t evtNr; Int_t detID; Int_t tubeID; Int_t chamberID; Int_t layerID; Int_t skew; Int_t iHit; Double_t x; Double_t y; Double_t z; Double_t dx; Double_t dy; Double_t dz; Double_t p; // pulset Double_t r; Double_t closestDistanceError; Double_t depcharge; Double_t trackID; Double_t mx; Double_t my; Double_t mz; Bool_t active; bool operator<(const DataHitUnit& arg) { return tubeID < arg.tubeID; } }; public: struct point{ public: float x; float y; }; struct gstraw{ public: int l; float x; float y; float z; }; std::map G; struct straw{ public: int nr; int l; float r; float x; float y; float z; }; private: straw *F12v,*F12s,*F34v,*F34s,*F56v,*F56s;//! int lf12v,lf12s,lf34v,lf34s,lf56v,lf56s;//! int nrev,poz,id_tr;//!ilslread, float wsp12[3000][4],wsp56[3000][4],wsp34[3000][4];//!r[1000], float Radius[1000], SWSP[500][8];//! float SRR[500][600],SRX[500][600], SRY[500][600],SRZ[500][600];//! int SR[500][600],SRTR[500],SF12[1000][17],SF34[1000][17],SF56[1000][17],SF[1000][49];//! int liczbaev=0,liczba1=0,liczba11=0,liczba2=0,liczevzero=0,liczba4=0,liczba44=0,liczba5=0;//! int nrb;//! float fg[1000][17];//! float zcoord[48];//! must bu filled in readgeom !!!! void readgeom(); void track(int,int*,straw *,int,straw*,int); //void dopasuj(int,int,int *); void porownaj(int,int SP[][17],int*,float*,float wsp[][4]); void circle(int,straw*,int ,straw *,int ,int,int); void fv_track(int,int SP[][17],straw *,int,int *,float wsp[][4],float *); void fs_track(int,int SP[][17],straw *,int,int ,float wsp[][4],float *); void prostauk(int,straw *,int,float *,float *,int *,float *); void tang(point,float,point,float, float tab[][2]); void line(point,point, float *,float *); void matchEmpty( std::vector< PndFtsGeometricTracker::DataHitUnit >& ll, const std::vector< PndFtsGeometricTracker::DataHitUnit >& rr ); public: std::vector< PndFtsGeometricTracker::DataHitUnit > trackFinder( const std::vector< PndFtsGeometricTracker::DataHitUnit >& input ); //! static unsigned IN_TRK_COUNTER; static unsigned OUT_TRK_COUNTER; ClassDef(PndFtsGeometricTracker,1); }; #endif