Drift gas selection via title in the AliTPC constructor
authorkowal2 <kowal2@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 25 Jun 2012 07:07:40 +0000 (07:07 +0000)
committerkowal2 <kowal2@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 25 Jun 2012 07:07:40 +0000 (07:07 +0000)
TPC/AliTPC.cxx
TPC/AliTPCv0.cxx
TPC/AliTPCv2.cxx
TPC/AliTPCv3.cxx
TPC/AliTPCv4.cxx

index b7aa899..1d2e048 100644 (file)
@@ -181,12 +181,12 @@ AliTPC::AliTPC(const char *name, const char *title)
   //
 
 
-  if (!strcmp(title,"Default")) {       
-    //fTPCParam = new AliTPCParamSR;
-    fTPCParam = AliTPCcalibDB::Instance()->GetParameters();
+  if (!strcmp(title,"Ne-CO2") || !strcmp(title,"Ne-CO2-N") || !strcmp(title,"Default") ) {       
+      fTPCParam = AliTPCcalibDB::Instance()->GetParameters();
   } else {
+      
     AliWarning("In Config.C you must set non-default parameters.");
-    fTPCParam=0;
+    fTPCParam=0;    
   }
 
 }
@@ -295,34 +295,51 @@ void AliTPC::CreateMaterials()
   //----------------------------------------------------------------
 
   //
-  // Drift gases 1 - nonsensitive, 2 - sensitive
-  // Ne-CO2 (90-10) (volume) values at 20deg and 1 atm.
-  // rho(Ne) = 0.839 g/cm^3, rho(CO2) = 1.842 g/cm^3
-  
+  // Drift gases 1 - nonsensitive, 2 - sensitive, 3 - for Kr
+  //  Composition by % of volume, values at 20deg and 1 atm.
+  //
+  //  get the geometry title - defined in Config.C
+  //
 
+  TString title(GetTitle());
+  
+  //
   amat[0]= 20.18;
   amat[1]=12.011;
   amat[2]=15.9994;
-  // amat[3]=14.007;
+
 
   zmat[0]= 10.; 
   zmat[1]=6.;
   zmat[2]=8.;
-  // zmat[3]=7.;
-
-  //wmat[0]=0.756992632;
-  wmat[0]=0.8038965;
-  //wmat[1]=0.056235789;
-  wmat[1]= 0.053519;
-  //wmat[2]=0.128469474;
-  wmat[2]= 0.1425743;
-  // wmat[3]=0.058395789;
-  density=0.0009393;
 
-  AliMixture(12,"Ne-CO2-1",amat,zmat,density,3,wmat);
-  AliMixture(13,"Ne-CO2-2",amat,zmat,density,3,wmat);
-  AliMixture(35,"Ne-CO2-3",amat,zmat,density,3,wmat);
+  if(title == TString("Ne-CO2")){
+    wmat[0]=0.8038965;
+    wmat[1]= 0.053519;
+    wmat[2]= 0.1425743;
+    density=0.0009393;
+    //
+    AliMixture(12,"Ne-CO2-1",amat,zmat,density,3,wmat);
+    AliMixture(13,"Ne-CO2-2",amat,zmat,density,3,wmat);
+    AliMixture(35,"Ne-CO2-3",amat,zmat,density,3,wmat);
+  }
+  else if (title == TString("Ne-CO2-N")){
+     amat[3]=14.007;
+     zmat[3]=7.; 
+     wmat[0]=0.756992632;
+     wmat[1]=0.056235789; 
+     wmat[2]=0.128469474; 
+     wmat[3]=0.058395789;
+     density=0.000904929;
+     //
+     AliMixture(12,"Ne-CO2-N-1",amat,zmat,density,4,wmat);
+     AliMixture(13,"Ne-CO2-N-2",amat,zmat,density,4,wmat);
+     AliMixture(30,"Ne-CO2-N-3",amat,zmat,density,4,wmat);
+  
+  }
+
+
+
   //----------------------------------------------------------------------
   //               solid materials
   //----------------------------------------------------------------------
