From b43a3e179472b2e50be8fb654722a2dcab543b32 Mon Sep 17 00:00:00 2001 From: cblume Date: Tue, 30 Jan 2007 13:19:11 +0000 Subject: [PATCH] Move sampling frequency to common params --- TRD/AliTRDCalibra.cxx | 16 +++-- TRD/AliTRDCommonParam.cxx | 10 ++- TRD/AliTRDCommonParam.h | 21 +++--- TRD/AliTRDSimParam.cxx | 40 +++++------ TRD/AliTRDSimParam.h | 124 +++++++++++++++++------------------ TRD/AliTRDcalibDB.cxx | 17 ----- TRD/AliTRDcalibDB.h | 38 ++++++----- TRD/AliTRDclusterizer.cxx | 14 +++- TRD/AliTRDdigitizer.cxx | 6 +- TRD/AliTRDmcmTracklet.cxx | 2 +- TRD/AliTRDtracker.cxx | 2 +- TRD/Cal/AliTRDCalGlobals.cxx | 4 +- TRD/Cal/AliTRDCalGlobals.h | 8 +-- 13 files changed, 154 insertions(+), 148 deletions(-) diff --git a/TRD/AliTRDCalibra.cxx b/TRD/AliTRDCalibra.cxx index 94507ea95f8..658cd0fed06 100644 --- a/TRD/AliTRDCalibra.cxx +++ b/TRD/AliTRDCalibra.cxx @@ -1825,15 +1825,20 @@ Bool_t AliTRDCalibra::Init2Dhistos() // DB Setting // Get cal - AliTRDcalibDB *cal = AliTRDcalibDB::Instance(); + AliTRDcalibDB *cal = AliTRDcalibDB::Instance(); if (!cal) { AliInfo("Could not get calibDB"); return kFALSE; } + AliTRDCommonParam *parCom = AliTRDCommonParam::Instance(); + if (!parCom) { + AliInfo("Could not get CommonParam"); + return kFALSE; + } // Some parameters fTimeMax = cal->GetNumberOfTimeBins(); - fSf = cal->GetSamplingFrequency(); + fSf = parCom->GetSamplingFrequency(); if (fRelativeScaleAuto) { fRelativeScale = 0; } @@ -2520,9 +2525,6 @@ Bool_t AliTRDCalibra::IsPadOn(Int_t detector, Int_t col, Int_t row) const return kFALSE; } - Int_t npads = 18; - Int_t colmcm = (Int_t) col / npads; - if (!cal->IsChamberInstalled(detector) || cal->IsChamberMasked(detector) || cal->IsPadMasked(detector,col,row)) { @@ -3216,7 +3218,7 @@ Bool_t AliTRDCalibra::Create2DDiSimOnline(Int_t iev1, Int_t iev2) // Some parameters fTimeMax = cal->GetNumberOfTimeBins(); - fSf = (Float_t) cal->GetSamplingFrequency(); + fSf = (Float_t) parCom->GetSamplingFrequency(); if (fRelativeScaleAuto) { fRelativeScale = 0; } @@ -3523,7 +3525,7 @@ Bool_t AliTRDCalibra::Create2DRaDaOnline(Int_t iev1, Int_t iev2) // Some parameters fTimeMax = cal->GetNumberOfTimeBins(); - fSf = (Float_t) cal->GetSamplingFrequency(); + fSf = (Float_t) parCom->GetSamplingFrequency(); if (fRelativeScaleAuto) { fRelativeScale = 0; } diff --git a/TRD/AliTRDCommonParam.cxx b/TRD/AliTRDCommonParam.cxx index da3e6b56b2e..aa025f39305 100644 --- a/TRD/AliTRDCommonParam.cxx +++ b/TRD/AliTRDCommonParam.cxx @@ -81,6 +81,7 @@ void AliTRDCommonParam::Terminate() AliTRDCommonParam::AliTRDCommonParam() :TObject() ,fExBOn(kFALSE) + ,fSamplingFrequency(0.0) ,fPadPlaneArray(0) { // @@ -99,7 +100,10 @@ void AliTRDCommonParam::Init() // // E x B effects - fExBOn = kTRUE; + fExBOn = kTRUE; + + // Sampling Frequency in MHz + fSamplingFrequency = 10.0; // ---------------------------------------------------------------------------- // The pad planes @@ -135,6 +139,7 @@ AliTRDCommonParam::~AliTRDCommonParam() AliTRDCommonParam::AliTRDCommonParam(const AliTRDCommonParam &p) :TObject(p) ,fExBOn(p.fExBOn) + ,fSamplingFrequency(p.fSamplingFrequency) ,fPadPlaneArray(0) { // @@ -170,7 +175,8 @@ void AliTRDCommonParam::Copy(TObject &p) const return; } - target->fExBOn = fExBOn; + target->fExBOn = fExBOn; + target->fSamplingFrequency = fSamplingFrequency; } diff --git a/TRD/AliTRDCommonParam.h b/TRD/AliTRDCommonParam.h index 02a448ffbd0..34789af7498 100644 --- a/TRD/AliTRDCommonParam.h +++ b/TRD/AliTRDCommonParam.h @@ -31,34 +31,37 @@ class AliTRDCommonParam : public TObject virtual void Copy(TObject &p) const; - void SetExB(Int_t exbOn = 1) { fExBOn = exbOn; }; + void SetExB(Int_t exbOn = 1) { fExBOn = exbOn; } + void SetSamplingFrequency(Float_t freq) { fSamplingFrequency = freq; } - Bool_t ExBOn() const { return fExBOn; }; + Bool_t ExBOn() const { return fExBOn; } AliTRDpadPlane *GetPadPlane(Int_t p, Int_t c) const; Int_t GetRowMax(Int_t p, Int_t c, Int_t /*s*/) const; Int_t GetColMax(Int_t p) const; Double_t GetRow0(Int_t p, Int_t c, Int_t /*s*/) const; Double_t GetCol0(Int_t p) const; - + Float_t GetSamplingFrequency() const { return fSamplingFrequency; } + protected: - static AliTRDCommonParam *fgInstance; // Instance of this class (singleton implementation) - static Bool_t fgTerminated; // Defines if this class has already been terminated + static AliTRDCommonParam *fgInstance; // Instance of this class (singleton implementation) + static Bool_t fgTerminated; // Defines if this class has already been terminated void Init(); - Int_t fExBOn; // Switch for the ExB effects + Int_t fExBOn; // Switch for the ExB effects + + Float_t fSamplingFrequency; // Sampling Frequency in MHz - TObjArray *fPadPlaneArray; //! Array of pad plane objects + TObjArray *fPadPlaneArray; //! Array of pad plane objects private: // This is a singleton, constructor is private! AliTRDCommonParam(); - ClassDef(AliTRDCommonParam,2) // The constant parameters common to simulation and reconstruction - + ClassDef(AliTRDCommonParam,3) // The constant parameters common to simulation and reconstruction }; #endif diff --git a/TRD/AliTRDSimParam.cxx b/TRD/AliTRDSimParam.cxx index 41b7b0bf51a..ff89e4947c3 100644 --- a/TRD/AliTRDSimParam.cxx +++ b/TRD/AliTRDSimParam.cxx @@ -117,43 +117,43 @@ void AliTRDSimParam::Init() // // The default parameter for the digitization - fGasGain = 4000.0; - fChipGain = 12.4; - fNoise = 1000.0; - fADCoutRange = 1023.0; // 10-bit ADC - fADCinRange = 2000.0; // 2V input range - fADCthreshold = 3; - fADCbaseline = 0; + fGasGain = 4000.0; + fChipGain = 12.4; + fNoise = 1000.0; + fADCoutRange = 1023.0; // 10-bit ADC + fADCinRange = 2000.0; // 2V input range + fADCthreshold = 3; + fADCbaseline = 0; // Diffusion on - fDiffusionOn = kTRUE; + fDiffusionOn = kTRUE; // Propability for electron attachment - fElAttachOn = kFALSE; - fElAttachProp = 0.0; + fElAttachOn = kFALSE; + fElAttachProp = 0.0; // The time response function - fTRFOn = kTRUE; + fTRFOn = kTRUE; // The cross talk - fCTOn = kTRUE; + fCTOn = kTRUE; // The pad coupling factor // Use 0.46, instead of the theroetical value 0.3, since it reproduces better // the test beam data, even tough it is not understood why. - fPadCoupling = 0.46; + fPadCoupling = 0.46; // The time coupling factor (same number as for the TPC) - fTimeCoupling = 0.4; + fTimeCoupling = 0.4; // Distance of first Anode wire from first pad edge - fAnodeWireOffset = 0.25; + fAnodeWireOffset = 0.25; // Use drift time maps - fTimeStructOn = kTRUE; + fTimeStructOn = kTRUE; // The pad response function - fPRFOn = kTRUE; + fPRFOn = kTRUE; ReInit(); @@ -236,7 +236,9 @@ AliTRDSimParam &AliTRDSimParam::operator=(const AliTRDSimParam &p) // Assignment operator // - if (this != &p) ((AliTRDSimParam &) p).Copy(*this); + if (this != &p) { + ((AliTRDSimParam &) p).Copy(*this); + } return *this; @@ -249,7 +251,7 @@ void AliTRDSimParam::Copy(TObject &p) const // Copy function // - AliTRDSimParam* target = dynamic_cast (&p); + AliTRDSimParam *target = dynamic_cast (&p); if (!target) { return; } diff --git a/TRD/AliTRDSimParam.h b/TRD/AliTRDSimParam.h index 6b2d173259c..eb6d047173b 100644 --- a/TRD/AliTRDSimParam.h +++ b/TRD/AliTRDSimParam.h @@ -30,85 +30,85 @@ class AliTRDSimParam : public TObject { virtual void Copy(TObject &p) const; - void SetGasGain(Float_t gasgain) { fGasGain = gasgain; } - void SetNoise(Float_t noise) { fNoise = noise; } - void SetChipGain(Float_t chipgain) { fChipGain = chipgain; } - void SetADCoutRange(Float_t range) { fADCoutRange = range; } - void SetADCinRange(Float_t range) { fADCinRange = range; } - void SetADCthreshold(Int_t thresh) { fADCthreshold = thresh; } - void SetADCbaseline(Int_t basel) { fADCbaseline = basel; } - void SetDiffusion(Int_t diffOn = 1) { fDiffusionOn = diffOn; } - void SetElAttach(Int_t elOn = 1) { fElAttachOn = elOn; } - void SetElAttachProp(Float_t prop) { fElAttachProp = prop; } - void SetTimeResponse(Int_t trfOn = 1) { fTRFOn = trfOn; ReInit(); } - void SetCrossTalk(Int_t ctOn = 1) { fCTOn = ctOn; ReInit(); } - void SetPadCoupling(Float_t v) { fPadCoupling = v; } - void SetTimeCoupling(Float_t v) { fTimeCoupling = v; } - void SetAnodeWireOffset(Float_t offset = 0.25) { fAnodeWireOffset = offset; } - void SetTimeStruct(Bool_t tsOn = 1) { fTimeStructOn = tsOn; } - void SetPadResponse(Int_t prfOn = 1) { fPRFOn = prfOn; } + void SetGasGain(Float_t gasgain) { fGasGain = gasgain; } + void SetNoise(Float_t noise) { fNoise = noise; } + void SetChipGain(Float_t chipgain) { fChipGain = chipgain; } + void SetADCoutRange(Float_t range) { fADCoutRange = range; } + void SetADCinRange(Float_t range) { fADCinRange = range; } + void SetADCthreshold(Int_t thresh) { fADCthreshold = thresh; } + void SetADCbaseline(Int_t basel) { fADCbaseline = basel; } + void SetDiffusion(Int_t diffOn = 1) { fDiffusionOn = diffOn; } + void SetElAttach(Int_t elOn = 1) { fElAttachOn = elOn; } + void SetElAttachProp(Float_t prop) { fElAttachProp = prop; } + void SetTimeResponse(Int_t trfOn = 1) { fTRFOn = trfOn; ReInit(); } + void SetCrossTalk(Int_t ctOn = 1) { fCTOn = ctOn; ReInit(); } + void SetPadCoupling(Float_t v) { fPadCoupling = v; } + void SetTimeCoupling(Float_t v) { fTimeCoupling = v; } + void SetAnodeWireOffset(Float_t offset = 0.25) { fAnodeWireOffset = offset; } + void SetTimeStruct(Bool_t tsOn = 1) { fTimeStructOn = tsOn; } + void SetPadResponse(Int_t prfOn = 1) { fPRFOn = prfOn; } - Float_t GetGasGain() const { return fGasGain; } - Float_t GetNoise() const { return fNoise; } - Float_t GetChipGain() const { return fChipGain; } - Float_t GetADCoutRange() const { return fADCoutRange; } - Float_t GetADCinRange() const { return fADCinRange; } - Int_t GetADCthreshold() const { return fADCthreshold; } - Int_t GetADCbaseline() const { return fADCbaseline; } - Float_t GetTRFlo() const { return fTRFlo; } - Float_t GetTRFhi() const { return fTRFhi; } - Float_t GetPadCoupling() const { return fPadCoupling; } - Float_t GetTimeCoupling() const { return fTimeCoupling; } - Float_t GetAnodeWireOffset() const { return fAnodeWireOffset; } + Float_t GetGasGain() const { return fGasGain; } + Float_t GetNoise() const { return fNoise; } + Float_t GetChipGain() const { return fChipGain; } + Float_t GetADCoutRange() const { return fADCoutRange; } + Float_t GetADCinRange() const { return fADCinRange; } + Int_t GetADCthreshold() const { return fADCthreshold; } + Int_t GetADCbaseline() const { return fADCbaseline; } + Float_t GetTRFlo() const { return fTRFlo; } + Float_t GetTRFhi() const { return fTRFhi; } + Float_t GetPadCoupling() const { return fPadCoupling; } + Float_t GetTimeCoupling() const { return fTimeCoupling; } + Float_t GetAnodeWireOffset() const { return fAnodeWireOffset; } - Bool_t DiffusionOn() const { return fDiffusionOn; } - Bool_t ElAttachOn() const { return fElAttachOn; } - Float_t GetElAttachProp() const { return fElAttachProp; } - Bool_t TRFOn() const { return fTRFOn; } - Bool_t CTOn() const { return fCTOn; } - Bool_t TimeStructOn() const { return fTimeStructOn; } - Bool_t PRFOn() const { return fPRFOn; } + Bool_t DiffusionOn() const { return fDiffusionOn; } + Bool_t ElAttachOn() const { return fElAttachOn; } + Float_t GetElAttachProp() const { return fElAttachProp; } + Bool_t TRFOn() const { return fTRFOn; } + Bool_t CTOn() const { return fCTOn; } + Bool_t TimeStructOn() const { return fTimeStructOn; } + Bool_t PRFOn() const { return fPRFOn; } Double_t TimeResponse(Double_t time) const; Double_t CrossTalk(Double_t time) const; protected: - static AliTRDSimParam* fgInstance; // Instance of this class (singleton implementation) - static Bool_t fgTerminated; // Defines if this class has already been terminated and - // therefore does not return instances in GetInstance anymore + static AliTRDSimParam* fgInstance; // Instance of this class (singleton implementation) + static Bool_t fgTerminated; // Defines if this class has already been terminated and + // therefore does not return instances in GetInstance anymore // Digitization parameter - Float_t fGasGain; // Gas gain - Float_t fNoise; // Electronics noise - Float_t fChipGain; // Electronics gain + Float_t fGasGain; // Gas gain + Float_t fNoise; // Electronics noise + Float_t fChipGain; // Electronics gain - Float_t fADCoutRange; // ADC output range (number of channels) - Float_t fADCinRange; // ADC input range (input charge) - Int_t fADCthreshold; // ADC threshold in ADC channel - Int_t fADCbaseline; // ADC baseline in ADC chann + Float_t fADCoutRange; // ADC output range (number of channels) + Float_t fADCinRange; // ADC input range (input charge) + Int_t fADCthreshold; // ADC threshold in ADC channel + Int_t fADCbaseline; // ADC baseline in ADC chann - Int_t fDiffusionOn; // Switch for the diffusion + Int_t fDiffusionOn; // Switch for the diffusion - Int_t fElAttachOn; // Switch for the electron attachment - Float_t fElAttachProp; // Propability for electron attachment (for 1m) + Int_t fElAttachOn; // Switch for the electron attachment + Float_t fElAttachProp; // Propability for electron attachment (for 1m) - Int_t fTRFOn; // Switch for the time response - Float_t *fTRFsmp; //! Integrated time response - Int_t fTRFbin; // Number of bins for the TRF - Float_t fTRFlo; // Lower boundary of the TRF - Float_t fTRFhi; // Higher boundary of the TRF - Float_t fTRFwid; // Bin width of the integrated TRF + Int_t fTRFOn; // Switch for the time response + Float_t *fTRFsmp; //! Integrated time response + Int_t fTRFbin; // Number of bins for the TRF + Float_t fTRFlo; // Lower boundary of the TRF + Float_t fTRFhi; // Higher boundary of the TRF + Float_t fTRFwid; // Bin width of the integrated TRF - Int_t fCTOn; // Switch for cross talk - Float_t *fCTsmp; //! Integrated cross talk + Int_t fCTOn; // Switch for cross talk + Float_t *fCTsmp; //! Integrated cross talk - Float_t fAnodeWireOffset; // Distance of first anode wire from pad edge - Float_t fPadCoupling; // Pad coupling factor - Float_t fTimeCoupling; // Time coupling factor (image charge of moving ions) - Int_t fTimeStructOn; // Switch for cell time structure + Float_t fAnodeWireOffset; // Distance of first anode wire from pad edge + Float_t fPadCoupling; // Pad coupling factor + Float_t fTimeCoupling; // Time coupling factor (image charge of moving ions) + Int_t fTimeStructOn; // Switch for cell time structure - Int_t fPRFOn; // Switch for the pad response + Int_t fPRFOn; // Switch for the pad response private: diff --git a/TRD/AliTRDcalibDB.cxx b/TRD/AliTRDcalibDB.cxx index 94247d67d9b..9d93f5626f6 100644 --- a/TRD/AliTRDcalibDB.cxx +++ b/TRD/AliTRDcalibDB.cxx @@ -485,23 +485,6 @@ Float_t AliTRDcalibDB::GetPRFWidth(Int_t det, Int_t col, Int_t row) return roc->GetValue(col,row); } - -//_____________________________________________________________________________ -Float_t AliTRDcalibDB::GetSamplingFrequency() -{ - // - // Returns the sampling frequency of the TRD read-out. - // - - const AliTRDCalGlobals *calGlobal = dynamic_cast - (GetCachedCDBObject(kIDGlobals)); - if (!calGlobal) { - return -1; - } - - return calGlobal->GetSamplingFrequency(); - -} //_____________________________________________________________________________ Int_t AliTRDcalibDB::GetNumberOfTimeBins() diff --git a/TRD/AliTRDcalibDB.h b/TRD/AliTRDcalibDB.h index a47481224cc..25e256cc78f 100644 --- a/TRD/AliTRDcalibDB.h +++ b/TRD/AliTRDcalibDB.h @@ -22,7 +22,10 @@ class AliTRDcalibDB : public TObject { public: - enum { kNplan = 6, kNcham = 5, kNsect = 18, kNdet = 540 }; + enum { kNplan = 6 + , kNcham = 5 + , kNsect = 18 + , kNdet = 540 }; static AliTRDcalibDB *Instance(); static void Terminate(); @@ -41,7 +44,6 @@ class AliTRDcalibDB : public TObject { Float_t GetPRFWidth(Int_t det, Int_t col, Int_t row); - Float_t GetSamplingFrequency(); Int_t GetNumberOfTimeBins(); Char_t GetPadStatus(Int_t det, Int_t col, Int_t row); @@ -59,29 +61,35 @@ class AliTRDcalibDB : public TObject { // Related functions, these depend on calibration data static Float_t GetOmegaTau(Float_t vdrift, Float_t bz); - - Int_t PadResponse(Double_t signal, Double_t dist, Int_t plane, Double_t *pad) const; + Int_t PadResponse(Double_t signal, Double_t dist, Int_t plane, Double_t *pad) const; protected: // For caching see also implentation of GetCachedCDBObject in the .cxx file enum { kCDBCacheSize = 15 }; // Number of cached objects - enum { kIDVdriftPad = 0, kIDVdriftChamber, - kIDT0Pad, kIDT0Chamber, - kIDGainFactorPad, kIDGainFactorChamber, - kIDPRFWidth, - kIDGlobals, - kIDChamberPos, kIDStackPos, kIDSuperModulePos, - kIDPIDLQ, kIDMonitoringData, - kIDChamberStatus, kIDPadStatus }; // IDs of cached objects + enum { kIDVdriftPad = 0 + , kIDVdriftChamber + , kIDT0Pad + , kIDT0Chamber + , kIDGainFactorPad + , kIDGainFactorChamber + , kIDPRFWidth + , kIDGlobals + , kIDChamberPos + , kIDStackPos + , kIDSuperModulePos + , kIDPIDLQ + , kIDMonitoringData + , kIDChamberStatus + , kIDPadStatus }; // IDs of cached objects const TObject* GetCachedCDBObject(Int_t id); void Invalidate(); void SamplePRF(); - AliCDBEntry *GetCDBEntry(const char* cdbPath); - const TObject *CacheCDBEntry(Int_t id, const char* cdbPath); + AliCDBEntry *GetCDBEntry(const Char_t *cdbPath); + const TObject *CacheCDBEntry(Int_t id, const Char_t *cdbPath); static AliTRDcalibDB *fgInstance; // Instance of this class (singleton implementation) static Bool_t fgTerminated; // Defines if this class has already been terminated @@ -105,7 +113,7 @@ class AliTRDcalibDB : public TObject { AliTRDcalibDB &operator=(const AliTRDcalibDB &c); virtual ~AliTRDcalibDB(); - ClassDef(AliTRDcalibDB,3) // Provides central access to the CDB + ClassDef(AliTRDcalibDB,3) // Provides central access to the CDB }; diff --git a/TRD/AliTRDclusterizer.cxx b/TRD/AliTRDclusterizer.cxx index 0ac9df259a5..305d477c0d9 100644 --- a/TRD/AliTRDclusterizer.cxx +++ b/TRD/AliTRDclusterizer.cxx @@ -35,6 +35,7 @@ #include "AliTRDrecPoint.h" #include "AliTRDgeometry.h" #include "AliTRDcalibDB.h" +#include "AliTRDCommonParam.h" ClassImp(AliTRDclusterizer) @@ -98,7 +99,9 @@ AliTRDclusterizer &AliTRDclusterizer::operator=(const AliTRDclusterizer &c) // Assignment operator // - if (this != &c) ((AliTRDclusterizer &) c).Copy(*this); + if (this != &c) { + ((AliTRDclusterizer &) c).Copy(*this); + } return *this; } @@ -308,15 +311,20 @@ Double_t AliTRDclusterizer::CalcXposFromTimebin(Float_t timebin, Int_t idet // depends on the drift velocity and t0 // - AliTRDcalibDB *calibration = AliTRDcalibDB::Instance(); + AliTRDcalibDB *calibration = AliTRDcalibDB::Instance(); if (!calibration) { AliError("Cannot find calibration object"); return -1; } + AliTRDCommonParam *parCom = AliTRDCommonParam::Instance(); + if (!parCom) { + AliError("Could not get common parameters\n"); + return kFALSE; + } Float_t vdrift = calibration->GetVdrift(idet,col,row); Float_t t0 = calibration->GetT0(idet,col,row); - Float_t samplingFrequency = calibration->GetSamplingFrequency(); + Float_t samplingFrequency = parCom->GetSamplingFrequency(); timebin -= t0; diff --git a/TRD/AliTRDdigitizer.cxx b/TRD/AliTRDdigitizer.cxx index 3d08b4e7faf..9343f64294b 100644 --- a/TRD/AliTRDdigitizer.cxx +++ b/TRD/AliTRDdigitizer.cxx @@ -769,7 +769,7 @@ Bool_t AliTRDdigitizer::MakeDigits() if (simParam->TRFOn()) { timeBinTRFend = ((Int_t) (simParam->GetTRFhi() - * calibration->GetSamplingFrequency())) - 1; + * commonParam->GetSamplingFrequency())) - 1; AliDebug(1,Form("Sample the TRF up to bin %d\n",timeBinTRFend)); } @@ -797,7 +797,7 @@ Bool_t AliTRDdigitizer::MakeDigits() // (Number of primary particles creating a hit somewhere) Int_t nTrack = (Int_t) hitTree->GetEntries(); AliDebug(1,Form("Found %d primary particles\n",nTrack)); - AliDebug(1,Form("Sampling = %.0fMHz\n" ,calibration->GetSamplingFrequency())); + AliDebug(1,Form("Sampling = %.0fMHz\n" ,commonParam->GetSamplingFrequency())); AliDebug(1,Form("Gain = %d\n" ,((Int_t) simParam->GetGasGain()))); AliDebug(1,Form("Noise = %d\n" ,((Int_t) simParam->GetNoise()))); if (simParam->TimeStructOn()) { @@ -811,7 +811,7 @@ Bool_t AliTRDdigitizer::MakeDigits() Int_t countHits = 0; Int_t nTimeTotal = calibration->GetNumberOfTimeBins(); - Float_t samplingRate = calibration->GetSamplingFrequency(); + Float_t samplingRate = commonParam->GetSamplingFrequency(); // Loop through all entries in the tree for (Int_t iTrack = 0; iTrack < nTrack; iTrack++) { diff --git a/TRD/AliTRDmcmTracklet.cxx b/TRD/AliTRDmcmTracklet.cxx index 7fce5f9fe3a..3b269e2f4c1 100644 --- a/TRD/AliTRDmcmTracklet.cxx +++ b/TRD/AliTRDmcmTracklet.cxx @@ -289,7 +289,7 @@ void AliTRDmcmTracklet::MakeTrackletGraph(AliTRDgeometry *geo, Float_t field) AliTRDpadPlane *padPlane = commonParam->GetPadPlane(iplan,icham); - Float_t samplFreq = calibration->GetSamplingFrequency(); + Float_t samplFreq = commonParam->GetSamplingFrequency(); Int_t time, col; Float_t amp[3]; diff --git a/TRD/AliTRDtracker.cxx b/TRD/AliTRDtracker.cxx index c7628e38391..ad08ceb6514 100644 --- a/TRD/AliTRDtracker.cxx +++ b/TRD/AliTRDtracker.cxx @@ -3061,7 +3061,7 @@ AliTRDtracker::AliTRDtrackingSector } dx = AliTRDcalibDB::Instance()->GetVdrift(0,0,0) - / AliTRDcalibDB::Instance()->GetSamplingFrequency(); + / commonParam->GetSamplingFrequency(); rho = 0.00295 * 0.85; //???? radLength = 11.0; diff --git a/TRD/Cal/AliTRDCalGlobals.cxx b/TRD/Cal/AliTRDCalGlobals.cxx index 01d9d712fe4..c2c3ed9d585 100644 --- a/TRD/Cal/AliTRDCalGlobals.cxx +++ b/TRD/Cal/AliTRDCalGlobals.cxx @@ -17,7 +17,7 @@ /////////////////////////////////////////////////////////////////////////////// // // -// TRD calibration class for global TRD parameters // +// TRD calibration class for global TRD parameters // // // /////////////////////////////////////////////////////////////////////////////// @@ -28,7 +28,6 @@ ClassImp(AliTRDCalGlobals) //_____________________________________________________________________________ AliTRDCalGlobals::AliTRDCalGlobals() :TNamed() - ,fSamplingFrequency(0) ,fNumberOfTimeBins(0) { // @@ -40,7 +39,6 @@ AliTRDCalGlobals::AliTRDCalGlobals() //_____________________________________________________________________________ AliTRDCalGlobals::AliTRDCalGlobals(const Text_t *name, const Text_t *title) :TNamed(name,title) - ,fSamplingFrequency(0) ,fNumberOfTimeBins(0) { // diff --git a/TRD/Cal/AliTRDCalGlobals.h b/TRD/Cal/AliTRDCalGlobals.h index 88cd9503984..9b9c7b0ebb9 100644 --- a/TRD/Cal/AliTRDCalGlobals.h +++ b/TRD/Cal/AliTRDCalGlobals.h @@ -18,21 +18,17 @@ class AliTRDCalGlobals : public TNamed { public: AliTRDCalGlobals(); - AliTRDCalGlobals(const Text_t* name, const Text_t* title); + AliTRDCalGlobals(const Text_t *name, const Text_t *title); virtual ~AliTRDCalGlobals() {}; - void SetSamplingFrequency(Float_t freq) { fSamplingFrequency = freq; }; - Float_t GetSamplingFrequency() const { return fSamplingFrequency; }; - void SetNumberOfTimeBins(Int_t value) { fNumberOfTimeBins = value; }; Int_t GetNumberOfTimeBins() const { return fNumberOfTimeBins; }; protected: - Float_t fSamplingFrequency; // Sampling Frequency in MHz Int_t fNumberOfTimeBins; // Number of timebins - ClassDef(AliTRDCalGlobals,1) // TRD calibration class for global TRD parameters + ClassDef(AliTRDCalGlobals,2) // TRD calibration class for global TRD parameters }; -- 2.43.0