]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EMCAL/AliEMCALEMCGeometry.cxx
Changes needed for evaporation and fragmentation
[u/mrichter/AliRoot.git] / EMCAL / AliEMCALEMCGeometry.cxx
index 1967eb6ce3b53fa97dab404273db75c5cf1fef13..640a48d18770d48da2ece087e91246b68e5a8655 100644 (file)
 //   EMCAL_FIRSTYEAR - geometry for December 2009 to December 2010 run period
 //                     with four Super Modules
 //  
-//   EMCAL_FIRSTYEARV1 - geometry for December 2009 to December 2010 run period
+//   Adding V1 (EMCAL_FIRSTYEARV1, EMCAL_COMPLETEV1) - geometry from December 2009 
 //                1. Fixed bug for positions of modules inside SM
 //                   (first module has tilt 0.75 degree);
 //                2. Added Al front plate (width 1 cm) and 2 paper sheets per sampling
 //                   layer (additional 0.2 mm) 
 //                   The sizes have updated with last information from production
 //                   drawing (end of October 2010). 
+//                3. COMPLETEV1 contains now only 10 SM for runs for year 2011
+//                4. COMPLETE12SMV1 contains 12 SM for runs from year 2012 and on
 //
 //   EMCAL_WSUC (Wayne State test stand)
 //      = no definite equivalent in old notation, was only used by
@@ -76,7 +78,7 @@ ClassImp(AliEMCALEMCGeometry)
 
 // these initialisations are needed for a singleton
 Bool_t    AliEMCALEMCGeometry::fgInit      = kFALSE;
-const Char_t*   AliEMCALEMCGeometry::fgkDefaultGeometryName = "EMCAL_COMPLETE";
+const Char_t*   AliEMCALEMCGeometry::fgkDefaultGeometryName = "EMCAL_COMPLETE12SMV1";
 
 
 AliEMCALEMCGeometry::AliEMCALEMCGeometry() 
@@ -110,7 +112,8 @@ AliEMCALEMCGeometry::AliEMCALEMCGeometry()
   AliDebug(2, "AliEMCALEMCGeometry : default ctor ");
 }
 //______________________________________________________________________
-AliEMCALEMCGeometry::AliEMCALEMCGeometry(const Text_t* name, const Text_t* title) :
+AliEMCALEMCGeometry::AliEMCALEMCGeometry(const Text_t* name, const Text_t* title,
+                                         const Text_t* mcname, const Text_t* mctitle ) :
   TNamed(name,title),
     fGeoName(0),fArrayOpts(0),fNAdditionalOpts(0),fECPbRadThickness(0.),fECScintThick(0.),
     fNECLayers(0),fArm1PhiMin(0.),fArm1PhiMax(0.),fArm1EtaMin(0.),fArm1EtaMax(0.),fIPDistance(0.),
