Update of the ACORDE's Geometry (Mario)
authormrodrigu <mrodrigu@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Nov 2009 11:29:17 +0000 (11:29 +0000)
committermrodrigu <mrodrigu@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 18 Nov 2009 11:29:17 +0000 (11:29 +0000)
ACORDE/AliACORDE.cxx
ACORDE/AliACORDE.h
ACORDE/AliACORDEConstants.cxx
ACORDE/AliACORDEConstants.h
ACORDE/AliACORDEv0.cxx
ACORDE/AliACORDEv1.cxx
ACORDE/AliACORDEv1.h

index a34e33e..ae22d93 100644 (file)
@@ -56,7 +56,7 @@ ClassImp(AliACORDE)
 AliACORDE::AliACORDE()
   : AliDetector(),
     fCreateCavern(0),
-    fITSGeometry(0)
+    f4CentralModulesGeometry(0)
 {
   //
   // Default constructor
@@ -67,7 +67,7 @@ AliACORDE::AliACORDE()
 AliACORDE::AliACORDE(const char *name, const char *title)
   : AliDetector(name, title),
     fCreateCavern(kFALSE),
-    fITSGeometry(kTRUE)
+    f4CentralModulesGeometry(kTRUE)
 
 {
   //
index 62be8e8..b77606a 100644 (file)
@@ -42,16 +42,16 @@ public:
   virtual Bool_t Raw2SDigits(AliRawReader*);
 
   virtual void SetCreateCavern(Bool_t b) {fCreateCavern = b;}
-  virtual void SetITSGeometry(Bool_t b) {fITSGeometry = b;}
+  virtual void Set4CentralModulesGeometry(Bool_t b) {f4CentralModulesGeometry = b;}
   virtual Bool_t GetCreateCavern() const {return fCreateCavern;}
-  virtual Bool_t GetITSGeometry() const {return fITSGeometry;}
+  virtual Bool_t Get4CentralModulesGeometry() const {return f4CentralModulesGeometry;}
 
 private:
   AliACORDE(const AliACORDE& crt);
   AliACORDE& operator=(const AliACORDE& crt);
 
   Bool_t fCreateCavern;
-  Bool_t fITSGeometry;
+  Bool_t f4CentralModulesGeometry;
 
   ClassDef(AliACORDE, 1) // Cosmic Ray Trigger (ACORDE) base class
 };
index 4651f87..2305d21 100644 (file)
 AliACORDEConstants* AliACORDEConstants::fgInstance = 0;
 
 const Float_t AliACORDEConstants::fgkModuleLength          = 300.0;
-const Float_t AliACORDEConstants::fgkModuleWidth           = 26.0;
+const Float_t AliACORDEConstants::fgkModuleWidth           = 24.0;
 const Float_t AliACORDEConstants::fgkModuleHeight          =  10.0;
 const Float_t AliACORDEConstants::fgkPlasticLength = 190.0;
-const Float_t AliACORDEConstants::fgkPlasticWidth  =  20.0;
+const Float_t AliACORDEConstants::fgkPlasticWidth  =  19.5;
 const Float_t AliACORDEConstants::fgkPlasticHeight =   1.0;
 const Float_t AliACORDEConstants::fgkProfileWidth =    3.8;
 const Float_t AliACORDEConstants::fgkProfileThickness = 0.3;
 const Float_t AliACORDEConstants::fgkDepth               =4420; 
 
-const Float_t AliACORDEConstants::fgkHitEnergyThreshold = 1.52; // MeV
-const Float_t AliACORDEConstants::fgkMaxHitTimeDifference = 40.0; // ns
+const Float_t AliACORDEConstants::fgkHitEnergyThreshold = 1.52; // MeVs
+const Float_t AliACORDEConstants::fgkMaxHitTimeDifference = 40.0; // nanoseconds
 const Int_t AliACORDEConstants::fgkMultiMuonThreshold = 2;
 const Float_t AliACORDEConstants::fgkMultiMuonWindow = 25;
-const Float_t AliACORDEConstants::fgkModulePositionX[60] = {
+const Float_t AliACORDEConstants::fgkInsideModulePositionX[60] ={
+149.831, 743.687, 744.367, 744.4, 744.535, 745.991, 745.41,0,0, 151.197,
+529.449, 529.76, 529.911, 529.911, 530.172,529.709, 529.692, 529.597, 528.859, 528.131,
+304.946, 304.472, 304.092, 303.734, 303.165, 303.301, 303.195, 303.422, 303.927, 304.091,
+-3.974, -3.806, -2.984, -2.855, -3.042, -3.124, -3.395, -2.774, -3.072, -2.897,
+-319.384, -318.925, 0,-318.133, -317.404, -317.365, -316.973, -317.222,-317.564,-317.913,
+149.892, -537.461, -537.75, -537.327,-536.877, -502.826, -506.978,-531.402,-530.587,149.541};
+const Float_t AliACORDEConstants::fgkInsideModulePositionY[60] ={
+860.235, 486.767, 486.763, 487.156, 487.018, 485.638, 486.394, 0,0,859.869,
+700.202, 700.11, 700.345, 700.746, 701.481, 701.662, 701.925, 701.51, 701.64, 702.098,
+859.937, 859.712, 859.738, 859.788, 859.88, 860.278, 860.155, 860.131, 860.14, 859.731,
+860.096, 860.035, 860.416, 860.451, 860.655, 860.445, 860.601, 860.275, 860.623, 860.665,
+916.198, 916.005, 0, 915.731, 915.768, 914.931, 914.708, 914.794, 915.021, 915.084,
+860.287, 692.384, 692.392, 693.071, 692.86, 725.954, 722.077, 698.292, 698.883, 860.37};
+const Float_t AliACORDEConstants::fgkInsideModulePositionZ[60] ={
+88.372, 348.682, 246.52, 147.039, 48.754, -51.643, -120.342, 0,0, 15.526,
+447.027, 348.189, 249.102, 147.577, 47.405, -50.559, -150.334, -251.987, -348.106, -449.947,
+448.725, 348.555, 248.541, 148.55, 48.717, -51.631, -151.254, -251.632, -351.217,-451.428,
+453.195, 349.899, 249.957, 150.162, 50.603, -49.562, -149.784, -250.068, -349.753, -450.307,
+449.871, 351.462, 0, 144.424, 48.172, -52.382, -153.346, -252.389, -353.167, -454.27,
+-13.83, 350.436, 248.14, 107.763, 46.085, -85.097, -184.909, -258.298, -349.324, -113.94}; 
+const Float_t AliACORDEConstants::fgkCenterModulePositionX[60] = {
+-1.733 , 637.6  , 638.1095, 637.888, 637.8125, 639.579 , 638.63  , 639.332, 639.28  , -0.869,
+423.5795, 423.693, 423.795 , 423.452, 423.274,  422.9885, 422.8995, 423.166, 422.7265, 422.1595,
+153.119 , 152.362, 152.065 , 151.976, 151.518,  155.316,  151.427,  151.642, 152.465 , 151.93,
+-151.171, -152.082,-155.098, -155.141,-159.922, -155.124, -155.629, -154.709,-155.223, -154.841,
+-423.037,  -422.772, -426,-422.229,-421.756, -422.053, -422.1545, -422.0375,-422.135,-422.311,
+1.637, -643.0205,-643.1815,-642.6285, -642.5675, -610.356, -614.177, -637.256, -636.576, -2.157};
+const Float_t AliACORDEConstants::fgkCenterModulePositionY[60] = {
+859.72, 592.766, 592.428, 592.81, 592.68, 591.3185, 592.017, 590.053, 590.077, 859.516,
+806.5215, 806.3125, 806.312, 806.4895, 806.6705, 807.0455, 807.335, 807.187, 807.615, 808.141,
+859.493, 859.044, 859.285, 859.422, 859.396, 859.597, 859.624, 859.677, 859.482, 859.417, 
+859.669, 859.494, 859.527, 859.774, 859.486, 859.499, 859.491, 859.505, 859.823, 859.747,
+807.771, 807.671, 807.6, 807.5765, 807.9485, 807.2915, 807.82, 807.445, 807.366, 807.331,
+859.525, 585.937, 585.616, 586.0805, 586.221, 618.107, 614.02, 591.9165, 592.588, 859.739};
+const Float_t AliACORDEConstants::fgkCenterModulePositionZ[60] = {
+87.187, 348.1785, 247.3485, 147.058, 48.413, -49.9585, -121.0015, -281.09, -349.005, 16.161,
+447.538, 348.676, 250.728, 146.9505, 47.299, -50.535, -150.6745, -249.6215, -348.2345, -449.8365,
+449.018, 349.157, 249.406, 149.052, 49.198, -50.944, -150.735, -250.661,-350.989,  -450.826, 
+452.428, 349.194, 249.399, 149.286, 49.493, -51.392, -150.955, -251.476, -351.018, -451.487, 
+446.97,  350.215, 250.215, 146.4975,44.1585, -50.8225, -147.4875, -254.989, -352.524, -448.606, 
+-14.146, 349.752, 249.0625, 105.4995, 44.571, -81.677, -181.26, -258.498, -349.4315, -113.948};
+const Float_t AliACORDEConstants::fgkOutsideModulePositionX[60] ={
+-149.874, 531.513, 531.852, 531.376, 531.09, 533.167, 531.85, 531.587, 531.878, -148.895,
+317.71, 317.626, 317.679, 316.993, 316.376, 316.268, 316.105, 316.735, 316.594, 316.188,
+5.086, 4.271, 4.228, 3.875, 3.38, 3.425, 3.402, 3.534, 4.237, 4.199,
+-303.888, -303.866, -303.157, -302.97, -302.994, -303.264, -303.36, -302.872, -303.247,-302.837,
+-526.69, -526.619, -526.568, -526.325, -526.108, -526.741, -527.336, -526.853, -526.706, -526.709,
+-150.248, -748.58, -748.613, -747.93, -748.258, 0, 0,-743.11, -742.565, -150.26};
+const Float_t AliACORDEConstants::fgkOutsideModulePositionY[60] ={
+860.564, 698.765, 698.093, 698.464, 698.342, 696.999, 697.64, 697.851, 697.969, 860.44,
+912.841, 912.515, 912.279, 912.233, 911.86, 912.429, 912.745, 912.864, 913.59, 914.184,
+860.42, 860.067, 860.278, 860.318, 860.285, 860.28, 860.466, 860.362, 860.222, 860.322,
+860.563, 860.247, 859.991, 860.354, 860.06, 860.056, 859.686, 860.074, 860.463, 860.343,
+699.344, 699.337, 698.834, 699.422, 700.129, 699.652, 700.932, 700.096, 699.711, 699.578,
+860.159, 479.49, 478.84, 479.09, 479.582, 0,0,485.541, 486.293, 860.416};
+const Float_t AliACORDEConstants::fgkOutsideModulePositionZ[60] ={
+85.538, 347.675, 248.177, 147.077, 48.072, -48.274, -121.661, -281.827, -347.063, 16.81,
+448.049, 349.163, 252.354, 146.324,47.193, -50.511, -151.015, -247.256, -348.363, -449.726,
+449.235, 349.438, 249.614, 149.883, 49.413, -49.848, -149.932, -250.458, -350.314, -450.194,
+451.868, 348.663, 248.448, 148.685, 48.844, -52.617, -152.185, -251.881, -352.541, -452.442, 
+444.069, 348.968, 247.813, 148.571, 40.145, -49.263, -141.629, -257.589, -351.881, -442.942,
+-14.142, 349.068, 249.985, 103.236, 43.057, 0, 0, -258.698, -349.539, -114.16}; 
+const Float_t AliACORDEConstants::fgkOldModulePositionX[60] = {
   641, 641, 641, 641, 641, 641, 641, 641, 641, 641,
   426, 426, 426, 426, 426, 426, 426, 426, 426, 426,
   153, 153, 153, 153, 153, 153, 153, 153, 153, 153,
@@ -53,14 +116,14 @@ const Float_t AliACORDEConstants::fgkModulePositionX[60] = {
   -153, -426, -426, -426, -426, -426, -426, -426, -426,
   -426, -426, -644, -644, -644, -644, -644, -619, -623,
   -641, -641, -641};
-const Float_t AliACORDEConstants::fgkModulePositionY[60] = {
+const Float_t AliACORDEConstants::fgkOldModulePositionY[60] = {
   582, 574, 574, 574, 574, 574, 574, 574, 574, 582,
   789, 789, 789, 789, 789, 789, 789, 789, 789, 789,
   850, 850, 850, 850, 850, 850, 850, 850, 850, 850,
   850, 850, 850, 850, 850, 850, 850, 850, 850, 850,
   789, 789, 789, 789, 789, 789, 789, 789, 789, 789,
   582, 574, 574, 574, 574, 601, 597, 574, 574, 582};
-const Float_t AliACORDEConstants::fgkModulePositionZ[60] = {
+const Float_t AliACORDEConstants::fgkOldModulePositionZ[60] = {
   450, 350, 250, 150, 50, -50, -120, -280, -350, -450,
   450, 350, 250, 150, 50, -50, -150, -250, -350, -450,
   450, 350, 250, 150, 50, -50, -150, -250, -350, -450,
@@ -93,10 +156,11 @@ const Float_t AliACORDEConstants::fgkSupportModulePositionZ[60] = {
   450, 350, 250, 104, 50, -85, -176, -250, -350, -450};
   
 
-const Float_t AliACORDEConstants::fgkExtraModulePositionZ[4] = {93.0, 18., -18, -93};
-const Float_t AliACORDEConstants::fgkExtraModulePositionX = 0.0;
-const Float_t AliACORDEConstants::fgkExtraModulePositionY = 850.0;
-const Int_t AliACORDEConstants::fgkModuleElectronicChannel[60] = {
+const Float_t AliACORDEConstants::fgkOldExtraModulePositionZ[4] = {93.0, 18., -18, -93};
+const Float_t AliACORDEConstants::fgkOldExtraModulePositionX = 0.0;
+const Float_t AliACORDEConstants::fgkOldExtraModulePositionY = 850.0;
+const Int_t AliACORDEConstants::fgkOldModuleElectronicChannel[60] = {
+// Old configuration of ACORDE channels in patch panel cards used ONLY in cosmic runs from 2008
 /* DCS 0_0 ITS-1*/ 10,
 /* DCS 0_1 */ 4,
 /* DCS 0_2 */ 8,
@@ -187,23 +251,68 @@ AliACORDEConstants::~AliACORDEConstants()
 }
 
 //_____________________________________________________________________________
-Float_t AliACORDEConstants::ModulePositionX(Int_t i) const
+Float_t AliACORDEConstants::InsideModulePositionX(Int_t i) const
+{
+       return fgkInsideModulePositionX[i];
+}
+//_____________________________________________________________________________
+Float_t AliACORDEConstants::InsideModulePositionY(Int_t i) const
+{
+       return fgkInsideModulePositionY[i];
+}
+//_____________________________________________________________________________
+Float_t AliACORDEConstants::InsideModulePositionZ(Int_t i) const
+{      
+       return fgkInsideModulePositionZ[i];
+}
+//_____________________________________________________________________________
+Float_t AliACORDEConstants::CenterModulePositionX(Int_t i) const
+{
+       return fgkCenterModulePositionX[i];
+}
+//_____________________________________________________________________________
+Float_t AliACORDEConstants::CenterModulePositionY(Int_t i) const
+{
+       return fgkCenterModulePositionY[i];
+}
+//_____________________________________________________________________________
+Float_t AliACORDEConstants::CenterModulePositionZ(Int_t i) const
+{      
+       return fgkCenterModulePositionZ[i];
+}
+//_____________________________________________________________________________
+Float_t AliACORDEConstants::OutsideModulePositionX(Int_t i) const
+{
+       return fgkOutsideModulePositionX[i];
+}
+//_____________________________________________________________________________
+Float_t AliACORDEConstants::OutsideModulePositionY(Int_t i) const
+{
+       return fgkOutsideModulePositionY[i];
+}
+//_____________________________________________________________________________
+Float_t AliACORDEConstants::OutsideModulePositionZ(Int_t i) const
+{      
+       return fgkOutsideModulePositionZ[i];
+}
+//_____________________________________________________________________________
+Float_t AliACORDEConstants::OldModulePositionX(Int_t i) const
 {
   // Module lenght
-  return fgkModulePositionX[i];
+  return fgkOldModulePositionX[i];
 }
 
 //_____________________________________________________________________________
-Float_t AliACORDEConstants::ModulePositionY(Int_t i) const
+Float_t AliACORDEConstants::OldModulePositionY(Int_t i) const
 {
   // Module lenght
-  return fgkModulePositionY[i];
+  return fgkOldModulePositionY[i];
 }
 //_____________________________________________________________________________
-Float_t AliACORDEConstants::ModulePositionZ(Int_t i) const
+Float_t AliACORDEConstants::OldModulePositionZ(Int_t i) const
 {
   // Module lenght
-  return fgkModulePositionZ[i];
+  return fgkOldModulePositionZ[i];
 }
 
 
@@ -229,30 +338,30 @@ Float_t AliACORDEConstants::SupportModulePositionZ(Int_t i) const
 
 
 
-Float_t AliACORDEConstants::ExtraModulePositionX() const
+Float_t AliACORDEConstants::OldExtraModulePositionX() const
 {
   // Module lenght
-  return fgkExtraModulePositionX;
+  return fgkOldExtraModulePositionX;
 }
 
 //_____________________________________________________________________________
-Float_t AliACORDEConstants::ExtraModulePositionY() const
+Float_t AliACORDEConstants::OldExtraModulePositionY() const
 {
   // Module lenght
-  return fgkExtraModulePositionY;
+  return fgkOldExtraModulePositionY;
 }
 //_____________________________________________________________________________
-Float_t AliACORDEConstants::ExtraModulePositionZ(Int_t i) const
+Float_t AliACORDEConstants::OldExtraModulePositionZ(Int_t i) const
 {
   // Module lenght
-  return fgkExtraModulePositionZ[i];
+  return fgkOldExtraModulePositionZ[i];
 }
 //_____________________________________________________________________________
-Int_t AliACORDEConstants::ModuleElectronicChannel(Int_t i) const
+Int_t AliACORDEConstants::OldModuleElectronicChannel(Int_t i) const
 {
        // return de ID (electronic channel in ACORDE) of each module
        // acording to the current match between DCS and Electronic nomenclature
-       return fgkModuleElectronicChannel[i];
+       return fgkOldModuleElectronicChannel[i];
 }
 //_____________________________________________________________________________
 Float_t AliACORDEConstants::ModuleLength() const
index 5f0eb68..d3b16cf 100644 (file)
@@ -37,16 +37,25 @@ public:
   Float_t ModuleLength() const;
   Float_t ModuleWidth() const;
   Float_t ModuleHeight() const;
-  Float_t ModulePositionX(Int_t i) const;
-  Float_t ModulePositionY(Int_t i) const;
-  Float_t ModulePositionZ(Int_t i) const;
+  Float_t InsideModulePositionX(Int_t i) const;
+  Float_t InsideModulePositionY(Int_t i) const;
+  Float_t InsideModulePositionZ(Int_t i) const;
+  Float_t CenterModulePositionX(Int_t i) const;
+  Float_t CenterModulePositionY(Int_t i) const;
+  Float_t CenterModulePositionZ(Int_t i) const;
+  Float_t OutsideModulePositionX(Int_t i) const;
+  Float_t OutsideModulePositionY(Int_t i) const;
+  Float_t OutsideModulePositionZ(Int_t i) const;
+  Float_t OldModulePositionX(Int_t i) const;
+  Float_t OldModulePositionY(Int_t i) const;
+  Float_t OldModulePositionZ(Int_t i) const;
   Float_t SupportModulePositionX(Int_t i) const;
   Float_t SupportModulePositionY(Int_t i) const;
   Float_t SupportModulePositionZ(Int_t i) const;
-  Float_t ExtraModulePositionZ(Int_t i) const;
-  Int_t ModuleElectronicChannel(Int_t i) const;
-  Float_t ExtraModulePositionX() const;
-  Float_t ExtraModulePositionY() const;
+  Float_t OldExtraModulePositionZ(Int_t i) const;
+  Int_t OldModuleElectronicChannel(Int_t i) const;
+  Float_t OldExtraModulePositionX() const;
+  Float_t OldExtraModulePositionY() const;
   Float_t PlasticLength() const;
   Float_t PlasticWidth() const;
   Float_t PlasticHeight() const;
@@ -70,16 +79,25 @@ protected:
   static const Float_t fgkModuleLength; // Module lenght
   static const Float_t fgkModuleWidth;  // Module width
   static const Float_t fgkModuleHeight; // Module height
-  static const Float_t fgkModulePositionX[60]; // position in ALICE
-  static const Float_t fgkModulePositionY[60]; // of center of module
-  static const Float_t fgkModulePositionZ[60]; 
+  static const Float_t fgkInsideModulePositionX[60]; 
+  static const Float_t fgkInsideModulePositionY[60];
+  static const Float_t fgkInsideModulePositionZ[60];
+  static const Float_t fgkCenterModulePositionX[60];
+  static const Float_t fgkCenterModulePositionY[60];
+  static const Float_t fgkCenterModulePositionZ[60];
+  static const Float_t fgkOutsideModulePositionX[60];
+  static const Float_t fgkOutsideModulePositionY[60];
+  static const Float_t fgkOutsideModulePositionZ[60];
+  static const Float_t fgkOldModulePositionX[60]; // OLD position in ALICE
+  static const Float_t fgkOldModulePositionY[60]; // of center of module
+  static const Float_t fgkOldModulePositionZ[60]; 
   static const Float_t fgkSupportModulePositionX[60];
   static const Float_t fgkSupportModulePositionY[60];
   static const Float_t fgkSupportModulePositionZ[60];
-  static const Float_t fgkExtraModulePositionZ[4];
-  static const Float_t fgkExtraModulePositionX;
-  static const Float_t fgkExtraModulePositionY;
-  static const Int_t fgkModuleElectronicChannel[60];
+  static const Float_t fgkOldExtraModulePositionZ[4];
+  static const Float_t fgkOldExtraModulePositionX;
+  static const Float_t fgkOldExtraModulePositionY;
+  static const Int_t fgkOldModuleElectronicChannel[60];
 
   static const Float_t fgkPlasticLength; // Plastic length
   static const Float_t fgkPlasticWidth;  // Plastic width
index cebb791..013311d 100644 (file)
 //  This class contains the functions for version 0 of the ALICE Cosmic Ray  //
 //  Trigger. This version will be used to simulation comic rays in alice with//
 //  all the detectors. It include geometry and hits (posicion and momentum)  //
+//                                                                          // 
+//   Author: Enrique Gamez                                                   //
 //                                                                           //
 //                  Send comments to:                                        //
 //      Arturo Fernandez <afernand@fcfm.buap.mx>                             //
-//      Enrique Gamez    <egamez@fcfm.buap.mx>                               //
 //      Eleazar Cuautle  <ecuautle@nucleares.unam.mx>                        //
+//                                                                          //
+//     Last update: Nov. 17th. 2009                                         //
+//     Mario Rodriguez Cahuantzi <mrodrigu@mail.cern.ch                     //
+//     FCFM-BUAP, Puebla, Pue. Mexico                                       //
+//                                                                          //
 ///////////////////////////////////////////////////////////////////////////////
 
 
@@ -525,80 +531,80 @@ void AliACORDEv0::CreateAcorde()
   // first column, except first and last  modules
   for (Int_t copy = 2; copy < 10; copy++)
     gMC->Gspos("ACORDE1",copy,"ALIC",
-              constants->ModulePositionX(copy-1),
-              constants->ModulePositionY(copy-1),
-              constants->ModulePositionZ(copy-1),
+              constants->OldModulePositionX(copy-1),
+              constants->OldModulePositionY(copy-1),
+              constants->OldModulePositionZ(copy-1),
               idrotm[232], "MANY");
   // second column
   for (Int_t copy = 11; copy < 21; copy++)
     gMC->Gspos("ACORDE1",copy,"ALIC",
-              constants->ModulePositionX(copy-1),
-              constants->ModulePositionY(copy-1),
-              constants->ModulePositionZ(copy-1),
+              constants->OldModulePositionX(copy-1),
+              constants->OldModulePositionY(copy-1),
+              constants->OldModulePositionZ(copy-1),
               idrotm[232], "MANY");
   // third and fourth columns
   for (Int_t copy = 21; copy < 41; copy++)
     gMC->Gspos("ACORDE1",copy,"ALIC",
-              constants->ModulePositionX(copy-1),
-              constants->ModulePositionY(copy-1),
-              constants->ModulePositionZ(copy-1),
+              constants->OldModulePositionX(copy-1),
+              constants->OldModulePositionY(copy-1),
+              constants->OldModulePositionZ(copy-1),
               0, "MANY");
   // fifth column
   for (Int_t copy = 41; copy < 51; copy++)
     gMC->Gspos("ACORDE1",copy,"ALIC",
-              constants->ModulePositionX(copy-1),
-              constants->ModulePositionY(copy-1),
-              constants->ModulePositionZ(copy-1),
+              constants->OldModulePositionX(copy-1),
+              constants->OldModulePositionY(copy-1),
+              constants->OldModulePositionZ(copy-1),
               idrotm[231], "MANY");
   // last column, except first and last  modules
   for (Int_t copy = 52; copy < 60; copy++)
     gMC->Gspos("ACORDE1",copy,"ALIC",
-              constants->ModulePositionX(copy-1),
-              constants->ModulePositionY(copy-1),
-              constants->ModulePositionZ(copy-1),
+              constants->OldModulePositionX(copy-1),
+              constants->OldModulePositionY(copy-1),
+              constants->OldModulePositionZ(copy-1),
               idrotm[231], "MANY");
   // the last four modules
-  if (GetITSGeometry()) {
+  if (Get4CentralModulesGeometry()) {
     gMC->Gspos("ACORDE1",1,"ALIC",
-              constants->ExtraModulePositionX(),
-              constants->ExtraModulePositionY(),
-              constants->ExtraModulePositionZ(0),
+              constants->OldExtraModulePositionX(),
+              constants->OldExtraModulePositionY(),
+              constants->OldExtraModulePositionZ(0),
               0, "MANY");  
     gMC->Gspos("ACORDE1",10,"ALIC",
-              constants->ExtraModulePositionX(),
-              constants->ExtraModulePositionY(),
-              constants->ExtraModulePositionZ(1),
+              constants->OldExtraModulePositionX(),
+              constants->OldExtraModulePositionY(),
+              constants->OldExtraModulePositionZ(1),
               0, "MANY");  
     gMC->Gspos("ACORDE1",51,"ALIC",
-              constants->ExtraModulePositionX(),
-              constants->ExtraModulePositionY(),
-              constants->ExtraModulePositionZ(2),
+              constants->OldExtraModulePositionX(),
+              constants->OldExtraModulePositionY(),
+              constants->OldExtraModulePositionZ(2),
               0, "MANY");  
     gMC->Gspos("ACORDE1",60,"ALIC",
-              constants->ExtraModulePositionX(),
-              constants->ExtraModulePositionY(),
-              constants->ExtraModulePositionZ(3),
+              constants->OldExtraModulePositionX(),
+              constants->OldExtraModulePositionY(),
+              constants->OldExtraModulePositionZ(3),
               0, "MANY");  
   } else {
     gMC->Gspos("ACORDE1",1,"ALIC",
-              constants->ModulePositionX(0),
-              constants->ModulePositionY(0),
-              constants->ModulePositionZ(0),
+              constants->OldModulePositionX(0),
+              constants->OldModulePositionY(0),
+              constants->OldModulePositionZ(0),
               idrotm[232], "MANY");
     gMC->Gspos("ACORDE1",10,"ALIC",
-              constants->ModulePositionX(9),
-              constants->ModulePositionY(9),
-              constants->ModulePositionZ(9),
+              constants->OldModulePositionX(9),
+              constants->OldModulePositionY(9),
+              constants->OldModulePositionZ(9),
               idrotm[232], "MANY");
     gMC->Gspos("ACORDE1",51,"ALIC",
-              constants->ModulePositionX(50),
-              constants->ModulePositionY(50),
-              constants->ModulePositionZ(50),
+              constants->OldModulePositionX(50),
+              constants->OldModulePositionY(50),
+              constants->OldModulePositionZ(50),
               idrotm[231], "MANY");
     gMC->Gspos("ACORDE1",60,"ALIC",
-              constants->ModulePositionX(59),
-              constants->ModulePositionY(59),
-              constants->ModulePositionZ(59),
+              constants->OldModulePositionX(59),
+              constants->OldModulePositionY(59),
+              constants->OldModulePositionZ(59),
               idrotm[231], "MANY");
   } // end if (fITSGeometry)
 
index 905e5ad..1515bbc 100644 (file)
 //                                                                           //
 //  This class contains the functions for final version of the ALICE Cosmic  //
 //  Ray Trigger. This version will be used to simulation comic rays in alice //
-//  with all the detectors.                                                 //
+//  with all the detectors. It includes the last survey of 2009.            //
 //  It include geometry and hits (position and momentum)                     //
 //                                                                           //
+//   Author: Mario Rodriguez Cahuantzi, FCFM-BUAP, Puebla, Pue. Mexico       //
+//                                                                           //
 //                  Send comments to:                                        //
 //                                                                          //
 //      Arturo Fernandez Tellez        <afernand@fcfm.buap.mx>              //
@@ -32,7 +34,8 @@
 //                                                                          //
 //                     Puebla, Pue. Mexico December 2007                    //
 //                                                                          //
-//     Last Update: Aug. 4th 2008                                           //
+//     Last Update: Nov. 17th 2009                                          //
+//     Mario Rodriguez Cahuantzi                                            //
 ///////////////////////////////////////////////////////////////////////////////
 
 
@@ -104,30 +107,6 @@ void AliACORDEv1::CreateGeometry()
 void AliACORDEv1::CreateAcorde()
 {  
 
-
-  //  _______________________________________________________________________________
-  // |                                                                              |  
-  // |                                                                              |  
-  // | **** Acorde's Geometry using the TGeo Class....January 2008 ****             |
-  // |                                                                              |  
-  // |         ACORDE--> Volume for ACORDE in Alice's Magnet                        |
-  // |         ACORDE1_a--> Volume for frame of Acorde's Module                     |
-  // |         ACORDE10--> Volume for frame of Acorde's Module                      |
-  // |         ACORDE2--> Volume for scintillators in Acorde's Module               |
-  // |         ACORDE7--> Volume for bars                                           |
-  // |         ACORDE7_1--> Volume for side's bars                                  |  
-  // |         ACORDE8--> Volume for supports                                       |  
-  // |          ACORDE9--> Volume for supports                                      |          
-  // |         ACORDE_SUPPORT--> Volume that contains a full Acorde's support       |
-  // |         ALL_ACORDE_MODULES--> Volume that contains ALL Acorde's module       |  
-  // |          ACORDE_MODULE--> Volume that represents ONE Acorde-Module            |
-  // |         ACORDE_1--> Volume that contains the bars&supports in-face           |
-  // |         ACORDE_2--> Volume that contains the bars&supports up-face           |  
-  // |         ACORDE_3--> Volume that contains the bars&supports out-face          |
-  // |                                                                              |  
-  // |_______________________________________________________________________________|
-
-
        // Call the global constants for the Modules
        
        AliACORDEConstants* constants = AliACORDEConstants::Instance();
@@ -138,947 +117,565 @@ void AliACORDEv1::CreateAcorde()
 
        // Define some materials & medium
 
-       //*** Support & Bars***
-
-       TGeoMedium* al    = gGeoManager->GetMedium("ACORDE_ALU_C0");
-       TGeoMedium* med6  = gGeoManager->GetMedium("ACORDE_CPV scint.1");
-       
-       //Define a FULL-ACORDE-VOLUME
+       //*** Aluminium ***
 
-       TGeoVolume *aCORDE = new TGeoVolumeAssembly("ACORDE");
+       TGeoMedium* aluminium = gGeoManager->GetMedium("ACORDE_ALU_C0");
 
+       //*** Scintillator ***
 
-       // Define 6 master volumes for ACORDE
+       TGeoMedium* scintillator = gGeoManager->GetMedium("ACORDE_CPV scint.1");
        
-       TGeoVolume *inFace = new TGeoVolumeAssembly("ACORDE_1");
-       TGeoVolume *upFace = new TGeoVolumeAssembly("ACORDE_2");
-       TGeoVolume *outFace = new TGeoVolumeAssembly("ACORDE_3");
-       TGeoVolume *modules = new TGeoVolumeAssembly("ALL_ACORDE_MODULES");
+       //Define the mother volume for the ACORDE detector
 
-       // Define global variables
+       TGeoVolume *acorde = new TGeoVolumeAssembly("ACORDE");
 
-       Float_t box[3];
-       Int_t count;
-       Float_t dy=10;//-->displacement of the support and bars of ACORDE
-       Float_t dy2=66.5;//-->displacement of the support and bars of ACORDE
-       Float_t placedAt;
-       Float_t small=0.05;
 
-       // Define the position of support and bars for the sides faces
+       // Define 2 main-daughter volumes for ACORDE
+       
+       TGeoVolume *supportBars = new TGeoVolumeAssembly("ACORDE_SUPPORTS_BARS");
+       TGeoVolume *acordeModules = new TGeoVolumeAssembly("ALL_ACORDE_MODULES");
 
-       Float_t des = 22*0.7071;
   
        // Define rotation Matrix for Side's faces in Alice
        
        TGeoRotation *idrotm231 = new TGeoRotation("idrotm231",90, 45, 90, 135, 0, 0);
        TGeoRotation *idrotm232 = new TGeoRotation("idrotm232",90, 315, 90, 45, 0, 0);
 
-       // Begin the Geometry of the structure for ACORDE
+       // Begin the Geometry for ACORDE
 
        // *** Definition of ACORDE's Modules ***
 
        // Define Measures of ACORDE's Modules
 
-       box[0] = constants->ModuleLength()/2;
-       box[1] = constants->ModuleHeight()/2;
-       box[2] = constants->ModuleWidth()/2;
+       Float_t acoFrameBox1[3],acoFrameBox2[3];
+
+       acoFrameBox1[0] = constants->ModuleLength()/2;
+       acoFrameBox1[1] = constants->ModuleHeight()/2;
+       acoFrameBox1[2] = 2.50;
+
+       acoFrameBox2[0] = 20.0;
+       acoFrameBox2[1] = constants->ModuleHeight()/2;
+       acoFrameBox2[2] = 10.0;
 
        // Define Measures of Scintillators
        
-       Float_t pbox[3];        
-       pbox[0] = constants->PlasticLength()/2;
-       pbox[1] = constants->PlasticHeight()/2;
-       pbox[2] = constants->PlasticWidth()/2;
+       Float_t acoScinBox[3];  
+       acoScinBox[0] = constants->PlasticLength()/2;
+       acoScinBox[1] = constants->PlasticHeight()/2;
+       acoScinBox[2] = constants->PlasticWidth()/2;
 
 
-       // Create the Modules, Scintillators & Metallic Frame
+       // Create the Modules of ACORDE, 1 aluminium frame and two scintillator plastics
 
        //*** Aluminium frame ***
 
-       TGeoBBox *acorde1 = new TGeoBBox("acorde1",box[0],box[1],26/20+2);
-       TGeoBBox *acorde10 = new TGeoBBox("acorde10",26/20,box[1],box[2]+3);
-       TGeoVolume *aCORDE1qa = new TGeoVolume("ACORDE1_a",acorde1,al);
-       TGeoVolume *aCORDE10 = new TGeoVolume("ACORDE10",acorde10,al);
+       TGeoBBox *acordeModFrameBoxL = new TGeoBBox("acordeModFrameBoxL",acoFrameBox1[0],acoFrameBox1[1],acoFrameBox1[2]);
+       TGeoBBox *acordeModFrameBoxH = new TGeoBBox("acordeModFrameBoxH",acoFrameBox2[0],acoFrameBox2[1],acoFrameBox2[2]);
+       TGeoVolume *acordeModFrameVolumeL = new TGeoVolume("ACORDEMODFRAMEVOLUMEL",acordeModFrameBoxL,aluminium);
+       TGeoVolume *acordeModFrameVolumeH = new TGeoVolume("ACORDEMODFRAMEVOLUMEH",acordeModFrameBoxH,aluminium);
+
 
        //*** Scintillators ***
 
-       TGeoBBox *acorde2 = new TGeoBBox("acorde2",pbox[0],pbox[1],pbox[2]);
-       TGeoVolume *aCORDE2 = new TGeoVolume("ACORDE2",acorde2,med6);
+       TGeoBBox *acordeScintillatorBox = new TGeoBBox("acordeScintillatorBox",acoScinBox[0],acoScinBox[1],acoScinBox[2]);
+       TGeoVolume *acordeScintillatorVolume = new TGeoVolume("ACORDESCINTILLATORMODULE",acordeScintillatorBox,scintillator);
 
 
-       // Here I define & construct a Master Volume ("ACORDE_MODULE") for one Module in ACORDE
+       // Here I create a single ACORDE module and then we make 60 copies of it
 
-       TGeoVolume *acomodule = new TGeoVolumeAssembly("ACORDE_MODULE");
-       acomodule->AddNode(aCORDE1qa,1,new TGeoTranslation("aco1",0,0,13));
-       acomodule->AddNode(aCORDE1qa,2,new TGeoTranslation("aco10",0,0,-13));
-       acomodule->AddNode(aCORDE10,3,new TGeoTranslation("aco10",293/2+5,0,0));
-       acomodule->AddNode(aCORDE10,4,new TGeoTranslation("aco10",-293/2-5,0,0));
-        placedAt = pbox[1]+constants->ProfileThickness()-constants->ModuleHeight()/2+small;
-       acomodule->AddNode(aCORDE2,5,new TGeoTranslation("aco2",placedAt,0,0));
-        placedAt = placedAt + 2.0*pbox[1]+small;
-       acomodule->AddNode(aCORDE2,6,new TGeoTranslation("aco2",placedAt,-1,0));
+       TGeoVolume *acordeSingleModule = new TGeoVolumeAssembly("ACORDE_MODULE");
+       acordeSingleModule->AddNode(acordeModFrameVolumeL,1,new TGeoTranslation("acordeFrame_01",0,0,12.5));
+       acordeSingleModule->AddNode(acordeModFrameVolumeL,2,new TGeoTranslation("acordeFrame_02",0,0,-12.5));
+       acordeSingleModule->AddNode(acordeModFrameVolumeH,3,new TGeoTranslation("acordeFrame_03",130,0,0));
+       acordeSingleModule->AddNode(acordeModFrameVolumeH,4,new TGeoTranslation("acordeFrame_04",-130,0,0));
+       acordeSingleModule->AddNode(acordeScintillatorVolume,5, new TGeoTranslation("acordeScintillator_01",0,1,0));
+       acordeSingleModule->AddNode(acordeScintillatorVolume,6, new TGeoTranslation("acordeScintillator_01",0,-1,0));
 
        // Put the Modules of In-Face
        
-       count=1;
-       for(Int_t i=1;i<9;i++){
+       for(Int_t iAcordeModule=1;iAcordeModule<9;iAcordeModule++)
+       {
 
-               Float_t posx = constants->ModulePositionX(i);
-               Float_t posy = constants->ModulePositionY(i);
-               Float_t posz = constants->ModulePositionZ(i);   
+               Float_t posx = constants->CenterModulePositionX(iAcordeModule);
+               Float_t posy = constants->CenterModulePositionY(iAcordeModule);
+               Float_t posz = constants->CenterModulePositionZ(iAcordeModule); 
                
-               modules->AddNode(acomodule,i,
+               acordeModules->AddNode(acordeSingleModule,iAcordeModule,
                        new TGeoCombiTrans("aco01",posx,posy,posz,idrotm232));
-               count++;
-
        }
 
-       count=9;
-       for(Int_t i=10;i<20;i++){
-               Float_t posx = constants->ModulePositionX(i);
-               Float_t posy = constants->ModulePositionY(i);
-               Float_t posz = constants->ModulePositionZ(i);
+       for(Int_t iAcordeModule=10;iAcordeModule<20;iAcordeModule++)
+       {
+               Float_t posx = constants->CenterModulePositionX(iAcordeModule);
+               Float_t posy = constants->CenterModulePositionY(iAcordeModule);
+               Float_t posz = constants->CenterModulePositionZ(iAcordeModule);
 
-               modules->AddNode(acomodule,i,
+               acordeModules->AddNode(acordeSingleModule,iAcordeModule,
                        new TGeoCombiTrans("aco01",posx,posy,posz,idrotm232));
        }
 
        // Put he Modules of Up-Face
 
-       count=1;
-       for(Int_t i=20;i<40;i++){
-               Float_t posx = constants->ModulePositionX(i);
-               Float_t posy = constants->ModulePositionY(i);
-               Float_t posz = constants->ModulePositionZ(i);   
+       for(Int_t iAcordeModule=20;iAcordeModule<40;iAcordeModule++)
+       {
+               Float_t posx = constants->CenterModulePositionX(iAcordeModule);
+               Float_t posy = constants->CenterModulePositionY(iAcordeModule);
+               Float_t posz = constants->CenterModulePositionZ(iAcordeModule); 
 
-               modules->AddNode(acomodule,i,new TGeoTranslation("aco01",posx,posy,posz));
-               count++;
+               acordeModules->AddNode(acordeSingleModule,iAcordeModule,new TGeoTranslation("aco01",posx,posy,posz));
        }
 
        // Put the Modules of Out-Face
 
-       count=1;
-       for(Int_t i=40;i<50;i++){
-               Float_t posx = constants->ModulePositionX(i);
-               Float_t posy = constants->ModulePositionY(i);
-               Float_t posz = constants->ModulePositionZ(i);   
+       for(Int_t iAcordeModule=40;iAcordeModule<50;iAcordeModule++)
+       {
+               Float_t posx = constants->CenterModulePositionX(iAcordeModule);
+               Float_t posy = constants->CenterModulePositionY(iAcordeModule);
+               Float_t posz = constants->CenterModulePositionZ(iAcordeModule); 
 
-               modules->AddNode(acomodule,i,
+               acordeModules->AddNode(acordeSingleModule,iAcordeModule,
                        new TGeoCombiTrans("aco01",posx,posy,posz,idrotm231));
-               count++;
        }
 
        // Put the Modules of Out-Face
 
-       count=11;
-       for(Int_t i=51;i<59;i++){
-               Float_t posx = constants->ModulePositionX(i);
-               Float_t posy = constants->ModulePositionY(i);
-               Float_t posz = constants->ModulePositionZ(i);   
-
-       if ((i==57) || (i==56)){
-                modules->AddNode(acomodule,i,
+       for(Int_t iAcordeModule=51;iAcordeModule<59;iAcordeModule++)
+       {
+               Float_t posx = constants->CenterModulePositionX(iAcordeModule);
+               Float_t posy = constants->CenterModulePositionY(iAcordeModule);
+               Float_t posz = constants->CenterModulePositionZ(iAcordeModule); 
+               acordeModules->AddNode(acordeSingleModule,iAcordeModule,
                                        new TGeoCombiTrans("aco01",posx,posy,posz,idrotm231));
-       }else{
-               modules->AddNode(acomodule,i,
-                       new TGeoCombiTrans("aco01",posx,posy,posz,idrotm231));
-               }count++;
        }
 
+       // Put the 4-central modules (Old-ITS modules)
+       if (Get4CentralModulesGeometry()) 
+       { 
+               acordeModules->AddNode(acordeSingleModule,0,
+                       new TGeoTranslation("Mod0_0",constants->CenterModulePositionX(0),constants->CenterModulePositionY(0),constants->CenterModulePositionZ(0)));
+               acordeModules->AddNode(acordeSingleModule,9,
+                       new TGeoTranslation("Mod0_9",constants->CenterModulePositionX(9),constants->CenterModulePositionY(9),constants->CenterModulePositionZ(9)));
+               acordeModules->AddNode(acordeSingleModule,50,
+                       new TGeoTranslation("Mod0_50",constants->CenterModulePositionX(50),constants->CenterModulePositionY(50),constants->CenterModulePositionZ(50)));
+               acordeModules->AddNode(acordeSingleModule,59,
+                       new TGeoTranslation("Mod0_59",constants->CenterModulePositionX(59),constants->CenterModulePositionY(59),constants->CenterModulePositionZ(59)));
+       }
 
-       // Put th Modules ITS-ACORDE
-
-       if (GetITSGeometry()) {
-
-               modules->AddNode(acomodule,0,new TGeoTranslation("ITS-3",
-                               constants->ExtraModulePositionX(),
-                               constants->ExtraModulePositionY(),
-                               constants->ExtraModulePositionZ(0)));
-
-               modules->AddNode(acomodule,9,new TGeoTranslation("ITS-4",
-                               constants->ExtraModulePositionX(),
-                               constants->ExtraModulePositionY(),
-                               constants->ExtraModulePositionZ(1)));
-
-               modules->AddNode(acomodule,50,new TGeoTranslation("ITS-1",
-                               constants->ExtraModulePositionX(),
-                               constants->ExtraModulePositionY(),
-                               constants->ExtraModulePositionZ(2)));
-
-               modules->AddNode(acomodule,59,new TGeoTranslation("ITS-2",
-                               constants->ExtraModulePositionX(),
-                               constants->ExtraModulePositionY(),
-                               constants->ExtraModulePositionZ(3)));
-
-
-               } 
-       else {
-
-
-               modules->AddNode(acomodule,61,new TGeoTranslation("its1",
-                               constants->ModulePositionX(0),
-                               constants->ModulePositionY(0),
-                               constants->ModulePositionZ(0)));
-
-               modules->AddNode(acomodule,62,new TGeoTranslation("its2",
-                               constants->ModulePositionX(9),
-                               constants->ModulePositionY(9),
-                               constants->ModulePositionZ(9)));
-
-               modules->AddNode(acomodule,63,new TGeoTranslation("its3",
-                               constants->ModulePositionX(50),
-                               constants->ModulePositionY(50),
-                               constants->ModulePositionZ(50)));
-
-               modules->AddNode(acomodule,64,new TGeoTranslation("its4",
-                               constants->ModulePositionX(59),
-                               constants->ModulePositionY(59),
-                               constants->ModulePositionZ(59)));
+       // Create a dummy support & bars of Aluminium (it doesn't exist a survey of this structure)
 
-               } // end if (fITSGeometry)
+       Float_t boxLongSupport[3],boxThinSupport[3];
 
+       boxLongSupport[0]=10.0;
+       boxLongSupport[1]=0.5;
+       boxLongSupport[2]=500.0;
 
+       boxThinSupport[0]=1.0;
+       boxThinSupport[1]=7.0;
+       boxThinSupport[2]=500.0;
 
-       //*** Begin the structure of support & bars for ACORDE ***
+       TGeoBBox *acordeLongSupport = new TGeoBBox("ACORDELONGSUPPORT",boxLongSupport[0],boxLongSupport[1],boxLongSupport[2]);
+       TGeoBBox *acordeThinSupport = new TGeoBBox("ACORDETHINSUPPORT",boxThinSupport[0],boxThinSupport[1],boxThinSupport[2]);
 
-       // Define a volume for the bars (up-face)
+       TGeoVolume *acordeLSupport = new TGeoVolume("ACORDELS",acordeLongSupport,aluminium);
+       TGeoVolume *acordeTSupport = new TGeoVolume("ACORDETS",acordeThinSupport,aluminium);
+       TGeoVolume *acordeMainSupport = new TGeoVolumeAssembly("ACORDE_SUPPORT"); 
+       acordeMainSupport->AddNode(acordeLSupport,1,new TGeoTranslation("ACOLSA",0,7.5,0));
+       acordeMainSupport->AddNode(acordeLSupport,2,new TGeoTranslation("ACOLSB",0,-7.5,0));
+       acordeMainSupport->AddNode(acordeTSupport,3);
 
-       box[0]=5;
-//     box[1]=40;
-       box[1]=33;
-       box[2]=5;
-       Float_t z1 = 21 ;
-       TGeoBBox *acorde00 = new TGeoBBox("acorde00",box[0],box[1],box[2]);
+       // Set the values for the bars support
+       
+       Float_t boxSingleBar[3];
+       boxSingleBar[0]=10;
+       boxSingleBar[1]=37;//36.722; // Correction to avoid overlaps with the L3 magnet
+       boxSingleBar[2]=10;
+
+       Float_t boxUnionUp[3];
+       boxUnionUp[0]=10;
+       boxUnionUp[1]=0.5;
+       boxUnionUp[2]=15;
+
+       Float_t boxUnionDown[3];
+       boxUnionDown[0]=20;
+       boxUnionDown[1]=1;
+       boxUnionDown[2]=20;
+       
+       // Volume and Box for the bar
+       
+       TGeoBBox *acordeSingleBarSupport = new TGeoBBox("ACORDESBARS",boxSingleBar[0],boxSingleBar[1],boxSingleBar[2]);
+       TGeoVolume *acordeBarSupport = new TGeoVolume("ACORDEBARSUPPORT",acordeSingleBarSupport,aluminium);
 
-       TGeoVolume *aCORDE00 = new TGeoVolume("ACORDE00",acorde00,al);
+       // Volume and Box for the bar union with the long support (Up-with supports and Down with L3 magnet)
+       
+       TGeoBBox *acordeSingleBoxUnionUp = new TGeoBBox("ACORDEBUP",boxUnionUp[0],boxUnionUp[1],boxUnionUp[2]);
+       TGeoVolume *acordeBoxUnionUp = new TGeoVolume("ACORDEBOXUNIONUP",acordeSingleBoxUnionUp,aluminium);
+       
+       TGeoBBox *acordeSingleBoxUnionDown = new TGeoBBox("ACORDEBDOWN",boxUnionDown[0],boxUnionDown[1],boxUnionDown[2]);
+       TGeoVolume *acordeBoxUnionDown = new TGeoVolume("ACORDEBOXUNIONDOWN",acordeSingleBoxUnionDown,aluminium);
+
+       TGeoVolume *acordeMainBar = new TGeoVolumeAssembly("ACORDE_BAR");
+       acordeMainBar->AddNode(acordeBoxUnionUp,1,new TGeoTranslation("ACOBAR01",0,boxSingleBar[1]+boxUnionUp[1],0));
+       acordeMainBar->AddNode(acordeBarSupport,2);
+       acordeMainBar->AddNode(acordeBoxUnionDown,3,new TGeoTranslation("ACOBAR01",0,-boxSingleBar[1]-boxUnionDown[1],0));
+
+       // Volume for the Full support (supports and bars) UP face of L3 Magnet
+       Float_t supportPosXIn = constants->CenterModulePositionX(20);
+       Float_t supportPosY = 859.044-7.5-5.5; // Minimum module position Y less the heigh of the support
+       Float_t supportPosZ = 0;
+       Float_t supportPosXOut = constants->CenterModulePositionX(30);
+       Float_t deltaXA = 120.;
+       Float_t deltaXB = 60.;
+
+       TGeoVolume *acordeFullSupportUpFace = new TGeoVolumeAssembly("ACORDE_FULL_SUPPORT_UPFACE");
+       acordeFullSupportUpFace->AddNode(acordeMainSupport,1,new TGeoTranslation("ACOFSB01",supportPosXIn+deltaXA,supportPosY,supportPosZ));
+       acordeFullSupportUpFace->AddNode(acordeMainSupport,2,new TGeoTranslation("ACOFSB02",supportPosXIn+deltaXB,supportPosY,supportPosZ));
+       acordeFullSupportUpFace->AddNode(acordeMainSupport,3,new TGeoTranslation("ACOFSB03",supportPosXIn-deltaXA,supportPosY,supportPosZ));
+       acordeFullSupportUpFace->AddNode(acordeMainSupport,4,new TGeoTranslation("ACOFSB04",supportPosXIn-deltaXB,supportPosY,supportPosZ));
+       acordeFullSupportUpFace->AddNode(acordeMainSupport,5,new TGeoTranslation("ACOFSB05",supportPosXOut+deltaXA,supportPosY,supportPosZ));
+       acordeFullSupportUpFace->AddNode(acordeMainSupport,6,new TGeoTranslation("ACOFSB06",supportPosXOut+deltaXB,supportPosY,supportPosZ));
+       acordeFullSupportUpFace->AddNode(acordeMainSupport,7,new TGeoTranslation("ACOFSB07",supportPosXOut-deltaXA,supportPosY,supportPosZ));
+       acordeFullSupportUpFace->AddNode(acordeMainSupport,8,new TGeoTranslation("ACOFSB08",supportPosXOut-deltaXB,supportPosY,supportPosZ));
+       
+       // Put the bars in the main volume acordeFullSupportUpFace
 
-       count=25;
-       for (Int_t ma=20;ma<=24;ma++)
+       Float_t barPosXIn = constants->CenterModulePositionX(20);
+       Float_t barPosY = supportPosY-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+       Float_t barPosZ = 0;
+       Int_t barIndex = 9;
+       for(Int_t iBarModule = 20; iBarModule<30; iBarModule+=2)
        {
-               TGeoTranslation *aco00=new TGeoTranslation("aco00",
-                                       constants->SupportModulePositionX(ma)-0.5*293+dy2,
-                                       constants->SupportModulePositionY(ma)-box[1]-z1,
-                                       constants->SupportModulePositionZ(ma));
-
-               upFace->AddNode(aCORDE00,count,aco00);
-
-               TGeoTranslation *aco00q1=new TGeoTranslation("aco00q1",
-                                       -(constants->SupportModulePositionX(ma)-0.5*293+dy2),
-                                       constants->SupportModulePositionY(ma)-box[1]-z1,
-                                       constants->SupportModulePositionZ(ma));
-               upFace->AddNode(aCORDE00,count+1,aco00q1);
-
-               TGeoTranslation *aco00q2=new TGeoTranslation("aco00q2",
-                                       constants->SupportModulePositionX(ma)+0.5*293-dy2,
-                                       constants->SupportModulePositionY(ma)-box[1]-z1,
-                                       constants->SupportModulePositionZ(ma));
-               upFace->AddNode(aCORDE00,count+2,aco00q2);
-
-               TGeoTranslation *aco00q3=new TGeoTranslation("aco00q3",
-                                       -(constants->SupportModulePositionX(ma)+0.5*293-dy2),
-                                       constants->SupportModulePositionY(ma)-box[1]-z1,
-                                       constants->SupportModulePositionZ(ma));
-               upFace->AddNode(aCORDE00,count+3,aco00q3);
-               count=count+4;
-
-               ma++;
-       }
+               barPosZ = constants->CenterModulePositionZ(iBarModule);
+               acordeFullSupportUpFace->AddNode(acordeMainBar,barIndex,new TGeoTranslation("ACOFSB09",barPosXIn+deltaXA,barPosY,barPosZ));     
+               acordeFullSupportUpFace->AddNode(acordeMainBar,barIndex+1,new TGeoTranslation("ACOFSB09",barPosXIn+deltaXB,barPosY,barPosZ));   
+               acordeFullSupportUpFace->AddNode(acordeMainBar,barIndex+2,new TGeoTranslation("ACOFSB09",barPosXIn-deltaXA,barPosY,barPosZ));
+                acordeFullSupportUpFace->AddNode(acordeMainBar,barIndex+3,new TGeoTranslation("ACOFSB09",barPosXIn-deltaXB,barPosY,barPosZ));
 
-       count=41;
-       for(Int_t ma=25;ma<=29;ma++)
-       {
-               TGeoTranslation *aco00=new TGeoTranslation("aco00",
-                                       constants->SupportModulePositionX(ma)-0.5*293+dy2,
-                                       constants->SupportModulePositionY(ma)-box[1]-z1,
-                                       constants->SupportModulePositionZ(ma));
-               upFace->AddNode(aCORDE00,count,aco00);
-
-               TGeoTranslation *aco00q1=new TGeoTranslation("aco00q1",
-                                       -(constants->SupportModulePositionX(ma)-0.5*293+dy2),
-                                       constants->SupportModulePositionY(ma)-box[1]-z1,
-                                       constants->SupportModulePositionZ(ma));
-               upFace->AddNode(aCORDE00,count+1,aco00q1);
-
-               TGeoTranslation *aco00q2=new TGeoTranslation("aco00q2",
-                                       constants->SupportModulePositionX(ma)+0.5*293-dy2,
-                                       constants->SupportModulePositionY(ma)-box[1]-z1,
-                                       constants->SupportModulePositionZ(ma));
-               upFace->AddNode(aCORDE00,count+2,aco00q2);
-
-               TGeoTranslation *aco00q3=new TGeoTranslation("aco00q3",
-                                       -(constants->SupportModulePositionX(ma)+0.5*293-dy2),
-                                       constants->SupportModulePositionY(ma)-box[1]-z1,
-                                       constants->SupportModulePositionZ(ma));
-               upFace->AddNode(aCORDE00,count+3,aco00q3);
-               count=count+4;
-               ma++;
+               barIndex+=4;
        }
 
-       TGeoTranslation *c1 = new TGeoTranslation ("c1",
-                               constants->SupportModulePositionX(20)-0.5*293,
-                               constants->SupportModulePositionY(20)-box[1]-z1,
-                               constants->SupportModulePositionZ(20)-40);
-       TGeoTranslation *c2 = new TGeoTranslation ("c2",
-                               constants->SupportModulePositionX(23)-0.5*293,
-                               constants->SupportModulePositionY(23)-box[1]-z1,
-                               constants->SupportModulePositionZ(23)-40);
-       TGeoTranslation *c3 = new TGeoTranslation ("c3",
-                               constants->SupportModulePositionX(24)-0.5*293,
-                               constants->SupportModulePositionY(24)-box[1]-z1,
-                               constants->SupportModulePositionZ(25)-40);
-       TGeoTranslation *c4 = new TGeoTranslation ("c4",
-                               constants->SupportModulePositionX(27)-0.5*293,
-                               constants->SupportModulePositionY(27)-box[1]-z1,
-                               constants->SupportModulePositionZ(28)-40);
-       upFace->AddNode(aCORDE00,57,c1);
-       upFace->AddNode(aCORDE00,58,c2);
-       upFace->AddNode(aCORDE00,59,c3);
-       upFace->AddNode(aCORDE00,60,c4);
-
-
-       // Construct Bars for lateral supports (up-face)
-
-       TGeoTranslation *aco00=new TGeoTranslation("aco00",
-                               constants->SupportModulePositionX(20)+0.5*293-dy,
-                               constants->SupportModulePositionY(20)-box[1]-z1,
-                               constants->SupportModulePositionZ(20)-40);
-       upFace->AddNode(aCORDE00,61,aco00);
-
-       TGeoTranslation *aco00q1=new TGeoTranslation("aco00q1",
-                               constants->SupportModulePositionX(23)+0.5*293-dy,
-                               constants->SupportModulePositionY(23)-box[1]-z1,
-                               constants->SupportModulePositionZ(23)-40);
-       upFace->AddNode(aCORDE00,62,aco00q1);
-
-       TGeoTranslation *aco00q2=new TGeoTranslation("aco00q2",
-                               constants->SupportModulePositionX(24)+0.5*293-dy,
-                               constants->SupportModulePositionY(24)-box[1]-z1,
-                               constants->SupportModulePositionZ(25)-40);
-       upFace->AddNode(aCORDE00,63,aco00q2);
-
-       TGeoTranslation *aco00q3=new TGeoTranslation("aco00q3",
-                               constants->SupportModulePositionX(27)+0.5*293-dy,
-                               constants->SupportModulePositionY(27)-box[1]-z1,
-                               constants->SupportModulePositionZ(28)-40);
-       upFace->AddNode(aCORDE00,64,aco00q3);
-
-
-       TGeoTranslation *aco01=new TGeoTranslation("aco01",
-                               constants->SupportModulePositionX(30)-0.5*293+dy,
-                               constants->SupportModulePositionY(30)-box[1]-z1,
-                               constants->SupportModulePositionZ(30)-40);
-       upFace->AddNode(aCORDE00,65,aco01);
-
-       TGeoTranslation *aco01q1=new TGeoTranslation("aco01q1",
-                               constants->SupportModulePositionX(33)-0.5*293+dy,
-                               constants->SupportModulePositionY(33)-box[1]-z1,
-                               constants->SupportModulePositionZ(33)-40);
-       upFace->AddNode(aCORDE00,66,aco01q1);
-
-       TGeoTranslation *aco01q2=new TGeoTranslation("aco01q2",
-                               constants->SupportModulePositionX(34)-0.5*293+dy,
-                               constants->SupportModulePositionY(34)-box[1]-z1,
-                               constants->SupportModulePositionZ(35)-40);
-       upFace->AddNode(aCORDE00,67,aco01q2);
-
-       TGeoTranslation *aco01q3=new TGeoTranslation("aco01q3",
-                               constants->SupportModulePositionX(37)-0.5*293+dy,
-                               constants->SupportModulePositionY(37)-box[1]-z1,
-                               constants->SupportModulePositionZ(38)-40);
-       upFace->AddNode(aCORDE00,68,aco01q3);
-
-
-
-       // Acorde's support bars (side's faces)
-
-       //*** In Face ***
-
-//     box[0]=39;
-       box[0]=27;
-       box[1]=5;
-       box[2]=5;
-       Float_t kro=3;
-       Float_t q1=0;
-       Float_t posx=constants->SupportModulePositionX(0)+0.5*293*0.7071-56*0.7071-18;
-       Float_t posy=constants->SupportModulePositionY(0)-0.5*293*0.7071-56*0.7071+3-q1+kro;
-       Float_t posz=constants->SupportModulePositionZ(0);
-
-       TGeoBBox *acorde7 = new TGeoBBox("acorde7",box[0],box[1],box[2]);
-
-       TGeoVolume *aCORDE7 = new TGeoVolume("ACORDE7",acorde7,al);
-
-       TGeoCombiTrans *aco7 = new TGeoCombiTrans("aco7",posx,posy,posz-4*dy,idrotm231);
-       TGeoCombiTrans *aco7q1 = new TGeoCombiTrans("aco7q1",posx,posy,
-                                       constants->ModulePositionZ(3)-4*dy,idrotm231);
-       TGeoCombiTrans *aco7q2 = new TGeoCombiTrans("aco7q2",posx,posy,
-                                       constants->ModulePositionZ(5)-4*dy,idrotm231);
-       TGeoCombiTrans *aco7q3 = new TGeoCombiTrans("aco7q3",posx,posy,
-                                       constants->ModulePositionZ(8)-4*dy,idrotm231);
-
-       inFace->AddNode(aCORDE7,20,aco7);
-       inFace->AddNode(aCORDE7,21,aco7q1);
-       inFace->AddNode(aCORDE7,22,aco7q2);
-       inFace->AddNode(aCORDE7,23,aco7q3);
-
-
-       count=24;
-       for(Int_t dyA=0;dyA<=4;dyA++)
-       {
-
-               Float_t posx1=constants->SupportModulePositionX(dyA)+0.1*293*0.7071-56*0.7071-18+des;
-               Float_t posy1=constants->SupportModulePositionY(dyA)-0.1*293*0.7071-56*0.7071+3-des-q1+kro;
-               Float_t posza=constants->SupportModulePositionZ(dyA);
-               Float_t posx2=constants->SupportModulePositionX(dyA)-0.27*293*0.7071-56*0.7071-18+des;
-               Float_t posy2=constants->SupportModulePositionY(dyA)+0.27*293*0.7071-56*0.7071+3-des-q1+kro;
-               TGeoCombiTrans *aco7q4 = new TGeoCombiTrans("aco7q4",posx1,posy1,posza,idrotm231);
-               TGeoCombiTrans *aco7q5 = new TGeoCombiTrans("aco7q5",posx2,posy2,posza,idrotm231);
-               inFace->AddNode(aCORDE7,count,aco7q4);
-               inFace->AddNode(aCORDE7,count+1,aco7q5);
-               count=count+2;
-               dyA++;
-       }       
-
-
-       count=34;
-       for(Int_t dyb=5;dyb<=9;dyb++)
-       {
-
-               Float_t posx1=constants->SupportModulePositionX(dyb)+0.1*293*0.7071-56*0.7071-18+des;
-               Float_t posy1=constants->SupportModulePositionY(dyb)-0.1*293*0.7071-56*0.7071+3-des-q1+kro;
-               Float_t poszb=constants->SupportModulePositionZ(dyb+10);
-               Float_t posx2=constants->SupportModulePositionX(dyb)-0.27*293*0.7071-56*0.7071-18+des;
-               Float_t posy2=constants->SupportModulePositionY(dyb)+0.27*293*0.7071-56*0.7071+3-des-q1+kro;
-               TGeoCombiTrans *aco7q6 = new TGeoCombiTrans("aco7q6",posx1,posy1,poszb,idrotm231);
-               TGeoCombiTrans *aco7q7 = new TGeoCombiTrans("aco7q7",posx2,posy2,poszb,idrotm231);
-               inFace->AddNode(aCORDE7,count,aco7q6);
-               inFace->AddNode(aCORDE7,count+1,aco7q7);
-               count=count+2;
-               dyb++;
-       }       
-
-
-
-       Float_t posxq1=constants->SupportModulePositionX(10)+0.5*293*0.7071-56*0.7071-18;
-       Float_t posyq1=constants->SupportModulePositionY(10)-0.5*293*0.7071-56*0.7071+3-q1+kro;
-       Float_t poszq1=constants->SupportModulePositionZ(10);
-       TGeoCombiTrans *aco7q8 = new TGeoCombiTrans("aco7q8",posxq1,posyq1,poszq1-4*dy,idrotm231);
-       TGeoCombiTrans *aco7q9 = new TGeoCombiTrans("aco7q9",posxq1,posyq1,
-                                       constants->ModulePositionZ(13)-4*dy,idrotm231);
-       TGeoCombiTrans *aco7q10 = new TGeoCombiTrans("aco7q10",posxq1,posyq1,
-                                       constants->ModulePositionZ(15)-4*dy,idrotm231);
-       TGeoCombiTrans *aco7q11 = new TGeoCombiTrans("aco7q11",posxq1,posyq1,
-                                       constants->ModulePositionZ(18)-4*dy,idrotm231);
-       inFace->AddNode(aCORDE7,44,aco7q8);
-       inFace->AddNode(aCORDE7,45,aco7q9);
-       inFace->AddNode(aCORDE7,46,aco7q10);
-       inFace->AddNode(aCORDE7,47,aco7q11);
-
-
-       count=48;
-       for(Int_t dyc=10;dyc<=14;dyc++)
-
-       {
-
-               Float_t posx1=constants->SupportModulePositionX(dyc)+0.1*293*0.7071-56*0.7071-18+des;
-               Float_t posy1=constants->SupportModulePositionY(dyc)-0.1*293*0.7071-56*0.7071+3-des-0.8+kro;
-               Float_t poszc=constants->SupportModulePositionZ(dyc);
-               Float_t posx2=constants->SupportModulePositionX(dyc)-0.27*293*0.7071-56*0.7071-18+des;
-               Float_t posy2=constants->SupportModulePositionY(dyc)+0.27*293*0.7071-56*0.7071+3-des-1.5-0.8+kro;
-               TGeoRotation *rot1 = new TGeoRotation();
-               rot1->RotateZ(70);
-               TGeoCombiTrans *aco7q12 = new TGeoCombiTrans("aco7q12",posx1,posy1,poszc,idrotm231);
-               TGeoCombiTrans *aco7q13 = new TGeoCombiTrans("aco7q13",posx2+15,posy2-10,poszc,rot1);
-               inFace->AddNode(aCORDE7,count,aco7q12);
-               inFace->AddNode(aCORDE7,count+1,aco7q13);// bars 25 grades
-               count=count+2;
-               dyc++;
-       }
+       Float_t barPosXOut = constants->CenterModulePositionX(30);
+        for(Int_t iBarModule = 30; iBarModule<40; iBarModule+=2)
+        {
+                barPosZ = constants->CenterModulePositionZ(iBarModule);
+                acordeFullSupportUpFace->AddNode(acordeMainBar,barIndex,new TGeoTranslation("ACOFSB09",barPosXOut+deltaXA,barPosY,barPosZ));
+                acordeFullSupportUpFace->AddNode(acordeMainBar,barIndex+1,new TGeoTranslation("ACOFSB09",barPosXOut+deltaXB,barPosY,barPosZ));
+               acordeFullSupportUpFace->AddNode(acordeMainBar,barIndex+2,new TGeoTranslation("ACOFSB09",barPosXOut-deltaXA,barPosY,barPosZ));
+               acordeFullSupportUpFace->AddNode(acordeMainBar,barIndex+3,new TGeoTranslation("ACOFSB09",barPosXOut-deltaXB,barPosY,barPosZ));
 
+                barIndex+=4;
+        }
 
-       count=57;
-       for(Int_t dyd=15;dyd<=19;dyd++)
+       // Supports and bars for the InSide of L3 Magnet
 
-       {
+       TGeoVolume *acordeFullSupportInFace = new TGeoVolumeAssembly("ACORDE_FULL_SUPPORT_INFACE");
+       Float_t supportPosXInA = constants->CenterModulePositionX(1)+deltaXA;
+       Float_t supportPosYInA = 592.017-7.5-5.5;
+       Float_t x0 = constants->CenterModulePositionX(1);
+       Float_t y0 = constants->CenterModulePositionY(1);
+       Float_t theta = -1*TMath::Pi()/4;
+       Float_t supportPosXInPA = x0+(supportPosXInA-x0)*TMath::Cos(theta)-(supportPosYInA-y0)*TMath::Sin(theta);
+       Float_t supportPosYInPA = y0+(supportPosYInA-y0)*TMath::Cos(theta)+(supportPosXInA-x0)*TMath::Sin(theta);
+       Float_t supportPosZInIn = 0;
 
-               Float_t posx1=constants->SupportModulePositionX(dyd)+0.1*293*0.7071-56*0.7071-18+des;
-               Float_t posy1=constants->SupportModulePositionY(dyd)-0.1*293*0.7071-56*0.7071+3-des-q1-0.8+kro;
-               Float_t poszd=constants->SupportModulePositionZ(dyd);
-               Float_t posx2=constants->SupportModulePositionX(dyd)-0.27*293*0.7071-56*0.7071-18+des;
-               Float_t posy2=constants->SupportModulePositionY(dyd)+0.27*293*0.7071-56*0.7071+3-des-1.5-q1-0.8+kro;
-               TGeoRotation *rot1 = new TGeoRotation();
-               rot1->RotateZ(70);
-               TGeoCombiTrans *aco7q14 = new TGeoCombiTrans("aco7q14",posx1,posy1,poszd,idrotm231);
-               TGeoCombiTrans *aco7q15 = new TGeoCombiTrans("aco7q15",posx2+15,posy2-10,poszd,rot1);
-               inFace->AddNode(aCORDE7,count,aco7q14);
-               inFace->AddNode(aCORDE7,count+1,aco7q15);// bars 25 grades
-               count=count+2;
-               dyd++;
-       }
+       Float_t supportPosXInB = constants->CenterModulePositionX(1)+deltaXB;
+       Float_t supportPosXInPB = x0+(supportPosXInB-x0)*TMath::Cos(theta)-(supportPosYInA-y0)*TMath::Sin(theta);
+       Float_t supportPosYInPB = y0+(supportPosYInA-y0)*TMath::Cos(theta)+(supportPosXInB-x0)*TMath::Sin(theta);
 
+        Float_t supportPosXInC = constants->CenterModulePositionX(1)-deltaXA;
+        Float_t supportPosXInPC = x0+(supportPosXInC-x0)*TMath::Cos(theta)-(supportPosYInA-y0)*TMath::Sin(theta);
+        Float_t supportPosYInPC = y0+(supportPosYInA-y0)*TMath::Cos(theta)+(supportPosXInC-x0)*TMath::Sin(theta);
 
-       //*** Out Face ***
-
-//     box[0]=39;
-       box[0]=27;
-       box[1]=5;
-       box[2]=5;
-       Float_t s1=2.5;
-       Float_t posxqa=constants->SupportModulePositionX(50)-0.5*293*0.7071+56*0.7071+18;
-       Float_t posyqa=constants->SupportModulePositionY(50)-0.5*293*0.7071-56*0.7071+3-s1+kro;
-       Float_t poszqa=constants->SupportModulePositionZ(50);
-       TGeoCombiTrans *aco7q16 = new TGeoCombiTrans("aco7q16",
-                                       posxqa,posyqa,poszqa-4*dy,idrotm232);
-       TGeoCombiTrans *aco7q17 = new TGeoCombiTrans("aco7q17",
-                                       posxqa,posyqa,
-                                       constants->ModulePositionZ(43)-4*dy,idrotm232);
-       TGeoCombiTrans *aco7q18 = new TGeoCombiTrans("aco7q18",posxqa,posyqa,
-                                       constants->ModulePositionZ(55)-4*dy,idrotm232);
-       TGeoCombiTrans *aco7q19 = new TGeoCombiTrans("aco7q19",posxqa,posyqa,
-                                       constants->ModulePositionZ(58)-4*dy,idrotm232);
-       TGeoCombiTrans *aco7q20 = new TGeoCombiTrans("aco7q20",
-                                       constants->SupportModulePositionX(50)-0.1*293*0.7071
-                                       +56*0.7071+18-des,
-                                       constants->SupportModulePositionY
-                                       (50)-0.1*293*0.7071-56*0.7071+3-des-s1,
-                                       constants->SupportModulePositionZ(45),idrotm232);
-       TGeoCombiTrans *aco7q21 = new TGeoCombiTrans("aco7q21",
-                                       constants->SupportModulePositionX(50)+0.27*293*0.7071
-                                       +56*0.7071+18-des,
-                                       constants->SupportModulePositionY(50)
-                                       +0.27*293*0.7071-56*0.7071+3-des-s1,
-                                       constants->SupportModulePositionZ(45),idrotm232);
-       outFace->AddNode(aCORDE7,19,aco7q16);
-       outFace->AddNode(aCORDE7,20,aco7q17);
-       outFace->AddNode(aCORDE7,21,aco7q18);
-       outFace->AddNode(aCORDE7,22,aco7q19);
-       outFace->AddNode(aCORDE7,23,aco7q20);
-       outFace->AddNode(aCORDE7,24,aco7q21);
-
-
-       count=25;
-       for(Int_t dye=50;dye<=54;dye++)
-       {
+        Float_t supportPosXInD = constants->CenterModulePositionX(1)-deltaXB;
+        Float_t supportPosXInPD = x0+(supportPosXInD-x0)*TMath::Cos(theta)-(supportPosYInA-y0)*TMath::Sin(theta);
+        Float_t supportPosYInPD = y0+(supportPosYInA-y0)*TMath::Cos(theta)+(supportPosXInD-x0)*TMath::Sin(theta);
 
-               Float_t posx1=constants->SupportModulePositionX(dye)-0.1*293*0.7071+56*0.7071+18-des;
-               Float_t posy1=constants->SupportModulePositionY(dye)-0.1*293*0.7071-56*0.7071+3-des-s1+kro;
-               Float_t posze=constants->SupportModulePositionZ(dye);
-               Float_t posx2=constants->SupportModulePositionX(dye)+0.27*293*0.7071+56*0.7071+18-des;
-               Float_t posy2=constants->SupportModulePositionY(dye)+0.27*293*0.7071-56*0.7071+3-des-s1+kro;
-               TGeoCombiTrans *aco7q22 = new TGeoCombiTrans("aco7q22",posx1,posy1,posze,idrotm232);
-               TGeoCombiTrans *aco7q23 = new TGeoCombiTrans("aco7q23",posx2,posy2,posze,idrotm232);
-               outFace->AddNode(aCORDE7,count,aco7q22);
-               outFace->AddNode(aCORDE7,count+1,aco7q23);
-               count=count+2;
-               dye++;
-       }
 
+       acordeFullSupportInFace->AddNode(acordeMainSupport,1,new TGeoCombiTrans("ACOFSBIN01",supportPosXInPA,supportPosYInPA,supportPosZInIn,idrotm232));
+       acordeFullSupportInFace->AddNode(acordeMainSupport,2,new TGeoCombiTrans("ACOFSBIN02",supportPosXInPB,supportPosYInPB,supportPosZInIn,idrotm232));
+       acordeFullSupportInFace->AddNode(acordeMainSupport,3,new TGeoCombiTrans("ACOFSBIN03",supportPosXInPC,supportPosYInPC,supportPosZInIn,idrotm232));
+       acordeFullSupportInFace->AddNode(acordeMainSupport,4,new TGeoCombiTrans("ACOFSBIN04",supportPosXInPD,supportPosYInPD,supportPosZInIn,idrotm232));
 
-       count=35;
-       for(Int_t dyf=57;dyf<=59;dyf++)
-       {
+        Float_t supportPosXInE = constants->CenterModulePositionX(10)+deltaXA;
+        Float_t supportPosYInE = 806.312-7.5-5.5;
+        Float_t x00 = constants->CenterModulePositionX(10);
+        Float_t y00 = constants->CenterModulePositionY(10);
+        Float_t supportPosXInPE = x00+(supportPosXInE-x00)*TMath::Cos(theta)-(supportPosYInE-y00)*TMath::Sin(theta);
+        Float_t supportPosYInPE = y00+(supportPosYInE-y00)*TMath::Cos(theta)+(supportPosXInE-x00)*TMath::Sin(theta);
 
-               Float_t posx1=constants->SupportModulePositionX(dyf)-0.1*293*0.7071+56*0.7071+18-des;
-               Float_t posy1=constants->SupportModulePositionY(dyf)-0.1*293*0.7071-56*0.7071+3-des-s1+kro;
-               Float_t poszf=constants->SupportModulePositionZ(dyf-10);
-               Float_t posx2=constants->SupportModulePositionX(dyf)+0.27*293*0.7071+56*0.7071+18-des;
-               Float_t posy2=constants->SupportModulePositionY(dyf)+0.27*293*0.7071-56*0.7071+3-des-s1+kro;
-               TGeoCombiTrans *aco7q24 = new TGeoCombiTrans("aco7q24",posx1,posy1,poszf,idrotm232);
-               TGeoCombiTrans *aco7q25 = new TGeoCombiTrans("aco7q25",posx2,posy2,poszf,idrotm232);
-               outFace->AddNode(aCORDE7,count,aco7q24);
-               outFace->AddNode(aCORDE7,count+1,aco7q25);
-               count=count+2;
-               dyf++;
-       }
+        Float_t supportPosXInF = constants->CenterModulePositionX(10)+deltaXB;
+        Float_t supportPosXInPF = x00+(supportPosXInF-x00)*TMath::Cos(theta)-(supportPosYInE-y00)*TMath::Sin(theta);
+        Float_t supportPosYInPF = y00+(supportPosYInE-y00)*TMath::Cos(theta)+(supportPosXInF-x00)*TMath::Sin(theta);
 
+        Float_t supportPosXInG = constants->CenterModulePositionX(10)-deltaXA+100;
+        Float_t supportPosXInPG = x00+(supportPosXInG-x00)*TMath::Cos(theta)-(supportPosYInE-y00)*TMath::Sin(theta);
+        Float_t supportPosYInPG = y00+(supportPosYInE-y00)*TMath::Cos(theta)+(supportPosXInG-x00)*TMath::Sin(theta);
 
-       Float_t posxqb=constants->SupportModulePositionX(40)-0.5*293*0.7071+56*0.7071+18;
-       Float_t posyqb=constants->SupportModulePositionY(40)-0.5*293*0.7071-56*0.7071+3-s1+kro;
-       Float_t poszqb=constants->SupportModulePositionZ(40);
-       TGeoCombiTrans *aco7q26 = new TGeoCombiTrans("aco7q26",
-                                       posxqb,posyqb,poszqb-4*dy,idrotm232);
-       TGeoCombiTrans *aco7q27 = new TGeoCombiTrans("aco7q27",
-                                       posxqb,posyqb,
-                                       constants->SupportModulePositionZ(43)-4*dy,idrotm232);
-       TGeoCombiTrans *aco7q28 = new TGeoCombiTrans("aco7q28",
-                                       posxqb,posyqb,
-                                       constants->SupportModulePositionZ(45)-4*dy,idrotm232);
-       TGeoCombiTrans *aco7q29 = new TGeoCombiTrans("aco7q29",posxqb,posyqb,
-                                       constants->SupportModulePositionZ(48)-4*dy,idrotm232);
-       outFace->AddNode(aCORDE7,41,aco7q26);
-       outFace->AddNode(aCORDE7,42,aco7q27);
-       outFace->AddNode(aCORDE7,43,aco7q28);
-       outFace->AddNode(aCORDE7,44,aco7q29);
-
-       count=45;
-       for(Int_t dyg=40;dyg<=44;dyg++)
-       {
+        acordeFullSupportInFace->AddNode(acordeMainSupport,5,new TGeoCombiTrans("ACOFSBIN05",supportPosXInPE,supportPosYInPE,supportPosZInIn,idrotm232));
+        acordeFullSupportInFace->AddNode(acordeMainSupport,6,new TGeoCombiTrans("ACOFSBIN06",supportPosXInPF,supportPosYInPF,supportPosZInIn,idrotm232));
+        acordeFullSupportInFace->AddNode(acordeMainSupport,7,new TGeoCombiTrans("ACOFSBIN07",supportPosXInPG,supportPosYInPG,supportPosZInIn,idrotm232));
 
-               Float_t posx1=constants->SupportModulePositionX(dyg)-0.1*293*0.7071+56*0.7071+18-des;
-               Float_t posy1=constants->SupportModulePositionY(dyg)-0.1*293*0.7071-56*0.7071+3-des-s1+kro;
-               Float_t poszg=constants->SupportModulePositionZ(dyg);
-               Float_t posx2=constants->SupportModulePositionX(dyg)+0.27*293*0.7071+56*0.7071+18-des;
-               Float_t posy2=constants->SupportModulePositionY(dyg)+0.27*293*0.7071-56*0.7071+3-des-s1+kro;
-               TGeoRotation *rot1 = new TGeoRotation();
-               rot1->RotateZ(105);
-               TGeoCombiTrans *aco7q30 = new TGeoCombiTrans("aco7q30",posx1,posy1,poszg,idrotm232);
-               TGeoCombiTrans *aco7q31 = new TGeoCombiTrans("aco7q31",posx2-15,posy2-10,poszg,rot1);
-               outFace->AddNode(aCORDE7,count,aco7q30);
-               outFace->AddNode(aCORDE7,count+1,aco7q31);// bars 25 grades
-               count=count+2;
-               dyg++;
-       }
+        // Put the bars in the main volume acordeFullSupportInFace
 
+       Int_t barIndexIn = 8;
 
-       count=55;
-       for(Int_t dyh=45;dyh<=49;dyh++)
+       for (Int_t iBarModule=1; iBarModule<9; iBarModule+=2)
        {
-
-               Float_t posx1=constants->SupportModulePositionX(dyh)-0.1*293*0.7071+56*0.7071+18-des;
-               Float_t posy1=constants->SupportModulePositionY(dyh)-0.1*293*0.7071-56*0.7071+3-des-s1+kro;
-               Float_t poszh=constants->SupportModulePositionZ(dyh);
-               Float_t posx2=constants->SupportModulePositionX(dyh)+0.27*293*0.7071+56*0.7071+18-des;
-               Float_t posy2=constants->SupportModulePositionY(dyh)+0.27*293*0.7071-56*0.7071+3-des-s1+kro;
-               TGeoRotation *rot1 = new TGeoRotation();
-               rot1->RotateZ(105);
-               TGeoCombiTrans *aco7q32 = new TGeoCombiTrans("aco7q32",posx1,posy1,poszh,idrotm232);
-               TGeoCombiTrans *aco7q33 = new TGeoCombiTrans("aco7q33",posx2-15,posy2-10,poszh,rot1);
-               outFace->AddNode(aCORDE7,count,aco7q32);
-               outFace->AddNode(aCORDE7,count+1,aco7q33);// bars 25 grades
-               count=count+2;
-               dyh++;
+               Float_t barPosXInIn = constants->CenterModulePositionX(iBarModule)+deltaXA;
+               Float_t barPosYInIn = supportPosYInA-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+               Float_t barPosZInIn = constants->CenterModulePositionZ(iBarModule);
+               Float_t barPosXInP = x0+(barPosXInIn-x0)*TMath::Cos(theta)-(barPosYInIn-y0)*TMath::Sin(theta);
+               Float_t barPosYInP = y0+(barPosYInIn-y0)*TMath::Cos(theta)+(barPosXInIn-x0)*TMath::Sin(theta);
+
+                Float_t barPosXInInA = constants->CenterModulePositionX(iBarModule)+deltaXB;
+                Float_t barPosYInInA = supportPosYInA-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+                Float_t barPosZInInA = constants->CenterModulePositionZ(iBarModule);
+                Float_t barPosXInPA = x0+(barPosXInInA-x0)*TMath::Cos(theta)-(barPosYInInA-y0)*TMath::Sin(theta);
+                Float_t barPosYInPA = y0+(barPosYInInA-y0)*TMath::Cos(theta)+(barPosXInInA-x0)*TMath::Sin(theta);
+
+                Float_t barPosXInInB = constants->CenterModulePositionX(iBarModule)-deltaXA;
+                Float_t barPosYInInB = supportPosYInA-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+                Float_t barPosZInInB = constants->CenterModulePositionZ(iBarModule);
+                Float_t barPosXInPB = x0+(barPosXInInB-x0)*TMath::Cos(theta)-(barPosYInInB-y0)*TMath::Sin(theta);
+                Float_t barPosYInPB = y0+(barPosYInInB-y0)*TMath::Cos(theta)+(barPosXInInB-x0)*TMath::Sin(theta);
+
+                Float_t barPosXInInC = constants->CenterModulePositionX(iBarModule)-deltaXB;
+                Float_t barPosYInInC = supportPosYInA-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+                Float_t barPosZInInC = constants->CenterModulePositionZ(iBarModule);
+                Float_t barPosXInPC = x0+(barPosXInInC-x0)*TMath::Cos(theta)-(barPosYInInC-y0)*TMath::Sin(theta);
+                Float_t barPosYInPC = y0+(barPosYInInC-y0)*TMath::Cos(theta)+(barPosXInInC-x0)*TMath::Sin(theta);
+
+               acordeFullSupportInFace->AddNode(acordeMainBar,barIndexIn,new TGeoCombiTrans("ACOFSBIN08",barPosXInP,barPosYInP,barPosZInIn,idrotm232));
+               acordeFullSupportInFace->AddNode(acordeMainBar,barIndexIn+1,new TGeoCombiTrans("ACOFSBIN09",barPosXInPA,barPosYInPA,barPosZInInA,idrotm232));
+                acordeFullSupportInFace->AddNode(acordeMainBar,barIndexIn+2,new TGeoCombiTrans("ACOFSBIN10",barPosXInPB,barPosYInPB,barPosZInInB,idrotm232));
+                acordeFullSupportInFace->AddNode(acordeMainBar,barIndexIn+3,new TGeoCombiTrans("ACOFSBIN11",barPosXInPC,barPosYInPC,barPosZInInC,idrotm232));
+
+               barIndexIn+=4;
        }
 
+        for (Int_t iBarModule=10; iBarModule<20; iBarModule+=2)
+        {
+                Float_t barPosXInIn = constants->CenterModulePositionX(iBarModule)+deltaXA;
+                Float_t barPosYInIn = supportPosYInE-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+                Float_t barPosZInIn = constants->CenterModulePositionZ(iBarModule);
+                Float_t barPosXInP = x00+(barPosXInIn-x00)*TMath::Cos(theta)-(barPosYInIn-y00)*TMath::Sin(theta);
+                Float_t barPosYInP = y00+(barPosYInIn-y00)*TMath::Cos(theta)+(barPosXInIn-x00)*TMath::Sin(theta);
 
+                Float_t barPosXInInA = constants->CenterModulePositionX(iBarModule)+deltaXB;
+                Float_t barPosYInInA = supportPosYInE-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+                Float_t barPosZInInA = constants->CenterModulePositionZ(iBarModule);
+                Float_t barPosXInPA = x00+(barPosXInInA-x00)*TMath::Cos(theta)-(barPosYInInA-y00)*TMath::Sin(theta);
+                Float_t barPosYInPA = y00+(barPosYInInA-y00)*TMath::Cos(theta)+(barPosXInInA-x00)*TMath::Sin(theta);
 
-       // Set the bars non perpendicular at side faces
-
-       //*** In-Face ***
-
-       box[0]=5;
-//     box[1]=55.15;
-       box[1]=40;
-       box[2]=5;
-       Float_t sm=2;
-       Float_t re=1;
-       Float_t posx1=constants->SupportModulePositionX(0)+0.5*293*0.7071-4*box[0]-8+re;
-       Float_t posy1=constants->SupportModulePositionY(0)-0.5*293*0.7071-box[1]-18-2+sm;
-       Float_t posz1=constants->SupportModulePositionZ(0);
-
-       TGeoBBox *acorde7q1 = new TGeoBBox("acorde7q1",box[0],box[1],box[2]);
+                Float_t barPosXInInB = constants->CenterModulePositionX(iBarModule)-deltaXA+100;
+                Float_t barPosYInInB = supportPosYInE-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+                Float_t barPosZInInB = constants->CenterModulePositionZ(iBarModule);
+                Float_t barPosXInPB = x00+(barPosXInInB-x00)*TMath::Cos(theta)-(barPosYInInB-y00)*TMath::Sin(theta);
+                Float_t barPosYInPB = y00+(barPosYInInB-y00)*TMath::Cos(theta)+(barPosXInInB-x00)*TMath::Sin(theta);
 
-       TGeoVolume *aCORDE7q1 = new TGeoVolume("ACORDE7_1",acorde7q1,al);
-       TGeoTranslation *aco71 = new TGeoTranslation("aco71",posx1,posy1,posz1-4*dy);
-       TGeoTranslation *aco72 = new TGeoTranslation("aco72",posx1,posy1,
-                                       constants->SupportModulePositionZ(3)-4*dy);
-       TGeoTranslation *aco73 = new TGeoTranslation("aco73",posx1,posy1,
-                                       constants->SupportModulePositionZ(5)-4*dy);
-       TGeoTranslation *aco74 = new TGeoTranslation("aco74",posx1,posy1,
-                                       constants->SupportModulePositionZ(8)-4*dy);
-       inFace->AddNode(aCORDE7q1,67,aco71);
-       inFace->AddNode(aCORDE7q1,68,aco72);
-       inFace->AddNode(aCORDE7q1,69,aco73);
-       inFace->AddNode(aCORDE7q1,70,aco74);
+                acordeFullSupportInFace->AddNode(acordeMainBar,barIndexIn,new TGeoCombiTrans("ACOFSBIN08",barPosXInP,barPosYInP,barPosZInIn,idrotm232));
+                acordeFullSupportInFace->AddNode(acordeMainBar,barIndexIn+1,new TGeoCombiTrans("ACOFSBIN09",barPosXInPA,barPosYInPA,barPosZInInA,idrotm232));
+                acordeFullSupportInFace->AddNode(acordeMainBar,barIndexIn+2,new TGeoCombiTrans("ACOFSBIN10",barPosXInPB,barPosYInPB,barPosZInInB,idrotm232));
 
+                barIndexIn+=4;
+        }
 
-       count=71;
-       for(Int_t dyi=0;dyi<=4;dyi++)
-       {
-
-               Float_t posx1a=constants->SupportModulePositionX(dyi)+0.1*293*0.7071-4*box[0]-8+des+re;
-               Float_t posy1a=constants->SupportModulePositionY(dyi)-0.1*293*0.7071-box[1]-18-2-des+sm;
-               Float_t posz1a=constants->SupportModulePositionZ(dyi);
-               Float_t dyx2=constants->SupportModulePositionX(dyi)-0.27*293*0.7071-4*box[0]-8+des+re;
-               Float_t dyy2=constants->SupportModulePositionY(dyi)+0.27*293*0.7071-box[1]-18-2-des+sm;
-               TGeoTranslation *aco75=new TGeoTranslation("aco75",posx1a,posy1a,posz1a);
-               TGeoTranslation *aco76=new TGeoTranslation("aco76",dyx2,dyy2,posz1a);
-               inFace->AddNode(aCORDE7q1,count,aco75);
-               inFace->AddNode(aCORDE7q1,count+1,aco76);
-               count=count+2;
-               dyi++;
-       }
-
-
-       count=81;
-       for(Int_t dyj=5;dyj<=9;dyj++)
-       {
-
-               Float_t posx1b=constants->SupportModulePositionX(dyj)+0.1*293*0.7071-4*box[0]-8+des+re;
-               Float_t posy1b=constants->SupportModulePositionY(dyj)-0.1*293*0.7071-box[1]-18-2-des+sm;
-               Float_t posz1b=constants->SupportModulePositionZ(dyj+10);
-               Float_t dyx2=constants->SupportModulePositionX(dyj)-0.27*293*0.7071-4*box[0]-8+des+re;
-               Float_t dyy2=constants->SupportModulePositionY(dyj)+0.27*293*0.7071-box[1]-18-2-des+sm;
-               TGeoTranslation *aco75=new TGeoTranslation("aco75",posx1b,posy1b,posz1b);
-               TGeoTranslation *aco76=new TGeoTranslation("aco76",dyx2,dyy2,posz1b);
-               inFace->AddNode(aCORDE7q1,count,aco75);
-               inFace->AddNode(aCORDE7q1,count+1,aco76);
-               count=count+2;
-               dyj++;
-       }
 
+       // Construction of the support and bars for the OutSide
 
-       Float_t posx1q1=constants->SupportModulePositionX(10)+0.5*293*0.7071-4*box[0]-8+re;
-       Float_t posy1q1=constants->SupportModulePositionY(10)-0.5*293*0.7071-box[1]-18-2+sm;
-       Float_t posz1q1=constants->SupportModulePositionZ(10);
-       TGeoTranslation *aco77=new TGeoTranslation("aco77",posx1q1,posy1q1,posz1q1-4*dy);
-       TGeoTranslation *aco78=new TGeoTranslation("aco78",posx1q1,posy1q1,
-                                       constants->SupportModulePositionZ(13)-4*dy);
-
-       TGeoTranslation *aco79=new TGeoTranslation("aco79",posx1q1,posy1q1,
-                                       constants->SupportModulePositionZ(15)-4*dy);
-       TGeoTranslation *aco710=new TGeoTranslation("aco710",posx1q1,posy1q1,
-                                       constants->SupportModulePositionZ(18)-4*dy);
-       inFace->AddNode(aCORDE7q1,91,aco77);
-       inFace->AddNode(aCORDE7q1,92,aco78);
-       inFace->AddNode(aCORDE7q1,93,aco79);
-       inFace->AddNode(aCORDE7q1,94,aco710);
-
-       count=95;
-       for(Int_t dyk=10;dyk<=14;dyk++)
-       {
 
-               Float_t posx1c=constants->SupportModulePositionX(dyk)+0.1*293*0.7071-4*box[0]-8+des+re+.83;
-               Float_t posy1c=constants->SupportModulePositionY(dyk)-0.1*293*0.7071-box[1]-18-2-des+sm;
-               Float_t posz1c=constants->SupportModulePositionZ(dyk);
-               Float_t dyx2=constants->SupportModulePositionX(dyk)-0.27*293*0.7071-4*box[0]-4+des+re+0.83;
-               Float_t dyy2=constants->SupportModulePositionY(dyk)+0.27*293*0.7071-box[1]-18-5-des+sm;
-               TGeoTranslation *aco711=new TGeoTranslation("aco711",posx1c,posy1c,posz1c);
-               TGeoTranslation *aco712=new TGeoTranslation("aco712",dyx2,dyy2,posz1c);
-               inFace->AddNode(aCORDE7q1,count,aco711);
-               inFace->AddNode(aCORDE7q1,count+1,aco712);
-               count=count+2;
-               dyk++;
-       }
+        TGeoVolume *acordeFullSupportOutFace = new TGeoVolumeAssembly("ACORDE_FULL_SUPPORT_OUTFACE");
+        Float_t supportPosXOutA = constants->CenterModulePositionX(45)+deltaXA-90;
+        Float_t supportPosYOutA = 807.2915-7.5-5.5;
+        Float_t x000 = constants->CenterModulePositionX(45);
+        Float_t y000 = constants->CenterModulePositionY(45);
+        Float_t theta1 = 1*TMath::Pi()/4;
 
+        Float_t supportPosXOutPA = x000+(supportPosXOutA-x000)*TMath::Cos(theta1)-(supportPosYOutA-y000)*TMath::Sin(theta1);
+        Float_t supportPosYOutPA = y000+(supportPosYOutA-y000)*TMath::Cos(theta1)+(supportPosXOutA-x000)*TMath::Sin(theta1);
+        Float_t supportPosZOutIn = 0;
 
 
-       count=105;
-       for(Int_t dyl=15;dyl<=19;dyl++)
-       {
+        Float_t supportPosXOutC = constants->CenterModulePositionX(45)-deltaXA;
+        Float_t supportPosXOutPC = x000+(supportPosXOutC-x000)*TMath::Cos(theta1)-(supportPosYOutA-1-y000)*TMath::Sin(theta1);
+        Float_t supportPosYOutPC = y000+(supportPosYOutA-1-y000)*TMath::Cos(theta1)+(supportPosXOutC-x000)*TMath::Sin(theta1);
 
-               Float_t posx1d=constants->SupportModulePositionX(dyl)+0.1*293*0.7071-4*box[0]-8+des+re+0.83;
-               Float_t posy1d=constants->SupportModulePositionY(dyl)-0.1*293*0.7071-box[1]-18-2-des+sm;
-               Float_t posz1d=constants->SupportModulePositionZ(dyl);
-               Float_t dyx2=constants->SupportModulePositionX(dyl)-0.27*293*0.7071-4*box[0]-4+des+re+0.83;
-               Float_t dyy2=constants->SupportModulePositionY(dyl)+0.27*293*0.7071-box[1]-18-5-des;
-               TGeoTranslation *aco713=new TGeoTranslation("aco713",posx1d,posy1d,posz1d);
-               TGeoTranslation *aco714=new TGeoTranslation("aco714",dyx2,dyy2,posz1d);
-               inFace->AddNode(aCORDE7q1,count,aco713);
-               inFace->AddNode(aCORDE7q1,count+1,aco714);
-               count=count+2;
-               dyl++;
-       }
+        Float_t supportPosXOutD = constants->CenterModulePositionX(45)-deltaXB;
+        Float_t supportPosXOutPD = x000+(supportPosXOutD-x000)*TMath::Cos(theta1)-(supportPosYOutA-1-y000)*TMath::Sin(theta1);
+        Float_t supportPosYOutPD = y000+(supportPosYOutA-1-y000)*TMath::Cos(theta1)+(supportPosXOutD-x000)*TMath::Sin(theta1);
 
-               //*** Out-Face ***
 
-       Float_t posx1qa=constants->SupportModulePositionX(50)-0.5*293*0.7071+4*box[0]+8-re-1;
-       Float_t posy1qa=constants->SupportModulePositionY(50)-0.5*293*0.7071-box[1]-18-2+sm-2.5;
-       Float_t posz1qa=constants->SupportModulePositionZ(50);
-       TGeoTranslation *aco715=new TGeoTranslation("aco715",posx1qa,posy1qa,posz1qa-4*dy);
-       TGeoTranslation *aco716=new TGeoTranslation("aco716",posx1qa,posy1qa,
-                               constants->SupportModulePositionZ(43)-4*dy);
-       TGeoTranslation *aco717=new TGeoTranslation("aco717",posx1qa,posy1qa,
-                               constants->SupportModulePositionZ(55)-4*dy);
-       TGeoTranslation *aco718=new TGeoTranslation("aco718",posx1qa,posy1qa,
-                               constants->SupportModulePositionZ(58)-4*dy);
-       TGeoTranslation *aco719=new TGeoTranslation("aco719",
-                               constants->SupportModulePositionX(50)-0.1*293*0.7071+4*box[0]+8-des-re-1,               
-                               constants->SupportModulePositionY(50)-0.1*293*0.7071-box[1]-18-2-des+sm-2.5,
-                               constants->SupportModulePositionZ(45));
-       TGeoTranslation *aco720=new TGeoTranslation("aco720",
-                               constants->SupportModulePositionX(50)+0.27*293*0.7071+4*box[0]+8-des-re-1,
-                               constants->SupportModulePositionY(50)+0.27*293*0.7071-box[1]-18-2-des+sm-2.5,
-                               constants->SupportModulePositionZ(45));
+        acordeFullSupportOutFace->AddNode(acordeMainSupport,1,new TGeoCombiTrans("ACOFSBOUT01",supportPosXOutPA,supportPosYOutPA,supportPosZOutIn,idrotm231));
+       acordeFullSupportOutFace->AddNode(acordeMainSupport,2,new TGeoCombiTrans("ACOFSBOUT02",supportPosXOutPC,supportPosYOutPC,supportPosZOutIn,idrotm231));
+       acordeFullSupportOutFace->AddNode(acordeMainSupport,3,new TGeoCombiTrans("ACOFSBOUT03",supportPosXOutPD,supportPosYOutPD,supportPosZOutIn,idrotm231));
+       
 
+       Float_t supportPosXOutE = constants->CenterModulePositionX(52)+deltaXA;
+       Float_t supportPosYOutE = 585.616-7.5-5.5-0.1;
+       Float_t x0000 = constants->CenterModulePositionX(52);
+       Float_t y0000 = constants->CenterModulePositionY(52);
 
-       outFace->AddNode(aCORDE7q1,115,aco715);
-       outFace->AddNode(aCORDE7q1,116,aco716);
-       outFace->AddNode(aCORDE7q1,117,aco717);
-       outFace->AddNode(aCORDE7q1,118,aco718);
-       outFace->AddNode(aCORDE7q1,119,aco719);
-       outFace->AddNode(aCORDE7q1,120,aco720);
+       Float_t supportPosXOutEP = x0000+(supportPosXOutE-x0000)*TMath::Cos(theta1)-(supportPosYOutE-y0000)*TMath::Sin(theta1);
+       Float_t supportPosYOutEP = y0000+(supportPosYOutE-y0000)*TMath::Cos(theta1)+(supportPosXOutE-x0000)*TMath::Sin(theta1);
+       
+       Float_t supportPosXOutF = constants->CenterModulePositionX(52)+deltaXB;
 
+       Float_t supportPosXOutFP = x0000+(supportPosXOutF-x0000)*TMath::Cos(theta1)-(supportPosYOutE-y0000)*TMath::Sin(theta1);
+       Float_t supportPosYOutFP = y0000+(supportPosYOutE-y0000)*TMath::Cos(theta1)+(supportPosXOutF-x0000)*TMath::Sin(theta1);
 
+       Float_t supportPosXOutG = constants->CenterModulePositionX(52)-deltaXA;
+       Float_t supportPosXOutGP = x0000+(supportPosXOutG-x0000)*TMath::Cos(theta1)-(supportPosYOutE-y0000)*TMath::Sin(theta1);
+       Float_t supportPosYOutGP = y0000+(supportPosYOutE-y0000)*TMath::Cos(theta1)+(supportPosXOutG-x0000)*TMath::Sin(theta1);
 
+       Float_t supportPosXOutH = constants->CenterModulePositionX(52)-deltaXB;
+       Float_t supportPosXOutHP = x0000+(supportPosXOutH-x0000)*TMath::Cos(theta1)-(supportPosYOutE-0.4-y0000)*TMath::Sin(theta1);
+       Float_t supportPosYOutHP = y0000+(supportPosYOutE-0.4-y0000)*TMath::Cos(theta1)+(supportPosXOutH-x0000)*TMath::Sin(theta1);
 
-       count=65;
-       for(Int_t dym=50;dym<=54;dym++)
-       {
 
-               Float_t posx1e=constants->SupportModulePositionX(dym)-0.1*293*0.7071+4*box[0]+8-des-re-1;
-               Float_t posy1e=constants->SupportModulePositionY(dym)-0.1*293*0.7071-box[1]-18-2-des+sm-2.5;
-               Float_t posz1e=constants->SupportModulePositionZ(dym);
-               Float_t dyx2=constants->SupportModulePositionX(dym)+0.27*293*0.7071+4*box[0]+8-des-re-1;
-               Float_t dyy2=constants->SupportModulePositionY(dym)+0.27*293*0.7071-box[1]-18-2-des+sm-2.5;
-               TGeoTranslation *aco721=new TGeoTranslation("aco721",posx1e,posy1e,posz1e);
-               TGeoTranslation *aco722=new TGeoTranslation("aco722",dyx2,dyy2,posz1e);
-               outFace->AddNode(aCORDE7q1,count,aco721);
-               outFace->AddNode(aCORDE7q1,count+1,aco722);
-               count=count+2;
-               dym++;
-       }
+       acordeFullSupportOutFace->AddNode(acordeMainSupport,4,new TGeoCombiTrans("ACOFSBOUT04",supportPosXOutEP,supportPosYOutEP,supportPosZOutIn,idrotm231));
+       acordeFullSupportOutFace->AddNode(acordeMainSupport,5,new TGeoCombiTrans("ACOFSBOUT05",supportPosXOutFP,supportPosYOutFP,supportPosZOutIn,idrotm231));
+       acordeFullSupportOutFace->AddNode(acordeMainSupport,6,new TGeoCombiTrans("ACOFSBOUT06",supportPosXOutGP,supportPosYOutGP,supportPosZOutIn,idrotm231));
+       acordeFullSupportOutFace->AddNode(acordeMainSupport,7,new TGeoCombiTrans("ACOFSBOUT07",supportPosXOutHP,supportPosYOutHP,supportPosZOutIn,idrotm231));
 
+       // Put the bars of the PutFace Side 2 L3-Magnet
 
 
-       count=75;
-       for(Int_t dyn=57;dyn<=59;dyn++)
+       Int_t indexBar0=8;
+       for(Int_t iAcoBar = 40;iAcoBar < 50 ; iAcoBar+=2)
        {
+               Float_t barPosXOutIn = constants->CenterModulePositionX(iAcoBar)+deltaXA-90;
+               Float_t barPosYOutIn = supportPosYOutA-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+               Float_t barPosZOutIn = constants->CenterModulePositionZ(iAcoBar);
+               Float_t barPosXOutP = x000+(barPosXOutIn-x000)*TMath::Cos(theta1)-(barPosYOutIn-y000)*TMath::Sin(theta1);
+               Float_t barPosYOutP = y000+(barPosYOutIn-y000)*TMath::Cos(theta1)+(barPosXOutIn-x000)*TMath::Sin(theta1);
+
+               Float_t barPosXOutInA = constants->CenterModulePositionX(iAcoBar)-deltaXA;
+               Float_t barPosYOutInA = supportPosYOutA-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5-1.;
+               Float_t barPosZOutInA = constants->CenterModulePositionZ(iAcoBar);
+               Float_t barPosXOutPA = x000+(barPosXOutInA-x000)*TMath::Cos(theta1)-(barPosYOutInA-y000)*TMath::Sin(theta1);
+               Float_t barPosYOutPA = y000+(barPosYOutInA-y000)*TMath::Cos(theta1)+(barPosXOutInA-x000)*TMath::Sin(theta1);
+
+
+               Float_t barPosXOutInB = constants->CenterModulePositionX(iAcoBar)-deltaXB;
+               Float_t barPosYOutInB = supportPosYOutA-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5-1.;
+               Float_t barPosZOutInB = constants->CenterModulePositionZ(iAcoBar);
+               Float_t barPosXOutPB = x000+(barPosXOutInB-x000)*TMath::Cos(theta1)-(barPosYOutInB-y000)*TMath::Sin(theta1);
+               Float_t barPosYOutPB = y000+(barPosYOutInB-y000)*TMath::Cos(theta1)+(barPosXOutInB-x000)*TMath::Sin(theta1);
+       
+               acordeFullSupportOutFace->AddNode(acordeMainBar,indexBar0,new TGeoCombiTrans("ACOFSBOUT08",barPosXOutP,barPosYOutP,barPosZOutIn,idrotm231));
+               acordeFullSupportOutFace->AddNode(acordeMainBar,indexBar0+1,new TGeoCombiTrans("ACOFSBOUT08",barPosXOutPA,barPosYOutPA,barPosZOutInA,idrotm231));
+               acordeFullSupportOutFace->AddNode(acordeMainBar,indexBar0+2,new TGeoCombiTrans("ACOFSBOUT08",barPosXOutPB,barPosYOutPB,barPosZOutInB,idrotm231));
 
-               Float_t posx1f=constants->SupportModulePositionX(dyn)-0.1*293*0.7071+4*box[0]+8-des-re-1;
-               Float_t posy1f=constants->SupportModulePositionY(dyn)-0.1*293*0.7071-box[1]-18-2-des+sm-2.5;
-               Float_t posz1f=constants->SupportModulePositionZ(dyn-10);
-               Float_t dyx2=constants->SupportModulePositionX(dyn)+0.27*293*0.7071+4*box[0]+8-des-re-1;
-               Float_t dyy2=constants->SupportModulePositionY(dyn)+0.27*293*0.7071-box[1]-18-2-des+sm-2.5;
-               TGeoTranslation *aco723=new TGeoTranslation("aco723",posx1f,posy1f,posz1f);
-               TGeoTranslation *aco724=new TGeoTranslation("aco724",dyx2,dyy2,posz1f);
-               outFace->AddNode(aCORDE7q1,count,aco723);
-               outFace->AddNode(aCORDE7q1,count+1,aco724);
-               count=count+2;
-               dyn++;
+               indexBar0+=4;
        }
-
-
-       Float_t posx1qb=constants->SupportModulePositionX(40)-0.5*293*0.7071+4*box[0]+5;
-       Float_t posy1qb=constants->SupportModulePositionY(40)-0.5*293*0.7071-box[1]-18-2;
-       Float_t posz1qb=constants->SupportModulePositionZ(40);
-       TGeoTranslation *aco725=new TGeoTranslation("aco725",posx1qb,posy1qb,posz1qb-4*dy);
-       TGeoTranslation *aco726=new TGeoTranslation("aco726",posx1qb,posy1qb,
-                               constants->SupportModulePositionZ(43)-4*dy);
-       TGeoTranslation *aco727=new TGeoTranslation("aco727",posx1qb,posy1qb,
-                               constants->SupportModulePositionZ(45)-4*dy);
-       TGeoTranslation *aco728=new TGeoTranslation("aco728",posx1qb,posy1qb,
-                               constants->SupportModulePositionZ(48)-4*dy);
-       outFace->AddNode(aCORDE7q1,85,aco725);
-       outFace->AddNode(aCORDE7q1,86,aco726);
-       outFace->AddNode(aCORDE7q1,87,aco727);
-       outFace->AddNode(aCORDE7q1,88,aco728);
-
-
-
-       count=89;
-       for(Int_t dyo=40;dyo<=44;dyo++)
+       for(Int_t iAcoBar = 51;iAcoBar < 54 ; iAcoBar+=2)
        {
 
-               Float_t posx1g=constants->SupportModulePositionX(dyo)-0.1*293*0.7071+4*box[0]+8-des-re-1;
-               Float_t posy1g=constants->SupportModulePositionY(dyo)-0.1*293*0.7071-box[1]-18-2-des+sm-2.5;
-               Float_t posz1g=constants->SupportModulePositionZ(dyo);
-               Float_t dyx2=constants->SupportModulePositionX(dyo)+0.27*293*0.7071+4*box[0]+4-des-re-1+2.8;
-               Float_t dyy2=constants->SupportModulePositionY(dyo)+0.27*293*0.7071-box[1]-18-5-des+sm-2.5+3;
-               TGeoTranslation *aco729=new TGeoTranslation("aco729",posx1g,posy1g,posz1g);
-               TGeoTranslation *aco730=new TGeoTranslation("aco730",dyx2,dyy2,posz1g);
-               outFace->AddNode(aCORDE7q1,count,aco729);
-               outFace->AddNode(aCORDE7q1,count+1,aco730);
-               count=count+2;
-               dyo++;
+               Float_t barPosXOutInC = constants->CenterModulePositionX(iAcoBar)+deltaXA;
+               Float_t barPosYOutInC = supportPosYOutE-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+               Float_t barPosZOutInC = constants->CenterModulePositionZ(iAcoBar);
+               Float_t barPosXOutPC = x0000+(barPosXOutInC-x0000)*TMath::Cos(theta1)-(barPosYOutInC-y0000)*TMath::Sin(theta1);
+               Float_t barPosYOutPC = y0000+(barPosYOutInC-y0000)*TMath::Cos(theta1)+(barPosXOutInC-x0000)*TMath::Sin(theta1);
+
+
+               Float_t barPosXOutInD = constants->CenterModulePositionX(iAcoBar)+deltaXB;
+               Float_t barPosYOutInD = supportPosYOutE-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+               Float_t barPosZOutInD = constants->CenterModulePositionZ(iAcoBar);
+               Float_t barPosXOutPD = x0000+(barPosXOutInD-x0000)*TMath::Cos(theta1)-(barPosYOutInD-y0000)*TMath::Sin(theta1);
+               Float_t barPosYOutPD = y0000+(barPosYOutInD-y0000)*TMath::Cos(theta1)+(barPosXOutInD-x0000)*TMath::Sin(theta1);
+
+
+               Float_t barPosXOutInE = constants->CenterModulePositionX(iAcoBar)-deltaXA;
+               Float_t barPosYOutInE = supportPosYOutE-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+               Float_t barPosZOutInE = constants->CenterModulePositionZ(iAcoBar);
+               Float_t barPosXOutPE = x0000+(barPosXOutInE-x0000)*TMath::Cos(theta1)-(barPosYOutInE-y0000)*TMath::Sin(theta1);
+               Float_t barPosYOutPE = y0000+(barPosYOutInE-y0000)*TMath::Cos(theta1)+(barPosXOutInE-x0000)*TMath::Sin(theta1);
+               Float_t barPosXOutInF = constants->CenterModulePositionX(iAcoBar)-deltaXB;
+               Float_t barPosYOutInF = supportPosYOutE-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+               Float_t barPosZOutInF = constants->CenterModulePositionZ(iAcoBar);
+               Float_t barPosXOutPF = x0000+(barPosXOutInF-x0000)*TMath::Cos(theta1)-(barPosYOutInF-0.4-y0000)*TMath::Sin(theta1);
+               Float_t barPosYOutPF = y0000+(barPosYOutInF-0.4-y0000)*TMath::Cos(theta1)+(barPosXOutInF-x0000)*TMath::Sin(theta1);
+
+               acordeFullSupportOutFace->AddNode(acordeMainBar,indexBar0,new TGeoCombiTrans("ACOFSBOUT08",barPosXOutPC,barPosYOutPC,barPosZOutInC,idrotm231));
+               acordeFullSupportOutFace->AddNode(acordeMainBar,indexBar0+1,new TGeoCombiTrans("ACOFSBOUT08",barPosXOutPD,barPosYOutPD,barPosZOutInD,idrotm231));
+               acordeFullSupportOutFace->AddNode(acordeMainBar,indexBar0+2,new TGeoCombiTrans("ACOFSBOUT08",barPosXOutPE,barPosYOutPE,barPosZOutInE,idrotm231));
+               acordeFullSupportOutFace->AddNode(acordeMainBar,indexBar0+3,new TGeoCombiTrans("ACOFSBOUT08",barPosXOutPF,barPosYOutPF,barPosZOutInF,idrotm231));
+               indexBar0+=4;
        }
 
 
-
-       count=99;
-       for(Int_t dyp=45;dyp<=49;dyp++)
+       for(Int_t iAcoBar = 57;iAcoBar < 58 ; iAcoBar+=2)
        {
 
-               Float_t posx1h=constants->SupportModulePositionX(dyp)-0.1*293*0.7071+4*box[0]+8-des-re-1;
-               Float_t posy1h=constants->SupportModulePositionY(dyp)-0.1*293*0.7071-box[1]-18-2-des+sm-2.5;
-               Float_t posz1h=constants->SupportModulePositionZ(dyp);
-               Float_t dyx2=constants->SupportModulePositionX(dyp)+0.27*293*0.7071+4*box[0]+4-des-re-1+2.8;
-               Float_t dyy2=constants->SupportModulePositionY(dyp)+0.27*293*0.7071-box[1]-18-5-des+sm-2.5+3;
-               TGeoTranslation *aco729=new TGeoTranslation("aco729",posx1h,posy1h,posz1h);
-               TGeoTranslation *aco730=new TGeoTranslation("aco730",dyx2,dyy2,posz1h);
-               outFace->AddNode(aCORDE7q1,count,aco729);
-               outFace->AddNode(aCORDE7q1,count+1,aco730);
-               count=count+2;
-               dyp++;
+               Float_t barPosXOutInC = constants->CenterModulePositionX(iAcoBar)+deltaXA;
+               Float_t barPosYOutInC = supportPosYOutE-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+               Float_t barPosZOutInC = constants->CenterModulePositionZ(iAcoBar);
+               Float_t barPosXOutPC = x0000+(barPosXOutInC-x0000)*TMath::Cos(theta1)-(barPosYOutInC-y0000)*TMath::Sin(theta1);
+               Float_t barPosYOutPC = y0000+(barPosYOutInC-y0000)*TMath::Cos(theta1)+(barPosXOutInC-x0000)*TMath::Sin(theta1);
+
+
+               Float_t barPosXOutInD = constants->CenterModulePositionX(iAcoBar)+deltaXB;
+               Float_t barPosYOutInD = supportPosYOutE-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+               Float_t barPosZOutInD = constants->CenterModulePositionZ(iAcoBar);
+               Float_t barPosXOutPD = x0000+(barPosXOutInD-x0000)*TMath::Cos(theta1)-(barPosYOutInD-y0000)*TMath::Sin(theta1);
+               Float_t barPosYOutPD = y0000+(barPosYOutInD-y0000)*TMath::Cos(theta1)+(barPosXOutInD-x0000)*TMath::Sin(theta1);
+
+
+               Float_t barPosXOutInE = constants->CenterModulePositionX(iAcoBar)-deltaXA;
+               Float_t barPosYOutInE = supportPosYOutE-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+               Float_t barPosZOutInE = constants->CenterModulePositionZ(iAcoBar);
+               Float_t barPosXOutPE = x0000+(barPosXOutInE-x0000)*TMath::Cos(theta1)-(barPosYOutInE-y0000)*TMath::Sin(theta1);
+               Float_t barPosYOutPE = y0000+(barPosYOutInE-y0000)*TMath::Cos(theta1)+(barPosXOutInE-x0000)*TMath::Sin(theta1);
+               Float_t barPosXOutInF = constants->CenterModulePositionX(iAcoBar)-deltaXB;
+               Float_t barPosYOutInF = supportPosYOutE-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+               Float_t barPosZOutInF = constants->CenterModulePositionZ(iAcoBar);
+               Float_t barPosXOutPF = x0000+(barPosXOutInF-x0000)*TMath::Cos(theta1)-(barPosYOutInF-0.4-y0000)*TMath::Sin(theta1);
+               Float_t barPosYOutPF = y0000+(barPosYOutInF-0.4-y0000)*TMath::Cos(theta1)+(barPosXOutInF-x0000)*TMath::Sin(theta1);
+
+               acordeFullSupportOutFace->AddNode(acordeMainBar,indexBar0,new TGeoCombiTrans("ACOFSBOUT08",barPosXOutPC,barPosYOutPC,barPosZOutInC,idrotm231));
+               acordeFullSupportOutFace->AddNode(acordeMainBar,indexBar0+1,new TGeoCombiTrans("ACOFSBOUT08",barPosXOutPD,barPosYOutPD,barPosZOutInD,idrotm231));
+               acordeFullSupportOutFace->AddNode(acordeMainBar,indexBar0+2,new TGeoCombiTrans("ACOFSBOUT08",barPosXOutPE,barPosYOutPE,barPosZOutInE,idrotm231));
+               acordeFullSupportOutFace->AddNode(acordeMainBar,indexBar0+3,new TGeoCombiTrans("ACOFSBOUT08",barPosXOutPF,barPosYOutPF,barPosZOutInF,idrotm231));
+               indexBar0+=4;
        }
 
 
-       // Here I define a master volume "ACORDE_SUPPORT" for Acorde's support
-
-       //---> Set the support of ACORDE alice MODULES
+       Float_t barPosXOutInC = constants->CenterModulePositionX(52)+deltaXA;
+       Float_t barPosYOutInC = supportPosYOutE-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+        Float_t barPosZOutInC = constants->CenterModulePositionZ(55);
+       Float_t barPosXOutPC = x0000+(barPosXOutInC-x0000)*TMath::Cos(theta1)-(barPosYOutInC-y0000)*TMath::Sin(theta1);
+       Float_t barPosYOutPC = y0000+(barPosYOutInC-y0000)*TMath::Cos(theta1)+(barPosXOutInC-x0000)*TMath::Sin(theta1);
 
 
-       Float_t dy1=20;
-       box[0]=10;
-       box[1]=0.5;
-       box[2]=500;
+       Float_t barPosXOutInD = constants->CenterModulePositionX(52)+deltaXB;
+       Float_t barPosYOutInD = supportPosYOutE-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+       Float_t barPosXOutPD = x0000+(barPosXOutInD-x0000)*TMath::Cos(theta1)-(barPosYOutInD-y0000)*TMath::Sin(theta1);
+       Float_t barPosYOutPD = y0000+(barPosYOutInD-y0000)*TMath::Cos(theta1)+(barPosXOutInD-x0000)*TMath::Sin(theta1);
 
-       Float_t sx=constants->SupportModulePositionX(24)-0.5*293;
-       Float_t sy=constants->SupportModulePositionY(24)-box[1];
-       Float_t sz=0;
-       Float_t sx2=constants->SupportModulePositionX(24)+0.5*293-dy;
-       Float_t sy2=constants->SupportModulePositionY(24)-box[1];
-       Float_t sx4=constants->SupportModulePositionX(24)-0.5*293+dy2;
-       Float_t sy4=constants->SupportModulePositionY(24)-box[1];
-       Float_t sx5=constants->SupportModulePositionX(24)+0.5*293-dy2;
-       Float_t sy5=constants->SupportModulePositionY(24)-box[1];
 
-       Float_t dyx=constants->SupportModulePositionX(4)+0.5*293*0.7071-box[0];
-       Float_t dyy=constants->SupportModulePositionY(4)-0.5*293*0.7071-box[1];
-       Float_t dyz=0;
-       Float_t dyx1=constants->SupportModulePositionX(4)+0.1*293*0.7071-box[0];
-       Float_t dyy1=constants->SupportModulePositionY(4)-0.1*293*0.7071-box[1];
-       Float_t dyx2=constants->SupportModulePositionX(4)-0.27*293*0.7071-box[0];
-       Float_t dyy2=constants->SupportModulePositionY(4)+0.27*293*0.7071-box[1];
+       Float_t barPosXOutInE = constants->CenterModulePositionX(52)-deltaXA;
+       Float_t barPosYOutInE = supportPosYOutE-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+       Float_t barPosXOutPE = x0000+(barPosXOutInE-x0000)*TMath::Cos(theta1)-(barPosYOutInE-y0000)*TMath::Sin(theta1);
+       Float_t barPosYOutPE = y0000+(barPosYOutInE-y0000)*TMath::Cos(theta1)+(barPosXOutInE-x0000)*TMath::Sin(theta1);
+       Float_t barPosXOutInF = constants->CenterModulePositionX(52)-deltaXB;
+       Float_t barPosYOutInF = supportPosYOutE-boxSingleBar[1]-boxUnionUp[1]-boxUnionDown[1]-7.5;
+       Float_t barPosXOutPF = x0000+(barPosXOutInF-x0000)*TMath::Cos(theta1)-(barPosYOutInF-0.4-y0000)*TMath::Sin(theta1);
+       Float_t barPosYOutPF = y0000+(barPosYOutInF-0.4-y0000)*TMath::Cos(theta1)+(barPosXOutInF-x0000)*TMath::Sin(theta1);
 
+       acordeFullSupportOutFace->AddNode(acordeMainBar,indexBar0,new TGeoCombiTrans("ACOFSBOUT08",barPosXOutPC,barPosYOutPC,barPosZOutInC,idrotm231));
+       acordeFullSupportOutFace->AddNode(acordeMainBar,indexBar0+1,new TGeoCombiTrans("ACOFSBOUT08",barPosXOutPD,barPosYOutPD,barPosZOutInC,idrotm231));
+       acordeFullSupportOutFace->AddNode(acordeMainBar,indexBar0+2,new TGeoCombiTrans("ACOFSBOUT08",barPosXOutPE,barPosYOutPE,barPosZOutInC,idrotm231));
+       acordeFullSupportOutFace->AddNode(acordeMainBar,indexBar0+3,new TGeoCombiTrans("ACOFSBOUT08",barPosXOutPF,barPosYOutPF,barPosZOutInC,idrotm231));
+       
 
-       Float_t dx1=constants->SupportModulePositionX(14)+0.5*293*0.7071-box[0];
-       Float_t dy11=constants->SupportModulePositionY(14)-0.5*293*0.7071-box[1];
-       Float_t dyx11=constants->SupportModulePositionX(14)+0.1*293*0.7071-box[0];
-       Float_t dyy11=constants->SupportModulePositionY(14)-0.1*293*0.7071-box[1];
-       Float_t dyx21=constants->SupportModulePositionX(14)-0.27*293*0.7071-box[0];
-       Float_t dyy21=constants->SupportModulePositionY(14)+0.27*293*0.7071-box[1];
-
-
-       Float_t tbox[3];
-       tbox[0]=1;
-       tbox[1]=7;
-       tbox[2]=500;
-
-       TGeoVolume *support = new TGeoVolumeAssembly("ACORDE_SUPPORT");
-
-       TGeoBBox *acorde8 = new TGeoBBox("acorde8",box[0],box[1],box[2]);
-       TGeoVolume *aCORDE8 = new TGeoVolume("ACORDE8",acorde8,al);
-
-       TGeoBBox *acorde9 = new TGeoBBox("acorde9",tbox[0],tbox[1],tbox[2]);
-       TGeoVolume *aCORDE9 = new TGeoVolume("ACORDE9",acorde9,al);
-
-       support->AddNode(aCORDE8,1,new TGeoTranslation(0,-5,0));
-       support->AddNode(aCORDE8,2,new TGeoTranslation(0,-dy1,0));
-       support->AddNode(aCORDE9,3,new TGeoTranslation(0,-tbox[1]-5.5,0));
-
-
-       // Put "support" on Up-Face
-
-       upFace->AddNode(support,69,new TGeoTranslation("aco8",sx,sy,sz));
-       upFace->AddNode(support,70,new TGeoTranslation("aco8_2",sx2,sy2,sz));
-       upFace->AddNode(support,71,new TGeoTranslation("aco8_4",sx4,sy4,sz));
-       upFace->AddNode(support,72,new TGeoTranslation("aco8_6",sx5,sy5,sz));
-       upFace->AddNode(support,73,new TGeoTranslation("aco8_2",-sx2,sy2,sz));
-       upFace->AddNode(support,74,new TGeoTranslation("aco8_4",-sx4,sy4,sz));
-       upFace->AddNode(support,75,new TGeoTranslation("aco8_6",-sx5,sy5,sz));
 
-       // Put "support" on In-Face
-       Float_t ms = 1.3;
-       inFace->AddNode(support,121,new TGeoCombiTrans("aco8_81",dyx,dyy+ms,dyz,idrotm232));
-       inFace->AddNode(support,122,new TGeoCombiTrans("aco8_121",dyx1+des,ms+dyy1-des,dyz,idrotm232));
-       inFace->AddNode(support,123,new TGeoCombiTrans("aco8_161",dyx2+des,ms+dyy2-des,dyz,idrotm232));
-       inFace->AddNode(support,124,new TGeoCombiTrans("aco8_82",dx1,ms+dy11,dyz,idrotm232));
-       inFace->AddNode(support,125,new TGeoCombiTrans("aco8_122",dyx11+des,ms+dyy11-des,dyz,idrotm232));
-       inFace->AddNode(support,126,new TGeoCombiTrans("aco8_162",dyx21+des,ms+dyy21-des,dyz,idrotm232));
 
-       // Put "support" on Out-Face
 
-       outFace->AddNode(support,121,new TGeoCombiTrans("aco8_81",-dyx,dyy+ms,dyz,idrotm231));
-       outFace->AddNode(support,122,new TGeoCombiTrans("aco8_121",-dyx1-des,ms+dyy1-des,dyz,idrotm231));
-       outFace->AddNode(support,123,new TGeoCombiTrans("aco8_161",-dyx2-des,ms+dyy2-des,dyz,idrotm231));
-       outFace->AddNode(support,124,new TGeoCombiTrans("aco8_82",-dx1,dy11+ms,dyz,idrotm231));
-       outFace->AddNode(support,125,new TGeoCombiTrans("aco8_122",-dyx11-des,ms+dyy11-des,dyz,idrotm231));
-       outFace->AddNode(support,126,new TGeoCombiTrans("aco8_162",-dyx21-des,ms+dyy21-des,dyz,idrotm231));
-       
-       aCORDE->AddNode(inFace,1);//---> volume of supports & bars in-face
-       aCORDE->AddNode(upFace,2);//---> volume of supports & bars up-face
-       aCORDE->AddNode(outFace,3);//---> volume of supports & bars out-face
-       aCORDE->AddNode(modules,4);//---> volume of ALL ACORDE's Modules
-       alice->AddNode(aCORDE,1);//---> put volume of ACORDE over ALICE's volume
+       supportBars->AddNode(acordeFullSupportUpFace,1);
+       supportBars->AddNode(acordeFullSupportInFace,2);
+       supportBars->AddNode(acordeFullSupportOutFace,3);
+       acorde->AddNode(acordeModules,1);
+       acorde->AddNode(supportBars,2);
+       alice->AddNode(acorde,1);//---> put volume of ACORDE over ALICE's volume
 
 
 
@@ -1129,7 +726,7 @@ void AliACORDEv1::StepManager()
   static Float_t eloss;
   static Float_t step;
   // scintillator volume
- static Int_t idScint = gMC->VolId("ACORDE2");
+ static Int_t idScint = gMC->VolId("ACORDESCINTILLATORMODULE");
   // local variables
   Int_t copy;
   TLorentzVector pos;
@@ -1253,15 +850,12 @@ void AliACORDEv1::AddAlignableVolumes() const
        //
        //      ALIC_1
        //          |---> ACORDE_1      
-       //                      |----> ACORDE_1_1 (in_face) ---
-       //                      |----> ACORDE_2_2 (up_face)    |--> BARS&SUPPORTS
-       //                      |----> ACORDE_3_3 (out_face)---
-       //                      |----> ACORDE_MODULES_4        |--> ACORDE'S MODULES
-       //              
+       //                      |----> ALL_ACORDE_MODULES_1/ACORDE_MODULE_%d (d:0->to->59)
+       //                      |----> ACORDE_SUPPORT_BARS_2    |--> BARS&SUPPORTS
        //
        //     Send comments to: Mario Rodriguez Cahuantzi <mrodrigu@mail.cern.ch>
 
-       TString vpstr1 = "ALIC_1/ACORDE_1/ALL_ACORDE_MODULES_4/ACORDE_MODULE_";
+       TString vpstr1 = "ALIC_1/ACORDE_1/ALL_ACORDE_MODULES_1/ACORDE_MODULE_";
        TString snstr1 = "ACORDE/Array";
        TString volpath, symname;
        for(Int_t dy=0; dy<60 ; dy++)
index ded9d39..5f259cb 100644 (file)
@@ -4,9 +4,12 @@
  * See cxx source for full Copyright notice                               */
 
 /* $Id: AliACORDEv1.h,v 1.3 2007/08/18 08:40:00 hristov Exp $ */
-////////////////////////////////////////////////
-//  Manager class for detector: ACORDEv1         //
-////////////////////////////////////////////////
+///////////////////////////////////////////////////////
+//  Manager class for detector: ACORDEv1             //
+//                                                  //
+// Last update: Nov. 17th. 2009                      //
+// Mario Rodriguez Cahuantzi <mrodrigu@mail.cern.ch> //
+///////////////////////////////////////////////////////
 
 #include "AliACORDE.h"