]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDmcmTracklet.cxx
remove obselete clean QA macros command
[u/mrichter/AliRoot.git] / TRD / AliTRDmcmTracklet.cxx
index 7fce5f9fe3a4b77ea2761a1f01006522cae1244e..90f7648a10b570ef51d2da35b3b7307719b1d994 100644 (file)
@@ -38,6 +38,7 @@ ClassImp(AliTRDmcmTracklet)
 //_____________________________________________________________________________
 AliTRDmcmTracklet::AliTRDmcmTracklet() 
   :TObject()
+  ,fGeo(0)
   ,fDetector(-1)
   ,fRow(-1)
   ,fTrackLabel(-1)
@@ -67,11 +68,14 @@ AliTRDmcmTracklet::AliTRDmcmTracklet()
     fCol[time]    = 0;
   }
 
+  fGeo = new AliTRDgeometry();
+
 }
 
 //_____________________________________________________________________________
 AliTRDmcmTracklet::AliTRDmcmTracklet(Int_t det, Int_t row, Int_t n) 
   :TObject()
+  ,fGeo(0)
   ,fDetector(det)
   ,fRow(row)
   ,fTrackLabel(-1)
@@ -104,11 +108,14 @@ AliTRDmcmTracklet::AliTRDmcmTracklet(Int_t det, Int_t row, Int_t n)
   fGPos = new TGraph(0);
   fGAmp = new TGraph(0);
 
+  fGeo  = new AliTRDgeometry();
+
 }
 
 //_____________________________________________________________________________
 AliTRDmcmTracklet::AliTRDmcmTracklet(const AliTRDmcmTracklet &t) 
   :TObject(t)
+  ,fGeo(0)
   ,fDetector(t.fDetector)
   ,fRow(t.fRow)
   ,fTrackLabel(t.fTrackLabel)
@@ -138,6 +145,11 @@ AliTRDmcmTracklet::AliTRDmcmTracklet(const AliTRDmcmTracklet &t)
     ((AliTRDmcmTracklet &) t).fCol[time]    = 0;
   }
 
+  if (fGeo) {
+    delete fGeo;
+  }
+  fGeo = new AliTRDgeometry();
+
 }
 
 //_____________________________________________________________________________
@@ -150,6 +162,10 @@ AliTRDmcmTracklet::~AliTRDmcmTracklet()
   if (fGPos != 0) delete fGPos;
   if (fGAmp != 0) delete fGAmp;
 
+  if (fGeo) {
+    delete fGeo;
+  }
+
 }
 
 //_____________________________________________________________________________
@@ -270,8 +286,7 @@ void AliTRDmcmTracklet::MakeTrackletGraph(AliTRDgeometry *geo, Float_t field)
     return;
   }
   
-  AliTRDCommonParam* commonParam = AliTRDCommonParam::Instance();
-  if (!commonParam) {
+  if (!AliTRDCommonParam::Instance()) {
     AliError("No common parameters.");
     return;
   }
@@ -282,14 +297,14 @@ void AliTRDmcmTracklet::MakeTrackletGraph(AliTRDgeometry *geo, Float_t field)
     return;
   }
 
-  Int_t iplan, icham;
+  Int_t ilayer, istack;
 
-  iplan = geo->GetPlane(fDetector);
-  icham = geo->GetChamber(fDetector);
+  ilayer = geo->GetLayer(fDetector);
+  istack = geo->GetStack(fDetector);
 
-  AliTRDpadPlane *padPlane = commonParam->GetPadPlane(iplan,icham);
+  AliTRDpadPlane *padPlane = fGeo->GetPadPlane(ilayer,istack);
 
-  Float_t samplFreq = calibration->GetSamplingFrequency();
+  Float_t samplFreq = AliTRDCommonParam::Instance()->GetSamplingFrequency();
 
   Int_t time, col;
   Float_t amp[3];
@@ -310,7 +325,7 @@ void AliTRDmcmTracklet::MakeTrackletGraph(AliTRDgeometry *geo, Float_t field)
 
     if (amp[0] < 0.0 || amp[1] < 0.0 || amp[2] < 0.0) continue;
 
-    ypos = GetClusY(amp,iplan);
+    ypos = GetClusY(amp,ilayer);
 
     colSize = padPlane->GetColSize(col);
     vDrift = calibration->GetVdrift(fDetector,col,fRow);
@@ -322,16 +337,16 @@ void AliTRDmcmTracklet::MakeTrackletGraph(AliTRDgeometry *geo, Float_t field)
     lorentzAngle = TMath::ATan(omegaTau)*180.0/TMath::Pi();
     
     xpos = (time+0.5) * timeBinSize;
-    xpos = geo->GetTime0(iplan) - xpos;
+    xpos = geo->GetTime0(ilayer) - xpos;
 
     ypos = padPlane->GetColPos(col) - (ypos + 0.5) * colSize;
 
     // ExB correction
-    xzero = geo->GetTime0(iplan);
+    xzero = geo->GetTime0(ilayer);
     ypos = ypos + (xpos-xzero) * omegaTau;
 
     // tilted pads correction
-    thetaSlope = - padPlane->GetRowPos(fRow)/geo->GetTime0(iplan);
+    thetaSlope = - padPlane->GetRowPos(fRow)/geo->GetTime0(ilayer);
     tiltingAngle = padPlane->GetTiltingAngle()/180.0*TMath::Pi();
     ypos = ypos - (xpos-xzero) * thetaSlope * TMath::Sin(tiltingAngle);
 
@@ -342,7 +357,7 @@ void AliTRDmcmTracklet::MakeTrackletGraph(AliTRDgeometry *geo, Float_t field)
 
   fGPos->Set(npg);
   
-  fTime0 = geo->GetTime0(iplan) - AliTRDgeometry::CdrHght() - 0.5*AliTRDgeometry::CamHght();
+  fTime0 = geo->GetTime0(ilayer) - AliTRDgeometry::CdrHght() - 0.5*AliTRDgeometry::CamHght();
   fRowz = padPlane->GetRowPos(fRow) - padPlane->GetRowSize(fRow)/2.0;
 
   Double_t xMin = 0;
@@ -410,7 +425,7 @@ void AliTRDmcmTracklet::MakeClusAmpGraph()
 }
 
 //_____________________________________________________________________________
-Float_t AliTRDmcmTracklet::GetClusY(Float_t *adc, Int_t pla) const
+Float_t AliTRDmcmTracklet::GetClusY(Float_t *adc, Int_t layer) const
 {
   //
   // Cluster position in the phi direction in pad units (relative to the pad border)
@@ -428,7 +443,7 @@ Float_t AliTRDmcmTracklet::GetClusY(Float_t *adc, Int_t pla) const
 
   Float_t sigma = 0.0;
 
-  switch(pla) {
+  switch(layer) {
   case 0:
     sigma = 0.515; break;
   case 1:
@@ -442,7 +457,7 @@ Float_t AliTRDmcmTracklet::GetClusY(Float_t *adc, Int_t pla) const
   case 5:
     sigma = 0.463; break;
   default:
-    AliError("Wrong plane number.");
+    AliError("Wrong layer number.");
     return 0.0;
   }