]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - ZDC/AliZDCDigitizer.cxx
Better starting value for estimate of covariance matrix (Maksym, Silvia)
[u/mrichter/AliRoot.git] / ZDC / AliZDCDigitizer.cxx
index 986ab09922feed705884604e285f298110b5e467..d8b43c933dc682b885712eb99b8ff7fe19433c60 100644 (file)
@@ -36,6 +36,7 @@
 #include "AliGenHijingEventHeader.h"
 #include "AliRunDigitizer.h"
 #include "AliRunLoader.h"
+#include "AliLoader.h"
 #include "AliGRPObject.h"
 #include "AliCDBManager.h"
 #include "AliCDBEntry.h"
@@ -163,19 +164,23 @@ Bool_t AliZDCDigitizer::Init()
       }
       fPMGain[2][1] = 0.869654*(1.32312-0.000101515*fBeamEnergy)*10000000;
       fPMGain[2][2] = 1.030883*(1.32312-0.000101515*fBeamEnergy)*10000000;
+      //
+      AliInfo(Form("    PMT gains for p-p @ %1.0f+%1.0f GeV: ZN(%1.0f), ZP(%1.0f), ZEM(%1.0f)\n",
+       fBeamEnergy, fBeamEnergy, fPMGain[0][0], fPMGain[1][0], fPMGain[2][1]));
     }
-    else{
-       Float_t scalGainFactor = fBeamEnergy/2760.;
+    else{ // for RELDIS simulation
+       Float_t scalGainFactor = 0.5;
        for(Int_t j = 0; j < 5; j++){
-         fPMGain[0][j] = 50000./(4*scalGainFactor);   // ZNC            
-         fPMGain[1][j] = 100000./(10*scalGainFactor); // ZPC       
-         fPMGain[2][j] = 100000./scalGainFactor;      // ZEM
-         fPMGain[3][j] = 50000./(4*scalGainFactor);   // ZNA            
-         fPMGain[4][j] = 100000./(10*scalGainFactor); // ZPA    
+        fPMGain[0][j] = 50000./scalGainFactor;  // ZNC          
+        fPMGain[1][j] = 100000./scalGainFactor; // ZPC    
+        fPMGain[2][j] = 100000./scalGainFactor;     // ZEM
+        fPMGain[3][j] = 50000./scalGainFactor;  // ZNA          
+        fPMGain[4][j] = 100000./scalGainFactor; // ZPA 
        }
+       //
+       AliInfo(Form("  PMT gains for RELDIS simulation: ZN(%1.0f), ZP(%1.0f), ZEM(%1.0f)\n",
+         fPMGain[0][0], fPMGain[1][0], fPMGain[2][1]));
     }
-    AliInfo(Form("    PMT gains for p-p @ %1.0f+%1.0f GeV: ZN(%1.0f), ZP(%1.0f), ZEM(%1.0f)\n",
-       fBeamEnergy, fBeamEnergy, fPMGain[0][0], fPMGain[1][0], fPMGain[2][1]));
   }
   else if((beamType.CompareTo("A-A")) == 0){
     // PTM gains for Pb-Pb @ 2.7+2.7 A TeV ***************
@@ -185,11 +190,11 @@ Bool_t AliZDCDigitizer::Init()
     // ZN gains must be divided by 4, ZP gains by 10!
     Float_t scalGainFactor = fBeamEnergy/2760.;
     for(Int_t j = 0; j < 5; j++){
-       fPMGain[0][j] = 50000./(4*scalGainFactor);   // ZNC              
-       fPMGain[1][j] = 100000./(10*scalGainFactor); // ZPC       
-       fPMGain[2][j] = 100000./scalGainFactor;             // ZEM
-       fPMGain[3][j] = 50000./(4*scalGainFactor);   // ZNA              
-       fPMGain[4][j] = 100000./(10*scalGainFactor); // ZPA    
+       fPMGain[0][j] = 50000./(4*scalGainFactor);  // ZNC               
+       fPMGain[1][j] = 100000./(5*scalGainFactor); // ZPC       
+       fPMGain[2][j] = 100000./scalGainFactor;            // ZEM
+       fPMGain[3][j] = 50000./(4*scalGainFactor);  // ZNA               
+       fPMGain[4][j] = 100000./(5*scalGainFactor); // ZPA    
     }
     AliInfo(Form("    PMT gains for Pb-Pb @ %1.0f+%1.0f A GeV: ZN(%1.0f), ZP(%1.0f), ZEM(%1.0f)\n",
        fBeamEnergy, fBeamEnergy, fPMGain[0][0], fPMGain[1][0], fPMGain[2][1]));
@@ -312,10 +317,10 @@ void AliZDCDigitizer::Exec(Option_t* /*option*/)
       specPProj = ((AliGenHijingEventHeader*) genHeader)->ProjSpectatorsp();
       specNTarg = ((AliGenHijingEventHeader*) genHeader)->TargSpectatorsn();
       specPTarg = ((AliGenHijingEventHeader*) genHeader)->TargSpectatorsp();
-      printf("\n\t AliZDCDigitizer: b = %1.2f fm\n"
+      /*printf("\n\t AliZDCDigitizer: b = %1.2f fm\n"
       " \t    PROJ.:  #spectator n %d, #spectator p %d\n"
       " \t    TARG.:  #spectator n %d, #spectator p %d\n", 
-      impPar, specNProj, specPProj, specNTarg, specPTarg);
+      impPar, specNProj, specPProj, specNTarg, specPTarg);*/
     }
     
   }
@@ -327,13 +332,13 @@ void AliZDCDigitizer::Exec(Option_t* /*option*/)
     Int_t freeSpecNTarg, freeSpecPTarg;
     Fragmentation(impPar, specNTarg, specPTarg, freeSpecNTarg, freeSpecPTarg);
     SpectatorSignal(1, freeSpecNProj, pm);
-    printf("\t AliZDCDigitizer -> Adding signal for %d PROJ free spectator n",freeSpecNProj);
+//    printf("\t AliZDCDigitizer -> Adding signal for %d PROJ free spectator n",freeSpecNProj);
     SpectatorSignal(2, freeSpecPProj, pm);
-    printf(" and %d free spectator p\n",freeSpecPProj);
+//    printf(" and %d free spectator p\n",freeSpecPProj);
     SpectatorSignal(3, freeSpecNTarg, pm);
-    printf("\t AliZDCDigitizer -> Adding signal for %d TARG free spectator n",freeSpecNTarg);
+//    printf("\t AliZDCDigitizer -> Adding signal for %d TARG free spectator n",freeSpecNTarg);
     SpectatorSignal(4, freeSpecPTarg, pm);
-    printf(" and %d free spectator p\n\n",freeSpecPTarg);
+//    printf(" and %d free spectator p\n\n",freeSpecPTarg);
   }