Files for MFT segmentation updated
authorauras <auras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 17 Apr 2013 22:15:35 +0000 (22:15 +0000)
committerauras <auras@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 17 Apr 2013 22:15:35 +0000 (22:15 +0000)
MFT/AliMFTPlane.cxx
MFT/AliMFTPlane.h
MFT/AliMFTSegmentation.h

index 09d7d1e..d06e150 100644 (file)
@@ -64,7 +64,8 @@ AliMFTPlane::AliMFTPlane():
   fActiveElements(0),
   fReadoutElements(0),
   fSupportElements(0),
-  fHasPixelRectangularPatternAlongY(kFALSE)
+  fHasPixelRectangularPatternAlongY(kFALSE),
+  fPlaneIsOdd(kFALSE)
 {
 
   // default constructor
@@ -93,7 +94,8 @@ AliMFTPlane::AliMFTPlane(const Char_t *name, const Char_t *title):
   fActiveElements(0),
   fReadoutElements(0),
   fSupportElements(0),
-  fHasPixelRectangularPatternAlongY(kFALSE)
+  fHasPixelRectangularPatternAlongY(kFALSE),
+  fPlaneIsOdd(kFALSE)
 {
 
   // constructor
@@ -125,10 +127,11 @@ AliMFTPlane::AliMFTPlane(const AliMFTPlane& plane):
   fEquivalentSilicon(plane.fEquivalentSilicon),
   fEquivalentSiliconBeforeFront(plane.fEquivalentSiliconBeforeFront),
   fEquivalentSiliconBeforeBack(plane.fEquivalentSiliconBeforeBack),
-fActiveElements(0),
-fReadoutElements(0),
-fSupportElements(0),
-fHasPixelRectangularPatternAlongY(plane.fHasPixelRectangularPatternAlongY)
+  fActiveElements(0),
+  fReadoutElements(0),
+  fSupportElements(0),
+  fHasPixelRectangularPatternAlongY(plane.fHasPixelRectangularPatternAlongY),
+  fPlaneIsOdd(plane.fPlaneIsOdd)
 {
 
   // copy constructor
@@ -207,6 +210,7 @@ AliMFTPlane& AliMFTPlane::operator=(const AliMFTPlane& plane) {
     fSupportElements = new TClonesArray(*(plane.fSupportElements));
     fSupportElements -> SetOwner(kTRUE);
     fHasPixelRectangularPatternAlongY = plane.fHasPixelRectangularPatternAlongY;
+    fPlaneIsOdd                       = plane.fPlaneIsOdd;
 
   }
   
@@ -250,12 +254,16 @@ Bool_t AliMFTPlane::Init(Int_t    planeNumber,
 //   }
   
   if (fRMax < fRMinSupport+fHeightActive) fRMax = fRMinSupport + fHeightActive;
-  
+
+  Int_t nLaddersWithinPipe = Int_t(fRMinSupport/(fHeightActive-fActiveSuperposition));
+  if (fRMinSupport-nLaddersWithinPipe*(fHeightActive-fActiveSuperposition) > 0.5*(fHeightActive-2*fActiveSuperposition)) fPlaneIsOdd = kTRUE;
+  else fPlaneIsOdd = kFALSE;
+
   fRMax = fRMinSupport + (fHeightActive-fActiveSuperposition) * 
     (Int_t((fRMax-fRMinSupport-fHeightActive)/(fHeightActive-fActiveSuperposition))+1) + fHeightActive;
-  
+
   fRMaxSupport = TMath::Sqrt(fHeightActive*(2.*rMax-fHeightActive) + fRMax*fRMax) + fSupportExtMargin;
+   
   return kTRUE;
  
 }
@@ -267,39 +275,22 @@ Bool_t AliMFTPlane::CreateStructure() {
   Int_t nBins[3]={0};
   Double_t minPosition[3]={0}, maxPosition[3]={0};
   
-  // ------------------- support element -------------------------------------------------
-  
-  nBins[0] = 1;
-  nBins[1] = 1;
-  nBins[2] = 1;
-  
-  minPosition[0] = -1.*fRMaxSupport;
-  minPosition[1] = -1.*fRMaxSupport;
-  minPosition[2] = fZCenter - 0.5*fThicknessSupport;
-  
-  maxPosition[0] = +1.*fRMaxSupport;
-  maxPosition[1] = +1.*fRMaxSupport;
-  maxPosition[2] = fZCenter + 0.5*fThicknessSupport;
-  
-  new ((*fSupportElements)[fSupportElements->GetEntries()]) THnSparseC(Form("MFTSupportElemHist_%02d%03d", fPlaneNumber, fSupportElements->GetEntries()), 
-                                                                      Form("MFTSupportElemHist_%02d%03d", fPlaneNumber, fSupportElements->GetEntries()), 
-                                                                      3, nBins, minPosition, maxPosition);
-
   // ------------------- det elements: active + readout ----------------------------------
-  
+
+  // 1st Section : below and above the beam pipe
+
   Double_t lowEdgeActive = -1.*fRMax;
   Double_t supEdgeActive = lowEdgeActive + fHeightActive;
+  Double_t zMinFront = fZCenter - 0.5*fThicknessSupport - fThicknessActive;
+  Double_t zMinBack  = fZCenter + 0.5*fThicknessSupport;
   Double_t zMin = 0.;
   Bool_t isFront = kTRUE;
   
-  while (supEdgeActive < fRMax+0.01) {
-    
-    if (isFront) zMin = fZCenter - 0.5*fThicknessSupport - fThicknessActive;
-    else         zMin = fZCenter + 0.5*fThicknessSupport;
+  while (lowEdgeActive < 0) {
     
     Double_t extLimitAtLowEdgeActive = TMath::Sqrt((fRMax-TMath::Abs(lowEdgeActive)) * TMath::Abs(2*fRMax - (fRMax-TMath::Abs(lowEdgeActive))));
     Double_t extLimitAtSupEdgeActive = TMath::Sqrt((fRMax-TMath::Abs(supEdgeActive)) * TMath::Abs(2*fRMax - (fRMax-TMath::Abs(supEdgeActive))));
-    
+
     // creating new det element: active + readout
     
     Double_t extLimitDetElem = TMath::Max(extLimitAtLowEdgeActive, extLimitAtSupEdgeActive);
@@ -309,7 +300,12 @@ Bool_t AliMFTPlane::CreateStructure() {
       nBins[0] = TMath::Nint(2.*extLimitDetElem/fPixelSizeX);
       nBins[1] = TMath::Nint(fHeightActive/fPixelSizeY);
       nBins[2] = 1;
+
+      // element below the pipe
       
+      if (isFront) zMin = zMinFront;
+      else         zMin = zMinBack;
+
       minPosition[0] = -1.*extLimitDetElem;
       minPosition[1] = lowEdgeActive;
       minPosition[2] = zMin;
@@ -321,20 +317,40 @@ Bool_t AliMFTPlane::CreateStructure() {
       new ((*fActiveElements)[fActiveElements->GetEntries()]) THnSparseC(Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
                                                                         Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
                                                                         3, nBins, minPosition, maxPosition);
+
+      minPosition[1] = lowEdgeActive-fHeightReadout;
+      maxPosition[1] = lowEdgeActive;
       
-      if (supEdgeActive>0.) {
-       minPosition[1] = supEdgeActive;
-       maxPosition[1] = supEdgeActive+fHeightReadout;
-      }
-      else {
-       minPosition[1] = lowEdgeActive-fHeightReadout;
-       maxPosition[1] = lowEdgeActive;
+      new ((*fReadoutElements)[fReadoutElements->GetEntries()]) THnSparseC(Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
+                                                                          Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
+                                                                          3, nBins, minPosition, maxPosition);
+
+      // specular element above the pipe
+
+      if (fPlaneIsOdd) {
+       if (isFront) zMin = zMinBack;
+       else         zMin = zMinFront;
       }
+
+      minPosition[0] = -1.*extLimitDetElem;
+      minPosition[1] = -1.*supEdgeActive;
+      minPosition[2] = zMin;
       
+      maxPosition[0] = +1.*extLimitDetElem;
+      maxPosition[1] = -1.*lowEdgeActive;
+      maxPosition[2] = zMin+fThicknessActive; 
+      
+      new ((*fActiveElements)[fActiveElements->GetEntries()]) THnSparseC(Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
+                                                                        Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
+                                                                        3, nBins, minPosition, maxPosition);
+
+      minPosition[1] = -1.*lowEdgeActive;
+      maxPosition[1] = -1.*(lowEdgeActive-fHeightReadout);
+
       new ((*fReadoutElements)[fReadoutElements->GetEntries()]) THnSparseC(Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
                                                                           Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
                                                                           3, nBins, minPosition, maxPosition);
-      
+
     }
     
     else {     // two elements covering the row
@@ -348,8 +364,11 @@ Bool_t AliMFTPlane::CreateStructure() {
       nBins[1] = TMath::Nint(fHeightActive/fPixelSizeY);
       nBins[2] = 1;
       
-      // left element
+      // left element: below the beam pipe
       
+      if (isFront) zMin = zMinFront;
+      else         zMin = zMinBack;
+
       minPosition[0] = -1.*extLimitDetElem;
       minPosition[1] = lowEdgeActive;
       minPosition[2] = zMin;
@@ -362,21 +381,48 @@ Bool_t AliMFTPlane::CreateStructure() {
                                                                         Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
                                                                         3, nBins, minPosition, maxPosition);   
       
-      if (supEdgeActive>0.) {
-       minPosition[1] = supEdgeActive;
-       maxPosition[1] = supEdgeActive+fHeightReadout;
-      }
-      else {
-       minPosition[1] = lowEdgeActive-fHeightReadout;
-       maxPosition[1] = lowEdgeActive;
-      }
+      minPosition[1] = lowEdgeActive-fHeightReadout;
+      maxPosition[1] = lowEdgeActive;
       
       new ((*fReadoutElements)[fReadoutElements->GetEntries()]) THnSparseC(Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
                                                                           Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
                                                                           3, nBins, minPosition, maxPosition);
+
+      // left element: above the beam pipe
+      
+      if (supEdgeActive < 0.5*fHeightActive) {
+       
+       if (fPlaneIsOdd) {
+         if (isFront) zMin = zMinBack;
+         else         zMin = zMinFront;
+       }
+       
+       minPosition[0] = -1.*extLimitDetElem;
+       minPosition[1] = -1.*supEdgeActive;
+       minPosition[2] = zMin;
+       
+       maxPosition[0] = -1.*intLimitDetElem;
+       maxPosition[1] = -1.*lowEdgeActive;
+       maxPosition[2] = zMin+fThicknessActive; 
+       
+       new ((*fActiveElements)[fActiveElements->GetEntries()]) THnSparseC(Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
+                                                                          Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
+                                                                          3, nBins, minPosition, maxPosition); 
+       
+       minPosition[1] = -1.*lowEdgeActive;
+       maxPosition[1] = -1.*(lowEdgeActive-fHeightReadout);
+       
+       new ((*fReadoutElements)[fReadoutElements->GetEntries()]) THnSparseC(Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
+                                                                            Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
+                                                                            3, nBins, minPosition, maxPosition);
       
-      // right element
+      }
+
+      // right element: below the beam pipe
       
+      if (isFront) zMin = zMinFront;
+      else         zMin = zMinBack;
+
       minPosition[0] = +1.*intLimitDetElem;
       minPosition[1] = lowEdgeActive;
       minPosition[2] = zMin;
@@ -389,18 +435,42 @@ Bool_t AliMFTPlane::CreateStructure() {
                                                                         Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
                                                                         3, nBins, minPosition, maxPosition);   
       
-      if (supEdgeActive>0.) {
-       minPosition[1] = supEdgeActive;
-       maxPosition[1] = supEdgeActive+fHeightReadout;
-      }
-      else {
-       minPosition[1] = lowEdgeActive-fHeightReadout;
-       maxPosition[1] = lowEdgeActive;
-      }
-      
+      minPosition[1] = lowEdgeActive-fHeightReadout;
+      maxPosition[1] = lowEdgeActive;
+
       new ((*fReadoutElements)[fReadoutElements->GetEntries()]) THnSparseC(Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
                                                                           Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
                                                                           3, nBins, minPosition, maxPosition);
+
+      // right element: above the beam pipe
+      
+      if (supEdgeActive < 0.5*fHeightActive) {
+
+       if (fPlaneIsOdd) {
+         if (isFront) zMin = zMinBack;
+         else         zMin = zMinFront;
+       }
+       
+       minPosition[0] = +1.*intLimitDetElem;
+       minPosition[1] = -1.*supEdgeActive;
+       minPosition[2] = zMin;
+       
+       maxPosition[0] = +1.*extLimitDetElem;
+       maxPosition[1] = -1.*lowEdgeActive;
+       maxPosition[2] = zMin+fThicknessActive; 
+       
+       new ((*fActiveElements)[fActiveElements->GetEntries()]) THnSparseC(Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
+                                                                          Form("MFTActiveElemHist_%02d%03d", fPlaneNumber, fActiveElements->GetEntries()), 
+                                                                          3, nBins, minPosition, maxPosition); 
+       
+       minPosition[1] = -1.*lowEdgeActive;
+       maxPosition[1] = -1.*(lowEdgeActive-fHeightReadout);
+       
+       new ((*fReadoutElements)[fReadoutElements->GetEntries()]) THnSparseC(Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
+                                                                            Form("MFTReadoutElemHist_%02d%03d", fPlaneNumber, fReadoutElements->GetEntries()), 
+                                                                            3, nBins, minPosition, maxPosition);
+
+      }
       
     }
     
@@ -410,6 +480,26 @@ Bool_t AliMFTPlane::CreateStructure() {
     
   }
   
+  // ------------------- support element -------------------------------------------------
+  
+  nBins[0] = 1;
+  nBins[1] = 1;
+  nBins[2] = 1;
+  
+  minPosition[0] = -1.*fRMaxSupport;
+  minPosition[1] = -1.*fRMaxSupport;
+  minPosition[2] = fZCenter - 0.5*fThicknessSupport;
+  
+  maxPosition[0] = +1.*fRMaxSupport;
+  maxPosition[1] = +1.*fRMaxSupport;
+  maxPosition[2] = fZCenter + 0.5*fThicknessSupport;
+  
+  new ((*fSupportElements)[fSupportElements->GetEntries()]) THnSparseC(Form("MFTSupportElemHist_%02d%03d", fPlaneNumber, fSupportElements->GetEntries()), 
+                                                                      Form("MFTSupportElemHist_%02d%03d", fPlaneNumber, fSupportElements->GetEntries()), 
+                                                                      3, nBins, minPosition, maxPosition);
+
+  // --------------------------------------------------------------------------------------
+
   AliDebug(1, Form("Structure completed for MFT plane %s", GetName()));
 
   return kTRUE;
index c0c96d8..e50da0b 100644 (file)
@@ -104,7 +104,7 @@ private:
 
   TClonesArray *fActiveElements, *fReadoutElements, *fSupportElements;
 
-  Bool_t fHasPixelRectangularPatternAlongY;
+  Bool_t fHasPixelRectangularPatternAlongY, fPlaneIsOdd;
 
   ClassDef(AliMFTPlane, 1)
 
index df8f270..3a5ba96 100644 (file)
@@ -54,13 +54,7 @@ public:
  
 protected:
 
-  static const Int_t fNMaxPlanes = AliMFTConstants::fNMaxPlanes;                // max number of MFT planes
-  static const Double_t fRadiusMin;             // minimum radial distance of the MFT sensors. To be carefully coordinated with fDetElemSuperposition
-  static const Double_t fDetElemSuperposition;  // superposition between bands tasselling the MFT planes, for having a full acceptance coverage
-                                                // even in case of 10 degrees inclined tracks
-  static const Double_t fHeightDetElem;         // height of the active volume bands composing the planes
-  static const Double_t fSupportExtMargin;      // minimum border size between the end of the support plane and the sensors
-
+  static const Int_t fNMaxPlanes          = AliMFTConstants::fNMaxPlanes;                // max number of MFT planes
   static const Int_t fNMaxDetElemPerPlane = AliMFTConstants::fNMaxDetElemPerPlane;
 
   TClonesArray *fMFTPlanes;