From f57bb418d9abd3319ad2be0388b9a8e4889c0bc6 Mon Sep 17 00:00:00 2001 From: cblume Date: Mon, 2 Oct 2006 16:34:26 +0000 Subject: [PATCH] Implement symbolic links --- TRD/AliTRDv1.cxx | 94 ++++++++++++++++++++++++++++++++++++++++++++---- TRD/AliTRDv1.h | 1 + 2 files changed, 89 insertions(+), 6 deletions(-) diff --git a/TRD/AliTRDv1.cxx b/TRD/AliTRDv1.cxx index cd16a1f8eb6..679413ee103 100644 --- a/TRD/AliTRDv1.cxx +++ b/TRD/AliTRDv1.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include "AliConst.h" #include "AliLog.h" @@ -158,6 +159,87 @@ void AliTRDv1::Copy(TObject &trd) const } +//_____________________________________________________________________________ +void AliTRDv1::AddAlignableVolumes() const +{ + // + // Create entries for alignable volumes associating the symbolic volume + // name with the corresponding volume path. Needs to be syncronized with + // eventual changes in the geometry. + // + + TString volPath; + TString symName; + + TString vpStr = "ALIC_1/B077_1/BSEGMO"; + TString vpApp1 = "_1/BTRD"; + TString vpApp2 = "_1"; + TString vpApp3 = "/UTR1_1/UTS1_1/UTI1_1/UT"; + + TString snStr = "TRD/sm"; + TString snApp1 = "/st"; + TString snApp2 = "/pl"; + + // + // The super modules + // The symbolic names are: TRD/sm00 + // ... + // TRD/sm17 + // + for (Int_t isect = 0; isect < AliTRDgeometry::Nsect(); isect++) { + + volPath = vpStr; + volPath += isect; + volPath += vpApp1; + volPath += isect; + volPath += vpApp2; + + symName = snStr; + symName += Form("%02d",isect); + + gGeoManager->SetAlignableEntry(symName.Data(),volPath.Data()); + + } + + // + // The readout chambers + // The symbolic names are: TRD/sm00/st0/pl0 + // ... + // TRD/sm17/st4/pl5 + // + for (Int_t isect = 0; isect < AliTRDgeometry::Nsect(); isect++) { + for (Int_t icham = 0; icham < AliTRDgeometry::Ncham(); icham++) { + for (Int_t iplan = 0; iplan < AliTRDgeometry::Nplan(); iplan++) { + + Int_t idet = AliTRDgeometry::GetDetectorSec(iplan,icham); + + volPath = vpStr; + volPath += isect; + volPath += vpApp1; + volPath += isect; + volPath += vpApp2; + volPath += vpApp3; + volPath += Form("%02d",idet); + volPath += vpApp2; + + symName = snStr; + symName += Form("%02d",isect); + symName += snApp1; + symName += icham; + symName += snApp2; + symName += iplan; + + printf("volPath=%s\n",volPath.Data()); + printf("symName=%s\n",symName.Data()); + + gGeoManager->SetAlignableEntry(symName.Data(),volPath.Data()); + + } + } + } + +} + //_____________________________________________________________________________ void AliTRDv1::CreateGeometry() { @@ -989,11 +1071,11 @@ Double_t AliTRDv1::BetheBloch(Double_t bg) // // This parameters have been adjusted to averaged values from GEANT - const Double_t kP1 = 7.17960e-02; - const Double_t kP2 = 8.54196; - const Double_t kP3 = 1.38065e-06; - const Double_t kP4 = 5.30972; - const Double_t kP5 = 2.83798; + const Double_t kP1 = 7.17960e-02; + const Double_t kP2 = 8.54196; + const Double_t kP3 = 1.38065e-06; + const Double_t kP4 = 5.30972; + const Double_t kP5 = 2.83798; // Lower cutoff of the Bethe-Bloch-curve to limit step sizes const Double_t kBgMin = 0.8; @@ -1178,6 +1260,6 @@ Double_t IntSpecGeant(Double_t *x, Double_t *) AliErrorGeneral("AliTRDv1::IntSpecGeant","Given energy value is too small or zero"); } - return arrdnde[i]; + return arrdnde[i]; } diff --git a/TRD/AliTRDv1.h b/TRD/AliTRDv1.h index bad7187ca9e..65de0ad989a 100644 --- a/TRD/AliTRDv1.h +++ b/TRD/AliTRDv1.h @@ -38,6 +38,7 @@ class AliTRDv1 : public AliTRD { virtual void Init(); virtual Int_t IsVersion() const { return 1; } + virtual void AddAlignableVolumes() const; virtual void CreateGeometry(); virtual void CreateMaterials(); virtual void CreateTRhit(Int_t det); -- 2.43.0