// ------------------------------------------------------------------------- // ----- CbmMvdSensor header file ----- // ----- Created 02/12/08 by M. Deveaux ----- // ------------------------------------------------------------------------- /** CbmMvdSensor.h *@author M.Deveaux ** ** Auxiliary class for the CbmMvdDigitise class. ** It holds the parameters of one MVD station and an array of its MvdPoints. **/ #ifndef CBMMVDSENSOR_H #define CBMMVDSENSOR_H 1 #include #include "TNamed.h" #include "TString.h" #include "CbmMvdSensorDataSheet.h" #include "TGeoMatrix.h" #include "TGeoVolume.h" #include "TGeoBBox.h" #include "TClonesArray.h" #include "TObjArray.h" using std::vector; // data classes class CbmMvdPoint; class CbmMvdSensorData; class CbmMvdSensorBuffer; class CbmMvdSensorPlugin; class CbmMvdSensorTask; class CbmMvdSensor : public TNamed { public: /** Default constructor **/ CbmMvdSensor(); CbmMvdSensor(const char* name, CbmMvdSensorDataSheet* dataSheet, TString volName, TString nodeName, Int_t stationNr, Int_t volumeId, Double_t sensorStartTime); /** Destructor **/ virtual ~CbmMvdSensor(); /** Accessors **/ Int_t GetStationNr() const { return fStationNr; } Int_t GetVolumeId() const { return fVolumeId; } Int_t GetDetectorID() const { return -2;}; Double_t GetDX(){return fShape->GetDX();}; Double_t GetDY(){return fShape->GetDY();}; Double_t GetDZ(){return fShape->GetDZ();}; Double_t GetX(); Double_t GetY(); Double_t GetZ(); TString GetNodeName() {return fNodeName;}; CbmMvdSensorDataSheet* GetDataSheet(){return fSensorData;} void SetDataSheet(CbmMvdSensorDataSheet* sheet){fSensorData = sheet;} /** Coordinate transformations **/ void LocalToTop (Double_t* local, Double_t* lab); void TopToLocal (Double_t* lab, Double_t* local); void LocalToPixel (Double_t* local, Int_t &pixelNumberX, Int_t &pixelNumberY); void PixelToLocal (Int_t pixelNumberX, Int_t pixelNumberY, Double_t* local); void PixelToTop (Int_t pixelNumberX, Int_t pixelNumberY, Double_t* lab); void TopToPixel (Double_t* lab, Int_t &pixelNumberX, Int_t &pixelNumberY); Int_t GetFrameNumber (Int_t pixelNumberY, Double_t absoluteTime); void SetAlignment(TGeoHMatrix* alignmentMatrix); TGeoHMatrix* GetAlignmentCorr(){return fAlignmentCorr;}; /** Initialization tools **/ Int_t ReadSensorGeometry(TString volName, TString nodeName); void Init(); /** Plugin Controll */ void SetPluginList(TObjArray* pluginArray){fPluginArray=pluginArray;}; void AddPlugin(CbmMvdSensorPlugin* plugin){fPluginArray->AddLast((TObject*)plugin);}; CbmMvdSensorPlugin* GetPlugin(UInt_t nPlugin){(CbmMvdSensorPlugin*) fPluginArray->At(nPlugin);} /** Output to screen **/ virtual void Print(Option_t* opt="") const; /** Run control */ void ExecChain(); //runs chain of plugins void Exec(UInt_t nPlugin); //adds individual pluginList void Finish(); /** Data control */ void ClearInputArray(){;} void AddInputObject(TObject* dataObject); TClonesArray GetOutputArray(); TClonesArray GetOutputArray(UInt_t nPlugin); protected: Int_t fStationNr; // Station identifier Int_t fVolumeId; // MC unique volume ID TString fVolName; // Name of the volume attached to this sensor TString fNodeName; // full name of the volume (including path) of the volume /** Position of the sensor */ TGeoBBox* fShape; // volume corresponding to the sensor in the TGeoManager TGeoHMatrix* fMCMatrix; // coordinate transformation from Master to MC-Position of this volume TGeoHMatrix* fRecoMatrix; // The reconstructed position of the sensor TGeoHMatrix* fAlignmentCorr; // Correction of the sensor position according to alignment Double_t fTempCoordinate[3]; // Just a vector to buffer temporarily position data. Double_t fSensorPosition[3]; /** Technical data of the sensor */ CbmMvdSensorDataSheet* fSensorData; /** Plugins */ TObjArray* fPluginArray; /** Status of the sensor */ Double_t fSensorStartTime; // Defines the start time of the sensor // as expressed according to CBM time stamps // Unit: [s] ClassDef(CbmMvdSensor,1); }; #endif