]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Strip units changed from 8x1 to 8x2 (T.Pocheptsov)
authorkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 1 Mar 2007 11:37:37 +0000 (11:37 +0000)
committerkharlov <kharlov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 1 Mar 2007 11:37:37 +0000 (11:37 +0000)
PHOS/AliPHOSEMCAGeometry.cxx
PHOS/AliPHOSEMCAGeometry.h
PHOS/AliPHOSv0.cxx
PHOS/AliPHOSv1.cxx

index 15d0714db3b1ce942a7b1ba9e56954462cf540cf..c8b0c579dcb2aaf46acca214ee5da7d6262664a8 100644 (file)
@@ -75,7 +75,8 @@ AliPHOSEMCAGeometry::AliPHOSEMCAGeometry():
                      fIPtoOuterCoverDistance(0.f),
                      fIPtoCrystalSurface(0.f),
                      fSupportPlateThickness(0.f),
-                     fNCellsInStrip(0),
+                     fNCellsXInStrip(0),
+                     fNCellsZInStrip(0),
                      fNStripX(0),
                      fNStripZ(0),
                      fNTSupports(0),
@@ -113,16 +114,17 @@ AliPHOSEMCAGeometry::AliPHOSEMCAGeometry():
   fPreampHalfSize[1] = 0.5 / 2 ;
   fPreampHalfSize[2] = 1.5 / 2 ;
 
-  //STRIP
+  //Strip unit (8x2 crystals)
 
-  fNCellsInStrip = 8 ;     //Number of crystals in strip
-  fNStripX = 8 ;           //Number of strips acros beam
-  fNStripZ = 56 ;          //Number of strips along beam
+  fNCellsXInStrip =  8 ;       //Number of crystals in strip unit along x-axis
+  fNCellsZInStrip =  2 ;       //Number of crystals in strip unit along z-axis
+  fNStripX        =  8 ;       //Number of strip units across along x-axis
+  fNStripZ        = 28 ;       //Number of strips along z-axis
 
-  fStripWallWidthOut = 0.01 ;     // Side to another strip  
-  fStripWallWidthIn  = 0.02 ;     // Side betveen crystals in one strip
+  fStripWallWidthOut = 0.01 ;  // Side to another strip  
+  fStripWallWidthIn  = 0.02 ;  // Side betveen crystals in one strip
 
-  fTyvecThickness = 0.01 ;        //Thickness of the tyvec
+  fTyvecThickness = 0.01 ;     //Thickness of the tyvec
 
   fAirGapLed = 1.5 - 2 * fPreampHalfSize[1] - 2 * fPinDiodeHalfSize[1] ; // Air gap before crystalls for LED system
                                            // Note, that Cell in Strip 1.5 longer then crystall
@@ -138,10 +140,11 @@ AliPHOSEMCAGeometry::AliPHOSEMCAGeometry():
                          2*fPinDiodeHalfSize[1] + 2*fWrappedHalfSize[1])/2 ;  //in strip
   fAirCellHalfSize[2] = fWrappedHalfSize[2]  ;                    //
 
-  fSupportPlateHalfSize[0] = ( (fNCellsInStrip-1)*fStripWallWidthIn + 2* fStripWallWidthOut + 
-                  fNCellsInStrip * (2 * fTyvecThickness + 2*fCrystalHalfSize[0]) )/2 ;
+  fSupportPlateHalfSize[0] = ( (fNCellsXInStrip-1)*fStripWallWidthIn + 2*fStripWallWidthOut + 
+                              fNCellsXInStrip * (2*fTyvecThickness + 2*fCrystalHalfSize[0]) )/2 ;
   fSupportPlateHalfSize[1] =  6.0  /2 ;
-  fSupportPlateHalfSize[2] =  ( 2 * fTyvecThickness + 2*fCrystalHalfSize[0] + 2*fStripWallWidthOut )/2 ;
+  fSupportPlateHalfSize[2] = ( (fNCellsZInStrip-1)*fStripWallWidthIn + 2*fStripWallWidthOut +
+                              fNCellsZInStrip * (2*fTyvecThickness + 2*fCrystalHalfSize[2]) )/2;
 
   fSupportPlateThickness = 0.3 ;  
   fSupportPlateInHalfSize[0] = fSupportPlateHalfSize[0] ;                         //Half-sizes of the air
