]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
New version of the hybrid geometry: fixes to SDD simulation (L.Gaudichet)
authormasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 30 Apr 2007 15:24:10 +0000 (15:24 +0000)
committermasera <masera@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 30 Apr 2007 15:24:10 +0000 (15:24 +0000)
ITS/AliITSv11Hybrid.cxx
ITS/AliITSv11Hybrid.h

index 945e550345b7e9bacec57da9d192c845b9e53882..034acc3e6fcdcad1bbdcf41d670f7acd8e3968b5 100644 (file)
@@ -169,7 +169,7 @@ AliITSv11Hybrid::~AliITSv11Hybrid() {
 
 //______________________________________________________________________
 void AliITSv11Hybrid::SetT2Lmatrix(const char *name, Double_t dAlpha,
-                             Double_t dxSign, Double_t yShift, Bool_t yFlip)
+                     Double_t dxSign, Double_t yShift, Bool_t yFlip, Bool_t yRot180)
   const {
 
   //
@@ -188,6 +188,9 @@ void AliITSv11Hybrid::SetT2Lmatrix(const char *name, Double_t dAlpha,
   Double_t *gtrans = globMatrix->GetTranslation(), rotMatrix[9];
   memcpy(&rotMatrix[0], globMatrix->GetRotationMatrix(), 9*sizeof(Double_t));
   Double_t al = TMath::ATan2(rotMatrix[1],rotMatrix[0]) + dAlpha;
+  if (yRot180) {
+    al = TMath::ATan2(rotMatrix[1],-rotMatrix[0]) + dAlpha;
+  }
 
   TGeoHMatrix *matLtoT = new TGeoHMatrix;
   matLtoT->SetDx( dxSign*(gtrans[0]*TMath::Cos(al)+gtrans[1]*TMath::Sin(al)) ); // translation
@@ -196,7 +199,14 @@ void AliITSv11Hybrid::SetT2Lmatrix(const char *name, Double_t dAlpha,
   rotMatrix[0]= 0;  rotMatrix[1]= 1;  rotMatrix[2]= 0; // + rotation
   rotMatrix[3]= 1;  rotMatrix[4]= 0;  rotMatrix[5]= 0;
   rotMatrix[6]= 0;  rotMatrix[7]= 0;  rotMatrix[8]=-1;
-  if (yFlip) rotMatrix[3] = -1;  // flipping in y ? (for SPD1)
+  if (yFlip) rotMatrix[3] = -1;  // flipping in y  (for SPD1)
+
+  if (yRot180) { // rotation of pi around the axis perpendicular to the wafer
+    matLtoT->SetDy( -yShift );
+    rotMatrix[3] = -1;
+    matLtoT->SetDz(gtrans[2]);
+    rotMatrix[8]=1;
+  }
 
   TGeoRotation rot;
   rot.SetMatrix(rotMatrix);
@@ -381,7 +391,7 @@ void AliITSv11Hybrid::AddAlignableVolumes() const
        if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
          AliFatal("Unable to set alignable entry!!");
 
-       SetT2Lmatrix(strEntryName2.Data(), TMath::Pi(), -1, 0, kFALSE);
+       SetT2Lmatrix(strEntryName2.Data(), TMath::Pi(), -1, 0, kFALSE, c2>=3);
       }
     }
 
@@ -414,7 +424,7 @@ void AliITSv11Hybrid::AddAlignableVolumes() const
        if(!gGeoManager->SetAlignableEntry(strEntryName2.Data(),wafer.Data()))
          AliFatal("Unable to set alignable entry!!");  
 
-       SetT2Lmatrix(strEntryName2.Data(), TMath::Pi(), -1, 0, kFALSE);
+       SetT2Lmatrix(strEntryName2.Data(), TMath::Pi(), -1, 0, kFALSE, c2>=4);
       }
     }
 
@@ -622,6 +632,11 @@ void AliITSv11Hybrid::BuildGeometry(){
 //______________________________________________________________________
 void AliITSv11Hybrid::CreateGeometry() {
 
+  // Create the geometry and insert it in ALIC
+  // It calls first the CreateOldGeometry() routine which add the
+  // pieces coming from the old v10 geometry. Then the pieces from
+  // the new geometry are inserting in the mother volume ITSV.
+
   TGeoManager *geoManager = gGeoManager;
 
   CreateOldGeometry();
@@ -635,14 +650,8 @@ void AliITSv11Hybrid::CreateGeometry() {
 
 //______________________________________________________________________
 void AliITSv11Hybrid::CreateOldGeometry(){
-    //    This routine defines and Creates the geometry for version 10 of 
-    // the ITS.
-    // Inputs:
-    //   none.
-    // Outputs:
-    //   none.
-    // Return:
-    //   none.
+  //    This routine defines and creates some pieces of the geometry
+  // of version 10 (AliITSvPPRasymmFMD)
 
     //Begin_Html
     /*
index 082cd387c4a8d6503809e4c6aaa4217ed520d30b..bef9dc611a9b060ceddce8c8e90e7555440b7be0 100644 (file)
@@ -106,7 +106,7 @@ class AliITSv11Hybrid : public AliITS {
  protected:
     void CreateOldGeometry();
     void SetT2Lmatrix(const char *name, Double_t dAlpha, Double_t dxSign,
-                     Double_t yShift, Bool_t yFlip) const; // Set T2L matrix in TGeoPNEntries
+                     Double_t yShift, Bool_t yFlip, Bool_t yRot180=kFALSE) const; // Set T2L matrix in TGeoPNEntries
 
  private:
     AliITSv11Hybrid(const AliITSv11Hybrid &source); // copy constructor