// - Electronics noise //
// - Electronics gain //
// - Digitization //
-// - ADC threshold //
// The corresponding parameter can be adjusted via the various //
// Set-functions. If these parameters are not explicitly set, default //
// values are used (see Init-function). //
#include "AliTRDcalibDB.h"
#include "AliTRDSimParam.h"
#include "AliTRDCommonParam.h"
+#include "AliTRDfeeParam.h"
#include "Cal/AliTRDCalROC.h"
#include "Cal/AliTRDCalDet.h"
,fSDigitsManagerList(0)
,fTRD(0)
,fGeo(0)
+ ,fFee(0)
,fEvent(0)
,fMasks(0)
,fCompress(kTRUE)
,fSDigitsManagerList(0)
,fTRD(0)
,fGeo(0)
+ ,fFee(0)
,fEvent(0)
,fMasks(0)
,fCompress(kTRUE)
,fSDigitsManagerList(0)
,fTRD(0)
,fGeo(0)
+ ,fFee(0)
,fEvent(0)
,fMasks(0)
,fCompress(kTRUE)
,fSDigitsManagerList(0)
,fTRD(0)
,fGeo(0)
+ ,fFee(0)
,fEvent(0)
,fMasks(0)
,fCompress(kTRUE)
fSDigitsManagerList = 0;
fTRD = 0;
fGeo = 0;
+ fFee = AliTRDfeeParam::Instance();
fEvent = 0;
fMasks = 0;
,fSDigitsManagerList(0)
,fTRD(0)
,fGeo(0)
+ ,fFee(0)
,fEvent(0)
,fMasks(0)
,fCompress(d.fCompress)
fTimeStruct2 = 0;
}
+ if (fGeo) {
+ delete fGeo;
+ fGeo = 0;
+ }
+
}
//_____________________________________________________________________________
((AliTRDdigitizer &) d).fSDigitsManagerList = 0;
((AliTRDdigitizer &) d).fTRD = 0;
((AliTRDdigitizer &) d).fGeo = 0;
+ ((AliTRDdigitizer &) d).fFee = fFee;
((AliTRDdigitizer &) d).fEvent = 0;
((AliTRDdigitizer &) d).fMasks = 0;
((AliTRDdigitizer &) d).fCompress = fCompress;
}
// Get the geometry
- fGeo = fTRD->GetGeometry();
- AliDebug(1,Form("Geometry version %d",fGeo->IsVersion()));
+ fGeo = new AliTRDgeometry();
// Create a digits manager
delete fDigitsManager;
AliError("No geometry defined");
return kFALSE;
}
- fGeo->ReadGeoMatrices();
AliTRDSimParam *simParam = AliTRDSimParam::Instance();
if (!simParam) {
Float_t hittime = hit->GetTime();
Int_t plane = fGeo->GetPlane(detector);
Int_t chamber = fGeo->GetChamber(detector);
- padPlane = commonParam->GetPadPlane(plane,chamber);
+ padPlane = fGeo->GetPadPlane(plane,chamber);
Float_t row0 = padPlane->GetRow0ROC();
Int_t nRowMax = padPlane->GetNrows();
Int_t nColMax = padPlane->GetNcols();
// Find the current volume with the geo manager
gGeoManager->SetCurrentPoint(pos);
- gGeoManager->FindNode();
+ gGeoManager->FindNode();
if (strstr(gGeoManager->GetPath(),"/UK")) {
inDrift = 0;
}
Int_t plane = fGeo->GetPlane(iDet);
Int_t sector = fGeo->GetSector(iDet);
Int_t chamber = fGeo->GetChamber(iDet);
- Int_t nRowMax = commonParam->GetRowMax(plane,chamber,sector);
- Int_t nColMax = commonParam->GetColMax(plane);
+ Int_t nRowMax = fGeo->GetRowMax(plane,chamber,sector);
+ Int_t nColMax = fGeo->GetColMax(plane);
Double_t *inADC = new Double_t[nTimeTotal];
Double_t *outADC = new Double_t[nTimeTotal];
for (iTime = 0; iTime < nTimeTotal; iTime++) {
// Store the amplitude of the digit if above threshold
- if (outADC[iTime] > (simParam->GetADCbaseline() + simParam->GetADCthreshold())) {
+ // if (outADC[iTime] > (simParam->GetADCbaseline() + simParam->GetADCthreshold())) {
+ if (outADC[iTime] != 0 ) { // Now this is enough because there is ZS in raw simulator
nDigits++;
digits->SetDataUnchecked(iRow,iCol,iTime,((Int_t) outADC[iTime]));
}
return kFALSE;
}
- AliTRDCommonParam *commonParam = AliTRDCommonParam::Instance();
- if (!commonParam) {
- AliFatal("Could not get common parameters");
- return kFALSE;
- }
-
AliTRDcalibDB *calibration = AliTRDcalibDB::Instance();
if (!calibration) {
AliFatal("Could not get calibration object");
Double_t convert = kEl2fC * chipGain;
Double_t adcInRange = simParam->GetADCinRange();
Double_t adcOutRange = simParam->GetADCoutRange();
- Int_t adcThreshold = simParam->GetADCthreshold();
Int_t adcBaseline = simParam->GetADCbaseline();
Int_t nTimeTotal = calibration->GetNumberOfTimeBins();
Int_t plane = fGeo->GetPlane(iDet);
Int_t sector = fGeo->GetSector(iDet);
Int_t chamber = fGeo->GetChamber(iDet);
- Int_t nRowMax = commonParam->GetRowMax(plane,chamber,sector);
- Int_t nColMax = commonParam->GetColMax(plane);
+ Int_t nRowMax = fGeo->GetRowMax(plane,chamber,sector);
+ Int_t nColMax = fGeo->GetColMax(plane);
Double_t *inADC = new Double_t[nTimeTotal];
Double_t *outADC = new Double_t[nTimeTotal];
for (iTime = 0; iTime < nTimeTotal; iTime++) {
// Store the amplitude of the digit if above threshold
- if (outADC[iTime] > (adcBaseline + adcThreshold)) {
+ // if (outADC[iTime] > (adcBaseline + adcThreshold)) {
+ if (outADC[iTime] != 0) { // now this is ok because there is ZS in raw simulation
digitsOut->SetDataUnchecked(iRow,iCol,iTime,((Int_t) outADC[iTime]));
// Copy the dictionary
for (iDict = 0; iDict < kNDict; iDict++) {
return kFALSE;
}
- AliTRDCommonParam *commonParam = AliTRDCommonParam::Instance();
- if (!commonParam) {
- AliFatal("Could not get common parameters");
- return kFALSE;
- }
-
AliTRDcalibDB *calibration = AliTRDcalibDB::Instance();
if (!calibration) {
AliFatal("Could not get calibration object");
Int_t plane = fGeo->GetPlane(iDet);
Int_t sector = fGeo->GetSector(iDet);
Int_t chamber = fGeo->GetChamber(iDet);
- Int_t nRowMax = commonParam->GetRowMax(plane,chamber,sector);
- Int_t nColMax = commonParam->GetColMax(plane);
+ Int_t nRowMax = fGeo->GetRowMax(plane,chamber,sector);
+ Int_t nColMax = fGeo->GetColMax(plane);
// Loop through the pixels of one detector and add the signals
digitsA = fSDigitsManager->GetDigits(iDet);