@@ -362,7 +365,7 @@ AliPHOSEMCAGeometry::AliPHOSEMCAGeometry():
                  + fAlCoverParams[0]  ; //Lower size across the beam
   fEMCParams[2] = fWarmAlCoverHalfSize[1] ;                     // Size along the beam
 
-  fNPhi = fNStripX * fNCellsInStrip ;    //Number of crystalls across beam
-  fNZ   = fNStripZ ;                     //number of crystals along beam
+  fNPhi = fNStripX * fNCellsXInStrip ;    //number of crystals across the beam
+  fNZ   = fNStripZ * fNCellsZInStrip ;    //number of crystals along the beam
 }
 
index 2fc1f41024a234880ca304318c8211e34a1344a4..94145c11b38390b6ab6c57437f397645d98f1e79 100644 (file)
@@ -75,14 +75,13 @@ public:
     return fIPtoOuterCoverDistance ; }
   Float_t    GetCrystalSize(Int_t index)  const {return 2.*fCrystalHalfSize[index] ; }
 
-  
-  Int_t     GetNCellsInStrip() const { return fNCellsInStrip;}
-  Int_t     GetNStripX()       const { return fNStripX ; }
-  Int_t     GetNStripZ()       const { return fNStripZ ; }
-  Int_t     GetNTSuppots()     const { return fNTSupports; }
-  Int_t     GetNPhi(void)      const { return fNPhi ; }
-  Int_t     GetNZ(void)        const { return fNZ ; }
-
+  Int_t     GetNCellsXInStrip() const { return fNCellsXInStrip;}
+  Int_t     GetNCellsZInStrip() const { return fNCellsZInStrip;}
+  Int_t     GetNStripX()        const { return fNStripX ; }
+  Int_t     GetNStripZ()        const { return fNStripZ ; }
+  Int_t     GetNTSuppots()      const { return fNTSupports; }
+  Int_t     GetNPhi()           const { return fNPhi ; }
+  Int_t     GetNZ()             const { return fNZ ; }
  
 private:
 
@@ -168,7 +167,8 @@ private:
 
   Float_t fSupportPlateThickness ;        // Thickness of the Aluminium support plate for Strip   
 
-  Int_t  fNCellsInStrip ;              // Number of cells in a strip unit
+  Int_t  fNCellsXInStrip ;              // Number of cells in a strip unit in X
+  Int_t  fNCellsZInStrip ;              // Number of cells in a strip unit in Z
   Int_t  fNStripX ;                    // Number of strip units in X
   Int_t  fNStripZ ;                    // Number of strip units in Z
   Int_t  fNTSupports ;                 // geometry parameter
