/** @file CbmStsModule.h ** @author Volker Friese ** @date 14.05.2013 **/ #ifndef CBMSTSMODULE_H #define CBMSTSMODULE_H 1 #include #include #include "TNamed.h" #include "CbmStsElement.h" #include "CbmStsSenzor.h" class TGeoPhysicalNode; class CbmStsDigi; using namespace std; /** @class CbmStsModule ** @brief Class representing an instance of a readout unit in the CBM-STS. ** @author V.Friese ** @version 1.0 ** ** The StsModule is the read-out unit in the CBM STS. It consists of one ** sensor or two or more daisy-chained sensors (CbmStsSensor), the analogue ** cable and the read-out electronics. ** ** The module receives and stores the analogue signals from the sensor(s) ** in a buffer. It takes care of interference of signals in one and the ** same channel (two signals arriving within a given dead time). ** The module digitises the analogue signals and sends them to the ** CbmDaq when appropriate. **/ class CbmStsModule : public CbmStsElement { public: /** Default constructor **/ CbmStsModule(); /** Standard constructor ** @param name Name ** @param title Title ** @param node Pointer to relevant TGeoPhysicalNode */ CbmStsModule(const char* name, const char* title, TGeoPhysicalNode* node = NULL); /** Destructor **/ virtual ~CbmStsModule(); /** Add daughter element (from base class) ** @param element Pointer to element to be added as daughter. **/ //virtual void AddDaughter(CbmStsElement* element); /** Add a sensor to the module ** @param sensor Pointer to sensor object **/ void AddSensor(CbmStsSenzor* sensor); /** Add an analogue signal to the buffer * * @param channel channel number * @param time time of signal [ns] * @param charge analogue charge [e] * * The signal will be added to the buffer. Interference with * previous signals within the same channels is checked and the * proper action is executed. */ void AddSignal(Int_t channel, Double_t time, Double_t charge); private: Double_t fDynRange; // dynamic range [e] Double_t fThreshold; // threshold [e] Int_t fNofAdcChannels; // Number of ADC channels vector fSensors; ///< Array of sensors // TODO: Unify inherited array and private array /** Buffer for the analogue signals **/ map > fBuffer; /** Create a digi from a charge signal ** @param channel Module readout channel number ** @param charge Analogue charge [e] ** @param time Absolute signal time [ns] ** @return Pointer to new digi **/ CbmStsDigi* CreateDigi(Int_t channel, Double_t charge, Double_t time); CbmStsModule(const CbmStsModule&); CbmStsModule& operator=(const CbmStsModule&); ClassDef(CbmStsModule,1); }; #endif /* CBMSTSMODULE_H */