]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/Config_slat.C
MUONrawcluster ready to compile
[u/mrichter/AliRoot.git] / MUON / Config_slat.C
index f933c28ebf54f71c5803dc29d927f9e5df4e00ad..275ee142fd7ed3cfb7fda1412b583d234827e539 100644 (file)
@@ -10,21 +10,24 @@ Int_t ntracks=1;
 void Config()
 
 {
-new AliGeant3("C++ Interface to Geant3");
+
+ gSystem->Load("libgeant321");
+ new     TGeant3("C++ Interface to Geant3");
+ TGeant3 *geant3 = (TGeant3*)gMC;
 
 //=======================================================================
 //  Create the output file
    
-TFile *rootfile = new TFile("galice.root","recreate");
-rootfile->SetCompressionLevel(2);
-TGeant3 *geant3 = (TGeant3*)gMC;
+ TFile *rootfile = new TFile("galice.root","recreate");
+ rootfile->SetCompressionLevel(2);
+ TGeant3 *geant3 = (TGeant3*)gMC;
+ AliDecayer* decayer = new AliDecayerPythia();
+ decayer->SetForceDecay(kAll);
+ decayer->Init();
+ gMC->SetExternalDecayer(decayer);
+
 //=======================================================================
 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
- geant3->fGctrak->maxnst=1000000;
- geant3->fGcflag->nrndm[0]=10;
- geant3->fGcflag->nrndm[1]=11; 
 geant3->SetTRIG(1);          //Number of events to be processed 
 geant3->SetSWIT(4,100);
 geant3->SetDEBU(0,0,1);
@@ -50,7 +53,7 @@ Float_t tofmax = 1.e10;
 //              GAM    ELEC   NHAD   CHAD   MUON  EBREM  MUHAB EDEL MUDEL MUPA TOFMAX
 geant3->SetCUTS(1.e-4, 1.e-4, 1.e-3, 1.e-4, 1.e-3, cut,  cut,  cut, cut,  cut, 1.e-5);
 
- gAlice->TrackingLimits( 700, 1500);
+gAlice->TrackingLimits(700, 2000);
  
 //
 //=======================================================================
@@ -76,14 +79,14 @@ geant3->SetCUTS(1.e-4, 1.e-4, 1.e-3, 1.e-4, 1.e-3, cut,  cut,  cut, cut,  cut, 1
 // Example for Moving Particle Gun            *
 //*********************************************
      AliGenBox *gener = new AliGenBox(ntracks);
-     gener->SetMomentumRange(3,4);
-     gener->SetPhiRange(-360,360);
-     gener->SetThetaRange(2., 10.);
-     gener->SetOrigin(25,25,510.5);   
+     gener->SetMomentumRange(33,34);
+     gener->SetPhiRange(-180,180);
+     gener->SetThetaRange(2., 9.);
+     gener->SetOrigin(0,0,0);   
      gener->SetVertexSmear(kPerTrack); 
      //vertex position
-     gener->SetSigma(1.8, 1.8,0);           //Sigma in (X,Y,Z) (cm) on IP position
-     gener->SetPart(kProton);                    //GEANT particle type
+     gener->SetSigma(0, 0, 0);   // Sigma in (X,Y,Z) (cm) on IP position
+     gener->SetPart(kMuonPlus);    // GEANT particle type
      break;
  case scan:  
 //*********************************************
@@ -96,7 +99,7 @@ geant3->SetCUTS(1.e-4, 1.e-4, 1.e-3, 1.e-4, 1.e-3, cut,  cut,  cut, cut,  cut, 1
      //vertex position
      gener->SetSigma(1,1,0);           //Sigma in (X,Y,Z) (cm) on IP position
      gener->SetPart(kMuonMinus); 
-     gener->SetRange(20, -200, 200, 20, -200., 200., 1, 900, 900);
+     gener->SetRange(100, -300., 300., 100, -300., 300., 1, 900, 900);
      break;
  case doublescan:  
 //*********************************************
@@ -145,8 +148,6 @@ geant3->SetCUTS(1.e-4, 1.e-4, 1.e-3, 1.e-4, 1.e-3, cut,  cut,  cut, cut,  cut, 1
      gener->SetPhiRange(-180,180);
      gener->SetThetaRange(0.104,90.0);
 //     gener->SetFlavor(4);
-     
-     
      gener->SetOrigin(0., 0.0 ,0);
      gener->SetSigma(0,0,5.3);
      gener->SetVertexSmear(kPerEvent); 
@@ -168,8 +169,8 @@ AliGenPythia *gener = new AliGenPythia(ntracks);
      //gener->SetVertexSmear(kPerEvent);
      //gener->SetSigma(0,0,5.6);         // Sigma in (X,Y,Z) (cm) on IP
 position
-     gener->SetStrucFunc(DO_Set_1);
-     gener->SetProcess(charm);
+     gener->SetStrucFunc(kDO_Set_1);
+     gener->SetProcess(kPyCharm);
      gener->SetEnergyCMS(5500.);
      break;              
 /*
@@ -192,22 +193,19 @@ position
  */   
  case param:
 //*******************************************************
-// Example for J/psi  Production from  Parameterisation *
+// Example for J/psi or Upsilon Production from  Parameterisation *
 //*******************************************************
-     AliGenParam *gener =
-        new AliGenParam(ntracks,upsilon_p,
-                        AliGenMUONlib::GetPt(upsilon_p),
-                        AliGenMUONlib::GetY(upsilon_p),
-                        AliGenMUONlib::GetIp(upsilon_p));
+     AliGenParam *gener = new AliGenParam(ntracks, AliGenMUONlib::kUpsilon);
      gener->SetMomentumRange(0,999);
+     gener->SetPtRange(0.,100.);
      gener->SetPhiRange(-180, 180);
      gener->SetYRange(2.5,4);
      gener->SetCutOnChild(1);
-     gener->SetChildThetaRange(2,9);
+     gener->SetChildThetaRange(2.0,9);
      gener->SetOrigin(0,0,0);          //vertex position
      gener->SetSigma(0,0,0);           //Sigma in (X,Y,Z) (cm) on IP position
-     gener->SetForceDecay(dimuon);
-     gener->SetTrackingFlag(0);
+     gener->SetForceDecay(kDiMuon);
+     gener->SetTrackingFlag(1);
 
      break;
      
@@ -258,8 +256,8 @@ position
      gener->SetPhiRange(0,360);
      gener->SetThetaRange(2.,9.);
      gener->SetTrackingFlag(0);
-     AliGenParam *Pi0 = new AliGenParam(100, new AliGenPMDlib(), Pion);
-     AliGenParam *Eta = new AliGenParam( 10, new AliGenPMDlib(), Eta);
+     AliGenParam *Pi0 = new AliGenParam(100, new AliGenPMDlib(), AliGenPMDlib::kPion);
+     AliGenParam *Eta = new AliGenParam( 10, new AliGenPMDlib(), AliGenPMDlib::kEta);
      gener->AddGenerator(Pi0, "neutral pions"  , 1.);
      gener->AddGenerator(Eta, "neutral etas"  ,  1.);
      break;
@@ -267,15 +265,15 @@ position
  
 
 gener->Init();
-gAlice->SetField(0,1);    //Specify maximum magnetic field in Tesla (neg. ==> default field)
+gAlice->SetField(2,1);    //Specify maximum magnetic field in Tesla (neg. ==> default field)
 
 Int_t iFRAME  =0;
 Int_t iMAG    =0;
 Int_t iITS    =0;
-Int_t iABSO   =0;
-Int_t iDIPO   =0;
+Int_t iABSO   =1;
+Int_t iDIPO   =1;
 Int_t iHALL   =0;
-Int_t iSHIL   =0;
+Int_t iSHIL   =1;
 Int_t iPIPE   =0;
 Int_t iFMD    =0;
 Int_t iMUON   =1;
@@ -316,7 +314,7 @@ if(iHALL) {
 if(iSHIL) {
 //=================== SHIL parameters ============================
 //    AliSHIL *SHIL  = new AliSAROV("SHIL","Shielding");
-    AliSHILv0 *SHIL  = new AliSHILv0("SHIL","Shielding");
+    AliSHILvF *SHIL  = new AliSHILvF("SHIL","Shielding");
     SHIL->SetPbCone(1);
 //    AliSAROV *SHIL  = new AliSAROV("SHIL","Shielding");
 }
@@ -337,7 +335,7 @@ if(iMUON) {
 //=================== MUON parameters ===========================
 
 AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
- MUON->SetIshunt(1);
+ MUON->SetIshunt(0);
  MUON->SetMaxStepGas(0.1);
  MUON->SetMaxStepAlu(0.1);
 //
@@ -353,16 +351,33 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
 //  
  Int_t chamber;
  Int_t station;
-// Default response
+ // Default response: 5 mm of gas
  AliMUONResponseV0* response0 = new AliMUONResponseV0;
- response0->SetSqrtKx3AndDeriveKx2Kx4(0.7131);
- response0->SetSqrtKy3AndDeriveKy2Ky4(0.7642);
- response0->SetPitch(0.25);
+ response0->SetSqrtKx3AndDeriveKx2Kx4(0.7131); // sqrt(0.5085)
+ response0->SetSqrtKy3AndDeriveKy2Ky4(0.7642); // sqrt(0.5840)
+ response0->SetPitch(0.25); // anode-cathode distance
  response0->SetSigmaIntegration(10.);
  response0->SetChargeSlope(50);
  response0->SetChargeSpread(0.18, 0.18);
  response0->SetMaxAdc(4096);
  response0->SetZeroSuppression(6);
+
+ // Response for 4 mm of gas (station 1)
+ // automatic consistency with width of sensitive medium in CreateGeometry ????
+ AliMUONResponseV0* responseSt1 = new AliMUONResponseV0;
+ // Mathieson parameters from L.Kharmandarian's thesis, page 190
+ responseSt1->SetSqrtKx3AndDeriveKx2Kx4(0.7000); // sqrt(0.4900)
+ responseSt1->SetSqrtKy3AndDeriveKy2Ky4(0.7550); // sqrt(0.5700)
+ responseSt1->SetPitch(0.20); // anode-cathode distance
+ responseSt1->SetSigmaIntegration(10.);
+ // ChargeSlope larger to compensate for the smaller anode-cathode distance
+ // and keep the same most probable ADC channel for mip's
+ responseSt1->SetChargeSlope(62.5); 
+ // assumed proportionality to anode-cathode distance for ChargeSpread
+ responseSt1->SetChargeSpread(0.144, 0.144);
+ responseSt1->SetMaxAdc(4096);
+ responseSt1->SetZeroSuppression(6);
+
 //--------------------------------------------------------
 // Configuration for Chamber TC1/2  (Station 1) ----------           
 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -373,45 +388,48 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
 //^^^^^^^^^
  MUON->SetNsec(chamber-1,2);
 //
- AliMUONSegmentationV01 *seg11=new AliMUONSegmentationV01;
+ AliMUONSegmentationV01 *seg11=new AliMUONSegmentationV01(4);
  
  seg11->SetSegRadii(rseg1);
- seg11->SetPadSize(3, 0.5);
- seg11->SetDAnod(3.0/3./4);
+ seg11->SetPadSize(2.4, 0.4); // smaller pad size
+ seg11->SetDAnod(0.20); // smaller distance between anode wires
  seg11->SetPadDivision(nseg1);
  
  MUON->SetSegmentationModel(chamber-1, 1, seg11);
-//
- AliMUONSegmentationV02 *seg12=new AliMUONSegmentationV02;
+
+ AliMUONSegmentationV02 *seg12=new AliMUONSegmentationV02(4);
  seg12->SetSegRadii(rseg1); 
- seg12->SetPadSize(0.75, 2.0);
- seg12->SetDAnod(3.0/3./4);
+ seg12->SetPadSize(0.6, 1.6); // smaller pad size
+ seg12->SetDAnod(0.20); // smaller distance between anode wires
  seg12->SetPadDivision(nseg1);
 
  MUON->SetSegmentationModel(chamber-1, 2, seg12);
 
- MUON->SetResponseModel(chamber-1, response0);     
+ MUON->SetResponseModel(chamber-1, responseSt1); // special response       
+ MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
 
  chamber=2;
 //^^^^^^^^^
 //
  MUON->SetNsec(chamber-1,2);
 //
- AliMUONSegmentationV01 *seg21=new AliMUONSegmentationV01;
+ AliMUONSegmentationV01 *seg21=new AliMUONSegmentationV01(4);
  seg21->SetSegRadii(rseg1);
- seg21->SetPadSize(3, 0.5);
- seg21->SetDAnod(3.0/3./4);
+ seg21->SetPadSize(2.4, 0.4); // smaller pad size
+ seg21->SetDAnod(0.20); // smaller distance between anode wires
  seg21->SetPadDivision(nseg1);
  MUON->SetSegmentationModel(chamber-1, 1, seg21);
 //
- AliMUONSegmentationV02 *seg22=new AliMUONSegmentationV02;
+ AliMUONSegmentationV02 *seg22=new AliMUONSegmentationV02(4);
  seg22->SetSegRadii(rseg1); 
- seg22->SetPadSize(0.75, 2.);
- seg22->SetDAnod(3.0/3./4);
+ seg22->SetPadSize(0.6, 1.6); // smaller pad size
+ seg22->SetDAnod(0.20); // smaller distance between anode wires
  seg22->SetPadDivision(nseg1);
  MUON->SetSegmentationModel(chamber-1, 2, seg22);
 
- MUON->SetResponseModel(chamber-1, response0);     
+ MUON->SetResponseModel(chamber-1, responseSt1); // special response
+ MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
+           
 //
 //--------------------------------------------------------
 // Configuration for Chamber TC3/4 (Station 2) -----------
@@ -424,77 +442,70 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
 //^^^^^^^^^
  MUON->SetNsec(chamber-1,2);
 //
- AliMUONSegmentationV01 *seg31=new AliMUONSegmentationV01;
+ AliMUONSegmentationV01 *seg31=new AliMUONSegmentationV01(4);
  seg31->SetSegRadii(rseg2);
- seg31->SetPadSize(6, 0.5);
+ seg31->SetPadSize(3.0, 0.5);
  seg31->SetDAnod(3.0/3./4);
  seg31->SetPadDivision(nseg2);
  MUON->SetSegmentationModel(chamber-1, 1, seg31);
 //
- AliMUONSegmentationV02 *seg32=new AliMUONSegmentationV02;
+ AliMUONSegmentationV02 *seg32=new AliMUONSegmentationV02(4);
  seg32->SetSegRadii(rseg2); 
- seg32->SetPadSize(0.75, 4.);
+ seg32->SetPadSize(0.75, 2.0);
  seg32->SetPadDivision(nseg2);
  seg32->SetDAnod(3.0/3./4);
 
  MUON->SetSegmentationModel(chamber-1, 2, seg32);
 
  MUON->SetResponseModel(chamber-1, response0);     
+ MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
 
  chamber=4;
 //^^^^^^^^^
 //
  MUON->SetNsec(chamber-1,2);
 //
- AliMUONSegmentationV01 *seg41=new AliMUONSegmentationV01;
+ AliMUONSegmentationV01 *seg41=new AliMUONSegmentationV01(4);
  seg41->SetSegRadii(rseg2);
- seg41->SetPadSize(6, 0.5);
+ seg41->SetPadSize(3.0, 0.5);
  seg41->SetDAnod(3.0/3./4);
  seg41->SetPadDivision(nseg2);
  MUON->SetSegmentationModel(chamber-1, 1, seg41);
 //
- AliMUONSegmentationV02 *seg42=new AliMUONSegmentationV02;
+ AliMUONSegmentationV02 *seg42=new AliMUONSegmentationV02(4);
  seg42->SetSegRadii(rseg2); 
- seg42->SetPadSize(0.75, 4.);
+ seg42->SetPadSize(0.75, 2.0);
  seg42->SetPadDivision(nseg2);
  seg42->SetDAnod(3.0/3./4);
 
  MUON->SetSegmentationModel(chamber-1, 2, seg42);
 
  MUON->SetResponseModel(chamber-1, response0);     
+ MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
 
 
 //--------------------------------------------------------
 // Configuration for Chamber TC5/6  (Station 3) ----------          
 //^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  Int_t   nseg3[4]={4, 4, 2, 1};
-/*
- Int_t   npcb5[32] = {0,0,2,0,
-                     0,1,2,0,
-                     0,2,1,1,
-                     0,2,1,0,
-                     0,2,1,0, 
-                     0,2,1,1, 
+ Int_t   npcb5[36] = {0,0,2,0,
+                     0,0,3,0,
+                     0,1,3,0,
+                     0,2,2,0,
                      0,1,2,0, 
-                     0,0,2,0};
- */ 
- Int_t   npcb5[32] = {0,0,1,1,
-                     0,1,1,1,
-                     0,2,1,1,
-                     0,1,1,1,
-                     0,1,1,1, 
-                     0,2,1,1, 
-                     0,1,1,1, 
-                     0,0,1,1};
+                     0,2,2,0, 
+                     0,1,3,0, 
+                     0,0,3,0,
+                      0,0,2,0};
 
  Float_t shift = 1.5/2.;
- Float_t xpos5[8]    = {2., 2., 2., 42., 42., 2., 2., 2.};
- Float_t ypos5       = -(4.*(40.-2.*shift)+shift);
+ Float_t xpos5[9]    = {2., 2., 2., 2.,33., 2., 2., 2., 2.};
+ Float_t ypos5       = -(20.+4.*(40.-2.*shift));
 
  chamber=5;
  MUON->SetNsec(chamber-1,2);
- AliMUONSegmentationSlat *seg51=new AliMUONSegmentationSlat;
- seg51->SetNSlats(8); 
+ AliMUONSegmentationSlat *seg51=new AliMUONSegmentationSlat(4);
+ seg51->SetNSlats(9); 
  seg51->SetShift(shift);  
  seg51->SetNPCBperSector(npcb5); 
  seg51->SetSlatXPositions(xpos5);
@@ -504,8 +515,8 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
  seg51->SetPadDivision(nseg3);
  MUON->SetSegmentationModel(chamber-1, 1, seg51);
 
- AliMUONSegmentationSlatN *seg52=new AliMUONSegmentationSlatN;
- seg52->SetNSlats(8); 
+ AliMUONSegmentationSlatN *seg52=new AliMUONSegmentationSlatN(4);
+ seg52->SetNSlats(9); 
  seg52->SetShift(shift);  
  seg52->SetNPCBperSector(npcb5); 
  seg52->SetSlatXPositions(xpos5);
@@ -515,11 +526,12 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
  seg52->SetPadDivision(nseg3);
  MUON->SetSegmentationModel(chamber-1, 2, seg52);
  MUON->SetResponseModel(chamber-1, response0);     
+ MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
 
  chamber=6;
  MUON->SetNsec(chamber-1,2);
- AliMUONSegmentationSlat *seg61=new AliMUONSegmentationSlat;
- seg61->SetNSlats(8); 
+ AliMUONSegmentationSlat *seg61=new AliMUONSegmentationSlat(4);
+ seg61->SetNSlats(9); 
  seg61->SetShift(shift);  
  seg61->SetNPCBperSector(npcb5); 
  seg61->SetSlatXPositions(xpos5);
@@ -529,8 +541,8 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
  seg61->SetPadDivision(nseg3);
  MUON->SetSegmentationModel(chamber-1, 1, seg61);
 
- AliMUONSegmentationSlatN *seg62=new AliMUONSegmentationSlatN;
- seg62->SetNSlats(8); 
+ AliMUONSegmentationSlatN *seg62=new AliMUONSegmentationSlatN(4);
+ seg62->SetNSlats(9); 
  seg62->SetShift(shift);  
  seg62->SetNPCBperSector(npcb5); 
  seg62->SetSlatXPositions(xpos5);
@@ -540,6 +552,7 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
  seg62->SetPadDivision(nseg3);
  MUON->SetSegmentationModel(chamber-1, 2, seg62);
  MUON->SetResponseModel(chamber-1, response0);     
+ MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
 
 //--------------------------------------------------------
 // Configuration for Chamber TC7/8  (Station 4) ----------           
@@ -552,19 +565,19 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
 
  MUON->SetNsec(chamber-1,2);
 //
- AliMUONSegmentationSlat *seg71=new AliMUONSegmentationSlat;
- Int_t npcb7[44] = {0,0,0,2,
-                   0,0,0,3,
+ AliMUONSegmentationSlat *seg71=new AliMUONSegmentationSlat(4);
+ Int_t npcb7[44] = {0,0,0,3,
                    0,0,2,2,
-                   0,1,2,2,
-                   0,2,1,2,
-                    0,2,1,1, 
-                   0,2,1,2, 
-                   0,1,2,2, 
+                   0,0,3,2,
+                   0,2,2,1,
+                   0,2,2,1,
+                    0,1,2,1, 
+                   0,2,2,1, 
+                   0,2,2,1, 
+                   0,0,3,2, 
                    0,0,2,2, 
-                   0,0,0,3, 
-                   0,0,0,2};
- Float_t xpos7[11]   = {2., 2., 2., 2., 2., 39.5, 2., 2., 2., 2., 2.};
+                   0,0,0,3};
+ Float_t xpos7[11]   = {2., 2., 2., 2., 2., 40.5, 2., 2., 2., 2., 2.};
  Float_t ypos7       = -(20.+5.*(40.-2.*shift));
  
  seg71->SetNSlats(11);  
@@ -578,7 +591,7 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
  seg71->SetPadDivision(nseg4);
  MUON->SetSegmentationModel(chamber-1, 1, seg71);
 
- AliMUONSegmentationSlatN *seg72=new AliMUONSegmentationSlatN;
+ AliMUONSegmentationSlatN *seg72=new AliMUONSegmentationSlatN(4);
 
  MUON->SetSegmentationModel(chamber-1, 2, seg72);
  seg72->SetNSlats(11);  
@@ -591,12 +604,13 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
  seg72->SetPadDivision(nseg4);
 
  MUON->SetResponseModel(chamber-1, response0);     
+ MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
 
  chamber=8;
 //^^^^^^^^^
  MUON->SetNsec(chamber-1,2);
 //
- AliMUONSegmentationSlat *seg81=new AliMUONSegmentationSlat;
+ AliMUONSegmentationSlat *seg81=new AliMUONSegmentationSlat(4);
 
  seg81->SetNSlats(11);  
  seg81->SetShift(shift);  
@@ -608,7 +622,7 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
  seg81->SetPadDivision(nseg4);
  MUON->SetSegmentationModel(chamber-1, 1, seg81);
 
- AliMUONSegmentationSlat *seg82=new AliMUONSegmentationSlatN;
+ AliMUONSegmentationSlat *seg82=new AliMUONSegmentationSlatN(4);
 
  MUON->SetSegmentationModel(chamber-1, 2, seg82);
  seg82->SetNSlats(11);  
@@ -621,6 +635,7 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
  seg82->SetPadDivision(nseg4);
 
  MUON->SetResponseModel(chamber-1, response0);     
+ MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
 
 
 //--------------------------------------------------------
@@ -631,23 +646,22 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
 
  MUON->SetNsec(chamber-1,2);
 //
- AliMUONSegmentationSlat *seg91=new AliMUONSegmentationSlat;
- Int_t   npcb9[52] = {0,0,0,2,
+ AliMUONSegmentationSlat *seg91=new AliMUONSegmentationSlat(4);
+ Int_t   npcb9[52] = {0,0,0,3,
                      0,0,0,4,
                      0,0,2,3,
                      0,0,3,3,
                      0,2,2,2,
-                     0,3,2,2,
-                      0,3,2,2, 
-                     0,3,2,2, 
+                     0,2,2,2,
+                      0,1,2,2, 
+                     0,2,2,2, 
                      0,2,2,2, 
                      0,0,3,3, 
                      0,0,2,3, 
                      0,0,0,4, 
-                     0,0,0,2 };   
-
- Float_t xpos9[13]   = {2., 2., 2., 2., 2., 2., 39.5 , 2., 2., 2., 2., 2., 2.};
+                     0,0,0,3};   
 
+ Float_t xpos9[13]   = {2., 2., 2., 2., 2., 2., 40.5, 2., 2., 2., 2., 2., 2.};
  Float_t ypos9       = -(20.+6.*(40.-2.*shift));
 
  seg91->SetNSlats(13);  
@@ -660,7 +674,7 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
  seg91->SetPadDivision(nseg4);
  MUON->SetSegmentationModel(chamber-1, 1, seg91);
 
- AliMUONSegmentationSlatN *seg92=new AliMUONSegmentationSlatN;
+ AliMUONSegmentationSlatN *seg92=new AliMUONSegmentationSlatN(4);
 
  MUON->SetSegmentationModel(chamber-1, 2, seg92);
  seg92->SetNSlats(13);  
@@ -673,12 +687,13 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
  seg92->SetPadDivision(nseg4);
 
  MUON->SetResponseModel(chamber-1, response0);     
+ MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
 
  chamber=10;
 //^^^^^^^^^
  MUON->SetNsec(chamber-1,2);
 //
- AliMUONSegmentationSlat *seg101=new AliMUONSegmentationSlat;
+ AliMUONSegmentationSlat *seg101=new AliMUONSegmentationSlat(4);
  
  seg101->SetNSlats(13);  
  seg101->SetShift(shift);  
@@ -690,7 +705,7 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
  seg101->SetPadDivision(nseg4);
  MUON->SetSegmentationModel(chamber-1, 1, seg101);
 
- AliMUONSegmentationSlatN *seg102=new AliMUONSegmentationSlatN;
+ AliMUONSegmentationSlatN *seg102=new AliMUONSegmentationSlatN(4);
 
  MUON->SetSegmentationModel(chamber-1, 2, seg102);
  seg102->SetNSlats(13);  
@@ -703,6 +718,7 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
  seg102->SetPadDivision(nseg4);
 
  MUON->SetResponseModel(chamber-1, response0);     
+ MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
 
 //--------------------------------------------------------
 // Configuration for Trigger Stations -------------------- 
@@ -720,6 +736,7 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
  MUON->SetSegmentationModel(chamber-1, 2, seg112);
 
  MUON->SetResponseModel(chamber-1, responseTrigger0);      
+ MUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
 
  
  chamber=12;
@@ -729,15 +746,17 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
  AliMUONSegmentationTriggerY *seg122=new AliMUONSegmentationTriggerY;
  MUON->SetSegmentationModel(chamber-1, 2, seg122);
 
- MUON->SetResponseModel(chamber-1, responseTrigger0);      
- printf("\n %p %p \n", seg121, seg122);
- chamber=13;
+ MUON->SetResponseModel(chamber-1, responseTrigger0);
+ MUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
+      
+  chamber=13;
  MUON->SetNsec(chamber-1,2);
  AliMUONSegmentationTriggerX *seg131=new AliMUONSegmentationTriggerX;
  MUON->SetSegmentationModel(chamber-1, 1, seg131);
  AliMUONSegmentationTriggerY *seg132=new AliMUONSegmentationTriggerY;
  MUON->SetSegmentationModel(chamber-1, 2, seg132);
  MUON->SetResponseModel(chamber-1, responseTrigger0);      
+ MUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
 
  chamber=14;
  MUON->SetNsec(chamber-1,2);
@@ -747,9 +766,8 @@ AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
  MUON->SetSegmentationModel(chamber-1, 2, seg142);
 
  MUON->SetResponseModel(chamber-1, responseTrigger0); 
-
+ MUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
 }
 }