git://git.uio.no
/
u
/
mrichter
/
AliRoot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
The x position 0 <-> time bin 0 - x increases TOWARDS interaction point (M.Ivanov)
[u/mrichter/AliRoot.git]
/
TRD
/
AliTRDclusterizer.cxx
diff --git
a/TRD/AliTRDclusterizer.cxx
b/TRD/AliTRDclusterizer.cxx
index 16aea8a5b4b2c3a32e8cd7aed909e173f6e6489f..f078f779488ee302ffa0e5cc3febb6156055dde6 100644
(file)
--- a/
TRD/AliTRDclusterizer.cxx
+++ b/
TRD/AliTRDclusterizer.cxx
@@
-304,18
+304,22
@@
AliTRDcluster* AliTRDclusterizer::AddCluster(Double_t *pos, Int_t timebin, Int_t
}
//_____________________________________________________________________________
}
//_____________________________________________________________________________
-Double_t AliTRDclusterizer::CalcXposFromTimebin(Float_t timebin,
Float_t vdrift
)
+Double_t AliTRDclusterizer::CalcXposFromTimebin(Float_t timebin,
Int_t idet, Int_t col, Int_t row
)
{
//
// Calculates the local x position in the detector from the timebin, depends on the drift velocity
{
//
// Calculates the local x position in the detector from the timebin, depends on the drift velocity
- //
The timebin has to be t0 corrected already
+ //
and t0
//
AliTRDcalibDB* calibration = AliTRDcalibDB::Instance();
if (!calibration)
return -1;
//
AliTRDcalibDB* calibration = AliTRDcalibDB::Instance();
if (!calibration)
return -1;
-
- Int_t totalTimebins = calibration->GetNumberOfTimeBins();
+
+ Float_t vdrift = calibration->GetVdrift(idet, col, row);
+ Float_t t0 = calibration->GetT0(idet, col, row);
Float_t samplingFrequency = calibration->GetSamplingFrequency();
Float_t samplingFrequency = calibration->GetSamplingFrequency();
- return (totalTimebins - timebin) / samplingFrequency * vdrift;
+
+ timebin -= t0;
+
+ return timebin / samplingFrequency * vdrift;
}
}