From 5ab3605a5eedf36019d7b3899782edb806888c69 Mon Sep 17 00:00:00 2001 From: decaro Date: Fri, 6 Mar 2009 19:18:49 +0000 Subject: [PATCH] Inserted the matching window control at sdigitization level --- TOF/AliTOFGeometry.cxx | 18 ++++++++++-------- TOF/AliTOFGeometry.h | 9 ++++++--- TOF/AliTOFSDigit.cxx | 4 ++-- TOF/AliTOFSDigitizer.cxx | 2 ++ 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/TOF/AliTOFGeometry.cxx b/TOF/AliTOFGeometry.cxx index 77a4479759b..37e1361d288 100644 --- a/TOF/AliTOFGeometry.cxx +++ b/TOF/AliTOFGeometry.cxx @@ -136,7 +136,6 @@ const Float_t AliTOFGeometry::fgkxTOF = 372.00;// Inner radius of the TOF fo const Float_t AliTOFGeometry::fgkRmin = 371.00;// Inner radius of the TOF (cm) const Float_t AliTOFGeometry::fgkRmax = 400.05;// Outer radius of the TOF (cm) -const Int_t AliTOFGeometry::fgkTimeDiff = 25000; // Min signal separation (ps) const Float_t AliTOFGeometry::fgkXPad = 2.5; // Pad size in the x direction (cm) const Float_t AliTOFGeometry::fgkZPad = 3.5; // Pad size in the z direction (cm) @@ -148,9 +147,12 @@ const Float_t AliTOFGeometry::fgkSigmaForTail2= 0.5;//Sig2 for simulation of TDC const Float_t AliTOFGeometry::fgkPhiSec= 20;//sector Phi width (deg) const Float_t AliTOFGeometry::fgkTdcBin = 24.4; // time-of-flight bin width [ps] -const Float_t AliTOFGeometry::fgkToTBin = 48.8; // time-over-threshold bin width [ps] +const Float_t AliTOFGeometry::fgkToTBin = 48.8; // time-over-threshold bin width [ps] -const Float_t AliTOFGeometry::fgkAngles[kNPlates][kMaxNstrip] ={ +const Float_t AliTOFGeometry::fgkDeadTime = 25E+03; // Single channel dead time (ps) +const Float_t AliTOFGeometry::fgkMatchingWindow = fgkTdcBin*TMath::Power(2,13); // Matching window (ps) + +const Float_t AliTOFGeometry::fgkAngles[kNPlates][kMaxNstrip] = { { 43.99, 43.20, 42.40, 41.59, 40.77, 39.94, 39.11, 38.25, 37.40, 36.53, 35.65, 34.76, 33.87, 32.96, 32.05, 31.13, 30.19, 29.24, 12.33, 0.00}, @@ -166,7 +168,7 @@ const Float_t AliTOFGeometry::fgkAngles[kNPlates][kMaxNstrip] ={ {-12.33, -29.24, -30.19, -31.13, -32.05, -32.96, -33.87, -34.76, -35.65, -36.53, -37.40, -38.25, -39.11, -39.94, -40.77, -41.59, -42.40, -43.20, -43.99, 0.00} }; -const Float_t AliTOFGeometry::fgkHeights[kNPlates][kMaxNstrip]= { +const Float_t AliTOFGeometry::fgkHeights[kNPlates][kMaxNstrip] = { {-8.2, -7.5, -8.2, -7.7, -8.1, -7.6, -7.7, -7.7, -7.7, -7.7, -7.5, -7.2, -7.3, -7.5, -7.6, -7.8, -8.3, -9.3, -3.1, 0.0}, @@ -184,7 +186,7 @@ const Float_t AliTOFGeometry::fgkHeights[kNPlates][kMaxNstrip]= { }; -const Float_t AliTOFGeometry::fgkDistances[kNPlates][kMaxNstrip]= { +const Float_t AliTOFGeometry::fgkDistances[kNPlates][kMaxNstrip] = { { 364.1, 354.9, 344.5, 335.4, 325.5, 316.6, 307.2, 298.0, 288.9, 280.0, 271.3, 262.7, 254.0, 244.8, 236.1, 227.7, 219.1, 210.3, 205.7, 0.0}, @@ -1780,12 +1782,12 @@ Int_t AliTOFGeometry::GetIndex(Int_t *detId) //Retrieve calibration channel index Int_t isector = detId[0]; if (isector >= kNSectors){ - printf("Wrong sector number in TOF (%d) !",isector); + printf("Wrong sector number in TOF (%d) !\n",isector); return -1; } Int_t iplate = detId[1]; if (iplate >= kNPlates){ - printf("Wrong plate number in TOF (%d) !",iplate); + printf("Wrong plate number in TOF (%d) !\n",iplate); return -1; } Int_t istrip = detId[2]; @@ -1809,7 +1811,7 @@ Int_t AliTOFGeometry::GetIndex(Int_t *detId) stripOffset = kNStripC+kNStripB+kNStripA+kNStripB; break; default: - printf("Wrong plate number in TOF (%d) !",iplate); + printf("Wrong plate number in TOF (%d) !\n",iplate); return -1; }; diff --git a/TOF/AliTOFGeometry.h b/TOF/AliTOFGeometry.h index 18279bff390..c17cdab96bc 100644 --- a/TOF/AliTOFGeometry.h +++ b/TOF/AliTOFGeometry.h @@ -47,7 +47,9 @@ class AliTOFGeometry: public TObject{ static Float_t StripLength() { return fgkStripLength;}; - static Int_t TimeDiff() { return fgkTimeDiff;}; + static Float_t DeadTime() { return fgkDeadTime;}; + static Float_t MatchingWindow() { return fgkMatchingWindow;}; + static Int_t MaxTOFTree() { return kMaxTOFTree;}; static Int_t NDDL() { return kNDDL;}; @@ -132,7 +134,8 @@ class AliTOFGeometry: public TObject{ kNCh = 8 // Number of channels per Tdc }; - static const Int_t fgkTimeDiff; // Min signal separation (ps) + static const Float_t fgkDeadTime; // Single channel dead time (ps) + static const Float_t fgkMatchingWindow; // Matching window (ps) static const Float_t fgkZlenA; // length (cm) of the A module static const Float_t fgkZlenB; // length (cm) of the B module @@ -163,7 +166,7 @@ class AliTOFGeometry: public TObject{ static const Float_t fgkTdcBin; // time-of-flight bin width [ps] static const Float_t fgkToTBin; // time-over-threshold bin width [ps] - ClassDef(AliTOFGeometry,6) // TOF Geometry base class + ClassDef(AliTOFGeometry,7) // TOF Geometry base class }; #endif diff --git a/TOF/AliTOFSDigit.cxx b/TOF/AliTOFSDigit.cxx index a506517d75a..a22a86572de 100644 --- a/TOF/AliTOFSDigit.cxx +++ b/TOF/AliTOFSDigit.cxx @@ -186,7 +186,7 @@ void AliTOFSDigit::Update(Float_t tdcbin, Int_t tdc, Int_t adc, Int_t track) // Int_t sameTime = -1; - Float_t tdcwindow=((Float_t)AliTOFGeometry::TimeDiff())/tdcbin; + Float_t tdcwindow = AliTOFGeometry::DeadTime()/tdcbin; for (Int_t i = 0; i < fNDigits; i++) { if (TMath::Abs(tdc-fTdc->At(i)) < tdcwindow) { sameTime = i; @@ -245,7 +245,7 @@ void AliTOFSDigit::Update(AliTOFSDigit* sdig) Int_t sameTime = -1; - Float_t tdcwindow=((Float_t)AliTOFGeometry::TimeDiff())/tdcbin; + Float_t tdcwindow = AliTOFGeometry::DeadTime()/tdcbin; for (Int_t i = 0; i < fNDigits; i++) { if (TMath::Abs(tdc-fTdc->At(i)) < tdcwindow) { sameTime = i; diff --git a/TOF/AliTOFSDigitizer.cxx b/TOF/AliTOFSDigitizer.cxx index 9f8a6607a28..aeaaffc7e9c 100644 --- a/TOF/AliTOFSDigitizer.cxx +++ b/TOF/AliTOFSDigitizer.cxx @@ -498,6 +498,8 @@ void AliTOFSDigitizer::Exec(Option_t *verboseOption) { if(isFired[indexOfPad]){ // the pad has fired Float_t timediff=geantTime-tofAfterSimul[indexOfPad]; + if (tofAfterSimul[indexOfPad]>=AliTOFGeometry::MatchingWindow()*1E-3) continue; + if(timediff>=0.2) nlargeTofDiff++; digit[0] = (Int_t) ((tofAfterSimul[indexOfPad]*1.e+03)/AliTOFGeometry::TdcBinWidth()); // TDC bin number (each bin -> 24.4 ps) -- 2.39.3