@@ -685,10 +702,10 @@ void AliTPC::CreateMaterials()
   //----------------------------------------------------------
 
   AliMedium(0, "Air", 11, 0, iSXFLD, sXMGMX, 10., 999., .1, .01, .1);
-  AliMedium(1, "Ne-CO2-1", 12, 0, iSXFLD, sXMGMX, 10., 999.,.1,.001, .001);
-  AliMedium(2, "Ne-CO2-2", 13, 1, iSXFLD, sXMGMX, 10., 999.,.1,.001, .001);
+  AliMedium(1, "DriftGas1", 12, 0, iSXFLD, sXMGMX, 10., 999.,.1,.001, .001);
+  AliMedium(2, "DriftGas2", 13, 1, iSXFLD, sXMGMX, 10., 999.,.1,.001, .001);
   AliMedium(3,"CO2",10,0, iSXFLD, sXMGMX, 10., 999.,.1, .001, .001); 
-  AliMedium(20, "Ne-CO2-3", 35, 1, iSXFLD, sXMGMX, 10., 999.,.1,.001, .001);
+  AliMedium(20, "DriftGas3", 35, 1, iSXFLD, sXMGMX, 10., 999.,.1,.001, .001);
   //-----------------------------------------------------------  
   // tracking media for solids
   //-----------------------------------------------------------
index 1130e14..9bb0e53 100644 (file)
@@ -164,7 +164,7 @@ void AliTPCv0::CreateGeometry()
   dvol->DefineSection(4,253.6,74.5,264.4);
   dvol->DefineSection(5,260.,74.5,264.4);
   //
-  TGeoMedium *m5 = gGeoManager->GetMedium("TPC_Ne-CO2-1");
+  TGeoMedium *m5 = gGeoManager->GetMedium("TPC_DriftGasS1");
   TGeoVolume *v9 = new TGeoVolume("TPC_Drift",dvol,m5);
   //
   v1->AddNode(v9,1);
index c3dddce..edd2766 100644 (file)
@@ -169,7 +169,7 @@ void AliTPCv2::CreateGeometry()
   dvol->DefineSection(4,253.6,74.5,264.4);
   dvol->DefineSection(5,260.,74.5,264.4);
   //
-  TGeoMedium *m5 = gGeoManager->GetMedium("TPC_Ne-CO2-2");
+  TGeoMedium *m5 = gGeoManager->GetMedium("TPC_DriftGas2");
   TGeoVolume *v9 = new TGeoVolume("TPC_Drift",dvol,m5);
   //
   v1->AddNode(v9,1);
index 072c8ec..ea957ce 100644 (file)
@@ -181,7 +181,7 @@ void AliTPCv3::CreateGeometry()
   dvol->DefineSection(4,253.6,74.5,264.4);
   dvol->DefineSection(5,260.,74.5,264.4);
   //
-  TGeoMedium *m5 = gGeoManager->GetMedium("TPC_Ne-CO2-2");
+  TGeoMedium *m5 = gGeoManager->GetMedium("TPC_DriftGas2");
   TGeoVolume *v9 = new TGeoVolume("TPC_Drift",dvol,m5);
   //
   v1->AddNode(v9,1);
index e6968ce..8d65128 100644 (file)
@@ -172,7 +172,7 @@ void AliTPCv4::CreateGeometry()
   dvol->DefineSection(4,253.6,74.5,264.4);
   dvol->DefineSection(5,260.,74.5,264.4);
   //
-  TGeoMedium *m5 = gGeoManager->GetMedium("TPC_Ne-CO2-3");
+  TGeoMedium *m5 = gGeoManager->GetMedium("TPC_DriftGas3");
   TGeoVolume *v9 = new TGeoVolume("TPC_Drift",dvol,m5);
   //
   v1->AddNode(v9,1);