Dependency on implementations of AliSegmentation and AliMUONResponse moved to AliMUON...
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Apr 2001 11:24:43 +0000 (11:24 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 6 Apr 2001 11:24:43 +0000 (11:24 +0000)
Static method Build() builds the MUON system out of chambers, segmentation and response.

MUON/AliMUONFactory.cxx [new file with mode: 0644]
MUON/AliMUONFactory.h [new file with mode: 0644]
MUON/AliMUONv0.cxx
MUON/AliMUONv1.cxx
MUON/AliMUONvTemp.cxx
MUON/Config.C
MUON/MUONLinkDef.h
MUON/Makefile

diff --git a/MUON/AliMUONFactory.cxx b/MUON/AliMUONFactory.cxx
new file mode 100644 (file)
index 0000000..da65ceb
--- /dev/null
@@ -0,0 +1,496 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+////////////////////////////////////////////////////////////
+//  Factory for muon chambers, segmentations and response //
+////////////////////////////////////////////////////////////
+
+/*
+$Log$
+*/
+#include "AliMUONFactory.h"
+#include "AliMUON.h"
+#include "AliMUONChamber.h"
+#include "AliMUONResponseV0.h"
+#include "AliMUONResponseTrigger.h"
+#include "AliMUONSegmentationV0.h"
+#include "AliMUONSegmentationV01.h"
+#include "AliMUONSegmentationV02.h"
+#include "AliMUONSegmentationV04.h"
+#include "AliMUONSegmentationV05.h"
+#include "AliMUONSegmentationSlat.h"
+#include "AliMUONSegmentationSlatN.h"
+#include "AliMUONSegmentationTrigger.h"
+#include "AliMUONSegmentationTriggerX.h"
+#include "AliMUONSegmentationTriggerY.h"
+
+ClassImp(AliMUONFactory)
+
+    
+void AliMUONFactory::Build(AliMUON* where, const char* what) 
+{
+//
+// Construct MUON from chambers, segmentation and responses
+//
+    char tmp[20];
+    AliMUON* pMUON = where;
+    strcpy(tmp, what);
+
+    if (strcmp(tmp, "default")==0) {
+
+       printf("\n--------AliMUONFactory------------------------------");
+       printf("\n Non default version of MUON selected               ");
+       printf("\n You have to construct yourself the MUON elements !!");       
+       printf("\n----------------------------------------------------");
+
+       pMUON->SetIshunt(0);
+       pMUON->SetMaxStepGas(0.1);
+       pMUON->SetMaxStepAlu(0.1);
+//
+// Version 0
+//
+// First define the number of planes that are segmented (1 or 2) by a call
+// to SetNsec. 
+// Then chose for each chamber (chamber plane) the segmentation 
+// and response model.
+// They should be equal for the two chambers of each station. In a future
+// version this will be enforced.
+//
+//  
+       Int_t chamber;
+       // Default response: 5 mm of gas
+       AliMUONResponseV0* response0 = new AliMUONResponseV0;
+       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) ----------           
+//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+       Float_t rseg1[4]={17.5, 55.2, 71.3, 95.5};
+       Int_t   nseg1[4]={4, 4, 2, 1};
+//
+       chamber=1;
+//      ^^^^^^^^^
+       pMUON->SetNsec(chamber-1,2);
+//
+       AliMUONSegmentationV01 *seg11=new AliMUONSegmentationV01(4);
+       
+       seg11->SetSegRadii(rseg1);
+       seg11->SetPadSize(2.4, 0.4); // smaller pad size
+       seg11->SetDAnod(0.20); // smaller distance between anode wires
+       seg11->SetPadDivision(nseg1);
+       
+       pMUON->SetSegmentationModel(chamber-1, 1, seg11);
+       
+       AliMUONSegmentationV02 *seg12=new AliMUONSegmentationV02(4);
+       seg12->SetSegRadii(rseg1); 
+       seg12->SetPadSize(0.6, 1.6); // smaller pad size
+       seg12->SetDAnod(0.20); // smaller distance between anode wires
+       seg12->SetPadDivision(nseg1);
+       
+       pMUON->SetSegmentationModel(chamber-1, 2, seg12);
+       
+       pMUON->SetResponseModel(chamber-1, responseSt1); // special response        
+       pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
+       
+       chamber=2;
+//      ^^^^^^^^^
+//
+       pMUON->SetNsec(chamber-1,2);
+//
+       AliMUONSegmentationV01 *seg21=new AliMUONSegmentationV01(4);
+       seg21->SetSegRadii(rseg1);
+       seg21->SetPadSize(2.4, 0.4); // smaller pad size
+       seg21->SetDAnod(0.20); // smaller distance between anode wires
+       seg21->SetPadDivision(nseg1);
+       pMUON->SetSegmentationModel(chamber-1, 1, seg21);
+//
+       AliMUONSegmentationV02 *seg22=new AliMUONSegmentationV02(4);
+       seg22->SetSegRadii(rseg1); 
+       seg22->SetPadSize(0.6, 1.6); // smaller pad size
+       seg22->SetDAnod(0.20); // smaller distance between anode wires
+       seg22->SetPadDivision(nseg1);
+       pMUON->SetSegmentationModel(chamber-1, 2, seg22);
+       
+       pMUON->SetResponseModel(chamber-1, responseSt1); // special response
+       pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
+       
+//
+//--------------------------------------------------------
+// Configuration for Chamber TC3/4 (Station 2) -----------
+///^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// Float_t rseg2[4]={23.5, 87.7, 122.4, 122.5};
+       Float_t rseg2[4]={23.5, 47.1, 87.7, 122.5};
+       Int_t   nseg2[4]={4, 4, 2, 1};
+//
+       chamber=3;
+//      ^^^^^^^^^
+       pMUON->SetNsec(chamber-1,2);
+//
+       AliMUONSegmentationV01 *seg31=new AliMUONSegmentationV01(4);
+       seg31->SetSegRadii(rseg2);
+       seg31->SetPadSize(3.0, 0.5);
+       seg31->SetDAnod(3.0/3./4);
+       seg31->SetPadDivision(nseg2);
+       pMUON->SetSegmentationModel(chamber-1, 1, seg31);
+//
+       AliMUONSegmentationV02 *seg32=new AliMUONSegmentationV02(4);
+       seg32->SetSegRadii(rseg2); 
+       seg32->SetPadSize(0.75, 2.0);
+       seg32->SetPadDivision(nseg2);
+       seg32->SetDAnod(3.0/3./4);
+       
+       pMUON->SetSegmentationModel(chamber-1, 2, seg32);
+       
+       pMUON->SetResponseModel(chamber-1, response0);      
+       pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
+       
+       chamber=4;
+//      ^^^^^^^^^
+//
+       pMUON->SetNsec(chamber-1,2);
+//
+       AliMUONSegmentationV01 *seg41=new AliMUONSegmentationV01(4);
+       seg41->SetSegRadii(rseg2);
+       seg41->SetPadSize(3.0, 0.5);
+       seg41->SetDAnod(3.0/3./4);
+       seg41->SetPadDivision(nseg2);
+       pMUON->SetSegmentationModel(chamber-1, 1, seg41);
+//
+       AliMUONSegmentationV02 *seg42=new AliMUONSegmentationV02(4);
+       seg42->SetSegRadii(rseg2); 
+       seg42->SetPadSize(0.75, 2.0);
+       seg42->SetPadDivision(nseg2);
+       seg42->SetDAnod(3.0/3./4);
+       
+       pMUON->SetSegmentationModel(chamber-1, 2, seg42);
+       
+       pMUON->SetResponseModel(chamber-1, response0);      
+       pMUON->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[36] = {0,0,2,0,
+                            0,0,3,0,
+                            0,1,3,0,
+                            0,2,2,0,
+                            0,1,2,0, 
+                            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[9]    = {2., 2., 2., 2.,33., 2., 2., 2., 2.};
+       Float_t ypos5       = -(20.+4.*(40.-2.*shift));
+       
+       chamber=5;
+       pMUON->SetNsec(chamber-1,2);
+       AliMUONSegmentationSlat *seg51=new AliMUONSegmentationSlat(4);
+       seg51->SetNSlats(9); 
+       seg51->SetShift(shift);  
+       seg51->SetNPCBperSector(npcb5); 
+       seg51->SetSlatXPositions(xpos5);
+       seg51->SetSlatYPosition(ypos5);
+       seg51->SetPadSize(10.,0.5);
+       seg51->SetDAnod(0.25);
+       seg51->SetPadDivision(nseg3);
+       pMUON->SetSegmentationModel(chamber-1, 1, seg51);
+       
+       AliMUONSegmentationSlatN *seg52=new AliMUONSegmentationSlatN(4);
+       seg52->SetNSlats(9); 
+       seg52->SetShift(shift);  
+       seg52->SetNPCBperSector(npcb5); 
+       seg52->SetSlatXPositions(xpos5);
+       seg52->SetSlatYPosition(ypos5);
+       seg52->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
+       seg52->SetDAnod(0.25);
+       seg52->SetPadDivision(nseg3);
+       pMUON->SetSegmentationModel(chamber-1, 2, seg52);
+       pMUON->SetResponseModel(chamber-1, response0);      
+       pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
+       
+       chamber=6;
+       pMUON->SetNsec(chamber-1,2);
+       AliMUONSegmentationSlat *seg61=new AliMUONSegmentationSlat(4);
+       seg61->SetNSlats(9); 
+       seg61->SetShift(shift);  
+       seg61->SetNPCBperSector(npcb5); 
+       seg61->SetSlatXPositions(xpos5);
+       seg61->SetSlatYPosition(ypos5);
+       seg61->SetPadSize(10.,0.5);
+       seg61->SetDAnod(0.25);
+       seg61->SetPadDivision(nseg3);
+       pMUON->SetSegmentationModel(chamber-1, 1, seg61);
+       
+       AliMUONSegmentationSlatN *seg62=new AliMUONSegmentationSlatN(4);
+       seg62->SetNSlats(9); 
+       seg62->SetShift(shift);  
+       seg62->SetNPCBperSector(npcb5); 
+       seg62->SetSlatXPositions(xpos5);
+       seg62->SetSlatYPosition(ypos5);
+       seg62->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
+       seg62->SetDAnod(0.25);
+       seg62->SetPadDivision(nseg3);
+       pMUON->SetSegmentationModel(chamber-1, 2, seg62);
+       pMUON->SetResponseModel(chamber-1, response0);      
+       pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
+       
+//--------------------------------------------------------
+// Configuration for Chamber TC7/8  (Station 4) ----------           
+//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+       Int_t   nseg4[4]={4, 4, 2, 1};
+       
+       chamber=7;
+//      ^^^^^^^^^
+       
+       pMUON->SetNsec(chamber-1,2);
+//
+       AliMUONSegmentationSlat *seg71=new AliMUONSegmentationSlat(4);
+       Int_t npcb7[44] = {0,0,0,3,
+                          0,0,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};
+       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);  
+       seg71->SetShift(shift);  
+       seg71->SetNPCBperSector(npcb7); 
+       seg71->SetSlatXPositions(xpos7);
+       seg71->SetSlatYPosition(ypos7);
+       
+       seg71->SetPadSize(10.,0.5);
+       seg71->SetDAnod(0.25);
+       seg71->SetPadDivision(nseg4);
+       pMUON->SetSegmentationModel(chamber-1, 1, seg71);
+       
+       AliMUONSegmentationSlatN *seg72=new AliMUONSegmentationSlatN(4);
+       
+       pMUON->SetSegmentationModel(chamber-1, 2, seg72);
+       seg72->SetNSlats(11);  
+       seg72->SetShift(shift);   
+       seg72->SetNPCBperSector(npcb7); 
+       seg72->SetSlatXPositions(xpos7);
+       seg72->SetSlatYPosition(ypos7);
+       seg72->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
+       seg72->SetDAnod(0.25);
+       seg72->SetPadDivision(nseg4);
+       
+       pMUON->SetResponseModel(chamber-1, response0);      
+       pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
+       
+       chamber=8;
+//      ^^^^^^^^^
+       pMUON->SetNsec(chamber-1,2);
+//
+       AliMUONSegmentationSlat *seg81=new AliMUONSegmentationSlat(4);
+       
+       seg81->SetNSlats(11);  
+       seg81->SetShift(shift);  
+       seg81->SetNPCBperSector(npcb7); 
+       seg81->SetSlatXPositions(xpos7);
+       seg81->SetSlatYPosition(ypos7);
+       seg81->SetPadSize(10.,0.5);
+       seg81->SetDAnod(0.25);
+       seg81->SetPadDivision(nseg4);
+       pMUON->SetSegmentationModel(chamber-1, 1, seg81);
+       
+       AliMUONSegmentationSlat *seg82=new AliMUONSegmentationSlatN(4);
+       
+       pMUON->SetSegmentationModel(chamber-1, 2, seg82);
+       seg82->SetNSlats(11);  
+       seg82->SetShift(shift);  
+       seg82->SetNPCBperSector(npcb7); 
+       seg82->SetSlatXPositions(xpos7);
+       seg82->SetSlatYPosition(ypos7);
+       seg82->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
+       seg82->SetDAnod(0.25);
+       seg82->SetPadDivision(nseg4);
+       
+       pMUON->SetResponseModel(chamber-1, response0);      
+       pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
+       
+
+//--------------------------------------------------------
+// Configuration for Chamber TC9/10  (Station 5) ---------           
+//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+       chamber=9;
+//      ^^^^^^^^^
+
+       pMUON->SetNsec(chamber-1,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,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,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);  
+       seg91->SetShift(shift);  
+       seg91->SetNPCBperSector(npcb9); 
+       seg91->SetSlatXPositions(xpos9);
+       seg91->SetSlatYPosition(ypos9);
+       seg91->SetPadSize(10.,0.5);
+       seg91->SetDAnod(0.25);
+       seg91->SetPadDivision(nseg4);
+       pMUON->SetSegmentationModel(chamber-1, 1, seg91);
+       
+       AliMUONSegmentationSlatN *seg92=new AliMUONSegmentationSlatN(4);
+       
+       pMUON->SetSegmentationModel(chamber-1, 2, seg92);
+       seg92->SetNSlats(13);  
+       seg92->SetShift(shift);   
+       seg92->SetNPCBperSector(npcb9); 
+       seg92->SetSlatXPositions(xpos9);
+       seg92->SetSlatYPosition(ypos9);
+       seg92->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
+       seg92->SetDAnod(0.25);
+       seg92->SetPadDivision(nseg4);
+       
+       pMUON->SetResponseModel(chamber-1, response0);      
+       pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
+       
+       chamber=10;
+//      ^^^^^^^^^
+       pMUON->SetNsec(chamber-1,2);
+//
+       AliMUONSegmentationSlat *seg101=new AliMUONSegmentationSlat(4);
+       
+       seg101->SetNSlats(13);  
+       seg101->SetShift(shift);  
+       seg101->SetNPCBperSector(npcb9); 
+       seg101->SetSlatXPositions(xpos9);
+       seg101->SetSlatYPosition(ypos9);
+       seg101->SetPadSize(10.,0.5);
+       seg101->SetDAnod(0.25);
+       seg101->SetPadDivision(nseg4);
+       pMUON->SetSegmentationModel(chamber-1, 1, seg101);
+       
+       AliMUONSegmentationSlatN *seg102=new AliMUONSegmentationSlatN(4);
+       
+       pMUON->SetSegmentationModel(chamber-1, 2, seg102);
+       seg102->SetNSlats(13);  
+       seg102->SetShift(shift);   
+       seg102->SetNPCBperSector(npcb9); 
+       seg102->SetSlatXPositions(xpos9);
+       seg102->SetSlatYPosition(ypos9);
+       seg102->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
+       seg102->SetDAnod(0.25);
+       seg102->SetPadDivision(nseg4);
+       
+       pMUON->SetResponseModel(chamber-1, response0);      
+       pMUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
+
+//--------------------------------------------------------
+// Configuration for Trigger Stations -------------------- 
+//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+// Cluster-size off
+       AliMUONResponseTrigger* responseTrigger0 =  new AliMUONResponseTrigger;
+// Cluster-size on  
+// AliMUONResponseTriggerV1* responseTrigger0 =  new AliMUONResponseTriggerV1;
+       chamber=11;
+       pMUON->SetNsec(chamber-1,2);
+       AliMUONSegmentationTriggerX *seg111=new AliMUONSegmentationTriggerX;
+       pMUON->SetSegmentationModel(chamber-1, 1, seg111);
+       AliMUONSegmentationTriggerY *seg112=new AliMUONSegmentationTriggerY;
+       pMUON->SetSegmentationModel(chamber-1, 2, seg112);
+       
+       pMUON->SetResponseModel(chamber-1, responseTrigger0);      
+       pMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
+       
+       chamber=12;
+       pMUON->SetNsec(chamber-1,2);
+       AliMUONSegmentationTriggerX *seg121=new AliMUONSegmentationTriggerX;
+       pMUON->SetSegmentationModel(chamber-1, 1, seg121);
+       AliMUONSegmentationTriggerY *seg122=new AliMUONSegmentationTriggerY;
+       pMUON->SetSegmentationModel(chamber-1, 2, seg122);
+       
+       pMUON->SetResponseModel(chamber-1, responseTrigger0);
+       pMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
+       
+       chamber=13;
+       pMUON->SetNsec(chamber-1,2);
+       AliMUONSegmentationTriggerX *seg131=new AliMUONSegmentationTriggerX;
+       pMUON->SetSegmentationModel(chamber-1, 1, seg131);
+       AliMUONSegmentationTriggerY *seg132=new AliMUONSegmentationTriggerY;
+       pMUON->SetSegmentationModel(chamber-1, 2, seg132);
+       pMUON->SetResponseModel(chamber-1, responseTrigger0);      
+       pMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
+       
+       chamber=14;
+       pMUON->SetNsec(chamber-1,2);
+       AliMUONSegmentationTriggerX *seg141=new AliMUONSegmentationTriggerX;
+       pMUON->SetSegmentationModel(chamber-1, 1, seg141);
+       AliMUONSegmentationTriggerY *seg142=new AliMUONSegmentationTriggerY;
+       pMUON->SetSegmentationModel(chamber-1, 2, seg142);
+       
+       pMUON->SetResponseModel(chamber-1, responseTrigger0); 
+       pMUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
+    } else {
+       printf("\n--------AliMUONFactory------------------------------");
+       printf("\n Non default version of MUON selected               ");
+       printf("\n You have to construct yourself the MUON elements !!");       
+       printf("\n----------------------------------------------------");
+    }
+}
+
diff --git a/MUON/AliMUONFactory.h b/MUON/AliMUONFactory.h
new file mode 100644 (file)
index 0000000..bf9624e
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef ALIMUONFACTORY_H
+#define ALIMUONFACTORY_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+////////////////////////////////////////////////////////////
+//  Factory for muon chambers, segmentations and response //
+////////////////////////////////////////////////////////////
+#include "AliDetector.h"
+// #include "AliMUONTriggerCircuit.h" // cp
+
+class AliMUONChamber;
+class AliMUON;
+
+class AliMUONFactory : public  TObject {
+ public:
+    static void Build(AliMUON* where, const char* what);
+ protected:
+    ClassDef(AliMUONFactory,0)  // MUON Factory for Chambers and Segmentation
+};
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
index 35210be..f25c47c 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.17  2001/03/17 10:07:20  morsch
+Correct inconsistent variable name / method name / comments.
+
 Revision 1.16  2001/01/27 08:50:50  morsch
 Call non default constructors of segmentation classes.
 
