]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
adding tracking-to-local matrices for new AliTOFcluster
authorarcelli <arcelli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 3 Oct 2007 10:41:16 +0000 (10:41 +0000)
committerarcelli <arcelli@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 3 Oct 2007 10:41:16 +0000 (10:41 +0000)
TOF/AliTOFv5T0.cxx
TOF/AliTOFv6T0.cxx

index 7bb272afe6044772ac345780176dfe2937871112..b67d92482b7476dec49836b7367abe3be759c2d9 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.18  2007/07/27 08:14:48  morsch
+Write all track references into the same branch.
+
 Revision 1.17  2007/05/14 14:41:13  decaro
 Fix a bug in FTOA volume positionig inside BTOF13,14,15,16,17 in case of holes in 11th and 12th sectors
 
@@ -103,6 +106,9 @@ Revision 0.1 2004 November G. Cara Romeo and A. De Caro
 #include "TNode.h"
 #include "TVirtualMC.h"
 #include "TGeoManager.h"
+#include <TGeoMatrix.h>
+#include <TGeoPhysicalNode.h>
+#include <TGeoVolume.h>
 
 #include "AliConst.h"
 #include "AliLog.h"
@@ -245,6 +251,24 @@ void AliTOFv5T0::AddAlignableVolumes() const
       AliDebug(2,"--------------------------------------------"); 
              
       gGeoManager->SetAlignableEntry(symName.Data(),volPath.Data());
+
+      //T2L matrices for alignment
+      TGeoPNEntry *e = gGeoManager->GetAlignableEntry(symName.Data());
+      if (e) {
+       const char *path = e->GetTitle();
+       if (!gGeoManager->cd(path)) {
+         AliFatal(Form("Volume path %s not valid!",path));
+       }
+       TGeoHMatrix *globMatrix = gGeoManager->GetCurrentMatrix();
+       Double_t phi = 20.0 * (isect % 18) + 10.0;
+       TGeoHMatrix *t2l  = new TGeoHMatrix();
+       t2l->RotateZ(phi);
+       t2l->MultiplyLeft(&(globMatrix->Inverse()));
+       e->SetMatrix(t2l);
+      }
+      else {
+       AliError(Form("Alignable entry %s is not valid!",symName.Data()));
+      }
       imod++;
     }
   }
index 2c2dd7009f290628606df192925d7095c09777c0..40d6d0105e964c62541a388e26e957e917a7bbd4 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.5  2007/07/27 08:14:48  morsch
+Write all track references into the same branch.
+
 Revision 1.4  2007/05/29 16:51:05  decaro
 Update of the front-end electronics and cooling system description
 
@@ -74,6 +77,9 @@ Revision 0.1 2007 March G. Cara Romeo and A. De Caro
 #include "TNode.h"
 #include "TVirtualMC.h"
 #include "TGeoManager.h"
+#include <TGeoMatrix.h>
+#include <TGeoPhysicalNode.h>
+#include <TGeoVolume.h>
 
 #include "AliConst.h"
 #include "AliLog.h"
@@ -216,6 +222,25 @@ void AliTOFv6T0::AddAlignableVolumes() const
       AliDebug(2,"--------------------------------------------"); 
              
       gGeoManager->SetAlignableEntry(symName.Data(),volPath.Data());
+
+      //T2L matrices for alignment
+      TGeoPNEntry *e = gGeoManager->GetAlignableEntry(symName.Data());
+      if (e) {
+       const char *path = e->GetTitle();
+       if (!gGeoManager->cd(path)) {
+         AliFatal(Form("Volume path %s not valid!",path));
+       }
+       TGeoHMatrix *globMatrix = gGeoManager->GetCurrentMatrix();
+       Double_t phi = 20.0 * (isect % 18) + 10.0;
+       TGeoHMatrix *t2l  = new TGeoHMatrix();
+       t2l->RotateZ(phi);
+       t2l->MultiplyLeft(&(globMatrix->Inverse()));
+       e->SetMatrix(t2l);
+      }
+      else {
+       AliError(Form("Alignable entry %s is not valid!",symName.Data()));
+      }
+
       imod++;
     }
   }