@@ -132,9 +135,9 @@ AliEMCALEMCGeometry::AliEMCALEMCGeometry(const Text_t* name, const Text_t* title
     f2Trd2Dy2(0.), fEmptySpace(0.), fTubsR(0.), fTubsTurnAngle(0.)
 {
   // ctor only for internal usage (singleton)
-  AliDebug(2, Form("AliEMCALEMCGeometry(%s,%s) ", name,title));
+  AliDebug(2, Form("AliEMCALEMCGeometry(%s,%s,%s,%s) ", name,title,mcname,mctitle));
 
-  Init();
+  Init(mcname,mctitle);
 
   //  CreateListOfTrd1Modules();
 
@@ -226,7 +229,7 @@ AliEMCALEMCGeometry::~AliEMCALEMCGeometry(void){
 }
 
 //______________________________________________________________________
-void AliEMCALEMCGeometry::Init(void){
+void AliEMCALEMCGeometry::Init(const Text_t* mcname, const Text_t* mctitle){
   //
   // Initializes the EMCAL parameters based on the name
   // Only Shashlyk geometry is available, but various combinations of
@@ -256,17 +259,20 @@ void AliEMCALEMCGeometry::Init(void){
       fGeoName = "EMCAL_PDC06";
     }
   }
+  
   if(fGeoName.Contains("WSUC")) fGeoName = "EMCAL_WSUC";
 
   //check that we have a valid geometry name
-  if(!(fGeoName.Contains("EMCAL_PDC06") || fGeoName.Contains("EMCAL_COMPLETE") || fGeoName.Contains("EMCAL_WSUC") 
-       || fGeoName.Contains("EMCAL_FIRSTYEAR") || fGeoName.Contains("EMCAL_FIRSTYEARV1"))) {
+  if(!(   fGeoName.Contains("EMCAL_PDC06")     || fGeoName.Contains("EMCAL_WSUC")  
+       || fGeoName.Contains("EMCAL_COMPLETE")  || fGeoName.Contains("EMCAL_COMPLETEV1")  || fGeoName.Contains("EMCAL_COMPLETE12SMV1") 
+       || fGeoName.Contains("EMCAL_FIRSTYEAR") || fGeoName.Contains("EMCAL_FIRSTYEARV1") )) {
     Fatal("Init", "%s is an undefined geometry!", fGeoName.Data()) ; 
   }
 
   // Option to know whether we have the "half" supermodule(s) or not
   fKey110DEG = 0;
-  if(fGeoName.Contains("COMPLETE") || fGeoName.Contains("PDC06")) fKey110DEG = 1; // for GetAbsCellId
+  if(fGeoName.Contains("COMPLETE") || fGeoName.Contains("PDC06") || fGeoName.Contains("12SM")) fKey110DEG = 1; // for GetAbsCellId
+  if(fGeoName.Contains("COMPLETEV1"))  fKey110DEG = 0; 
   fShishKebabTrd1Modules = 0;
 
   // JLK 13-Apr-2008
@@ -275,7 +281,7 @@ void AliEMCALEMCGeometry::Init(void){
   //geometry-name specific options
 
   fNumberOfSuperModules = 12;       // 12 = 6 * 2 (6 in phi, 2 in Z)
-  fNPhi                 = 12;      // module granularity in phi within smod (azimuth)
+  fNPhi                 = 12;        // module granularity in phi within smod (azimuth)
   fNZ                   = 24;       // module granularity along Z within smod (eta)
   fNPHIdiv = fNETAdiv   = 2;        // tower granularity within module
   fArm1PhiMin           = 80.0;            // degrees, Starting EMCAL Phi position
@@ -312,12 +318,16 @@ void AliEMCALEMCGeometry::Init(void){
 
   //modifications to the above for WSUC geometry
   if(fGeoName.Contains("WSUC")){ // 18-may-05 - about common structure
-    fPhiModuleSize = 12.5;     // 20-may-05 - rectangular shape
-    fEtaModuleSize = 11.9;
-    fECScintThick  = fECPbRadThickness = 0.16;// (13-may-05 from V.Petrov)
-    fNumberOfSuperModules = 1; // 27-may-05
-    fShellThickness = 30.;       // should be change 
+    fNumberOfSuperModules = 2;  // 27-may-05; Nov 24,2010 for TB
     fNPhi = fNZ = 4; 
+    fTrd1AlFrontThick   = 1.0;  // one cm
+    // Bond paper - two sheets around Sc tile
+    fTrd1BondPaperThick = 0.01; // 0.01cm = 0.1 mm
+    
+    fPhiModuleSize = 12.0;
+    fEtaModuleSize = fPhiModuleSize;
+    fLateralSteelStrip = 0.015; // 0.015cm  = 0.15mm
+
     CheckAdditionalOptions();
   }
 
@@ -325,29 +335,43 @@ void AliEMCALEMCGeometry::Init(void){
   if(fGeoName.Contains("FIRSTYEAR")){  
     fNumberOfSuperModules = 4; 
     fArm1PhiMax           = 120.0; 
-    if(fGeoName.Contains("FIRSTYEARV1")){
-      // Oct 26,2010 : First module has tilt = 0.75 degree : 
-      // look to AliEMCALShishKebabTrd1Module::DefineFirstModule(key)
-      // New sizes from production drawing, added Al front plate.
-      // The thickness of sampling is change due to existing two sheets of paper.
-
-      // Will replace fFrontSteelStrip
-      fTrd1AlFrontThick   = 1.0;  // one cm
-      // Bond paper - two sheets around Sc tile
-      fTrd1BondPaperThick = 0.01; // 0.01cm = 0.1 mm
-
-      fPhiModuleSize = 12.0;
-      fEtaModuleSize = fPhiModuleSize;
-      fLateralSteelStrip = 0.015; // 0.015cm  = 0.15mm
-    }
     CheckAdditionalOptions();  
   }    
-       
+  
+  if(fGeoName.Contains("FIRSTYEARV1") || fGeoName.Contains("COMPLETEV1") || fGeoName.Contains("COMPLETE12SMV1") ){
+    // Oct 26,2010 : First module has tilt = 0.75 degree : 
+    // look to AliEMCALShishKebabTrd1Module::DefineFirstModule(key)
+    // New sizes from production drawing, added Al front plate.
+    // The thickness of sampling is change due to existing two sheets of paper.
+    
+    // Will replace fFrontSteelStrip
+    fTrd1AlFrontThick   = 1.0;  // one cm
+    // Bond paper - two sheets around Sc tile
+    fTrd1BondPaperThick = 0.01; // 0.01cm = 0.1 mm
+    
+    fPhiModuleSize = 12.0;
+    fEtaModuleSize = fPhiModuleSize;
+    fLateralSteelStrip = 0.015; // 0.015cm  = 0.15mm
+    
+    if(fGeoName.Contains("COMPLETEV1"))
+    {
+      fNumberOfSuperModules = 10;      
+      fArm1PhiMax           = 180.0; 
+    }
+    else if (fGeoName.Contains("COMPLETE12SMV1"))
+    {
+      fNumberOfSuperModules = 12;      
+      fArm1PhiMax           = 200.0; 
+    }
+    CheckAdditionalOptions();  
+  }
+
   // constant for transition absid <--> indexes
   fNCellsInModule = fNPHIdiv*fNETAdiv;
   fNCellsInSupMod = fNCellsInModule*fNPhi*fNZ;
   fNCells         = fNCellsInSupMod*fNumberOfSuperModules;
-  if(GetKey110DEG()) fNCells -= fNCellsInSupMod;
+  if(GetKey110DEG() && !fGeoName.Contains("12SMV1")) fNCells -= fNCellsInSupMod; // SM 10 and 11 are 1/2 size on phi
+  if(GetKey110DEG() && fGeoName.Contains("12SMV1") ) fNCells -=2*(2 * fNCellsInSupMod / 3); // SM 10 and 11 are 1/3 size on phi
 
   fNPhiSuperModule = fNumberOfSuperModules/2;
   if(fNPhiSuperModule < 1) fNPhiSuperModule = 1;
@@ -356,7 +380,7 @@ void AliEMCALEMCGeometry::Init(void){
   fEtaTileSize = fEtaModuleSize/double(fNETAdiv) - fLateralSteelStrip; // 13-may-05 
 
   fLongModuleSize = fNECLayers*(fECScintThick + fECPbRadThickness);  
-  if(fGeoName.Contains("FIRSTYEARV1")){
+  if(fGeoName.Contains("V1")){
     Double_t ws = fECScintThick + fECPbRadThickness + 2.*fTrd1BondPaperThick; // sampling width
     // Number of Pb tiles = Number of Sc tiles - 1
     fLongModuleSize = fTrd1AlFrontThick + (ws*fNECLayers - fECPbRadThickness);
@@ -393,13 +417,13 @@ void AliEMCALEMCGeometry::Init(void){
     }
   }
   if(fNumberOfSuperModules > 10) {
-    fPhiBoundariesOfSM[11] = 190.*TMath::DegToRad();
-    fPhiBoundariesOfSM[10] = fPhiBoundariesOfSM[11] - TMath::ATan2((fParSM[1]) , fIPDistance);
+    fPhiBoundariesOfSM[10] =  fPhiBoundariesOfSM[0] + 20.*TMath::DegToRad()*5; // in the ideal case the phi-gap is constant
+    fPhiBoundariesOfSM[11] =  fPhiBoundariesOfSM[10] + 2.*TMath::ATan2((fParSM[1])/3., fIPDistance); // one_third SMs
     fPhiCentersOfSM[5]     = (fPhiBoundariesOfSM[10]+fPhiBoundariesOfSM[11])/2.; 
   }
 
   //called after setting of scintillator and lead layer parameters
-  DefineSamplingFraction();
+  DefineSamplingFraction(mcname,mctitle);
 
   
   // TRU parameters - Apr 29,08 by PAI. 
@@ -452,7 +476,8 @@ void AliEMCALEMCGeometry::PrintGeometry()
         fParSM[0],fParSM[1],fParSM[2]);
   printf(" fPhiGapForSM  %7.4f cm (%7.4f <- phi size in degree)\n",  
         fPhiGapForSM, TMath::ATan2(fPhiGapForSM,fIPDistance)*TMath::RadToDeg());
-  if(GetKey110DEG()) printf(" Last two modules have size 10 degree in  phi (180<phi<190)\n");
+  if(GetKey110DEG() && !fGeoName.Contains("12SMV1") ) printf(" Last two modules have size 10 degree in  phi (180<phi<190)\n");
+  if(GetKey110DEG() && fGeoName.Contains("12SMV1")) printf(" Last two modules have size 6.6 degree in  phi (180<phi<186.6)\n");
   printf(" phi SM boundaries \n"); 
   for(int i=0; i<fPhiBoundariesOfSM.GetSize()/2.; i++) {
     printf(" %i : %7.5f(%7.2f) -> %7.5f(%7.2f) : center %7.5f(%7.2f) \n", i, 
@@ -522,26 +547,49 @@ void AliEMCALEMCGeometry::CheckAdditionalOptions()
 }
 
 //__________________________________________________________________
-void AliEMCALEMCGeometry::DefineSamplingFraction()
+void AliEMCALEMCGeometry::DefineSamplingFraction(const Text_t* mcname, const Text_t* mctitle)
 {
   // Jun 05,2006
   // Look http://rhic.physics.wayne.edu/~pavlinov/ALICE/SHISHKEBAB/RES/linearityAndResolutionForTRD1.html
   // Keep for compatibilty
   //
+  
+  // Sampling factor for G3
+  fSampling = 10.87; // Default value - Nov 25,2010
   if(fNECLayers == 69) {        // 10% layer reduction
     fSampling = 12.55;
   } else if(fNECLayers == 61) { // 20% layer reduction
     fSampling = 12.80;
   } else if(fNECLayers == 77) {
-    if       (fECScintThick>0.159 && fECScintThick<0.161) { // original sampling fraction, equal layers
+    if(fGeoName.Contains("V1")){
+      fSampling = 10.87; //Adding paper sheets and cover plate; Nov 25,2010
+    } else if   (fECScintThick>0.159 && fECScintThick<0.161) { // original sampling fraction, equal layers
       fSampling = 12.327; // fECScintThick = fECPbRadThickness = 0.160;
     } else if (fECScintThick>0.175 && fECScintThick<0.177) { // 10% Pb thicknes reduction
       fSampling = 10.5; // fECScintThick = 0.176, fECPbRadThickness=0.144;
     } else if(fECScintThick>0.191 && fECScintThick<0.193) { // 20% Pb thicknes reduction
       fSampling = 8.93; // fECScintThick = 0.192, fECPbRadThickness=0.128;
     }
-
   }
+
+  // Default sampling factor for G3, modify it for other transport model
+  TString mcName  = mcname;
+  TString mcTitle = mctitle;
+
+  Float_t samplingFactorTranportModel = 1. ;
+  if     (mcName.Contains("Geant3")) samplingFactorTranportModel = 1.;//0.988 // Do nothing
+  else if(mcName.Contains("Fluka") ) samplingFactorTranportModel = 1.; // To be set
+  else if(mcName.Contains("Geant4")){
+    if(mcTitle.Contains("EMV"))      samplingFactorTranportModel = 1.096; // 0.906, 0.896 (OPT)
+    else                             samplingFactorTranportModel = 0.86; // 1.15 (CHIPS), 1.149 (BERT), 1.147 (BERT_CHIPS) 
+  }      
+  
+  AliDebug(2,Form("MC modeler <%s>, Title <%s>: Sampling %f, model fraction with respect to G3 %f, final sampling %f \n",
+               mcName.Data(),mcTitle.Data(),fSampling,samplingFactorTranportModel,fSampling*samplingFactorTranportModel));
+
+  
+  fSampling*=samplingFactorTranportModel;
+  
 }
 
 //________________________________________________________________________________________________