@@ -81,20 +84,8 @@ Gammas and neutrons are also scored in the stepmanager
 #include "AliMUONPadHit.h"
 #include "AliCallf77.h"
 #include "AliConst.h" 
-#include "AliMUONResponseV0.h"
-#include "AliMUONResponseTrigger.h"
-#include "AliMUONSegmentationV0.h"
-#include "AliMUONSegmentationV01.h"
-#include "AliMUONSegmentationV02.h"
-#include "AliMUONSegmentationV04.h"
-#include "AliMUONSegmentationV05.h"
-#include "AliMUONSegmentationSlat.h"
-#include "AliMUONSegmentationSlatN.h"
-#include "AliMUONSegmentationTrigger.h"
-#include "AliMUONSegmentationTriggerX.h"
-#include "AliMUONSegmentationTriggerY.h"
 #include "AliMUONConstants.h"
-
+#include "AliMUONFactory.h"
 ClassImp(AliMUONv0)
  
 //___________________________________________
@@ -109,448 +100,7 @@ AliMUONv0::AliMUONv0(const char *name, const char *title)
        : AliMUON(name,title)
 {
 // Constructor
-    SetIshunt(0);
-    SetMaxStepGas(0.1);
-    SetMaxStepAlu(0.1);
-    
-//
-// First define the number of planes that are segmented (1 or 2) by a call
-// to SetNsec. 
-// Then chose for each chamber (chamber plane) the segmentation 
-// and response model.
-// They should be equal for the two chambers of each station. In a future
-// version this will be enforced.
-//
-//  
-    Int_t chamber;
-    // Default response: 5 mm of gas
-    AliMUONResponseV0* response0 = new AliMUONResponseV0;
-    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) ----------           
-//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-    Float_t rseg1[4]={17.5, 55.2, 71.3, 95.5};
-    Int_t   nseg1[4]={4, 4, 2, 1};
-//
-    chamber=1;
-//^^^^^^^^^
-    SetNsec(chamber-1,2);
-//
-    AliMUONSegmentationV01 *seg11=new AliMUONSegmentationV01(4);
-    
-    seg11->SetSegRadii(rseg1);
-//  seg11->SetPadSize(3, 0.5);
-    seg11->SetPadSize(2.4, 0.4); // smaller pad size
-//  seg11->SetDAnod(3.0/3./4);
-    seg11->SetDAnod(0.20); // smaller distance between anode wires
-    seg11->SetPadDivision(nseg1);
-    
-    SetSegmentationModel(chamber-1, 1, seg11);
-//
-    AliMUONSegmentationV02 *seg12=new AliMUONSegmentationV02(4);
-    seg12->SetSegRadii(rseg1); 
-//  seg12->SetPadSize(0.75, 2.0);
-    seg12->SetPadSize(0.6, 1.6); // smaller pad size
-//  seg12->SetDAnod(3.0/3./4);
-    seg12->SetDAnod(0.20); // smaller distance between anode wires
-    seg12->SetPadDivision(nseg1);
-    
-    SetSegmentationModel(chamber-1, 2, seg12);
-    
-//  SetResponseModel(chamber-1, response0);        
-    SetResponseModel(chamber-1, responseSt1); // special response          
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-    chamber=2;
-//^^^^^^^^^
-//
-    SetNsec(chamber-1,2);
-//
-    AliMUONSegmentationV01 *seg21=new AliMUONSegmentationV01(4);
-    seg21->SetSegRadii(rseg1);
-//  seg21->SetPadSize(3, 0.5);
-    seg21->SetPadSize(2.4, 0.4); // smaller pad size
-//  seg21->SetDAnod(3.0/3./4);
-    seg21->SetDAnod(0.20); // smaller distance between anode wires
-    seg21->SetPadDivision(nseg1);
-    SetSegmentationModel(chamber-1, 1, seg21);
-//
-    AliMUONSegmentationV02 *seg22=new AliMUONSegmentationV02(4);
-    seg22->SetSegRadii(rseg1); 
-//  seg22->SetPadSize(0.75, 2.);
-    seg22->SetPadSize(0.6, 1.6); // smaller pad size
-//  seg22->SetDAnod(3.0/3./4);
-    seg22->SetDAnod(0.20); // smaller distance between anode wires
-    seg22->SetPadDivision(nseg1);
-    SetSegmentationModel(chamber-1, 2, seg22);
-    
-//  SetResponseModel(chamber-1, response0);        
-    SetResponseModel(chamber-1, responseSt1); // special response
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-//
-//--------------------------------------------------------
-// Configuration for Chamber TC3/4 (Station 2) -----------
-///^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-// Float_t rseg2[4]={23.5, 87.7, 122.4, 122.5};
-    Float_t rseg2[4]={23.5, 47.1, 87.7, 122.5};
-    Int_t   nseg2[4]={4, 4, 2, 1};
-//
-    chamber=3;
-//^^^^^^^^^
-    SetNsec(chamber-1,2);
-//
-    AliMUONSegmentationV01 *seg31=new AliMUONSegmentationV01(4);
-    seg31->SetSegRadii(rseg2);
-    seg31->SetPadSize(3.0, 0.5);
-    seg31->SetDAnod(3.0/3./4);
-    seg31->SetPadDivision(nseg2);
-    SetSegmentationModel(chamber-1, 1, seg31);
-//
-    AliMUONSegmentationV02 *seg32=new AliMUONSegmentationV02(4);
-    seg32->SetSegRadii(rseg2); 
-    seg32->SetPadSize(0.75, 2.0);
-    seg32->SetPadDivision(nseg2);
-    seg32->SetDAnod(3.0/3./4);
-    
-    SetSegmentationModel(chamber-1, 2, seg32);
-    
-    SetResponseModel(chamber-1, response0);        
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-    chamber=4;
-//^^^^^^^^^
-//
-    SetNsec(chamber-1,2);
-//
-    AliMUONSegmentationV01 *seg41=new AliMUONSegmentationV01(4);
-    seg41->SetSegRadii(rseg2);
-    seg41->SetPadSize(3.0, 0.5);
-    seg41->SetDAnod(3.0/3./4);
-    seg41->SetPadDivision(nseg2);
-    SetSegmentationModel(chamber-1, 1, seg41);
-//
-    AliMUONSegmentationV02 *seg42=new AliMUONSegmentationV02(4);
-    seg42->SetSegRadii(rseg2); 
-    seg42->SetPadSize(0.75, 2.0);
-    seg42->SetPadDivision(nseg2);
-    seg42->SetDAnod(3.0/3./4);
-    
-    SetSegmentationModel(chamber-1, 2, seg42);
-    
-    SetResponseModel(chamber-1, response0);        
-    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[36] = {0,0,2,0,
-                        0,0,3,0,
-                        0,1,3,0,
-                        0,2,2,0,
-                        0,1,2,0, 
-                        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 xpos5[9]    = {2., 2., 2., 2.,32., 2., 2., 2., 2.};
-    Float_t ypos5       = -(20.+4.*(40.-2.*shift));
-    
-    chamber=5;
-    SetNsec(chamber-1,2);
-    AliMUONSegmentationSlat *seg51=new AliMUONSegmentationSlat(4);
-    seg51->SetNSlats(9); 
-    seg51->SetShift(shift);  
-    seg51->SetNPCBperSector(npcb5); 
-    seg51->SetSlatXPositions(xpos5);
-    seg51->SetSlatYPosition(ypos5);
-    seg51->SetPadSize(10.,0.5);
-    seg51->SetDAnod(0.25);
-    seg51->SetPadDivision(nseg3);
-    SetSegmentationModel(chamber-1, 1, seg51);
-    
-    AliMUONSegmentationSlatN *seg52=new AliMUONSegmentationSlatN(4);
-    seg52->SetNSlats(9); 
-    seg52->SetShift(shift);  
-    seg52->SetNPCBperSector(npcb5); 
-    seg52->SetSlatXPositions(xpos5);
-    seg52->SetSlatYPosition(ypos5);
-    seg52->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
-    seg52->SetDAnod(0.25);
-    seg52->SetPadDivision(nseg3);
-    SetSegmentationModel(chamber-1, 2, seg52);
-    SetResponseModel(chamber-1, response0);        
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-    chamber=6;
-    SetNsec(chamber-1,2);
-    AliMUONSegmentationSlat *seg61=new AliMUONSegmentationSlat(4);
-    seg61->SetNSlats(9); 
-    seg61->SetShift(shift);  
-    seg61->SetNPCBperSector(npcb5); 
-    seg61->SetSlatXPositions(xpos5);
-    seg61->SetSlatYPosition(ypos5);
-    seg61->SetPadSize(10.,0.5);
-    seg61->SetDAnod(0.25);
-    seg61->SetPadDivision(nseg3);
-    SetSegmentationModel(chamber-1, 1, seg61);
-    
-    AliMUONSegmentationSlatN *seg62=new AliMUONSegmentationSlatN(4);
-    seg62->SetNSlats(9); 
-    seg62->SetShift(shift);  
-    seg62->SetNPCBperSector(npcb5); 
-    seg62->SetSlatXPositions(xpos5);
-    seg62->SetSlatYPosition(ypos5);
-    seg62->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
-    seg62->SetDAnod(0.25);
-    seg62->SetPadDivision(nseg3);
-    SetSegmentationModel(chamber-1, 2, seg62);
-    SetResponseModel(chamber-1, response0);        
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-//--------------------------------------------------------
-// Configuration for Chamber TC7/8  (Station 4) ----------           
-//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-    Int_t   nseg4[4]={4, 4, 2, 1};
-
-    chamber=7;
-//^^^^^^^^^
-
-    SetNsec(chamber-1,2);
-//
-    AliMUONSegmentationSlat *seg71=new AliMUONSegmentationSlat(4);
-    Int_t npcb7[44] = {0,0,0,3,
-                      0,0,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};
-    Float_t xpos7[11]   = {2., 2., 2., 2., 2., 39.5, 2., 2., 2., 2., 2.};
-    Float_t ypos7       = -(20.+5.*(40.-2.*shift));
-    
-    seg71->SetNSlats(11);  
-    seg71->SetShift(shift);  
-    seg71->SetNPCBperSector(npcb7); 
-    seg71->SetSlatXPositions(xpos7);
-    seg71->SetSlatYPosition(ypos7);
-    
-    seg71->SetPadSize(10.,0.5);
-    seg71->SetDAnod(0.25);
-    seg71->SetPadDivision(nseg4);
-    SetSegmentationModel(chamber-1, 1, seg71);
-    
-    AliMUONSegmentationSlatN *seg72=new AliMUONSegmentationSlatN(4);
-    
-    SetSegmentationModel(chamber-1, 2, seg72);
-    seg72->SetNSlats(11);  
-    seg72->SetShift(shift);   
-    seg72->SetNPCBperSector(npcb7); 
-    seg72->SetSlatXPositions(xpos7);
-    seg72->SetSlatYPosition(ypos7);
-    seg72->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
-    seg72->SetDAnod(0.25);
-    seg72->SetPadDivision(nseg4);
-    
-    SetResponseModel(chamber-1, response0);        
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-    chamber=8;
-//^^^^^^^^^
-    SetNsec(chamber-1,2);
-//
-    AliMUONSegmentationSlat *seg81=new AliMUONSegmentationSlat(4);
-    
-    seg81->SetNSlats(11);  
-    seg81->SetShift(shift);  
-    seg81->SetNPCBperSector(npcb7); 
-    seg81->SetSlatXPositions(xpos7);
-    seg81->SetSlatYPosition(ypos7);
-    seg81->SetPadSize(10.,0.5);
-    seg81->SetDAnod(0.25);
-    seg81->SetPadDivision(nseg4);
-    SetSegmentationModel(chamber-1, 1, seg81);
-    
-    AliMUONSegmentationSlat *seg82=new AliMUONSegmentationSlatN(4);
-
-    SetSegmentationModel(chamber-1, 2, seg82);
-    seg82->SetNSlats(11);  
-    seg82->SetShift(shift);  
-    seg82->SetNPCBperSector(npcb7); 
-    seg82->SetSlatXPositions(xpos7);
-    seg82->SetSlatYPosition(ypos7);
-    seg82->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
-    seg82->SetDAnod(0.25);
-    seg82->SetPadDivision(nseg4);
-    
-    SetResponseModel(chamber-1, response0);        
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-
-//--------------------------------------------------------
-// Configuration for Chamber TC9/10  (Station 5) ---------           
-//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-    chamber=9;
-//^^^^^^^^^
-    
-    SetNsec(chamber-1,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,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,3};   
-    
-    // Float_t xpos9[13]   = {2., 2., 2., 2., 2., 2., 39.5 , 2., 2., 2., 2., 2., 2.};
-    Float_t xpos9[13]   = {2., 2., 2., 2., 2., 2., 39.5, 2., 2., 2., 2., 2., 2.};
-    Float_t ypos9       = -(20.+6.*(40.-2.*shift));
-    
-    seg91->SetNSlats(13);  
-    seg91->SetShift(shift);  
-    seg91->SetNPCBperSector(npcb9); 
-    seg91->SetSlatXPositions(xpos9);
-    seg91->SetSlatYPosition(ypos9);
-    seg91->SetPadSize(10.,0.5);
-    seg91->SetDAnod(0.25);
-    seg91->SetPadDivision(nseg4);
-    SetSegmentationModel(chamber-1, 1, seg91);
-    
-    AliMUONSegmentationSlatN *seg92=new AliMUONSegmentationSlatN(4);
-    
-    SetSegmentationModel(chamber-1, 2, seg92);
-    seg92->SetNSlats(13);  
-    seg92->SetShift(shift);   
-    seg92->SetNPCBperSector(npcb9); 
-    seg92->SetSlatXPositions(xpos9);
-    seg92->SetSlatYPosition(ypos9);
-    seg92->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
-    seg92->SetDAnod(0.25);
-    seg92->SetPadDivision(nseg4);
-    
-    SetResponseModel(chamber-1, response0);        
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-    chamber=10;
-//^^^^^^^^^
-    SetNsec(chamber-1,2);
-//
-    AliMUONSegmentationSlat *seg101=new AliMUONSegmentationSlat(4);
-    
-    seg101->SetNSlats(13);  
-    seg101->SetShift(shift);  
-    seg101->SetNPCBperSector(npcb9); 
-    seg101->SetSlatXPositions(xpos9);
-    seg101->SetSlatYPosition(ypos9);
-    seg101->SetPadSize(10.,0.5);
-    seg101->SetDAnod(0.25);
-    seg101->SetPadDivision(nseg4);
-    SetSegmentationModel(chamber-1, 1, seg101);
-    
-    AliMUONSegmentationSlatN *seg102=new AliMUONSegmentationSlatN(4);
-    
-    SetSegmentationModel(chamber-1, 2, seg102);
-    seg102->SetNSlats(13);  
-    seg102->SetShift(shift);   
-    seg102->SetNPCBperSector(npcb9); 
-    seg102->SetSlatXPositions(xpos9);
-    seg102->SetSlatYPosition(ypos9);
-    seg102->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
-    seg102->SetDAnod(0.25);
-    seg102->SetPadDivision(nseg4);
-    
-    SetResponseModel(chamber-1, response0);        
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-//--------------------------------------------------------
-// Configuration for Trigger Stations -------------------- 
-//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-// Cluster-size off
-    AliMUONResponseTrigger* responseTrigger0 =  new AliMUONResponseTrigger;
-// Cluster-size on  
-// AliMUONResponseTriggerV1* responseTrigger0 =  new AliMUONResponseTriggerV1;
-    chamber=11;
-    SetNsec(chamber-1,2);
-    AliMUONSegmentationTriggerX *seg111=new AliMUONSegmentationTriggerX;
-    SetSegmentationModel(chamber-1, 1, seg111);
-    AliMUONSegmentationTriggerY *seg112=new AliMUONSegmentationTriggerY;
-    SetSegmentationModel(chamber-1, 2, seg112);
-    
-    SetResponseModel(chamber-1, responseTrigger0);      
-    Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
-    
-    chamber=12;
-    SetNsec(chamber-1,2);
-    AliMUONSegmentationTriggerX *seg121=new AliMUONSegmentationTriggerX;
-    SetSegmentationModel(chamber-1, 1, seg121);
-    AliMUONSegmentationTriggerY *seg122=new AliMUONSegmentationTriggerY;
-    SetSegmentationModel(chamber-1, 2, seg122);
-    
-    SetResponseModel(chamber-1, responseTrigger0);
-    Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
-    
-    chamber=13;
-    SetNsec(chamber-1,2);
-    AliMUONSegmentationTriggerX *seg131=new AliMUONSegmentationTriggerX;
-    SetSegmentationModel(chamber-1, 1, seg131);
-    AliMUONSegmentationTriggerY *seg132=new AliMUONSegmentationTriggerY;
-    SetSegmentationModel(chamber-1, 2, seg132);
-    SetResponseModel(chamber-1, responseTrigger0);      
-    Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
-    
-    chamber=14;
-    SetNsec(chamber-1,2);
-    AliMUONSegmentationTriggerX *seg141=new AliMUONSegmentationTriggerX;
-    SetSegmentationModel(chamber-1, 1, seg141);
-    AliMUONSegmentationTriggerY *seg142=new AliMUONSegmentationTriggerY;
-    SetSegmentationModel(chamber-1, 2, seg142);
-    
-    SetResponseModel(chamber-1, responseTrigger0); 
-    Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
+    AliMUONFactory::Build(this, "default");
 }
 
 void AliMUONv0::CreateGeometry()
