]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
MIP conversion implemented (moved from class AliVZEROReconstructor)
authorcheynis <cheynis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 23 Oct 2008 15:12:29 +0000 (15:12 +0000)
committercheynis <cheynis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 23 Oct 2008 15:12:29 +0000 (15:12 +0000)
VZERO/AliVZEROCalibData.cxx
VZERO/AliVZEROCalibData.h

index e56ef166be70de9a28516156800784ffac8ea30d..3ff261b17e68a05b83c6cb4f75a2466793cd5c88 100644 (file)
@@ -21,6 +21,8 @@
 //                                                                         //
 /////////////////////////////////////////////////////////////////////////////
 
+#include <TMath.h>
+
 #include "AliVZEROCalibData.h"
 
 ClassImp(AliVZEROCalibData)
@@ -165,3 +167,35 @@ void AliVZEROCalibData::SetTimeGain(Float_t* TimeGain)
   else for(int t=0; t<64; t++) fTimeGain[t] = 0.0;
 }
 
+//_____________________________________________________________________________
+Float_t AliVZEROCalibData::GetMIPperADC(Int_t channel) const {
+       
+       // Computes the MIP conversion factor - MIP per ADC channel - 
+       // Argument passed is the PM number (aliroot numbering)
+       
+       Float_t P0[64] = {
+               7.094891, 7.124938, 7.089708, 7.098169, 7.094482, 7.147250, 7.170978, 7.183392, 
+               7.145760, 7.148096, 7.153840, 7.143544, 7.186069, 7.194580, 7.203516, 7.195176, 
+               7.188333, 7.198607, 7.209412, 7.226565, 7.221695, 7.205132, 7.191238, 7.227724, 
+               7.232810, 7.252655, 7.230309, 7.273518, 7.273518, 7.242969, 7.252859, 7.252655, 
+               7.026802, 7.079913, 7.134147, 7.092387, 7.079561, 7.072848, 7.123192, 7.003141, 
+               7.024667, 7.124784, 7.123442, 7.129744, 7.110671, 7.143031, 7.139439, 7.178109, 
+               7.247803, 7.139396, 7.293809, 7.094454, 6.992198, 7.206448, 7.244765, 7.056197, 
+               7.263595, 7.138569, 7.089582, 7.215683, 7.266183, 7.165123, 7.243276, 7.235135 };
+       Float_t P1[64] = {
+               0.135569, 0.146405, 0.142425, 0.144278, 0.142307, 0.141648, 0.128477, 0.138239, 
+               0.144173, 0.143419, 0.143572, 0.144482, 0.138024, 0.136542, 0.135955, 0.138537, 
+               0.148521, 0.141999, 0.139627, 0.130014, 0.134970, 0.135635, 0.139094, 0.140634, 
+               0.137971, 0.142080, 0.142793, 0.142778, 0.142778, 0.146045, 0.139133, 0.142080, 
+               0.144121, 0.142311, 0.136564, 0.142686, 0.138792, 0.166285, 0.136387, 0.155391, 
+               0.176082, 0.140408, 0.164738, 0.144270, 0.142766, 0.147486, 0.141951, 0.138012, 
+               0.132394, 0.142849, 0.140477, 0.144592, 0.141558, 0.157646, 0.143758, 0.173385, 
+               0.146489, 0.143279, 0.145230, 0.147203, 0.147333, 0.144979, 0.148597, 0.138985 };
+       
+       // High Voltage retrieval from Calibration Data Base:  
+       Float_t  HV = fMeanHV[channel];  
+       Float_t MIP = 0.5/TMath::Exp((TMath::Log(HV) - P0[channel] )/P1[channel]);
+       return MIP; 
+       
+}
+
index 5507e02fe79ed7bd3c61c4cb2aeef09e6645afcb..a5ae1e01771d5bbed504da48232e5bee29ddf409 100644 (file)
@@ -62,7 +62,9 @@ class AliVZEROCalibData: public TNamed {
   void     SetTimeOffset(Float_t* TimeOffset);
   void     SetTimeGain(Float_t val, Int_t channel) {fTimeGain[channel]=val;}
   void     SetTimeGain(Float_t* TimeGain);
-  
+
+  Float_t  GetMIPperADC(Int_t channel) const;
+
  protected:
   Float_t  fPedestal[128];     // Mean pedestal values
   Float_t  fSigma[128];        // Sigmas of pedestal peaks