diff --git a/Inputs/DetectorConfiguration/AGMUG.detector b/Inputs/DetectorConfiguration/AGMUG.detector
new file mode 100644
index 0000000000000000000000000000000000000000..2828cba45a6a893310d387e63a3db1cee7a094f3
--- /dev/null
+++ b/Inputs/DetectorConfiguration/AGMUG.detector
@@ -0,0 +1,180 @@
+%%%%%%%%%%Detector%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1
+GeneralTarget
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1
+Target
+ THICKNESS= 0.94 micrometer
+ RADIUS= 7.5 mm
+ MATERIAL= CD2
+ ANGLE= 0 deg
+ X= 0 mm
+ Y= 0 mm
+ Z= 0 mm
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Chamber MUGAST
+ GDMLFilePath= /mnt/hgfs/Echanges/MyGitHubRep/gdml-files/MuGasT/
+ GDMLFileName= MuGasT.gdml
+ GDMLWorldName= Chamber
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Annular Back
+GaspardTracker Annular
+ Z= -148.6
+ RMIN= 16
+ RMAX= 45
+ FIRSTSTAGE= 1
+ SECONDSTAGE= 1
+ THIRDSTAGE= 1
+ VIS= all
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 End-Cap Back
+GaspardTracker Trapezoid
+ X128_Y128= 41.963   21.364  -138.589
+ X1_Y128= 23.737   39.592  -138.591
+ X128_Y1= 122.368   54.712   -71.098
+ X1_Y1= 57.084  119.996   -71.098
+ FIRSTSTAGE= 1
+ SECONDSTAGE= 0
+ THIRDSTAGE= 0
+ VIS= all
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2
+GaspardTracker Trapezoid
+ X128_Y128=     -41.963  -21.364  -138.589
+ X1_Y128=       -23.737  -39.592  -138.591
+ X128_Y1=	    -122.368  -54.712   -71.098
+ X1_Y1=		     -57.084 -119.996   -71.098
+ FIRSTSTAGE= 1
+ SECONDSTAGE= 0
+ THIRDSTAGE= 0
+ VIS= all
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3
+GaspardTracker Trapezoid
+ X128_Y128=     -21.364   41.963  -138.589
+ X1_Y128=       -39.592   23.737  -138.591
+ X128_Y1=	     -54.712  122.368   -71.098
+ X1_Y1=		    -119.996   57.084   -71.098
+ FIRSTSTAGE= 1
+ SECONDSTAGE= 0
+ THIRDSTAGE= 0
+ VIS= all
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4
+GaspardTracker Trapezoid
+ X128_Y128=      21.364  -41.963  -138.589
+ X1_Y128=        39.592  -23.737  -138.591
+ X128_Y1=	      54.712 -122.368   -71.098
+ X1_Y1=		     119.996  -57.084   -71.098
+ FIRSTSTAGE= 1
+ SECONDSTAGE= 0
+ THIRDSTAGE= 0
+ VIS= all
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Barrel
+GaspardTracker Square
+ X1_Y1= -132.251  58.314   53.5
+ X128_Y1= -61.823 128.742   53.5
+ X1_Y128= -132.251 58.314   -58.5
+ X128_Y128= -61.823 128.742  -58.5
+ FIRSTSTAGE= 1
+ SECONDSTAGE= 0 
+ THIRDSTAGE= 0
+ VIS= all
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2
+GaspardTracker Square
+ X1_Y1= -134.75  -52.319  53.5
+ X128_Y1= -134.75   47.281  53.5
+ X1_Y128= -134.75  -52.319 -58.5
+ X128_Y128= -134.75   47.281 -58.5
+ FIRSTSTAGE= 1
+ SECONDSTAGE= 0
+ THIRDSTAGE= 0
+ VIS= all
+%%%%%%%%%%%%%%%%%%%%%			
+MUST2Array			
+%%%%%%% Telescope 1 %%%%%%%
+M2Telescope
+ X1_Y1=	13.00	102.79	145.98
+ X1_Y128=	24.88	10.58	175.20
+ X128_Y1=	103.08	102.90	110.06
+ X128_Y128=	115.23	10.76	139.14
+ SI=	1.00
+ SILI=	0.00
+ CSI=	1.00
+ VIS=	all
+
+%%%%%%% Telescope 2 %%%%%%%
+M2Telescope
+ X1_Y1=	-114.05	10.98	138.48
+ X1_Y128=	-23.81	10.92	174.84
+ X128_Y1=	-102.23	102.22	109.39
+ X128_Y128=	-11.95	102.90	145.48
+ SI=	1.00
+ SILI=	0.00
+ CSI=	1.00
+ VIS=	all
+
+%%%%%%% Telescope 3 %%%%%%%
+M2Telescope
+ X1_Y1=	-11.91	-103.68	146.50
+ X1_Y128=	-24.30	-10.94	175.00
+ X128_Y1=	-102.03	-103.39	110.36
+ X128_Y128=	-114.58	-10.71	138.76
+ SI=	1.00
+ SILI=	0.00
+ CSI=	1.00
+ VIS=	all
+
+%%%%%%% Telescope 4 %%%%%%%
+M2Telescope
+ X1_Y1=	115.12	-11.35	138.94
+ X1_Y128=	24.33	-11.60	174.81
+ X128_Y1=	103.64	-103.42	110.51
+ X128_Y128=	12.89	-103.90	146.29
+ SI=	1.00
+ SILI=	0.00
+ CSI=	1.00
+ VIS=	all
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%
+AGATA
+ THETA= 157.5 
+ PHI= 45 
+ R= 306.432
+ Shape= Square 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+AGATA
+ THETA= 157.5 
+ PHI= 117 
+ R= 306.432
+ Shape= Square 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+AGATA
+ THETA= 157.5 
+ PHI= 189 
+ R= 306.432
+ Shape= Square 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+AGATA
+ THETA= 157.5 
+ PHI= 261
+ R= 306.432
+ Shape= Square 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+AGATA
+ THETA= 157.5 
+ PHI= 333 
+ R= 306.432
+ Shape= Square 
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%Paris
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%ParisCluster
+%   A= 291.358    -7.734 -38.5
+%   B= 291        -7.118 129
+%   C= 246.046  -168.989 129
+%   D= 246.661  -168.641 -38.5
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%ParisCluster
+%   A= 243.139  158.516  -38.5
+%   B= 242.517  158.852  129
+%   C= 290.527   -2.142  129
+%   D= 290.863   -1.52   -38.5
diff --git a/Inputs/DetectorConfiguration/MUGAST.detector b/Inputs/DetectorConfiguration/MUGAST.detector
new file mode 100644
index 0000000000000000000000000000000000000000..bca9b2a251ef127aed7b72a96f589db672f83314
--- /dev/null
+++ b/Inputs/DetectorConfiguration/MUGAST.detector
@@ -0,0 +1,147 @@
+%%%%%%%%%%Detector%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1
+GeneralTarget
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1
+Target
+ THICKNESS= 0.94 micrometer
+ RADIUS= 7.5 mm
+ MATERIAL= CD2
+ ANGLE= 0 deg
+ X= 0 mm
+ Y= 0 mm
+ Z= 0 mm
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Chamber MUGAST
+ GDMLFilePath= /mnt/hgfs/Echanges/MyGitHubRep/gdml-files/MuGasT/
+ GDMLFileName= MuGasT_faster.gdml
+ GDMLWorldName= Chamber
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Annular Back
+GaspardTracker Annular
+ Z= -148.6
+ RMIN= 16
+ RMAX= 45
+ FIRSTSTAGE= 1
+ SECONDSTAGE= 1
+ THIRDSTAGE= 1
+ VIS= all
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 End-Cap Back
+GaspardTracker Trapezoid
+ X128_Y128= 41.963   21.364  -138.589
+ X1_Y128= 23.737   39.592  -138.591
+ X128_Y1= 122.368   54.712   -71.098
+ X1_Y1= 57.084  119.996   -71.098
+ FIRSTSTAGE= 1
+ SECONDSTAGE= 0
+ THIRDSTAGE= 0
+ VIS= all
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2
+GaspardTracker Trapezoid
+ X128_Y128=     -41.963  -21.364  -138.589
+ X1_Y128=       -23.737  -39.592  -138.591
+ X128_Y1=	    -122.368  -54.712   -71.098
+ X1_Y1=		     -57.084 -119.996   -71.098
+ FIRSTSTAGE= 1
+ SECONDSTAGE= 0
+ THIRDSTAGE= 0
+ VIS= all
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%3
+GaspardTracker Trapezoid
+ X128_Y128=     -21.364   41.963  -138.589
+ X1_Y128=       -39.592   23.737  -138.591
+ X128_Y1=	     -54.712  122.368   -71.098
+ X1_Y1=		    -119.996   57.084   -71.098
+ FIRSTSTAGE= 1
+ SECONDSTAGE= 0
+ THIRDSTAGE= 0
+ VIS= all
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%4
+GaspardTracker Trapezoid
+ X128_Y128=      21.364  -41.963  -138.589
+ X1_Y128=        39.592  -23.737  -138.591
+ X128_Y1=	      54.712 -122.368   -71.098
+ X1_Y1=		     119.996  -57.084   -71.098
+ FIRSTSTAGE= 1
+ SECONDSTAGE= 0
+ THIRDSTAGE= 0
+ VIS= all
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%1 Barrel
+GaspardTracker Square
+ X1_Y1= -132.251  58.314   53.5
+ X128_Y1= -61.823 128.742   53.5
+ X1_Y128= -132.251 58.314   -58.5
+ X128_Y128= -61.823 128.742  -58.5
+ FIRSTSTAGE= 1
+ SECONDSTAGE= 0 
+ THIRDSTAGE= 0
+ VIS= all
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%2
+GaspardTracker Square
+ X1_Y1= -134.75  -52.319  53.5
+ X128_Y1= -134.75   47.281  53.5
+ X1_Y128= -134.75  -52.319 -58.5
+ X128_Y128= -134.75   47.281 -58.5
+ FIRSTSTAGE= 1
+ SECONDSTAGE= 0
+ THIRDSTAGE= 0
+ VIS= all
+%%%%%%%%%%%%%%%%%%%%%			
+MUST2Array			
+%%%%%%% Telescope 1 %%%%%%%
+M2Telescope
+ X1_Y1=	13.00	102.79	145.98
+ X1_Y128=	24.88	10.58	175.20
+ X128_Y1=	103.08	102.90	110.06
+ X128_Y128=	115.23	10.76	139.14
+ SI=	1.00
+ SILI=	0.00
+ CSI=	1.00
+ VIS=	all
+
+%%%%%%% Telescope 2 %%%%%%%
+M2Telescope
+ X1_Y1=	-114.05	10.98	138.48
+ X1_Y128=	-23.81	10.92	174.84
+ X128_Y1=	-102.23	102.22	109.39
+ X128_Y128=	-11.95	102.90	145.48
+ SI=	1.00
+ SILI=	0.00
+ CSI=	1.00
+ VIS=	all
+
+%%%%%%% Telescope 3 %%%%%%%
+M2Telescope
+ X1_Y1=	-11.91	-103.68	146.50
+ X1_Y128=	-24.30	-10.94	175.00
+ X128_Y1=	-102.03	-103.39	110.36
+ X128_Y128=	-114.58	-10.71	138.76
+ SI=	1.00
+ SILI=	0.00
+ CSI=	1.00
+ VIS=	all
+
+%%%%%%% Telescope 4 %%%%%%%
+M2Telescope
+ X1_Y1=	115.12	-11.35	138.94
+ X1_Y128=	24.33	-11.60	174.81
+ X128_Y1=	103.64	-103.42	110.51
+ X128_Y128=	12.89	-103.90	146.29
+ SI=	1.00
+ SILI=	0.00
+ CSI=	1.00
+ VIS=	all
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%Paris
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%ParisCluster
+%   A= 291.358    -7.734 -38.5
+%   B= 291        -7.118 129
+%   C= 246.046  -168.989 129
+%   D= 246.661  -168.641 -38.5
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%ParisCluster
+%   A= 243.139  158.516  -38.5
+%   B= 242.517  158.852  129
+%   C= 290.527   -2.142  129
+%   D= 290.863   -1.52   -38.5
diff --git a/NPLib/Detectors/FPDTamu/TFPDTamuData.cxx b/NPLib/Detectors/FPDTamu/TFPDTamuData.cxx
index ab4e349e379ff2dc4c7e6619be43af054c464301..b78ca1cdb17f879b078993e03814a8bce68e24e4 100644
--- a/NPLib/Detectors/FPDTamu/TFPDTamuData.cxx
+++ b/NPLib/Detectors/FPDTamu/TFPDTamuData.cxx
@@ -60,9 +60,11 @@ void TFPDTamuData::Clear() {
     fFPDTamu_AWire_T_DetectorSide.clear();
     fFPDTamu_AWire_Time.clear();
 
+    fFPDTamu_Micro_E_DetNbr.clear();
     fFPDTamu_Micro_E_RowNbr.clear();
     fFPDTamu_Micro_E_ColNbr.clear(); 
     fFPDTamu_Micro_Energy.clear();
+    fFPDTamu_Micro_T_DetNbr.clear(); 
     fFPDTamu_Micro_T_RowNbr.clear(); 
     fFPDTamu_Micro_T_ColNbr.clear(); 
     fFPDTamu_Micro_Time.clear();
@@ -128,7 +130,8 @@ void TFPDTamuData::Dump() const {
   mysize = fFPDTamu_Micro_E_RowNbr.size();
   cout << "Energy Mult: " << mysize << endl;
   for (size_t i = 0 ; i < mysize ; i++){
-    cout << "Row: " << fFPDTamu_Micro_E_RowNbr[i]
+    cout << "Det: " << fFPDTamu_Micro_E_DetNbr[i]
+         << " Row: " << fFPDTamu_Micro_E_RowNbr[i]
          << " Col: " << fFPDTamu_Micro_E_ColNbr[i]
          << " Energy: " << fFPDTamu_Micro_Energy[i]
          <<endl;
@@ -137,7 +140,8 @@ void TFPDTamuData::Dump() const {
   mysize = fFPDTamu_Micro_T_RowNbr.size();
   cout << "Time Mult: " << mysize << endl;
   for (size_t i = 0 ; i < mysize ; i++){
-    cout << "Row: " << fFPDTamu_Micro_T_RowNbr[i]
+    cout << "Det: " << fFPDTamu_Micro_T_DetNbr[i]
+         << " Row: " << fFPDTamu_Micro_T_RowNbr[i]
          << " Col: " << fFPDTamu_Micro_T_ColNbr[i]
          << " Time: " << fFPDTamu_Micro_Time[i]
          <<endl;
diff --git a/NPLib/Detectors/FPDTamu/TFPDTamuData.h b/NPLib/Detectors/FPDTamu/TFPDTamuData.h
index d70f2e477db6e382d38b4babf41262cfcbdebde1..5fb986cda38dacc81b4197abf24cae2bda7bf9f0 100644
--- a/NPLib/Detectors/FPDTamu/TFPDTamuData.h
+++ b/NPLib/Detectors/FPDTamu/TFPDTamuData.h
@@ -19,7 +19,7 @@
  *  The full setup consists from upstream to downstream:                     *
  *  - 2 x Delta E ionisation chamber (might not be used all)                 *
  *  - 4 x Resistive Avalanche wires                                          *
- *  - 28 x pad (MicroMega type ionasation chaamber)                          *
+ *  - 2 x (28 x pad = MicroMega type ionasation chamber)                     *
  *  - 1 Plastic scintillator read by 2 PMTs (Left and right                  *
  *---------------------------------------------------------------------------*
  * Comment:                                                                  *
@@ -59,10 +59,12 @@ class TFPDTamuData : public TObject {
     
 	// MicroMega Plate
     // Energy
+    vector<UShort_t>   fFPDTamu_Micro_E_DetNbr; // Det >=1 
     vector<UShort_t>   fFPDTamu_Micro_E_RowNbr; // Row 0 upstream, Row 3 downstream
     vector<UShort_t>   fFPDTamu_Micro_E_ColNbr; // Col 0 Left, Col 6 Right
     vector<Double_t>   fFPDTamu_Micro_Energy;
     // Time
+    vector<UShort_t>   fFPDTamu_Micro_T_DetNbr; 
     vector<UShort_t>   fFPDTamu_Micro_T_RowNbr; 
     vector<UShort_t>   fFPDTamu_Micro_T_ColNbr; 
     vector<Double_t>   fFPDTamu_Micro_Time;
@@ -147,25 +149,31 @@ class TFPDTamuData : public TObject {
 
     // MicroMega Plate
     // Energy
+    inline void Set_Micro_E_DetNbr(const UShort_t& DetNbr)
+      {fFPDTamu_Micro_E_DetNbr.push_back(DetNbr);} //!
     inline void Set_Micro_E_RowNbr(const UShort_t& RowNbr)
       {fFPDTamu_Micro_E_RowNbr.push_back(RowNbr);} //!
     inline void Set_Micro_E_ColNbr(const UShort_t& ColNbr)
       {fFPDTamu_Micro_E_ColNbr.push_back(ColNbr);} //!
     inline void Set_Micro_Energy(const Double_t& Energy)
       {fFPDTamu_Micro_Energy.push_back(Energy);}//!
-    inline void Set_Micro_E(const UShort_t& RowNbr, const UShort_t& ColNbr, const Double_t& Energy) {
+    inline void Set_Micro_E(const UShort_t& DetNbr, const UShort_t& RowNbr, const UShort_t& ColNbr, const Double_t& Energy) {
+      Set_Micro_E_DetNbr(DetNbr);
       Set_Micro_E_RowNbr(RowNbr);
       Set_Micro_E_ColNbr(ColNbr);
       Set_Micro_Energy(Energy);
     };//!
     // Time
+    inline void Set_Micro_T_DetNbr(const UShort_t& DetNbr)
+      {fFPDTamu_Micro_T_DetNbr.push_back(DetNbr);} //!
     inline void Set_Micro_T_RowNbr(const UShort_t& RowNbr)
       {fFPDTamu_Micro_T_RowNbr.push_back(RowNbr);} //!
     inline void Set_Micro_T_ColNbr(const UShort_t& ColNbr)
       {fFPDTamu_Micro_T_ColNbr.push_back(ColNbr);} //!
     inline void Set_Micro_Time(const Double_t& Time)
       {fFPDTamu_Micro_Time.push_back(Time);}//!
-    inline void Set_Micro_T(const UShort_t& RowNbr, const UShort_t& ColNbr, const Double_t& Time) {
+    inline void Set_Micro_T(const UShort_t& DetNbr, const UShort_t& RowNbr, const UShort_t& ColNbr, const Double_t& Time) {
+      Set_Micro_T_DetNbr(DetNbr);
       Set_Micro_T_RowNbr(RowNbr);
       Set_Micro_T_ColNbr(ColNbr);
       Set_Micro_Time(Time);
@@ -232,6 +240,8 @@ class TFPDTamuData : public TObject {
 	// Energy
     inline UShort_t Get_Micro_Energy_Mult() const
       {return fFPDTamu_Micro_E_RowNbr.size();}
+    inline UShort_t Get_Micro_E_DetNbr(const unsigned int &i) const
+      {return fFPDTamu_Micro_E_DetNbr[i];} //!
     inline UShort_t Get_Micro_E_RowNbr(const unsigned int &i) const
       {return fFPDTamu_Micro_E_RowNbr[i];} //!
     inline UShort_t Get_Micro_E_ColNbr(const unsigned int &i) const
@@ -241,6 +251,8 @@ class TFPDTamuData : public TObject {
 	// Time
     inline UShort_t Get_Micro_Time_Mult() const
       {return fFPDTamu_Micro_T_RowNbr.size();}
+    inline UShort_t Get_Micro_T_DetNbr(const unsigned int &i) const
+      {return fFPDTamu_Micro_T_DetNbr[i];} //!
     inline UShort_t Get_Micro_T_RowNbr(const unsigned int &i) const
       {return fFPDTamu_Micro_T_RowNbr[i];} //!
     inline UShort_t Get_Micro_T_ColNbr(const unsigned int &i) const
diff --git a/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.cxx b/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.cxx
index d59794d98ba7a0989538488e845c4eb5a8dc5000..a3e063cfa79e3d3fdc1e70ab7cd56edab142008e 100644
--- a/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.cxx
+++ b/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.cxx
@@ -119,6 +119,7 @@ void TFPDTamuPhysics::BuildPhysicalEvent() {
   // fill the vectors, calculate positions   
   mysizeE = m_PreTreatedData->Get_Micro_Energy_Mult();
   for (UShort_t e = 0; e < mysizeE ; e++) {
+        MicroDetNumber.push_back(m_PreTreatedData->Get_Micro_E_DetNbr(e));
         MicroRowNumber.push_back(m_PreTreatedData->Get_Micro_E_RowNbr(e));
         MicroColNumber.push_back(m_PreTreatedData->Get_Micro_E_ColNbr(e));
         //Calculate position in X and Z for each of the pads
@@ -259,31 +260,15 @@ void TFPDTamuPhysics::BuildPhysicalEvent() {
   }
 //  cout << " end of plastic " << endl ;
    
-/*
-  //model
-  // match energy and time together
-  unsigned int mysizeE = m_PreTreatedData->Get_Delta_Energy_Mult();
-  unsigned int mysizeT = m_PreTreatedData->Get_Delta_Time_Mult();
-  cout << " " << mysizeE << " " << mysizeT << endl ; 
-  for (UShort_t e = 0; e < mysizeE ; e++) {
-  for (UShort_t t = 0; t < mysizeT ; t++) {
-  if (m_PreTreatedData->Get_Delta_E_DetectorNbr(e) == m_PreTreatedData->Get_Delta_T_DetectorNbr(t)) {
-  DeltaDetNumber.push_back(m_PreTreatedData->Get_Delta_E_DetectorNbr(e));
-  DeltaEnergy.push_back(m_PreTreatedData->Get_Delta_Energy(e));
-  DeltaTime.push_back(m_PreTreatedData->Get_Delta_Time(t));
-  }
-  }
-  }
-  */
-
 }
 
-double TFPDTamuPhysics::GetMicroGroupEnergy(int lrow, int hrow, int lcol, int hcol){
+double TFPDTamuPhysics::GetMicroGroupEnergy(int detector, int lrow, int hrow, int lcol, int hcol){
 
-  int dummy,row,col; 
+  int dummy,row,col,det; 
   double energy = 0;  
 
   //avoid zeros
+  if (detector < 1 || detector > m_NumberOfMicro) return 0; 
   if (lrow==0 || hrow==0 || lcol==0 || hcol==0)
     cout << " \033[1;311mWARNING: '0' value detected, TFPDTamuPhysics::GetMicroGroupEnergy() uses values >=1 " << endl;
   //check validity
@@ -300,16 +285,20 @@ double TFPDTamuPhysics::GetMicroGroupEnergy(int lrow, int hrow, int lcol, int hc
 
   // group energies
   for (UShort_t e = 0; e < MicroRowNumber.size() ; e++) {
+    det = MicroDetNumber.at(e);
     row = MicroRowNumber.at(e)+1;
     col = MicroColNumber.at(e)+1;
-    if ( (row>=lrow && row<=hrow) && (col>=lcol && col<=hcol) )
+    if ( (det == detector) && (row>=lrow && row<=hrow) && (col>=lcol && col<=hcol) ){
       energy += MicroEnergy.at(e);
+    }
   } 
 
   return energy ; 
 }
 
-double TFPDTamuPhysics::GetMicroRowGeomEnergy(int lrow, int hrow){
+double TFPDTamuPhysics::GetMicroRowGeomEnergy(int det, int lrow, int hrow){
+
+  if (det < 1 || det > m_NumberOfMicro) return 0; 
 
   int dummy; 
   double energy = 0.;
@@ -326,9 +315,11 @@ double TFPDTamuPhysics::GetMicroRowGeomEnergy(int lrow, int hrow){
   }
   // group energies
   for (int r = lrow; r < hrow ; r++) {
-    double esample = GetMicroGroupEnergy(r,r,1,7);
+    double esample = GetMicroGroupEnergy(det, r,r,1,7);
+
 //by Shuya 170418
 	if(r == lrow)	energy = 1.;
+
     if( esample > 0 ){
       sample++;  
       energy *= esample ;
@@ -379,14 +370,17 @@ void TFPDTamuPhysics::PreTreat() {
   mysize = m_EventData->Get_Micro_Energy_Mult();
   for (UShort_t i = 0; i < mysize ; ++i) {
     if (m_EventData->Get_Micro_Energy(i) > m_E_RAW_Threshold) {
-      name = "FPDTamu/Micro_R" ;
+      name = "FPDTamu/Micro" ;
+      name+= NPL::itoa( m_EventData->Get_Micro_E_DetNbr(i)) ; // Det number >=1
+      name+= "_R" ;
       name+= NPL::itoa( m_EventData->Get_Micro_E_RowNbr(i)+1) ;
       name+= "_C" ;
       name+= NPL::itoa( m_EventData->Get_Micro_E_ColNbr(i)+1) ;
       name+= "_E" ;
       Double_t Energy = Cal->ApplyCalibration(name, m_EventData->Get_Micro_Energy(i));
       if (Energy > m_E_Threshold) {
-        m_PreTreatedData->Set_Micro_E(m_EventData->Get_Micro_E_RowNbr(i),m_EventData->Get_Micro_E_ColNbr(i), Energy);
+        m_PreTreatedData->Set_Micro_E(m_EventData->Get_Micro_E_DetNbr(i),
+          m_EventData->Get_Micro_E_RowNbr(i),m_EventData->Get_Micro_E_ColNbr(i), Energy);
       }
     }
   }
@@ -394,14 +388,17 @@ void TFPDTamuPhysics::PreTreat() {
   mysize = m_EventData->Get_Micro_Time_Mult();
   for (UShort_t i = 0; i < mysize ; ++i) {
     if (m_EventData->Get_Micro_Time(i) > m_T_RAW_Threshold) {
-      name = "FPDTamu/Micro_R" ;
+      name = "FPDTamu/Micro" ;
+      name+= NPL::itoa( m_EventData->Get_Micro_T_DetNbr(i)+1) ;
+      name = "_R" ;
       name+= NPL::itoa( m_EventData->Get_Micro_T_RowNbr(i)+1) ;
       name+= "_C" ;
       name+= NPL::itoa( m_EventData->Get_Micro_T_ColNbr(i)+1) ;
       name+= "_T" ;
       Double_t Time = Cal->ApplyCalibration(name, m_EventData->Get_Micro_Time(i));
       if (Time > m_T_Threshold) {
-        m_PreTreatedData->Set_Micro_T(m_EventData->Get_Micro_T_RowNbr(i),m_EventData->Get_Micro_T_ColNbr(i), Time);
+        m_PreTreatedData->Set_Micro_T(m_EventData->Get_Micro_T_DetNbr(i),
+          m_EventData->Get_Micro_T_RowNbr(i),m_EventData->Get_Micro_T_ColNbr(i), Time);
       }
     }
   }
@@ -547,6 +544,7 @@ void TFPDTamuPhysics::Clear() {
   DeltaEnergy.clear();
   DeltaTime.clear();
   //Micromega
+  MicroDetNumber.clear();
   MicroRowNumber.clear();
   MicroColNumber.clear();
 	MicroTimeRowNumber.clear();
@@ -615,6 +613,10 @@ void TFPDTamuPhysics::Dump() const {
   cout << "  ...oooOOOooo...   Micromega  ...oooOOOooo...   " << endl;
   // Energy
   mysize = MicroRowNumber.size();
+  cout << " Det :" <<endl; 
+  for (size_t i = 0 ; i < MicroDetNumber.size() ; i++)
+    cout << " " << MicroDetNumber[i];
+  cout<<endl;
   cout << " Row Charge:" <<endl; 
   for (size_t i = 0 ; i < MicroRowNumber.size() ; i++)
     cout << " " << MicroRowNumber[i];
@@ -623,19 +625,14 @@ void TFPDTamuPhysics::Dump() const {
   for (size_t i = 0 ; i < MicroColNumber.size() ; i++)
     cout << " " << MicroColNumber[i];
   cout<<endl;
-    cout << " Row TAC:" << endl;
+  cout << " energy: "<<endl; 
+  for (size_t i = 0 ; i < MicroEnergy.size() ; i++)
+    cout << " " << MicroEnergy[i];
+  cout<<endl;
+  cout << " Row TAC:" << endl;
   for (size_t i = 0 ; i < MicroTimeRowNumber.size() ; i++)
     cout << " " << MicroTimeRowNumber[i];
   cout<<endl;
-      cout << " energy: "<<endl; 
-
-  for (size_t i = 0 ; i < MicroColNumber.size() ; i++)
-    cout << " " << MicroRowNumber[i];
-  cout<<endl;
-  cout << " energy: " << endl;
-  for (size_t i = 0 ; i < MicroColNumber.size() ; i++)
-    cout << " " << MicroRowNumber[i];
-  cout<<endl;
 
   cout << "  ...oooOOOooo...   Plastic Scintillator  ...oooOOOooo...   " << endl;
   // Energy
@@ -819,6 +816,7 @@ void TFPDTamuPhysics::AddParameterToCalibrationManager() {
         "Delta_R"+ NPL::itoa(i+1)+"_C1_T");
   }
 
+<<<<<<< HEAD
   for (int i = 0; i < m_NumberOfMicro; ++i) { // in case there's 2 micromega add up the rows
 	//by Shuya 170414.
     //for (int iRow = 0; iRow < 4; ++iRow) {
@@ -828,6 +826,20 @@ void TFPDTamuPhysics::AddParameterToCalibrationManager() {
             "Micro_R"+ NPL::itoa((4*i)+iRow+1)+"_C"+ NPL::itoa(iCol+1)+"_E");
         Cal->AddParameter("FPDTamu", "Micro_R"+ NPL::itoa((4*i)+iRow+1)+"_C"+ NPL::itoa(iCol+1)+"_T",
             "Micro_R"+ NPL::itoa((4*i)+iRow+1)+"_C"+ NPL::itoa(iCol+1)+"_T");      
+=======
+  for (int iDet = 0; iDet < m_NumberOfMicro; ++iDet) { // in case there's 2 micromega add up the rows
+    for (int iRow = 0; iRow < 4; ++iRow) { // 4 rows
+      for (int iCol = 0; iCol < 7; ++iCol) { // 7 columns
+          int det = iDet+1;
+          int row = iRow+1;
+          int col = iCol+1;
+        Cal->AddParameter("FPDTamu", 
+            "Micro"+NPL::itoa(det)+"_R"+ NPL::itoa(row)+"_C"+ NPL::itoa(col)+"_E",
+            "Micro"+NPL::itoa(det)+"_R"+ NPL::itoa(row)+"_C"+ NPL::itoa(col)+"_E");
+        Cal->AddParameter("FPDTamu", 
+            "Micro"+NPL::itoa(det)+"_R"+ NPL::itoa(row)+"_C"+ NPL::itoa(col)+"_T",
+            "Micro"+NPL::itoa(det)+"_R"+ NPL::itoa(row)+"_C"+ NPL::itoa(col)+"_T");      
+>>>>>>> 1ae8e442f1809ee7fe5fe2a8d84697fd9bc6e6b7
       }
     }
   }
@@ -873,6 +885,7 @@ void TFPDTamuPhysics::InitializeRootInputPhysics() {
   inputChain->SetBranchStatus( "DeltaCharge" , true );
   inputChain->SetBranchStatus( "DeltaEnergy" , true );
   //Micromega
+  inputChain->SetBranchStatus( "MicroDetNumber" , true );
   inputChain->SetBranchStatus( "MicroRowNumber" , true );
   inputChain->SetBranchStatus( "MicroColNumber" , true );
   inputChain->SetBranchStatus( "MicroTimeRowNumber" , true );
diff --git a/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.h b/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.h
index af5b863f2fdc587838d530479313a0511d485e8e..bf4b9e1e3df63fec38712f6e83a36a41ce880511 100644
--- a/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.h
+++ b/NPLib/Detectors/FPDTamu/TFPDTamuPhysics.h
@@ -71,6 +71,7 @@ class TFPDTamuPhysics : public TObject, public NPL::VDetector {
   vector<double> DeltaEnergy;
   vector<double> DeltaTime;//!
   //Micromega
+  vector<int>    MicroDetNumber;
   vector<int>    MicroRowNumber;
   vector<int>    MicroColNumber;
 	vector<int>    MicroTimeRowNumber;
@@ -187,8 +188,8 @@ class TFPDTamuPhysics : public TObject, public NPL::VDetector {
     TFPDTamuData* GetPreTreatedData() const {return m_PreTreatedData;}
     
     // Micromega specific used in analysis
-    double GetMicroGroupEnergy(int lrow, int hrow, int lcol, int hcol) ; 
-    double GetMicroRowGeomEnergy(int lrow, int hrow);
+    double GetMicroGroupEnergy(int det, int lrow, int hrow, int lcol, int hcol) ; 
+    double GetMicroRowGeomEnergy(int det, int lrow, int hrow);
   
   // parameters used in the analysis
   private:
diff --git a/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.cxx b/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.cxx
index ad620e94da2133815228caa53f62aaecd31b18d1..3df18440a7f6e80582d2170fceae12f22a290756 100644
--- a/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.cxx
+++ b/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.cxx
@@ -50,9 +50,175 @@ ClassImp(TGeTAMUPhysics)
     m_EventData         = new TGeTAMUData ;
     m_PreTreatedData    = new TGeTAMUData ;
     m_EventPhysics      = this ;
+    //m_Spectra           = NULL;
+    
+    //Raw Thresholds
+    m_Cry_E_Threshold = 10 ;
+    m_Seg_E_Threshold = 10 ;
+    //Calibrated Threshold
+    m_Cry_E_Raw_Threshold = 100 ;
+    m_Seg_E_Raw_Threshold = 100 ;
+    //Add Back mode
+    m_AddBackMode = 1;
+
   };
 
 
+
+void TGeTAMUPhysics::InitializeStandardParameter(){
+
+//Set high gain as default
+  m_LowGainIsSet = false;
+  m_CryChannelStatus.clear() ;
+  m_SegChannelStatus.clear() ;
+
+//enable all channels 
+vector< bool > CryChannelStatus;
+vector< bool > SegChannelStatus;
+CryChannelStatus.resize(4,true);
+SegChannelStatus.resize(3,true);
+for (unsigned iDet = 0 ; iDet < m_CloverPosition.size() ; iDet++){
+  m_CryChannelStatus[iDet] = CryChannelStatus;
+  m_SegChannelStatus[iDet] = SegChannelStatus;
+}
+
+  return;
+}
+
+///////////////////////////////////////////////////////////////////////////
+void TGeTAMUPhysics::ReadAnalysisConfig(){
+  bool ReadingStatus = false;
+
+  // path to file
+  string FileName = "./configs/ConfigGeTamu.dat";
+
+  // open analysis config file
+  ifstream AnalysisConfigFile;
+  AnalysisConfigFile.open(FileName.c_str());
+
+  if (!AnalysisConfigFile.is_open()) {
+    cout << " No ConfigGeTamu.dat found: Default parameters loaded for Analysis " << FileName << endl;
+    return;
+  }
+  cout << " Loading user parameters for Analysis from ConfigGeTamu.dat " << endl;
+
+  // Save it in a TAsciiFile
+  TAsciiFile* asciiConfig = RootOutput::getInstance()->GetAsciiFileAnalysisConfig();
+  asciiConfig->AppendLine("%%% ConfigGeTamu.dat %%%");
+  asciiConfig->Append(FileName.c_str());
+  asciiConfig->AppendLine("");
+  // read analysis config file
+  string LineBuffer,DataBuffer,whatToDo;
+  while (!AnalysisConfigFile.eof()) {
+    // Pick-up next line
+    getline(AnalysisConfigFile, LineBuffer);
+
+    // search for "header"
+    if (LineBuffer.compare(0, 12, "ConfigGeTamu") == 0) ReadingStatus = true;
+
+    // loop on tokens and data
+    while (ReadingStatus ) {
+
+      whatToDo="";
+      AnalysisConfigFile >> whatToDo;
+
+      // Search for comment symbol (%)
+      if (whatToDo.compare(0, 1, "%") == 0) {
+        AnalysisConfigFile.ignore(numeric_limits<streamsize>::max(), '\n' );
+      }
+
+      else if (whatToDo== "LOW_GAIN_ENERGY") {
+        m_LowGainIsSet  = true ; 
+        cout << whatToDo << " " << m_LowGainIsSet << endl; // e.g. DataBuffer = CLOVER03
+      }
+
+      else if (whatToDo== "DISABLE_ALL") {
+        AnalysisConfigFile >> DataBuffer;
+        cout << whatToDo << "  " << DataBuffer << endl; // e.g. DataBuffer = CLOVER03
+        int detector = atoi(DataBuffer.substr(6,2).c_str());
+        vector< bool > CryChannelStatus;
+        vector< bool > SegChannelStatus;
+        CryChannelStatus.resize(4,false);
+        SegChannelStatus.resize(3,false);
+        m_CryChannelStatus[detector-1] = CryChannelStatus;
+        m_SegChannelStatus[detector-1] = SegChannelStatus;
+      }
+
+      else if (whatToDo == "DISABLE_CHANNEL") {
+        AnalysisConfigFile >> DataBuffer;
+        cout << whatToDo << "  " << DataBuffer << endl; // e.g. DataBuffer = CLOVER03_CRY01, CLOVER03_SEG01
+        int detector = atoi(DataBuffer.substr(6,2).c_str());
+        int channel = -1;
+        if (DataBuffer.compare(9,3,"CRY") == 0) {
+          channel = atoi(DataBuffer.substr(12,2).c_str());
+          m_CryChannelStatus[detector-1][channel-1] = false;
+        }
+        else if (DataBuffer.compare(9,3,"SEG") == 0) {
+          channel = atoi(DataBuffer.substr(12,2).c_str());
+          m_SegChannelStatus[detector-1][channel-1] = false;
+        }
+        else cout << "Warning: detector type for GeTAMU unknown!" << endl;
+      }
+
+      else if (whatToDo=="ADD_BACK_CLOVER") {
+        m_AddBackMode = 1;
+        cout << whatToDo << endl;
+      }
+
+      else if (whatToDo=="ADD_BACK_FACING") {
+        m_AddBackMode = 2;
+        cout << whatToDo << endl;
+      }
+
+      else if (whatToDo=="ADD_BACK_ARRAY") {
+        m_AddBackMode = 3;
+        cout << whatToDo << endl;
+      }
+
+      else if (whatToDo=="CRY_E_RAW_THRESHOLD") {
+        AnalysisConfigFile >> DataBuffer;
+        m_Cry_E_Raw_Threshold = atof(DataBuffer.c_str());
+        cout << whatToDo << " " << m_Cry_E_Raw_Threshold << endl;
+      }
+
+      else if (whatToDo=="SEG_E_RAW_THRESHOLD") {
+        AnalysisConfigFile >> DataBuffer;
+        m_Seg_E_Raw_Threshold = atof(DataBuffer.c_str());
+        cout << whatToDo << " " << m_Seg_E_Raw_Threshold << endl;
+      }
+
+      else if (whatToDo=="CRY_E_THRESHOLD") {
+        AnalysisConfigFile >> DataBuffer;
+        m_Cry_E_Threshold = atof(DataBuffer.c_str());
+        cout << whatToDo << " " << m_Cry_E_Threshold << endl;
+      }
+
+      else if (whatToDo== "SEG_E_THRESHOLD") {
+        AnalysisConfigFile >> DataBuffer;
+        m_Seg_E_Threshold = atof(DataBuffer.c_str());
+        cout << whatToDo << " " << m_Seg_E_Threshold << endl;
+      }
+
+      else {
+        ReadingStatus = false;
+      }
+
+    }
+  }
+}
+
+
+////////////////////////////////////////////////////////////////////////////
+bool TGeTAMUPhysics :: IsValidChannel(const int& DetectorType, const int& detector , const int& channel) {
+  if(DetectorType == 0) //Cry
+    return m_CryChannelStatus[detector-1][channel-1];
+
+  else if(DetectorType == 1)
+    return m_SegChannelStatus[detector-1][channel-1];
+
+  else return false;
+}
+
 /////////////////////////////////////////////////
 void TGeTAMUPhysics::BuildPhysicalEvent(){
   PreTreat();
@@ -129,17 +295,7 @@ void TGeTAMUPhysics::BuildPhysicalEvent(){
         }
       }
     }
-    // show
-    /*
-    int* apixel = *pixel;
-    cout <<endl<<"------- Clover "<< clover << endl;
-    for (unsigned i = 0 ; i < 4 ; i++){
-      for (unsigned j = 0 ; j < 3 ; j++)
-          cout << *(apixel+(i*3)+j) << " ";
-      cout << endl;
-    }
-     cout <<"----------------------- " <<endl;
-    */
+
      //Calculate the singles
     for (unsigned i = 0 ; i < CryEN.size() ; i++){
       int segment = -1;
@@ -182,18 +338,33 @@ for (unsigned i = 0 ; i < m_PreTreatedData->GetMultiplicityCoreT(); i++)
 /////////////////////////////////////////////////
 void TGeTAMUPhysics::PreTreat(){
 
-  ClearPreTreatedData();
-
-  static CalibrationManager* cal = CalibrationManager::getInstance();
-  static string name;
-  unsigned int mysizeE = m_EventData->GetMultiplicityCoreE();
-  unsigned int mysizeT = m_EventData->GetMultiplicityCoreT();
-  double Eraw,Energy;
-  double Traw,Time;
-  int clover, crystal, segment;
-
-  for(unsigned int i = 0 ; i < mysizeE ; i++){
+ClearPreTreatedData();
+
+static CalibrationManager* cal = CalibrationManager::getInstance();
+static string name;
+unsigned int mysizeE ;
+unsigned int mysizeT ;
+double Eraw,Energy;
+double Traw,Time;
+int clover, crystal, segment;
+
+if(m_LowGainIsSet)
+  mysizeE = m_EventData->GetMultiplicityCoreELowGain();
+else
+  mysizeE = m_EventData->GetMultiplicityCoreE();
+
+for(unsigned int i = 0 ; i < mysizeE ; i++){
+  if(m_LowGainIsSet){
+    clover = m_EventData->GetCoreCloverNbrELowGain(i);
+    crystal = m_EventData->GetCoreCrystalNbrELowGain(i);
+    Eraw = m_EventData->GetCoreEnergyLowGain(i);
+  }
+  else{
+    clover = m_EventData->GetCoreCloverNbrE(i);
+    crystal = m_EventData->GetCoreCrystalNbrE(i);
     Eraw = m_EventData->GetCoreEnergy(i);
+/*
+<<<<<<< HEAD
     if(Eraw>0){
       clover = m_EventData->GetCoreCloverNbrE(i);
       crystal = m_EventData->GetCoreCrystalNbrE(i);
@@ -201,52 +372,77 @@ void TGeTAMUPhysics::PreTreat(){
 //by Shuya and Momo 170228.
       //Energy =  cal->ApplyCalibration(name+"_E", Eraw);
       Energy =  cal->ApplyCalibration(name+"_E", Eraw+gRandom->Rndm());
+=======
+  }
+*/
+
+  if(Eraw>=m_Cry_E_Raw_Threshold && IsValidChannel(0, clover, crystal)){
+    name = "GETAMU/D"+ NPL::itoa(clover)+"_CRY"+ NPL::itoa(crystal);
+    Energy =  cal->ApplyCalibration(name+"_E", Eraw+Random->Rndm());
+    if(Energy>=m_Cry_E_Threshold){
+//>>>>>>> 1ae8e442f1809ee7fe5fe2a8d84697fd9bc6e6b7
       Singles_CloverMap_CryEN[clover].push_back(crystal);
       Singles_CloverMap_CryE[clover].push_back(Energy);
       m_PreTreatedData->SetCoreE(clover,crystal,Energy);
     }
   }
+}
 
-  for(unsigned int i = 0 ; i < mysizeT ; i++){
-    Traw = m_EventData->GetCoreTime(i);
-    if(Traw>0){
-      clover = m_EventData->GetCoreCloverNbrT(i);
-      crystal = m_EventData->GetCoreCrystalNbrT(i);
-      name = "GETAMU/D"+ NPL::itoa(clover)+"_CRY"+ NPL::itoa(crystal);
-      Time =  cal->ApplyCalibration(name+"_T", Traw+Random->Rndm());
-      Singles_CloverMap_CryTN[clover].push_back(crystal);
-      Singles_CloverMap_CryT[clover].push_back(Time);
-      m_PreTreatedData->SetCoreT(clover,crystal,Time);
-    }
+mysizeT = m_EventData->GetMultiplicityCoreT();
+for(unsigned int i = 0 ; i < mysizeT ; i++){
+  Traw = m_EventData->GetCoreTime(i);
+  if(Traw>0){
+    clover = m_EventData->GetCoreCloverNbrT(i);
+    crystal = m_EventData->GetCoreCrystalNbrT(i);
+    name = "GETAMU/D"+ NPL::itoa(clover)+"_CRY"+ NPL::itoa(crystal);
+    Time =  cal->ApplyCalibration(name+"_T", Traw+Random->Rndm());
+    Singles_CloverMap_CryTN[clover].push_back(crystal);
+    Singles_CloverMap_CryT[clover].push_back(Time);
+    m_PreTreatedData->SetCoreT(clover,crystal,Time);
   }
+}
 
- mysizeE = m_EventData->GetMultiplicitySegmentE();
-  for(unsigned int i = 0 ; i < mysizeE ; i++){
+if(m_LowGainIsSet)
+  mysizeE = m_EventData->GetMultiplicitySegmentELowGain();
+else
+  mysizeE = m_EventData->GetMultiplicitySegmentE();
+for(unsigned int i = 0 ; i < mysizeE ; i++){
+  
+  if(m_LowGainIsSet){
+    clover = m_EventData->GetSegmentCloverNbrELowGain(i);
+    segment = m_EventData->GetSegmentSegmentNbrELowGain(i);
+    Eraw = m_EventData->GetSegmentEnergyLowGain(i);
+  }
+  else{
+    clover = m_EventData->GetSegmentCloverNbrE(i);
+    segment = m_EventData->GetSegmentSegmentNbrE(i);
     Eraw = m_EventData->GetSegmentEnergy(i);
-    if(Eraw>0){
-      clover = m_EventData->GetSegmentCloverNbrE(i);
-      segment = m_EventData->GetSegmentSegmentNbrE(i);
-      name = "GETAMU/D"+ NPL::itoa(clover)+"_SEG"+ NPL::itoa(segment);
-      Energy =  cal->ApplyCalibration(name+"_E", Eraw+Random->Rndm());
+  }
+
+  if(Eraw>=m_Seg_E_Raw_Threshold && IsValidChannel(1, clover, segment)){
+    name = "GETAMU/D"+ NPL::itoa(clover)+"_SEG"+ NPL::itoa(segment);
+    Energy =  cal->ApplyCalibration(name+"_E", Eraw+Random->Rndm());
+    if(Energy>=m_Seg_E_Threshold){
       Singles_CloverMap_SegEN[clover].push_back(segment);
       Singles_CloverMap_SegE[clover].push_back(Energy);
       m_PreTreatedData->SetSegmentE(clover,segment,Energy);
     }
   }
+}
 
- mysizeT = m_EventData->GetMultiplicitySegmentT();
-  for(unsigned int i = 0 ; i < mysizeT ; i++){
-    Traw = m_EventData->GetSegmentTime(i);
-    if(Traw>0){
-      clover = m_EventData->GetSegmentCloverNbrT(i);
-      segment = m_EventData->GetSegmentSegmentNbrT(i);
-      name = "GETAMU/D"+ NPL::itoa(clover)+"_SEG"+ NPL::itoa(segment);
-      Time =  cal->ApplyCalibration(name+"_T", Traw+Random->Rndm());
-      Singles_CloverMap_CryTN[clover].push_back(segment);
-      Singles_CloverMap_CryT[clover].push_back(Time);
-      m_PreTreatedData->SetSegmentT(clover,segment,Time);
-    }
+mysizeT = m_EventData->GetMultiplicitySegmentT();
+for(unsigned int i = 0 ; i < mysizeT ; i++){
+  Traw = m_EventData->GetSegmentTime(i);
+  if(Traw>0){
+    clover = m_EventData->GetSegmentCloverNbrT(i);
+    segment = m_EventData->GetSegmentSegmentNbrT(i);
+    name = "GETAMU/D"+ NPL::itoa(clover)+"_SEG"+ NPL::itoa(segment);
+    Time =  cal->ApplyCalibration(name+"_T", Traw+Random->Rndm());
+    Singles_CloverMap_CryTN[clover].push_back(segment);
+    Singles_CloverMap_CryT[clover].push_back(Time);
+    m_PreTreatedData->SetSegmentT(clover,segment,Time);
   }
+}
 
 }
 
@@ -285,15 +481,10 @@ void TGeTAMUPhysics::DCSingles( TVector3& BeamBeta){
 
 
 
-void TGeTAMUPhysics::AddBack( TVector3& BeamBeta, int scheme){
-    vector<int>::iterator itClover;
-
-  if (! (scheme >=1 && scheme <= 3) ){
-      cout << " Addback scheme " << scheme << " is not supported " << endl;
-      return;
-      }   
+void TGeTAMUPhysics::AddBack( TVector3& BeamBeta){
+    vector<int>::iterator itClover; 
   
-  if (scheme==1){ // clover by clover add-back
+  if (m_AddBackMode==1){ // clover by clover add-back
     for(unsigned int iPixel = 0 ; iPixel < Singles_E.size() ; iPixel++){
       int clv = Singles_Clover[iPixel];
       int cry = Singles_Crystal[iPixel];
@@ -323,7 +514,7 @@ void TGeTAMUPhysics::AddBack( TVector3& BeamBeta, int scheme){
     }
   } 
   else 
-    if (scheme==2){ // facing clovers (1&3) or (2&4) add-back
+    if (m_AddBackMode==2){ // facing clovers (1&3) or (2&4) add-back
       double max24 = -1; // maximum stored energy 
       double max13 = -1;
       double totE24 = 0; // total energy 
@@ -389,7 +580,7 @@ void TGeTAMUPhysics::AddBack( TVector3& BeamBeta, int scheme){
     } 
   } // end of scheme 2
 else 
-  if (scheme==3){ // all clovers add-back
+  if (m_AddBackMode==3){ // all clovers add-back
     double maxE = -1; // maximum stored energy 
     double totE = 0; // total energy 
     unsigned pixel = -1;
@@ -425,30 +616,7 @@ else
       AddBack_Theta.push_back(GammaLabDirection.Angle(BeamBeta)); 
     }
   } // end of scheme 3 
-
-}
-
-/*
-/////////////////////////////////////////////////
-TVector3 TGeTAMUPhysics::GetPositionOfInteraction(unsigned int& i){
-  //return TVector3();
-  return GetSegmentPosition(Singles_Clover[i],Singles_Crystal[i],Singles_Segment[i]);
 }
-/////////////////////////////////////////////////
-// original energy, position, beta
-double TGeTAMUPhysics::GetDopplerCorrectedEnergy(double& energy , TVector3 direction, TVector3& beta){
-  // renormalise pos vector
-  direction.SetMag(1);
-  m_GammaLV.SetPx(energy*direction.X());
-  m_GammaLV.SetPy(energy*direction.Y());
-  m_GammaLV.SetPz(energy*direction.Z());
-  m_GammaLV.SetE(energy);
-  m_GammaLV.Boost(-beta);
-  return m_GammaLV.Energy();
-}
-//=======
-//} // end of add back
-*/
 
 /////////////////////////////////////////////////
 void TGeTAMUPhysics::AddClover(unsigned int ID ,double R, double Theta, double Phi){
@@ -550,7 +718,12 @@ void TGeTAMUPhysics::ReadConfiguration(NPL::InputParser parser)  {
       exit(1);
     }
   }
+
+  InitializeStandardParameter();
+  ReadAnalysisConfig();
+
 }
+
 ///////////////////////////////////////////////////////////////////////////
 void TGeTAMUPhysics::InitializeRootInputRaw() {
   TChain* inputChain = RootInput::getInstance()->GetChain();
diff --git a/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.h b/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.h
index dde5430da27709d2aa5225563de040e61e60e08b..483bb64eea3236efa5375cfb518f597ce70f3d56 100644
--- a/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.h
+++ b/NPLib/Detectors/GeTAMU/TGeTAMUPhysics.h
@@ -63,6 +63,21 @@ class TGeTAMUPhysics :  public TObject, public NPL::VDetector{
     //   Create associated branches and associated private member DetectorPhysics address
     void InitializeRootOutput() ;
 
+    //   Return false if the channel is disabled by user
+    //   First argument is either 0 for Cry,1 Seg
+    bool IsValidChannel(const int& DetectorType, const int& detector , const int& channel) ;
+
+    //   Return true if the energy is read from low gain channel
+    //   First argument is either 0 for Cry,1 Seg
+    bool IsLowGainChannel(const int& DetectorType, const int& detector , const int& channel) ;
+
+    //   Initialize the standard parameter for analysis
+    //   ie: all channel enable, maximum multiplicity for strip = number of telescope
+    void InitializeStandardParameter();
+
+    //   Read the user configuration file; if no file found, load standard one
+    void ReadAnalysisConfig();
+
     //   This method is called at each event read from the Input Tree. Aime is to build treat Raw dat in order to extract physical parameter. 
     void BuildPhysicalEvent() ;
 
@@ -86,7 +101,7 @@ class TGeTAMUPhysics :  public TObject, public NPL::VDetector{
     TGeTAMUData* m_PreTreatedData;//!
     TGeTAMUPhysics* m_EventPhysics;//!
 
-  public: // Data Member
+  private: // Data Member
     //singles sorting tools
     map<int, vector <int> > Singles_CloverMap_CryEN; //! cry number energy
     map<int, vector <int> > Singles_CloverMap_SegEN; //1 seg number
@@ -96,6 +111,8 @@ class TGeTAMUPhysics :  public TObject, public NPL::VDetector{
     map<int, vector <int> > Singles_CloverMap_SegTN; //! seg number
     map<int, vector <double> > Singles_CloverMap_CryT; //! cry energy
     map<int, vector <double> > Singles_CloverMap_SegT; //! seg energy 
+   
+  public: // Data Member
     //sorting parameters
     vector<double> Singles_E;    
     vector<double> Singles_T;    
@@ -118,12 +135,21 @@ class TGeTAMUPhysics :  public TObject, public NPL::VDetector{
     vector<int> AddBack_Clover;
     vector<int> AddBack_Crystal;
     vector<int> AddBack_Segment;
-
     vector<double> GeTime; // OR of all time signals, can be used for array or or clover only
 
+  private:   //   Map of activated channel
+    map< int, vector<bool> > m_CryChannelStatus;//!
+    map< int, vector<bool> > m_SegChannelStatus;//!
+    double m_Cry_E_Threshold;
+    double m_Seg_E_Threshold;
+    int m_Cry_E_Raw_Threshold;
+    int m_Seg_E_Raw_Threshold;
+    int m_AddBackMode;
+    bool m_LowGainIsSet; 
+ 
   private: // use for anlysis
-   
     TLorentzVector m_GammaLV; //!
+
   public:
     TVector3 GetPositionOfInteraction(unsigned int& i);
     double GetDopplerCorrectedEnergy(double& energy , TVector3 position, TVector3& beta);
@@ -132,7 +158,7 @@ class TGeTAMUPhysics :  public TObject, public NPL::VDetector{
     TVector3 GetCloverPosition(int& CloverNbr);
     TVector3 GetCorePosition(int& CloverNbr, int& CoreNbr);
     TVector3 GetSegmentPosition(int& CloverNbr, int& CoreNbr, int& SegmentNbr);
-    void AddBack(TVector3& beta, int scheme=1);
+    void AddBack(TVector3& beta);
     void DCSingles(TVector3& beta);
     inline TVector3 GetCrystalPosition(int& CloverNbr, int& CoreNbr){return GetCorePosition(CloverNbr,CoreNbr);};
 
diff --git a/NPLib/Detectors/Tiara/TTiaraHyballPhysics.cxx b/NPLib/Detectors/Tiara/TTiaraHyballPhysics.cxx
index f6b30c4c8646dfcb9edddee1d42574d401aea6eb..f2075d8ca91b67cbc6e084e21c26d3f055180bb9 100644
--- a/NPLib/Detectors/Tiara/TTiaraHyballPhysics.cxx
+++ b/NPLib/Detectors/Tiara/TTiaraHyballPhysics.cxx
@@ -559,7 +559,7 @@ void TTiaraHyballPhysics::AddWedgeDetector( double R,double Phi,double Z){
       StripCenter.SetX(r_min + (iRing+0.5)*ring_pitch); // build the detector at angle phi=0, then rotate
       StripCenter.SetY(0);
       StripCenter.SetZ(Z);
-      StripCenter.RotateZ(Phi + (iSec-4+0.5)*sec_pitch + phi_offset ); //https://gca.tamu.edu/TIARA+General/25
+      StripCenter.RotateZ(Phi + (iSec-4+0.5)*sec_pitch + phi_offset ); //https://static.miraheze.org/t40wiki/5/55/TIARA_Detector_Map.png
       lineX.push_back( StripCenter.X() );
       lineY.push_back( StripCenter.Y() );
       lineZ.push_back( StripCenter.Z() );
@@ -603,11 +603,10 @@ TVector3 TTiaraHyballPhysics::GetRandomisedPositionOfInteraction(const int i) co
   double phi = OriginalPosition.Phi();
   double z = OriginalPosition.Z();
   // randomises within a given detector ring and sector
-  double totalRadius = 135.1;
-  double rho_min = (rho-3.2)/totalRadius ; // ratios
-  double rho_max = (rho+3.2)/totalRadius ;
-  double rho_rand = totalRadius*sqrt(Rand->Uniform(rho_min,rho_max));// sqrt is necessary for realistic randomise!
-  double phi_rand = phi + Rand->Uniform(-3.4*deg, +3.4*deg);
+  double rho_min2 = (rho-3.2)*(rho-3.2) ; // ^2 to reproduce a randomization in the arc
+  double rho_max2 = (rho+3.2)*(rho+3.2) ;
+  double rho_rand = sqrt(Rand->Uniform(rho_min2,rho_max2));// sqrt is necessary for realistic randomise!
+  double phi_rand = phi + Rand->Uniform(-3.4*deg, +3.4*deg); 
   return( TVector3(rho_rand*cos(phi_rand),rho_rand*sin(phi_rand),z) ) ;
 }
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////
diff --git a/NPSimulation/Core/Chamber.cc b/NPSimulation/Core/Chamber.cc
index 438f62e541961017b8ad1b39e31d792b308ab902..e764ba2701a4bd89d7320c5fd5fb8eb6584c1fbd 100644
--- a/NPSimulation/Core/Chamber.cc
+++ b/NPSimulation/Core/Chamber.cc
@@ -1,5 +1,5 @@
 /*****************************************************************************
- * Copyright (C) 2009-2016   this file is part of the NPTool Project         *
+ * Copyright (C) 2009   this file is part of the NPTool Project              *
  *                                                                           *
  * For the licensing terms see $NPTOOL/Licence/NPTool_Licence                *
  * For the list of contributors see $NPTOOL/Licence/Contributors             *
@@ -9,13 +9,13 @@
  * Original Author: Marc Labiche  contact address: marc.labiche@stfc.ac.uk   *
  *                                                                           *
  * Creation Date  : January 2010                                             *
- * Last update    : 19/07/2016                                               *
+ * Last update    : 11/03/2010                                               *
  *---------------------------------------------------------------------------*
  * Decription:                                                               *
- *  This class describe standard Chamber. Derived fromNPS::VDetector         *
+ *  This class describe standard Chamber. Derived from VDetector*
  *                                                                           *
  *---------------------------------------------------------------------------*
- * Comment: last update added GREAT chamber                                  *
+ * Comment:                                                                  *
  *                                                                           *
  *                                                                           *
  *****************************************************************************/
@@ -23,6 +23,12 @@
 #include <fstream>
 #include <limits>
 
+// for GDML (MARA and MuGasT)
+#include "G4GDMLParser.hh"
+#include "G4VisAttributes.hh"
+#include "G4Colour.hh"
+
+
 // G4 geometry header
 #include "G4Tubs.hh"
 #include "G4Sphere.hh"
@@ -32,10 +38,15 @@
 #include "G4SubtractionSolid.hh"
 
 //G4 various headers
+#include "G4NistManager.hh"  // NIST database of material
 #include "G4Material.hh"
+#include "G4MaterialTable.hh"
+#include "G4Element.hh"
+#include "G4ElementTable.hh"
 #include "G4RotationMatrix.hh"
 #include "G4PVPlacement.hh"
 #include "G4VPhysicalVolume.hh"
+#include "G4PVPlacement.hh"
 #include "G4VisAttributes.hh"
 #include "G4Colour.hh"
 #include "G4EmCalculator.hh"
@@ -50,134 +61,135 @@ using namespace CLHEP ;
 using namespace std;
 
 
-
 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 // Specific Method of this class
 Chamber::Chamber(): nStripsX(60),nStripsY(40)
 {
-  //m_ChamberType     = true;
-  m_ChamberType     = 0   ;
-  m_ChamberRmin     = 0   ;
-  m_ChamberRmax     = 0   ;
-  m_ChamberPhiMin   = 0   ;
-  m_ChamberPhiMax   = 0   ;
-  m_ChamberThetaMin = 0   ;
-  m_ChamberThetaMax = 0   ;
-
-  // For GREAT:
-  DefineMaterials();
-  //-----------------------------
-  //defaults for Planar
-  fPlanarGuard =   5.0*mm;
-  fPlanarGe_W  = 120.0*mm;
-  fPlanarGe_H  =  60.0*mm;
-  fPlanarGe_T  =  15.0*mm;
-
-  fEndCapThickness    =  2.7*mm; //Notes state a 2.2 mm thick rib supporting a 0.5 mm Be window
-  fAlWindowThickness  =  1.1*mm;
-  fBeWindowThickness  =  0.5*mm;
-
-  fPlanarGeGapFront   = 14.0*mm; //Front face Al -> Front face Ge
-  fPlanarGeGapBack    =  9.0*mm; //Back face Al  -> Back face Ge
-  fPlanarGeGapFront   = 16.0*mm; //Front face Al -> Front face Ge
-  fPlanarGeGapBack    =  7.0*mm; //Back face Al  -> Back face Ge
-
-  fPlanarTotalL       = 2.*fEndCapThickness + fPlanarGeGapFront + fPlanarGeGapBack + fPlanarGe_T;
-
-  //---------------------------------------
-  // I measured 39.5 mm for fPlanarTotalL
-  //  => put end cap thickness 2.75 mm
-  //  => add 1 mm to one of the gaps (most likely the retards put fPlanarGeGapFront = 15 mm !)
-  fPlanarTotalL       = fEndCapThickness + fPlanarGeGapFront + fPlanarGeGapBack + fPlanarGe_T + fAlWindowThickness;
-
-  fdeltaZ_Support     =  0.0*mm;  //looks like there is a little gap between the cooling block and the planar cut-out
-  fGap_PCB_2_Planar   =  6.0*mm;  //the gap between the downstrean part of the PCB and the upstream face of planar
-  fGap_PCB_2_Planar  +=  fdeltaZ_Support;
-  fLengthOfPlanarCut  = 55.0*mm; //the Z dimension of the cut out used to remove the planar
-  //--------------------------------------------------------------
-  // Cooling block dimensions
-  fCoolingBlockL      =  79.0*mm;
-  fCoolingBlockH      = 152.0*mm;
-  fCoolingBlockW      = 176.7*mm;
-  fCoolingBlockT      =   6.0*mm; //excellent idea for low energy transparency !
-
-  // Size of cut-out for the tunnel (and DSSD)
-  fCoolingBlockCutOutH    = 74.4*mm;
-  fCoolingBlockCutOutW    = fCoolingBlockW - 2.*fCoolingBlockT;
-  fCoolingBlockDSSDCentre = fCoolingBlockH - fCoolingBlockT - fCoolingBlockCutOutH/2.;
-  fDSSD_BoardL            = 2.0*mm;  //thickness of Si implantation detector support board
-
-  fCoolingBlockZ = fLengthOfPlanarCut + fDSSD_BoardL + fdeltaZ_Support; //distance between chamber inner wall and downstream side of detector support
-
-  G4cout << "fCoolingBlockZ " << fCoolingBlockZ << G4endl;
-
-
-  //-----------------------------
-  //default DSSD
-  fDSSD_H      = 40.0*mm; //active
-  fDSSD_W      = 60.0*mm; //active
-  fDSSD_T      =  0.3*mm;
-  fDSSD_Guard  =  1.0*mm;
-
-
-  //-----------------------------------------------------
-  // Put these defaults here so I can easily compare them
-  //-----------------------------------------------------
-  //some default PhaseII detector parameters
-  fTotalGeL_PhaseII     = 70.0 * mm;  //was 70
-  fCrystalR_PhaseII     = 24.0 * mm;  //was 25
-  fEndCap2Ge_PhaseII    = 20.0 * mm;  //Distance from Al outer face to Ge
-  //added to fudge PTG's efficiency measurements for close-geometry STUK config.
-  fFudge = 8.0*mm;
-  fEndCap2Ge_PhaseII += fFudge;
-
-  //modify it to make it 5 mm
-  //fEndCap2Ge_PhaseII -= 23*mm;
-
-  fGapBetweenLeaves_PhaseII = 0.8*mm;
-
-  fHoleR_PhaseII        =  5.0 * mm; //was 5.0
-  //fPassiveThick_PhaseII =  0.5 * mm;  
-  fContactThick_PhaseII =  0.5 * mm;  
-
-  //make the PhaseII solids
-  CreateCloverIISolids();
-  //-----------------------------------------------------
-
-
-  //-----------------------------------------------------
-  //some default GREAT Clover parameters
-  fTotalGeL_GREAT     = 105.0 * mm;
-  fTaperGeL_GREAT     =  30.0 * mm;
-  fCrystalR_GREAT     =  35.0 * mm;
-
-  fFrontFaceSquare_GREAT = 54.00 * mm;
-  fBackFaceSquare_GREAT  = 61.50 * mm;
-  fEndCap2Ge_GREAT       = 10.00 * mm;  //Distance from Al outer face to Ge
-
-  fGapBetweenLeaves_GREAT =  0.8*mm;
-
-  fHoleR_GREAT        =  5.0 * mm; //was 5.0
-  //fPassiveThick_GREAT =  0.5 * mm;  
-  fContactThick_GREAT =  0.5 * mm; 
-  //gap between GREAT clover and chamber in "TOP" position
-  fGeTopGap = 1.5 * mm;
-
-  //make the GREAT Clover solids
-  CreateGREATCloverSolids();
-
-  //-----------------------------------------------------
-  //Default position of Ges relative to DSSD
-  geTopPosition  = 0. * mm;    //-1.5 mm puts the downstream endcap of the GREAT detector level with chamber
-  geSidePosition = 0. * mm;
-  //-----------------------------------------------------
 
 
-
-  //Centre of Si Implantation detector [UPSTREAM]
-  fDSSD_BoardZ = -fDSSD_BoardL/2.;
-  fDSSD_BoardZ = 0.0 * mm;
-  G4cout << "Default SiSuport Z " << fDSSD_BoardZ - fDSSD_BoardL/2. << G4endl;
+  //m_ChamberType	= true;
+   m_ChamberType	= 0   ;  // normal
+   m_ChamberRmin	= 0   ;
+   m_ChamberRmax	= 0   ;
+   m_ChamberPhiMin	= 0   ;
+   m_ChamberPhiMax	= 0   ;
+   m_ChamberThetaMin	= 0   ;
+   m_ChamberThetaMax	= 0   ;
+
+   DefineMaterials();
+
+	 //-----------------------------
+	 //defaults for Planar
+	 fPlanarGuard =   5.0*mm;
+	 fPlanarGe_W  = 120.0*mm;
+	 fPlanarGe_H  =  60.0*mm;
+	 fPlanarGe_T  =  15.0*mm;
+
+	 fEndCapThickness    =  2.7*mm; //Notes state a 2.2 mm thick rib supporting a 0.5 mm Be window
+	 fAlWindowThickness  =  1.1*mm;
+	 fBeWindowThickness  =  0.5*mm;
+
+	 fPlanarGeGapFront   = 14.0*mm; //Front face Al -> Front face Ge
+	 fPlanarGeGapBack    =  9.0*mm; //Back face Al  -> Back face Ge
+	 fPlanarGeGapFront   = 16.0*mm; //Front face Al -> Front face Ge
+	 fPlanarGeGapBack    =  7.0*mm; //Back face Al  -> Back face Ge
+
+	 fPlanarTotalL       = 2.*fEndCapThickness + fPlanarGeGapFront + fPlanarGeGapBack + fPlanarGe_T;
+
+	 //---------------------------------------
+	 // I measured 39.5 mm for fPlanarTotalL
+	 //  => put end cap thickness 2.75 mm
+	 //  => add 1 mm to one of the gaps (most likely the retards put fPlanarGeGapFront = 15 mm !)
+	 fPlanarTotalL       = fEndCapThickness + fPlanarGeGapFront + fPlanarGeGapBack + fPlanarGe_T + fAlWindowThickness;
+
+	 fdeltaZ_Support     =  0.0*mm;  //looks like there is a little gap between the cooling block and the planar cut-out
+	 fGap_PCB_2_Planar   =  6.0*mm;  //the gap between the downstrean part of the PCB and the upstream face of planar
+	 fGap_PCB_2_Planar  +=  fdeltaZ_Support;
+	 fLengthOfPlanarCut  = 55.0*mm; //the Z dimension of the cut out used to remove the planar
+	 //--------------------------------------------------------------
+	 // Cooling block dimensions
+	 fCoolingBlockL      =  79.0*mm;
+	 fCoolingBlockH      = 152.0*mm;
+	 fCoolingBlockW      = 176.7*mm;
+	 fCoolingBlockT      =   6.0*mm; //excellent idea for low energy transparency !
+
+	 // Size of cut-out for the tunnel (and DSSD)
+	 fCoolingBlockCutOutH    = 74.4*mm;
+	 fCoolingBlockCutOutW    = fCoolingBlockW - 2.*fCoolingBlockT;
+	 fCoolingBlockDSSDCentre = fCoolingBlockH - fCoolingBlockT - fCoolingBlockCutOutH/2.;
+	 fDSSD_BoardL            = 2.0*mm;  //thickness of Si implantation detector support board
+
+	 fCoolingBlockZ = fLengthOfPlanarCut + fDSSD_BoardL + fdeltaZ_Support; //distance between chamber inner wall and downstream side of detector support
+
+	 G4cout << "fCoolingBlockZ " << fCoolingBlockZ << G4endl;
+    
+
+	 //-----------------------------
+	 //default DSSD
+	 fDSSD_H      = 40.0*mm; //active
+	 fDSSD_W      = 60.0*mm; //active
+	 fDSSD_T      =  0.3*mm;
+	 fDSSD_Guard  =  1.0*mm;
+
+
+	 //-----------------------------------------------------
+	 // Put these defaults here so I can easily compare them
+	 //-----------------------------------------------------
+	 //some default PhaseII detector parameters
+	 fTotalGeL_PhaseII     = 70.0 * mm;  //was 70
+	 fCrystalR_PhaseII     = 24.0 * mm;  //was 25
+	 fEndCap2Ge_PhaseII    = 20.0 * mm;  //Distance from Al outer face to Ge
+	 //added to fudge PTG's efficiency measurements for close-geometry STUK config.
+	 fFudge = 8.0*mm;
+	 fEndCap2Ge_PhaseII += fFudge;
+
+	 //modify it to make it 5 mm
+	 //fEndCap2Ge_PhaseII -= 23*mm;
+
+	 fGapBetweenLeaves_PhaseII = 0.8*mm;
+
+	 fHoleR_PhaseII        =  5.0 * mm; //was 5.0
+	 //fPassiveThick_PhaseII =  0.5 * mm;  
+	 fContactThick_PhaseII =  0.5 * mm;  
+
+	 //make the PhaseII solids
+	 CreateCloverIISolids();
+	 //-----------------------------------------------------
+
+
+	 //-----------------------------------------------------
+	 //some default GREAT Clover parameters
+	 fTotalGeL_GREAT     = 105.0 * mm;
+	 fTaperGeL_GREAT     =  30.0 * mm;
+	 fCrystalR_GREAT     =  35.0 * mm;
+	 
+	 fFrontFaceSquare_GREAT = 54.00 * mm;
+	 fBackFaceSquare_GREAT  = 61.50 * mm;
+	 fEndCap2Ge_GREAT       = 10.00 * mm;  //Distance from Al outer face to Ge
+  
+	 fGapBetweenLeaves_GREAT =  0.8*mm;
+
+	 fHoleR_GREAT        =  5.0 * mm; //was 5.0
+	 //fPassiveThick_GREAT =  0.5 * mm;  
+	 fContactThick_GREAT =  0.5 * mm; 
+	 //gap between GREAT clover and chamber in "TOP" position
+	 fGeTopGap = 1.5 * mm;
+
+	 //make the GREAT Clover solids
+	 CreateGREATCloverSolids();
+
+	 //-----------------------------------------------------
+	 //Default position of Ges relative to DSSD
+	 geTopPosition  = 0. * mm;    //-1.5 mm puts the downstream endcap of the GREAT detector level with chamber
+	 geSidePosition = 0. * mm;
+	 //-----------------------------------------------------
+
+
+  
+	 //Centre of Si Implantation detector [UPSTREAM]
+	 fDSSD_BoardZ = -fDSSD_BoardL/2.;
+	 fDSSD_BoardZ = 0.0 * mm;
+	 G4cout << "Default SiSuport Z " << fDSSD_BoardZ - fDSSD_BoardL/2. << G4endl;
 
 
 
@@ -185,27 +197,58 @@ Chamber::Chamber(): nStripsX(60),nStripsY(40)
 
 G4Material* Chamber::GetMaterialFromLibrary(G4String MaterialName, G4double Temperature, G4double Pressure)
 {
-  // avoid compilation warnings
-  Temperature *= 1;
-  Pressure *= 1;
-
-  if (MaterialName == "Alu") {
-    return MaterialManager::getInstance()->GetMaterialFromLibrary("Al");
-  }
-  if (MaterialName == "Cu") {
-    return MaterialManager::getInstance()->GetMaterialFromLibrary("Cu");
-  }
-  if (MaterialName == "C" || MaterialName == "12C") { // keeping legacy name
-    return MaterialManager::getInstance()->GetMaterialFromLibrary("C");
-  }
-
-  else {
-    G4cout << "No Matching Material in the Chamber Library Default is Vacuum" << G4endl;
-    return  MaterialManager::getInstance()->GetMaterialFromLibrary("Vacuum");
-  }
+  
+  G4Material* myMaterial;
+  //G4NistManager *man= G4NistManager::Instance();
+  //G4NistManager::Instance()->ListMaterials("all"); 
+    Temperature=0.;
+    Pressure=0.;
+
+   if (MaterialName == "Alu") {
+
+
+     G4Material* myMaterial = new G4Material("Alu", 13, 26.98*g/mole, 2.7*g/cm3);
+     //G4Material* myMaterial = man->FindOrBuildMaterial("G4_Al");
+     return myMaterial;
+
+   }
+   if (MaterialName == "Cu") {
+  
+      G4Material* myMaterial = new G4Material("Cu", 29, 63.546*g/mole, 8.96*g/cm3);
+     // G4Material* myMaterial = man->FindOrBuildMaterial("G4_Cu");
+      return myMaterial;
+   }
+   if (MaterialName == "12C") {
+  
+     G4Material* myMaterial = new G4Material("12C", 6, 12.011*g/mole, 2.62*g/cm3);
+     //G4Material* myMaterial = man->FindOrBuildMaterial("G4_C");
+    
+      return myMaterial;
+   }
+
+   else {
+      G4cout << "No Matching Material in the Chamber Library Default is Vacuum" << G4endl;
+      G4Element* N = new G4Element("Nitrogen", "N", 7., 14.01*g / mole);
+      G4Element* O = new G4Element("Oxygen"  , "O", 8., 16.00*g / mole);
+      myMaterial = new G4Material("Vacuum", 0.000000001*mg / cm3, 2);
+      myMaterial->AddElement(N, .7);
+      myMaterial->AddElement(O, .3);
+
+      //G4Material* myMaterial = man->FindOrBuildMaterial("G4_Galactic");
+      //G4Element* N = man->FindOrBuildElement("G4_N");
+      //G4Element* O = man->FindOrBuildElement("G4_O");
+      //const std::vector<G4int> Zvac;
+      //const std::vector<G4double> Wvac;
+      //G4Material* myMaterial = man->FindOrBuildMaterial("Vacuum");
+      //myMaterial = man->ConstructNewMaterial("Vacuum", Zvac,Wvac,0.000000001*mg / cm3);
+
+
+      return(myMaterial);
+   }
 }
 
 
+
 //------------------------------------------------------------------
 //Materials Definitions
 void Chamber::DefineMaterials()
@@ -216,7 +259,7 @@ void Chamber::DefineMaterials()
   G4String name, symbol;
   G4int    ncomponents, natoms;
   G4double fractionmass;
-
+  
   //---------------------------------
   //some elements
   a = 1.0078*g/mole;
@@ -230,40 +273,40 @@ void Chamber::DefineMaterials()
 
   a = 16.00*g/mole;
   G4Element* elO  = new G4Element(name="Oxygen",     symbol="O",  z=8., a);
-
+  
   a = 24.305*g/mole;
   G4Element* elMg = new G4Element(name="Magnesium",  symbol="Mg", z=12., a);
-
+  
   a = 26.98*g/mole;
   G4Element* elAl = new G4Element(name="Aluminium",  symbol="Al", z=13., a);
-
+  
   a = 35.45*g/mole;
   G4Element* elCl = new G4Element(name="Chlorine",   symbol="Cl", z=17., a);
-
+  
   a = 51.9961*g/mole;
   G4Element* elCr = new G4Element(name="Chromium",   symbol="Cr", z=24., a);
 
   a = 54.938*g/mole;
   G4Element* elMn = new G4Element(name="Manganse",   symbol="Mn", z=25., a);
-
+  
   a = 55.845*g/mole;
   G4Element* elFe = new G4Element(name="Iron",       symbol="Fe", z=26., a);
-
+  
   a = 58.6934*g/mole;
   G4Element* elNi = new G4Element(name="Nickel",     symbol="Ni", z=28., a);
 
   a = 63.54*g/mole;
   G4Element* elCu = new G4Element(name="Copper",     symbol="Cu", z=29., a);
-
+  
   a = 65.39*g/mole;
   G4Element* elZn = new G4Element(name="Zinc",       symbol="Zn", z=30., a);
 
   a = 72.61*g/mole;
   G4Element* elGe = new G4Element(name="Germanium",  symbol="Ge", z=32., a);
-
+  
   a =208.98*g/mole;
   G4Element* elBi = new G4Element(name="Bismuth",    symbol="Bi", z=83., a);
-
+  
   //elements for physics....
   a =251.00*g/mole;
   G4Element* elEs = new G4Element(name="Einsteinium",symbol="Es", z=99., a);
@@ -272,7 +315,7 @@ void Chamber::DefineMaterials()
   a =251.00*g/mole;
   G4Element* elFm = new G4Element(name="Fermium",    symbol="Fm", z=100., a);
   fermium = elFm;
-
+  
   //---------------------------------
   //Define required materials
   a=6.941*g/mole;  density=0.534*g/cm3;
@@ -280,35 +323,34 @@ void Chamber::DefineMaterials()
 
   a=9.0122*g/mole;  density=1.85*g/cm3;
   G4Material* Be=new G4Material(name="Berilium", z=4., a, density);
-
+  
   a=28.0855*g/mole;  density=2.33*g/cm3;
   G4Material* Si=new G4Material(name="Silicon", z=14., a, density);
-
+  
   a=72.61*g/mole;  density=5.32*g/cm3;
   G4Material* Ge=new G4Material(name="Germanium", z=32., a, density);
-
+  
   a=26.98*g/mole;  density=2.7*g/cm3;
-
-  new G4Material(name="Aluminium", z=13., a, density);
-
+  G4Material* Al=new G4Material(name="Aluminium", z=13., a, density);
+  
   a=63.54*g/mole;  density=8.96*g/cm3;
-  new G4Material(name="Copper", z=29., a, density);
+  G4Material* Cu=new G4Material(name="Copper", z=29., a, density);
 
   a=183.84*g/mole;  density=19.3*g/cm3;
-  new G4Material(name="Tungsten", z=74., a, density);
-
+  G4Material* W=new G4Material(name="Tungsten", z=74., a, density);
+  
   //---------------------------------
   // AIR
   density = 1.290*mg/cm3;
   G4Material* Air = new G4Material(name="Air", density, ncomponents=2);
   Air->AddElement(elN, fractionmass=70*perCent);
   Air->AddElement(elO, fractionmass=30*perCent);
-
+  
   density  = 1.e-5*g/cm3;      //taken from ExN03
   G4double pressure    = 2.e-7*bar;
   G4double temperature = STP_Temperature;
   G4Material* Vacuum=new G4Material(name="Vacuum", density, ncomponents=1,
-      kStateGas, temperature, pressure);
+				    kStateGas, temperature, pressure);
   Vacuum->AddMaterial(Air, fractionmass=1.);
 
   //---------------------------------
@@ -318,7 +360,7 @@ void Chamber::DefineMaterials()
   pressure    = 1.5/760.0*atmosphere;
   temperature = 310*kelvin;
   G4Material* Pentane=new G4Material(name="Pentane", density, ncomponents=2,
-      kStateGas, temperature, pressure);
+				    kStateGas, temperature, pressure);
   Pentane->AddElement(elH, natoms=12);
   Pentane->AddElement(elC, natoms=5);
 
@@ -329,7 +371,7 @@ void Chamber::DefineMaterials()
   Steel->AddElement(elCr, natoms= 8);
   Steel->AddElement(elNi, natoms=18);
   Steel->AddElement(elFe, natoms=74);  
-
+  
   //------------------------------------------------------------------
   //Brass (there are many compositions) 
   density =  8.87*g/cm3;
@@ -342,7 +384,7 @@ void Chamber::DefineMaterials()
   //DurAl [3-4% Cu, 0.5% Mg, 0.25-1%Mn, remainder Al] : use average val
   density = 2.8*g/cm3;
   G4Material* DurAl = new G4Material(name="DurAluminium",
-      density, ncomponents=4);
+				     density, ncomponents=4);
   DurAl->AddElement(elCu, fractionmass= 3.5*perCent);
   DurAl->AddElement(elMg, fractionmass= 0.5*perCent);
   DurAl->AddElement(elMn, fractionmass= 0.6*perCent);
@@ -408,15 +450,19 @@ void Chamber::DefineMaterials()
 
 // Read stream at Configfile to pick-up parameters of detector (Position,...)
 // Called in DetecorConstruction::ReadDetextorConfiguration Method
+//void Chamber::ReadConfiguration(string Path)
+//{
+
 void Chamber::ReadConfiguration(NPL::InputParser parser){
   vector<NPL::InputBlock*> blocks = parser.GetAllBlocksWithTokenAndValue("Chamber","Great-Karl");
   if(NPOptionManager::getInstance()->GetVerboseLevel())
-    cout << "//// " << blocks.size() << " detectors found " << endl; 
+    cout << "//// " << blocks.size() << " GREAT Chmaber found " << endl; 
 
   vector<string> token = {"Heightmin","Heightmax","Widthmin","Widthmax","Depthmin","Depthmax","Material"};
 
   for(unsigned int i = 0 ; i < blocks.size() ; i++){
-    if(blocks[i]->HasTokenList(token)){
+ 
+   if(blocks[i]->HasTokenList(token)){
       if(NPOptionManager::getInstance()->GetVerboseLevel())
         cout << endl << "////  Great chamber as defined by Karl " << i+1 <<  endl;
       m_ChamberType = 3 ;
@@ -437,7 +483,7 @@ void Chamber::ReadConfiguration(NPL::InputParser parser){
   blocks.clear();
   blocks = parser.GetAllBlocksWithTokenAndValue("Chamber","Great");
   if(NPOptionManager::getInstance()->GetVerboseLevel())
-    cout << "//// " << blocks.size() << " detectors found " << endl; 
+    cout << "//// " << blocks.size() << " Great Chamber found " << endl; 
 
 
   for(unsigned int i = 0 ; i < blocks.size() ; i++){
@@ -462,9 +508,9 @@ void Chamber::ReadConfiguration(NPL::InputParser parser){
   blocks.clear();
   blocks = parser.GetAllBlocksWithTokenAndValue("Chamber","");
   if(NPOptionManager::getInstance()->GetVerboseLevel())
-    cout << "//// " << blocks.size() << " detectors found " << endl; 
+    cout << "//// " << blocks.size() << " Chamber found " << endl; 
 
-  token = {"Heightmin","Heightmax","Widthmin","Widthmax","Depthmin","Depthmax","Material"};
+  token = {"Rmin","Rmax","PhiMin","PhiMax","ThetaMin","ThetaMax","Material"};
 
   for(unsigned int i = 0 ; i < blocks.size() ; i++){
     if(blocks[i]->HasTokenList(token)){
@@ -484,743 +530,1084 @@ void Chamber::ReadConfiguration(NPL::InputParser parser){
       cout << "Warning: check your input file formatting " << endl;
     }
   }
-}
-// Little trick to avoid warning in compilation: Use a PVPlacement "buffer".
-// If don't you will have a Warning unused variable 'myPVP'
-G4VPhysicalVolume* PVPBuffer ;
-
-
-
-
-// Construct detector and inialise sensitive part.
-// Called After DetecorConstruction::AddDetector Method
-void Chamber::ConstructDetector(G4LogicalVolume* world)
-{
-  //   if (m_ChamberType) {   // case of standard Chamber
-  if (m_ChamberType==0) {   // case of standard Chamber
-
-    G4Sphere* solidChamber
-      = new G4Sphere("solidChamber", m_ChamberRmin, m_ChamberRmax, m_ChamberPhiMin, m_ChamberPhiMax, m_ChamberThetaMin, m_ChamberThetaMax );
-
-    G4LogicalVolume* logicChamber = new G4LogicalVolume(solidChamber, m_ChamberMaterial, "logicChamber");
-
-    // rotation of target
-    //G4RotationMatrix *rotation = new G4RotationMatrix();
-    //rotation->rotateY(m_ChamberAngle);
-
-    new G4PVPlacement(0, G4ThreeVector(0., 0., 0.), logicChamber, "Chamber", world, false, 0);
-
-    G4VisAttributes* ChamberVisAtt = new G4VisAttributes(G4Colour(0., 1., 1.));
-    logicChamber->SetVisAttributes(ChamberVisAtt);
-    //  }
-}
-
-else if(m_ChamberType==1){   // case of cryogenic target
-}
-
-else if(m_ChamberType==2){  // case of GREAT chamber  
-
-  G4Box* solidExtChamber
-    = new G4Box("solidExtChamber", m_ChamberWmax/2, m_ChamberHmax/2, m_ChamberDmax/2 );
-  G4Box* solidIntChamber
-    = new G4Box("solidIntChamber", m_ChamberWmin/2, m_ChamberHmin/2, m_ChamberDmin/2 );
-
-  G4SubtractionSolid* solidChamber=new G4SubtractionSolid("SolidChamber",solidExtChamber, solidIntChamber, 0, G4ThreeVector(0.,0.,-0.5*cm));
-
-
-  G4LogicalVolume* logicChamber = new G4LogicalVolume(solidChamber, m_ChamberMaterial, "logicChamber");
-
-  // rotation of target
-  //G4RotationMatrix *rotation = new G4RotationMatrix();
-  //rotation->rotateY(m_ChamberAngle);
-
-  PVPBuffer =
-    new G4PVPlacement(0, G4ThreeVector(0., -2.92325*cm/2, 0.), logicChamber, "Chamber", world, false, 0);
-
-  G4VisAttributes* ChamberVisAtt = new G4VisAttributes(G4Colour(0., 1., 1.));
-  logicChamber->SetVisAttributes(ChamberVisAtt);
 
 
-  /*  Eleanor's additions: *//*
-
-  // for the DSSSD (considered as passive here !!):
-
-  G4Material* m_DSSSDMaterial = new G4Material("Si", 14, 28.0855*g/mole, 2.33*g/cm3);
-
-  G4Box* solidDSSSD
-  = new G4Box("solidDSSSD", 6.*cm/2, 4.*cm/2, 0.03*cm/2 );  // 
-
-  G4LogicalVolume* logicDSSSD = new G4LogicalVolume(solidDSSSD, m_DSSSDMaterial, "logicDSSSD");
-
-  PVPBuffer =
-  new G4PVPlacement(0, G4ThreeVector(-3.2*cm, 0., 0.), logicDSSSD, "DSSSD", world, false, 0);
-  //new G4PVPlacement(0, G4ThreeVector(-3.2*cm, 2.92325*cm/2, 0.), logicDSSSD, "DSSSD", logicChamber, false, 0);
-  PVPBuffer =
-  new G4PVPlacement(0, G4ThreeVector( 3.2*cm, 0., 0.), logicDSSSD, "DSSSD", world, false, 1);
-  //new G4PVPlacement(0, G4ThreeVector( 3.2*cm, 2.92325*cm/2, 0.), logicDSSSD, "DSSSD", logicChamber, false, 1);
-
-  G4VisAttributes* DSSSDVisAtt = new G4VisAttributes(G4Colour(0., 0., 1.));
-  logicDSSSD->SetVisAttributes(DSSSDVisAtt);
-
-
-
-  // for the solid aluminium support :
-
-  G4Box* solid_alu_support_ext
-  = new G4Box("solid_alu_support_ext", (18.32-0.65)*cm/2, (12.343-0.65)*cm/2, 8.5*cm/2 );  // 
-
-  G4Box* solid_alu_support_int
-  = new G4Box("solid_alu_support_int",16.27*cm/2, 10.295*cm/2, 8.6*cm/2 );  // 
-  G4SubtractionSolid* solidsupport=new G4SubtractionSolid("Solidsupport",solid_alu_support_ext, solid_alu_support_int, 0, G4ThreeVector(0.,0.,0));	
-  G4LogicalVolume* logicALU = new G4LogicalVolume(solidsupport, m_ChamberMaterial, "logicALU");
-
-  PVPBuffer =
-  new G4PVPlacement(0, G4ThreeVector(0., -2.92325*cm/2,-4.265*cm), logicALU, "Aluminium", world, false, 0);
-
-  G4VisAttributes* alusupportVisAtt = new G4VisAttributes(G4Colour(0.5, 0., 0.3));
-  logicALU->SetVisAttributes(alusupportVisAtt);
-
-
-  G4Box* solid_alu_support_int1
-  = new G4Box("solid_alu_support_int1",16.27*cm/2, 0.55*cm/2, 8.6*cm/2 );  // 
-
-  G4LogicalVolume* logicALUint1 = new G4LogicalVolume(solid_alu_support_int1, m_ChamberMaterial, "logicALUint1");
-
-  PVPBuffer =
-  new G4PVPlacement(0, G4ThreeVector(0, -2.5215*cm-2.92325*cm/2, -4.265*cm), logicALUint1, "Aluminium", world, false, 0);
-
-  G4VisAttributes* solid_alu_support_int1VisAtt = new G4VisAttributes(G4Colour(0.9, 0., 0.));
-  logicALUint1->SetVisAttributes(solid_alu_support_int1VisAtt);
-
-
-  G4Box* solid_alu_support_int2
-  = new G4Box("solid_alu_support_int2",1.4*cm/2, 2.35*cm/2, 8.6*cm/2 );  // 
-
-  G4LogicalVolume* logicALUint2 = new G4LogicalVolume(solid_alu_support_int2, m_ChamberMaterial, "logicALUint2");
-
-  PVPBuffer =
-  new G4PVPlacement(0, G4ThreeVector(0, -3.9715*cm-2.92325*cm/2, -4.265*cm), logicALUint2, "Aluminium", world, false, 0);
-
-
-  G4VisAttributes* solid_alu_support_int2VisAtt = new G4VisAttributes(G4Colour(0.9, 0., 0.));
-  logicALUint2->SetVisAttributes(solid_alu_support_int2VisAtt);
-
-
-  G4Box* solid_DSSSD_coating1
-  = new G4Box("solid_DSSSD_coating1",16.27*cm/2, 0.1*cm/2, 8.6*cm/2 );  // 
-
-  G4LogicalVolume* logicSiliconCoating1 = new G4LogicalVolume(solid_DSSSD_coating1, m_DSSSDMaterial, "logicSiliconCoating1");
-  PVPBuffer =
-  new G4PVPlacement(0, G4ThreeVector(0, -2.5215*cm-2.92325*cm/2+0.05*cm+0.55*cm/2, -4.265*cm), logicSiliconCoating1, "PinDiode1", world, false, 0);
-
-  G4VisAttributes* solid_DSSSD_coating1VisAtt = new G4VisAttributes(G4Colour(0., 0.2, 0.8));
-  logicSiliconCoating1->SetVisAttributes(solid_DSSSD_coating1VisAtt);
-
-
-  G4Box* solid_DSSSD_coating2
-    = new G4Box("solid_DSSSD_coating2",16.27*cm/2, 0.1*cm/2, 8.6*cm/2 );  // 
-
-  G4LogicalVolume* logicSiliconCoating2 = new G4LogicalVolume(solid_DSSSD_coating2, m_DSSSDMaterial, "logicSiliconCoating2");
-  PVPBuffer =
-    new G4PVPlacement(0, G4ThreeVector(0, 5.1055*cm-2.92325*cm/2-0.05*cm, -4.265*cm), logicSiliconCoating2, "PinDiode2", world, false, 0);
-
-  G4VisAttributes* solid_DSSSD_coating2VisAtt = new G4VisAttributes(G4Colour(0., 0.2, 0.8));
-  logicSiliconCoating2->SetVisAttributes(solid_DSSSD_coating2VisAtt);
-
-
-  G4Box* solid_DSSSD_coating3
-    = new G4Box("solid_DSSSD_coating3",0.1*cm/2, 7.393*cm/2, 8.6*cm/2 );  // 
-
-  G4LogicalVolume* logicSiliconCoating3 = new G4LogicalVolume(solid_DSSSD_coating3, m_DSSSDMaterial, "logicSiliconCoating3");
-  PVPBuffer =
-    new G4PVPlacement(0, G4ThreeVector(8.085*cm, 1.4375*cm-2.92325*cm/2, -4.265*cm), logicSiliconCoating3, "PinDiode3", world, false, 0);
-  PVPBuffer =
-    new G4PVPlacement(0, G4ThreeVector(-8.085*cm, 1.4375*cm-2.92325*cm/2, -4.265*cm), logicSiliconCoating3, "PinDiode4", world, false, 1);
-
-  G4VisAttributes* solid_DSSSD_coating3VisAtt = new G4VisAttributes(G4Colour(0., 0.2, 0.8));
-  logicSiliconCoating3->SetVisAttributes(solid_DSSSD_coating3VisAtt);
-
-
-
-  // Preamps and connectors board
-
-  //  PCB
-
-
-  G4Element* Si   = new G4Element("Silicon" , "Si"  , 14  , 28.0855  * g / mole);
-  G4Element* C   = new G4Element("Carbon"   , "C"  , 6  , 12.011  * g / mole);
-  G4Element* H   = new G4Element("Hydrogen"   , "H"  , 1  , 1.0079  * g / mole);
-  G4Element* Br   = new G4Element("Bromine"   , "Br"  , 35  , 79.904 * g / mole);
-  G4Element* O   = new G4Element("Oxigen"   , "O"  , 8  , 16.00  * g / mole);
-
-  G4double density = 1.7 * g / cm3;
-  G4int ncomponents;
-  G4Material* PCB = new G4Material("PCB", density, ncomponents = 5);
-  PCB->AddElement(Si, .181);
-  PCB->AddElement(O, .406);
-  PCB->AddElement(C, .278);
-  PCB->AddElement(H, .068);
-  PCB->AddElement(Br, .067);
-
-
-
-  G4Box* pre_amp_board1
-    = new G4Box("pre_amp_board1",6.756*cm/2, 1.675*cm/2, 7.976*cm/2 );  // 
-
-  G4LogicalVolume* logicpre_amp1 = new G4LogicalVolume(pre_amp_board1, PCB, "logicpre_amp1");
-  PVPBuffer =
-    new G4PVPlacement(0, G4ThreeVector(4.0675*cm, 5.267875*cm, -4.265*cm), logicpre_amp1, "pre_amp_board1", world, false, 0);
-  PVPBuffer =
-    new G4PVPlacement(0, G4ThreeVector(-4.0675*cm, 5.267875*cm, -4.265*cm), logicpre_amp1, "pre_amp_board1", world, false, 1);
-
-
-  G4VisAttributes* pre_amp_board1VisAtt = new G4VisAttributes(G4Colour(0., 0.7, 0.));
-  logicpre_amp1->SetVisAttributes(pre_amp_board1VisAtt);
-
-  G4Box* pre_amp_board2
-    = new G4Box("pre_amp_board2",1.675*cm/2, 6.756*cm/2, 7.976*cm/2 );  // 
-
-  G4LogicalVolume* logicpre_amp2 = new G4LogicalVolume(pre_amp_board2, PCB, "logicpre_amp2");
-  PVPBuffer =
-    new G4PVPlacement(0, G4ThreeVector(9.6625*cm, 2.413375*cm, -4.265*cm), logicpre_amp2, "pre_amp_board2", world, false, 0);
-  PVPBuffer =
-    new G4PVPlacement(0, G4ThreeVector(9.6625*cm, -5.336625*cm, -4.265*cm), logicpre_amp2, "pre_amp_board2", world, false, 1);
-
-
-  G4VisAttributes* pre_amp_board2VisAtt = new G4VisAttributes(G4Colour(0., 0.7, 0.));
-  logicpre_amp2->SetVisAttributes(pre_amp_board2VisAtt);
-
+  blocks.clear();
+  blocks = parser.GetAllBlocksWithTokenAndValue("Chamber","MARA");
+  if(NPOptionManager::getInstance()->GetVerboseLevel())
+    cout << "//// " << blocks.size() << " MARA chamber found " << endl; 
 
-  G4Box* pre_amp_board3
-    = new G4Box("pre_amp_board3",1.675*cm/2, 6.756*cm/2, 7.976*cm/2 );  // 
+  token = {"GDMLFilePath","GDMLFileName","GDMLWorldName"};
 
-  G4LogicalVolume* logicpre_amp3 = new G4LogicalVolume(pre_amp_board3, PCB, "logicpre_amp3");
-  PVPBuffer =
-    new G4PVPlacement(0, G4ThreeVector(-9.6725*cm, 2.413375*cm, -4.265*cm), logicpre_amp3, "pre_amp_board3", world, false, 0);
-  PVPBuffer =
-    new G4PVPlacement(0, G4ThreeVector(-9.6725*cm, -5.336625*cm, -4.265*cm), logicpre_amp3, "pre_amp_board3", world, false, 1);
 
+  for(unsigned int i = 0 ; i < blocks.size() ; i++){
+    if(blocks[i]->HasTokenList(token)){
+      if(NPOptionManager::getInstance()->GetVerboseLevel())
+        cout << endl << "////  Great standard chamber  " << i+1 <<  endl;
+      m_ChamberType = 4 ;
+      m_GDMLPath = blocks[i]->GetString("GDMLFilePath");
+      m_GDMLName = blocks[i]->GetString("GDMLFileName");
+      m_GDMLWorld = blocks[i]->GetString("GDMLWorldName");
+    }
 
-  G4VisAttributes* pre_amp_board3VisAtt = new G4VisAttributes(G4Colour(0., 0.7, 0.));
-  logicpre_amp3->SetVisAttributes(pre_amp_board3VisAtt);
+    else{
+      cout << "Warning: check your input file formatting " << endl;
+    }
+  }
 
-  */ /* end of Eleanor's additions */  
+  blocks.clear();
+  blocks = parser.GetAllBlocksWithTokenAndValue("Chamber","MUGAST");
+  if(NPOptionManager::getInstance()->GetVerboseLevel())
+    cout << "//// " << blocks.size() << " MuGasT chamber found " << endl; 
 
+  token = {"GDMLFilePath","GDMLFileName","GDMLWorldName"};
 
 
+  for(unsigned int i = 0 ; i < blocks.size() ; i++){
+    if(blocks[i]->HasTokenList(token)){
+      if(NPOptionManager::getInstance()->GetVerboseLevel())
+        cout << endl << "////  standard chamber  " << i+1 <<  endl;
+      m_ChamberType = 5 ;
+      m_GDMLPath = blocks[i]->GetString("GDMLFilePath");
+      m_GDMLName = blocks[i]->GetString("GDMLFileName");
+      m_GDMLWorld = blocks[i]->GetString("GDMLWorldName");
+    }
 
+    else{
+      cout << "Warning: check your input file formatting " << endl;
+    }
+  }
 
 }
 
 
-else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl  
-
-  fChamberH = m_ChamberHmax;
-  fChamberW = m_ChamberWmax;
-  //fChamberL = m_ChamberDmax;
-  fChamberThickness= m_ChamberHmax-m_ChamberHmin;
-
-  fVacuumH = fChamberH - fChamberThickness;
-
-  G4cout << "fChamberH=" << fChamberH << G4endl;
-  G4cout << "fChamberW=" << fChamberW << G4endl;
-  G4cout << "fChamberThickness=" << fChamberThickness << G4endl;
-
-  //-----------------------------
-  // more dimesions for chamber
-  fChamberL       = fCoolingBlockL + fLengthOfPlanarCut + fDSSD_BoardL + fdeltaZ_Support + 2.*fChamberThickness + 10.0*mm;
-
-
-  //---------------------------------------------------------------------------------
-  // This shift in the position of the chamber is to put the DSSD centred at y = 0
-  fShiftChamberY  = fCoolingBlockH - fCoolingBlockT - fCoolingBlockCutOutH/2.;   //height of centre wrt cooling block base
-  fShiftChamberY -= fChamberH/2.;
-
-  //Define the downstream face of the DSSD to be at 0 (ie the centre of the DSSD PCB board)
-  fShiftChamberZ  = fCoolingBlockZ + fChamberThickness - fDSSD_BoardL/2.;  //a discrepency of 1 mm somewhere
-
-  //the centre of the DSSD wrt the vacuum chamber
-  fCentreOfDSSD_Y = -fVacuumH/2. + fCoolingBlockH - fCoolingBlockT - fCoolingBlockCutOutH/2.; //+ fChamberThickness
-  cout << G4endl << " DSSD_Y at 0 mm , but wrt vacuum DSSD_Y @ " << fCentreOfDSSD_Y << G4endl;
-
-
-
-
+/*
+   ifstream ConfigFile;
+   ConfigFile.open(Path.c_str());
+   string LineBuffer;
+   string DataBuffer;
+	
+   bool ReadingStatusChamber = false ;
+   bool ReadingStatusGREATChamber = false ;
+   bool ReadingStatusMARAChamber = false ;
+   //   bool ReadingStatusCryoChamber = false ;
+
+   bool check_Rmin = false ;
+   bool check_Rmax = false ;
+   bool check_PhiMin = false ;
+   bool check_PhiMax = false ;
+   bool check_ThetaMin = false ;
+   bool check_ThetaMax = false ;
+   bool check_Material = false ;
+
+   bool check_Hmin = false ;
+   bool check_Hmax = false ;
+   bool check_Wmin = false ;
+   bool check_Wmax = false ;
+   bool check_Dmin = false ;
+   bool check_Dmax = false ;
+    	
+   bool check_GDMLPath = false ;
+   bool check_GDMLName = false ;
+   bool check_GDMLWorld = false ;
+
+   while (!ConfigFile.eof()) {
+      getline(ConfigFile, LineBuffer);
+      if (LineBuffer.compare(0, 8, "Chamber") == 0) {
+         cout << "Chamber Found" << endl;
+         //m_ChamberType = true ;
+         m_ChamberType = 0 ;
+         ReadingStatusChamber = true ;
+      }
+      //
+      //else if (LineBuffer.compare(0, 10, "CryoChamber") == 0) {
+      //   cout << "Cryogenic Chamber Found" << endl;
+      //   m_ChamberType = false ;
+      //   ReadingStatusCryoChamber = true ;
+      //}
+     
+      else if (LineBuffer.compare(0, 12, "GREATChamber") == 0) {
+         cout << "GREAT Chamber Found" << endl;
+         m_ChamberType = 2 ;
+         ReadingStatusGREATChamber = true ;
+      }
+      else if (LineBuffer.compare(0, 10, "GREAT-Karl") == 0) {
+         cout << "GREAT Chamber as defined by Karl Found" << endl;
+         m_ChamberType = 3 ;
+         ReadingStatusGREATChamber = true ;
+      }
+      else if (LineBuffer.compare(0, 4, "MARA") == 0) {
+         cout << "MARA FP Chamber defined from gdml file" << endl;
+         m_ChamberType = 4 ;
+         ReadingStatusMARAChamber = true ;
+      }
+ 
+      while (ReadingStatusChamber) {
+         ConfigFile >> DataBuffer;
+	
+      		//Search for comment Symbol %
+      		if (DataBuffer.compare(0, 1, "%") == 0) {	ConfigFile.ignore ( std::numeric_limits<std::streamsize>::max(), '\n' );}
+      		
+	        else if (DataBuffer.compare(0, 5, "Rmin=") == 0) {
+	        	check_Rmin = true ;
+	            ConfigFile >> DataBuffer;
+	            m_ChamberRmin = atof(DataBuffer.c_str()) * mm;
+	             cout << "Chamber inner radius: "  << m_ChamberRmin << endl     ;
+	         }
+
+	        else if (DataBuffer.compare(0, 5, "Rmax=") == 0) {
+	        	check_Rmax = true ;
+	            ConfigFile >> DataBuffer;
+	            m_ChamberRmax = atof(DataBuffer.c_str()) * mm;
+	             cout << "Chamber outer radius: "  << m_ChamberRmax << endl     ;
+	         }
+
+	        else if (DataBuffer.compare(0, 7, "PhiMin=") == 0) {
+	        	check_PhiMin = true ;
+	            ConfigFile >> DataBuffer;
+	            m_ChamberPhiMin = atof(DataBuffer.c_str()) * rad;
+	            cout << "Chamber PhiMin: "     <<  m_ChamberPhiMin      << endl     ;
+	         }
+	        else if (DataBuffer.compare(0, 7, "PhiMax=") == 0) {
+	        	check_PhiMax = true ;
+	            ConfigFile >> DataBuffer;
+	            m_ChamberPhiMax = atof(DataBuffer.c_str()) * rad;
+	            cout << "Chamber PhiMax: "     <<  m_ChamberPhiMax      << endl     ;
+	         }
+	        else if (DataBuffer.compare(0, 9, "ThetaMin=") == 0) {
+	        	check_ThetaMin = true ;
+	            ConfigFile >> DataBuffer;
+	            m_ChamberThetaMin = atof(DataBuffer.c_str()) * rad;
+	            cout << "Chamber ThetaMin: "     <<  m_ChamberThetaMin      << endl     ;
+	         }
+	        else if (DataBuffer.compare(0, 9, "ThetaMax=") == 0) {
+	        	check_ThetaMax = true ;
+	            ConfigFile >> DataBuffer;
+	            m_ChamberThetaMax = atof(DataBuffer.c_str()) * rad;
+	            cout << "Chamber ThetaMax: "     <<  m_ChamberThetaMax      << endl     ;
+	         }
+
+	        else if (DataBuffer.compare(0, 9, "MATERIAL=") == 0) {
+	        	check_Material = true ;
+	            ConfigFile >> DataBuffer;
+	            m_ChamberMaterial = GetMaterialFromLibrary(DataBuffer);
+	            cout << "Chamber Material: "      << m_ChamberMaterial  << endl  ;
+	         }
+
+	        ///////////////////////////////////////////////////
+			//	If no Beam Token and no comment, toggle out
+	         else 
+	         	{ReadingStatusChamber = false; G4cout << "WARNING : Wrong Token Sequence: Getting out " << G4endl ;}
+	         
+	        ///////////////////////////////////////////////////
+			//	If all Token found toggle out
+	         if( check_Rmin && check_Rmax && check_Material && check_PhiMin && check_PhiMax && check_ThetaMin && check_ThetaMax )
+	         	ReadingStatusChamber = false ;	
+
+      }				
+      
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+      //// For MARA Chamber
+      while (ReadingStatusMARAChamber) {
+         ConfigFile >> DataBuffer;
+         
+     		//Search for comment Symbol %
+      		if (DataBuffer.compare(0, 1, "%") == 0) {	ConfigFile.ignore ( std::numeric_limits<std::streamsize>::max(), '\n' );}
+      		
+	        else if (DataBuffer.compare(0, 13, "GDMLFilePath=") == 0) {
+	        	check_GDMLPath = true ;
+	            ConfigFile >> DataBuffer;
+	            m_GDMLPath = DataBuffer.c_str();
+	             cout << "Path: "  <<  m_GDMLPath << endl     ;
+	         }
+	        else if (DataBuffer.compare(0, 13, "GDMLFileName=") == 0) {
+	        	check_GDMLName = true ;
+	            ConfigFile >> DataBuffer;
+	            m_GDMLName = DataBuffer.c_str();
+	             cout << "Name: "  <<  m_GDMLName << endl     ;
+	         }
+	        else if (DataBuffer.compare(0, 14, "GDMLWorldName=") == 0) {
+	        	check_GDMLWorld = true ;
+	            ConfigFile >> DataBuffer;
+	            m_GDMLWorld = DataBuffer.c_str();
+	             cout << "World Name: "  <<  m_GDMLWorld << endl     ;
+	         }
+	        ///////////////////////////////////////////////////
+			//	If no Beam Token and no comment, toggle out
+	         else 
+	         	{ReadingStatusMARAChamber = false; G4cout << "WARNING : Wrong Token Sequence for MARA: Getting out " << G4endl ;}
+      			//	If all Token found toggle out
+	         if( check_GDMLPath && check_GDMLName && check_GDMLWorld )
+	         	ReadingStatusMARAChamber = false ;	
+   
+         
+	}
+ 
+ 
+ 
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+      //// For GREAT Chamber
+      while (ReadingStatusGREATChamber) {
+         ConfigFile >> DataBuffer;
+	
+      		//Search for comment Symbol %
+      		if (DataBuffer.compare(0, 1, "%") == 0) {	ConfigFile.ignore ( std::numeric_limits<std::streamsize>::max(), '\n' );}
+      		
+	        else if (DataBuffer.compare(0, 10, "Heightmin=") == 0) {
+	        	check_Hmin = true ;
+	            ConfigFile >> DataBuffer;
+	            m_ChamberHmin = atof(DataBuffer.c_str()) * mm;
+	             cout << "Chamber inner radius: "  << m_ChamberHmin << endl     ;
+	         }
+
+	        else if (DataBuffer.compare(0, 10, "Heightmax=") == 0) {
+	        	check_Hmax = true ;
+	            ConfigFile >> DataBuffer;
+	            m_ChamberHmax = atof(DataBuffer.c_str()) * mm;
+	             cout << "Chamber outer radius: "  << m_ChamberHmax << endl     ;
+	         }
+	        else if (DataBuffer.compare(0, 9, "Widthmin=") == 0) {
+	        	check_Wmin = true ;
+	            ConfigFile >> DataBuffer;
+	            m_ChamberWmin = atof(DataBuffer.c_str()) * mm;
+	             cout << "Chamber inner radius: "  << m_ChamberWmin << endl     ;
+	         }
+
+	        else if (DataBuffer.compare(0, 9, "Widthmax=") == 0) {
+	        	check_Wmax = true ;
+	            ConfigFile >> DataBuffer;
+	            m_ChamberWmax = atof(DataBuffer.c_str()) * mm;
+	             cout << "Chamber outer radius: "  << m_ChamberWmax << endl     ;
+	         }
+	        else if (DataBuffer.compare(0, 9, "Depthmin=") == 0) {
+	        	check_Dmin = true ;
+	            ConfigFile >> DataBuffer;
+	            m_ChamberDmin = atof(DataBuffer.c_str()) * mm;
+	             cout << "Chamber inner radius: "  << m_ChamberDmin << endl     ;
+	         }
+
+	        else if (DataBuffer.compare(0, 9, "Depthmax=") == 0) {
+	        	check_Dmax = true ;
+	            ConfigFile >> DataBuffer;
+	            m_ChamberDmax = atof(DataBuffer.c_str()) * mm;
+	             cout << "Chamber outer radius: "  << m_ChamberDmax << endl     ;
+	         }
+
+
+	        else if (DataBuffer.compare(0, 9, "MATERIAL=") == 0) {
+	        	check_Material = true ;
+	            ConfigFile >> DataBuffer;
+	            m_ChamberMaterial = GetMaterialFromLibrary(DataBuffer);
+	            cout << "Chamber Material: "      << m_ChamberMaterial  << endl  ;
+	         }
+
+	        ///////////////////////////////////////////////////
+			//	If no Beam Token and no comment, toggle out
+	         else 
+	         	{ReadingStatusGREATChamber = false; G4cout << "WARNING : Wrong Token Sequence: Getting out " << G4endl ;}
+	         
+	        ///////////////////////////////////////////////////
+			//	If all Token found toggle out
+	         if( check_Hmin && check_Hmax && check_Material && check_Wmin && check_Wmax && check_Dmin && check_Dmax )
+	         	ReadingStatusGREATChamber = false ;	
+
+      }	
+
+     
+	      
+   }
 
-  //--------------------------------------------
-  //[partial] Vacuum Chamber (Walls+Vacuum) and end BackPlate
-  //Set the Upstream side of the Chamber @ Z=0mm
-
-
-  //G4Box* solidChamber = new G4Box("chamber",fChamberW/2., fChamberH/2., fChamberL/2.);
-  // replaced by achamber with  a substraction of the Planar area:
-  G4Box* solidChamberEnv = new G4Box("chamberEnv",fChamberW/2., fChamberH/2., fChamberL/2.);
-  G4double PlanarCap_W = fPlanarGe_W + 2.*fPlanarGuard + 80.*mm; //A GUESS
-  G4double PlanarCap_H = 150.*mm;
-  PlanarCap_H = fPlanarGe_H + 70*mm;
-  G4double PlanarCap_T = fPlanarTotalL;
-  G4cout << G4endl << "Planar end-cap thickness " << PlanarCap_T << " cf 41. mm" << G4endl;
-  fShiftPlanar      = fChamberL/2. - fChamberThickness +  PlanarCap_T/2. - fLengthOfPlanarCut + fGap_PCB_2_Planar;
-  G4double Planar_z = fShiftPlanar;
-  G4Box* solidPlanarCapEnv = new G4Box("planar-cap-Env", PlanarCap_W/2., PlanarCap_H/2., PlanarCap_T/2.);
-  G4SubtractionSolid* solidChamber = 
-    new G4SubtractionSolid("chamber", solidChamberEnv, solidPlanarCapEnv, 0, G4ThreeVector(0.0*mm, fCentreOfDSSD_Y, Planar_z));
-
-  // end of replacement
-
-  G4LogicalVolume* logicChamber = new G4LogicalVolume(solidChamber,   //it's solid
-      m_ChamberMaterial,//it's material
-      //chamberMaterial,//it's material
-      //vacuumMaterial,//it's material
-      "Chamber",      //it's name
-      0, 0, 0); // field manager, sensitive det, user limits  
-
-  PVPBuffer = new G4PVPlacement(0,	             //rotation
-      G4ThreeVector(0.0*mm,-fShiftChamberY,-fChamberL/2.+fShiftChamberZ),
-      logicChamber,     //its logical volume
-      "Chamber",        //its name
-      world,       //its mother
-      false,            //no boolean operat
-      0,                //copy number
-      true);            //overlap check
-
-  //viewing the chamber
-  G4VisAttributes* visAttChamber = new G4VisAttributes(G4Colour(1.0,1.0,1.0) );
-  visAttChamber->SetVisibility(true);
-  visAttChamber->SetForceWireframe(true);
-  logicChamber->SetVisAttributes(visAttChamber);
-  //logicChamber->SetVisAttributes(G4VisAttributes::Invisible);
-
-
-
-  //Vacuum within above partial chamber
-
-  G4double vacH = fChamberH - fChamberThickness;
-  G4double vacW = fChamberW - 2.*fChamberThickness;
-  G4double vacL = fChamberL - 2.*fChamberThickness;
-
-  //G4Box* solidChamVac = new G4Box("chamVac",vacW/2., vacH/2., vacL/2.);
-  //Replaced by
-  G4Box* solidChamVacEnv = new G4Box("chamVacEnV",vacW/2., vacH/2., vacL/2.);
-  //G4Box* solidPlanarCapEnv = new G4Box("planar-cap-Env", PlanarCap_W/2., PlanarCap_H/2., PlanarCap_T/2.);
-  G4SubtractionSolid* solidChamVac = 
-    new G4SubtractionSolid("chamVac", solidChamVacEnv, solidPlanarCapEnv, 0, G4ThreeVector(0.0*mm, fCentreOfDSSD_Y+fChamberThickness/2., Planar_z));
-
-
-  G4LogicalVolume* logicChamVac = new G4LogicalVolume(solidChamVac,   //it's solid
-      vacuumMaterial, //it's material
-      "chamVac",      //it's name
-      0, 0, 0); // field manager, sensitive det, user limits  
-
-  PVPBuffer = new G4PVPlacement(0,	             //rotation
-      G4ThreeVector(0.0*cm, -fChamberThickness/2., 0.0*cm),
-      logicChamVac,     //its logical volume
-      "ChamVac",        //its name
-      logicChamber,     //its mother
-      false,            //no boolean operat
-      0,                //copy number
-      true);            //overlap check
-
-  //logicChamVac->SetVisAttributes(G4VisAttributes::Invisible);
-  logicChamVac->SetVisAttributes(visAttChamber);
-
-
-
-  /* Uncomment if you want the planar in the geometry and you are not using GRTPlan */
-  /*
-  //----------------------------------------------------------------------
-  // The Planar
-  //----------------------------------------------------------------------
-  G4double PlanarCap_W = fPlanarGe_W + 2.*fPlanarGuard + 80.*mm; //A GUESS
-  G4double PlanarCap_H = 150.*mm;
-  PlanarCap_H = fPlanarGe_H + 70*mm;
-  G4double PlanarCap_T = fPlanarTotalL;
-  G4cout << G4endl << "Planar end-cap thickness " << PlanarCap_T << " cf 41. mm" << G4endl;
 
-  // - editted 07/11/2011
-  fShiftPlanar      = fChamberL/2. - fChamberThickness +  PlanarCap_T/2. - fLengthOfPlanarCut + fGap_PCB_2_Planar;
-  G4double Planar_z = fShiftPlanar;
-  fPlanar_PosZ = Planar_z;
+}
+*/
 
-  //starting endCap sold
-  G4Box* solidPlanarCap = new G4Box("planar-cap", PlanarCap_W/2., PlanarCap_H/2., PlanarCap_T/2.);
+// Little trick to avoid warning in compilation: Use a PVPlacement "buffer".
+// If don't you will have a Warning unused variable 'myPVP'
+   G4VPhysicalVolume* PVPBuffer ;
 
-  //cut outs for Be window : planar end-cap is deliberately symmetric to make positioning more simple 
-  //3 mm wide support rib that is 2.2 mm thick. Add the Be thickness => endCap thickness
-  G4Box* solidBeCutOut = new G4Box("be-cut-out", fPlanarGe_W/4.-1.5*mm, fPlanarGe_H/2., fEndCapThickness/2.);//is it total 120 mm or 120+gap ? 
-  G4ThreeVector  beCutOutTrans1(-fPlanarGe_W/4.-1.5*mm, 0.0*mm, -PlanarCap_T/2.+fEndCapThickness/2.);  
-  G4ThreeVector  beCutOutTrans2(+fPlanarGe_W/4.+1.5*mm, 0.0*mm, -PlanarCap_T/2.+fEndCapThickness/2.);
-
-
-  G4SubtractionSolid* solidPlanarCap_tmp1 = 
-  new G4SubtractionSolid("planar-capo-1", solidPlanarCap, solidBeCutOut, 0, beCutOutTrans1);
 
-  G4SubtractionSolid* solidPlanarCap_tmp2 = 
-  new G4SubtractionSolid("planar-capo-2", solidPlanarCap_tmp1, solidBeCutOut, 0, beCutOutTrans2);
+// Construct detector and inialise sensitive part.
+// Called After DetecorConstruction::AddDetector Method
+void Chamber::ConstructDetector(G4LogicalVolume* world)
+{
 
+   if (m_ChamberType==0) {	// case of standard Chamber
 
-  //cut outs for Al window at rear
-  G4Box* solidAlCutOut = new G4Box("Al-cut-out", fPlanarGe_W/2., fPlanarGe_H/2., fAlWindowThickness/2.);
-  G4ThreeVector  alCutOutTrans(0.0*mm, 0.0*mm, PlanarCap_T/2.-fAlWindowThickness/2.); //ends up being 0.9 mm instead of 1.1 mm thick: CORRECT IT
+	 G4Sphere* solidChamber
+	   = new G4Sphere("solidChamber", m_ChamberRmin, m_ChamberRmax, m_ChamberPhiMin, m_ChamberPhiMax, m_ChamberThetaMin, m_ChamberThetaMax );
 
-  G4SubtractionSolid* solidPlanarCap_tmp3 = 
-  new G4SubtractionSolid("planar-capo-3", solidPlanarCap_tmp2, solidAlCutOut, 0, alCutOutTrans);
+	 G4LogicalVolume* logicChamber = new G4LogicalVolume(solidChamber, m_ChamberMaterial, "logicChamber");
 
+         // rotation of target
+         //G4RotationMatrix *rotation = new G4RotationMatrix();
+         //rotation->rotateY(m_ChamberAngle);
 
-  G4LogicalVolume* logicPlanarCap = new G4LogicalVolume(solidPlanarCap_tmp3, // it's solid
-  //logicPlanarCap = new G4LogicalVolume(solidPlanarCap, // it's solid
-  endCapMaterial, // it's material
-  "planar-cap",       // it's name
-  0, 0, 0); // field manager, sensitive det, user limits  
-
-  PVPBuffer = new G4PVPlacement(0,               //rotation
-  G4ThreeVector(0.0*mm, fCentreOfDSSD_Y, Planar_z),
-  logicPlanarCap,  //its logical volume
-  "PlanarCap",     //its name
-  logicChamVac,    //its mother
-  false,           //no boolean operat
-  0,               //copy number
-  true);           //overlap check
+         PVPBuffer =
+            new G4PVPlacement(0, G4ThreeVector(0., 0., 0.), logicChamber, "Chamber", world, false, 0);
 
+         G4VisAttributes* ChamberVisAtt = new G4VisAttributes(G4Colour(0., 1., 1.));
+         logicChamber->SetVisAttributes(ChamberVisAtt);
+	 //  }
+   }
 
+   else if(m_ChamberType==1){  // case of cryogenic target	
 
 
-  G4VisAttributes* visAttPlanarCapo = new G4VisAttributes(G4Colour(1.0,0.8,1.0) );
-  visAttPlanarCapo->SetVisibility(true);
-  //visAttPlanarCapo->SetVisibility(false);
-  visAttPlanarCapo->SetForceWireframe(true);
-  logicPlanarCap->SetVisAttributes(visAttPlanarCapo);
+   }
+   else if(m_ChamberType==4){  // MARA chamber	
+		G4GDMLParser m_gdmlparser;
+		//m_gdmlparser.Read("/mnt/hgfs/Echanges/gdml/honeycomb/HoneyComb.gdml");
+		m_gdmlparser.Read(m_GDMLPath+m_GDMLName);
+		//m_LogicalGDML= m_gdmlparser.GetVolume("MARA_world");
+		m_LogicalGDML= m_gdmlparser.GetVolume(m_GDMLWorld);
 
+		//G4RotationMatrix* rm= new G4RotationMatrix();
+		//G4RotationMatrix rmY, rmZ;
+		//rmZ.rotateZ(0.*deg);
+		//rmY.rotateY(0.*deg);
+   
+		//*rm=rmY*rmZ;
 
-  //-----------------------------------------------------------------------------------------------
-  //add the Be window
-  G4double PlanarBeWindow_z = -PlanarCap_T/2. + fBeWindowThickness/2.;
+		//G4Transform3D TF(rm, rm*G4ThreeVector(0., 0., 0.));
 
-  G4Box* solidPlanarBeWindow = new G4Box("planar-be", fPlanarGe_W/2., fPlanarGe_H/2., fBeWindowThickness/2.);
+		// gdml World box
+		m_LogicalGDML->SetVisAttributes(G4VisAttributes::Invisible); 
+    
+		PVPBuffer =
+		new G4PVPlacement(0, G4ThreeVector(0., 0., -0.15*cm), m_LogicalGDML, "MARA", world, false, 0 );
 
-  G4LogicalVolume* logicPlanarBeWindow = new G4LogicalVolume(solidPlanarBeWindow,// it's solid
-      beMaterial,   // it's material
-      "planar-be",   // it's name
-      0, 0, 0); // field manager, sensitive det, user limits  
 
-  PVPBuffer = new G4PVPlacement(0,            //rotation
-      G4ThreeVector(0.0*mm, 0.0*mm, PlanarBeWindow_z),
-      logicPlanarBeWindow, //its logical volume
-      "Planar-Be",     //its name
-      logicPlanarCap, //its mother
-      false,        //no boolean operat
-      0,            //copy number
-      true);        //overlap check
+   }
+   
+   else if(m_ChamberType==5){  // MuGast chamber	
+		G4GDMLParser m_gdmlparser;
+		m_gdmlparser.Read(m_GDMLPath+m_GDMLName);
+		m_LogicalGDML= m_gdmlparser.GetVolume(m_GDMLWorld);
 
-  G4VisAttributes* visAttBeWindow = new G4VisAttributes(G4Colour(0.9,1.0,0.9) );
-  visAttBeWindow->SetVisibility(true);
-  //visAttBeWindow->SetVisibility(false);
-  visAttBeWindow->SetForceWireframe(true);
-  logicPlanarBeWindow->SetVisAttributes(visAttBeWindow);
-  //-----------------------------------------------------------------------------------------------
-  //special cut out for Vacuum....
-  //fAlWindowThickness
-  //fEndCapThickness 
-  //PlanarCap_T - 2*fEndCapThickness
+		//G4RotationMatrix* rm= new G4RotationMatrix();
+		//G4RotationMatrix rmY, rmZ;
+		//rmZ.rotateZ(0.*deg);
+		//rmY.rotateY(0.*deg);
+   
+		//*rm=rmY*rmZ;
 
+		//G4Transform3D TF(rm, rm*G4ThreeVector(0., 0., 0.));
 
+		// gdml World box
+		m_LogicalGDML->SetVisAttributes(G4VisAttributes::Invisible); 
+    
+		PVPBuffer =
+		new G4PVPlacement(0, G4ThreeVector(0., 0., 0.*cm), m_LogicalGDML, "MuGasTChamber", world, false, 0 );
 
-  //cut outs for windows and vacuum
-  G4Box* solidPlanarVac = new G4Box("planar-vac", PlanarCap_W/2.-fEndCapThickness, PlanarCap_H/2.-fEndCapThickness, PlanarCap_T/2.-fEndCapThickness);
 
-  G4LogicalVolume* logicPlanarVac = new G4LogicalVolume(solidPlanarVac,// it's solid
-      vacuumMaterial,   // it's material
-      "planar-vac",   // it's name
-      0, 0, 0); // field manager, sensitive det, user limits  
+   }
 
-  PVPBuffer = new G4PVPlacement(0,            //rotation
-      G4ThreeVector(0.0*mm, 0.0*mm, 0.0*mm),
-      logicPlanarVac, //its logical volume
-      "Planar-Vac",     //its name
-      logicPlanarCap, //its mother
-      false,        //no boolean operat
-      0,            //copy number
-      true);        //overlap check
+   
+   else if(m_ChamberType==2){  // case of GREAT chamber  
 
-  G4cout << "Got Here" << G4endl;
+	 G4Box* solidExtChamber
+	   = new G4Box("solidExtChamber", m_ChamberWmax/2, m_ChamberHmax/2, m_ChamberDmax/2 );
+	 G4Box* solidIntChamber
+	   = new G4Box("solidIntChamber", m_ChamberWmin/2, m_ChamberHmin/2, m_ChamberDmin/2 );
 
-  //visual attributes of the planar end-cap
-  //G4VisAttributes* visAttPlanarCapo = new G4VisAttributes(G4Colour(1.0,0.8,1.0) );
-  //visAttPlanarCapo->SetVisibility(true);
-  //visAttPlanarCapo->SetVisibility(false);
-  //visAttPlanarCapo->SetForceWireframe(true);
-  //logicPlanarCap->SetVisAttributes(visAttPlanarCapo);
-  logicPlanarVac->SetVisAttributes(visAttPlanarCapo);
+	 G4SubtractionSolid* solidChamber=new G4SubtractionSolid("SolidChamber",solidExtChamber, solidIntChamber, 0, G4ThreeVector(0.,0.,-0.5*cm));
 
 
+	 G4LogicalVolume* logicChamber = new G4LogicalVolume(solidChamber, m_ChamberMaterial, "logicChamber");
 
+         // rotation of target
+         //G4RotationMatrix *rotation = new G4RotationMatrix();
+         //rotation->rotateY(m_ChamberAngle);
 
-  // the planar Ge
-  G4double PlanarGe_z = -PlanarCap_T/2. + fPlanarGe_T/2. + fPlanarGeGapFront;
+         PVPBuffer =
+            new G4PVPlacement(0, G4ThreeVector(0., -2.92325*cm/2, 0.), logicChamber, "Chamber", world, false, 0);
 
-  //add in a slab of Ge to accomodate the guard-rail
-  //and into this slab add the pixels
-  G4Box* solidPlanarOuterGe = new G4Box("planar-outer-ge", fPlanarGe_W/2.+fPlanarGuard, fPlanarGe_H/2.+fPlanarGuard, fPlanarGe_T/2.);
-  G4LogicalVolume* logicPlanarOuterGe = new G4LogicalVolume(solidPlanarOuterGe,      // it's solid
-      geMaterial,              // it's material
-      "planar-outer-ge",       // it's name
-      0, 0, 0); // field manager, sensitive det, user limits  
+        G4VisAttributes* ChamberVisAtt = new G4VisAttributes(G4Colour(0., 1., 1.));
+         logicChamber->SetVisAttributes(ChamberVisAtt);
 
-  //G4PVPlacement* physiPlanarOuterGe = new G4PVPlacement(0,            //rotation
-  PVPBuffer = new G4PVPlacement(0,            //rotation
-      G4ThreeVector(0.*mm, 0.0*mm, PlanarGe_z),
-      logicPlanarOuterGe, //its logical volume
-      "Planar-Outer-Ge",           //its name
-      logicPlanarVac,        //its mother
-      false,                 //no boolean operat
-      0, true);             //copy number  
 
-  G4VisAttributes* visAttPlanarOuterGe = new G4VisAttributes(G4Colour(0.9,0.9,1.0) );
-  visAttPlanarOuterGe->SetVisibility(true);
-  //visAttPlanarOuterGe->SetVisibility(false);
-  visAttPlanarOuterGe->SetForceWireframe(true);
-  logicPlanarOuterGe->SetVisAttributes(visAttPlanarOuterGe);
+	 /*  Eleanor's additions: *//*
 
+	 // for the DSSSD (considered as passive here !!):
 
+	 G4Material* m_DSSSDMaterial = new G4Material("Si", 14, 28.0855*g/mole, 2.33*g/cm3);
+	 
+	 G4Box* solidDSSSD
+	   = new G4Box("solidDSSSD", 6.*cm/2, 4.*cm/2, 0.03*cm/2 );  // 
 
-  //segment the detector
-  G4int nSegsH = 12; //(y)
-  G4int nSegsW = 24; //(x)
-
-  //nSegsH = 1;
-  //nSegsW = 1;
+	 G4LogicalVolume* logicDSSSD = new G4LogicalVolume(solidDSSSD, m_DSSSDMaterial, "logicDSSSD");
 
-  //common planar "pixel" shape
-  G4double planarPixel_H = fPlanarGe_H/(G4double) nSegsH;
-  G4double planarPixel_W = fPlanarGe_W/(G4double) nSegsW;
-
-  G4Box* solidPlanarGe = new G4Box("planar-ge", planarPixel_W/2., planarPixel_H/2., fPlanarGe_T/2.);
+         PVPBuffer =
+	   new G4PVPlacement(0, G4ThreeVector(-3.2*cm, 0., 0.), logicDSSSD, "DSSSD", world, false, 0);
+	   //new G4PVPlacement(0, G4ThreeVector(-3.2*cm, 2.92325*cm/2, 0.), logicDSSSD, "DSSSD", logicChamber, false, 0);
+         PVPBuffer =
+	    new G4PVPlacement(0, G4ThreeVector( 3.2*cm, 0., 0.), logicDSSSD, "DSSSD", world, false, 1);
+	   //new G4PVPlacement(0, G4ThreeVector( 3.2*cm, 2.92325*cm/2, 0.), logicDSSSD, "DSSSD", logicChamber, false, 1);
 
-  G4VisAttributes* visAttPlanarGe = new G4VisAttributes(G4Colour(1.0,1.0,1.0) );
-  visAttPlanarGe->SetVisibility(true);
-  //visAttPlanarGe->SetVisibility(false);
-  visAttPlanarGe->SetForceWireframe(true);
-  logicPlanarOuterGe->SetVisAttributes(visAttPlanarGe);
+         G4VisAttributes* DSSSDVisAtt = new G4VisAttributes(G4Colour(0., 0., 1.));
+          logicDSSSD->SetVisAttributes(DSSSDVisAtt);
 
-  //starting y-position for lowest row
-  G4double thisY = -fPlanarGe_H/2. + planarPixel_H/2.;// + fDSSD_PosY;
 
-  for(G4int ny = 0; ny < nSegsH; ny++) {
-    //starting x-position
-    G4double thisX = -fPlanarGe_W/2. + planarPixel_W/2.;
-    //G4double posY = (2*ny-1)*planarPixel_H/2.;
-
-    for(G4int nx = 0; nx < nSegsW; nx++) {
-      //G4double posX = -fPlanarGe_W/2. + planarPixel_W/2. + nx*planarPixel_W;
-      //G4int copyNo  = ny*nSegsW+nx;
-      //G4cout << "Check Planar CopyNo " << copyNo << " @ " << posX << " " << posY << G4endl;
-      G4int copyNo  = ny*100+nx;
-      G4cout << "Check Planar CopyNo " << copyNo << " @ " << thisX << " " << thisY << G4endl;
-
-      //logicPlanarGe[copyNo] = new G4LogicalVolume(solidPlanarGe,// it's solid
-      logicPlanarGe[ny][nx] = new G4LogicalVolume(solidPlanarGe,// it's solid
-          geMaterial,   // it's material
-          "planar-ge",   // it's name
-          0, 0, 0); // field manager, sensitive det, user limits  
-
-
-      //physiPlanarGe[copyNo] = new G4PVPlacement(0,            //rotation
-      //G4ThreeVector(posX, posY, 0.0*mm),
-      //physiPlanarGe[ny][nx] = new G4PVPlacement(0,            //rotation
-      PVPBuffer = new G4PVPlacement(0,            //rotation
-          G4ThreeVector(thisX, thisY, 0.0*mm),
-          //logicPlanarGe[copyNo], //its logical volume
-          logicPlanarGe[ny][nx], //its logical volume
-          "Planar-Ge",           //its name
-          logicPlanarOuterGe,        //its mother
-          false,                 //no boolean operat
-          copyNo);             //copy number
-
-      //set attributes
-      logicPlanarGe[ny][nx]->SetVisAttributes(visAttPlanarGe);
-
-      //move along....
-      thisX += planarPixel_W;
-    }
-    thisY += planarPixel_H;
-  }
 
-  */
+	 // for the solid aluminium support :
+	 
+	 G4Box* solid_alu_support_ext
+	   = new G4Box("solid_alu_support_ext", (18.32-0.65)*cm/2, (12.343-0.65)*cm/2, 8.5*cm/2 );  // 
+	 
+	 G4Box* solid_alu_support_int
+	   = new G4Box("solid_alu_support_int",16.27*cm/2, 10.295*cm/2, 8.6*cm/2 );  // 
+	 G4SubtractionSolid* solidsupport=new G4SubtractionSolid("Solidsupport",solid_alu_support_ext, solid_alu_support_int, 0, G4ThreeVector(0.,0.,0));	
+	 G4LogicalVolume* logicALU = new G4LogicalVolume(solidsupport, m_ChamberMaterial, "logicALU");
 
-    //----------------------------------------------------------
-    // Cooling Frame: Tunnel and DSSD Detector Support
-    //----------------------------------------------------------
-    G4VisAttributes* visAttCoolingBlock = new G4VisAttributes(G4Colour(0.8,0.8,0.8));
-  visAttCoolingBlock->SetVisibility(true);
-  //visAttCoolingBlock->SetVisibility(false);
-  visAttCoolingBlock->SetForceWireframe(true);
+	 PVPBuffer =
+             new G4PVPlacement(0, G4ThreeVector(0., -2.92325*cm/2,-4.265*cm), logicALU, "Aluminium", world, false, 0);
 
-  G4Box*   OuterBox = new G4Box("OuterBox",fCoolingBlockW/2., fCoolingBlockH/2., fCoolingBlockL/2.);
+	 G4VisAttributes* alusupportVisAtt = new G4VisAttributes(G4Colour(0.5, 0., 0.3));
+	 logicALU->SetVisAttributes(alusupportVisAtt);
 
-  //place the support on the bottom of the chamber
-  G4double DSSD_SupPos_y = -fChamberH/2. + fCoolingBlockH/2. + fChamberThickness/2.;
 
-  //position wrt BackPlate/VacChamber
-  G4double DSSD_SupPos_z = fChamberL/2. - fChamberThickness - fCoolingBlockL/2. - fCoolingBlockZ;  
+	 G4Box* solid_alu_support_int1
+	   = new G4Box("solid_alu_support_int1",16.27*cm/2, 0.55*cm/2, 8.6*cm/2 );  // 
+	
+	 G4LogicalVolume* logicALUint1 = new G4LogicalVolume(solid_alu_support_int1, m_ChamberMaterial, "logicALUint1");
 
-  //now cut a hole out for the DSSD's
-  G4double Hole4DSSD_W = fCoolingBlockCutOutW;
-  G4double Hole4DSSD_H = fCoolingBlockCutOutH;
+	 PVPBuffer =
+             new G4PVPlacement(0, G4ThreeVector(0, -2.5215*cm-2.92325*cm/2, -4.265*cm), logicALUint1, "Aluminium", world, false, 0);
+	
+	 G4VisAttributes* solid_alu_support_int1VisAtt = new G4VisAttributes(G4Colour(0.9, 0., 0.));
+	 logicALUint1->SetVisAttributes(solid_alu_support_int1VisAtt);
 
-  //from the above can determine the centre of the DSSD wrt centre of Cooling block
-  fCoolingBlockCutOut_PosY = fCoolingBlockH/2. - fCoolingBlockT - fCoolingBlockCutOutH/2.; //save this frequently used position
-  G4cout << "fCoolingBlockCutOut_PosY " << fCoolingBlockCutOut_PosY << " cf " << fCoolingBlockDSSDCentre << G4endl;
 
-  G4Box*  hole1 = new G4Box("Hole #1",Hole4DSSD_W/2., Hole4DSSD_H/2., fCoolingBlockL/2.);
+	 G4Box* solid_alu_support_int2
+	   = new G4Box("solid_alu_support_int2",1.4*cm/2, 2.35*cm/2, 8.6*cm/2 );  // 
 
-  G4double   dy = fCoolingBlockH/2. - fCoolingBlockT - Hole4DSSD_H/2.; 
-  G4double   dx = 0.0*mm; 
-  G4double   dz = 0.0*mm; 
-  G4ThreeVector  hole1trans(dx, dy, dz);
+	 G4LogicalVolume* logicALUint2 = new G4LogicalVolume(solid_alu_support_int2, m_ChamberMaterial, "logicALUint2");
 
-  G4SubtractionSolid* solid_CB_Temp1 = 
-    new G4SubtractionSolid("fCoolingBlockTemp1", OuterBox, hole1, 0, hole1trans);
+	 PVPBuffer =
+	   new G4PVPlacement(0, G4ThreeVector(0, -3.9715*cm-2.92325*cm/2, -4.265*cm), logicALUint2, "Aluminium", world, false, 0);
 
-  //now cut a hole out for preamps
-  G4Box*  holePreAmp = new G4Box("Hole PreAmp",34.5/2.*mm, 22./2.*mm, fCoolingBlockL/2.);
-  dx = -fCoolingBlockW/2.+fCoolingBlockT+34.5/2.*mm;
-  dy = fCoolingBlockH/2. - fCoolingBlockT - Hole4DSSD_H - fCoolingBlockT - 22./2.*mm;
-  G4ThreeVector  holePreAmpTrans1(dx, dy, dz);
-  dx += (34.5*mm + fCoolingBlockT);
-  G4ThreeVector  holePreAmpTrans2(dx, dy, dz);
-  dx += (34.5*mm + 14.7*mm);  
-  G4ThreeVector  holePreAmpTrans3(dx, dy, dz);
-  dx += (34.5*mm + fCoolingBlockT);
-  G4ThreeVector  holePreAmpTrans4(dx, dy, dz);
+	 
+	 G4VisAttributes* solid_alu_support_int2VisAtt = new G4VisAttributes(G4Colour(0.9, 0., 0.));
+	 logicALUint2->SetVisAttributes(solid_alu_support_int2VisAtt);
 
-  G4SubtractionSolid* solid_CB_Temp2 = 
-    new G4SubtractionSolid("fCoolingBlockTemp2", solid_CB_Temp1, holePreAmp, 0, holePreAmpTrans1);
 
-  G4SubtractionSolid* solid_CB_Temp3 = 
-    new G4SubtractionSolid("fCoolingBlockTemp3", solid_CB_Temp2, holePreAmp, 0, holePreAmpTrans2);
+	 G4Box* solid_DSSSD_coating1
+	   = new G4Box("solid_DSSSD_coating1",16.27*cm/2, 0.1*cm/2, 8.6*cm/2 );  // 
 
-  G4SubtractionSolid* solid_CB_Temp4 = 
-    new G4SubtractionSolid("fCoolingBlockTemp4", solid_CB_Temp3, holePreAmp, 0, holePreAmpTrans3);
+	 G4LogicalVolume* logicSiliconCoating1 = new G4LogicalVolume(solid_DSSSD_coating1, m_DSSSDMaterial, "logicSiliconCoating1");
+	 PVPBuffer =
+	   new G4PVPlacement(0, G4ThreeVector(0, -2.5215*cm-2.92325*cm/2+0.05*cm+0.55*cm/2, -4.265*cm), logicSiliconCoating1, "PinDiode1", world, false, 0);
 
-  G4SubtractionSolid* solid_CB_Temp5 = 
-    new G4SubtractionSolid("fCoolingBlockTemp5", solid_CB_Temp4, holePreAmp, 0, holePreAmpTrans4);
+	 G4VisAttributes* solid_DSSSD_coating1VisAtt = new G4VisAttributes(G4Colour(0., 0.2, 0.8));
+	 logicSiliconCoating1->SetVisAttributes(solid_DSSSD_coating1VisAtt);
 
-  G4LogicalVolume* logicDSSD_Sup = new G4LogicalVolume(solid_CB_Temp5,
-      supportMaterial, "Cylinder-Box", 0, 0, 0);
-  //vacuumMaterial, "Cylinder-Box", 0, 0, 0);
 
-  logicDSSD_Sup->SetVisAttributes(visAttCoolingBlock);
+	 G4Box* solid_DSSSD_coating2
+	   = new G4Box("solid_DSSSD_coating2",16.27*cm/2, 0.1*cm/2, 8.6*cm/2 );  // 
 
+	 G4LogicalVolume* logicSiliconCoating2 = new G4LogicalVolume(solid_DSSSD_coating2, m_DSSSDMaterial, "logicSiliconCoating2");
+	 PVPBuffer =
+	   new G4PVPlacement(0, G4ThreeVector(0, 5.1055*cm-2.92325*cm/2-0.05*cm, -4.265*cm), logicSiliconCoating2, "PinDiode2", world, false, 0);
 
-  PVPBuffer = new G4PVPlacement(0,//rotation
-      G4ThreeVector(0.0*cm, DSSD_SupPos_y, DSSD_SupPos_z),
-      logicDSSD_Sup,   //its logical volume
-      "fCoolingBlock",  //its name
-      logicChamVac,      //its mother
-      false,           //no boolean operat
-      1,              //copy number
-      true);            //overlap check
+	 G4VisAttributes* solid_DSSSD_coating2VisAtt = new G4VisAttributes(G4Colour(0., 0.2, 0.8));
+	 logicSiliconCoating2->SetVisAttributes(solid_DSSSD_coating2VisAtt);
 
 
+	 G4Box* solid_DSSSD_coating3
+	   = new G4Box("solid_DSSSD_coating3",0.1*cm/2, 7.393*cm/2, 8.6*cm/2 );  // 
 
+	 G4LogicalVolume* logicSiliconCoating3 = new G4LogicalVolume(solid_DSSSD_coating3, m_DSSSDMaterial, "logicSiliconCoating3");
+	 PVPBuffer =
+	   new G4PVPlacement(0, G4ThreeVector(8.085*cm, 1.4375*cm-2.92325*cm/2, -4.265*cm), logicSiliconCoating3, "PinDiode3", world, false, 0);
+	 PVPBuffer =
+	   new G4PVPlacement(0, G4ThreeVector(-8.085*cm, 1.4375*cm-2.92325*cm/2, -4.265*cm), logicSiliconCoating3, "PinDiode4", world, false, 1);
+	
+	 G4VisAttributes* solid_DSSSD_coating3VisAtt = new G4VisAttributes(G4Colour(0., 0.2, 0.8));
+	 logicSiliconCoating3->SetVisAttributes(solid_DSSSD_coating3VisAtt);
 
 
-  //-------------------------------------------------------------------------------------------
-  // DSSD detector Epoxy board....for some reason 2 cut outs are not working => make 2 PCB wafers
-  G4double DSSD_BrdW = 106.0 * mm * 2.;  //Put the 2 boards in one plate
-  G4double DSSD_BrdH = 157.0 * mm;       //SupportH;
-  G4double DSSD_BrdL = fDSSD_BoardL;     //Thickness
 
-  //recess to house DSSD's
-  G4double siImpBrdCutOutL = fDSSD_BoardL/2.;
-  // making 2 boards =>
-  G4double DSSD_BrdL1 = DSSD_BrdL - siImpBrdCutOutL;
-  G4double DSSD_BrdL2 = siImpBrdCutOutL;
+	 // Preamps and connectors board
 
-  G4double CutOut_dY = 44.0*mm;     // distance from top of PCB to top of the first cut-out in the PCB
-  G4double CutOut1_H = 43.5*mm;     // vertical dimension of the cut-out to half thickness
-  G4double CutOut2_H = 41.0*mm;     // vertical dimension of total-thickness cut-ou ie a mounting lip of 1.25 mm
+   //  PCB
+	
 
-  G4double CutOut1_W = 63.5*mm;     //fDSSD_H-2.0*boardLipDSSD;
-  G4double CutOut2_W = 61.0*mm;     //fDSSD_H;
+   G4Element* Si   = new G4Element("Silicon" , "Si"  , 14  , 28.0855  * g / mole);
+   G4Element* C   = new G4Element("Carbon"   , "C"  , 6  , 12.011  * g / mole);
+   G4Element* H   = new G4Element("Hydrogen"   , "H"  , 1  , 1.0079  * g / mole);
+   G4Element* Br   = new G4Element("Bromine"   , "Br"  , 35  , 79.904 * g / mole);
+   G4Element* O   = new G4Element("Oxigen"   , "O"  , 8  , 16.00  * g / mole);
 
-  G4double dssdLip   = (CutOut1_W-CutOut2_W)/2.;
-  G4double central_bar = 1.25*mm; //each side
+   G4double density = 1.7 * g / cm3;
+   G4int ncomponents;
+   G4Material* PCB = new G4Material("PCB", density, ncomponents = 5);
+   PCB->AddElement(Si, .181);
+   PCB->AddElement(O, .406);
+   PCB->AddElement(C, .278);
+   PCB->AddElement(H, .068);
+   PCB->AddElement(Br, .067);
 
-  G4double DSSD_PCB_Pos_y = -fVacuumH/2. - DSSD_BrdH/2.;  //puts top of circuit board at bottom of chamber
-  DSSD_PCB_Pos_y += (fCoolingBlockDSSDCentre + CutOut_dY + CutOut1_H/2.);
 
-  G4double gapBetweenDSSD = 3.0 * mm;  //Gap between the two DSSD's
 
-  //gapBetweenDSSD = 0.01*mm;
+	 G4Box* pre_amp_board1
+	   = new G4Box("pre_amp_board1",6.756*cm/2, 1.675*cm/2, 7.976*cm/2 );  // 
 
-  //position wrt centre of vacuum in chamber
-  G4double DSSD_BrdPos_z = fChamberL/2 - fChamberThickness - fCoolingBlockZ + DSSD_BrdL1/2 + DSSD_BrdL2;  
+	 G4LogicalVolume* logicpre_amp1 = new G4LogicalVolume(pre_amp_board1, PCB, "logicpre_amp1");
+	 PVPBuffer =
+	   new G4PVPlacement(0, G4ThreeVector(4.0675*cm, 5.267875*cm, -4.265*cm), logicpre_amp1, "pre_amp_board1", world, false, 0);
+	 PVPBuffer =
+	   new G4PVPlacement(0, G4ThreeVector(-4.0675*cm, 5.267875*cm, -4.265*cm), logicpre_amp1, "pre_amp_board1", world, false, 1);
+	
 
-  G4Box* solidDSSD_Board1_tmp1 = 
-    new G4Box("siImpBrd1_tmp", DSSD_BrdW/2., DSSD_BrdH/2., DSSD_BrdL1/2.);
+	 G4VisAttributes* pre_amp_board1VisAtt = new G4VisAttributes(G4Colour(0., 0.7, 0.));
+	 logicpre_amp1->SetVisAttributes(pre_amp_board1VisAtt);
 
-  G4Box*         cutOut1a = new G4Box("Box R #1a",CutOut1_W/2., CutOut1_H/2., DSSD_BrdL1/2.);
-  G4ThreeVector  cutOut1aTrans(CutOut1_W/2.,  DSSD_BrdH/2.-CutOut1_H/2.-CutOut_dY, 0.0*mm);
+	 G4Box* pre_amp_board2
+	   = new G4Box("pre_amp_board2",1.675*cm/2, 6.756*cm/2, 7.976*cm/2 );  // 
 
-  G4Box*         cutOut1b = new G4Box("Box R #1b",CutOut1_W/2.,CutOut1_H/2.,DSSD_BrdL1/2.);
-  G4ThreeVector  cutOut1bTrans(-CutOut1_W/2., DSSD_BrdH/2.-CutOut1_H/2.-CutOut_dY, 0.0*mm);
+	 G4LogicalVolume* logicpre_amp2 = new G4LogicalVolume(pre_amp_board2, PCB, "logicpre_amp2");
+	 PVPBuffer =
+	   new G4PVPlacement(0, G4ThreeVector(9.6625*cm, 2.413375*cm, -4.265*cm), logicpre_amp2, "pre_amp_board2", world, false, 0);
+	 PVPBuffer =
+	   new G4PVPlacement(0, G4ThreeVector(9.6625*cm, -5.336625*cm, -4.265*cm), logicpre_amp2, "pre_amp_board2", world, false, 1);
+	
 
+	 G4VisAttributes* pre_amp_board2VisAtt = new G4VisAttributes(G4Colour(0., 0.7, 0.));
+	 logicpre_amp2->SetVisAttributes(pre_amp_board2VisAtt);
 
-  G4SubtractionSolid* solidDSSD_Board1_a = 
-    new G4SubtractionSolid("siImpBrd1_a", solidDSSD_Board1_tmp1, cutOut1a, 0, cutOut1aTrans);
+	 
+	 G4Box* pre_amp_board3
+	   = new G4Box("pre_amp_board3",1.675*cm/2, 6.756*cm/2, 7.976*cm/2 );  // 
 
-  G4SubtractionSolid* solidDSSD_Board1 = 
-    new G4SubtractionSolid("siImpBrd1", solidDSSD_Board1_a, cutOut1b, 0, cutOut1bTrans);
+	 G4LogicalVolume* logicpre_amp3 = new G4LogicalVolume(pre_amp_board3, PCB, "logicpre_amp3");
+	 PVPBuffer =
+	   new G4PVPlacement(0, G4ThreeVector(-9.6725*cm, 2.413375*cm, -4.265*cm), logicpre_amp3, "pre_amp_board3", world, false, 0);
+	 PVPBuffer =
+	   new G4PVPlacement(0, G4ThreeVector(-9.6725*cm, -5.336625*cm, -4.265*cm), logicpre_amp3, "pre_amp_board3", world, false, 1);
+	
 
-  G4LogicalVolume* logicDSSD_Board1 = new   G4LogicalVolume(solidDSSD_Board1,// it's solid : with cut-out
-      boardMaterial,  // it's material
-      //vacuumMaterial,
-      "DSSD_Brd1",     // it's name
-      0, 0, 0); // field manager, sensitive det, user limits  
+	 G4VisAttributes* pre_amp_board3VisAtt = new G4VisAttributes(G4Colour(0., 0.7, 0.));
+	 logicpre_amp3->SetVisAttributes(pre_amp_board3VisAtt);
 
-  PVPBuffer = new G4PVPlacement(0,                //rotation
-      G4ThreeVector(0.0*mm,DSSD_PCB_Pos_y,DSSD_BrdPos_z),
-      logicDSSD_Board1,  //its logical volume
-      "DSSD_Brd1",       //its name
-      logicChamVac,     //its mother
-      false,            //no boolean operat
-      0,               //copy number
-      true);            //overlap check
+	 */ /* end of Eleanor's additions */  
 
 
-  DSSD_BrdPos_z -= DSSD_BrdL1/2;  
-  DSSD_BrdPos_z -= DSSD_BrdL2/2;  
 
-  G4Box* solidDSSD_Board2_tmp1 = 
-    new G4Box("siImpBrd2_tmp", DSSD_BrdW/2., DSSD_BrdH/2., DSSD_BrdL2/2.);
 
-  G4Box*         cutOut2a = new G4Box("Box R #2a",CutOut2_W/2.,CutOut2_H/2.,DSSD_BrdL2/2.);
-  G4ThreeVector  cutOut2aTrans(CutOut2_W/2.+central_bar,  DSSD_BrdH/2.-CutOut2_H/2.-CutOut_dY-dssdLip, 0.0*mm);
 
-  G4Box*         cutOut2b = new G4Box("Box R #2b",CutOut2_W/2.,CutOut2_H/2.,DSSD_BrdL2/2.);
-  G4ThreeVector  cutOut2bTrans(-CutOut2_W/2.-central_bar,  DSSD_BrdH/2.-CutOut2_H/2.-CutOut_dY-dssdLip, 0.0*mm);
+   }
 
-  G4SubtractionSolid* solidDSSD_Board2_a = 
-    new G4SubtractionSolid("siImpBrd2_a", solidDSSD_Board2_tmp1, cutOut2a, 0, cutOut2aTrans);
 
-  G4SubtractionSolid* solidDSSD_Board2 = 
-    new G4SubtractionSolid("siImpBrd2", solidDSSD_Board2_a, cutOut2b, 0, cutOut2bTrans);
+   else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl  
+       
+	 fChamberH = m_ChamberHmax;
+	 fChamberW = m_ChamberWmax;
+	 //fChamberL = m_ChamberDmax;
+	 fChamberThickness= m_ChamberHmax-m_ChamberHmin;
+ 
+	 G4double fVacuumH = fChamberH - fChamberThickness;
 
-  G4LogicalVolume* logicDSSD_Board2 = new   G4LogicalVolume(solidDSSD_Board2,// it's solid : with cut-out
-      boardMaterial,  // it's material
-      //vacuumMaterial,
-      "DSSD_Brd2",     // it's name
-      0, 0, 0); // field manager, sensitive det, user limits  
+	 G4cout << "fChamberH=" << fChamberH << G4endl;
+	 G4cout << "fChamberW=" << fChamberW << G4endl;
+	 G4cout << "fChamberThickness=" << fChamberThickness << G4endl;
 
-  PVPBuffer = new G4PVPlacement(0,                //rotation
-      G4ThreeVector(0.0*mm,DSSD_PCB_Pos_y,DSSD_BrdPos_z),
-      logicDSSD_Board2,  //its logical volume
-      "DSSD_Brd2",       //its name
-      logicChamVac,     //its mother
-      false,            //no boolean operat
-      0,               //copy number
-      true);            //overlap check
+	 //-----------------------------
+	 // more dimesions for chamber
+	 fChamberL       = fCoolingBlockL + fLengthOfPlanarCut + fDSSD_BoardL + fdeltaZ_Support + 2.*fChamberThickness + 10.0*mm;
+
+
+	 //---------------------------------------------------------------------------------
+	 // This shift in the position of the chamber is to put the DSSD centred at y = 0
+	 fShiftChamberY  = fCoolingBlockH - fCoolingBlockT - fCoolingBlockCutOutH/2.;   //height of centre wrt cooling block base
+	 fShiftChamberY -= fChamberH/2.;
+  
+	 //Define the downstream face of the DSSD to be at 0 (ie the centre of the DSSD PCB board)
+	 fShiftChamberZ  = fCoolingBlockZ + fChamberThickness - fDSSD_BoardL/2.;  //a discrepency of 1 mm somewhere
+
+	 //the centre of the DSSD wrt the vacuum chamber
+	 fCentreOfDSSD_Y = -fVacuumH/2. + fCoolingBlockH - fCoolingBlockT - fCoolingBlockCutOutH/2.; //+ fChamberThickness
+	 cout << G4endl << " DSSD_Y at 0 mm , but wrt vacuum DSSD_Y @ " << fCentreOfDSSD_Y << G4endl;
+
+
+
+
+
+	 //--------------------------------------------
+	 //[partial] Vacuum Chamber (Walls+Vacuum) and end BackPlate
+	 //Set the Upstream side of the Chamber @ Z=0mm
+
+
+	 //G4Box* solidChamber = new G4Box("chamber",fChamberW/2., fChamberH/2., fChamberL/2.);
+         // replaced by achamber with  a substraction of the Planar area:
+	 G4Box* solidChamberEnv = new G4Box("chamberEnv",fChamberW/2., fChamberH/2., fChamberL/2.);
+	 G4double PlanarCap_W = fPlanarGe_W + 2.*fPlanarGuard + 80.*mm; //A GUESS
+	 G4double PlanarCap_H = 150.*mm;
+	 PlanarCap_H = fPlanarGe_H + 70*mm;
+	 G4double PlanarCap_T = fPlanarTotalL;
+	 G4cout << G4endl << "Planar end-cap thickness " << PlanarCap_T << " cf 41. mm" << G4endl;
+	 fShiftPlanar      = fChamberL/2. - fChamberThickness +  PlanarCap_T/2. - fLengthOfPlanarCut + fGap_PCB_2_Planar;
+	 G4double Planar_z = fShiftPlanar;
+	 G4Box* solidPlanarCapEnv = new G4Box("planar-cap-Env", PlanarCap_W/2., PlanarCap_H/2., PlanarCap_T/2.);
+	 G4SubtractionSolid* solidChamber = 
+	 new G4SubtractionSolid("chamber", solidChamberEnv, solidPlanarCapEnv, 0, G4ThreeVector(0.0*mm, fCentreOfDSSD_Y, Planar_z));
+  
+	 // end of replacement
+
+	 G4LogicalVolume* logicChamber = new G4LogicalVolume(solidChamber,   //it's solid
+					    m_ChamberMaterial,//it's material
+					    //chamberMaterial,//it's material
+					    //vacuumMaterial,//it's material
+					    "Chamber",      //it's name
+					    0, 0, 0); // field manager, sensitive det, user limits  
+
+	  PVPBuffer = new G4PVPlacement(0,	             //rotation
+					  G4ThreeVector(0.0*mm,-fShiftChamberY,-fChamberL/2.+fShiftChamberZ),
+					  logicChamber,     //its logical volume
+					  "Chamber",        //its name
+					  world,       //its mother
+					  false,            //no boolean operat
+					  0,                //copy number
+					  true);            //overlap check
+  
+	 //viewing the chamber
+	 G4VisAttributes* visAttChamber = new G4VisAttributes(G4Colour(1.0,1.0,1.0) );
+	 visAttChamber->SetVisibility(true);
+	 visAttChamber->SetForceWireframe(true);
+	 logicChamber->SetVisAttributes(visAttChamber);
+	 //logicChamber->SetVisAttributes(G4VisAttributes::Invisible);
+
+	
+
+	 //Vacuum within above partial chamber
+
+	 G4double vacH = fChamberH - fChamberThickness;
+	 G4double vacW = fChamberW - 2.*fChamberThickness;
+	 G4double vacL = fChamberL - 2.*fChamberThickness;
+
+	 //G4Box* solidChamVac = new G4Box("chamVac",vacW/2., vacH/2., vacL/2.);
+	 //Replaced by
+	 G4Box* solidChamVacEnv = new G4Box("chamVacEnV",vacW/2., vacH/2., vacL/2.);
+	 //G4Box* solidPlanarCapEnv = new G4Box("planar-cap-Env", PlanarCap_W/2., PlanarCap_H/2., PlanarCap_T/2.);
+	 G4SubtractionSolid* solidChamVac = 
+	 new G4SubtractionSolid("chamVac", solidChamVacEnv, solidPlanarCapEnv, 0, G4ThreeVector(0.0*mm, fCentreOfDSSD_Y+fChamberThickness/2., Planar_z));
+ 
+
+	 G4LogicalVolume* logicChamVac = new G4LogicalVolume(solidChamVac,   //it's solid
+					    vacuumMaterial, //it's material
+					    "chamVac",      //it's name
+					    0, 0, 0); // field manager, sensitive det, user limits  
+
+	 PVPBuffer = new G4PVPlacement(0,	             //rotation
+					  G4ThreeVector(0.0*cm, -fChamberThickness/2., 0.0*cm),
+					  logicChamVac,     //its logical volume
+					  "ChamVac",        //its name
+					  logicChamber,     //its mother
+					  false,            //no boolean operat
+					  0,                //copy number
+					  true);            //overlap check
+
+	 //logicChamVac->SetVisAttributes(G4VisAttributes::Invisible);
+	 logicChamVac->SetVisAttributes(visAttChamber);
+
+	 
+
+	 /* Uncomment if you want the planar in the geometry and you are not using GRTPlan */
+	 /*
+	 //----------------------------------------------------------------------
+	 // The Planar
+	 //----------------------------------------------------------------------
+	 G4double PlanarCap_W = fPlanarGe_W + 2.*fPlanarGuard + 80.*mm; //A GUESS
+	 G4double PlanarCap_H = 150.*mm;
+	 PlanarCap_H = fPlanarGe_H + 70*mm;
+	 G4double PlanarCap_T = fPlanarTotalL;
+	 G4cout << G4endl << "Planar end-cap thickness " << PlanarCap_T << " cf 41. mm" << G4endl;
+
+	 // - editted 07/11/2011
+	 fShiftPlanar      = fChamberL/2. - fChamberThickness +  PlanarCap_T/2. - fLengthOfPlanarCut + fGap_PCB_2_Planar;
+	 G4double Planar_z = fShiftPlanar;
+	 fPlanar_PosZ = Planar_z;
+
+	 //starting endCap sold
+	 G4Box* solidPlanarCap = new G4Box("planar-cap", PlanarCap_W/2., PlanarCap_H/2., PlanarCap_T/2.);
+
+	 //cut outs for Be window : planar end-cap is deliberately symmetric to make positioning more simple 
+	 //3 mm wide support rib that is 2.2 mm thick. Add the Be thickness => endCap thickness
+	 G4Box* solidBeCutOut = new G4Box("be-cut-out", fPlanarGe_W/4.-1.5*mm, fPlanarGe_H/2., fEndCapThickness/2.);//is it total 120 mm or 120+gap ? 
+	 G4ThreeVector  beCutOutTrans1(-fPlanarGe_W/4.-1.5*mm, 0.0*mm, -PlanarCap_T/2.+fEndCapThickness/2.);  
+	 G4ThreeVector  beCutOutTrans2(+fPlanarGe_W/4.+1.5*mm, 0.0*mm, -PlanarCap_T/2.+fEndCapThickness/2.);
+
+
+	 G4SubtractionSolid* solidPlanarCap_tmp1 = 
+	   new G4SubtractionSolid("planar-capo-1", solidPlanarCap, solidBeCutOut, 0, beCutOutTrans1);
+  
+	 G4SubtractionSolid* solidPlanarCap_tmp2 = 
+	   new G4SubtractionSolid("planar-capo-2", solidPlanarCap_tmp1, solidBeCutOut, 0, beCutOutTrans2);
+  
+
+	 //cut outs for Al window at rear
+	 G4Box* solidAlCutOut = new G4Box("Al-cut-out", fPlanarGe_W/2., fPlanarGe_H/2., fAlWindowThickness/2.);
+	 G4ThreeVector  alCutOutTrans(0.0*mm, 0.0*mm, PlanarCap_T/2.-fAlWindowThickness/2.); //ends up being 0.9 mm instead of 1.1 mm thick: CORRECT IT
+  
+	 G4SubtractionSolid* solidPlanarCap_tmp3 = 
+	   new G4SubtractionSolid("planar-capo-3", solidPlanarCap_tmp2, solidAlCutOut, 0, alCutOutTrans);
+  
+	 
+	 G4LogicalVolume* logicPlanarCap = new G4LogicalVolume(solidPlanarCap_tmp3, // it's solid
+					      //logicPlanarCap = new G4LogicalVolume(solidPlanarCap, // it's solid
+					      endCapMaterial, // it's material
+					      "planar-cap",       // it's name
+					      0, 0, 0); // field manager, sensitive det, user limits  
+	
+	 PVPBuffer = new G4PVPlacement(0,               //rotation
+				     G4ThreeVector(0.0*mm, fCentreOfDSSD_Y, Planar_z),
+				     logicPlanarCap,  //its logical volume
+				     "PlanarCap",     //its name
+				     logicChamVac,    //its mother
+				     false,           //no boolean operat
+				     0,               //copy number
+				     true);           //overlap check
+
+	
+
+
+	 G4VisAttributes* visAttPlanarCapo = new G4VisAttributes(G4Colour(1.0,0.8,1.0) );
+	 visAttPlanarCapo->SetVisibility(true);
+	 //visAttPlanarCapo->SetVisibility(false);
+	 visAttPlanarCapo->SetForceWireframe(true);
+	 logicPlanarCap->SetVisAttributes(visAttPlanarCapo);
+ 
+
+	 //-----------------------------------------------------------------------------------------------
+	 //add the Be window
+	 G4double PlanarBeWindow_z = -PlanarCap_T/2. + fBeWindowThickness/2.;
+  
+	 G4Box* solidPlanarBeWindow = new G4Box("planar-be", fPlanarGe_W/2., fPlanarGe_H/2., fBeWindowThickness/2.);
+  
+	 G4LogicalVolume* logicPlanarBeWindow = new G4LogicalVolume(solidPlanarBeWindow,// it's solid
+						   beMaterial,   // it's material
+						   "planar-be",   // it's name
+						   0, 0, 0); // field manager, sensitive det, user limits  
+
+	 PVPBuffer = new G4PVPlacement(0,            //rotation
+				       G4ThreeVector(0.0*mm, 0.0*mm, PlanarBeWindow_z),
+				       logicPlanarBeWindow, //its logical volume
+				       "Planar-Be",     //its name
+				       logicPlanarCap, //its mother
+				       false,        //no boolean operat
+				       0,            //copy number
+				       true);        //overlap check
+	 
+	 G4VisAttributes* visAttBeWindow = new G4VisAttributes(G4Colour(0.9,1.0,0.9) );
+	 visAttBeWindow->SetVisibility(true);
+	 //visAttBeWindow->SetVisibility(false);
+	 visAttBeWindow->SetForceWireframe(true);
+	 logicPlanarBeWindow->SetVisAttributes(visAttBeWindow);
+	 //-----------------------------------------------------------------------------------------------
+	 //special cut out for Vacuum....
+	 //fAlWindowThickness
+	 //fEndCapThickness 
+	 //PlanarCap_T - 2*fEndCapThickness
+  
+
+
+	 //cut outs for windows and vacuum
+	 G4Box* solidPlanarVac = new G4Box("planar-vac", PlanarCap_W/2.-fEndCapThickness, PlanarCap_H/2.-fEndCapThickness, PlanarCap_T/2.-fEndCapThickness);
+  
+	 G4LogicalVolume* logicPlanarVac = new G4LogicalVolume(solidPlanarVac,// it's solid
+							       vacuumMaterial,   // it's material
+							       "planar-vac",   // it's name
+							       0, 0, 0); // field manager, sensitive det, user limits  
+
+	 PVPBuffer = new G4PVPlacement(0,            //rotation
+				       G4ThreeVector(0.0*mm, 0.0*mm, 0.0*mm),
+				       logicPlanarVac, //its logical volume
+				       "Planar-Vac",     //its name
+				       logicPlanarCap, //its mother
+				       false,        //no boolean operat
+				       0,            //copy number
+				       true);        //overlap check
+
+	 G4cout << "Got Here" << G4endl;
+
+	 //visual attributes of the planar end-cap
+	 //G4VisAttributes* visAttPlanarCapo = new G4VisAttributes(G4Colour(1.0,0.8,1.0) );
+	 //visAttPlanarCapo->SetVisibility(true);
+	 //visAttPlanarCapo->SetVisibility(false);
+	 //visAttPlanarCapo->SetForceWireframe(true);
+	 //logicPlanarCap->SetVisAttributes(visAttPlanarCapo);
+	 logicPlanarVac->SetVisAttributes(visAttPlanarCapo);
+
+
+	 
+	 
+	 // the planar Ge
+	 G4double PlanarGe_z = -PlanarCap_T/2. + fPlanarGe_T/2. + fPlanarGeGapFront;
+	 
+	 //add in a slab of Ge to accomodate the guard-rail
+	 //and into this slab add the pixels
+	 G4Box* solidPlanarOuterGe = new G4Box("planar-outer-ge", fPlanarGe_W/2.+fPlanarGuard, fPlanarGe_H/2.+fPlanarGuard, fPlanarGe_T/2.);
+	 G4LogicalVolume* logicPlanarOuterGe = new G4LogicalVolume(solidPlanarOuterGe,      // it's solid
+								   geMaterial,              // it's material
+								   "planar-outer-ge",       // it's name
+								   0, 0, 0); // field manager, sensitive det, user limits  
+	 
+	 //G4PVPlacement* physiPlanarOuterGe = new G4PVPlacement(0,            //rotation
+	 PVPBuffer = new G4PVPlacement(0,            //rotation
+				       G4ThreeVector(0.*mm, 0.0*mm, PlanarGe_z),
+				       logicPlanarOuterGe, //its logical volume
+				       "Planar-Outer-Ge",           //its name
+				       logicPlanarVac,        //its mother
+				       false,                 //no boolean operat
+				       0, true);             //copy number  
+
+	 G4VisAttributes* visAttPlanarOuterGe = new G4VisAttributes(G4Colour(0.9,0.9,1.0) );
+	 visAttPlanarOuterGe->SetVisibility(true);
+	 //visAttPlanarOuterGe->SetVisibility(false);
+	 visAttPlanarOuterGe->SetForceWireframe(true);
+	 logicPlanarOuterGe->SetVisAttributes(visAttPlanarOuterGe);
+  
+	 
+
+	 //segment the detector
+	 G4int nSegsH = 12; //(y)
+	 G4int nSegsW = 24; //(x)
+	 
+	 //nSegsH = 1;
+	 //nSegsW = 1;
+
+	 //common planar "pixel" shape
+	 G4double planarPixel_H = fPlanarGe_H/(G4double) nSegsH;
+	 G4double planarPixel_W = fPlanarGe_W/(G4double) nSegsW;
+  
+	 G4Box* solidPlanarGe = new G4Box("planar-ge", planarPixel_W/2., planarPixel_H/2., fPlanarGe_T/2.);
+  
+	 G4VisAttributes* visAttPlanarGe = new G4VisAttributes(G4Colour(1.0,1.0,1.0) );
+	 visAttPlanarGe->SetVisibility(true);
+	 //visAttPlanarGe->SetVisibility(false);
+	 visAttPlanarGe->SetForceWireframe(true);
+	 logicPlanarOuterGe->SetVisAttributes(visAttPlanarGe);
+
+	 //starting y-position for lowest row
+	 G4double thisY = -fPlanarGe_H/2. + planarPixel_H/2.;// + fDSSD_PosY;
+	 
+	 for(G4int ny = 0; ny < nSegsH; ny++) {
+	   //starting x-position
+	   G4double thisX = -fPlanarGe_W/2. + planarPixel_W/2.;
+	   //G4double posY = (2*ny-1)*planarPixel_H/2.;
+	   
+	   for(G4int nx = 0; nx < nSegsW; nx++) {
+	     //G4double posX = -fPlanarGe_W/2. + planarPixel_W/2. + nx*planarPixel_W;
+	     //G4int copyNo  = ny*nSegsW+nx;
+	     //G4cout << "Check Planar CopyNo " << copyNo << " @ " << posX << " " << posY << G4endl;
+	     G4int copyNo  = ny*100+nx;
+	     G4cout << "Check Planar CopyNo " << copyNo << " @ " << thisX << " " << thisY << G4endl;
+     
+	     //logicPlanarGe[copyNo] = new G4LogicalVolume(solidPlanarGe,// it's solid
+	     logicPlanarGe[ny][nx] = new G4LogicalVolume(solidPlanarGe,// it's solid
+							 geMaterial,   // it's material
+							 "planar-ge",   // it's name
+							 0, 0, 0); // field manager, sensitive det, user limits  
+      
+      
+	     //physiPlanarGe[copyNo] = new G4PVPlacement(0,            //rotation
+	     //G4ThreeVector(posX, posY, 0.0*mm),
+	     //physiPlanarGe[ny][nx] = new G4PVPlacement(0,            //rotation
+	     PVPBuffer = new G4PVPlacement(0,            //rotation
+						G4ThreeVector(thisX, thisY, 0.0*mm),
+						//logicPlanarGe[copyNo], //its logical volume
+						logicPlanarGe[ny][nx], //its logical volume
+						"Planar-Ge",           //its name
+						logicPlanarOuterGe,        //its mother
+						false,                 //no boolean operat
+						copyNo);             //copy number
+
+	     //set attributes
+	     logicPlanarGe[ny][nx]->SetVisAttributes(visAttPlanarGe);
+
+	     //move along....
+	     thisX += planarPixel_W;
+	   }
+	   thisY += planarPixel_H;
+	 }
+
+	 /* */
+
+	 //----------------------------------------------------------
+	 // Cooling Frame: Tunnel and DSSD Detector Support
+	 //----------------------------------------------------------
+	 G4VisAttributes* visAttCoolingBlock = new G4VisAttributes(G4Colour(0.8,0.8,0.8));
+	 visAttCoolingBlock->SetVisibility(true);
+	 //visAttCoolingBlock->SetVisibility(false);
+	 visAttCoolingBlock->SetForceWireframe(true);
+  
+	 G4Box*   OuterBox = new G4Box("OuterBox",fCoolingBlockW/2., fCoolingBlockH/2., fCoolingBlockL/2.);
+	 
+	 //place the support on the bottom of the chamber
+	 G4double DSSD_SupPos_y = -fChamberH/2. + fCoolingBlockH/2. + fChamberThickness/2.;
+	 
+	 //position wrt BackPlate/VacChamber
+	 G4double DSSD_SupPos_z = fChamberL/2. - fChamberThickness - fCoolingBlockL/2. - fCoolingBlockZ;  
+	 
+	 //now cut a hole out for the DSSD's
+	 G4double Hole4DSSD_W = fCoolingBlockCutOutW;
+	 G4double Hole4DSSD_H = fCoolingBlockCutOutH;
+	 
+	 //from the above can determine the centre of the DSSD wrt centre of Cooling block
+	 G4double fCoolingBlockCutOut_PosY = fCoolingBlockH/2. - fCoolingBlockT - fCoolingBlockCutOutH/2.; //save this frequently used position
+	 G4cout << "fCoolingBlockCutOut_PosY " << fCoolingBlockCutOut_PosY << " cf " << fCoolingBlockDSSDCentre << G4endl;
+	 
+	 G4Box*  hole1 = new G4Box("Hole #1",Hole4DSSD_W/2., Hole4DSSD_H/2., fCoolingBlockL/2.);
+	 
+	 G4double   dy = fCoolingBlockH/2. - fCoolingBlockT - Hole4DSSD_H/2.; 
+	 G4double   dx = 0.0*mm; 
+	 G4double   dz = 0.0*mm; 
+	 G4ThreeVector  hole1trans(dx, dy, dz);
+	 
+	 G4SubtractionSolid* solid_CB_Temp1 = 
+	   new G4SubtractionSolid("fCoolingBlockTemp1", OuterBox, hole1, 0, hole1trans);
+	 
+	 //now cut a hole out for preamps
+	 G4Box*  holePreAmp = new G4Box("Hole PreAmp",34.5/2.*mm, 22./2.*mm, fCoolingBlockL/2.);
+	 dx = -fCoolingBlockW/2.+fCoolingBlockT+34.5/2.*mm;
+	 dy = fCoolingBlockH/2. - fCoolingBlockT - Hole4DSSD_H - fCoolingBlockT - 22./2.*mm;
+	 G4ThreeVector  holePreAmpTrans1(dx, dy, dz);
+	 dx += (34.5*mm + fCoolingBlockT);
+	 G4ThreeVector  holePreAmpTrans2(dx, dy, dz);
+	 dx += (34.5*mm + 14.7*mm);  
+	 G4ThreeVector  holePreAmpTrans3(dx, dy, dz);
+	 dx += (34.5*mm + fCoolingBlockT);
+	 G4ThreeVector  holePreAmpTrans4(dx, dy, dz);
+	 
+	 G4SubtractionSolid* solid_CB_Temp2 = 
+	   new G4SubtractionSolid("fCoolingBlockTemp2", solid_CB_Temp1, holePreAmp, 0, holePreAmpTrans1);
+	 
+	 G4SubtractionSolid* solid_CB_Temp3 = 
+	   new G4SubtractionSolid("fCoolingBlockTemp3", solid_CB_Temp2, holePreAmp, 0, holePreAmpTrans2);
+	 
+	 G4SubtractionSolid* solid_CB_Temp4 = 
+	   new G4SubtractionSolid("fCoolingBlockTemp4", solid_CB_Temp3, holePreAmp, 0, holePreAmpTrans3);
+	 
+	 G4SubtractionSolid* solid_CB_Temp5 = 
+	   new G4SubtractionSolid("fCoolingBlockTemp5", solid_CB_Temp4, holePreAmp, 0, holePreAmpTrans4);
+	 
+	 G4LogicalVolume* logicDSSD_Sup = new G4LogicalVolume(solid_CB_Temp5,
+							      supportMaterial, "Cylinder-Box", 0, 0, 0);
+	 //vacuumMaterial, "Cylinder-Box", 0, 0, 0);
+	 
+	 logicDSSD_Sup->SetVisAttributes(visAttCoolingBlock);
+	
+	  
+	 PVPBuffer = new G4PVPlacement(0,//rotation
+				       G4ThreeVector(0.0*cm, DSSD_SupPos_y, DSSD_SupPos_z),
+				       logicDSSD_Sup,   //its logical volume
+				       "fCoolingBlock",  //its name
+				       logicChamVac,      //its mother
+				       false,           //no boolean operat
+				       1,              //copy number
+				       true);            //overlap check
+	 
+	 
+	 
+	 
+	 
+	 //-------------------------------------------------------------------------------------------
+	 // DSSD detector Epoxy board....for some reason 2 cut outs are not working => make 2 PCB wafers
+	 G4double DSSD_BrdW = 106.0 * mm * 2.;  //Put the 2 boards in one plate
+	 G4double DSSD_BrdH = 157.0 * mm;       //SupportH;
+	 G4double DSSD_BrdL = fDSSD_BoardL;     //Thickness
+	 
+	 //recess to house DSSD's
+	 G4double siImpBrdCutOutL = fDSSD_BoardL/2.;
+	 // making 2 boards =>
+	 G4double DSSD_BrdL1 = DSSD_BrdL - siImpBrdCutOutL;
+	 G4double DSSD_BrdL2 = siImpBrdCutOutL;
+	 
+	 G4double CutOut_dY = 44.0*mm;     // distance from top of PCB to top of the first cut-out in the PCB
+	 G4double CutOut1_H = 43.5*mm;     // vertical dimension of the cut-out to half thickness
+	 G4double CutOut2_H = 41.0*mm;     // vertical dimension of total-thickness cut-ou ie a mounting lip of 1.25 mm
+	 
+	 G4double CutOut1_W = 63.5*mm;     //fDSSD_H-2.0*boardLipDSSD;
+	 G4double CutOut2_W = 61.0*mm;     //fDSSD_H;
+	 
+	 G4double dssdLip   = (CutOut1_W-CutOut2_W)/2.;
+	 G4double central_bar = 1.25*mm; //each side
+	 
+	 G4double DSSD_PCB_Pos_y = -fVacuumH/2. - DSSD_BrdH/2.;  //puts top of circuit board at bottom of chamber
+	 DSSD_PCB_Pos_y += (fCoolingBlockDSSDCentre + CutOut_dY + CutOut1_H/2.);
+	 
+	 G4double gapBetweenDSSD = 3.0 * mm;  //Gap between the two DSSD's
+	 
+	 //gapBetweenDSSD = 0.01*mm;
+	 
+	 //position wrt centre of vacuum in chamber
+	 G4double DSSD_BrdPos_z = fChamberL/2 - fChamberThickness - fCoolingBlockZ + DSSD_BrdL1/2 + DSSD_BrdL2;  
+	 
+	 G4Box* solidDSSD_Board1_tmp1 = 
+	   new G4Box("siImpBrd1_tmp", DSSD_BrdW/2., DSSD_BrdH/2., DSSD_BrdL1/2.);
+	 
+	 G4Box*         cutOut1a = new G4Box("Box R #1a",CutOut1_W/2., CutOut1_H/2., DSSD_BrdL1/2.);
+	 G4ThreeVector  cutOut1aTrans(CutOut1_W/2.,  DSSD_BrdH/2.-CutOut1_H/2.-CutOut_dY, 0.0*mm);
+	 
+	 G4Box*         cutOut1b = new G4Box("Box R #1b",CutOut1_W/2.,CutOut1_H/2.,DSSD_BrdL1/2.);
+	 G4ThreeVector  cutOut1bTrans(-CutOut1_W/2., DSSD_BrdH/2.-CutOut1_H/2.-CutOut_dY, 0.0*mm);
+	 
+	 
+	 G4SubtractionSolid* solidDSSD_Board1_a = 
+	   new G4SubtractionSolid("siImpBrd1_a", solidDSSD_Board1_tmp1, cutOut1a, 0, cutOut1aTrans);
+	 
+	 G4SubtractionSolid* solidDSSD_Board1 = 
+	   new G4SubtractionSolid("siImpBrd1", solidDSSD_Board1_a, cutOut1b, 0, cutOut1bTrans);
+	 
+	 G4LogicalVolume* logicDSSD_Board1 = new   G4LogicalVolume(solidDSSD_Board1,// it's solid : with cut-out
+								   boardMaterial,  // it's material
+								   //vacuumMaterial,
+								   "DSSD_Brd1",     // it's name
+								   0, 0, 0); // field manager, sensitive det, user limits  
+	 
+	 PVPBuffer = new G4PVPlacement(0,                //rotation
+				       G4ThreeVector(0.0*mm,DSSD_PCB_Pos_y,DSSD_BrdPos_z),
+				       logicDSSD_Board1,  //its logical volume
+				       "DSSD_Brd1",       //its name
+				       logicChamVac,     //its mother
+				       false,            //no boolean operat
+				       0,               //copy number
+				       true);            //overlap check
+	 
+	 
+	 DSSD_BrdPos_z -= DSSD_BrdL1/2;  
+	 DSSD_BrdPos_z -= DSSD_BrdL2/2;  
+	 
+	 G4Box* solidDSSD_Board2_tmp1 = 
+	   new G4Box("siImpBrd2_tmp", DSSD_BrdW/2., DSSD_BrdH/2., DSSD_BrdL2/2.);
+	 
+	 G4Box*         cutOut2a = new G4Box("Box R #2a",CutOut2_W/2.,CutOut2_H/2.,DSSD_BrdL2/2.);
+	 G4ThreeVector  cutOut2aTrans(CutOut2_W/2.+central_bar,  DSSD_BrdH/2.-CutOut2_H/2.-CutOut_dY-dssdLip, 0.0*mm);
+	 
+	 G4Box*         cutOut2b = new G4Box("Box R #2b",CutOut2_W/2.,CutOut2_H/2.,DSSD_BrdL2/2.);
+	 G4ThreeVector  cutOut2bTrans(-CutOut2_W/2.-central_bar,  DSSD_BrdH/2.-CutOut2_H/2.-CutOut_dY-dssdLip, 0.0*mm);
+	 
+	 G4SubtractionSolid* solidDSSD_Board2_a = 
+	   new G4SubtractionSolid("siImpBrd2_a", solidDSSD_Board2_tmp1, cutOut2a, 0, cutOut2aTrans);
+	 
+	 G4SubtractionSolid* solidDSSD_Board2 = 
+	   new G4SubtractionSolid("siImpBrd2", solidDSSD_Board2_a, cutOut2b, 0, cutOut2bTrans);
+	 
+	 G4LogicalVolume* logicDSSD_Board2 = new   G4LogicalVolume(solidDSSD_Board2,// it's solid : with cut-out
+								   boardMaterial,  // it's material
+								   //vacuumMaterial,
+								   "DSSD_Brd2",     // it's name
+								   0, 0, 0); // field manager, sensitive det, user limits  
+	 
+	 PVPBuffer = new G4PVPlacement(0,                //rotation
+				       G4ThreeVector(0.0*mm,DSSD_PCB_Pos_y,DSSD_BrdPos_z),
+				       logicDSSD_Board2,  //its logical volume
+				       "DSSD_Brd2",       //its name
+				       logicChamVac,     //its mother
+				       false,            //no boolean operat
+				       0,               //copy number
+				       true);            //overlap check
 
 
 
@@ -1240,40 +1627,40 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
   G4double totalDSSD_W = fDSSD_W+2.*fDSSD_Guard;
   G4Box*           solidSi1 = new G4Box("Si1", totalDSSD_W/2., totalDSSD_H/2., fDSSD_T/2.);  //Si: 62x42
   G4LogicalVolume* logicSi1 = new G4LogicalVolume(solidSi1,   // it's solid
-      eDetMat,     // it's material //vacuumMaterial,
-      "dssd1",     // it's name
-      0, 0, 0);    // field manager, sensitive det, user limits  
+						  eDetMat,     // it's material //vacuumMaterial,
+						  "dssd1",     // it's name
+						  0, 0, 0);    // field manager, sensitive det, user limits  
 
   logicSi1->SetVisAttributes(visAttDSSD_1);
 
   PVPBuffer = new G4PVPlacement(0,             //rotation
-      G4ThreeVector(totalDSSD_W/2.+0.75*mm,fCentreOfDSSD_Y,DSSD_z),
-      //G4ThreeVector(0.0*mm,fCentreOfDSSD_Y,DSSD_z),
-      logicSi1,     //its logical volume
-      "dssd1",     //its name
-      logicChamVac, //its mother
-      false,        //no boolean operat
-      1);           //,       //copy number
+						G4ThreeVector(totalDSSD_W/2.+0.75*mm,fCentreOfDSSD_Y,DSSD_z),
+						//G4ThreeVector(0.0*mm,fCentreOfDSSD_Y,DSSD_z),
+						logicSi1,     //its logical volume
+						"dssd1",     //its name
+						logicChamVac, //its mother
+						false,        //no boolean operat
+						1);           //,       //copy number
 
   G4LogicalVolume* logicSi2 = new G4LogicalVolume(solidSi1,   // it's solid
-      eDetMat,     // it's material //vacuumMaterial,
-      "dssd2",     // it's name
-      0, 0, 0);    // field manager, sensitive det, user limits  
+						  eDetMat,     // it's material //vacuumMaterial,
+						  "dssd2",     // it's name
+						  0, 0, 0);    // field manager, sensitive det, user limits  
 
   logicSi2->SetVisAttributes(visAttDSSD_1);
 
   PVPBuffer = new G4PVPlacement(0,             //rotation
-      G4ThreeVector(-totalDSSD_W/2.-0.75*mm,fCentreOfDSSD_Y,DSSD_z),
-      //G4ThreeVector(0.0*mm,fCentreOfDSSD_Y,DSSD_z),
-      logicSi2,     //its logical volume
-      "dssd2",     //its name
-      logicChamVac, //its mother
-      false,        //no boolean operat
-      2);           //,       //copy number
-
-
+						G4ThreeVector(-totalDSSD_W/2.-0.75*mm,fCentreOfDSSD_Y,DSSD_z),
+						//G4ThreeVector(0.0*mm,fCentreOfDSSD_Y,DSSD_z),
+						logicSi2,     //its logical volume
+						"dssd2",     //its name
+						logicChamVac, //its mother
+						false,        //no boolean operat
+						2);           //,       //copy number
+
+      
   // The ChamberVac is located wrt centre of Chamber => z0 = -fChamberL/2.
-  fDSSD_PosZ = DSSD_z - fChamberL/2. - fDSSD_T/2.;
+  G4double fDSSD_PosZ = DSSD_z - fChamberL/2. - fDSSD_T/2.;
   G4cout << "Upstream DSSD face @ Z = " << fDSSD_PosZ << G4endl;
 
 
@@ -1290,8 +1677,8 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
   G4double fDSSD_Pixel_Ly = fDSSD_H/(1.0*nStripsY);
 
   G4Box* solidDSSD = new G4Box("dssd", fDSSD_Pixel_Lx/2., fDSSD_Pixel_Ly/2., fDSSD_T/2.);
-
-
+  
+  
   //starting y-position for lowest row
   G4double thisy = -nStripsY/2.*fDSSD_Pixel_Ly + fDSSD_Pixel_Ly/2. + fCoolingBlockCutOut_PosY;
   thisy = -nStripsY/2.*fDSSD_Pixel_Ly + fDSSD_Pixel_Ly/2. + fCentreOfDSSD_Y;
@@ -1306,38 +1693,38 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
 
       //DSSD_A
       logicDSSD_A[iy][ix] = new G4LogicalVolume(solidDSSD,   // it's solid
-          eDetMat,     // it's material
-          //vacuumMaterial,
-          "dssd-pixel",// it's name
-          0, 0, 0);    // field manager, sensitive det, user limits  
-
+						eDetMat,     // it's material
+						//vacuumMaterial,
+						"dssd-pixel",// it's name
+						0, 0, 0);    // field manager, sensitive det, user limits  
+      
       PVPBuffer = new G4PVPlacement(0,            //rotation
-          //G4ThreeVector(thisx,thisy,DSSD_z),
-          G4ThreeVector(thisx2,thisy2,0.0*mm),
-          logicDSSD_A[iy][ix],//its logical volume
-          "DSSD_A",     //its name
-          logicSi2, //its mother
-          false,        //no boolean operat
-          iy*100+ix);//,       //copy number
+					      //G4ThreeVector(thisx,thisy,DSSD_z),
+					      G4ThreeVector(thisx2,thisy2,0.0*mm),
+					      logicDSSD_A[iy][ix],//its logical volume
+					      "DSSD_A",     //its name
+					      logicSi2, //its mother
+					      false,        //no boolean operat
+					      iy*100+ix);//,       //copy number
 
 
       //DSSD_B
       logicDSSD_B[iy][ix] = new G4LogicalVolume(solidDSSD,   // it's solid
-          eDetMat,     // it's material
-          //vacuumMaterial,
-          "dssd-pixel",// it's name
-          0, 0, 0);    // field manager, sensitive det, user limits  
-
+						eDetMat,     // it's material
+						//vacuumMaterial,
+						"dssd-pixel",// it's name
+						0, 0, 0);    // field manager, sensitive det, user limits  
+      
       PVPBuffer = new G4PVPlacement(0,            //rotation
-          //G4ThreeVector(thisx+fDSSD_W+gapBetweenDSSD,thisy,DSSD_z),
-          G4ThreeVector(thisx2,thisy2,0.0*mm),
-          logicDSSD_B[iy][ix],//its logical volume
-          "DSSD_B",     //its name
-          logicSi1, //its mother
-          false,        //no boolean operat
-          iy*100+ix);//,       //copy number
-
-
+					      //G4ThreeVector(thisx+fDSSD_W+gapBetweenDSSD,thisy,DSSD_z),
+					      G4ThreeVector(thisx2,thisy2,0.0*mm),
+					      logicDSSD_B[iy][ix],//its logical volume
+					      "DSSD_B",     //its name
+					      logicSi1, //its mother
+					      false,        //no boolean operat
+					      iy*100+ix);//,       //copy number
+
+      
       //visu
       logicDSSD_A[iy][ix]->SetVisAttributes(visAttDSSD);
       logicDSSD_B[iy][ix]->SetVisAttributes(visAttDSSD);
@@ -1361,8 +1748,8 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
   G4double PinGap        =  1.0 * mm; //between PINS
   G4double PinToEdge     =  3.0 * mm; //gap from the end
   G4double PinEpoxyT     =  1.6 * mm; //thickness of pcb board
-  //G4double PinSupportLip =  PinT+PinEpoxyT; //thickness of pcb board
-
+  G4double PinSupportLip =  PinT+PinEpoxyT; //thickness of pcb board
+  
   //horizontal-side dimensions [approxiamted as a single board]
   G4double PinBoard_H_W = PinL*5.;
   G4double PinBoard_H_H = PinEpoxyT;
@@ -1383,7 +1770,7 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
   G4double PinBoard_H_x  = 0.0 * mm;
   G4double PinBoard_H_dy = Hole4DSSD_H/2. - PinEpoxyT/2. - PinBoardSupport_T;
   G4double PinBoard_V_x  = Hole4DSSD_W/2. - PinEpoxyT/2. - PinBoardSupport_T;
-  fDSSD_PosY             = fCentreOfDSSD_Y;
+  G4double fDSSD_PosY             = fCentreOfDSSD_Y;
   G4double PinBoard_V_y  = fDSSD_PosY;
 
   //The epoxy board for the pins
@@ -1395,17 +1782,17 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
   //Pin PCB/Epoxy boards
   G4Box* solidPinBoard_H = new G4Box("pin-pcb", PinBoard_H_W/2., PinBoard_H_H/2., PinBoard_H_L/2.);
   G4Box* solidPinBoard_V = new G4Box("pin-pcb", PinBoard_V_W/2., PinBoard_V_H/2., PinBoard_V_L/2.);
-
-
+  
+  
   G4LogicalVolume* logicPinBoard_H = new G4LogicalVolume(solidPinBoard_H, // it's solid
-      boardMaterial,   // it's material
-      "pin-pcb",       // it's name
-      0,0,0);          // field manager etc
+							 boardMaterial,   // it's material
+							 "pin-pcb",       // it's name
+							 0,0,0);          // field manager etc
 
   G4LogicalVolume* logicPinBoard_V = new G4LogicalVolume(solidPinBoard_V, // it's solid
-      boardMaterial,   // it's material
-      "pin-pcb",       // it's name
-      0,0,0);          // field manager etc
+							 boardMaterial,   // it's material
+							 "pin-pcb",       // it's name
+							 0,0,0);          // field manager etc
 
   logicPinBoard_H->SetVisAttributes(visAttPIN_Board);
   logicPinBoard_V->SetVisAttributes(visAttPIN_Board);
@@ -1415,25 +1802,25 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
   //G4PVPlacement* physiPinBoard_V[2];  
 
   for(G4int i = 0; i < 2; i++) {
-
+    
     G4double dyPos = (2*i-1)*PinBoard_H_dy;
-
+   
     PVPBuffer = new G4PVPlacement(0,                     //rotation
-        G4ThreeVector(PinBoard_H_x, fCentreOfDSSD_Y + dyPos, PinBoard_z),
-        logicPinBoard_H, //its logical volume
-        "PinPCB_H",           //its name
-        logicChamVac,        //its mother
-        false,                 //no boolean operat
-        i+1);               //copy number
-
+					   G4ThreeVector(PinBoard_H_x, fCentreOfDSSD_Y + dyPos, PinBoard_z),
+					   logicPinBoard_H, //its logical volume
+					   "PinPCB_H",           //its name
+					   logicChamVac,        //its mother
+					   false,                 //no boolean operat
+					   i+1);               //copy number
+    
     PVPBuffer = new G4PVPlacement(0,                     //rotation
-        G4ThreeVector( PinBoard_V_x*(2*i-1), PinBoard_V_y, PinBoard_z),
-        logicPinBoard_V, //its logical volume
-        "PinPCB_V",           //its name
-        logicChamVac,        //its mother
-        false,                 //no boolean operat
-        i+1);               //copy number
-
+					   G4ThreeVector( PinBoard_V_x*(2*i-1), PinBoard_V_y, PinBoard_z),
+					   logicPinBoard_V, //its logical volume
+					   "PinPCB_V",           //its name
+					   logicChamVac,        //its mother
+					   false,                 //no boolean operat
+					   i+1);               //copy number
+   
   }
 
 
@@ -1451,7 +1838,7 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
 
 
   G4Box* solidPinSupportBoard_H_temp = new G4Box("pin-pcb-support", PinBoardSupport_H_W/2., PinBoardSupport_H_H/2., PinBoardSupport_H_L/2.);
-
+  
   G4double cutOutPinBoard_H_x = 28.6*mm;
   G4Box*         cutOutPinBoard_H = new G4Box("Box Pin Board #1",cutOutPinBoard_H_x/2.,PinBoardSupport_H_H/2.,70.*mm/2.);
 
@@ -1460,7 +1847,7 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
   G4ThreeVector  cutOutPinBoard_H_m1(-PinL,         0.0*mm, 5.0*mm);
   G4ThreeVector  cutOutPinBoard_H_p2( 2*PinL,       0.0*mm, 5.0*mm);
   G4ThreeVector  cutOutPinBoard_H_m2(-2*PinL,       0.0*mm, 5.0*mm);
-
+  
   G4SubtractionSolid* solidPinSupportBoard_H0 = 
     new G4SubtractionSolid("pin-pcb-support_0", solidPinSupportBoard_H_temp, cutOutPinBoard_H, 0, cutOutPinBoard_H_centre);
 
@@ -1479,46 +1866,46 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
 
 
   G4LogicalVolume* logicPinSupportBoard_H = new G4LogicalVolume(solidPinSupportBoard_H, // it's solid
-      m_ChamberMaterial,   // it's material
-      "pin-pcb-support",       // it's name
-      0,0,0);          // field manager etc
+								m_ChamberMaterial,   // it's material
+								"pin-pcb-support",       // it's name
+								0,0,0);          // field manager etc
   logicPinSupportBoard_H->SetVisAttributes(visAttPIN_BoardSup);
 
   G4double PinBoardSupport_Z = DSSD_SupPos_z + fCoolingBlockL/2. - PinBoardSupport_H_L/2. - 1.0*mm;
 
 
-
+   
   PVPBuffer = new G4PVPlacement(0,                     //rotation
-      G4ThreeVector(PinBoard_H_x, fDSSD_PosY + fCoolingBlockCutOutH/2. - PinBoardSupport_H_H/2., PinBoardSupport_Z),
-      logicPinSupportBoard_H, //its logical volume
-      "PinPCB_Support",           //its name
-      logicChamVac,        //its mother
-      false,                 //no boolean operat
-      1);               //copy number
+							     G4ThreeVector(PinBoard_H_x, fDSSD_PosY + fCoolingBlockCutOutH/2. - PinBoardSupport_H_H/2., PinBoardSupport_Z),
+							     logicPinSupportBoard_H, //its logical volume
+							     "PinPCB_Support",           //its name
+							     logicChamVac,        //its mother
+							     false,                 //no boolean operat
+							     1);               //copy number
 
   PVPBuffer = new G4PVPlacement(0,                     //rotation
-      G4ThreeVector(PinBoard_H_x, fDSSD_PosY - fCoolingBlockCutOutH/2. + PinBoardSupport_H_H/2., PinBoardSupport_Z),
-      logicPinSupportBoard_H, //its logical volume
-      "PinPCB_Support",           //its name
-      logicChamVac,        //its mother
-      false,                 //no boolean operat
-      2);               //copy number
-
+							     G4ThreeVector(PinBoard_H_x, fDSSD_PosY - fCoolingBlockCutOutH/2. + PinBoardSupport_H_H/2., PinBoardSupport_Z),
+							     logicPinSupportBoard_H, //its logical volume
+							     "PinPCB_Support",           //its name
+							     logicChamVac,        //its mother
+							     false,                 //no boolean operat
+							     2);               //copy number
 
+  
 
   G4double PinBoardSupport_W_W = 3.75*mm;
   G4double PinBoardSupport_W_H = fCoolingBlockCutOutH - 2.*PinBoardSupport_H_H;
   G4double PinBoardSupport_W_L = 80.*mm;
-
+  
   //Vertical Support Pin Epoxy
   G4Box* solidPinSupportBoard_V_temp = new G4Box("pin-pcb-support", PinBoardSupport_W_W/2., PinBoardSupport_W_H/2., PinBoardSupport_W_L/2.);
-
+  
   G4Box*         cutOutPinBoard_V = new G4Box("Box Pin Board #1",PinBoardSupport_W_W/2.,cutOutPinBoard_H_x/2.,70.*mm/2.);
   G4double cutOutSpine_x          = (PinL + PinGap - cutOutPinBoard_H_x)/2.;
 
   G4ThreeVector  cutOutPinBoard_V_p1( 0.0*mm,  (cutOutSpine_x+cutOutPinBoard_H_x)/2., 5.0*mm);
   G4ThreeVector  cutOutPinBoard_V_m1( 0.0*mm, -(cutOutSpine_x+cutOutPinBoard_H_x)/2., 5.0*mm);
-
+  
   G4SubtractionSolid* solidPinSupportBoard_V0 = 
     new G4SubtractionSolid("pin-pcb-support_0", solidPinSupportBoard_V_temp, cutOutPinBoard_V, 0, cutOutPinBoard_V_p1);
 
@@ -1528,29 +1915,29 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
 
 
   G4LogicalVolume* logicPinSupportBoard_V = new G4LogicalVolume(solidPinSupportBoard_V, // it's solid
-      m_ChamberMaterial,   // it's material
-      "pin-pcb-support",       // it's name
-      0,0,0);          // field manager etc
-
+							 m_ChamberMaterial,   // it's material
+							 "pin-pcb-support",       // it's name
+							 0,0,0);          // field manager etc
+  
   logicPinSupportBoard_V->SetVisAttributes(visAttPIN_BoardSup);
 
   PVPBuffer = new G4PVPlacement(0,                     //rotation
-      G4ThreeVector( fCoolingBlockCutOutW/2. - PinBoardSupport_W_W/2., fDSSD_PosY, PinBoardSupport_Z),
-      logicPinSupportBoard_V, //its logical volume
-      "PinPCBSupport",           //its name
-      logicChamVac,        //its mother
-      false,                 //no boolean operat
-      1);               //copy number
+							     G4ThreeVector( fCoolingBlockCutOutW/2. - PinBoardSupport_W_W/2., fDSSD_PosY, PinBoardSupport_Z),
+							     logicPinSupportBoard_V, //its logical volume
+							     "PinPCBSupport",           //its name
+							     logicChamVac,        //its mother
+							     false,                 //no boolean operat
+							     1);               //copy number
 
   PVPBuffer= new G4PVPlacement(0,                     //rotation
-      G4ThreeVector(-fCoolingBlockCutOutW/2. + PinBoardSupport_W_W/2., fDSSD_PosY, PinBoardSupport_Z),
-      logicPinSupportBoard_V, //its logical volume
-      "PinPCBSupport",           //its name
-      logicChamVac,        //its mother
-      false,                 //no boolean operat
-      2);               //copy number
-
-
+							     G4ThreeVector(-fCoolingBlockCutOutW/2. + PinBoardSupport_W_W/2., fDSSD_PosY, PinBoardSupport_Z),
+							     logicPinSupportBoard_V, //its logical volume
+							     "PinPCBSupport",           //its name
+							     logicChamVac,        //its mother
+							     false,                 //no boolean operat
+							     2);               //copy number
+
+ 
   //add the fucking ridiculous flange....
   G4double PinFlange_Z = DSSD_SupPos_z + fCoolingBlockL/2. - 0.5*mm;
   G4Box*  PinFlange_outer = new G4Box("Box Pin Flange #1",fCoolingBlockCutOutW/2.,fCoolingBlockCutOutH/2.,1.0*mm/2.);  //probably even thicker just to make sure no low E gammas are seen !
@@ -1559,21 +1946,21 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
   G4SubtractionSolid* solidPinFlange = 
     new G4SubtractionSolid("pin-flange", PinFlange_outer, PinFlange_hole, 0, G4ThreeVector(0.*mm, 0.*mm, 0.*mm));
 
-
+  
   G4LogicalVolume* logicPinFlange = new G4LogicalVolume(solidPinFlange, // it's solid
-      m_ChamberMaterial,   // it's material
-      "pin-flange",       // it's name
-      0,0,0);          // field manager etc
-
+								m_ChamberMaterial,   // it's material
+								"pin-flange",       // it's name
+								0,0,0);          // field manager etc
+  
   logicPinFlange->SetVisAttributes(visAttPIN_BoardSup);
-
+  
   PVPBuffer = new G4PVPlacement(0,                    //rotation
-      G4ThreeVector(0.0*mm, fDSSD_PosY, PinFlange_Z),
-      logicPinFlange,       //its logical volume
-      "PinFlange",          //its name
-      logicChamVac,         //its mother
-      false,                 //no boolean operat
-      1);               //copy number  
+						    G4ThreeVector(0.0*mm, fDSSD_PosY, PinFlange_Z),
+						    logicPinFlange,       //its logical volume
+						    "PinFlange",          //its name
+						    logicChamVac,         //its mother
+						    false,                 //no boolean operat
+						    1);               //copy number  
 
   //now the PINS.....
   G4VisAttributes* visAttPIN = new G4VisAttributes( G4Colour(0.9,0.9,0.3) );
@@ -1582,63 +1969,63 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
   visAttPIN->SetForceWireframe(true);
 
   G4double Pin_z1 = PinBoard_z + PinBoard_V_L/2. - PinToEdge - PinL/2;
-  //G4double Pin_z2 = Pin_z1 - PinGap - PinL;
+  G4double Pin_z2 = Pin_z1 - PinGap - PinL;
 
   //total Si area
   G4Box* solidPINS_H = new G4Box("pins-passive", PinL/2., PinT/2., PinL/2);  //horizontal
-  new G4Box("pins-passive", PinT/2., PinL/2., PinL/2);  //vertical
-
+  G4Box* solidPINS_V = new G4Box("pins-passive", PinT/2., PinL/2., PinL/2);  //vertical
+  
   //active Si
-  G4Box* solidPINS_Active_H;
-  solidPINS_Active_H = new G4Box("pins", PinL/2.-PinGuard, PinT/2., PinL/2-PinGuard);  //horizontal
-  new G4Box("pins", PinT/2., PinL/2.-PinGuard, PinL/2-PinGuard);  //vertical
+  G4Box* solidPINS_Active_H = new G4Box("pins", PinL/2.-PinGuard, PinT/2., PinL/2-PinGuard);  //horizontal
+  G4Box* solidPINS_Active_V = new G4Box("pins", PinT/2., PinL/2.-PinGuard, PinL/2-PinGuard);  //vertical
+
 
   //horizontal rows  could put an index[i] = copyNo to match position in real array !!
   for(G4int nH = 0; nH < 2; nH++) {  //up/down
     G4double posY = fDSSD_PosY + (2*nH - 1)*(PinBoard_H_dy - PinBoard_H_H/2. - PinT/2.);
-
+    
     for(G4int i = 1; i <= 5; i++) {  //across in x
       G4double posX = -PinBoard_H_W/2. + PinL/2. + (i-1)*PinL;
 
       for(G4int r = 1; r <= 2; r++) { //2 rows (in z)
-        G4double posZ = Pin_z1 - (r%2)*(PinGap + PinL);
-        G4int copyNo  = nH*10+2*(i-1)+r;
-        G4cout << "Checking PIN copyNo " << copyNo << G4endl;
-
-        logicPINS[copyNo-1] = new G4LogicalVolume(solidPINS_H, // it's solid
-            eDetMat,     // it's material
-            "pin-pass-h",     // it's name
-            0,0,0);      // field manager etc
-
-        logicPINS[copyNo-1]->SetVisAttributes(visAttPIN);
-
-
-        PVPBuffer = new G4PVPlacement(0,                     //rotation
-            G4ThreeVector(posX, posY, posZ),
-            logicPINS[copyNo-1],   //its logical volume
-            "PinPass",             //its name
-            logicChamVac,          //its mother
-            false,                 //no boolean operat
-            copyNo,                //copy number
-            true);                 //check for overlaps
-
-
-        logicPINS_Active[copyNo-1] = new G4LogicalVolume(solidPINS_Active_H, // it's solid
-            eDetMat,     // it's material
-            "pin-h",     // it's name
-            0,0,0);      // field manager etc
-
-        logicPINS_Active[copyNo-1]->SetVisAttributes(visAttPIN);
-
-
-        PVPBuffer = new G4PVPlacement(0,                          //rotation
-            G4ThreeVector(0.*mm,0.*mm,0.*mm),
-            logicPINS_Active[copyNo-1], //its logical volume
-            "Pin",                      //its name
-            logicPINS[copyNo-1],        //its mother
-            false,                      //no boolean operat
-            copyNo);                    //copy number    
-
+	G4double posZ = Pin_z1 - (r%2)*(PinGap + PinL);
+	G4int copyNo  = nH*10+2*(i-1)+r;
+	G4cout << "Checking PIN copyNo " << copyNo << G4endl;
+
+	logicPINS[copyNo-1] = new G4LogicalVolume(solidPINS_H, // it's solid
+						  eDetMat,     // it's material
+						  "pin-pass-h",     // it's name
+						  0,0,0);      // field manager etc
+	
+	logicPINS[copyNo-1]->SetVisAttributes(visAttPIN);
+
+	
+	PVPBuffer = new G4PVPlacement(0,                     //rotation
+						G4ThreeVector(posX, posY, posZ),
+						logicPINS[copyNo-1],   //its logical volume
+						"PinPass",             //its name
+						logicChamVac,          //its mother
+						false,                 //no boolean operat
+						copyNo,                //copy number
+						true);                 //check for overlaps
+	
+	
+	logicPINS_Active[copyNo-1] = new G4LogicalVolume(solidPINS_Active_H, // it's solid
+							 eDetMat,     // it's material
+							 "pin-h",     // it's name
+							 0,0,0);      // field manager etc
+	
+	logicPINS_Active[copyNo-1]->SetVisAttributes(visAttPIN);
+
+	
+	PVPBuffer = new G4PVPlacement(0,                          //rotation
+						       G4ThreeVector(0.*mm,0.*mm,0.*mm),
+						       logicPINS_Active[copyNo-1], //its logical volume
+						       "Pin",                      //its name
+						       logicPINS[copyNo-1],        //its mother
+						       false,                      //no boolean operat
+						       copyNo);                    //copy number    
+	
       }
     }
   }
@@ -1667,7 +2054,7 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
   G4double connectorL = 14.0*mm;
   G4double connectorT =  5.0*mm;
 
-
+ 
   //delta-pos for each pre-amp
   const G4int    nPA        =  20; //per support board
   G4double PA_dPos = PA_SupportBoard_W / ((G4double) (nPA+1));
@@ -1699,27 +2086,27 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
 
 
   G4LogicalVolume* logicPA_SupportBoard = new G4LogicalVolume(solidPA_SupportBoard, // it's solid
-      boardMaterial,          // it's material
-      "dssd-pa-support-pcb",  // it's name
-      0,0,0);                 // field manager etc
+							      boardMaterial,          // it's material
+							      "dssd-pa-support-pcb",  // it's name
+							      0,0,0);                 // field manager etc
 
 
   G4LogicalVolume* logicDSSD_Connector = new G4LogicalVolume(solidDSSD_Connector, // it's solid
-      boardMaterial,          // it's material
-      "dssd-connector",  // it's name
-      0,0,0);                 // field manager etc
+							      boardMaterial,          // it's material
+							      "dssd-connector",  // it's name
+							      0,0,0);                 // field manager etc
 
 
   G4LogicalVolume* logicPA_Board = new G4LogicalVolume(solidPA_Board, // it's solid
-      boardMaterial,   // it's material
-      "dssd-pa-pcb",   // it's name
-      0,0,0);          // field manager etc
-
+						       boardMaterial,   // it's material
+						       "dssd-pa-pcb",   // it's name
+						       0,0,0);          // field manager etc
+  
 
   G4LogicalVolume* logicPA_Capacitor = new G4LogicalVolume(solidPA_Capacitor, // it's solid
-      boardMaterial,   // it's material
-      "dssd-pa-cap",   // it's name
-      0,0,0);          // field manager etc
+							   boardMaterial,   // it's material
+							   "dssd-pa-cap",   // it's name
+							   0,0,0);          // field manager etc
 
   logicPA_SupportBoard->SetVisAttributes(visAtt_PA_SupportBoard);
   logicDSSD_Connector->SetVisAttributes(visAtt_PA_SupportBoard);
@@ -1743,63 +2130,63 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
   G4RotationMatrix* rot_90_Z = new G4RotationMatrix;
   rot_90_Z->set(0,0,0);
   rot_90_Z->rotateZ(90.*degree);
-
+  
   G4RotationMatrix* rot_90_Y = new G4RotationMatrix;
   rot_90_Y->set(0,0,0);
   rot_90_Y->rotateY(90.*degree);
-
+  
   //vertical boards....  
   //G4PVPlacement* physiPA_Board[6][nPA];
   //G4PVPlacement* physiPA_Capacitor[6][nPA];
 
   for(G4int i = 0; i < 4; i++) {
-
+    
     G4double xPos = fCoolingBlockW/2. + PA_SupportBoard_T/2. + 3.0*mm;
     G4double yPos = top_of_DSSD_Brd - PA_SupportBoard_W/2. - gapConnector_2_DSSD_Board_V + gapConnector_PA_Board;
-
+    
     if(i >= 2)   xPos *= -1.;
     if(i%2 != 0) yPos -= (PA_SupportBoard_W + 7.0*mm);
 
     PVPBuffer =
       new G4PVPlacement(0,                         //rotation
-          G4ThreeVector(xPos, yPos, PA_SupportBoard_z),
-          logicPA_SupportBoard,     //its logical volume
-          "dssd-pa-support-pcb",    //its name
-          logicChamVac,             //its mother
-          false,                    //no boolean operat
-          i+1);                     //copy number
-
-
+    			G4ThreeVector(xPos, yPos, PA_SupportBoard_z),
+    			logicPA_SupportBoard,     //its logical volume
+    			"dssd-pa-support-pcb",    //its name
+    			logicChamVac,             //its mother
+    			false,                    //no boolean operat
+    			i+1);                     //copy number
+
+   
     xPos = DSSD_BrdW/2. - 9.0*mm;
     yPos = top_of_DSSD_Brd - gapConnector_2_DSSD_Board_V - connectorW/2.;
-
+    
     switch (i) {
-      case 0 :
-        break;
-      case 1 : yPos -=  (7.0*mm + connectorW);
-      case 2 : yPos -= (15.0*mm + connectorW); 
-      case 3 : yPos -=  (7.0*mm + connectorW);
-               break;
+    case 0 :
+      break;
+    case 1 : yPos -=  (7.0*mm + connectorW);
+    case 2 : yPos -= (15.0*mm + connectorW); 
+    case 3 : yPos -=  (7.0*mm + connectorW);
+      break;
     }
 
-
+    
     PVPBuffer =
       new G4PVPlacement(rot_90_Z,                         //rotation
-          G4ThreeVector(xPos, yPos, PA_SupportBoard_z+PA_SupportBoard_L/2.-connectorL/2.),
-          logicDSSD_Connector,     //its logical volume
-          "dssd-pa-support-pcb",    //its name
-          logicChamVac,             //its mother
-          false,                    //no boolean operat
-          i+1);                     //copy number
+    			G4ThreeVector(xPos, yPos, PA_SupportBoard_z+PA_SupportBoard_L/2.-connectorL/2.),
+    			logicDSSD_Connector,     //its logical volume
+    			"dssd-pa-support-pcb",    //its name
+    			logicChamVac,             //its mother
+    			false,                    //no boolean operat
+    			i+1);                     //copy number
 
     PVPBuffer =
       new G4PVPlacement(rot_90_Z,                         //rotation
-          G4ThreeVector(-xPos, yPos, PA_SupportBoard_z+PA_SupportBoard_L/2.-connectorL/2.),
-          logicDSSD_Connector,     //its logical volume
-          "dssd-pa-support-pcb",    //its name
-          logicChamVac,             //its mother
-          false,                    //no boolean operat
-          i+1+4);                     //copy number
+    			G4ThreeVector(-xPos, yPos, PA_SupportBoard_z+PA_SupportBoard_L/2.-connectorL/2.),
+     			logicDSSD_Connector,     //its logical volume
+    			"dssd-pa-support-pcb",    //its name
+    			logicChamVac,             //its mother
+    			false,                    //no boolean operat
+    			i+1+4);                     //copy number
 
     //place the preamp boards and capacitors
     G4double PA_PosY = top_of_DSSD_Brd - gapConnector_2_DSSD_Board_V + gapConnector_PA_Board;
@@ -1807,87 +2194,87 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
 
     if(i >= 2)   PA_PosX *= -1.;
     if(i%2 != 0) PA_PosY -= (PA_SupportBoard_W + 7.0*mm);
-
+    
     for(G4int j = 0; j < nPA; j++) {
       G4double thisY = PA_PosY - PA_dPos*(j+1);
       PVPBuffer =
-        new G4PVPlacement(0,                         //rotation
-            G4ThreeVector(PA_PosX, thisY, PA_SupportBoard_z-10*mm),
-            logicPA_Board,    //its logical volume
-            "dssd-pa-pcb",     //its name
-            logicChamVac,              //its mother
-            false,                     //no boolean operat
-            j+1);                        //copy number
+	new G4PVPlacement(0,                         //rotation
+			  G4ThreeVector(PA_PosX, thisY, PA_SupportBoard_z-10*mm),
+			  logicPA_Board,    //its logical volume
+			  "dssd-pa-pcb",     //its name
+			  logicChamVac,              //its mother
+			  false,                     //no boolean operat
+			  j+1);                        //copy number
 
       PVPBuffer =
-        new G4PVPlacement(rmCap,                         //rotation
-            G4ThreeVector(PA_PosX, thisY,  PA_SupportBoard_z+20.*mm),
-            logicPA_Capacitor,    //its logical volume
-            "dssd-pa-cap",     //its name
-            logicChamVac,              //its mother
-            false,                     //no boolean operat
-            j+1);                        //copy number
-
+	new G4PVPlacement(rmCap,                         //rotation
+			  G4ThreeVector(PA_PosX, thisY,  PA_SupportBoard_z+20.*mm),
+			  logicPA_Capacitor,    //its logical volume
+			  "dssd-pa-cap",     //its name
+			  logicChamVac,              //its mother
+			  false,                     //no boolean operat
+			  j+1);                        //copy number
+      
     }
   }
-
+  
 
   //horizontal...
   for(G4int i = 4; i < 6; i++) {
-
+    
     G4double xPos = PA_SupportBoard_W/2.+gapConnector_2_DSSD_Board_H-gapConnector_PA_Board;
     G4double yPos = top_of_DSSD_Brd-13.*mm-connectorT-PA_SupportBoard_T/2.+ 1.0*mm;
-
+    
     if(i == 5)   xPos *= -1.;
 
     PVPBuffer=
       new G4PVPlacement(rot_90_Z,                         //rotation
-          G4ThreeVector(xPos, yPos, PA_SupportBoard_z),
-          logicPA_SupportBoard,     //its logical volume
-          "dssd-pa-support-pcb",    //its name
-          logicChamVac,             //its mother
-          false,                    //no boolean operat
-          i+1);                     //copy number
+    			G4ThreeVector(xPos, yPos, PA_SupportBoard_z),
+    			logicPA_SupportBoard,     //its logical volume
+   			"dssd-pa-support-pcb",    //its name
+    			logicChamVac,             //its mother
+    			false,                    //no boolean operat
+    			i+1);                     //copy number
 
     for(G4int j = 0; j < 2; j++) {
       PVPBuffer =
-        new G4PVPlacement(0,                         //rotation
-            G4ThreeVector(xPos+((2*j-1)*(connectorW/2.+3.5*mm)), yPos+PA_SupportBoard_T/2.+connectorT/2., PA_SupportBoard_z+PA_SupportBoard_L/2.-connectorL/2.),
-            logicDSSD_Connector,     //its logical volume
-            "dssd-pa-support-pcb",    //its name
-            logicChamVac,             //its mother
-            false,                    //no boolean operat
-            1+4+2*i+j);                     //copy number
+	new G4PVPlacement(0,                         //rotation
+			  G4ThreeVector(xPos+((2*j-1)*(connectorW/2.+3.5*mm)), yPos+PA_SupportBoard_T/2.+connectorT/2., PA_SupportBoard_z+PA_SupportBoard_L/2.-connectorL/2.),
+			  logicDSSD_Connector,     //its logical volume
+			  "dssd-pa-support-pcb",    //its name
+			  logicChamVac,             //its mother
+			  false,                    //no boolean operat
+			  1+4+2*i+j);                     //copy number
     }
-
+    
     //place the preamp boards and capacitors
     G4double PA_PosY = yPos + PA_Board_W/2. + PA_SupportBoard_T/2.;
     G4double PA_PosX = xPos + PA_SupportBoard_W/2.;
 
-
+    
     //if(i >= 2)   PA_PosX *= -1.;
     //if(i%2 != 0) PA_PosY -= (PA_SupportBoard_W + 7.0*mm);
-
+    
     for(G4int j = 0; j < nPA; j++) {
       G4double thisX = PA_PosX - PA_dPos*(j+1);
       PVPBuffer =
-        new G4PVPlacement(rot_90_Z,                         //rotation
-            G4ThreeVector(thisX, PA_PosY, PA_SupportBoard_z-10*mm),
-            logicPA_Board,    //its logical volume
-            "dssd-pa-pcb",     //its name
-            logicChamVac,              //its mother
-            false,                     //no boolean operat
-            j+1);                        //copy number
-
+	new G4PVPlacement(rot_90_Z,                         //rotation
+			  G4ThreeVector(thisX, PA_PosY, PA_SupportBoard_z-10*mm),
+			  logicPA_Board,    //its logical volume
+			  "dssd-pa-pcb",     //its name
+			  logicChamVac,              //its mother
+			  false,                     //no boolean operat
+			  j+1);                        //copy number
+      
       PVPBuffer =
-        new G4PVPlacement(rot_90_Y,                         //rotation
-            G4ThreeVector(thisX, PA_PosY,  PA_SupportBoard_z+20.*mm),
-            logicPA_Capacitor,    //its logical volume
-            "dssd-pa-cap",     //its name
-            logicChamVac,              //its mother
-            false,                     //no boolean operat
-            j+1);                        //copy number
-
+	new G4PVPlacement(rot_90_Y,                         //rotation
+			  G4ThreeVector(thisX, PA_PosY,  PA_SupportBoard_z+20.*mm),
+			  logicPA_Capacitor,    //its logical volume
+			  "dssd-pa-cap",     //its name
+			  logicChamVac,              //its mother
+			  false,                     //no boolean operat
+			  j+1);                        //copy number
+      
     }
   }
 
@@ -1898,21 +2285,18 @@ else if(m_ChamberType==3){  // case of GREAT chamber as defined by Karl
   //by default place 2 PhaseII clovers on either side of the chamber
 
   // uncomment this to put clovers on the sides !!
-  //  Place_PhaseIIs_Left_and_Right(world);    //usual
+  //Place_PhaseIIs_Left_and_Right(world);    //usual
 
-  Place_GREAT_On_the_Top(world);           //usual
+  //Place_GREAT_On_the_Top(world);           //usual  // Now you can use GRTClov detector instead
 
   //Place_GREAT_Left_and_Right();     //compare
   //Place_PhaseII_LookingUpstream();  //usual
 
   G4cout << ".....placed" << G4endl;
+  
 
 
-
-}
-
-
-
+   }
 }
 
 // Add Detector branch to the EventTree.
@@ -1924,6 +2308,8 @@ void Chamber::InitializeRootOutput()
 // Called at in the EventAction::EndOfEventAvtion
 void Chamber::ReadSensitive(const G4Event*)
 {}
+      
+
 
 //#################################################################################################################################################
 
@@ -1960,17 +2346,17 @@ void Chamber::Place_PhaseIIs_Left_and_Right(G4LogicalVolume* world)
   vacuum_PosZ = fVacuumPosZ_PhaseII;
   geLeaf_PosZ = fGeLeafPosZ_PhaseII;
 
-
+  
   G4RotationMatrix rm ;
   G4double theta = 90. * deg;
   G4double phi   =  0. * deg;
-
-
+  
+  
   //for(G4int det = prevNumber; det < numberOfClovers; det++) {
   for(G4int det = 0; det < 2; det++) {
     logicEndCap_CloverLR[det] = new G4LogicalVolume(solidEndCap_PhaseII, endCapMaterial,   "clover_EC",   0, 0, 0);
     logicVacuum_CloverLR[det] = new G4LogicalVolume(solidVacuum_PhaseII, vacuumMaterial,   "clover_Vac",  0, 0, 0);
-
+    
     for(G4int l = 0; l < 4; l++) {
       logicGeLeaf_CloverLR[det][l]     = new G4LogicalVolume(solidGeLeaf_PhaseII,     geMaterial,      "clover_Leaf",   0, 0, 0);
       logicPassivated_CloverLR[det][l] = new G4LogicalVolume(solidPassivated_PhaseII, geMaterial,      "passivatedGe",  0, 0, 0); //should be Ge
@@ -1978,49 +2364,49 @@ void Chamber::Place_PhaseIIs_Left_and_Right(G4LogicalVolume* world)
       logicBoreHole_CloverLR[det][l]   = new G4LogicalVolume(solidBoreHole_PhaseII,   vacuumMaterial,  "bore-hole",     0, 0, 0);
     }
 
-
+    
     //rotation for each clover.....
     rm.set(0,0,0);
     phi = 180.0 * deg * det;
     rm.rotateY(theta);
     rm.rotateX(phi);
     rm.invert();
-
+    
     //traslate position: the centre of the DSSD has been placed @ Y = 0.0*mm
     G4ThreeVector translation(-endCap_PosX*sin(theta)*cos(phi),
-        endCap_PosX*sin(theta)*sin(phi) + 0.0*mm, //fDSSD_PosY,
-        geSidePosition);
-
+			      endCap_PosX*sin(theta)*sin(phi) + 0.0*mm, //fDSSD_PosY,
+			      geSidePosition);
+    
     G4cout << "Clover " << det << " x " << -endCap_PosX*sin(theta)*cos(phi) << G4endl;
 
     //Physical placement of these solids......
     PVPBuffer = new G4PVPlacement(G4Transform3D(rm, translation),
-        logicEndCap_CloverLR[det],//its logical volume
-        "Clover_EC",       //its name
-        world,         //its mother
-        true,               //no boolean operat
-        det*4,                  //copy number
-        true);              //overlap check
-
+						  logicEndCap_CloverLR[det],//its logical volume
+						  "Clover_EC",       //its name
+						  world,         //its mother
+						  true,               //no boolean operat
+						  det*4,                  //copy number
+						  true);              //overlap check
+    
     PVPBuffer = new G4PVPlacement(0,                   //rotation
-        G4ThreeVector(0.*mm,0.*mm,vacuum_PosZ),
-        logicVacuum_CloverLR[det], //its logical volume
-        "Clover_Vac",       //its name
-        logicEndCap_CloverLR[det], //its mother
-        true,                //no boolean operat
-        det*4,                   //copy number
-        true);               //overlap check
+						  G4ThreeVector(0.*mm,0.*mm,vacuum_PosZ),
+						  logicVacuum_CloverLR[det], //its logical volume
+						  "Clover_Vac",       //its name
+						  logicEndCap_CloverLR[det], //its mother
+						  true,                //no boolean operat
+						  det*4,                   //copy number
+						  true);               //overlap check
   }
-
+  
   //Now for the placement of the leaves in each clover......
   G4RotationMatrix* rmC;
   G4double leafX;
   G4double leafY;
-  //G4double leafZ;
-
+  G4double leafZ;
+  
   //Keep track of which detectors are used
-  //G4String  detName[2] = {"CloverR","CloverL"}; //Looking upstream
-
+  G4String  detName[2] = {"CloverR","CloverL"}; //Looking upstream
+  
   for(G4int l = 0; l < 4; l++) {
     //the rotation
     rmC = new G4RotationMatrix;
@@ -2040,45 +2426,45 @@ void Chamber::Place_PhaseIIs_Left_and_Right(G4LogicalVolume* world)
       leafY = -22.15*mm;
     }
     //the z-translation
-    //leafZ = geLeaf_PosZ;
-
-
+    leafZ = geLeaf_PosZ;
+    
+    
     //for(G4int det = prevNumber; det < numberOfClovers; det++) {
     for(G4int det = 0; det < 2; det++) {
       //physiGeLeaf_CloverLR[det][l] = new G4PVPlacement(rmC,                       //rotation
       PVPBuffer = new G4PVPlacement(rmC,                       //rotation
-          G4ThreeVector(leafX,leafY,geLeaf_PosZ),
-          logicGeLeaf_CloverLR[det][l], //its logical volume
-          "Clover",//detName[det].data(),          //its name
-          logicVacuum_CloverLR[det],    //its mother
-          true,                       //no boolean operat
-          det*4+l,                        //copy number
-          true);                      //overlap check
+						       G4ThreeVector(leafX,leafY,geLeaf_PosZ),
+						       logicGeLeaf_CloverLR[det][l], //its logical volume
+						       "Clover",//detName[det].data(),          //its name
+						       logicVacuum_CloverLR[det],    //its mother
+						       true,                       //no boolean operat
+						       det*4+l,                        //copy number
+						       true);                      //overlap check
 
       //physiPassivated_CloverLR[det][l] = new G4PVPlacement(0,                   //rotation
       PVPBuffer = new G4PVPlacement(0,                   //rotation
-          G4ThreeVector(-fHole_dX_PhaseII, -fHole_dY_PhaseII, fContact_dZ_PhaseII),
-          logicPassivated_CloverLR[det][l],
-          "GePassivated",
-          logicGeLeaf_CloverLR[det][l],
-          false,det*4+l,true);
-
+							   G4ThreeVector(-fHole_dX_PhaseII, -fHole_dY_PhaseII, fContact_dZ_PhaseII),
+							   logicPassivated_CloverLR[det][l],
+							   "GePassivated",
+							   logicGeLeaf_CloverLR[det][l],
+							   false,det*4+l,true);
+      
       //physiContact_CloverLR[det][l] = new G4PVPlacement(0,                   //rotation
       PVPBuffer = new G4PVPlacement(0,                   //rotation
-          G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_PhaseII),
-                logicContact_CloverLR[det][l],
-                "LiContact",
-                logicPassivated_CloverLR[det][l],
-                false,det*4+l,true);
-
-                //physiBoreHole_CloverLR[det][l] = new G4PVPlacement(0,                   //rotation
-                PVPBuffer = new G4PVPlacement(0,                   //rotation
-                    G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_PhaseII),
-                          logicBoreHole_CloverLR[det][l],
-                          "BoreHole",
-                          logicContact_CloverLR[det][l],
-                          false,det*4+l,true);
-
+							G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_PhaseII),
+							logicContact_CloverLR[det][l],
+							"LiContact",
+							logicPassivated_CloverLR[det][l],
+							false,det*4+l,true);
+      
+      //physiBoreHole_CloverLR[det][l] = new G4PVPlacement(0,                   //rotation
+      PVPBuffer = new G4PVPlacement(0,                   //rotation
+							 G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_PhaseII),
+							 logicBoreHole_CloverLR[det][l],
+							 "BoreHole",
+							 logicContact_CloverLR[det][l],
+							 false,det*4+l,true);
+      
     }
   }
 
@@ -2087,30 +2473,30 @@ void Chamber::Place_PhaseIIs_Left_and_Right(G4LogicalVolume* world)
   visAttAlCap->SetForceWireframe(true);
   visAttAlCap->SetVisibility(true);
   //visAttAlCap->SetVisibility(false);
-
+  
   G4VisAttributes* visAttGeVac = new G4VisAttributes( G4Colour(0.9,1.0,0.9) );
   visAttGeVac->SetForceWireframe(true);
   visAttGeVac->SetVisibility(true);
   //visAttGeVac->SetVisibility(false);
-
+  
   G4VisAttributes* visAttActive = new G4VisAttributes( G4Colour(1.0,1.0,0.0) );
   visAttActive->SetForceWireframe(true);
   visAttActive->SetVisibility(true);
   //visAttActive->SetVisibility(false);
-
+  
   G4VisAttributes* visAttPassive = new G4VisAttributes(G4Colour(0.0,1.0,1.0) );
   visAttPassive->SetForceWireframe(true);
   visAttPassive->SetVisibility(true);
   //visAttPassive->SetVisibility(false);
-
+  
   G4VisAttributes* visAttLiContact = new G4VisAttributes(G4Colour(1.0,0.0,1.0) );
   visAttLiContact->SetVisibility(true);
   //visAttLiContact->SetVisibility(false);
-
+  
   G4VisAttributes* visAttHole = new G4VisAttributes( G4Colour(0.0,0.0,1.0) );
   visAttHole->SetVisibility(true);
   //visAttHole->SetVisibility(false);
-
+  
   for(G4int det = 0; det < 2; det++) {
     logicEndCap_CloverLR[det]->SetVisAttributes(visAttAlCap);
     logicVacuum_CloverLR[det]->SetVisAttributes(visAttGeVac);
@@ -2121,1218 +2507,1215 @@ void Chamber::Place_PhaseIIs_Left_and_Right(G4LogicalVolume* world)
       logicBoreHole_CloverLR[det][l]->SetVisAttributes(visAttHole);
     }
   }
-  }
-
-
-  //------------------------------------------------------------------
-  void Chamber::Place_PhaseII_On_the_Top(G4LogicalVolume* world)
-  {
-    //=================================================================================
-    //Do not know why, but the positioning seems to be with respect to the Taper-part :
-    //setting the z-position as endCapTaperL/2 puts the front face at z = 0 mm
-    //=================================================================================
-    G4double endCap_PosX; 
-    G4double vacuum_PosZ;
-    G4double geLeaf_PosZ;
-
-    //reset scale
-    endCap_PosX = fChamberH/2. + fEndCapTaperL_PhaseII/2. + fGeTopGap;
-    vacuum_PosZ = fVacuumPosZ_PhaseII;
-    geLeaf_PosZ = fGeLeafPosZ_PhaseII;
+}
 
 
-    G4RotationMatrix rm ;
-    G4double theta = 90. * deg;
-    G4double phi   =  0. * deg;
+//------------------------------------------------------------------
+void Chamber::Place_PhaseII_On_the_Top(G4LogicalVolume* world)
+{
+  //=================================================================================
+  //Do not know why, but the positioning seems to be with respect to the Taper-part :
+  //setting the z-position as endCapTaperL/2 puts the front face at z = 0 mm
+  //=================================================================================
+  G4double endCap_PosX; 
+  G4double vacuum_PosZ;
+  G4double geLeaf_PosZ;
 
+  //reset scale
+  endCap_PosX = fChamberH/2. + fEndCapTaperL_PhaseII/2. + fGeTopGap;
+  vacuum_PosZ = fVacuumPosZ_PhaseII;
+  geLeaf_PosZ = fGeLeafPosZ_PhaseII;
+  
+  
+  G4RotationMatrix rm ;
+  G4double theta = 90. * deg;
+  G4double phi   =  0. * deg;
+  
+  
+  logicEndCap_CloverT = new G4LogicalVolume(solidEndCap_PhaseII, endCapMaterial,   "clover_EC",   0, 0, 0);
+  logicVacuum_CloverT = new G4LogicalVolume(solidVacuum_PhaseII, vacuumMaterial,   "clover_Vac",  0, 0, 0);
+    
+  for(G4int l = 0; l < 4; l++) {
+    logicGeLeaf_CloverT[l]     = new G4LogicalVolume(solidGeLeaf_PhaseII,     geMaterial,      "clover_Leaf",   0, 0, 0);
+    logicPassivated_CloverT[l] = new G4LogicalVolume(solidPassivated_PhaseII, geMaterial,      "passivatedGe",  0, 0, 0); //should be Ge
+    logicContact_CloverT[l]    = new G4LogicalVolume(solidContact_PhaseII,    contactMaterial, "inner_contact", 0, 0, 0); //should be Li
+    logicBoreHole_CloverT[l]   = new G4LogicalVolume(solidBoreHole_PhaseII,   vacuumMaterial,  "bore-hole",     0, 0, 0);
+  }
 
-    logicEndCap_CloverT = new G4LogicalVolume(solidEndCap_PhaseII, endCapMaterial,   "clover_EC",   0, 0, 0);
-    logicVacuum_CloverT = new G4LogicalVolume(solidVacuum_PhaseII, vacuumMaterial,   "clover_Vac",  0, 0, 0);
+  //rotate
+  rm.set(0,0,0);
+  phi = 90.0 * deg;
+  rm.rotateY(theta);
+  rm.rotateX(phi);
+  rm.invert();
+  
+  //traslate position
+  G4ThreeVector translation(-endCap_PosX*sin(theta)*cos(phi),
+			    endCap_PosX*sin(theta)*sin(phi),
+			    geTopPosition);
+  
+  G4cout << "Top Clover " << " x " << -endCap_PosX*sin(theta)*cos(phi) << G4endl;
+  
+  //Physical placement of these solids......
+  //physiEndCap_CloverT = new G4PVPlacement(G4Transform3D(rm, translation),
+  PVPBuffer = new G4PVPlacement(G4Transform3D(rm, translation),
+					  logicEndCap_CloverT,//its logical volume
+					  "Clover_EC",       //its name
+					  world,         //its mother
+					  true,               //no boolean operat
+					  8,                  //copy number
+					  true);              //overlap check
+  
+  //physiVacuum_CloverT = new G4PVPlacement(0,                   //rotation
+  PVPBuffer = new G4PVPlacement(0,                   //rotation
+					  G4ThreeVector(0.*mm,0.*mm,vacuum_PosZ),
+					  logicVacuum_CloverT, //its logical volume
+					  "Clover_Vac",       //its name
+					  logicEndCap_CloverT, //its mother
+					  true,                //no boolean operat
+					  8,                   //copy number
+					  true);               //overlap check
 
-    for(G4int l = 0; l < 4; l++) {
-      logicGeLeaf_CloverT[l]     = new G4LogicalVolume(solidGeLeaf_PhaseII,     geMaterial,      "clover_Leaf",   0, 0, 0);
-      logicPassivated_CloverT[l] = new G4LogicalVolume(solidPassivated_PhaseII, geMaterial,      "passivatedGe",  0, 0, 0); //should be Ge
-      logicContact_CloverT[l]    = new G4LogicalVolume(solidContact_PhaseII,    contactMaterial, "inner_contact", 0, 0, 0); //should be Li
-      logicBoreHole_CloverT[l]   = new G4LogicalVolume(solidBoreHole_PhaseII,   vacuumMaterial,  "bore-hole",     0, 0, 0);
+  //Now for the placement of the leaves in each clover......
+  G4RotationMatrix* rmC;
+  G4double leafX;
+  G4double leafY;
+  G4double leafZ;
+  
+  for(G4int l = 0; l < 4; l++) {
+    //the rotation
+    rmC = new G4RotationMatrix;
+    rmC->set(0,0,0);
+    rmC->rotateZ(90.*degree*(4-l));
+    rmC->invert();
+    //the x-translation
+    if(l < 2) {
+      leafX = 22.15*mm;
+    } else {
+      leafX = -22.15*mm;
     }
+    //the y-translation
+    if(l == 0 || l == 3 ) {
+      leafY = 22.15*mm;
+    } else {
+      leafY = -22.15*mm;
+    }
+    //the z-translation
+    leafZ = geLeaf_PosZ;
+    
+    
+    //physiGeLeaf_CloverT[l] = new G4PVPlacement(rmC,                       //rotation
+    PVPBuffer = new G4PVPlacement(rmC,                       //rotation
+					       G4ThreeVector(leafX,leafY,geLeaf_PosZ),
+					       logicGeLeaf_CloverT[l],     //its logical volume
+					       "Clover",                 //its name
+					       logicVacuum_CloverT,        //its mother
+					       true,                       //no boolean operat
+					       8+l,                        //copy number
+					       true);                      //overlap check
+    
+    //physiPassivated_CloverT[l] = new G4PVPlacement(0,                   //rotation
+    PVPBuffer = new G4PVPlacement(0,                   //rotation
+						   G4ThreeVector(-fHole_dX_PhaseII, -fHole_dY_PhaseII, fContact_dZ_PhaseII),
+						   logicPassivated_CloverT[l],
+						   "GePassivated",
+						   logicGeLeaf_CloverT[l],
+						   false,8+l,true);
+    
+    //physiContact_CloverT[l] = new G4PVPlacement(0,                   //rotation
+    PVPBuffer = new G4PVPlacement(0,                   //rotation
+						G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_PhaseII),
+						logicContact_CloverT[l],
+						"LiContact",
+						logicPassivated_CloverT[l],
+						false,8+l,true);
 
-    //rotate
-    rm.set(0,0,0);
-    phi = 90.0 * deg;
-    rm.rotateY(theta);
-    rm.rotateX(phi);
-    rm.invert();
-
-    //traslate position
-    G4ThreeVector translation(-endCap_PosX*sin(theta)*cos(phi),
-        endCap_PosX*sin(theta)*sin(phi),
-        geTopPosition);
-
-    G4cout << "Top Clover " << " x " << -endCap_PosX*sin(theta)*cos(phi) << G4endl;
-
-    //Physical placement of these solids......
-    //physiEndCap_CloverT = new G4PVPlacement(G4Transform3D(rm, translation),
-    PVPBuffer = new G4PVPlacement(G4Transform3D(rm, translation),
-        logicEndCap_CloverT,//its logical volume
-        "Clover_EC",       //its name
-        world,         //its mother
-        true,               //no boolean operat
-        8,                  //copy number
-        true);              //overlap check
-
-    //physiVacuum_CloverT = new G4PVPlacement(0,                   //rotation
+    //physiBoreHole_CloverT[l] = new G4PVPlacement(0,                   //rotation
     PVPBuffer = new G4PVPlacement(0,                   //rotation
-        G4ThreeVector(0.*mm,0.*mm,vacuum_PosZ),
-        logicVacuum_CloverT, //its logical volume
-        "Clover_Vac",       //its name
-        logicEndCap_CloverT, //its mother
-        true,                //no boolean operat
-        8,                   //copy number
-        true);               //overlap check
-
-    //Now for the placement of the leaves in each clover......
-    G4RotationMatrix* rmC;
-    G4double leafX;
-    G4double leafY;
-    //G4double leafZ;
+						 G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_PhaseII),
+						 logicBoreHole_CloverT[l],
+						 "BoreHole",
+						 logicContact_CloverT[l],
+						 false,8+l,true);
+    
+  }
 
-    for(G4int l = 0; l < 4; l++) {
-      //the rotation
-      rmC = new G4RotationMatrix;
-      rmC->set(0,0,0);
-      rmC->rotateZ(90.*degree*(4-l));
-      rmC->invert();
-      //the x-translation
-      if(l < 2) {
-        leafX = 22.15*mm;
-      } else {
-        leafX = -22.15*mm;
-      }
-      //the y-translation
-      if(l == 0 || l == 3 ) {
-        leafY = 22.15*mm;
-      } else {
-        leafY = -22.15*mm;
-      }
-      //the z-translation
-      //leafZ = geLeaf_PosZ;
+  //define the visual attributes
+  G4VisAttributes* visAttAlCap = new G4VisAttributes( G4Colour(0.9,0.9,0.9) );
+  visAttAlCap->SetVisibility(true);
+  visAttAlCap->SetForceWireframe(true);
+  
+  G4VisAttributes* visAttGeVac = new G4VisAttributes( G4Colour(0.9,1.0,0.9) );
+  visAttGeVac->SetForceWireframe(true);
+  visAttGeVac->SetVisibility(true);
+  
+  G4VisAttributes* visAttActive = new G4VisAttributes( G4Colour(1.0,1.0,0.0) );
+  visAttActive->SetForceWireframe(true);
+  visAttActive->SetVisibility(true);
+  
+  G4VisAttributes* visAttPassive = new G4VisAttributes(G4Colour(0.0,1.0,1.0) );
+  visAttPassive->SetForceWireframe(true);
+  visAttPassive->SetVisibility(true);
+  
+  G4VisAttributes* visAttLiContact = new G4VisAttributes(G4Colour(1.0,0.0,1.0) );
+  visAttLiContact->SetVisibility(true);
+  
+  G4VisAttributes* visAttHole = new G4VisAttributes( G4Colour(0.0,0.0,1.0) );
+  visAttHole->SetVisibility(true);
+  
+  logicEndCap_CloverT->SetVisAttributes(visAttAlCap);
+  logicVacuum_CloverT->SetVisAttributes(visAttGeVac);
+  for(G4int l = 0; l < 4; l++) {
+    logicGeLeaf_CloverT[l]->SetVisAttributes(visAttActive);
+    logicPassivated_CloverT[l]->SetVisAttributes(visAttPassive);
+    logicContact_CloverT[l]->SetVisAttributes(visAttLiContact);
+    logicBoreHole_CloverT[l]->SetVisAttributes(visAttHole);
+  }
+}
 
 
-      //physiGeLeaf_CloverT[l] = new G4PVPlacement(rmC,                       //rotation
-      PVPBuffer = new G4PVPlacement(rmC,                       //rotation
-          G4ThreeVector(leafX,leafY,geLeaf_PosZ),
-          logicGeLeaf_CloverT[l],     //its logical volume
-          "Clover",                 //its name
-          logicVacuum_CloverT,        //its mother
-          true,                       //no boolean operat
-          8+l,                        //copy number
-          true);                      //overlap check
-
-      //physiPassivated_CloverT[l] = new G4PVPlacement(0,                   //rotation
-      PVPBuffer = new G4PVPlacement(0,                   //rotation
-          G4ThreeVector(-fHole_dX_PhaseII, -fHole_dY_PhaseII, fContact_dZ_PhaseII),
-          logicPassivated_CloverT[l],
-          "GePassivated",
-          logicGeLeaf_CloverT[l],
-          false,8+l,true);
+//------------------------------------------------------------------
+void Chamber::Place_GREAT_On_the_Top(G4LogicalVolume* world)
+{
+  //=================================================================================
+  // The positioning for boolean solids is odd :  for this det it is with respect to the Taper-part :
+  //setting the z-position as endCapTaperL/2 puts the front face at z = 0 mm
+  //=================================================================================
+  G4double endCap_PosX = fChamberH/2. - fShiftChamberY + fEndCapTaperL_GREAT/2. + fGeTopGap;
+  G4double vacuum_PosZ = fVacuumPosZ_GREAT;
+  G4double geLeaf_PosZ = fGeLeafPosZ_GREAT;
+  
+  
+  G4RotationMatrix rm ;
+  G4double theta = 90. * deg;
+  G4double phi   =  0. * deg;
+  
+  
+  logicEndCap_CloverT = new G4LogicalVolume(solidEndCap_GREAT, endCapMaterial,   "clover_EC",   0, 0, 0);
+  logicVacuum_CloverT = new G4LogicalVolume(solidVacuum_GREAT, vacuumMaterial,   "clover_Vac",  0, 0, 0);
+    
+  for(G4int l = 0; l < 4; l++) {
+    logicGeLeaf_CloverT[l]     = new G4LogicalVolume(solidGeLeaf_GREAT,     geMaterial,      "clover_Leaf",   0, 0, 0);
+    logicPassivated_CloverT[l] = new G4LogicalVolume(solidPassivated_GREAT, geMaterial,      "passivatedGe",  0, 0, 0);
+    logicContact_CloverT[l]    = new G4LogicalVolume(solidContact_GREAT,    contactMaterial, "inner_contact", 0, 0, 0);
+    logicBoreHole_CloverT[l]   = new G4LogicalVolume(solidBoreHole_GREAT,   vacuumMaterial,  "bore_hole",     0, 0, 0);
+  }
 
-      //physiContact_CloverT[l] = new G4PVPlacement(0,                   //rotation
-      PVPBuffer = new G4PVPlacement(0,                   //rotation
-          G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_PhaseII),
-                logicContact_CloverT[l],
-                "LiContact",
-                logicPassivated_CloverT[l],
-                false,8+l,true);
-
-                //physiBoreHole_CloverT[l] = new G4PVPlacement(0,                   //rotation
-                PVPBuffer = new G4PVPlacement(0,                   //rotation
-                    G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_PhaseII),
-                          logicBoreHole_CloverT[l],
-                          "BoreHole",
-                          logicContact_CloverT[l],
-                          false,8+l,true);
+  //rotate
+  rm.set(0,0,0);
+  phi = 90.0 * deg;
+  rm.rotateY(theta);
+  rm.rotateX(phi);
+  rm.invert();
+  
+  //traslate position
+  G4ThreeVector translation(-endCap_PosX*sin(theta)*cos(phi),
+			    endCap_PosX*sin(theta)*sin(phi),
+			    geTopPosition +fCorrection);
+  
+  G4cout << "Top Clover " << " x " << -endCap_PosX*sin(theta)*cos(phi) << G4endl;
+  
+  //Physical placement of these solids......
+  //physiEndCap_CloverT = new G4PVPlacement(G4Transform3D(rm, translation),
+  PVPBuffer = new G4PVPlacement(G4Transform3D(rm, translation),
+					  logicEndCap_CloverT,//its logical volume
+					  "Clover_EC",       //its name
+					  world,         //its mother
+					  true,               //no boolean operat
+					  8,                  //copy number
+					  true);              //overlap check
+  
+  //physiVacuum_CloverT = new G4PVPlacement(0,                   //rotation
+  PVPBuffer = new G4PVPlacement(0,                   //rotation
+					  G4ThreeVector(0.*mm,0.*mm,vacuum_PosZ),
+					  logicVacuum_CloverT, //its logical volume
+					  "Clover_Vac",       //its name
+					  logicEndCap_CloverT, //its mother
+					  true,                //no boolean operat
+					  8,                   //copy number
+					  true);               //overlap check
 
+  //Now for the placement of the leaves in each clover......
+  G4RotationMatrix* rmC;
+  G4double dPos = fGeLeaf_dX_GREAT + fGapBetweenLeaves_GREAT/2.;
+  G4double leafX;
+  G4double leafY;
+  G4double leafZ;
+  
+  for(G4int l = 0; l < 4; l++) {
+    //the rotation
+    rmC = new G4RotationMatrix;
+    rmC->set(0,0,0);
+    rmC->rotateZ(90.*degree*(4-l));
+    rmC->invert();
+    //the x-translation
+    if(l < 2) {
+      leafX = dPos;
+    } else {
+      leafX = -dPos;
     }
-
-    //define the visual attributes
-    G4VisAttributes* visAttAlCap = new G4VisAttributes( G4Colour(0.9,0.9,0.9) );
-    visAttAlCap->SetVisibility(true);
-    visAttAlCap->SetForceWireframe(true);
-
-    G4VisAttributes* visAttGeVac = new G4VisAttributes( G4Colour(0.9,1.0,0.9) );
-    visAttGeVac->SetForceWireframe(true);
-    visAttGeVac->SetVisibility(true);
-
-    G4VisAttributes* visAttActive = new G4VisAttributes( G4Colour(1.0,1.0,0.0) );
-    visAttActive->SetForceWireframe(true);
-    visAttActive->SetVisibility(true);
-
-    G4VisAttributes* visAttPassive = new G4VisAttributes(G4Colour(0.0,1.0,1.0) );
-    visAttPassive->SetForceWireframe(true);
-    visAttPassive->SetVisibility(true);
-
-    G4VisAttributes* visAttLiContact = new G4VisAttributes(G4Colour(1.0,0.0,1.0) );
-    visAttLiContact->SetVisibility(true);
-
-    G4VisAttributes* visAttHole = new G4VisAttributes( G4Colour(0.0,0.0,1.0) );
-    visAttHole->SetVisibility(true);
-
-    logicEndCap_CloverT->SetVisAttributes(visAttAlCap);
-    logicVacuum_CloverT->SetVisAttributes(visAttGeVac);
-    for(G4int l = 0; l < 4; l++) {
-      logicGeLeaf_CloverT[l]->SetVisAttributes(visAttActive);
-      logicPassivated_CloverT[l]->SetVisAttributes(visAttPassive);
-      logicContact_CloverT[l]->SetVisAttributes(visAttLiContact);
-      logicBoreHole_CloverT[l]->SetVisAttributes(visAttHole);
+    //the y-translation
+    if(l == 0 || l == 3 ) {
+      leafY = dPos;
+    } else {
+      leafY = -dPos;
     }
+    //the z-translation
+    leafZ = geLeaf_PosZ;
+    
+    
+    //physiGeLeaf_CloverT[l] = new G4PVPlacement(rmC,                       //rotation
+    PVPBuffer = new G4PVPlacement(rmC,                       //rotation
+					       G4ThreeVector(leafX, leafY, leafZ),
+					       logicGeLeaf_CloverT[l],     //its logical volume
+					       "Clover",                 //its name
+					       logicVacuum_CloverT,        //its mother
+					       true,                       //no boolean operat
+					       8+l,                        //copy number
+					       true);                      //overlap check
+    
+    //physiPassivated_CloverT[l] = new G4PVPlacement(0,                   //rotation
+    PVPBuffer = new G4PVPlacement(0,                   //rotation
+						   G4ThreeVector(fHole_dX_GREAT, fHole_dY_GREAT, fContact_dZ_GREAT),
+						   logicPassivated_CloverT[l],
+						   "GePassivated",
+						   logicGeLeaf_CloverT[l],
+						   false,8+l,true);
+    
+    //physiContact_CloverT[l] = new G4PVPlacement(0,                   //rotation
+    PVPBuffer = new G4PVPlacement(0,                   //rotation
+						G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_GREAT),
+						logicContact_CloverT[l],
+						"LiContact",
+						logicPassivated_CloverT[l],
+						false,8+l,true);
+    
+    //physiBoreHole_CloverT[l] = new G4PVPlacement(0,                   //rotation
+    PVPBuffer = new G4PVPlacement(0,                   //rotation
+						 G4ThreeVector(0.*mm,0.*mm, 0.0*mm),
+						 logicBoreHole_CloverT[l],
+						 "BoreHole",
+						 logicContact_CloverT[l],
+						 false,8+l,true);
+    
   }
 
+  //define the visual attributes
+  G4VisAttributes* visAttAlCap = new G4VisAttributes( G4Colour(0.9,0.9,0.9) );
+  visAttAlCap->SetVisibility(true);
+  //visAttAlCap->SetVisibility(false);
+  visAttAlCap->SetForceWireframe(true);
+  
+  G4VisAttributes* visAttGeVac = new G4VisAttributes( G4Colour(0.9,1.0,0.9) );
+  visAttGeVac->SetVisibility(true);
+  //visAttGeVac->SetVisibility(false);
+  visAttGeVac->SetForceWireframe(true);
+  
+  G4VisAttributes* visAttActive = new G4VisAttributes( G4Colour(1.0,1.0,0.0) );
+  visAttActive->SetVisibility(true);
+  //visAttActive->SetVisibility(false);
+  visAttActive->SetForceWireframe(true);
+  
+  G4VisAttributes* visAttPassive = new G4VisAttributes(G4Colour(0.0,1.0,1.0) );
+  visAttPassive->SetVisibility(true);
+  //visAttPassive->SetVisibility(false);
+  visAttPassive->SetForceWireframe(true);
+  
+  G4VisAttributes* visAttLiContact = new G4VisAttributes(G4Colour(1.0,0.0,1.0) );
+  visAttLiContact->SetVisibility(true);
+  //visAttLiContact->SetVisibility(false);
+  
+  G4VisAttributes* visAttHole = new G4VisAttributes( G4Colour(0.0,0.0,1.0) );
+  visAttHole->SetVisibility(true);
+  //visAttHole->SetVisibility(false);
+  
+  logicEndCap_CloverT->SetVisAttributes(visAttAlCap);
+  logicVacuum_CloverT->SetVisAttributes(visAttGeVac);
+  for(G4int l = 0; l < 4; l++) {
+    logicGeLeaf_CloverT[l]->SetVisAttributes(visAttActive);
+    logicPassivated_CloverT[l]->SetVisAttributes(visAttPassive);
+    logicContact_CloverT[l]->SetVisAttributes(visAttLiContact);
+    logicBoreHole_CloverT[l]->SetVisAttributes(visAttHole);
+  }
+}
 
-  //------------------------------------------------------------------
-  void Chamber::Place_GREAT_On_the_Top(G4LogicalVolume* world)
-  {
-    //=================================================================================
-    // The positioning for boolean solids is odd :  for this det it is with respect to the Taper-part :
-    //setting the z-position as endCapTaperL/2 puts the front face at z = 0 mm
-    //=================================================================================
-    G4double endCap_PosX = fChamberH/2. - fShiftChamberY + fEndCapTaperL_GREAT/2. + fGeTopGap;
-    G4double vacuum_PosZ = fVacuumPosZ_GREAT;
-    G4double geLeaf_PosZ = fGeLeafPosZ_GREAT;
-
-
-    G4RotationMatrix rm ;
-    G4double theta = 90. * deg;
-    G4double phi   =  0. * deg;
-
-
-    logicEndCap_CloverT = new G4LogicalVolume(solidEndCap_GREAT, endCapMaterial,   "clover_EC",   0, 0, 0);
-    logicVacuum_CloverT = new G4LogicalVolume(solidVacuum_GREAT, vacuumMaterial,   "clover_Vac",  0, 0, 0);
-
+//------------------------------------------------------------------
+// Clover numbering scheme : 
+//        Left     =  0 => Crystals  0, 1, 2, 3
+//        Right    =  4 => Crystals  4, 5, 6, 7
+//        Top      =  8 => Crystals  8, 9,10,11
+//        Upstream = 12 => Crystals 12,13,14,15
+//------------------------------------------------------------------
+//------------------------------------------------------------------
+void Chamber::Place_GREAT_Left_and_Right(G4LogicalVolume* world)
+{
+  //=================================================================================
+  // The positioning for boolean solids is odd :  for this det it is with respect to the Taper-part :
+  //setting the z-position as endCapTaperL/2 puts the front face at z = 0 mm
+  //=================================================================================
+  G4double endCap_PosX = fChamberW/2. + fEndCapTaperL_GREAT/2. + 3.0*mm;
+  G4double vacuum_PosZ = fVacuumPosZ_GREAT;
+  G4double geLeaf_PosZ = fGeLeafPosZ_GREAT;
+  
+  
+  G4RotationMatrix rm ;
+  G4double theta = 90. * deg;
+  G4double phi   =  0. * deg;
+  
+  
+  //for(G4int det = prevNumber; det < numberOfClovers; det++) {
+  for(G4int det = 0; det < 2; det++) {
+    logicEndCap_CloverLR[det] = new G4LogicalVolume(solidEndCap_GREAT, endCapMaterial,   "clover_EC",   0, 0, 0);
+    logicVacuum_CloverLR[det] = new G4LogicalVolume(solidVacuum_GREAT, vacuumMaterial,   "clover_Vac",  0, 0, 0);
+    
     for(G4int l = 0; l < 4; l++) {
-      logicGeLeaf_CloverT[l]     = new G4LogicalVolume(solidGeLeaf_GREAT,     geMaterial,      "clover_Leaf",   0, 0, 0);
-      logicPassivated_CloverT[l] = new G4LogicalVolume(solidPassivated_GREAT, geMaterial,      "passivatedGe",  0, 0, 0);
-      logicContact_CloverT[l]    = new G4LogicalVolume(solidContact_GREAT,    contactMaterial, "inner_contact", 0, 0, 0);
-      logicBoreHole_CloverT[l]   = new G4LogicalVolume(solidBoreHole_GREAT,   vacuumMaterial,  "bore_hole",     0, 0, 0);
+      logicGeLeaf_CloverLR[det][l]     = new G4LogicalVolume(solidGeLeaf_GREAT,     geMaterial,      "clover_Leaf",   0, 0, 0);
+      logicPassivated_CloverLR[det][l] = new G4LogicalVolume(solidPassivated_GREAT,    geMaterial,      "passivatedGe",  0, 0, 0); //should be Ge
+      logicContact_CloverLR[det][l]    = new G4LogicalVolume(solidContact_GREAT, contactMaterial, "inner_contact", 0, 0, 0); //should be Li
+      logicBoreHole_CloverLR[det][l]   = new G4LogicalVolume(solidBoreHole_GREAT,   vacuumMaterial,  "bore-hole",     0, 0, 0);
     }
 
-    //rotate
+    
+    //rotation for each clover.....
     rm.set(0,0,0);
-    phi = 90.0 * deg;
+    phi = 180.0 * deg * det;
     rm.rotateY(theta);
     rm.rotateX(phi);
     rm.invert();
-
-    //traslate position
+    
+    //traslate position: the centre of the DSSD has been placed @ Y = 0.0*mm
     G4ThreeVector translation(-endCap_PosX*sin(theta)*cos(phi),
-        endCap_PosX*sin(theta)*sin(phi),
-        geTopPosition +fCorrection);
-
-    G4cout << "Top Clover " << " x " << -endCap_PosX*sin(theta)*cos(phi) << G4endl;
+			      endCap_PosX*sin(theta)*sin(phi) + 0.0*mm, //fDSSD_PosY,
+			      0.0*mm);
+    
+    G4cout << "Clover " << det << " x " << -endCap_PosX*sin(theta)*cos(phi) << G4endl;
 
     //Physical placement of these solids......
-    //physiEndCap_CloverT = new G4PVPlacement(G4Transform3D(rm, translation),
+    //physiEndCap_CloverLR[det] = new G4PVPlacement(G4Transform3D(rm, translation),
     PVPBuffer = new G4PVPlacement(G4Transform3D(rm, translation),
-        logicEndCap_CloverT,//its logical volume
-        "Clover_EC",       //its name
-        world,         //its mother
-        true,               //no boolean operat
-        8,                  //copy number
-        true);              //overlap check
-
-    //physiVacuum_CloverT = new G4PVPlacement(0,                   //rotation
-    PVPBuffer = new G4PVPlacement(0,                   //rotation
-        G4ThreeVector(0.*mm,0.*mm,vacuum_PosZ),
-        logicVacuum_CloverT, //its logical volume
-        "Clover_Vac",       //its name
-        logicEndCap_CloverT, //its mother
-        true,                //no boolean operat
-        8,                   //copy number
-        true);               //overlap check
-
-    //Now for the placement of the leaves in each clover......
-    G4RotationMatrix* rmC;
-    G4double dPos = fGeLeaf_dX_GREAT + fGapBetweenLeaves_GREAT/2.;
-    G4double leafX;
-    G4double leafY;
-    G4double leafZ;
-
-    for(G4int l = 0; l < 4; l++) {
-      //the rotation
-      rmC = new G4RotationMatrix;
-      rmC->set(0,0,0);
-      rmC->rotateZ(90.*degree*(4-l));
-      rmC->invert();
-      //the x-translation
-      if(l < 2) {
-        leafX = dPos;
-      } else {
-        leafX = -dPos;
-      }
-      //the y-translation
-      if(l == 0 || l == 3 ) {
-        leafY = dPos;
-      } else {
-        leafY = -dPos;
-      }
-      //the z-translation
-      leafZ = geLeaf_PosZ;
-
-
-      //physiGeLeaf_CloverT[l] = new G4PVPlacement(rmC,                       //rotation
-      PVPBuffer = new G4PVPlacement(rmC,                       //rotation
-          G4ThreeVector(leafX, leafY, leafZ),
-          logicGeLeaf_CloverT[l],     //its logical volume
-          "Clover",                 //its name
-          logicVacuum_CloverT,        //its mother
-          true,                       //no boolean operat
-          8+l,                        //copy number
-          true);                      //overlap check
-
-      //physiPassivated_CloverT[l] = new G4PVPlacement(0,                   //rotation
-      PVPBuffer = new G4PVPlacement(0,                   //rotation
-          G4ThreeVector(fHole_dX_GREAT, fHole_dY_GREAT, fContact_dZ_GREAT),
-          logicPassivated_CloverT[l],
-          "GePassivated",
-          logicGeLeaf_CloverT[l],
-          false,8+l,true);
-
-      //physiContact_CloverT[l] = new G4PVPlacement(0,                   //rotation
-      PVPBuffer = new G4PVPlacement(0,                   //rotation
-          G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_GREAT),
-                logicContact_CloverT[l],
-                "LiContact",
-                logicPassivated_CloverT[l],
-                false,8+l,true);
-
-                //physiBoreHole_CloverT[l] = new G4PVPlacement(0,                   //rotation
-                PVPBuffer = new G4PVPlacement(0,                   //rotation
-                    G4ThreeVector(0.*mm,0.*mm, 0.0*mm),
-                    logicBoreHole_CloverT[l],
-                    "BoreHole",
-                    logicContact_CloverT[l],
-                    false,8+l,true);
-
+						  logicEndCap_CloverLR[det],//its logical volume
+						  "Clover_EC",       //its name
+						  world,         //its mother
+						  true,               //no boolean operat
+						  det*4,                  //copy number
+						  true);              //overlap check
+    
+    //physiVacuum_CloverLR[det] = new G4PVPlacement(0,                   //rotation
+   PVPBuffer = new G4PVPlacement(0,                   //rotation
+						  G4ThreeVector(0.*mm,0.*mm,vacuum_PosZ),
+						  logicVacuum_CloverLR[det], //its logical volume
+						  "Clover_Vac",       //its name
+						  logicEndCap_CloverLR[det], //its mother
+						  true,                //no boolean operat
+						  det*4,                   //copy number
+						  true);               //overlap check
+  }
+  
+  //Now for the placement of the leaves in each clover......
+  G4RotationMatrix* rmC;
+  G4double dPos = fGeLeaf_dX_GREAT + fGapBetweenLeaves_GREAT/2.;
+  G4double leafX;
+  G4double leafY;
+  G4double leafZ;
+  
+  //Keep track of which detectors are used
+  G4String  detName[2] = {"CloverR","CloverL"}; //Looking upstream
+  
+  for(G4int l = 0; l < 4; l++) {
+    //the rotation
+    rmC = new G4RotationMatrix;
+    rmC->set(0,0,0);
+    rmC->rotateZ(90.*degree*(4-l));
+    rmC->invert();
+    //the x-translation
+    if(l < 2) {
+      leafX = dPos;
+    } else {
+      leafX = -dPos;
     }
-
-    //define the visual attributes
-    G4VisAttributes* visAttAlCap = new G4VisAttributes( G4Colour(0.9,0.9,0.9) );
-    visAttAlCap->SetVisibility(true);
-    //visAttAlCap->SetVisibility(false);
-    visAttAlCap->SetForceWireframe(true);
-
-    G4VisAttributes* visAttGeVac = new G4VisAttributes( G4Colour(0.9,1.0,0.9) );
-    visAttGeVac->SetVisibility(true);
-    //visAttGeVac->SetVisibility(false);
-    visAttGeVac->SetForceWireframe(true);
-
-    G4VisAttributes* visAttActive = new G4VisAttributes( G4Colour(1.0,1.0,0.0) );
-    visAttActive->SetVisibility(true);
-    //visAttActive->SetVisibility(false);
-    visAttActive->SetForceWireframe(true);
-
-    G4VisAttributes* visAttPassive = new G4VisAttributes(G4Colour(0.0,1.0,1.0) );
-    visAttPassive->SetVisibility(true);
-    //visAttPassive->SetVisibility(false);
-    visAttPassive->SetForceWireframe(true);
-
-    G4VisAttributes* visAttLiContact = new G4VisAttributes(G4Colour(1.0,0.0,1.0) );
-    visAttLiContact->SetVisibility(true);
-    //visAttLiContact->SetVisibility(false);
-
-    G4VisAttributes* visAttHole = new G4VisAttributes( G4Colour(0.0,0.0,1.0) );
-    visAttHole->SetVisibility(true);
-    //visAttHole->SetVisibility(false);
-
-    logicEndCap_CloverT->SetVisAttributes(visAttAlCap);
-    logicVacuum_CloverT->SetVisAttributes(visAttGeVac);
-    for(G4int l = 0; l < 4; l++) {
-      logicGeLeaf_CloverT[l]->SetVisAttributes(visAttActive);
-      logicPassivated_CloverT[l]->SetVisAttributes(visAttPassive);
-      logicContact_CloverT[l]->SetVisAttributes(visAttLiContact);
-      logicBoreHole_CloverT[l]->SetVisAttributes(visAttHole);
+    //the y-translation
+    if(l == 0 || l == 3 ) {
+      leafY = dPos;
+    } else {
+      leafY = -dPos;
     }
-  }
-
-  //------------------------------------------------------------------
-  // Clover numbering scheme : 
-  //        Left     =  0 => Crystals  0, 1, 2, 3
-  //        Right    =  4 => Crystals  4, 5, 6, 7
-  //        Top      =  8 => Crystals  8, 9,10,11
-  //        Upstream = 12 => Crystals 12,13,14,15
-  //------------------------------------------------------------------
-  //------------------------------------------------------------------
-  void Chamber::Place_GREAT_Left_and_Right(G4LogicalVolume* world)
-  {
-    //=================================================================================
-    // The positioning for boolean solids is odd :  for this det it is with respect to the Taper-part :
-    //setting the z-position as endCapTaperL/2 puts the front face at z = 0 mm
-    //=================================================================================
-    G4double endCap_PosX = fChamberW/2. + fEndCapTaperL_GREAT/2. + 3.0*mm;
-    G4double vacuum_PosZ = fVacuumPosZ_GREAT;
-    G4double geLeaf_PosZ = fGeLeafPosZ_GREAT;
-
-
-    G4RotationMatrix rm ;
-    G4double theta = 90. * deg;
-    G4double phi   =  0. * deg;
-
-
+    //the z-translation
+    leafZ = geLeaf_PosZ;
+    
+    
     //for(G4int det = prevNumber; det < numberOfClovers; det++) {
     for(G4int det = 0; det < 2; det++) {
-      logicEndCap_CloverLR[det] = new G4LogicalVolume(solidEndCap_GREAT, endCapMaterial,   "clover_EC",   0, 0, 0);
-      logicVacuum_CloverLR[det] = new G4LogicalVolume(solidVacuum_GREAT, vacuumMaterial,   "clover_Vac",  0, 0, 0);
-
-      for(G4int l = 0; l < 4; l++) {
-        logicGeLeaf_CloverLR[det][l]     = new G4LogicalVolume(solidGeLeaf_GREAT,     geMaterial,      "clover_Leaf",   0, 0, 0);
-        logicPassivated_CloverLR[det][l] = new G4LogicalVolume(solidPassivated_GREAT,    geMaterial,      "passivatedGe",  0, 0, 0); //should be Ge
-        logicContact_CloverLR[det][l]    = new G4LogicalVolume(solidContact_GREAT, contactMaterial, "inner_contact", 0, 0, 0); //should be Li
-        logicBoreHole_CloverLR[det][l]   = new G4LogicalVolume(solidBoreHole_GREAT,   vacuumMaterial,  "bore-hole",     0, 0, 0);
-      }
-
-
-      //rotation for each clover.....
-      rm.set(0,0,0);
-      phi = 180.0 * deg * det;
-      rm.rotateY(theta);
-      rm.rotateX(phi);
-      rm.invert();
-
-      //traslate position: the centre of the DSSD has been placed @ Y = 0.0*mm
-      G4ThreeVector translation(-endCap_PosX*sin(theta)*cos(phi),
-          endCap_PosX*sin(theta)*sin(phi) + 0.0*mm, //fDSSD_PosY,
-          0.0*mm);
-
-      G4cout << "Clover " << det << " x " << -endCap_PosX*sin(theta)*cos(phi) << G4endl;
-
-      //Physical placement of these solids......
-      //physiEndCap_CloverLR[det] = new G4PVPlacement(G4Transform3D(rm, translation),
-      PVPBuffer = new G4PVPlacement(G4Transform3D(rm, translation),
-          logicEndCap_CloverLR[det],//its logical volume
-          "Clover_EC",       //its name
-          world,         //its mother
-          true,               //no boolean operat
-          det*4,                  //copy number
-          true);              //overlap check
+      //physiGeLeaf_CloverLR[det][l] = new G4PVPlacement(rmC,                       //rotation
+      PVPBuffer = new G4PVPlacement(rmC,                       //rotation
+						       G4ThreeVector(leafX,leafY,geLeaf_PosZ),
+						       logicGeLeaf_CloverLR[det][l], //its logical volume
+						       "Clover",//detName[det].data(),          //its name
+						       logicVacuum_CloverLR[det],    //its mother
+						       true,                       //no boolean operat
+						       det*4+l,                        //copy number
+						       true);                      //overlap check
 
-      //physiVacuum_CloverLR[det] = new G4PVPlacement(0,                   //rotation
+      //physiPassivated_CloverLR[det][l] = new G4PVPlacement(0,                   //rotation
+      PVPBuffer = new G4PVPlacement(0,                   //rotation
+							   G4ThreeVector(-fHole_dX_PhaseII, -fHole_dY_PhaseII, fContact_dZ_GREAT),
+							   logicPassivated_CloverLR[det][l],
+							   "GePassivated",
+							   logicGeLeaf_CloverLR[det][l],
+							   false,det*4+l,true);
+      
+      //physiContact_CloverLR[det][l] = new G4PVPlacement(0,                   //rotation
+      PVPBuffer = new G4PVPlacement(0,                   //rotation
+							G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_GREAT),
+							logicContact_CloverLR[det][l],
+							"LiContact",
+							logicPassivated_CloverLR[det][l],
+							false,det*4+l,true);
+      
+      //physiBoreHole_CloverLR[det][l] = new G4PVPlacement(0,                   //rotation
       PVPBuffer = new G4PVPlacement(0,                   //rotation
-          G4ThreeVector(0.*mm,0.*mm,vacuum_PosZ),
-          logicVacuum_CloverLR[det], //its logical volume
-          "Clover_Vac",       //its name
-          logicEndCap_CloverLR[det], //its mother
-          true,                //no boolean operat
-          det*4,                   //copy number
-          true);               //overlap check
+							 G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_GREAT),
+							 logicBoreHole_CloverLR[det][l],
+							 "BoreHole",
+							 logicContact_CloverLR[det][l],
+							 false,det*4+l,true);
+      
     }
+  }
 
-    //Now for the placement of the leaves in each clover......
-    G4RotationMatrix* rmC;
-    G4double dPos = fGeLeaf_dX_GREAT + fGapBetweenLeaves_GREAT/2.;
-    G4double leafX;
-    G4double leafY;
-    //G4double leafZ;
-
-    //Keep track of which detectors are used
-    //G4String  detName[2] = {"CloverR","CloverL"}; //Looking upstream
-
+  //define the visual attributes
+  G4VisAttributes* visAttAlCap = new G4VisAttributes( G4Colour(0.9,0.9,0.9) );
+  visAttAlCap->SetVisibility(true);
+  visAttAlCap->SetForceWireframe(true);
+  
+  G4VisAttributes* visAttGeVac = new G4VisAttributes( G4Colour(0.9,1.0,0.9) );
+  visAttGeVac->SetForceWireframe(true);
+  visAttGeVac->SetVisibility(true);
+  
+  G4VisAttributes* visAttActive = new G4VisAttributes( G4Colour(1.0,1.0,0.0) );
+  visAttActive->SetForceWireframe(true);
+  visAttActive->SetVisibility(true);
+  
+  G4VisAttributes* visAttPassive = new G4VisAttributes(G4Colour(0.0,1.0,1.0) );
+  visAttPassive->SetForceWireframe(true);
+  visAttPassive->SetVisibility(true);
+  
+  G4VisAttributes* visAttLiContact = new G4VisAttributes(G4Colour(1.0,0.0,1.0) );
+  visAttLiContact->SetVisibility(true);
+  
+  G4VisAttributes* visAttHole = new G4VisAttributes( G4Colour(0.0,0.0,1.0) );
+  visAttHole->SetVisibility(true);
+  
+  for(G4int det = 0; det < 2; det++) {
+    logicEndCap_CloverLR[det]->SetVisAttributes(visAttAlCap);
+    logicVacuum_CloverLR[det]->SetVisAttributes(visAttGeVac);
     for(G4int l = 0; l < 4; l++) {
-      //the rotation
-      rmC = new G4RotationMatrix;
-      rmC->set(0,0,0);
-      rmC->rotateZ(90.*degree*(4-l));
-      rmC->invert();
-      //the x-translation
-      if(l < 2) {
-        leafX = dPos;
-      } else {
-        leafX = -dPos;
-      }
-      //the y-translation
-      if(l == 0 || l == 3 ) {
-        leafY = dPos;
-      } else {
-        leafY = -dPos;
-      }
-      //the z-translation
-      //leafZ = geLeaf_PosZ;
-
-
-      //for(G4int det = prevNumber; det < numberOfClovers; det++) {
-      for(G4int det = 0; det < 2; det++) {
-        //physiGeLeaf_CloverLR[det][l] = new G4PVPlacement(rmC,                       //rotation
-        PVPBuffer = new G4PVPlacement(rmC,                       //rotation
-            G4ThreeVector(leafX,leafY,geLeaf_PosZ),
-            logicGeLeaf_CloverLR[det][l], //its logical volume
-            "Clover",//detName[det].data(),          //its name
-            logicVacuum_CloverLR[det],    //its mother
-            true,                       //no boolean operat
-            det*4+l,                        //copy number
-            true);                      //overlap check
-
-        //physiPassivated_CloverLR[det][l] = new G4PVPlacement(0,                   //rotation
-        PVPBuffer = new G4PVPlacement(0,                   //rotation
-            G4ThreeVector(-fHole_dX_PhaseII, -fHole_dY_PhaseII, fContact_dZ_GREAT),
-            logicPassivated_CloverLR[det][l],
-            "GePassivated",
-            logicGeLeaf_CloverLR[det][l],
-            false,det*4+l,true);
-
-        //physiContact_CloverLR[det][l] = new G4PVPlacement(0,                   //rotation
-        PVPBuffer = new G4PVPlacement(0,                   //rotation
-            G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_GREAT),
-                  logicContact_CloverLR[det][l],
-                  "LiContact",
-                  logicPassivated_CloverLR[det][l],
-                  false,det*4+l,true);
-
-                  //physiBoreHole_CloverLR[det][l] = new G4PVPlacement(0,                   //rotation
-                  PVPBuffer = new G4PVPlacement(0,                   //rotation
-                      G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_GREAT),
-                            logicBoreHole_CloverLR[det][l],
-                            "BoreHole",
-                            logicContact_CloverLR[det][l],
-                            false,det*4+l,true);
-
-      }
+      logicGeLeaf_CloverLR[det][l]->SetVisAttributes(visAttActive);
+      logicPassivated_CloverLR[det][l]->SetVisAttributes(visAttPassive);
+      logicContact_CloverLR[det][l]->SetVisAttributes(visAttLiContact);
+      logicBoreHole_CloverLR[det][l]->SetVisAttributes(visAttHole);
     }
+  }
+}
 
-    //define the visual attributes
-    G4VisAttributes* visAttAlCap = new G4VisAttributes( G4Colour(0.9,0.9,0.9) );
-    visAttAlCap->SetVisibility(true);
-    visAttAlCap->SetForceWireframe(true);
-
-    G4VisAttributes* visAttGeVac = new G4VisAttributes( G4Colour(0.9,1.0,0.9) );
-    visAttGeVac->SetForceWireframe(true);
-    visAttGeVac->SetVisibility(true);
-
-    G4VisAttributes* visAttActive = new G4VisAttributes( G4Colour(1.0,1.0,0.0) );
-    visAttActive->SetForceWireframe(true);
-    visAttActive->SetVisibility(true);
 
-    G4VisAttributes* visAttPassive = new G4VisAttributes(G4Colour(0.0,1.0,1.0) );
-    visAttPassive->SetForceWireframe(true);
-    visAttPassive->SetVisibility(true);
 
-    G4VisAttributes* visAttLiContact = new G4VisAttributes(G4Colour(1.0,0.0,1.0) );
-    visAttLiContact->SetVisibility(true);
+//------------------------------------------------------------------
+void Chamber::Place_PhaseII_LookingUpstream(G4LogicalVolume* world)
+{
+  //=================================================================================
+  // The positioning for boolean solids is odd :  for this det it is with respect to the Taper-part :
+  //setting the z-position as endCapTaperL/2 puts the front face at z = 0 mm
+  //=================================================================================
+  G4double endCap_PosZ = fEndCapTaperL_PhaseII/2. + 3.0*mm;
+  G4double vacuum_PosZ = fVacuumPosZ_PhaseII;
+  G4double geLeaf_PosZ = fGeLeafPosZ_PhaseII;
+  
+  logicEndCap_CloverU = new G4LogicalVolume(solidEndCap_PhaseII, endCapMaterial,   "clover_EC",   0, 0, 0);
+  logicVacuum_CloverU = new G4LogicalVolume(solidVacuum_PhaseII, vacuumMaterial,   "clover_Vac",  0, 0, 0);
+    
+  for(G4int l = 0; l < 4; l++) {
+    logicGeLeaf_CloverU[l]     = new G4LogicalVolume(solidGeLeaf_PhaseII,     geMaterial,      "clover_Leaf",   0, 0, 0);
+    logicPassivated_CloverU[l] = new G4LogicalVolume(solidPassivated_PhaseII, geMaterial,      "passivatedGe",  0, 0, 0);
+    logicContact_CloverU[l]    = new G4LogicalVolume(solidContact_PhaseII,    contactMaterial, "inner_contact", 0, 0, 0);
+    logicBoreHole_CloverU[l]   = new G4LogicalVolume(solidBoreHole_PhaseII,   vacuumMaterial,  "bore_hole",     0, 0, 0);
+  }
 
-    G4VisAttributes* visAttHole = new G4VisAttributes( G4Colour(0.0,0.0,1.0) );
-    visAttHole->SetVisibility(true);
+  //Physical placement of these solids......
+  //traslate position: the centre of the DSSD has been placed @ Y = 0.0*mm
+  //physiEndCap_CloverU = new G4PVPlacement(0, //no rotation
+  PVPBuffer = new G4PVPlacement(0, //no rotation
+					  G4ThreeVector(0.*mm, 0.0*mm, endCap_PosZ),
+					  logicEndCap_CloverU,//its logical volume
+					  "Clover_EC",       //its name
+					  world,         //its mother
+					  true,               //no boolean operat
+					  12,                  //copy number
+					  true);              //overlap check
+  
+  //physiVacuum_CloverU = new G4PVPlacement(0,                   //rotation
+  PVPBuffer = new G4PVPlacement(0,                   //rotation
+					  G4ThreeVector(0.*mm,0.*mm,vacuum_PosZ),
+					  logicVacuum_CloverU, //its logical volume
+					  "Clover_Vac",       //its name
+					  logicEndCap_CloverU, //its mother
+					  true,                //no boolean operat
+					  12,                   //copy number
+					  true);               //overlap check
 
-    for(G4int det = 0; det < 2; det++) {
-      logicEndCap_CloverLR[det]->SetVisAttributes(visAttAlCap);
-      logicVacuum_CloverLR[det]->SetVisAttributes(visAttGeVac);
-      for(G4int l = 0; l < 4; l++) {
-        logicGeLeaf_CloverLR[det][l]->SetVisAttributes(visAttActive);
-        logicPassivated_CloverLR[det][l]->SetVisAttributes(visAttPassive);
-        logicContact_CloverLR[det][l]->SetVisAttributes(visAttLiContact);
-        logicBoreHole_CloverLR[det][l]->SetVisAttributes(visAttHole);
-      }
-    }
+  //Now for the placement of the leaves in each clover......
+  G4RotationMatrix* rmC;
+  G4double dPos = fGeLeaf_dX_PhaseII + fGapBetweenLeaves_PhaseII/2.;
+  G4double leafX;
+  G4double leafY;
+  G4double leafZ;
+  
+  for(G4int l = 0; l < 4; l++) {
+    //the rotation
+    rmC = new G4RotationMatrix;
+    rmC->set(0,0,0);
+    rmC->rotateZ(90.*degree*(4-l));
+    rmC->invert();
+    //the x-translation
+    if(l < 2) {
+      leafX = dPos;
+    } else {
+      leafX = -dPos;
     }
-
-
-
-    //------------------------------------------------------------------
-    void Chamber::Place_PhaseII_LookingUpstream(G4LogicalVolume* world)
-    {
-      //=================================================================================
-      // The positioning for boolean solids is odd :  for this det it is with respect to the Taper-part :
-      //setting the z-position as endCapTaperL/2 puts the front face at z = 0 mm
-      //=================================================================================
-      G4double endCap_PosZ = fEndCapTaperL_PhaseII/2. + 3.0*mm;
-      G4double vacuum_PosZ = fVacuumPosZ_PhaseII;
-      G4double geLeaf_PosZ = fGeLeafPosZ_PhaseII;
-
-      logicEndCap_CloverU = new G4LogicalVolume(solidEndCap_PhaseII, endCapMaterial,   "clover_EC",   0, 0, 0);
-      logicVacuum_CloverU = new G4LogicalVolume(solidVacuum_PhaseII, vacuumMaterial,   "clover_Vac",  0, 0, 0);
-
-      for(G4int l = 0; l < 4; l++) {
-        logicGeLeaf_CloverU[l]     = new G4LogicalVolume(solidGeLeaf_PhaseII,     geMaterial,      "clover_Leaf",   0, 0, 0);
-        logicPassivated_CloverU[l] = new G4LogicalVolume(solidPassivated_PhaseII, geMaterial,      "passivatedGe",  0, 0, 0);
-        logicContact_CloverU[l]    = new G4LogicalVolume(solidContact_PhaseII,    contactMaterial, "inner_contact", 0, 0, 0);
-        logicBoreHole_CloverU[l]   = new G4LogicalVolume(solidBoreHole_PhaseII,   vacuumMaterial,  "bore_hole",     0, 0, 0);
-      }
-
-      //Physical placement of these solids......
-      //traslate position: the centre of the DSSD has been placed @ Y = 0.0*mm
-      //physiEndCap_CloverU = new G4PVPlacement(0, //no rotation
-      PVPBuffer = new G4PVPlacement(0, //no rotation
-          G4ThreeVector(0.*mm, 0.0*mm, endCap_PosZ),
-          logicEndCap_CloverU,//its logical volume
-          "Clover_EC",       //its name
-          world,         //its mother
-          true,               //no boolean operat
-          12,                  //copy number
-          true);              //overlap check
-
-      //physiVacuum_CloverU = new G4PVPlacement(0,                   //rotation
-      PVPBuffer = new G4PVPlacement(0,                   //rotation
-          G4ThreeVector(0.*mm,0.*mm,vacuum_PosZ),
-          logicVacuum_CloverU, //its logical volume
-          "Clover_Vac",       //its name
-          logicEndCap_CloverU, //its mother
-          true,                //no boolean operat
-          12,                   //copy number
-          true);               //overlap check
-
-      //Now for the placement of the leaves in each clover......
-      G4RotationMatrix* rmC;
-      G4double dPos = fGeLeaf_dX_PhaseII + fGapBetweenLeaves_PhaseII/2.;
-      G4double leafX;
-      G4double leafY;
-      G4double leafZ;
-
-      for(G4int l = 0; l < 4; l++) {
-        //the rotation
-        rmC = new G4RotationMatrix;
-        rmC->set(0,0,0);
-        rmC->rotateZ(90.*degree*(4-l));
-        rmC->invert();
-        //the x-translation
-        if(l < 2) {
-          leafX = dPos;
-        } else {
-          leafX = -dPos;
-        }
-        //the y-translation
-        if(l == 0 || l == 3 ) {
-          leafY = dPos;
-        } else {
-          leafY = -dPos;
-        }
-        //the z-translation
-        leafZ = geLeaf_PosZ;
-
-
-        //physiGeLeaf_CloverU[l] = new G4PVPlacement(rmC,                       //rotation
-        PVPBuffer = new G4PVPlacement(rmC,                       //rotation
-            G4ThreeVector(leafX, leafY, leafZ),
-            logicGeLeaf_CloverU[l],     //its logical volume
-            "Clover",                 //its name
-            logicVacuum_CloverU,        //its mother
-            true,                       //no boolean operat
-            12+l,                        //copy number
-            true);                      //overlap check
-
-        //physiPassivated_CloverU[l] = new G4PVPlacement(0,                   //rotation
-        PVPBuffer = new G4PVPlacement(0,                   //rotation
-            G4ThreeVector(-fHole_dX_PhaseII, -fHole_dY_PhaseII, fContact_dZ_PhaseII),
-            logicPassivated_CloverU[l],
-            "GePassivated",
-            logicGeLeaf_CloverU[l],
-            false,12+l,true);
-
-        //physiContact_CloverU[l] = new G4PVPlacement(0,                   //rotation
-        PVPBuffer = new G4PVPlacement(0,                   //rotation
-            G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_GREAT),
-                  logicContact_CloverU[l],
-                  "LiContact",
-                  logicPassivated_CloverU[l],
-                  false,12+l,true);
-
-                  //physiBoreHole_CloverU[l] = new G4PVPlacement(0,                   //rotation
-                  PVPBuffer = new G4PVPlacement(0,                   //rotation
-                      G4ThreeVector(0.*mm,0.*mm, 0.0*mm),
-                      logicBoreHole_CloverU[l],
-                      "BoreHole",
-                      logicContact_CloverU[l],
-                      false,12+l,true);
-
-      }
-
-      //define the visual attributes
-      G4VisAttributes* visAttAlCap = new G4VisAttributes( G4Colour(0.9,0.9,0.9) );
-      visAttAlCap->SetVisibility(true);
-      visAttAlCap->SetForceWireframe(true);
-
-      G4VisAttributes* visAttGeVac = new G4VisAttributes( G4Colour(0.9,1.0,0.9) );
-      visAttGeVac->SetForceWireframe(true);
-      visAttGeVac->SetVisibility(true);
-
-      G4VisAttributes* visAttActive = new G4VisAttributes( G4Colour(1.0,1.0,0.0) );
-      visAttActive->SetForceWireframe(true);
-      visAttActive->SetVisibility(true);
-
-      G4VisAttributes* visAttPassive = new G4VisAttributes(G4Colour(0.0,1.0,1.0) );
-      visAttPassive->SetForceWireframe(true);
-      visAttPassive->SetVisibility(true);
-
-      G4VisAttributes* visAttLiContact = new G4VisAttributes(G4Colour(1.0,0.0,1.0) );
-      visAttLiContact->SetVisibility(true);
-
-      G4VisAttributes* visAttHole = new G4VisAttributes( G4Colour(0.0,0.0,1.0) );
-      visAttHole->SetVisibility(true);
-
-      logicEndCap_CloverU->SetVisAttributes(visAttAlCap);
-      logicVacuum_CloverU->SetVisAttributes(visAttGeVac);
-      for(G4int l = 0; l < 4; l++) {
-        logicGeLeaf_CloverU[l]->SetVisAttributes(visAttActive);
-        logicPassivated_CloverU[l]->SetVisAttributes(visAttPassive);
-        logicContact_CloverU[l]->SetVisAttributes(visAttLiContact);
-        logicBoreHole_CloverU[l]->SetVisAttributes(visAttHole);
-      }
+    //the y-translation
+    if(l == 0 || l == 3 ) {
+      leafY = dPos;
+    } else {
+      leafY = -dPos;
     }
+    //the z-translation
+    leafZ = geLeaf_PosZ;
+    
+    
+    //physiGeLeaf_CloverU[l] = new G4PVPlacement(rmC,                       //rotation
+    PVPBuffer = new G4PVPlacement(rmC,                       //rotation
+					       G4ThreeVector(leafX, leafY, leafZ),
+					       logicGeLeaf_CloverU[l],     //its logical volume
+					       "Clover",                 //its name
+					       logicVacuum_CloverU,        //its mother
+					       true,                       //no boolean operat
+					       12+l,                        //copy number
+					       true);                      //overlap check
+    
+    //physiPassivated_CloverU[l] = new G4PVPlacement(0,                   //rotation
+    PVPBuffer = new G4PVPlacement(0,                   //rotation
+						   G4ThreeVector(-fHole_dX_PhaseII, -fHole_dY_PhaseII, fContact_dZ_PhaseII),
+						   logicPassivated_CloverU[l],
+						   "GePassivated",
+						   logicGeLeaf_CloverU[l],
+						   false,12+l,true);
+    
+    //physiContact_CloverU[l] = new G4PVPlacement(0,                   //rotation
+    PVPBuffer = new G4PVPlacement(0,                   //rotation
+						G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_GREAT),
+						logicContact_CloverU[l],
+						"LiContact",
+						logicPassivated_CloverU[l],
+						false,12+l,true);
+    
+    //physiBoreHole_CloverU[l] = new G4PVPlacement(0,                   //rotation
+    PVPBuffer = new G4PVPlacement(0,                   //rotation
+						 G4ThreeVector(0.*mm,0.*mm, 0.0*mm),
+						 logicBoreHole_CloverU[l],
+						 "BoreHole",
+						 logicContact_CloverU[l],
+						 false,12+l,true);
+    
+  }
 
-    //------------------------------------------------------------------
-    // This is just as a comparison with the current position
-    //------------------------------------------------------------------
-    void Chamber::Place_GREAT_LookingUpstream(G4LogicalVolume* world)
-    {
-      //=================================================================================
-      // The positioning for boolean solids is odd :  for this det it is with respect to the Taper-part :
-      //setting the z-position as endCapTaperL/2 puts the front face at z = 0 mm
-      //=================================================================================
-      G4double endCap_PosZ = fEndCapTaperL_GREAT/2. + 3.0*mm;
-      G4double vacuum_PosZ = fVacuumPosZ_GREAT;
-      G4double geLeaf_PosZ = fGeLeafPosZ_GREAT;
-
-      logicEndCap_CloverU = new G4LogicalVolume(solidEndCap_GREAT, endCapMaterial,   "clover_EC",   0, 0, 0);
-      logicVacuum_CloverU = new G4LogicalVolume(solidVacuum_GREAT, vacuumMaterial,   "clover_Vac",  0, 0, 0);
-
-      for(G4int l = 0; l < 4; l++) {
-        logicGeLeaf_CloverU[l]     = new G4LogicalVolume(solidGeLeaf_GREAT,     geMaterial,      "clover_Leaf",   0, 0, 0);
-        logicPassivated_CloverU[l] = new G4LogicalVolume(solidPassivated_GREAT, geMaterial,      "passivatedGe",  0, 0, 0);
-        logicContact_CloverU[l]    = new G4LogicalVolume(solidContact_GREAT,    contactMaterial, "inner_contact", 0, 0, 0);
-        logicBoreHole_CloverU[l]   = new G4LogicalVolume(solidBoreHole_GREAT,   vacuumMaterial,  "bore_hole",     0, 0, 0);
-      }
-
-      //Physical placement of these solids......
-      //traslate position: the centre of the DSSD has been placed @ Y = 0.0*mm
-      //physiEndCap_CloverU = new G4PVPlacement(0, //no rotation
-      PVPBuffer = new G4PVPlacement(0, //no rotation
-          G4ThreeVector(0.*mm, 0.0*mm, endCap_PosZ),
-          logicEndCap_CloverU,//its logical volume
-          "Clover_EC",       //its name
-          world,         //its mother
-          true,               //no boolean operat
-          12,                  //copy number
-          true);              //overlap check
-
-      //physiVacuum_CloverU = new G4PVPlacement(0,                   //rotation
-      PVPBuffer = new G4PVPlacement(0,                   //rotation
-          G4ThreeVector(0.*mm,0.*mm,vacuum_PosZ),
-          logicVacuum_CloverU, //its logical volume
-          "Clover_Vac",       //its name
-          logicEndCap_CloverU, //its mother
-          true,                //no boolean operat
-          12,                   //copy number
-          true);               //overlap check
-
-      //Now for the placement of the leaves in each clover......
-      G4RotationMatrix* rmC;
-      G4double dPos = fGeLeaf_dX_GREAT + fGapBetweenLeaves_GREAT/2.;
-      G4double leafX;
-      G4double leafY;
-      G4double leafZ;
-
-      for(G4int l = 0; l < 4; l++) {
-        //the rotation
-        rmC = new G4RotationMatrix;
-        rmC->set(0,0,0);
-        rmC->rotateZ(90.*degree*(4-l));
-        rmC->invert();
-        //the x-translation
-        if(l < 2) {
-          leafX = dPos;
-        } else {
-          leafX = -dPos;
-        }
-        //the y-translation
-        if(l == 0 || l == 3 ) {
-          leafY = dPos;
-        } else {
-          leafY = -dPos;
-        }
-        //the z-translation
-        leafZ = geLeaf_PosZ;
-
-
-        //physiGeLeaf_CloverU[l] = new G4PVPlacement(rmC,                       //rotation
-        PVPBuffer = new G4PVPlacement(rmC,                       //rotation
-            G4ThreeVector(leafX, leafY, leafZ),
-            logicGeLeaf_CloverU[l],     //its logical volume
-            "Clover",                 //its name
-            logicVacuum_CloverU,        //its mother
-            true,                       //no boolean operat
-            12+l,                        //copy number
-            true);                      //overlap check
-
-        //physiPassivated_CloverU[l] = new G4PVPlacement(0,                   //rotation
-        PVPBuffer = new G4PVPlacement(0,                   //rotation
-            G4ThreeVector(fHole_dX_GREAT, fHole_dY_GREAT, fContact_dZ_GREAT),
-            logicPassivated_CloverU[l],
-            "GePassivated",
-            logicGeLeaf_CloverU[l],
-            false,12+l,true);
-
-        //physiContact_CloverU[l] = new G4PVPlacement(0,                   //rotation
-        PVPBuffer = new G4PVPlacement(0,                   //rotation
-            G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_GREAT),
-                  logicContact_CloverU[l],
-                  "LiContact",
-                  logicPassivated_CloverU[l],
-                  false,12+l,true);
-
-                  //physiBoreHole_CloverU[l] = new G4PVPlacement(0,                   //rotation
-                  PVPBuffer = new G4PVPlacement(0,                   //rotation
-                      G4ThreeVector(0.*mm,0.*mm, 0.0*mm),
-                      logicBoreHole_CloverU[l],
-                      "BoreHole",
-                      logicContact_CloverU[l],
-                      false,12+l,true);
-
-      }
-
-      //define the visual attributes
-      G4VisAttributes* visAttAlCap = new G4VisAttributes( G4Colour(0.9,0.9,0.9) );
-      visAttAlCap->SetVisibility(true);
-      visAttAlCap->SetForceWireframe(true);
-
-      G4VisAttributes* visAttGeVac = new G4VisAttributes( G4Colour(0.9,1.0,0.9) );
-      visAttGeVac->SetForceWireframe(true);
-      visAttGeVac->SetVisibility(true);
-
-      G4VisAttributes* visAttActive = new G4VisAttributes( G4Colour(1.0,1.0,0.0) );
-      visAttActive->SetForceWireframe(true);
-      visAttActive->SetVisibility(true);
-
-      G4VisAttributes* visAttPassive = new G4VisAttributes(G4Colour(0.0,1.0,1.0) );
-      visAttPassive->SetForceWireframe(true);
-      visAttPassive->SetVisibility(true);
+  //define the visual attributes
+  G4VisAttributes* visAttAlCap = new G4VisAttributes( G4Colour(0.9,0.9,0.9) );
+  visAttAlCap->SetVisibility(true);
+  visAttAlCap->SetForceWireframe(true);
+  
+  G4VisAttributes* visAttGeVac = new G4VisAttributes( G4Colour(0.9,1.0,0.9) );
+  visAttGeVac->SetForceWireframe(true);
+  visAttGeVac->SetVisibility(true);
+  
+  G4VisAttributes* visAttActive = new G4VisAttributes( G4Colour(1.0,1.0,0.0) );
+  visAttActive->SetForceWireframe(true);
+  visAttActive->SetVisibility(true);
+  
+  G4VisAttributes* visAttPassive = new G4VisAttributes(G4Colour(0.0,1.0,1.0) );
+  visAttPassive->SetForceWireframe(true);
+  visAttPassive->SetVisibility(true);
+  
+  G4VisAttributes* visAttLiContact = new G4VisAttributes(G4Colour(1.0,0.0,1.0) );
+  visAttLiContact->SetVisibility(true);
+  
+  G4VisAttributes* visAttHole = new G4VisAttributes( G4Colour(0.0,0.0,1.0) );
+  visAttHole->SetVisibility(true);
+  
+  logicEndCap_CloverU->SetVisAttributes(visAttAlCap);
+  logicVacuum_CloverU->SetVisAttributes(visAttGeVac);
+  for(G4int l = 0; l < 4; l++) {
+    logicGeLeaf_CloverU[l]->SetVisAttributes(visAttActive);
+    logicPassivated_CloverU[l]->SetVisAttributes(visAttPassive);
+    logicContact_CloverU[l]->SetVisAttributes(visAttLiContact);
+    logicBoreHole_CloverU[l]->SetVisAttributes(visAttHole);
+  }
+}
 
-      G4VisAttributes* visAttLiContact = new G4VisAttributes(G4Colour(1.0,0.0,1.0) );
-      visAttLiContact->SetVisibility(true);
+//------------------------------------------------------------------
+// This is just as a comparison with the current position
+//------------------------------------------------------------------
+void Chamber::Place_GREAT_LookingUpstream(G4LogicalVolume* world)
+{
+  //=================================================================================
+  // The positioning for boolean solids is odd :  for this det it is with respect to the Taper-part :
+  //setting the z-position as endCapTaperL/2 puts the front face at z = 0 mm
+  //=================================================================================
+  G4double endCap_PosZ = fEndCapTaperL_GREAT/2. + 3.0*mm;
+  G4double vacuum_PosZ = fVacuumPosZ_GREAT;
+  G4double geLeaf_PosZ = fGeLeafPosZ_GREAT;
+  
+  logicEndCap_CloverU = new G4LogicalVolume(solidEndCap_GREAT, endCapMaterial,   "clover_EC",   0, 0, 0);
+  logicVacuum_CloverU = new G4LogicalVolume(solidVacuum_GREAT, vacuumMaterial,   "clover_Vac",  0, 0, 0);
+    
+  for(G4int l = 0; l < 4; l++) {
+    logicGeLeaf_CloverU[l]     = new G4LogicalVolume(solidGeLeaf_GREAT,     geMaterial,      "clover_Leaf",   0, 0, 0);
+    logicPassivated_CloverU[l] = new G4LogicalVolume(solidPassivated_GREAT, geMaterial,      "passivatedGe",  0, 0, 0);
+    logicContact_CloverU[l]    = new G4LogicalVolume(solidContact_GREAT,    contactMaterial, "inner_contact", 0, 0, 0);
+    logicBoreHole_CloverU[l]   = new G4LogicalVolume(solidBoreHole_GREAT,   vacuumMaterial,  "bore_hole",     0, 0, 0);
+  }
 
-      G4VisAttributes* visAttHole = new G4VisAttributes( G4Colour(0.0,0.0,1.0) );
-      visAttHole->SetVisibility(true);
+  //Physical placement of these solids......
+  //traslate position: the centre of the DSSD has been placed @ Y = 0.0*mm
+  //physiEndCap_CloverU = new G4PVPlacement(0, //no rotation
+  PVPBuffer = new G4PVPlacement(0, //no rotation
+					  G4ThreeVector(0.*mm, 0.0*mm, endCap_PosZ),
+					  logicEndCap_CloverU,//its logical volume
+					  "Clover_EC",       //its name
+					  world,         //its mother
+					  true,               //no boolean operat
+					  12,                  //copy number
+					  true);              //overlap check
+  
+  //physiVacuum_CloverU = new G4PVPlacement(0,                   //rotation
+  PVPBuffer = new G4PVPlacement(0,                   //rotation
+					  G4ThreeVector(0.*mm,0.*mm,vacuum_PosZ),
+					  logicVacuum_CloverU, //its logical volume
+					  "Clover_Vac",       //its name
+					  logicEndCap_CloverU, //its mother
+					  true,                //no boolean operat
+					  12,                   //copy number
+					  true);               //overlap check
 
-      logicEndCap_CloverU->SetVisAttributes(visAttAlCap);
-      logicVacuum_CloverU->SetVisAttributes(visAttGeVac);
-      for(G4int l = 0; l < 4; l++) {
-        logicGeLeaf_CloverU[l]->SetVisAttributes(visAttActive);
-        logicPassivated_CloverU[l]->SetVisAttributes(visAttPassive);
-        logicContact_CloverU[l]->SetVisAttributes(visAttLiContact);
-        logicBoreHole_CloverU[l]->SetVisAttributes(visAttHole);
-      }
+  //Now for the placement of the leaves in each clover......
+  G4RotationMatrix* rmC;
+  G4double dPos = fGeLeaf_dX_GREAT + fGapBetweenLeaves_GREAT/2.;
+  G4double leafX;
+  G4double leafY;
+  G4double leafZ;
+  
+  for(G4int l = 0; l < 4; l++) {
+    //the rotation
+    rmC = new G4RotationMatrix;
+    rmC->set(0,0,0);
+    rmC->rotateZ(90.*degree*(4-l));
+    rmC->invert();
+    //the x-translation
+    if(l < 2) {
+      leafX = dPos;
+    } else {
+      leafX = -dPos;
     }
-
-    //---------------------------------------------------------------------
-    // Create the solids defining Phase-II Clovers
-    //---------------------------------------------------------------------
-    void  Chamber::CreateCloverIISolids()
-    {
-      //An approximate CloverII
-      G4cout << G4endl << "Constructing archetypal PhaseII Clover" << G4endl;
-
-      //---------------------------------------------------------
-      //end-cap
-      G4double endCapFrontThickness = 1.2*mm; //was 1.5
-      G4double endCapTaperThickness = 1.5*mm;
-      G4double endCapSideThickness  = 1.5*mm;
-
-      G4double GeGap      =  fEndCap2Ge_PhaseII;
-      G4double taperAngle =  7.0*degree;
-
-      G4double endCapTotalL = fTotalGeL_PhaseII + GeGap + endCapFrontThickness + 5.*mm; //+ Gap at rear end
-      G4double endCapFrontD = 43.5*mm;
-      G4double endCapBackD  = 50.5*mm;
-      G4double endCapTaperL = 55.0*mm;
-
-      G4double endCapBoxL   = endCapTotalL - endCapTaperL;
-
-      //the tapered part
-      G4Trap* solidTaperedCloverEC
-        = new G4Trap("taperedCloverEC",
-            endCapTaperL/2.,    //Half z-length [pDz]
-            0.00*degree, //Polar angle of line joining centres of the faces @ -/+pDz
-            14.0*degree,   //aequivalent zimuthal angle 
-            endCapFrontD,    //pDy1 half y length at -pDz
-            endCapFrontD,    //pDx1 half x length at -pDz, -pDy1
-            endCapFrontD,    //pDx2 half x length at -pDz, +pDy1
-            0.00*degree,//pAlpha1 wrt y-axis from the centre of the side (lower endcap)
-            endCapBackD,    //pDy2 half y length at +pDz
-            endCapBackD,    //pDx3 half x length at +pDz, -pDy2
-            endCapBackD,    //pDx4 half x length at +pDz, +pDy2
-            0.00*degree); //pAlpha2 wrt y-axis from the centre of the side (upper endcap)
-
-      //the rectangular part.....
-      G4Box*        endCapBox  = new G4Box("endCapBox",endCapBackD,endCapBackD,endCapBoxL/2.);
-      G4ThreeVector transECBox(   0.*mm, 0.*mm, endCapTaperL/2.+endCapBoxL/2.);
-
-      //add the two together
-      solidEndCap_PhaseII = new G4UnionSolid("Box+Taper",solidTaperedCloverEC,endCapBox,0,transECBox);
-      //need the taperL for placement
-      fEndCapTaperL_PhaseII = endCapTaperL;
-
-
-      //---------------------------------------------------------
-      //end-cap inner vacuum
-      G4double endCapDelta_1 = endCapTaperThickness/cos(taperAngle) - endCapFrontThickness*tan(taperAngle);
-      G4double endCapDelta_2 = ( endCapSideThickness - (endCapTaperThickness*sin(taperAngle)*tan(taperAngle) +
-            endCapTaperThickness*cos(taperAngle) ) )/tan(taperAngle);
-
-      G4cout << endCapDelta_1 << " " << endCapDelta_2 << endl;
-
-      G4double endCapVacTaperL = endCapTaperL - endCapFrontThickness;// - endCapDelta_2;
-      G4double endCapVacBoxL   = endCapBoxL   - endCapFrontThickness;
-      G4double endCapVacTotalL = endCapVacBoxL + endCapVacTaperL;
-      G4double endCapVacFrontD = endCapFrontD - endCapDelta_1;
-      G4double endCapVacBackD  = endCapBackD  - endCapSideThickness;
-
-      //position of vacuum wrt end-cap
-      fVacuumPosZ_PhaseII = (-endCapTotalL + endCapVacTotalL )/2. + 1.5*endCapFrontThickness;
-
-      //tapered part...
-      G4Trap* solidTaperVac
-        = new G4Trap("cloverTaperVac",
-            endCapVacTaperL/2.,    //Half z-length [pDz]
-            0.00*degree, //Polar angle of line joining centres of the faces @ -/+pDz
-            14.0*degree,   //aequivalent zimuthal angle 
-            endCapVacFrontD,    //pDy1 half y length at -pDz
-            endCapVacFrontD,    //pDx1 half x length at -pDz, -pDy1
-            endCapVacFrontD,    //pDx2 half x length at -pDz, +pDy1
-            0.00*degree,//pAlpha1 wrt y-axis from the centre of the side (lower endcap)
-            endCapVacBackD,    //pDy2 half y length at +pDz
-            endCapVacBackD,    //pDx3 half x length at +pDz, -pDy2
-            endCapVacBackD,    //pDx4 half x length at +pDz, +pDy2
-            0.00*degree); //pAlpha2 wrt y-axis from the centre of the side (upper endcap)
-
-      G4cout << endCapTotalL << " " << endCapVacTotalL << endl;
-
-      //rectangular part
-      G4Box*         endCapVacBox  = new G4Box("endCapBox",endCapVacBackD,endCapVacBackD,endCapVacBoxL/2.);
-      G4ThreeVector transVacBox(   0.*mm, 0.*mm, (endCapVacTaperL/2.+endCapVacBoxL/2.-0.0001*mm));
-
-      //add them together
-      solidVacuum_PhaseII = new G4UnionSolid("Vac_Box+Taper",solidTaperVac,endCapVacBox,0,transVacBox);
-
-
-      //---------------------------------------------------------
-      //The Ge crystal...
-      G4double GeTaperL    = 36.0*mm;
-      G4double GeTotalL    = fTotalGeL_PhaseII; //70.0 * mm;
-      G4double smallSquare = 41.0*mm; 
-      G4double largeSquare = 45.5*mm;
-
-      G4double transX = (largeSquare-smallSquare)/2.;
-      G4double transY = (largeSquare-smallSquare)/2.;
-      fHole_dX_PhaseII = transX;  //transX /= 2.;
-      fHole_dY_PhaseII = transY;  //transY /= 2.;
-
-      //tapered part......
-      G4Trap* solidTaper
-        = new G4Trap("cloverTaper",
-            GeTaperL/2.,    //Half ? z-length [pDz]
-            5.05*degree,   //Polar angle of line joining centres of the faces @ -/+pDz
-            45.*degree,   //equivalent azimuthal angle  //DOES NOT MAKE SENSE !!
-            smallSquare/2., //pDy1 half y length at -pDz
-            smallSquare/2., //pDx1 half x length at -pDz, -pDy1
-            smallSquare/2., //pDx2 half x length at -pDz, +pDy1
-            0.00*degree,//pAlpha1 wrt y-axis from the centre of the side (lower endcap)
-            largeSquare/2.,    //pDy2 half y length at +pDz
-            largeSquare/2.,    //pDx3 half x length at +pDz, -pDy2
-            largeSquare/2.,    //pDx4 half x length at +pDz, +pDy2
-            0.0*degree); //pAlpha2 wrt y-axis from the centre of the side (upper endcap)
-
-      //HERE !!
-      const G4int numZPlanesGe=4;      // no. polycone planes
-
-      G4double zPlaneGe[numZPlanesGe]; // positions of planes
-      zPlaneGe[0] =  0.00*mm;
-      zPlaneGe[1] =  2.06*mm;
-      zPlaneGe[2] =  5.00*mm;
-      zPlaneGe[3] = GeTaperL;
-
-      G4double rInnerGe[numZPlanesGe]; // interior radii
-      rInnerGe[0] = rInnerGe[1] = rInnerGe[2] = rInnerGe[3] = 0.0*mm;
-      G4double rOuterGe[numZPlanesGe]; // exterior radii
-      rOuterGe[0] = 20.5*mm;  rOuterGe[1] = 23.54*mm;
-      rOuterGe[2] = rOuterGe[3] = fCrystalR_PhaseII;
-
-
-      G4Polycone* solidCone = new G4Polycone("cloverCone", 0.0*degree, 360.0*degree,
-          numZPlanesGe,
-          zPlaneGe,
-          rInnerGe,
-          rOuterGe);
-
-      G4ThreeVector  transGeCone( -transX/2., -transY/2., -GeTaperL/2.);
-      G4IntersectionSolid* taperedCone = new G4IntersectionSolid("Taper+Cone",solidTaper,solidCone,0,transGeCone);
-
-      //back part....
-      G4double geBoxL = fTotalGeL_PhaseII - GeTaperL;
-
-      G4Box*    GeBox = new G4Box("GeBox",largeSquare/2.,largeSquare/2.,geBoxL/2.);
-      G4Tubs*   GeCyl = new G4Tubs("GeCyl",0.0*mm,fCrystalR_PhaseII,geBoxL/2.,0.*degree,360.*degree); 
-
-      G4ThreeVector transGeBox( transX, transY, 0.0*mm);          
-      G4IntersectionSolid* backPart = new G4IntersectionSolid("Box+Cyl",GeCyl,GeBox,0,transGeBox);
-
-      //add front and back
-      G4ThreeVector transBack( -transX/2., -transY/2., (GeTaperL/2.+geBoxL/2.));
-      solidGeLeaf_PhaseII = new G4UnionSolid("germanium",taperedCone,backPart,0,transBack);
-
-      //z-position of Ge-leaf wrt vacuum
-      fGeLeafPosZ_PhaseII = -endCapVacTaperL/2. + GeTaperL/2. + GeGap - endCapFrontThickness;
-
-      G4cout << "end-cap : box/2 " << endCapBoxL/2. << " taper/2 " << endCapTaperL/2. << " total/2 " << endCapTotalL << G4endl;
-      G4cout << "vacuum  : box/2 " << endCapVacBoxL/2. << " taper/2 " << endCapVacTaperL/2. << " total/2 " << endCapVacTotalL << G4endl;
-      G4cout << "ge      : box/2 " << geBoxL/2. << " taper/2 " << GeTaperL/2. << " total/2 " << GeTotalL << G4endl;
-
-
-      //------------------------------------------------------------------
-      // Inner bore hole + lithium contact + passivated Ge
-      G4double GeDepth      = 15.00 * mm;  //Hole dirilled to this far from face
-      G4double passiveThick = 0.5 * mm;    //fPassiveThick_PhaseII;  //passivated Ge
-      G4double contactThick = fContactThick_PhaseII;  //Li contact
-      //G4double innerRHole =  0.00 * mm;
-      G4double holeR      = fHoleR_PhaseII;
-      G4double contactR   = holeR + contactThick;
-      G4double passiveR   = contactR + passiveThick;
-      G4double holeL      = fTotalGeL_PhaseII - GeDepth;
-      G4double tubeL      = holeL - holeR;
-
-      //the same translation works for all the following rounded tubes
-      G4ThreeVector transSphere(0.01*mm, 0.01*mm, -tubeL/2.-0.1*mm); //if offsets are 0. it does not display !!
-
-      //now add a passivated layer
-      G4Sphere* passivatedSphere = new G4Sphere("passSphere", 0.0*mm, passiveR,           0.*degree, 360.*degree, 0.*degree, 180.*degree);
-      G4Tubs*   passivatedTube   = new G4Tubs(  "passTube",   0.0*mm, passiveR, tubeL/2., 0.*degree, 360.*degree);
-      solidPassivated_PhaseII    = new G4UnionSolid("passivatedGe",passivatedTube,passivatedSphere,0,transSphere);
-
-      //and the Li contact
-      G4Sphere* contactSphere  = new G4Sphere("sphere1", 0.0*mm, contactR,           0.*deg, 360.*deg, 0.*deg, 180.*deg);
-      G4Tubs*   contactTube    = new G4Tubs(  "tube1",   0.0*mm, contactR, tubeL/2., 0.*deg, 360.*deg);
-      solidContact_PhaseII = new G4UnionSolid("liContact",contactTube,contactSphere,0,transSphere);
-
-      //bore out a hole
-      G4Sphere* boreSphere  = new G4Sphere(    "boreSphere", 0.0*mm, holeR,           0.*degree, 360.*degree, 0.*degree, 180.*degree);
-      G4Tubs*   boreTube    = new G4Tubs(      "boreTube",   0.0*mm, holeR, tubeL/2., 0.*degree, 360.*degree);
-      solidBoreHole_PhaseII = new G4UnionSolid("boreHole",boreTube,boreSphere,0,transSphere);
-
-      //save these for placements....
-      fContact_dZ_PhaseII = holeL/2. - contactThick;// - passiveThick;
-
-      //put corners @ (0,0)
-      fGeLeaf_dX_PhaseII = largeSquare/2. - transX/2.;
+    //the y-translation
+    if(l == 0 || l == 3 ) {
+      leafY = dPos;
+    } else {
+      leafY = -dPos;
     }
+    //the z-translation
+    leafZ = geLeaf_PosZ;
+    
+    
+    //physiGeLeaf_CloverU[l] = new G4PVPlacement(rmC,                       //rotation
+    PVPBuffer = new G4PVPlacement(rmC,                       //rotation
+					       G4ThreeVector(leafX, leafY, leafZ),
+					       logicGeLeaf_CloverU[l],     //its logical volume
+					       "Clover",                 //its name
+					       logicVacuum_CloverU,        //its mother
+					       true,                       //no boolean operat
+					       12+l,                        //copy number
+					       true);                      //overlap check
+    
+    //physiPassivated_CloverU[l] = new G4PVPlacement(0,                   //rotation
+    PVPBuffer = new G4PVPlacement(0,                   //rotation
+						   G4ThreeVector(fHole_dX_GREAT, fHole_dY_GREAT, fContact_dZ_GREAT),
+						   logicPassivated_CloverU[l],
+						   "GePassivated",
+						   logicGeLeaf_CloverU[l],
+						   false,12+l,true);
+    
+    //physiContact_CloverU[l] = new G4PVPlacement(0,                   //rotation
+    PVPBuffer = new G4PVPlacement(0,                   //rotation
+						G4ThreeVector(0.*mm,0.*mm, 0.0*mm),//-fContact_dZ_GREAT),
+						logicContact_CloverU[l],
+						"LiContact",
+						logicPassivated_CloverU[l],
+						false,12+l,true);
+    
+    //physiBoreHole_CloverU[l] = new G4PVPlacement(0,                   //rotation
+    PVPBuffer = new G4PVPlacement(0,                   //rotation
+						 G4ThreeVector(0.*mm,0.*mm, 0.0*mm),
+						 logicBoreHole_CloverU[l],
+						 "BoreHole",
+						 logicContact_CloverU[l],
+						 false,12+l,true);
+    
+  }
 
+  //define the visual attributes
+  G4VisAttributes* visAttAlCap = new G4VisAttributes( G4Colour(0.9,0.9,0.9) );
+  visAttAlCap->SetVisibility(true);
+  visAttAlCap->SetForceWireframe(true);
+  
+  G4VisAttributes* visAttGeVac = new G4VisAttributes( G4Colour(0.9,1.0,0.9) );
+  visAttGeVac->SetForceWireframe(true);
+  visAttGeVac->SetVisibility(true);
+  
+  G4VisAttributes* visAttActive = new G4VisAttributes( G4Colour(1.0,1.0,0.0) );
+  visAttActive->SetForceWireframe(true);
+  visAttActive->SetVisibility(true);
+  
+  G4VisAttributes* visAttPassive = new G4VisAttributes(G4Colour(0.0,1.0,1.0) );
+  visAttPassive->SetForceWireframe(true);
+  visAttPassive->SetVisibility(true);
+  
+  G4VisAttributes* visAttLiContact = new G4VisAttributes(G4Colour(1.0,0.0,1.0) );
+  visAttLiContact->SetVisibility(true);
+  
+  G4VisAttributes* visAttHole = new G4VisAttributes( G4Colour(0.0,0.0,1.0) );
+  visAttHole->SetVisibility(true);
+  
+  logicEndCap_CloverU->SetVisAttributes(visAttAlCap);
+  logicVacuum_CloverU->SetVisAttributes(visAttGeVac);
+  for(G4int l = 0; l < 4; l++) {
+    logicGeLeaf_CloverU[l]->SetVisAttributes(visAttActive);
+    logicPassivated_CloverU[l]->SetVisAttributes(visAttPassive);
+    logicContact_CloverU[l]->SetVisAttributes(visAttLiContact);
+    logicBoreHole_CloverU[l]->SetVisAttributes(visAttHole);
+  }
+}
 
+//---------------------------------------------------------------------
+// Create the solids defining Phase-II Clovers
+//---------------------------------------------------------------------
+void  Chamber::CreateCloverIISolids()
+{
+  //An approximate CloverII
+  G4cout << G4endl << "Constructing archetypal PhaseII Clover" << G4endl;
+  
+  //---------------------------------------------------------
+  //end-cap
+  G4double endCapFrontThickness = 1.2*mm; //was 1.5
+  G4double endCapTaperThickness = 1.5*mm;
+  G4double endCapSideThickness  = 1.5*mm;
+  
+  G4double GeGap      =  fEndCap2Ge_PhaseII;
+  G4double taperAngle =  7.0*degree;
+  
+  G4double endCapTotalL = fTotalGeL_PhaseII + GeGap + endCapFrontThickness + 5.*mm; //+ Gap at rear end
+  G4double endCapFrontD = 43.5*mm;
+  G4double endCapBackD  = 50.5*mm;
+  G4double endCapTaperL = 55.0*mm;
+  
+  G4double endCapBoxL   = endCapTotalL - endCapTaperL;
+  
+  //the tapered part
+  G4Trap* solidTaperedCloverEC
+    = new G4Trap("taperedCloverEC",
+		 endCapTaperL/2.,    //Half z-length [pDz]
+		 0.00*degree, //Polar angle of line joining centres of the faces @ -/+pDz
+		 14.0*degree,   //aequivalent zimuthal angle 
+		 endCapFrontD,    //pDy1 half y length at -pDz
+		 endCapFrontD,    //pDx1 half x length at -pDz, -pDy1
+		 endCapFrontD,    //pDx2 half x length at -pDz, +pDy1
+		 0.00*degree,//pAlpha1 wrt y-axis from the centre of the side (lower endcap)
+		 endCapBackD,    //pDy2 half y length at +pDz
+		 endCapBackD,    //pDx3 half x length at +pDz, -pDy2
+		 endCapBackD,    //pDx4 half x length at +pDz, +pDy2
+		 0.00*degree); //pAlpha2 wrt y-axis from the centre of the side (upper endcap)
+  
+  //the rectangular part.....
+  G4Box*        endCapBox  = new G4Box("endCapBox",endCapBackD,endCapBackD,endCapBoxL/2.);
+  G4ThreeVector transECBox(   0.*mm, 0.*mm, endCapTaperL/2.+endCapBoxL/2.);
+  
+  //add the two together
+  solidEndCap_PhaseII = new G4UnionSolid("Box+Taper",solidTaperedCloverEC,endCapBox,0,transECBox);
+  //need the taperL for placement
+  fEndCapTaperL_PhaseII = endCapTaperL;
+  
+  
+  //---------------------------------------------------------
+  //end-cap inner vacuum
+  G4double endCapDelta_1 = endCapTaperThickness/cos(taperAngle) - endCapFrontThickness*tan(taperAngle);
+  G4double endCapDelta_2 = ( endCapSideThickness - (endCapTaperThickness*sin(taperAngle)*tan(taperAngle) +
+						    endCapTaperThickness*cos(taperAngle) ) )/tan(taperAngle);
+  
+  G4cout << endCapDelta_1 << " " << endCapDelta_2 << endl;
+  
+  G4double endCapVacTaperL = endCapTaperL - endCapFrontThickness;// - endCapDelta_2;
+  G4double endCapVacBoxL   = endCapBoxL   - endCapFrontThickness;
+  G4double endCapVacTotalL = endCapVacBoxL + endCapVacTaperL;
+  G4double endCapVacFrontD = endCapFrontD - endCapDelta_1;
+  G4double endCapVacBackD  = endCapBackD  - endCapSideThickness;
+  
+  //position of vacuum wrt end-cap
+  fVacuumPosZ_PhaseII = (-endCapTotalL + endCapVacTotalL )/2. + 1.5*endCapFrontThickness;
+  
+  //tapered part...
+  G4Trap* solidTaperVac
+    = new G4Trap("cloverTaperVac",
+		 endCapVacTaperL/2.,    //Half z-length [pDz]
+		 0.00*degree, //Polar angle of line joining centres of the faces @ -/+pDz
+		 14.0*degree,   //aequivalent zimuthal angle 
+		 endCapVacFrontD,    //pDy1 half y length at -pDz
+		 endCapVacFrontD,    //pDx1 half x length at -pDz, -pDy1
+		 endCapVacFrontD,    //pDx2 half x length at -pDz, +pDy1
+		 0.00*degree,//pAlpha1 wrt y-axis from the centre of the side (lower endcap)
+		 endCapVacBackD,    //pDy2 half y length at +pDz
+		 endCapVacBackD,    //pDx3 half x length at +pDz, -pDy2
+		 endCapVacBackD,    //pDx4 half x length at +pDz, +pDy2
+		 0.00*degree); //pAlpha2 wrt y-axis from the centre of the side (upper endcap)
+  
+  G4cout << endCapTotalL << " " << endCapVacTotalL << endl;
+  
+  //rectangular part
+  G4Box*         endCapVacBox  = new G4Box("endCapBox",endCapVacBackD,endCapVacBackD,endCapVacBoxL/2.);
+  G4ThreeVector transVacBox(   0.*mm, 0.*mm, (endCapVacTaperL/2.+endCapVacBoxL/2.-0.0001*mm));
+  
+  //add them together
+  solidVacuum_PhaseII = new G4UnionSolid("Vac_Box+Taper",solidTaperVac,endCapVacBox,0,transVacBox);
+  
+
+  //---------------------------------------------------------
+  //The Ge crystal...
+  G4double GeTaperL    = 36.0*mm;
+  G4double GeTotalL    = fTotalGeL_PhaseII; //70.0 * mm;
+  G4double smallSquare = 41.0*mm; 
+  G4double largeSquare = 45.5*mm;
+
+  G4double transX = (largeSquare-smallSquare)/2.;
+  G4double transY = (largeSquare-smallSquare)/2.;
+  fHole_dX_PhaseII = transX;  //transX /= 2.;
+  fHole_dY_PhaseII = transY;  //transY /= 2.;
+  
+  //tapered part......
+  G4Trap* solidTaper
+    = new G4Trap("cloverTaper",
+		 GeTaperL/2.,    //Half ? z-length [pDz]
+		 5.05*degree,   //Polar angle of line joining centres of the faces @ -/+pDz
+		 45.*degree,   //equivalent azimuthal angle  //DOES NOT MAKE SENSE !!
+		 smallSquare/2., //pDy1 half y length at -pDz
+		 smallSquare/2., //pDx1 half x length at -pDz, -pDy1
+		 smallSquare/2., //pDx2 half x length at -pDz, +pDy1
+		 0.00*degree,//pAlpha1 wrt y-axis from the centre of the side (lower endcap)
+		 largeSquare/2.,    //pDy2 half y length at +pDz
+		 largeSquare/2.,    //pDx3 half x length at +pDz, -pDy2
+		 largeSquare/2.,    //pDx4 half x length at +pDz, +pDy2
+		 0.0*degree); //pAlpha2 wrt y-axis from the centre of the side (upper endcap)
+  
+  //HERE !!
+  const G4int numZPlanesGe=4;      // no. polycone planes
+
+  G4double zPlaneGe[numZPlanesGe]; // positions of planes
+  zPlaneGe[0] =  0.00*mm;
+  zPlaneGe[1] =  2.06*mm;
+  zPlaneGe[2] =  5.00*mm;
+  zPlaneGe[3] = GeTaperL;
+
+  G4double rInnerGe[numZPlanesGe]; // interior radii
+  rInnerGe[0] = rInnerGe[1] = rInnerGe[2] = rInnerGe[3] = 0.0*mm;
+  G4double rOuterGe[numZPlanesGe]; // exterior radii
+  rOuterGe[0] = 20.5*mm;  rOuterGe[1] = 23.54*mm;
+  rOuterGe[2] = rOuterGe[3] = fCrystalR_PhaseII;
+  
+
+  G4Polycone* solidCone = new G4Polycone("cloverCone", 0.0*degree, 360.0*degree,
+					 numZPlanesGe,
+					 zPlaneGe,
+					 rInnerGe,
+					 rOuterGe);
+  
+  G4ThreeVector  transGeCone( -transX/2., -transY/2., -GeTaperL/2.);
+  G4IntersectionSolid* taperedCone = new G4IntersectionSolid("Taper+Cone",solidTaper,solidCone,0,transGeCone);
+
+  //back part....
+  G4double geBoxL = fTotalGeL_PhaseII - GeTaperL;
+
+  G4Box*    GeBox = new G4Box("GeBox",largeSquare/2.,largeSquare/2.,geBoxL/2.);
+  G4Tubs*   GeCyl = new G4Tubs("GeCyl",0.0*mm,fCrystalR_PhaseII,geBoxL/2.,0.*degree,360.*degree); 
+ 
+  G4ThreeVector transGeBox( transX, transY, 0.0*mm);          
+  G4IntersectionSolid* backPart = new G4IntersectionSolid("Box+Cyl",GeCyl,GeBox,0,transGeBox);
+
+  //add front and back
+  G4ThreeVector transBack( -transX/2., -transY/2., (GeTaperL/2.+geBoxL/2.));
+  solidGeLeaf_PhaseII = new G4UnionSolid("germanium",taperedCone,backPart,0,transBack);
+
+  //z-position of Ge-leaf wrt vacuum
+  fGeLeafPosZ_PhaseII = -endCapVacTaperL/2. + GeTaperL/2. + GeGap - endCapFrontThickness;
+
+  G4cout << "end-cap : box/2 " << endCapBoxL/2. << " taper/2 " << endCapTaperL/2. << " total/2 " << endCapTotalL << G4endl;
+  G4cout << "vacuum  : box/2 " << endCapVacBoxL/2. << " taper/2 " << endCapVacTaperL/2. << " total/2 " << endCapVacTotalL << G4endl;
+  G4cout << "ge      : box/2 " << geBoxL/2. << " taper/2 " << GeTaperL/2. << " total/2 " << GeTotalL << G4endl;
 
 
-    //---------------------------------------------------------------------
-    // Create the solids defining Phase-II Clovers
-    //---------------------------------------------------------------------
-    void  Chamber::CreateGREATCloverSolids()
-    {
-      //An approximate CloverII
-      G4cout << G4endl << "Constructing archetypal GREAT Clover" << G4endl;
-
-      //---------------------------------------------------------
-      //end-cap
-      G4double endCapFrontThickness = 2.0*mm;
-      G4double endCapTaperThickness = 2.0*mm;
-      G4double endCapSideThickness  = 2.0*mm;
-
-      G4double GeGap      = fEndCap2Ge_GREAT - endCapFrontThickness;
-      G4double taperAngle = 15.*degree;
-
-      G4double endCapTotalL = fTotalGeL_GREAT + GeGap + 2.*endCapFrontThickness + 5.*mm; //+ Gap at rear end
-      G4double endCapFrontD = 60.09*mm;
-      G4double endCapBackD  = 70.00*mm;
-      G4double endCapTaperL = 37.00*mm;
-
-      G4double endCapBoxL   = endCapTotalL - endCapTaperL;
-
-      //the tapered part....
-      G4Trap* solidTaperedCloverEC  = new G4Trap("taperedCloverEC",
-          endCapTaperL/2.,    //Half z-length [pDz]
-          0.00*degree, //Polar angle of line joining centres of the faces @ -/+pDz
-          45.0*degree,   //aequivalent zimuthal angle       //Does not make sense !
-          endCapFrontD,    //pDy1 half y length at -pDz
-          endCapFrontD,    //pDx1 half x length at -pDz, -pDy1
-          endCapFrontD,    //pDx2 half x length at -pDz, +pDy1
-          0.00*degree,//pAlpha1 wrt y-axis from the centre of the side (lower endcap)
-          endCapBackD,    //pDy2 half y length at +pDz
-          endCapBackD,    //pDx3 half x length at +pDz, -pDy2
-          endCapBackD,    //pDx4 half x length at +pDz, +pDy2
-          0.00*degree); //pAlpha2 wrt y-axis from the centre of the side (upper endcap)
-
-      //the rectangular part.....
-      G4Box*        endCapBox  = new G4Box("endCapBox",endCapBackD,endCapBackD,endCapBoxL/2.);
-      G4ThreeVector transECBox(   0.*mm, 0.*mm, endCapTaperL/2.+endCapBoxL/2.);
-
-      //add the two together
-      solidEndCap_GREAT = new G4UnionSolid("Box+Taper",solidTaperedCloverEC,endCapBox,0,transECBox);
-      //need the taperL for placement
-      fEndCapTaperL_GREAT = endCapTaperL;
-
-
-      //---------------------------------------------------------
-      //end-cap inner vacuum
-      G4double endCapDelta_1 = endCapTaperThickness/cos(taperAngle) - endCapFrontThickness*tan(taperAngle);
-      G4double endCapDelta_2 = ( endCapSideThickness - (endCapTaperThickness*sin(taperAngle)*tan(taperAngle) +
-            endCapTaperThickness*cos(taperAngle) ) )/tan(taperAngle);
-
-      G4cout << endCapDelta_1 << " " << endCapDelta_2 << endl;
-
-      G4double endCapVacTaperL = endCapTaperL - endCapFrontThickness - endCapDelta_2;
-      G4double endCapVacBoxL   = endCapBoxL + endCapDelta_2;
-      G4double endCapVacTotalL = endCapVacBoxL + endCapVacTaperL;
-      G4double endCapVacFrontD = endCapFrontD - endCapDelta_1;
-      G4double endCapVacBackD  = endCapBackD  - endCapSideThickness;
-
-      //position of vacuum wrt end-cap
-      fVacuumPosZ_GREAT = (-endCapTotalL + endCapVacTotalL - endCapDelta_2)/2. + endCapFrontThickness;
-
-      //tapered part...
-      G4Trap* solidTaperVac  = new G4Trap("cloverTaperVac",
-          endCapVacTaperL/2.,    //Half z-length [pDz]
-          0.00*degree, //Polar angle of line joining centres of the faces @ -/+pDz
-          45.0*degree,   //aequivalent zimuthal angle 
-          endCapVacFrontD,    //pDy1 half y length at -pDz
-          endCapVacFrontD,    //pDx1 half x length at -pDz, -pDy1
-          endCapVacFrontD,    //pDx2 half x length at -pDz, +pDy1
-          0.00*degree,//pAlpha1 wrt y-axis from the centre of the side (lower endcap)
-          endCapVacBackD,    //pDy2 half y length at +pDz
-          endCapVacBackD,    //pDx3 half x length at +pDz, -pDy2
-          endCapVacBackD,    //pDx4 half x length at +pDz, +pDy2
-          0.00*degree); //pAlpha2 wrt y-axis from the centre of the side (upper endcap)
-
-      G4cout << endCapTotalL << " " << endCapVacTotalL << endl;
-
-      //rectangular part
-      G4Box*         endCapVacBox  = new G4Box("endCapBox",endCapVacBackD,endCapVacBackD,endCapVacBoxL/2.);
-      G4ThreeVector transVacBox(   0.*mm, 0.*mm, endCapVacTaperL/2.+endCapVacBoxL/2.);
-
-      //add them together
-      solidVacuum_GREAT = new G4UnionSolid("Vac_Box+Taper",solidTaperVac,endCapVacBox,0,transVacBox);
-
-
-      //---------------------------------------------------------
-      //The Ge crystal...
-      G4double GeTaperL    = fTaperGeL_GREAT; //30.0*mm;
-      G4double GeTotalL    = fTotalGeL_GREAT; //105 ? 140.0 * mm;
-
-      G4double smallSquare = fFrontFaceSquare_GREAT;
-      G4double largeSquare = fBackFaceSquare_GREAT;
-
-      G4double transX = (largeSquare-smallSquare)/2.;
-      G4double transY = (largeSquare-smallSquare)/2.;
-      transX /= 2.;
-      transY /= 2.;
-
-      G4cout << "Got to the point of creating the clover leaf" << G4endl;
-
-      //don't understand this G4Trap : expect an angle of 12.15 degrees !
-      G4Trap* solidTaper = new G4Trap("cloverTaper",
-          GeTaperL/2.,    //Half z-length [pDz]
-          9.63*degree,   //This is a fudge angle and is diff from debug //Polar angle of line joining centres of the faces @ -/+pDz
-          45.0*degree,    //equivalent zimuthal angle 
-          smallSquare/2., //pDy1 half y length at -pDz
-          smallSquare/2., //pDx1 half x length at -pDz, -pDy1
-          smallSquare/2., //pDx2 half x length at -pDz, +pDy1
-          0.00*degree,//pAlpha1 wrt y-axis from the centre of the side (lower endcap)
-          largeSquare/2.,    //pDy2 half y length at +pDz
-          largeSquare/2.,    //pDx3 half x length at +pDz, -pDy2
-          largeSquare/2.,    //pDx4 half x length at +pDz, +pDy2
-          0.0*degree); //pAlpha2 wrt y-axis from the centre of the side (upper endcap)
-
-      /*
-         This was used for a phaseII to make rounded edges
-         const G4int numZPlanesGe=4;      // no. polycone planes
-         G4double zPlaneGe[numZPlanesGe]; // positions of planes
-         zPlaneGe[0] =  0.00*mm;
-         zPlaneGe[1] =  1.46*mm;
-         zPlaneGe[2] =  5.00*mm;
-         zPlaneGe[3] = GeTaperL;
-
-         G4double rInnerGe[numZPlanesGe]; // interior radii
-         rInnerGe[0] = rInnerGe[1] = rInnerGe[2] = rInnerGe[3] = 0.0*mm;
-         G4double rOuterGe[numZPlanesGe]; // exterior radii
-         rOuterGe[0] = 20.5*mm;  rOuterGe[1] = 23.04*mm; //23.54*mm;//exagerate it more
-         rOuterGe[2] = rOuterGe[3] = fCrystalR_PhaseII;
-
-
-         G4Polycone* solidCone = new G4Polycone("cloverCone", 0.0*degree, 360.0*degree,numZPlanesGe, zPlaneGe, rInnerGe, rOuterGe);
-         G4ThreeVector  transGeCone( -transX/2., -transY/2., -GeTaperL/2.);
-         G4IntersectionSolid* taperedCone = new G4IntersectionSolid("Taper+Cone",solidTaper,solidCone,0,transGeCone);
-         */
-
-      //back part....
-      G4double geBoxL = GeTotalL - GeTaperL;
-      G4Box* GeBox = new G4Box("GeBox", largeSquare/2., largeSquare/2., geBoxL/2.);
-
-      //add back box and front tapered parts
-      G4ThreeVector transGeBox( transX, transX, GeTaperL/2.+geBoxL/2.);
-      G4UnionSolid* newTaper  = new G4UnionSolid("Box+Taper",solidTaper,GeBox,0,transGeBox);
-
-
-      //now make a cylinder 90x60 which needs to be displaced before intersection
-      //the centres of the cylinders should be 56 mm apart, but the gap between leaves
-      // is 0.8 mm => centre of cylinder should be at (27.6,27.6) wrt inner corner
-      G4double dx1 = 27.60*mm;
-      G4double dx2 = largeSquare/2.;
-      G4cout << "transX " << transX << " dx2 " << dx2 << ".....hole_dX " << fHole_dX_GREAT << G4endl;
-
-      fHole_dX_GREAT = transX + dx1 - dx2; //save the displacements for the bore-hole placements
-      fHole_dY_GREAT = transY + dx1 - dx2;
-
-      G4Tubs* GeCyl = new G4Tubs("GeCyl",0.0*mm, 35*mm, GeTotalL/2.,0.*degree,360.*degree);
-      G4ThreeVector transGeCyl( fHole_dX_GREAT, fHole_dY_GREAT, (GeTotalL-GeTaperL)/2.);
-
-      //add all of this together for the Ge....
-      solidGeLeaf_GREAT  = new G4IntersectionSolid("Box+Taper+Cyl",newTaper,GeCyl,0,transGeCyl);
-
-
-      //put corners @ (0,0)
-      fGeLeaf_dX_GREAT = largeSquare/2. - transX;
-      //fGeLeaf_dY_GREAT = largeSquare/2. - transY;
-      G4cout << "shift leaves " << fGeLeaf_dX_GREAT << "....." << fHole_dX_GREAT << G4endl;
-
-      //z-position of Ge-leaf wrt vacuum
-      fGeLeafPosZ_GREAT = -endCapVacTaperL/2. + GeTaperL/2. + GeGap; //wrt clover Vacuum
-
-      //1.875 28.875.....-1.575 27.6
-
-      //-------------------------------------------------------
-      // Inner bore hole + lithium contact + passivated Ge
-      G4double GeDepth      = 15.00 * mm;
-      G4double holeL        = GeTotalL - GeDepth;  //length of bore hole
-      G4double passiveThick =  0.30 * mm;  //passivated Ge
-      G4double contactThick =  0.50 * mm;  //Li contact
-
-      //G4double innerRHole =  0.00 * mm;
-      G4double holeR      =  5.00 * mm; //fHoleR_PhaseII;
-      G4double contactR   = holeR + contactThick;
-      G4double passiveR   = contactR + passiveThick;
-      G4double tubeL      = holeL - holeR;
-
-      //the same translation works for all the following rounded tubes
-      G4ThreeVector transSphere(0.001*mm, 0.001*mm, -tubeL/2.-0.001*mm); //if offsets are 0. it does not display !!
-
-      //now add a passivated layer
-      G4Sphere* passivatedSphere = new G4Sphere("passSphere", 0.0*mm, passiveR,           0.*degree, 360.*degree, 0.*degree, 180.*degree);
-      G4Tubs*   passivatedTube   = new G4Tubs(  "passTube",   0.0*mm, passiveR, tubeL/2., 0.*degree, 360.*degree);
-      solidPassivated_GREAT    = new G4UnionSolid("passivatedGe",passivatedTube,passivatedSphere,0,transSphere);
-
-      //and the Li contact
-      G4Sphere* contactSphere  = new G4Sphere("sphere1", 0.0*mm, contactR,           0.*deg, 360.*deg, 0.*deg, 180.*deg);
-      G4Tubs*   contactTube    = new G4Tubs(  "tube1",   0.0*mm, contactR, tubeL/2., 0.*deg, 360.*deg);
-      solidContact_GREAT = new G4UnionSolid("liContact",contactTube,contactSphere,0,transSphere);
+  //------------------------------------------------------------------
+  // Inner bore hole + lithium contact + passivated Ge
+  G4double GeDepth      = 15.00 * mm;  //Hole dirilled to this far from face
+  G4double passiveThick = 0.5 * mm;    //fPassiveThick_PhaseII;  //passivated Ge
+  G4double contactThick = fContactThick_PhaseII;  //Li contact
+
+  G4double innerRHole =  0.00*mm;
+  G4double holeR      = fHoleR_PhaseII;
+  G4double contactR   = holeR + contactThick;
+  G4double passiveR   = contactR + passiveThick;
+  G4double holeL      = fTotalGeL_PhaseII - GeDepth;
+  G4double tubeL      = holeL - holeR;
+  
+  //the same translation works for all the following rounded tubes
+  G4ThreeVector transSphere(0.01*mm, 0.01*mm, -tubeL/2.-0.1*mm); //if offsets are 0. it does not display !!
+
+  //now add a passivated layer
+  G4Sphere* passivatedSphere = new G4Sphere("passSphere", 0.0*mm, passiveR,           0.*degree, 360.*degree, 0.*degree, 180.*degree);
+  G4Tubs*   passivatedTube   = new G4Tubs(  "passTube",   0.0*mm, passiveR, tubeL/2., 0.*degree, 360.*degree);
+  solidPassivated_PhaseII    = new G4UnionSolid("passivatedGe",passivatedTube,passivatedSphere,0,transSphere);
+  
+  //and the Li contact
+  G4Sphere* contactSphere  = new G4Sphere("sphere1", 0.0*mm, contactR,           0.*deg, 360.*deg, 0.*deg, 180.*deg);
+  G4Tubs*   contactTube    = new G4Tubs(  "tube1",   0.0*mm, contactR, tubeL/2., 0.*deg, 360.*deg);
+  solidContact_PhaseII = new G4UnionSolid("liContact",contactTube,contactSphere,0,transSphere);
+
+  //bore out a hole
+  G4Sphere* boreSphere  = new G4Sphere(    "boreSphere", 0.0*mm, holeR,           0.*degree, 360.*degree, 0.*degree, 180.*degree);
+  G4Tubs*   boreTube    = new G4Tubs(      "boreTube",   0.0*mm, holeR, tubeL/2., 0.*degree, 360.*degree);
+  solidBoreHole_PhaseII = new G4UnionSolid("boreHole",boreTube,boreSphere,0,transSphere);
+  
+  //save these for placements....
+  fContact_dZ_PhaseII = holeL/2. - contactThick;// - passiveThick;
+
+  //put corners @ (0,0)
+  fGeLeaf_dX_PhaseII = largeSquare/2. - transX/2.;
+}
 
-      //bore out a hole
-      G4Sphere* boreSphere  = new G4Sphere(   "boreSphere", 0.0*mm, holeR,           0.*degree, 360.*degree, 0.*degree, 180.*degree);
-      G4Tubs*   boreTube    = new G4Tubs(     "boreTube",   0.0*mm, holeR, tubeL/2., 0.*degree, 360.*degree);
-      solidBoreHole_GREAT = new G4UnionSolid("boreHole",boreTube,boreSphere,0,transSphere);
-
-      //save this for placement
-      fContact_dZ_GREAT = -GeTaperL/2 + tubeL/2 + holeR + GeDepth;
-      G4cout << "fContact_dZ_GREAT " << fContact_dZ_GREAT << G4endl;
-      G4cout << "totalL/2 " << GeTotalL/2 << " taperL/2 " << GeTaperL/2 << "  tubeL/2 " << tubeL/2 << " : GeDepth " << GeDepth << G4endl;
 
 
 
+//---------------------------------------------------------------------
+// Create the solids defining Phase-II Clovers
+//---------------------------------------------------------------------
+void  Chamber::CreateGREATCloverSolids()
+{
+  //An approximate CloverII
+  G4cout << G4endl << "Constructing archetypal GREAT Clover" << G4endl;
+
+  //---------------------------------------------------------
+  //end-cap
+  G4double endCapFrontThickness = 2.0*mm;
+  G4double endCapTaperThickness = 2.0*mm;
+  G4double endCapSideThickness  = 2.0*mm;
+  
+  G4double GeGap      = fEndCap2Ge_GREAT - endCapFrontThickness;
+  G4double taperAngle = 15.*degree;
+  
+  G4double endCapTotalL = fTotalGeL_GREAT + GeGap + 2.*endCapFrontThickness + 5.*mm; //+ Gap at rear end
+  G4double endCapFrontD = 60.09*mm;
+  G4double endCapBackD  = 70.00*mm;
+  G4double endCapTaperL = 37.00*mm;
+
+  G4double endCapBoxL   = endCapTotalL - endCapTaperL;
+  
+  //the tapered part....
+  G4Trap* solidTaperedCloverEC  = new G4Trap("taperedCloverEC",
+					     endCapTaperL/2.,    //Half z-length [pDz]
+					     0.00*degree, //Polar angle of line joining centres of the faces @ -/+pDz
+					     45.0*degree,   //aequivalent zimuthal angle       //Does not make sense !
+					     endCapFrontD,    //pDy1 half y length at -pDz
+					     endCapFrontD,    //pDx1 half x length at -pDz, -pDy1
+					     endCapFrontD,    //pDx2 half x length at -pDz, +pDy1
+					     0.00*degree,//pAlpha1 wrt y-axis from the centre of the side (lower endcap)
+					     endCapBackD,    //pDy2 half y length at +pDz
+					     endCapBackD,    //pDx3 half x length at +pDz, -pDy2
+					     endCapBackD,    //pDx4 half x length at +pDz, +pDy2
+					     0.00*degree); //pAlpha2 wrt y-axis from the centre of the side (upper endcap)
+  
+  //the rectangular part.....
+  G4Box*        endCapBox  = new G4Box("endCapBox",endCapBackD,endCapBackD,endCapBoxL/2.);
+  G4ThreeVector transECBox(   0.*mm, 0.*mm, endCapTaperL/2.+endCapBoxL/2.);
+  
+  //add the two together
+  solidEndCap_GREAT = new G4UnionSolid("Box+Taper",solidTaperedCloverEC,endCapBox,0,transECBox);
+  //need the taperL for placement
+  fEndCapTaperL_GREAT = endCapTaperL;
+  
+  
+  //---------------------------------------------------------
+  //end-cap inner vacuum
+  G4double endCapDelta_1 = endCapTaperThickness/cos(taperAngle) - endCapFrontThickness*tan(taperAngle);
+  G4double endCapDelta_2 = ( endCapSideThickness - (endCapTaperThickness*sin(taperAngle)*tan(taperAngle) +
+						    endCapTaperThickness*cos(taperAngle) ) )/tan(taperAngle);
+  
+  G4cout << endCapDelta_1 << " " << endCapDelta_2 << endl;
+  
+  G4double endCapVacTaperL = endCapTaperL - endCapFrontThickness - endCapDelta_2;
+  G4double endCapVacBoxL   = endCapBoxL + endCapDelta_2;
+  G4double endCapVacTotalL = endCapVacBoxL + endCapVacTaperL;
+  G4double endCapVacFrontD = endCapFrontD - endCapDelta_1;
+  G4double endCapVacBackD  = endCapBackD  - endCapSideThickness;
+  
+  //position of vacuum wrt end-cap
+  fVacuumPosZ_GREAT = (-endCapTotalL + endCapVacTotalL - endCapDelta_2)/2. + endCapFrontThickness;
+  
+  //tapered part...
+  G4Trap* solidTaperVac  = new G4Trap("cloverTaperVac",
+				      endCapVacTaperL/2.,    //Half z-length [pDz]
+				      0.00*degree, //Polar angle of line joining centres of the faces @ -/+pDz
+				      45.0*degree,   //aequivalent zimuthal angle 
+				      endCapVacFrontD,    //pDy1 half y length at -pDz
+				      endCapVacFrontD,    //pDx1 half x length at -pDz, -pDy1
+				      endCapVacFrontD,    //pDx2 half x length at -pDz, +pDy1
+				      0.00*degree,//pAlpha1 wrt y-axis from the centre of the side (lower endcap)
+				      endCapVacBackD,    //pDy2 half y length at +pDz
+				      endCapVacBackD,    //pDx3 half x length at +pDz, -pDy2
+				      endCapVacBackD,    //pDx4 half x length at +pDz, +pDy2
+				      0.00*degree); //pAlpha2 wrt y-axis from the centre of the side (upper endcap)
+  
+  G4cout << endCapTotalL << " " << endCapVacTotalL << endl;
+  
+  //rectangular part
+  G4Box*         endCapVacBox  = new G4Box("endCapBox",endCapVacBackD,endCapVacBackD,endCapVacBoxL/2.);
+  G4ThreeVector transVacBox(   0.*mm, 0.*mm, endCapVacTaperL/2.+endCapVacBoxL/2.);
+  
+  //add them together
+  solidVacuum_GREAT = new G4UnionSolid("Vac_Box+Taper",solidTaperVac,endCapVacBox,0,transVacBox);
+  
+
+  //---------------------------------------------------------
+  //The Ge crystal...
+  G4double GeTaperL    = fTaperGeL_GREAT; //30.0*mm;
+  G4double GeTotalL    = fTotalGeL_GREAT; //105 ? 140.0 * mm;
+  
+  G4double smallSquare = fFrontFaceSquare_GREAT;
+  G4double largeSquare = fBackFaceSquare_GREAT;
+
+  G4double transX = (largeSquare-smallSquare)/2.;
+  G4double transY = (largeSquare-smallSquare)/2.;
+  transX /= 2.;
+  transY /= 2.;
+  
+  G4cout << "Got to the point of creating the clover leaf" << G4endl;
+
+  //don't understand this G4Trap : expect an angle of 12.15 degrees !
+  G4Trap* solidTaper = new G4Trap("cloverTaper",
+				  GeTaperL/2.,    //Half z-length [pDz]
+				  9.63*degree,   //This is a fudge angle and is diff from debug //Polar angle of line joining centres of the faces @ -/+pDz
+				  45.0*degree,    //equivalent zimuthal angle 
+				  smallSquare/2., //pDy1 half y length at -pDz
+				  smallSquare/2., //pDx1 half x length at -pDz, -pDy1
+				  smallSquare/2., //pDx2 half x length at -pDz, +pDy1
+				  0.00*degree,//pAlpha1 wrt y-axis from the centre of the side (lower endcap)
+				  largeSquare/2.,    //pDy2 half y length at +pDz
+				  largeSquare/2.,    //pDx3 half x length at +pDz, -pDy2
+				  largeSquare/2.,    //pDx4 half x length at +pDz, +pDy2
+				  0.0*degree); //pAlpha2 wrt y-axis from the centre of the side (upper endcap)
+  
+  /*
+    This was used for a phaseII to make rounded edges
+  const G4int numZPlanesGe=4;      // no. polycone planes
+  G4double zPlaneGe[numZPlanesGe]; // positions of planes
+  zPlaneGe[0] =  0.00*mm;
+  zPlaneGe[1] =  1.46*mm;
+  zPlaneGe[2] =  5.00*mm;
+  zPlaneGe[3] = GeTaperL;
+
+  G4double rInnerGe[numZPlanesGe]; // interior radii
+  rInnerGe[0] = rInnerGe[1] = rInnerGe[2] = rInnerGe[3] = 0.0*mm;
+  G4double rOuterGe[numZPlanesGe]; // exterior radii
+  rOuterGe[0] = 20.5*mm;  rOuterGe[1] = 23.04*mm; //23.54*mm;//exagerate it more
+  rOuterGe[2] = rOuterGe[3] = fCrystalR_PhaseII;
+  
+
+  G4Polycone* solidCone = new G4Polycone("cloverCone", 0.0*degree, 360.0*degree,numZPlanesGe, zPlaneGe, rInnerGe, rOuterGe);
+  G4ThreeVector  transGeCone( -transX/2., -transY/2., -GeTaperL/2.);
+  G4IntersectionSolid* taperedCone = new G4IntersectionSolid("Taper+Cone",solidTaper,solidCone,0,transGeCone);
+  */
 
-    }
+    //back part....
+  G4double geBoxL = GeTotalL - GeTaperL;
+  G4Box* GeBox = new G4Box("GeBox", largeSquare/2., largeSquare/2., geBoxL/2.);
+
+  //add back box and front tapered parts
+  G4ThreeVector transGeBox( transX, transX, GeTaperL/2.+geBoxL/2.);
+  G4UnionSolid* newTaper  = new G4UnionSolid("Box+Taper",solidTaper,GeBox,0,transGeBox);
+  
+
+  //now make a cylinder 90x60 which needs to be displaced before intersection
+  //the centres of the cylinders should be 56 mm apart, but the gap between leaves
+  // is 0.8 mm => centre of cylinder should be at (27.6,27.6) wrt inner corner
+  G4double dx1 = 27.60*mm;
+  G4double dx2 = largeSquare/2.;
+  G4cout << "transX " << transX << " dx2 " << dx2 << ".....hole_dX " << fHole_dX_GREAT << G4endl;
+
+  fHole_dX_GREAT = transX + dx1 - dx2; //save the displacements for the bore-hole placements
+  fHole_dY_GREAT = transY + dx1 - dx2;
+  
+  G4Tubs* GeCyl = new G4Tubs("GeCyl",0.0*mm, 35*mm, GeTotalL/2.,0.*degree,360.*degree);
+  G4ThreeVector transGeCyl( fHole_dX_GREAT, fHole_dY_GREAT, (GeTotalL-GeTaperL)/2.);
+
+  //add all of this together for the Ge....
+  solidGeLeaf_GREAT  = new G4IntersectionSolid("Box+Taper+Cyl",newTaper,GeCyl,0,transGeCyl);
+ 
+
+  //put corners @ (0,0)
+  fGeLeaf_dX_GREAT = largeSquare/2. - transX;
+  //fGeLeaf_dY_GREAT = largeSquare/2. - transY;
+  G4cout << "shift leaves " << fGeLeaf_dX_GREAT << "....." << fHole_dX_GREAT << G4endl;
+
+  //z-position of Ge-leaf wrt vacuum
+  fGeLeafPosZ_GREAT = -endCapVacTaperL/2. + GeTaperL/2. + GeGap; //wrt clover Vacuum
+
+  //1.875 28.875.....-1.575 27.6
+
+  //-------------------------------------------------------
+  // Inner bore hole + lithium contact + passivated Ge
+  G4double GeDepth      = 15.00 * mm;
+  G4double holeL        = GeTotalL - GeDepth;  //length of bore hole
+  G4double passiveThick =  0.30 * mm;  //passivated Ge
+  G4double contactThick =  0.50 * mm;  //Li contact
+
+  G4double innerRHole =  0.00 * mm;
+  G4double holeR      =  5.00 * mm; //fHoleR_PhaseII;
+  G4double contactR   = holeR + contactThick;
+  G4double passiveR   = contactR + passiveThick;
+  G4double tubeL      = holeL - holeR;
+
+  //the same translation works for all the following rounded tubes
+  G4ThreeVector transSphere(0.001*mm, 0.001*mm, -tubeL/2.-0.001*mm); //if offsets are 0. it does not display !!
+
+  //now add a passivated layer
+  G4Sphere* passivatedSphere = new G4Sphere("passSphere", 0.0*mm, passiveR,           0.*degree, 360.*degree, 0.*degree, 180.*degree);
+  G4Tubs*   passivatedTube   = new G4Tubs(  "passTube",   0.0*mm, passiveR, tubeL/2., 0.*degree, 360.*degree);
+  solidPassivated_GREAT    = new G4UnionSolid("passivatedGe",passivatedTube,passivatedSphere,0,transSphere);
+  
+  //and the Li contact
+  G4Sphere* contactSphere  = new G4Sphere("sphere1", 0.0*mm, contactR,           0.*deg, 360.*deg, 0.*deg, 180.*deg);
+  G4Tubs*   contactTube    = new G4Tubs(  "tube1",   0.0*mm, contactR, tubeL/2., 0.*deg, 360.*deg);
+  solidContact_GREAT = new G4UnionSolid("liContact",contactTube,contactSphere,0,transSphere);
+
+  //bore out a hole
+  G4Sphere* boreSphere  = new G4Sphere(   "boreSphere", 0.0*mm, holeR,           0.*degree, 360.*degree, 0.*degree, 180.*degree);
+  G4Tubs*   boreTube    = new G4Tubs(     "boreTube",   0.0*mm, holeR, tubeL/2., 0.*degree, 360.*degree);
+  solidBoreHole_GREAT = new G4UnionSolid("boreHole",boreTube,boreSphere,0,transSphere);
+  
+  //save this for placement
+  fContact_dZ_GREAT = -GeTaperL/2 + tubeL/2 + holeR + GeDepth;
+  G4cout << "fContact_dZ_GREAT " << fContact_dZ_GREAT << G4endl;
+  G4cout << "totalL/2 " << GeTotalL/2 << " taperL/2 " << GeTaperL/2 << "  tubeL/2 " << tubeL/2 << " : GeDepth " << GeDepth << G4endl;
+}
diff --git a/NPSimulation/Core/Chamber.hh b/NPSimulation/Core/Chamber.hh
index 3b0a86447e17794553b36c9d755e529b8d80cb53..88f4c75d4d7d06085bd1b219df4e9494e3d6d895 100644
--- a/NPSimulation/Core/Chamber.hh
+++ b/NPSimulation/Core/Chamber.hh
@@ -1,7 +1,7 @@
 #ifndef Chamber2Array_h
 #define Chamber2Array_h 1
 /*****************************************************************************
- * Copyright (C) 2009-2016   this file is part of the NPTool Project         *
+ * Copyright (C) 2009   this file is part of the NPTool Project              *
  *                                                                           *
  * For the licensing terms see $NPTOOL/Licence/NPTool_Licence                *
  * For the list of contributors see $NPTOOL/Licence/Contributors             *
@@ -11,14 +11,14 @@
  * Original Author: M. Labiche    contact address: marc.labiche@atfc.ac.uk   *
  *                                                                           *
  * Creation Date  : January 2010                                             *
- * Last update    : 19/07/2016                                               *
+ * Last update    : 11/03/2010                                               *
  *---------------------------------------------------------------------------*
  * Decription:                                                               *
  *  This class describe Cryogenic and standard Chamber.                      *
- *  Derived fromNPS::VDetector                                               *
+ *  Derived from VDetector                                                   *
  *---------------------------------------------------------------------------*
  * Comment:                                                                  *
- *                                                                           *
+ *
  *                                                                           *
  *****************************************************************************/
 // C++ headers
@@ -37,91 +37,101 @@
 #include "G4UnionSolid.hh"
 #include "G4IntersectionSolid.hh"
 
-
 // NPTool headers
 #include "NPSVDetector.hh"
 #include "NPInputParser.h"
+
 using namespace std;
 using namespace CLHEP;
 
 class Chamber : public NPS::VDetector
 {
-   public:
-      Chamber();
-      ~Chamber(){};
-
-
-   public:
-      //   Read stream at Configfile to pick-up parameters of detector (Position,...)
-      //   Called in DetecorConstruction::ReadDetextorConfiguration Method
-      void ReadConfiguration(NPL::InputParser);
-
-      //   Construct detector and inialise sensitive part.
-      //   Called After DetecorConstruction::AddDetector Method
-      void ConstructDetector(G4LogicalVolume* world);
-
-      //   Add Detector branch to the EventTree.
-      //   Called After DetecorConstruction::AddDetector Method
-      void InitializeRootOutput();
-
-      //   Read sensitive part and fill the Root tree.
-      //   Called at in the EventAction::EndOfEventAvtion
-      void ReadSensitive(const G4Event* event);
-
-
-   public:
-      //   Return Material from the Chamber Material Library
-      G4Material* GetMaterialFromLibrary(G4String MaterialName, G4double Temperature = 0, G4double Pressure = 0);
-      
-      //   Generate a DEDX file table using the material used in the target
-      void             WriteDEDXTable(G4ParticleDefinition* Particle,G4double Emin,G4double Emax);
-
-   public:
-      G4double    GetChamberRmin()     {return m_ChamberRmin;}
-      G4double    GetChamberRmax()     {return m_ChamberRmax;}
-      G4double    GetChamberPhiMin()   {return m_ChamberPhiMin;}
-      G4double    GetChamberPhiMax()   {return m_ChamberPhiMax;}
-      G4double    GetChamberThetaMin() {return m_ChamberThetaMin;}
-      G4double    GetChamberThetaMax() {return m_ChamberThetaMax;}
-      G4Material* GetChamberMaterial() {return m_ChamberMaterial;}
-  //G4int       GetChamberNbLayers()      {return m_ChamberNbLayers;}
-
-
-   private:
-      // Chamber type : true = normal ; false = cryo
-      //bool     m_ChamberType;
-      G4int     m_ChamberType;
-
-      // Standard parameter
-      G4double    m_ChamberRmin;
-      G4double    m_ChamberRmax;
-      G4double    m_ChamberPhiMin;
-      G4double    m_ChamberPhiMax;
-      G4double    m_ChamberThetaMin;
-      G4double    m_ChamberThetaMax;
-      G4Material* m_ChamberMaterial;
-      G4int       m_ChamberNbLayers;
+	public:
+	   Chamber();
+	   ~Chamber(){};
+
+
+	public:
+		//	Read stream at Configfile to pick-up parameters of detector (Position,...)
+		//	Called in DetecorConstruction::ReadDetextorConfiguration Method
+		//void ReadConfiguration(string Path);
+      		void ReadConfiguration(NPL::InputParser);
+
+		//	Construct detector and inialise sensitive part.
+		//	Called After DetecorConstruction::AddDetector Method
+		void ConstructDetector(G4LogicalVolume* world);
+
+		//	Add Detector branch to the EventTree.
+		//	Called After DetecorConstruction::AddDetector Method
+		void InitializeRootOutput();
+
+		//	Read sensitive part and fill the Root tree.
+		//	Called at in the EventAction::EndOfEventAvtion
+		void ReadSensitive(const G4Event* event);
+
+
+	public:
+		//	Return Material from the Chamber Material Library
+		G4Material* GetMaterialFromLibrary(G4String MaterialName, G4double Temperature = 0, G4double Pressure = 0);
+		
+		//	Generate a DEDX file table using the material used in the target
+		void 				WriteDEDXTable(G4ParticleDefinition* Particle,G4double Emin,G4double Emax);
+
+	public:
+		G4double    GetChamberRmin()	{return m_ChamberRmin;}
+		G4double    GetChamberRmax()			{return m_ChamberRmax;}
+		G4double    GetChamberPhiMin()			{return m_ChamberPhiMin;}
+		G4double    GetChamberPhiMax()			{return m_ChamberPhiMax;}
+		G4double    GetChamberThetaMin()		{return m_ChamberThetaMin;}
+		G4double    GetChamberThetaMax()		{return m_ChamberThetaMax;}
+		G4Material* GetChamberMaterial()		{return m_ChamberMaterial;}
+  //G4int       GetChamberNbLayers()		{return m_ChamberNbLayers;}
+
+
+	private:
+		// Chamber type : true = normal ; false = cryo
+		//bool     m_ChamberType;
+                // Chamber type : 0=normal ; 1=cryo ; 2 = GREAT
+		G4int     m_ChamberType;
+
+		// Standard parameter
+		G4double    m_ChamberRmin;
+		G4double    m_ChamberRmax;
+		G4double    m_ChamberPhiMin;
+		G4double    m_ChamberPhiMax;
+		G4double    m_ChamberThetaMin;
+		G4double    m_ChamberThetaMax;
+		G4Material* m_ChamberMaterial;
+		G4int       m_ChamberNbLayers;
+
+		// GREAT chamber parameter
+		G4double    m_ChamberHmin;
+		G4double    m_ChamberHmax;
+		G4double    m_ChamberWmin;
+		G4double    m_ChamberWmax;
+		G4double    m_ChamberDmin;
+		G4double    m_ChamberDmax;
+
+		// MARA chamber parameter
+		G4LogicalVolume* m_LogicalGDML;
+
+		G4String m_GDMLPath;
+		G4String m_GDMLName;
+		G4String m_GDMLWorld;
+
   /*
-      // For Cryo Chamber
-      G4double    m_ChamberTemperature;
-      G4double    m_ChamberPressure;
-      G4double    m_WindowsThickness;
-      G4Material* m_WindowsMaterial;
-
-      // Positioning
-      G4double    m_ChamberX;
-      G4double    m_ChamberY;
-      G4double    m_ChamberZ;
+		// For Cryo Chamber
+		G4double    m_ChamberTemperature;
+		G4double    m_ChamberPressure;
+		G4double    m_WindowsThickness;
+		G4Material* m_WindowsMaterial;
+
+		// Positioning
+		G4double    m_ChamberX;
+		G4double    m_ChamberY;
+		G4double    m_ChamberZ;
   */
 
-  // GREAT chamber parameter
-        G4double    m_ChamberHmin;
-       	G4double    m_ChamberHmax;
-       	G4double    m_ChamberWmin;
-       	G4double    m_ChamberWmax;
-       	G4double    m_ChamberDmin;
-       	G4double    m_ChamberDmax;
-
   /* Karl's geometry of GREAT: */
 
   //Gap between BackPlate and SiSupport
@@ -369,8 +379,6 @@ private:
   void Place_GREAT_LookingUpstream(G4LogicalVolume* world);
 
 
-
-
 };
 
 #endif
diff --git a/NPSimulation/Core/MyMagneticField.cc b/NPSimulation/Core/MyMagneticField.cc
index 7c3cbb90be162469737d3ef89dc965014ae18fa4..739142ad9efb5ff4984f82ebbfdbb58d0465af70 100644
--- a/NPSimulation/Core/MyMagneticField.cc
+++ b/NPSimulation/Core/MyMagneticField.cc
@@ -25,9 +25,9 @@
 MyMagneticField::MyMagneticField(const G4ThreeVector& FieldVector)
 {
   
-  fFieldComponents[0]= FieldVector.x()*tesla;
-  fFieldComponents[1]= FieldVector.y()*tesla;
-  fFieldComponents[2]= FieldVector.z()*tesla;
+  fFieldComponents[0]= FieldVector.x();
+  fFieldComponents[1]= FieldVector.y();
+  fFieldComponents[2]= FieldVector.z();
 
   //rmax = std::sqrt(625.)*cm;
   rbore = 49.*cm; // bore radius  !! 49 instead of 50 to avoid issues at volume boundaries
@@ -41,7 +41,6 @@ MyMagneticField::MyMagneticField(const G4ThreeVector& FieldVector)
    Bz0=fFieldComponents[2]; // nominal field
    //G4cout << "FieldVector.z()=" << FieldVector.z() << G4endl;
    //G4cout << "tesla=" << tesla << " megavolt*ns/mm2" << G4endl;
-   G4cout << "Bz0=" << Bz0 << " megavolt*ns/mm2 (default units)" << G4endl;
    G4cout << "Bz0=" << Bz0/tesla << " tesla" << G4endl;
    //G4cout << "zbore=" << zbore << " mm (default units)" << G4endl;
    //G4cout << "rbore=" << rbore << " mm (default units)" << G4endl;
diff --git a/NPSimulation/Scorers/SiliconScorers.hh b/NPSimulation/Scorers/SiliconScorers.hh
index ccbc133f0ce6ec799af195853df46c76b02ade17..a7ac968ea03ec2364af6ec31fc92792105937ec3 100644
--- a/NPSimulation/Scorers/SiliconScorers.hh
+++ b/NPSimulation/Scorers/SiliconScorers.hh
@@ -157,7 +157,7 @@ namespace SILICONSCORERS {
       G4int m_DetectorNumber    ;
       G4int m_StripLengthNumber ;
       G4int m_StripWidthNumber  ;
-      G4int m_Index             ;
+      G4long m_Index             ;
 
   };
 
@@ -219,7 +219,7 @@ namespace SILICONSCORERS {
       G4int m_StripRingNumber   ;
       G4int m_StripSectorNumber    ;
       G4int m_StripQuadrantNumber ;
-      G4int m_Index               ;
+      G4long m_Index               ;
 
   };
   //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
@@ -271,7 +271,7 @@ namespace SILICONSCORERS {
       G4ThreeVector m_Position  ;
       G4int m_DetectorNumber    ;
       G4int m_StripWidthNumber  ;
-      G4int m_Index             ;
+      G4long m_Index             ;
 
   };
 
diff --git a/Projects/T40/Analysis.cxx b/Projects/T40/Analysis.cxx
index 37f2d83cb3b474859d1d53a3da764d714286d08f..2f3d8f7148b10487dc46a4daf41edcdd2ec4996f 100644
--- a/Projects/T40/Analysis.cxx
+++ b/Projects/T40/Analysis.cxx
@@ -146,11 +146,11 @@ void Analysis::Init(){
 
   //FPD
   Delta_E = 0; // Energy ionisation chamber
-  Micro_E = 0; // Energy from micromega total
-	Micro_E_row1_2 = 0; // Energy from micromega rows 1 & 2 ("delta E in stopping mode")
-	Micro_E_row3_6 = 0; // Energy from micromega rows 3-6  ("E in stopping mode")
-  Micro_E_row1 = 0 ;// Energy from micromega row 1
-  Micro_E_col4 = 0 ;// energy from micromega col 1
+  Micro2_E = 0; // Energy from micromega total
+	Micro1_E_row1_2 = 0; // Energy from micromega rows 1 & 2 ("delta E in stopping mode")
+	Micro2_E_row1_2 = 0; // Energy from micromega rows 1-2  ("E in stopping mode")
+  Micro1_E_row1 = 0 ;// Energy from micromega row 1
+  Micro1_E_col4 = 0 ;// energy from micromega col 1
   Plast_E = 0; // Energy Plastic
 	for(int i=0; i< kNumAw; ++i) {
 		Aw_X[i] = -1000;
@@ -296,7 +296,7 @@ void Analysis::TreatEvent(){
   /////////////////////////////
   // Part 2 : Calculate Doppler-Corrected energies for singles, and addback spectra
   TG->DCSingles(RecoilBeta);
-  TG->AddBack(RecoilBeta,1); 
+  TG->AddBack(RecoilBeta);
 
   /////////////////////////// LOOP on Ge TAMU /////////////////////////////
   //for(unsigned int countGe = 0 ; countGe < TG->Singles_E.size() ; countGe++){ // multiplicity treated for now is zero
@@ -311,19 +311,19 @@ void Analysis::TreatEvent(){
 	// Sums across various rows & columns
 	if(TF->MicroRowNumber.size())
 	{
-		Micro_E_row1 = TF->GetMicroGroupEnergy(1,1,1,7); // energy sum from the row 1
-		Micro_E_col4 = TF->GetMicroGroupEnergy(1,4,4,4); // energy sum from the col 4
-		Micro_E      = TF->GetMicroGroupEnergy(1,4,1,7); // energy sum from all the pads
-		Micro_E_row1_2 = TF->GetMicroGroupEnergy(1,2,1,7); // energy sum from row 1-2
-		Micro_E_row3_6 = TF->GetMicroGroupEnergy(3,6,1,7); // energy sum from row 3-6
+		Micro1_E_row1 = TF->GetMicroGroupEnergy(1,1,1,1,7); // energy sum from the row 1
+		Micro1_E_col4 = TF->GetMicroGroupEnergy(1,1,4,4,4); // energy sum from the col 4
+		Micro2_E      = TF->GetMicroGroupEnergy(2,1,4,1,7); // energy sum from all the pads
+		Micro1_E_row1_2 = TF->GetMicroGroupEnergy(1,1,2,1,7); // energy sum from row 1-2
+		Micro2_E_row1_2 = TF->GetMicroGroupEnergy(2,1,2,1,7); // energy sum from row 3-6
 	}
 	else
 	{
-		Micro_E_row1 = -1000;
-		Micro_E_col4 = -1000;
-		Micro_E_row1_2 = -1000;
-		Micro_E_row3_6 = -1000;
-		Micro_E      = -1000;
+		Micro1_E_row1 = -1000;
+		Micro1_E_col4 = -1000;
+		Micro1_E_row1_2 = -1000;
+		Micro2_E_row1_2 = -1000;
+		Micro2_E      = -1000;
 	}
 	// Delta E ion chamber
 	Delta_E      = TF->DeltaEnergy.empty() ? -1000 : TF->DeltaEnergy[0];
@@ -428,11 +428,11 @@ void Analysis::ReInitValue(){
 
   //FPD
   Delta_E      = -1000;
-  Micro_E_row1 = -1000;
-  Micro_E_col4 = -1000;
- 	Micro_E_row1_2 = -1000;
-	Micro_E_row3_6 = -1000;
-	Micro_E      = -1000;
+  Micro1_E_row1 = -1000;
+  Micro1_E_col4 = -1000;
+ 	Micro1_E_row1_2 = -1000;
+	Micro2_E_row1_2 = -1000;
+	Micro2_E      = -1000;
   Plast_E      = -1000;
 
 	for(int i=0; i< kNumAw; ++i) {
@@ -474,11 +474,11 @@ void Analysis::InitOutputBranch() {
 
   //FPD
   RootOutput::getInstance()->GetTree()->Branch("Delta_E",&Delta_E,"Delta_E/D");
-  RootOutput::getInstance()->GetTree()->Branch("Micro_E_row1",&Micro_E_row1,"Micro_E_row1/D");
-  RootOutput::getInstance()->GetTree()->Branch("Micro_E_col4",&Micro_E_col4,"Micro_E_col4/D");
-	RootOutput::getInstance()->GetTree()->Branch("Micro_E_row1_2", &Micro_E_row1_2, "Micro_E_row1_2/D");
-	RootOutput::getInstance()->GetTree()->Branch("Micro_E_row3_6", &Micro_E_row3_6, "Micro_E_row3_6/D");
-  RootOutput::getInstance()->GetTree()->Branch("Micro_E",&Micro_E,"Micro_E/D");
+  RootOutput::getInstance()->GetTree()->Branch("Micro1_E_row1",&Micro1_E_row1,"Micro1_E_row1/D");
+  RootOutput::getInstance()->GetTree()->Branch("Micro1_E_col4",&Micro1_E_col4,"Micro1_E_col4/D");
+	RootOutput::getInstance()->GetTree()->Branch("Micro1_E_row1_2", &Micro1_E_row1_2, "Micro1_E_row1_2/D");
+	RootOutput::getInstance()->GetTree()->Branch("Micro2_E_row1_2", &Micro2_E_row1_2, "Micro2_E_row1_2/D");
+  RootOutput::getInstance()->GetTree()->Branch("Micro2_E",&Micro2_E,"Micro2_E/D");
   RootOutput::getInstance()->GetTree()->Branch("Plast_E",&Plast_E,"Plast_E/D");
   RootOutput::getInstance()->GetTree()->Branch("Aw_X",Aw_X,Form("Aw_X[%i]/D", kNumAw));
   RootOutput::getInstance()->GetTree()->Branch("Aw_Z",Aw_Z,Form("Aw_Z[%i]/D", kNumAw));
diff --git a/Projects/T40/Analysis.h b/Projects/T40/Analysis.h
index a9b18a1a01344b2d4ec0583a89529f8a5d486a87..4465d2bf56aff95c471c346ae24c2d80e4ddb8b0 100644
--- a/Projects/T40/Analysis.h
+++ b/Projects/T40/Analysis.h
@@ -102,11 +102,11 @@ class Analysis: public NPL::VAnalysis{
   //FPD
 	static const Int_t kNumAw = 4; // number of wires
   double Delta_E      ;
-  double Micro_E_row1 ;   
-  double Micro_E_col4 ; 
-  double Micro_E      ;
-	double Micro_E_row1_2;
-	double Micro_E_row3_6;
+  double Micro1_E_row1 ;   
+  double Micro1_E_col4 ; 
+  double Micro1_E_row1_2;
+  double Micro2_E      ;
+	double Micro2_E_row1_2;
   double Plast_E      ;
 	double Aw_X[kNumAw] ;
 	double Aw_Z[kNumAw] ;
diff --git a/Projects/T40/T40.detector b/Projects/T40/T40.detector
index 471ab9c0c06830e57a59b86a0af53646ec045923..43fa6a3213633701a87d12c54ac7e12d4d36a39b 100644
--- a/Projects/T40/T40.detector
+++ b/Projects/T40/T40.detector
@@ -52,6 +52,10 @@ FPDTamu DELTA
 FPDTamu MICRO
  UPSTREAM-LEFT=  +154 +00 +340 mm
  UPSTREAM-RIGHT= -154 +00 +340 mm
+% position of second micro not verified 
+FPDTamu MICRO
+ UPSTREAM-LEFT=  +154 +00 +360 mm
+ UPSTREAM-RIGHT= -154 +00 +360 mm
 %%%%%%%%%%%%%%%%%%%%%
 % All AWIRE detectors
 FPDTamu AWIRE
diff --git a/Projects/T40/configs/ConfigGeTamu.dat b/Projects/T40/configs/ConfigGeTamu.dat
new file mode 100644
index 0000000000000000000000000000000000000000..92086c035ef2c005a373879107754bf53aa62d0f
--- /dev/null
+++ b/Projects/T40/configs/ConfigGeTamu.dat
@@ -0,0 +1,15 @@
+ConfigGeTamu
+  %%%%%%%% Default is high energy 
+  %LOW_GAIN_ENERGY
+	%%%%%%%% Defective channels 
+	%DISABLE_ALL     CLOVER04
+	%DISABLE_CHANNEL CLOVER01_SEG01
+	%%%%%%%% Thresh. in "channels" for Raw, in keV for Calibrated
+  CRY_E_RAW_THRESHOLD 300
+  SEG_E_RAW_THRESHOLD 300
+  CRY_E_THRESHOLD 100
+  SEG_E_THRESHOLD 100
+  %%%%%%%% ADD Back scheme for the analysis
+  ADD_BACK_CLOVER
+  %ADD_BACK_ARRAY
+  %ADD_BACK_FACING