index 7114509..ebc8278 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.26  2001/03/17 10:07:20  morsch
+Correct inconsistent variable name / method name / comments.
+
 Revision 1.25  2001/03/16 15:32:06  morsch
 Corrections of overlap with beam shield and dipole (A. de Falco)
 
@@ -149,6 +152,7 @@ Log messages included.
 #include "AliMUONPadHit.h"
 #include "AliMUONConstants.h"
 #include "AliMUONTriggerCircuit.h"
+#include "AliMUONFactory.h"
 
 ClassImp(AliMUONv1)
  
@@ -164,6 +168,7 @@ AliMUONv1::AliMUONv1(const char *name, const char *title)
        : AliMUON(name,title)
 {
 // Constructor
+    AliMUONFactory::Build(this, title);
 }
 
 //___________________________________________
index 8cca7a4..2663a85 100644 (file)
 
 /*
 $Log$
+Revision 1.1  2001/01/30 12:23:33  morsch
+Tempory MUON version which has full signal generation (summable digits) and geometry compatible with
+DIPO and SHIL, i.e. size of station 3 has been reduced.
+
 */
 
 /////////////////////////////////////////////////////////
@@ -26,453 +30,15 @@ $Log$
 #include "AliRun.h"
 #include "AliMC.h"
 #include "AliMUONChamber.h"
