#ifndef ALITRDFEEPARAM_H
#define ALITRDFEEPARAM_H
#include <TObject.h>
class TRootIoCtor;
class AliTRDCommonParam;
class AliTRDpadPlane;
class AliTRDgeometry;
class AliTRDfeeParam : public TObject
{
public:
AliTRDfeeParam(TRootIoCtor *);
AliTRDfeeParam(const AliTRDfeeParam &p);
virtual ~AliTRDfeeParam();
AliTRDfeeParam &operator=(const AliTRDfeeParam &p);
virtual void Copy(TObject &p) const;
static AliTRDfeeParam *Instance();
static void Terminate();
virtual Int_t GetPadRowFromMCM(Int_t irob, Int_t imcm) const;
virtual Int_t GetPadColFromADC(Int_t irob, Int_t imcm, Int_t iadc) const;
virtual Int_t GetExtendedPadColFromADC(Int_t irob, Int_t imcm, Int_t iadc) const;
virtual Int_t GetMCMfromPad(Int_t irow, Int_t icol) const;
virtual Int_t GetMCMfromSharedPad(Int_t irow, Int_t icol) const;
virtual Int_t GetROBfromPad(Int_t irow, Int_t icol) const;
virtual Int_t GetROBfromSharedPad(Int_t irow, Int_t icol) const;
virtual Int_t GetRobSide(Int_t irob) const;
virtual Int_t GetColSide(Int_t icol) const;
static UInt_t AliToExtAli(Int_t rob, Int_t aliid);
static Int_t ExtAliToAli( UInt_t dest, UShort_t linkpair, UShort_t rocType, Int_t *list, Int_t listSize);
static Short_t ChipmaskToMCMlist( UInt_t cmA, UInt_t cmB, UShort_t linkpair, Int_t *mcmList, Int_t listSize );
static Short_t GetRobAB( UShort_t robsel, UShort_t linkpair );
static Float_t GetSamplingFrequency() { return (Float_t)fgkLHCfrequency / 4000000.0; }
static Int_t GetNmcmRob() { return fgkNmcmRob; }
static Int_t GetNmcmRobInRow() { return fgkNmcmRobInRow; }
static Int_t GetNmcmRobInCol() { return fgkNmcmRobInCol; }
static Int_t GetNrobC0() { return fgkNrobC0; }
static Int_t GetNrobC1() { return fgkNrobC1; }
static Int_t GetNadcMcm() { return fgkNadcMcm; }
static Int_t GetNcol() { return fgkNcol; }
static Int_t GetNcolMcm() { return fgkNcolMcm; }
static Int_t GetNrowC0() { return fgkNrowC0; }
static Int_t GetNrowC1() { return fgkNrowC1; }
Bool_t GetTracklet() const { return fgTracklet; }
static void SetTracklet(Bool_t trackletSim = kTRUE) { fgTracklet = trackletSim; }
Int_t GetRAWversion() const { return fRAWversion; }
void SetRAWversion( Int_t rawver );
protected:
static AliTRDfeeParam *fgInstance;
static Bool_t fgTerminated;
AliTRDCommonParam *fCP;
static const Int_t fgkLHCfrequency = 40079000 ;
static const Int_t fgkNmcmRob = 16;
static const Int_t fgkNmcmRobInRow = 4;
static const Int_t fgkNmcmRobInCol = 4;
static const Int_t fgkNrobC0 = 6;
static const Int_t fgkNrobC1 = 8;
static const Int_t fgkNadcMcm = 21;
static const Int_t fgkNcol = 144;
static const Int_t fgkNcolMcm = 18;
static const Int_t fgkNrowC0 = 12;
static const Int_t fgkNrowC1 = 16;
static Bool_t fgTracklet;
Int_t fRAWversion;
static const Int_t fgkMaxRAWversion = 3;
private:
AliTRDfeeParam();
ClassDef(AliTRDfeeParam,4)
};
#endif