index 9fe4743a75a75716b0b8bc171ef10bad09ca867a..6eb5c1f69dd4d621a7897bb3cb4bf539b2a0b147 100644 (file)
@@ -17,6 +17,9 @@
 /* History of cvs commits:
  *
  * $Log$
+ * Revision 1.84  2006/12/20 16:56:43  kharlov
+ * Optional geometry without CPV
+ *
  * Revision 1.83  2006/11/14 17:11:15  hristov
  * Removing inheritances from TAttLine, TAttMarker and AliRndm in AliModule. The copy constructor and assignment operators are moved to the private part of the class and not implemented. The corresponding changes are propagated to the detectors
  *
@@ -429,9 +432,12 @@ void AliPHOSv0::CreateGeometryforEMC()
       y = -splate[1] ;
       Float_t* acel = emcg->GetAirCellHalfSize() ;
       Int_t icel ;
-      for(icel = 1; icel <= emcg->GetNCellsInStrip(); icel++){
-       Float_t x = (2*icel - 1 - emcg->GetNCellsInStrip())* acel[0] ;
-       gMC->Gspos("PCEL", icel, "PSTR", x, y, 0.0, 0, "ONLY") ;
+
+      for(Int_t lev = 2, icel = 1; icel <= emcg->GetNCellsXInStrip()*emcg->GetNCellsZInStrip(); icel += 2, lev += 2){
+         Float_t x = (2*(lev / 2) - 1 - emcg->GetNCellsXInStrip())* acel[0] ;
+         Float_t z = acel[2];
+         gMC->Gspos("PCEL", icel, "PSTR", x, y, +z, 0, "ONLY") ;
+         gMC->Gspos("PCEL", icel + 1, "PSTR", x, y, -z, 0, "ONLY") ;
       }
 
       // --- define the support plate, hole in it and position it in strip ----
@@ -930,8 +936,38 @@ void AliPHOSv0::AddAlignableVolumes() const
     gGeoManager->SetAlignableEntry(symname.Data(),volpath.Data());
   }
 
-  // Alignable strip units are not implemented yet (27.09.2006)
-
+  //Physical strip path is a combination of: physModulePath + module number + 
+  //physStripPath + strip number == ALIC_1/PHOS_N/..../PSTR_M
+  const Int_t nStripsX = GetGeometry()->GetEMCAGeometry()->GetNStripX();
+  const Int_t nStripsZ = GetGeometry()->GetEMCAGeometry()->GetNStripZ();
+  TString partialPhysStripName(100);
+  TString fullPhysStripName(100);
+  TString partialSymbStripName(100);
+  TString fullSymbStripName(100);
+
+  for(Int_t module = 1; module <= nModules; ++module){
+    partialPhysStripName  = physModulePath;
+    partialPhysStripName += module;
+    partialPhysStripName += "/PEMC_1/PCOL_1/PTIO_1/PCOR_1/PAGA_1/PTII_1/PSTR_";
+
+    partialSymbStripName  = symbModuleName;
+    partialSymbStripName += module;
+    partialSymbStripName += "/Strip_";
+
+    for(Int_t i = 0, ind1D = 1; i < nStripsX; ++i){//ind1D starts from 1 (PSTR_1...PSTR_224...)
+      for(Int_t j = 0; j < nStripsZ; ++j, ++ind1D){
+         fullPhysStripName = partialPhysStripName;
+         fullPhysStripName += ind1D;
+         
+         fullSymbStripName  = partialSymbStripName;
+         fullSymbStripName += i;//ind1D;
+         fullSymbStripName += '_';
+         fullSymbStripName += j;
+
+         gGeoManager->SetAlignableEntry(fullSymbStripName.Data(), fullPhysStripName.Data());
+      }
+    }
+  }
 }
 
 //____________________________________________________________________________
index f09bd25733cdb149541af28cf8479bd9bddd50cc..26256022e5c7b1297d1871d26082c0fb02e2e6e6 100644 (file)
@@ -18,6 +18,9 @@
 /* History of cvs commits:
  *
  * $Log$
+ * Revision 1.108  2007/02/02 09:40:50  alibrary
+ * Includes required by ROOT head
+ *
  * Revision 1.107  2007/02/01 10:34:47  hristov
  * Removing warnings on Solaris x86
  *
@@ -354,12 +357,16 @@ void AliPHOSv1::StepManager(void)
       Int_t cell ;
       gMC->CurrentVolOffID(2, cell);
       
-      Int_t row = 1 + GetGeometry()->GetNZ() - strip % GetGeometry()->GetNZ() ;
-      Int_t col = (Int_t) TMath::Ceil((Double_t) strip/GetGeometry()->GetNZ()) -1 ;
-      
+      //Old formula for row is wrong. For example, I have strip 56 (28 for 2 x 8), row must be 1.
+      //But row == 1 + 56 - 56 % 56 == 57 (row == 1 + 28 - 28 % 28 == 29)
+      //Int_t row = 1 + GetGeometry()->GetEMCAGeometry()->GetNStripZ() - strip % (GetGeometry()->GetEMCAGeometry()->GetNStripZ()) ;
+      Int_t row = GetGeometry()->GetEMCAGeometry()->GetNStripZ() - (strip - 1) % (GetGeometry()->GetEMCAGeometry()->GetNStripZ()) ;
+      Int_t col = (Int_t) TMath::Ceil((Double_t) strip/(GetGeometry()->GetEMCAGeometry()->GetNStripZ())) -1 ;
+
+      // Absid for 8x2-strips. Looks nice :) 
       absid = (moduleNumber-1)*GetGeometry()->GetNCristalsInModule() + 
-       row + (col*GetGeometry()->GetEMCAGeometry()->GetNCellsInStrip() + cell-1)*GetGeometry()->GetNZ() ;
-      
+                   row * 2 + (col*GetGeometry()->GetEMCAGeometry()->GetNCellsXInStrip() + (cell - 1) / 2)*GetGeometry()->GetNZ() - (cell & 1 ? 1 : 0);
+
       gMC->Gmtod(global, local, 1) ;
       
       //Calculates the light yield, the number of photons produced in the