-#include "AliMUONResponseV0.h"
-#include "AliMUONResponseTrigger.h"
-#include "AliMUONSegmentationV0.h"
-#include "AliMUONSegmentationV01.h"
-#include "AliMUONSegmentationV02.h"
-#include "AliMUONSegmentationV04.h"
-#include "AliMUONSegmentationV05.h"
-#include "AliMUONSegmentationSlat.h"
-#include "AliMUONSegmentationSlatN.h"
-#include "AliMUONSegmentationTrigger.h"
-#include "AliMUONSegmentationTriggerX.h"
-#include "AliMUONSegmentationTriggerY.h"
 #include "AliMUONConstants.h"
+#include "AliMUONFactory.h"
 
 ClassImp(AliMUONvTemp)
 AliMUONvTemp::AliMUONvTemp(const char *name, const char *title)
-       : AliMUONv1(name,title)
+       : AliMUONv1(name, title)
 {
-
-    SetIshunt(1);
-    SetMaxStepGas(0.1);
-    SetMaxStepAlu(0.1);
-//
-// Version 0
-//
-// First define the number of planes that are segmented (1 or 2) by a call
-// to SetNsec. 
-// Then chose for each chamber (chamber plane) the segmentation 
-// and response model.
-// They should be equal for the two chambers of each station. In a future
-// version this will be enforced.
-//
-//  
-    Int_t chamber;
-    // Default response: 5 mm of gas
-    AliMUONResponseV0* response0 = new AliMUONResponseV0;
-    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) ----------           
-//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-    Float_t rseg1[4]={17.5, 55.2, 71.3, 95.5};
-    Int_t   nseg1[4]={4, 4, 2, 1};
-//
-    chamber=1;
-//^^^^^^^^^
-    SetNsec(chamber-1,2);
-//
-    AliMUONSegmentationV01 *seg11=new AliMUONSegmentationV01(4);
-    
-    seg11->SetSegRadii(rseg1);
-    seg11->SetPadSize(2.4, 0.4); // smaller pad size
-    seg11->SetDAnod(0.20); // smaller distance between anode wires
-    seg11->SetPadDivision(nseg1);
-    
-    SetSegmentationModel(chamber-1, 1, seg11);
-//
-    AliMUONSegmentationV02 *seg12=new AliMUONSegmentationV02(4);
-    seg12->SetSegRadii(rseg1); 
-    seg12->SetPadSize(0.6, 1.6); // smaller pad size
-    seg12->SetDAnod(0.20); // smaller distance between anode wires
-    seg12->SetPadDivision(nseg1);
-
-    SetSegmentationModel(chamber-1, 2, seg12);
-
-    SetResponseModel(chamber-1, responseSt1); // special response          
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-    chamber=2;
-//^^^^^^^^^
-//
-    SetNsec(chamber-1,2);
-//
-    AliMUONSegmentationV01 *seg21=new AliMUONSegmentationV01(4);
-    seg21->SetSegRadii(rseg1);
-    seg21->SetPadSize(2.4, 0.4); // smaller pad size
-    seg21->SetDAnod(0.20); // smaller distance between anode wires
-    seg21->SetPadDivision(nseg1);
-    SetSegmentationModel(chamber-1, 1, seg21);
-//
-    AliMUONSegmentationV02 *seg22=new AliMUONSegmentationV02(4);
-    seg22->SetSegRadii(rseg1); 
-    seg22->SetPadSize(0.6, 1.6); // smaller pad size
-    seg22->SetDAnod(0.20); // smaller distance between anode wires
-    seg22->SetPadDivision(nseg1);
-    SetSegmentationModel(chamber-1, 2, seg22);
-    
-    SetResponseModel(chamber-1, responseSt1); // special response
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-           
-//
-//--------------------------------------------------------
-// Configuration for Chamber TC3/4 (Station 2) -----------
-///^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-    Float_t rseg2[4]={23.5, 47.1, 87.7, 122.5};
-    Int_t   nseg2[4]={4, 4, 2, 1};
-//
-    chamber=3;
-//^^^^^^^^^
-    SetNsec(chamber-1,2);
-//
-    AliMUONSegmentationV01 *seg31=new AliMUONSegmentationV01(4);
-    seg31->SetSegRadii(rseg2);
-    seg31->SetPadSize(3.0, 0.5);
-    seg31->SetDAnod(3.0/3./4);
-    seg31->SetPadDivision(nseg2);
-    SetSegmentationModel(chamber-1, 1, seg31);
-//
-    AliMUONSegmentationV02 *seg32=new AliMUONSegmentationV02(4);
-    seg32->SetSegRadii(rseg2); 
-    seg32->SetPadSize(0.75, 2.0);
-    seg32->SetPadDivision(nseg2);
-    seg32->SetDAnod(3.0/3./4);
-    
-    SetSegmentationModel(chamber-1, 2, seg32);
-    
-    SetResponseModel(chamber-1, response0);        
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-    chamber=4;
-//^^^^^^^^^
-//
-    SetNsec(chamber-1,2);
-//
-    AliMUONSegmentationV01 *seg41=new AliMUONSegmentationV01(4);
-    seg41->SetSegRadii(rseg2);
-    seg41->SetPadSize(3.0, 0.5);
-    seg41->SetDAnod(3.0/3./4);
-    seg41->SetPadDivision(nseg2);
-    SetSegmentationModel(chamber-1, 1, seg41);
-//
-    AliMUONSegmentationV02 *seg42=new AliMUONSegmentationV02(4);
-    seg42->SetSegRadii(rseg2); 
-    seg42->SetPadSize(0.75, 2.0);
-    seg42->SetPadDivision(nseg2);
-    seg42->SetDAnod(3.0/3./4);
-    
-    SetSegmentationModel(chamber-1, 2, seg42);
-    
-    SetResponseModel(chamber-1, response0);        
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-    
-//--------------------------------------------------------
-// Configuration for Chamber TC5/6  (Station 3) ----------          
-//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-    Int_t   nseg3[3]={4, 4, 2};
-    Int_t   npcb5[28] = {0,0,1,0,
-                        0,1,1,0,
-                        0,2,1,0,
-                        0,1,1,0, 
-                        0,2,1,0, 
-                        0,1,1,0, 
-                        0,0,1,0};
-    
-    Float_t shift = 1.5/2.;
-    Float_t xpos5[7]    = {2., 2., 2., 34., 2., 2., 2.};
-    Float_t ypos5       = -(20.+3.*(40.-2.*shift));
-
-    chamber=5;
-    SetNsec(chamber-1,2);
-    AliMUONSegmentationSlat *seg51=new AliMUONSegmentationSlat(4);
-    seg51->SetNSlats(7); 
-    seg51->SetShift(shift);  
-    seg51->SetNPCBperSector(npcb5); 
-    seg51->SetSlatXPositions(xpos5);
-    seg51->SetSlatYPosition(ypos5);
-    seg51->SetPadSize(10.,0.5);
-    seg51->SetDAnod(0.25);
-    seg51->SetPadDivision(nseg3);
-    SetSegmentationModel(chamber-1, 1, seg51);
-    
-    AliMUONSegmentationSlatN *seg52=new AliMUONSegmentationSlatN(4);
-    seg52->SetNSlats(7); 
-    seg52->SetShift(shift);  
-    seg52->SetNPCBperSector(npcb5); 
-    seg52->SetSlatXPositions(xpos5);
-    seg52->SetSlatYPosition(ypos5);
-    seg52->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
-    seg52->SetDAnod(0.25);
-    seg52->SetPadDivision(nseg3);
-    SetSegmentationModel(chamber-1, 2, seg52);
-    SetResponseModel(chamber-1, response0);        
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-    chamber=6;
-    SetNsec(chamber-1,2);
-    AliMUONSegmentationSlat *seg61=new AliMUONSegmentationSlat(4);
-    seg61->SetNSlats(7); 
-    seg61->SetShift(shift);  
-    seg61->SetNPCBperSector(npcb5); 
-    seg61->SetSlatXPositions(xpos5);
-    seg61->SetSlatYPosition(ypos5);
-    seg61->SetPadSize(10.,0.5);
-    seg61->SetDAnod(0.25);
-    seg61->SetPadDivision(nseg3);
-    SetSegmentationModel(chamber-1, 1, seg61);
-    
-    AliMUONSegmentationSlatN *seg62=new AliMUONSegmentationSlatN(4);
-    seg62->SetNSlats(7); 
-    seg62->SetShift(shift);  
-    seg62->SetNPCBperSector(npcb5); 
-    seg62->SetSlatXPositions(xpos5);
-    seg62->SetSlatYPosition(ypos5);
-    seg62->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
-    seg62->SetDAnod(0.25);
-    seg62->SetPadDivision(nseg3);
-    SetSegmentationModel(chamber-1, 2, seg62);
-    SetResponseModel(chamber-1, response0);        
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-//--------------------------------------------------------
-// Configuration for Chamber TC7/8  (Station 4) ----------           
-//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-    
-    Int_t   nseg4[4]={4, 4, 2, 1};
-    
-    chamber=7;
-//^^^^^^^^^
-    
-    SetNsec(chamber-1,2);
-//
-    AliMUONSegmentationSlat *seg71=new AliMUONSegmentationSlat(4);
-    Int_t npcb7[44] = {0,0,0,3,
-                      0,0,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};
-    Float_t xpos7[11]   = {2., 2., 2., 2., 2., 39.5, 2., 2., 2., 2., 2.};
-    Float_t ypos7       = -(20.+5.*(40.-2.*shift));
-    
-    seg71->SetNSlats(11);  
-    seg71->SetShift(shift);  
-    seg71->SetNPCBperSector(npcb7); 
-    seg71->SetSlatXPositions(xpos7);
-    seg71->SetSlatYPosition(ypos7);
-    
-    seg71->SetPadSize(10.,0.5);
-    seg71->SetDAnod(0.25);
-    seg71->SetPadDivision(nseg4);
-    SetSegmentationModel(chamber-1, 1, seg71);
-    
-    AliMUONSegmentationSlatN *seg72=new AliMUONSegmentationSlatN(4);
-    
-    SetSegmentationModel(chamber-1, 2, seg72);
-    seg72->SetNSlats(11);  
-    seg72->SetShift(shift);   
-    seg72->SetNPCBperSector(npcb7); 
-    seg72->SetSlatXPositions(xpos7);
-    seg72->SetSlatYPosition(ypos7);
-    seg72->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
-    seg72->SetDAnod(0.25);
-    seg72->SetPadDivision(nseg4);
-    
-    SetResponseModel(chamber-1, response0);        
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-    chamber=8;
-//^^^^^^^^^
-    SetNsec(chamber-1,2);
-//
-    AliMUONSegmentationSlat *seg81=new AliMUONSegmentationSlat(4);
-    
-    seg81->SetNSlats(11);  
-    seg81->SetShift(shift);  
-    seg81->SetNPCBperSector(npcb7); 
-    seg81->SetSlatXPositions(xpos7);
-    seg81->SetSlatYPosition(ypos7);
-    seg81->SetPadSize(10.,0.5);
-    seg81->SetDAnod(0.25);
-    seg81->SetPadDivision(nseg4);
-    SetSegmentationModel(chamber-1, 1, seg81);
-
-    AliMUONSegmentationSlat *seg82=new AliMUONSegmentationSlatN(4);
-
-    SetSegmentationModel(chamber-1, 2, seg82);
-    seg82->SetNSlats(11);  
-    seg82->SetShift(shift);  
-    seg82->SetNPCBperSector(npcb7); 
-    seg82->SetSlatXPositions(xpos7);
-    seg82->SetSlatYPosition(ypos7);
-    seg82->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
-    seg82->SetDAnod(0.25);
-    seg82->SetPadDivision(nseg4);
-    
-    SetResponseModel(chamber-1, response0);        
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-
-//--------------------------------------------------------
-// Configuration for Chamber TC9/10  (Station 5) ---------           
-//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-    chamber=9;
-//^^^^^^^^^
-
-    SetNsec(chamber-1,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,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,3};   
-    Float_t xpos9[13]   = {2., 2., 2., 2., 2., 2., 39.5, 2., 2., 2., 2., 2., 2.};
-    Float_t ypos9       = -(20.+6.*(40.-2.*shift));
-    
-    seg91->SetNSlats(13);  
-    seg91->SetShift(shift);  
-    seg91->SetNPCBperSector(npcb9); 
-    seg91->SetSlatXPositions(xpos9);
-    seg91->SetSlatYPosition(ypos9);
-    seg91->SetPadSize(10.,0.5);
-    seg91->SetDAnod(0.25);
-    seg91->SetPadDivision(nseg4);
-    SetSegmentationModel(chamber-1, 1, seg91);
-    
-    AliMUONSegmentationSlatN *seg92=new AliMUONSegmentationSlatN(4);
-    
-    SetSegmentationModel(chamber-1, 2, seg92);
-    seg92->SetNSlats(13);  
-    seg92->SetShift(shift);   
-    seg92->SetNPCBperSector(npcb9); 
-    seg92->SetSlatXPositions(xpos9);
-    seg92->SetSlatYPosition(ypos9);
-    seg92->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
-    seg92->SetDAnod(0.25);
-    seg92->SetPadDivision(nseg4);
-    
-    SetResponseModel(chamber-1, response0);        
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-    chamber=10;
-//^^^^^^^^^
-    SetNsec(chamber-1,2);
-//
-    AliMUONSegmentationSlat *seg101=new AliMUONSegmentationSlat(4);
-    
-    seg101->SetNSlats(13);  
-    seg101->SetShift(shift);  
-    seg101->SetNPCBperSector(npcb9); 
-    seg101->SetSlatXPositions(xpos9);
-    seg101->SetSlatYPosition(ypos9);
-    seg101->SetPadSize(10.,0.5);
-    seg101->SetDAnod(0.25);
-    seg101->SetPadDivision(nseg4);
-    SetSegmentationModel(chamber-1, 1, seg101);
-    
-    AliMUONSegmentationSlatN *seg102=new AliMUONSegmentationSlatN(4);
-    
-    SetSegmentationModel(chamber-1, 2, seg102);
-    seg102->SetNSlats(13);  
-    seg102->SetShift(shift);   
-    seg102->SetNPCBperSector(npcb9); 
-    seg102->SetSlatXPositions(xpos9);
-    seg102->SetSlatYPosition(ypos9);
-    seg102->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
-    seg102->SetDAnod(0.25);
-    seg102->SetPadDivision(nseg4);
-    
-    SetResponseModel(chamber-1, response0);        
-    Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-    
-//--------------------------------------------------------
-// Configuration for Trigger Stations -------------------- 
-//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-// Cluster-size off
-    AliMUONResponseTrigger* responseTrigger0 =  new AliMUONResponseTrigger;
-// Cluster-size on  
-// AliMUONResponseTriggerV1* responseTrigger0 =  new AliMUONResponseTriggerV1;
-    
-    chamber=11;
-    SetNsec(chamber-1,2);
-    AliMUONSegmentationTriggerX *seg111=new AliMUONSegmentationTriggerX;
-    SetSegmentationModel(chamber-1, 1, seg111);
-    AliMUONSegmentationTriggerY *seg112=new AliMUONSegmentationTriggerY;
-    SetSegmentationModel(chamber-1, 2, seg112);
-    
-    SetResponseModel(chamber-1, responseTrigger0);      
-    Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
-    
-    chamber=12;
-    SetNsec(chamber-1,2);
-    AliMUONSegmentationTriggerX *seg121=new AliMUONSegmentationTriggerX;
-    SetSegmentationModel(chamber-1, 1, seg121);
-    AliMUONSegmentationTriggerY *seg122=new AliMUONSegmentationTriggerY;
-    SetSegmentationModel(chamber-1, 2, seg122);
-    
-    SetResponseModel(chamber-1, responseTrigger0);
-    Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
-    
-    chamber=13;
-    SetNsec(chamber-1,2);
-    AliMUONSegmentationTriggerX *seg131=new AliMUONSegmentationTriggerX;
-    SetSegmentationModel(chamber-1, 1, seg131);
-    AliMUONSegmentationTriggerY *seg132=new AliMUONSegmentationTriggerY;
-    SetSegmentationModel(chamber-1, 2, seg132);
-    SetResponseModel(chamber-1, responseTrigger0);      
-    Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
-    
-    chamber=14;
-    SetNsec(chamber-1,2);
-    AliMUONSegmentationTriggerX *seg141=new AliMUONSegmentationTriggerX;
-    SetSegmentationModel(chamber-1, 1, seg141);
-    AliMUONSegmentationTriggerY *seg142=new AliMUONSegmentationTriggerY;
-    SetSegmentationModel(chamber-1, 2, seg142);
-    
-    SetResponseModel(chamber-1, responseTrigger0); 
-    Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
-    
+//  Constructor
+      AliMUONFactory::Build(this, "temporary");
 }
 //___________________________________________
 void AliMUONvTemp::CreateGeometry()
