// Author: //
// Ken Oyama (oyama@physi.uni-heidelberg.de) //
// //
+// many things now configured by AliTRDtrapConfig reflecting //
+// the real memory structure of the TRAP (Jochen) //
+// //
////////////////////////////////////////////////////////////////////////////
//#include <TMath.h>
AliTRDfeeParam::AliTRDfeeParam()
:TObject()
,fCP(0)
- ,fTFnExp(1)
- ,fTFr1(0)
- ,fTFr2(0)
- ,fTFc1(0)
- ,fTFc2(0)
- ,fEBsglIndThr(5)
- ,fEBsumIndThr(5)
- ,fEBindLUT(0xF0)
- ,fEBignoreNeighbour(0)
,fRAWversion(3)
- ,fRAWstoreRaw(kTRUE)
{
//
// Default constructor
//
- // PASA V.4
- if (fTFnExp == 1) {
- fTFr1 = 1.1563;
- fTFr2 = 0.1299;
- fTFc1 = 0.0657;
- fTFc2 = 0.0000;
- }
- else if (fTFnExp == 2) {
- fTFr1 = 1.1563;
- fTFr2 = 0.1299;
- fTFc1 = 0.1141;
- fTFc2 = 0.6241;
- }
-
fCP = AliTRDCommonParam::Instance();
-
}
//_____________________________________________________________________________
AliTRDfeeParam::AliTRDfeeParam(TRootIoCtor *)
:TObject()
,fCP(0)
- ,fTFnExp(1)
- ,fTFr1(0)
- ,fTFr2(0)
- ,fTFc1(0)
- ,fTFc2(0)
- ,fEBsglIndThr(0)
- ,fEBsumIndThr(0)
- ,fEBindLUT(0)
- ,fEBignoreNeighbour(0)
,fRAWversion(0)
- ,fRAWstoreRaw(0)
{
//
// IO constructor
AliTRDfeeParam::AliTRDfeeParam(const AliTRDfeeParam &p)
:TObject(p)
,fCP(p.fCP)
- ,fTFnExp(p.fTFnExp)
- ,fTFr1(p.fTFr1)
- ,fTFr2(p.fTFr2)
- ,fTFc1(p.fTFc1)
- ,fTFc2(p.fTFc2)
- ,fEBsglIndThr(p.fEBsglIndThr)
- ,fEBsumIndThr(p.fEBsumIndThr)
- ,fEBindLUT(p.fEBindLUT)
- ,fEBignoreNeighbour (p.fEBignoreNeighbour)
,fRAWversion(p.fRAWversion)
- ,fRAWstoreRaw(p.fRAWstoreRaw)
{
//
// AliTRDfeeParam copy constructor
//
((AliTRDfeeParam &) p).fCP = fCP;
- ((AliTRDfeeParam &) p).fTFnExp = fTFnExp;
- ((AliTRDfeeParam &) p).fTFr1 = fTFr1;
- ((AliTRDfeeParam &) p).fTFr2 = fTFr2;
- ((AliTRDfeeParam &) p).fTFc1 = fTFc1;
- ((AliTRDfeeParam &) p).fTFc2 = fTFc2;
- ((AliTRDfeeParam &) p).fEBsglIndThr = fEBsglIndThr;
- ((AliTRDfeeParam &) p).fEBsumIndThr = fEBsumIndThr;
- ((AliTRDfeeParam &) p).fEBindLUT = fEBindLUT;
- ((AliTRDfeeParam &) p).fEBignoreNeighbour = fEBignoreNeighbour;
((AliTRDfeeParam &) p).fRAWversion = fRAWversion;
- ((AliTRDfeeParam &) p).fRAWstoreRaw = fRAWstoreRaw;
TObject::Copy(p);
}
-
-
-//_____________________________________________________________________________
-//void AliTRDfeeParam::GetFilterParam( Float_t &r1, Float_t &r2, Float_t &c1
-// , Float_t &c2, Float_t &ped ) const
-//{
- //
- // Return current filter parameter
- //
-
- // r1 = fR1;
- //r2 = fR2;
- //c1 = fC1;
- //c2 = fC2;
- //ped = fPedestal;
-//};
-
-//_____________________________________________________________________________
-void AliTRDfeeParam::SetEBsglIndThr(Int_t val)
-{
- //
- // Set Event Buffer Sngle Indicator Threshold (EBIS in TRAP conf).
- // Timebin is indicated if ADC value >= val.
- //
-
- if( val >= 0 && val <= 1023 ) {
- fEBsglIndThr = val;
- } else {
- AliError(Form("EBsglIndThr value %d is out of range, keep previously set value (%d).",
- val, fEBsglIndThr));
- }
-
-}
-
-//_____________________________________________________________________________
-void AliTRDfeeParam::SetEBsumIndThr(Int_t val)
-{
- //
- // Set Event Buffer Sum Indicator Threshold (EBIT in TRAP conf).
- // Timebin is indicated if ADC sum value >= val.
- //
-
- if( val >= 0 && val <= 4095 ) {
- fEBsumIndThr = val;
- }
- else {
- AliError(Form("EBsumIndThr value %d is out of range, keep previously set value (%d).",
- val, fEBsumIndThr));
- }
-
-}
-
-//_____________________________________________________________________________
-void AliTRDfeeParam::SetEBindLUT(Int_t val)
-{
- //
- // Set Event Buffer Indicator Look-Up Table (EBIL in TRAP conf).
- // 8 bits value forms lookup table for combination of three criterions.
- //
-
- if( val >= 0 && val <= 255 ) {
- fEBindLUT = val;
- }
- else {
- AliError(Form("EBindLUT value %d is out of range, keep previously set value (%d).",
- val, fEBindLUT));
- }
-
-}
-
-//_____________________________________________________________________________
-void AliTRDfeeParam::SetEBignoreNeighbour(Int_t val)
-{
- //
- // Set Event Buffer Indicator Neighbor Sensitivity. (EBIN in TRAP conf).
- // If 0, take account of neigbor's values.
- //
-
- if( val >= 0 && val <= 1 ) {
- fEBignoreNeighbour = val;
- }
- else {
- AliError(Form("EBignoreNeighbour value %d is out of range, keep previously set value (%d).",
- val, fEBignoreNeighbour));
- }
-}
-
//_____________________________________________________________________________
void AliTRDfeeParam::SetRAWversion( Int_t rawver )
{
}
}
-
-//_____________________________________________________________________________
-void AliTRDfeeParam::SetXenon()
-{
- //
- // Sets the filter parameters for the Xenon gas mixture
- //
-
- fTFnExp = 1;
- fTFr1 = 1.1563;
- fTFr2 = 0.1299;
- fTFc1 = 0.0657;
- fTFc2 = 0.0000;
-
-}
-
-//_____________________________________________________________________________
-void AliTRDfeeParam::SetArgon()
-{
- //
- // Sets the filter parameters for the Argon gas mixture
- //
-
- fTFnExp = 2;
- fTFr1 = 6.0;
- fTFr2 = 0.62;
- fTFc1 = 0.0087;
- fTFc2 = 0.07;
-
-}
-
-
// Author: //
// Ken Oyama (oyama@physi.uni-heidelberg.de) //
// //
+// many things now configured by AliTRDtrapConfig reflecting //
+// the real memory structure of the TRAP (Jochen) //
+// //
////////////////////////////////////////////////////////////////////////////
#include <TObject.h>
virtual Int_t GetRobSide(Int_t irob) const;
virtual Int_t GetColSide(Int_t icol) const;
+ // SCSN-related
static UInt_t AliToExtAli(Int_t rob, Int_t aliid); // Converts the MCM-ROB combination to the extended MCM ALICE ID (used to address MCMs on the SCSN Bus)
static Int_t ExtAliToAli( UInt_t dest, UShort_t linkpair, UShort_t rocType, Int_t *list, Int_t listSize); // translates an extended MCM ALICE ID to a list of MCMs
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 ); // Returns the chamber side (A=0, B=0) of a ROB
+ // geometry
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 GetNrobC0() { return fgkNrobC0; }
static Int_t GetNrobC1() { return fgkNrobC1; }
static Int_t GetNadcMcm() { return fgkNadcMcm; }
- // static Int_t GetNtimebin() { return fgkNtimebin; }
static Int_t GetNcol() { return fgkNcol; }
static Int_t GetNcolMcm() { return fgkNcolMcm; }
static Int_t GetNrowC0() { return fgkNrowC0; }
static Int_t GetNrowC1() { return fgkNrowC1; }
- // static Int_t GetADCpedestal() { return fgkADCpedestal; }
- // static Int_t GetADCnoise() { return fgkADCnoise; }
- static Int_t GetADCDAC() { return fgkADCDAC; }
-
- static Bool_t IsPFon() { return fgkPFon; }
- static Bool_t IsGFon() { return fgkGFon; }
- static Bool_t IsTFon() { return fgkTFon; }
-
- static Int_t GetPFtimeConstant() { return fgkPFtimeConstant; }
- static Int_t GetPFeffectPedestal() { return fgkPFeffectPedestal; }
-
- //new
- static Int_t GetQacc0Start() { return fgkPREPqAcc0Start; }
- static Int_t GetQacc0End() { return fgkPREPqAcc0End; }
- static Int_t GetQacc1Start() { return fgkPREPqAcc1Start; }
- static Int_t GetQacc1End() { return fgkPREPqAcc1End; }
- Float_t GetMinClusterCharge() const { return fgkMinClusterCharge; }
- static Int_t GetLinearFitStart() { return fgkPREPLinearFitStart; }
- static Int_t GetLinearFitEnd() { return fgkPREPLinearFitEnd; }
-
- // Float_t GetClusThr() { return fClusThr; };
- // Float_t GetPadThr() const { return fPadThr; };
- // Int_t GetTailCancelation() const { return fTCOn; };
- // Int_t GetNexponential() const { return fTCnexp; };
- //virtual void GetFilterParam(Float_t &r1, Float_t &r2, Float_t &c1, Float_t &c2, Float_t &ped) const;
- // Int_t GetFilterType() const { return fFilterType; };
-
- static Int_t GetTFtype() { return fgkTFtype; }
- //static Int_t GetTFnExp() { return fgkTFnExp; }
- Int_t GetTFnExp() const { return fTFnExp; }
- Float_t GetTFr1() const { return fTFr1; }
- Float_t GetTFr2() const { return fTFr2; }
- Float_t GetTFc1() const { return fTFc1; }
- Float_t GetTFc2() const { return fTFc2; }
-
- // for tracklets
+ // tracklet simulation
Bool_t GetTracklet() const { return fgTracklet; }
static void SetTracklet(Bool_t trackletSim = kTRUE) { fgTracklet = trackletSim; }
- Int_t GetMaxNrOfTracklets() const { return fgkMaxNrOfTracklets; }
- Bool_t GetMCTrackletOutput() const { return fgkMCTrackletOutput; }
-
- static Float_t GetTFattPar() { return ((Float_t) fgkTFattPar1) / ((Float_t) fgkTFattPar2); }
- Float_t GetTFf0() const { return 1.0 + fgkTFon*(-1.0+GetTFattPar()); } // 1 if TC off
-
- void SetEBsglIndThr(Int_t val);
- Int_t GetEBsglIndThr() const { return fEBsglIndThr; }
-
- void SetEBsumIndThr(Int_t val);
- Int_t GetEBsumIndThr() const { return fEBsumIndThr; }
-
- void SetEBindLUT(Int_t val);
- Int_t GetEBindLUT() const { return fEBindLUT; }
-
- void SetEBignoreNeighbour(Int_t val);
- Int_t GetEBignoreNeighbour() const { return fEBignoreNeighbour; }
// Concerning raw data format
Int_t GetRAWversion() const { return fRAWversion; }
void SetRAWversion( Int_t rawver );
- Bool_t GetRAWstoreRaw() const { return fRAWstoreRaw; }
- void SetRAWstoreRaw( Bool_t storeraw ) { fRAWstoreRaw = storeraw; }
-
- void SetXenon();
- void SetArgon();
protected:
static const Int_t fgkNrobC0 = 6; // Number of ROBs per C0 chamber (old fgkROBmaxC0)
static const Int_t fgkNrobC1 = 8; // Number of ROBs per C1 chamber (old fgkROBmaxC1)
static const Int_t fgkNadcMcm = 21; // Number of ADC channels per MCM (old fgkADCmax)
- // static const Int_t fgkNtimebin = 24; // Number of Time bins should come from calibDB
static const Int_t fgkNcol = 144; // Number of pads per padplane row(old fgkColmax)
static const Int_t fgkNcolMcm = 18; // Number of pads per MCM (old fgkPadmax)
static const Int_t fgkNrowC0 = 12; // Number of Rows per C0 chamber (old fgkRowmaxC0)
static const Int_t fgkNrowC1 = 16; // Number of Rows per C1 chamber (old fgkRowmaxC1)
- // ADC intrinsic parameters
- static const Int_t fgkADCDAC = 0; // 5 bit ADC gain parameter
-
- // TRAP filter global setup
- static const Bool_t fgkPFon = kTRUE; // Pedestal Filter enable/disable flag.
- static const Bool_t fgkGFon = kFALSE; // Gain correction Filter enable/disable flag
- static const Bool_t fgkTFon = kTRUE; // Tail cancelation Filter enable/disable flag (old name fTCOn)
-
- // PF setup
- static const Int_t fgkPFtimeConstant = 0; // 0 for fastest, 3 for slowest (no effect, probably)
- static const Int_t fgkPFeffectPedestal = 10; // [in ADC units] the desired baseline (Additive)
-
- // GF setup
- static const Int_t fgkGFnoise = 0; // Noise level increased by gain filter x 100 [in ADC] (to be measured)
-
- // TF setup
- static const Int_t fgkTFtype = 1; // TC type (0=analog, 1=digital, 2=MI, 3=close to electronics) (old name fFilterType)
-
- // OLD TF setup (calculated from above) (valid only for fgkTFsimType = 0 or 1)
- //static const Int_t fgkTFnExp = 1; // Number of exponential for simType 0 and 1
- Int_t fTFnExp; // Number of exponential for simType 0 and 1
-
// Tracklet processing on/off
static Bool_t fgTracklet; // tracklet processing
- static const Int_t fgkMaxNrOfTracklets = 4; // Max. nr of tracklet words for one mcm
-
- // additional tracklet folder structure output,
- // containing all necessary Monte Carlo information; maybe this should go somewhere else;
- static const Bool_t fgkMCTrackletOutput = kTRUE; // Default should be kTRUE
-
- // following need Instance because initialized in constructor
- Float_t fTFr1; // Time constant [us] long (old name fR1)
- Float_t fTFr2; // Time constant [us] short(old name fR2)
- Float_t fTFc1; // Weight long (old name fC1)
- Float_t fTFc2; // Weight short (old name fC2)
-
- // here is for TRAP simulation (not yet used)
- static const Int_t fgkTFdecayWeightL = 270; // 0 to 1024 corresponds to 0 to 0.5
- static const Int_t fgkTFdecayParL = 348; // 0 to 511 corresponds to 0.75 to 1
- static const Int_t fgkTFdecayParS = 449; // 0 to 511 correponds to 0.25 to 0.5
- static const Int_t fgkTFattPar1 = 45; // attenuationParameter = fgkTFattenuationParameter1/fgkTFattenuationParameter2
- static const Int_t fgkTFattPar2 = 14; // = -alphaL/ln(lambdaL)-(1-alphaL)/ln(lambdaS)
-
- // ZS parameters
- Int_t fEBsglIndThr; // EBIS in ADC units
- Int_t fEBsumIndThr; // EBIT in ADC units
- Int_t fEBindLUT; // EBIL lookup table
- Int_t fEBignoreNeighbour; // EBIN 0:include neighbor
-
- // Charge accumulators
- static const Int_t fgkPREPqAcc0Start = 5; // Preprocessor Charge Accumulator 0 Start
- static const Int_t fgkPREPqAcc0End = 10; // Preprocessor Charge Accumulator 0 End
- static const Int_t fgkPREPqAcc1Start = 11; // Preprocessor Charge Accumulator 1 Start
- static const Int_t fgkPREPqAcc1End = 20; // Preprocessor Charge Accumulator 1 End
- static const Int_t fgkMinClusterCharge = 20; // Hit detection [in ADC units]
-
- //new
- static const Int_t fgkPREPLinearFitStart = 5; // Time constants for linear fit
- static const Int_t fgkPREPLinearFitEnd = 20; // Time constants for linear fit
-
- // OLD TRAP processing parameters calculated from above
- //static const Float_t fClusThr; // Cluster threshold
- //static const Float_t fPadThr; // Pad threshold
-
// For raw production
Int_t fRAWversion; // Raw data production version
static const Int_t fgkMaxRAWversion = 3; // Maximum raw version number supported
- Bool_t fRAWstoreRaw; // Store unfiltered data for raw data stream
private:
AliTRDfeeParam();
- ClassDef(AliTRDfeeParam,3) // The TRD front end electronics parameter
+ ClassDef(AliTRDfeeParam,4) // The TRD front end electronics parameter
};
#endif