// ------------------------------------------------------------------------- // ----- CbmMvdStringFinder header file ----- // ----- Created 28.06.2011 by Q. Li, M. Deveaux ----- // ------------------------------------------------------------------------- /** CbmMvdStringFinder * @author Q. Li, M. Deveaux * @since 28.06.2011 ** ** Class for MIMOSA-26 String-Finding **/ #ifndef CBMMVDSTRINGFINDER_H #define CBMMVDSTRINGFINDER_H #include "FairTask.h" #include "FairRootManager.h" #include "TClonesArray.h" #include "CbmMvdHit.h" #include "CbmMvdDigi.h" #include "CbmMvdDigitizeL.h" #include "TH1.h"//add by Qiyan #include "TH2.h" #include "TCanvas.h" #include "TRandom3.h" #include #include #include //#include #include "CbmMvdMimoData.h" #include "CbmMvdMimoStateMatch.h" using namespace std; class FairLogger; class CbmMvdStringFinder : public FairTask { public: /** Default constructor **/ CbmMvdStringFinder(); /** Standard constructor *@param name Name of task *@param iVerbose Verbosity level **/ CbmMvdStringFinder(const char* name, Int_t iVerbose = 1); /** Destructor **/ virtual ~CbmMvdStringFinder(); protected: /** Intialisation at begin of run. To be implemented in the derived class. *@value Success If not kSUCCESS, task will be set inactive. **/ virtual InitStatus Init(); /** Reinitialisation. To be implemented in the derived class. *@value Success If not kSUCCESS, task will be set inactive. **/ virtual InitStatus ReInit(); /**add by Q.Li**/ virtual void ReadOfFDigi(Int_t fStationNr); virtual void GetUsefulData(Int_t fSensorNum); virtual void GetStateDigi(Int_t sensorID); virtual void CreatDataFrameMimosa26(); /** Task execution **/ virtual void Exec(Option_t* opt); /** Intialise parameter containers. To be implemented in the derived class. **/ virtual void SetParContainers() { }; /** Action after each event. To be implemented in the derived class **/ virtual void Finish(); // /** Action after each event. To be implemented in the derived class **/ // virtual void FinishTask() { }; TClonesArray* fHitArray; // hits obtained from the digitizer TClonesArray* fDigiArray; // digis obtained from the digitizer CbmMvdHit* fHit; CbmMvdDigi* fDigi; // fStateMatch; TClonesArray* fMimoData; TClonesArray* fMimoDataStateMatch; static const Int_t fMaxNumberOfSensors=50; static const Int_t fByteNumberOfData = 570*2;//570*16bit //test of the TH2 histro TH2* histrotest; TCanvas* tcan; //20/07/2011 to separate sensor in one event vector< vector< Int_t > > Array_AT; vector< Int_t > fNumDigi; //25/07/2011 to find and separate hited line in one sensor (in order). vector< vector< Int_t > > fLineArray; vector< Int_t > fCoordinate; //25/11/2011 to find and separate hited line in one sensor (in order).based on the didis number vector< vector< Int_t > > fDigiLineArray; vector< Int_t > fDigiLine; //28/07/2011 to store the whole framedata with Mimosa-26 based on 16 bits vector< Int_t > fFrameArray; // 28/07/2011 to store the whole framedata with Mimosa-26 based on 8s bits unsigned char fMimoDataArray[fByteNumberOfData]; // to store the data for one line ,then add into the iFrameArray vector< Int_t > fTempArray; //store the data into the fStateInformation vector< vector< Int_t > > fStateMatchInformation; vector< Int_t > fOneState; vector< Int_t > ffState; vector< Int_t > stateDigis; Int_t fStationID; Int_t fSensorID; // Int_t fFrameID; Int_t fROCFrame; Long64_t fTimeStamp; Long64_t fSensorOffset; Short_t fTemp; Short_t fROCAddress; Int_t fHeader0; Int_t fHeader1; Int_t fFrameCounter0; Int_t fFrameConnter1; Int_t fDatalength0; Int_t fDatalength1; Int_t datalength; Int_t fStateline; Int_t fStateNumInOneFrame; Int_t fStateN; Int_t fTrailer0; Int_t fTrailer1; Int_t fEventNum; Int_t num_entries; ClassDef(CbmMvdStringFinder,2); }; #endif