index c6601c6..da3427c 100644 (file)
@@ -262,11 +262,11 @@ gAlice->SetField(2,1);    //Specify maximum magnetic field in Tesla (neg. ==> de
 Int_t iFRAME  =0;
 Int_t iMAG    =0;
 Int_t iITS    =0;
-Int_t iABSO   =1;
-Int_t iDIPO   =1;
+Int_t iABSO   =0;
+Int_t iDIPO   =0;
 Int_t iHALL   =0;
 Int_t iSHIL   =0;
-Int_t iPIPE   =1;
+Int_t iPIPE   =0;
 Int_t iFMD    =0;
 Int_t iMUON   =1;
 
@@ -326,440 +326,10 @@ if(iFMD) {
 if(iMUON) {
 //=================== MUON parameters ===========================
 
-AliMUON *MUON  = new AliMUONv1("MUON","normal MUON");
- MUON->SetIshunt(0);
- MUON->SetMaxStepGas(0.1);
- MUON->SetMaxStepAlu(0.1);
-//
-// Version 0
-//
-// First define the number of planes that are segmented (1 or 2) by a call
-// to SetNsec. 
-// Then chose for each chamber (chamber plane) the segmentation 
-// and response model.
-// They should be equal for the two chambers of each station. In a future
-// version this will be enforced.
-//
-//  
- Int_t chamber;
- Int_t station;
- // Default response: 5 mm of gas
- AliMUONResponseV0* response0 = new AliMUONResponseV0;
- 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) ----------           
-//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- Float_t rseg1[4]={17.5, 55.2, 71.3, 95.5};
- Int_t   nseg1[4]={4, 4, 2, 1};
-//
- chamber=1;
-//^^^^^^^^^
- MUON->SetNsec(chamber-1,2);
-//
- AliMUONSegmentationV01 *seg11=new AliMUONSegmentationV01(4);
- seg11->SetSegRadii(rseg1);
- 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(4);
- seg12->SetSegRadii(rseg1); 
- 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, responseSt1); // special response       
- MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-
- chamber=2;
-//^^^^^^^^^
-//
- MUON->SetNsec(chamber-1,2);
-//
- AliMUONSegmentationV01 *seg21=new AliMUONSegmentationV01(4);
- seg21->SetSegRadii(rseg1);
- 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(4);
- seg22->SetSegRadii(rseg1); 
- 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, responseSt1); // special response
- MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-           
-//
-//--------------------------------------------------------
-// Configuration for Chamber TC3/4 (Station 2) -----------
-///^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-// Float_t rseg2[4]={23.5, 87.7, 122.4, 122.5};
-     Float_t rseg2[4]={23.5, 47.1, 87.7, 122.5};
-     Int_t   nseg2[4]={4, 4, 2, 1};
-//
- chamber=3;
-//^^^^^^^^^
- MUON->SetNsec(chamber-1,2);
-//
- AliMUONSegmentationV01 *seg31=new AliMUONSegmentationV01(4);
- seg31->SetSegRadii(rseg2);
- 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(4);
- seg32->SetSegRadii(rseg2); 
- 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(4);
- seg41->SetSegRadii(rseg2);
- 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(4);
- seg42->SetSegRadii(rseg2); 
- 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[36] = {0,0,2,0,
-                      0,0,3,0,
-                      0,1,3,0,
-                      0,2,2,0,
-                      0,1,2,0, 
-                      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[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(4);
- seg51->SetNSlats(9); 
- seg51->SetShift(shift);  
- seg51->SetNPCBperSector(npcb5); 
- seg51->SetSlatXPositions(xpos5);
- seg51->SetSlatYPosition(ypos5);
- seg51->SetPadSize(10.,0.5);
- seg51->SetDAnod(0.25);
- seg51->SetPadDivision(nseg3);
- MUON->SetSegmentationModel(chamber-1, 1, seg51);
-
- AliMUONSegmentationSlatN *seg52=new AliMUONSegmentationSlatN(4);
- seg52->SetNSlats(9); 
- seg52->SetShift(shift);  
- seg52->SetNPCBperSector(npcb5); 
- seg52->SetSlatXPositions(xpos5);
- seg52->SetSlatYPosition(ypos5);
- seg52->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
- seg52->SetDAnod(0.25);
- 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(4);
- seg61->SetNSlats(9); 
- seg61->SetShift(shift);  
- seg61->SetNPCBperSector(npcb5); 
- seg61->SetSlatXPositions(xpos5);
- seg61->SetSlatYPosition(ypos5);
- seg61->SetPadSize(10.,0.5);
- seg61->SetDAnod(0.25);
- seg61->SetPadDivision(nseg3);
- MUON->SetSegmentationModel(chamber-1, 1, seg61);
-
- AliMUONSegmentationSlatN *seg62=new AliMUONSegmentationSlatN(4);
- seg62->SetNSlats(9); 
- seg62->SetShift(shift);  
- seg62->SetNPCBperSector(npcb5); 
- seg62->SetSlatXPositions(xpos5);
- seg62->SetSlatYPosition(ypos5);
- seg62->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
- seg62->SetDAnod(0.25);
- 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) ----------           
-//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- Int_t   nseg4[4]={4, 4, 2, 1};
-
- chamber=7;
-//^^^^^^^^^
-
- MUON->SetNsec(chamber-1,2);
-//
- AliMUONSegmentationSlat *seg71=new AliMUONSegmentationSlat(4);
- Int_t npcb7[44] = {0,0,0,3,
-                   0,0,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};
- 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);  
- seg71->SetShift(shift);  
- seg71->SetNPCBperSector(npcb7); 
- seg71->SetSlatXPositions(xpos7);
- seg71->SetSlatYPosition(ypos7);
- seg71->SetPadSize(10.,0.5);
- seg71->SetDAnod(0.25);
- seg71->SetPadDivision(nseg4);
- MUON->SetSegmentationModel(chamber-1, 1, seg71);
-
- AliMUONSegmentationSlatN *seg72=new AliMUONSegmentationSlatN(4);
-
- MUON->SetSegmentationModel(chamber-1, 2, seg72);
- seg72->SetNSlats(11);  
- seg72->SetShift(shift);   
- seg72->SetNPCBperSector(npcb7); 
- seg72->SetSlatXPositions(xpos7);
- seg72->SetSlatYPosition(ypos7);
- seg72->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
- seg72->SetDAnod(0.25);
- 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(4);
-
- seg81->SetNSlats(11);  
- seg81->SetShift(shift);  
- seg81->SetNPCBperSector(npcb7); 
- seg81->SetSlatXPositions(xpos7);
- seg81->SetSlatYPosition(ypos7);
- seg81->SetPadSize(10.,0.5);
- seg81->SetDAnod(0.25);
- seg81->SetPadDivision(nseg4);
- MUON->SetSegmentationModel(chamber-1, 1, seg81);
-
- AliMUONSegmentationSlat *seg82=new AliMUONSegmentationSlatN(4);
-
- MUON->SetSegmentationModel(chamber-1, 2, seg82);
- seg82->SetNSlats(11);  
- seg82->SetShift(shift);  
- seg82->SetNPCBperSector(npcb7); 
- seg82->SetSlatXPositions(xpos7);
- seg82->SetSlatYPosition(ypos7);
- seg82->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
- seg82->SetDAnod(0.25);
- seg82->SetPadDivision(nseg4);
-
- MUON->SetResponseModel(chamber-1, response0);     
- MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-
-
-//--------------------------------------------------------
-// Configuration for Chamber TC9/10  (Station 5) ---------           
-//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- chamber=9;
-//^^^^^^^^^
-
- MUON->SetNsec(chamber-1,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,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,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);  
- seg91->SetShift(shift);  
- seg91->SetNPCBperSector(npcb9); 
- seg91->SetSlatXPositions(xpos9);
- seg91->SetSlatYPosition(ypos9);
- seg91->SetPadSize(10.,0.5);
- seg91->SetDAnod(0.25);
- seg91->SetPadDivision(nseg4);
- MUON->SetSegmentationModel(chamber-1, 1, seg91);
-
- AliMUONSegmentationSlatN *seg92=new AliMUONSegmentationSlatN(4);
-
- MUON->SetSegmentationModel(chamber-1, 2, seg92);
- seg92->SetNSlats(13);  
- seg92->SetShift(shift);   
- seg92->SetNPCBperSector(npcb9); 
- seg92->SetSlatXPositions(xpos9);
- seg92->SetSlatYPosition(ypos9);
- seg92->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
- seg92->SetDAnod(0.25);
- 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(4);
- seg101->SetNSlats(13);  
- seg101->SetShift(shift);  
- seg101->SetNPCBperSector(npcb9); 
- seg101->SetSlatXPositions(xpos9);
- seg101->SetSlatYPosition(ypos9);
- seg101->SetPadSize(10.,0.5);
- seg101->SetDAnod(0.25);
- seg101->SetPadDivision(nseg4);
- MUON->SetSegmentationModel(chamber-1, 1, seg101);
-
- AliMUONSegmentationSlatN *seg102=new AliMUONSegmentationSlatN(4);
-
- MUON->SetSegmentationModel(chamber-1, 2, seg102);
- seg102->SetNSlats(13);  
- seg102->SetShift(shift);   
- seg102->SetNPCBperSector(npcb9); 
- seg102->SetSlatXPositions(xpos9);
- seg102->SetSlatYPosition(ypos9);
- seg102->SetPadSize(1., 10.); // DeltaX(non bending) = 2 * DeltaY(bending)
- seg102->SetDAnod(0.25);
- seg102->SetPadDivision(nseg4);
-
- MUON->SetResponseModel(chamber-1, response0);     
- MUON->Chamber(chamber-1).SetChargeCorrel(0.11); // 11% charge spread
-
-//--------------------------------------------------------
-// Configuration for Trigger Stations -------------------- 
-//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-// Cluster-size off
- AliMUONResponseTrigger* responseTrigger0 =  new AliMUONResponseTrigger;
-// Cluster-size on  
-// AliMUONResponseTriggerV1* responseTrigger0 =  new AliMUONResponseTriggerV1;
- chamber=11;
- MUON->SetNsec(chamber-1,2);
- AliMUONSegmentationTriggerX *seg111=new AliMUONSegmentationTriggerX;
- MUON->SetSegmentationModel(chamber-1, 1, seg111);
- AliMUONSegmentationTriggerY *seg112=new AliMUONSegmentationTriggerY;
- MUON->SetSegmentationModel(chamber-1, 2, seg112);
-
- MUON->SetResponseModel(chamber-1, responseTrigger0);      
- MUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
-
- chamber=12;
- MUON->SetNsec(chamber-1,2);
- AliMUONSegmentationTriggerX *seg121=new AliMUONSegmentationTriggerX;
- MUON->SetSegmentationModel(chamber-1, 1, seg121);
- AliMUONSegmentationTriggerY *seg122=new AliMUONSegmentationTriggerY;
- MUON->SetSegmentationModel(chamber-1, 2, seg122);
-
- 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);
- AliMUONSegmentationTriggerX *seg141=new AliMUONSegmentationTriggerX;
- MUON->SetSegmentationModel(chamber-1, 1, seg141);
- AliMUONSegmentationTriggerY *seg142=new AliMUONSegmentationTriggerY;
- MUON->SetSegmentationModel(chamber-1, 2, seg142);
-
- MUON->SetResponseModel(chamber-1, responseTrigger0); 
- MUON->Chamber(chamber-1).SetChargeCorrel(0); // same charge on cathodes
+    AliMUON *MUON  = new AliMUONv1("MUON","default");
+    
 }
+
 }
 
                
index a2baef5..47ef1ed 100644 (file)
@@ -54,6 +54,7 @@
 #pragma link C++ class  AliMUONRecoTrack+;
 #pragma link C++ class  AliMUONRecoDisplay+;
 #pragma link C++ class  AliMUONMerger+;
+#pragma link C++ class  AliMUONFactory+;
 #endif
 
 
index f144d52..38122fc 100644 (file)
@@ -37,7 +37,7 @@ SRCS         = AliMUONChamber.cxx AliMUONChamberTrigger.cxx \
               AliMUONSegmentationSlatModule.cxx AliMUONSegmentationSlatModuleN.cxx \
               AliMUONSegmentationSlat.cxx AliMUONSegmentationSlatN.cxx \
               AliMUONRecoEvent.cxx AliMUONRecoDisplay.cxx \
-               AliMUONMerger.cxx
+               AliMUONMerger.cxx AliMUONFactory.cxx
 
 # C++ Headers