ROOT logo
/**************************************************************************
 * 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.                  *
 **************************************************************************/


///////////////////////////////////////////////////////////////////////////////
//                                                                           //
//  PHOS tender, recalibrate PHOS clusters                                   //
//  and do track matching                                                    //
//  Author : Dmitri Peressounko (RRC KI)                                     //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////

#include "TROOT.h"
#include "TH2.h"
#include "TFile.h"

#include <AliLog.h>
#include <AliVEvent.h>
#include <AliAODEvent.h>
#include <AliESDEvent.h>
#include <AliAnalysisManager.h>
#include <AliTender.h>
#include <AliCDBManager.h>
#include "AliMagF.h"
#include "TGeoGlobalMagField.h"

#include "AliVCluster.h"
#include "AliPHOSTenderSupply.h"
#include "AliPHOSCalibData.h"
#include "AliPHOSGeometry.h"
#include "AliPHOSEsdCluster.h"
#include "AliPHOSAodCluster.h"
#include "AliOADBContainer.h"
#include "AliAODCaloCells.h"
#include "AliESDCaloCells.h"

ClassImp(AliPHOSTenderSupply)

AliPHOSTenderSupply::AliPHOSTenderSupply() :
  AliTenderSupply()
  ,fOCDBpass("local://OCDB")
  ,fNonlinearityVersion("Default")
  ,fPHOSGeo(0x0)
  ,fRecoPass(-1)  //to be defined
  ,fUsePrivateBadMap(0)
  ,fUsePrivateCalib(0)
  ,fPHOSCalibData(0x0)
  ,fTask(0x0)
  ,fIsMC(kFALSE)
  ,fMCProduction("")  
{
	//
	// default ctor
	//
   for(Int_t i=0;i<10;i++)fNonlinearityParams[i]=0. ;
   for(Int_t mod=0;mod<5;mod++)fPHOSBadMap[mod]=0x0 ;
}

//_____________________________________________________
AliPHOSTenderSupply::AliPHOSTenderSupply(const char *name, const AliTender *tender) :
  AliTenderSupply(name,tender)
  ,fOCDBpass("alien:///alice/cern.ch/user/p/prsnko/PHOSrecalibrations/")
  ,fNonlinearityVersion("Default")
  ,fPHOSGeo(0x0)
  ,fRecoPass(-1)  //to be defined
  ,fUsePrivateBadMap(0)
  ,fUsePrivateCalib(0)
  ,fPHOSCalibData(0x0)
  ,fTask(0x0)
  ,fIsMC(kFALSE)
  ,fMCProduction("")  
{
	//
	// named ctor
	//
   for(Int_t i=0;i<10;i++)fNonlinearityParams[i]=0. ;
   for(Int_t mod=0;mod<5;mod++)fPHOSBadMap[mod]=0x0 ;
}

//_____________________________________________________
AliPHOSTenderSupply::~AliPHOSTenderSupply()
{
  //Destructor
  if(fPHOSCalibData)
    delete fPHOSCalibData;
  fPHOSCalibData=0x0 ;
}

//_____________________________________________________
void AliPHOSTenderSupply::InitTender()
{
  //
  // Initialise PHOS tender
  //
  Int_t runNumber = 0;
  if(fTender)
    runNumber = fTender->GetRun();
  else{
    if(!fTask){
      AliError("Neither Tender not Taks was not set") ;
      return ;
    }
    AliAODEvent *aod = dynamic_cast<AliAODEvent*>(fTask->InputEvent()) ;
    if(aod)
      runNumber = aod->GetRunNumber() ;
    else{
      AliESDEvent *esd = dynamic_cast<AliESDEvent*>(fTask->InputEvent()) ;
      if(esd)
        runNumber = esd->GetRunNumber() ;
      else{
        AliError("Taks does not contain neither ESD nor AOD") ;
        return ;
      }
    }   
  }

  //In MC always reco pass 1
  if(fIsMC)
    fRecoPass=1 ;
  
  if(fRecoPass<0){ //not defined yet
    // read if from filename.
    AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
    TTree * t = mgr->GetTree();
    if(t){  
      TFile * f = t->GetCurrentFile() ;
      if(f){  
        TString fname(f->GetName());
        if(fname.Contains("pass1"))
	   fRecoPass=1;
        else 
	  if(fname.Contains("pass2"))
	   fRecoPass=2;
          else 
	    if(fname.Contains("pass3")) 
  	      fRecoPass=3;
            else 
	      if(fname.Contains("pass4")) 
  	        fRecoPass=4;
      }
    }
    if(fRecoPass<0){
      AliError("Can not find pass number from file name, set it manually");
    }
  }
   
  //Init geometry 
  if(!fPHOSGeo){
    AliOADBContainer geomContainer("phosGeo");
    if(fIsMC) //use excatly the same geometry as in simulation
      geomContainer.InitFromFile("$ALICE_ROOT/OADB/PHOS/PHOSMCGeometry.root","PHOSMCRotationMatrixes");
    else //Use best approaximation to real geometry
      geomContainer.InitFromFile("$ALICE_ROOT/OADB/PHOS/PHOSGeometry.root","PHOSRotationMatrixes");
    TObjArray *matrixes = (TObjArray*)geomContainer.GetObject(runNumber,"PHOSRotationMatrixes");
    fPHOSGeo =  AliPHOSGeometry::GetInstance("IHEP") ;
    for(Int_t mod=0; mod<5; mod++) {
      if(!matrixes->At(mod)) continue;
      fPHOSGeo->SetMisalMatrix(((TGeoHMatrix*)matrixes->At(mod)),mod) ;
      printf(".........Adding Matrix(%d), geo=%p\n",mod,fPHOSGeo) ;
      ((TGeoHMatrix*)matrixes->At(mod))->Print() ;
    } 
  }
  
  //Init Bad channels map
  if(!fUsePrivateBadMap){
   AliOADBContainer badmapContainer(Form("phosBadMap"));
    badmapContainer.InitFromFile("$ALICE_ROOT/OADB/PHOS/PHOSBadMaps.root","phosBadMap");
    TObjArray *maps = (TObjArray*)badmapContainer.GetObject(runNumber,"phosBadMap");
    if(!maps){
      AliError(Form("Can not read Bad map for run %d. \n You may choose to use your map with ForceUsingBadMap()\n",runNumber)) ;    
    }
    else{
      AliInfo(Form("Setting PHOS bad map with name %s \n",maps->GetName())) ;
      for(Int_t mod=0; mod<5;mod++){
        if(fPHOSBadMap[mod]) 
          delete fPHOSBadMap[mod] ;
        TH2I * h = (TH2I*)maps->At(mod) ;      
	if(h)
          fPHOSBadMap[mod]=new TH2I(*h) ;
      }
    }    
  } 

  if(!fUsePrivateCalib){
    if(fIsMC){ //re/de-calibration for MC productions
      //Init recalibration
      AliOADBContainer calibContainer("phosRecalibration");
      calibContainer.InitFromFile("$ALICE_ROOT/OADB/PHOS/PHOSMCCalibrations.root","phosRecalibration");
      
      TObjArray *recalib = (TObjArray*)calibContainer.GetObject(runNumber,"PHOSRecalibration");
      if(!recalib){
        AliFatal(Form("Can not read calibrations for run %d\n. You may choose your specific calibration with ForceUsingCalibration()\n",runNumber)) ;
      }
      else{
	//Now try to find object with proper name
	for(Int_t i=0; i<recalib->GetEntriesFast(); i++){
	  AliPHOSCalibData * tmp = (AliPHOSCalibData*)recalib->At(i) ;
	  if(fMCProduction.CompareTo(tmp->GetName())==0){
            fPHOSCalibData = tmp ;
	    break ;
	  }
	}
        if(!fPHOSCalibData) {
          AliFatal(Form("Can not find calibration for run %d, and name %s \n",runNumber, fMCProduction.Data())) ;
        }
      }
      
    }
    else{ //real data
      //Init recalibration
      //Check the pass1-pass2-pass3 reconstruction
      AliOADBContainer calibContainer("phosRecalibration");
      calibContainer.InitFromFile("$ALICE_ROOT/OADB/PHOS/PHOSCalibrations.root","phosRecalibration");
      TObjArray *recalib = (TObjArray*)calibContainer.GetObject(runNumber,"PHOSRecalibration");
      if(!recalib){
        AliFatal(Form("Can not read calibrations for run %d\n. You may choose your specific calibration with ForceUsingCalibration()\n",runNumber)) ;
      }
      else{
        fPHOSCalibData = (AliPHOSCalibData*)recalib->At(fRecoPass-1) ;
        if(!fPHOSCalibData) {
          AliFatal(Form("Can not find calibration for run %d, pass %d \n",runNumber, fRecoPass)) ;
        }
      }
    }
  }
  
}

//_____________________________________________________
void AliPHOSTenderSupply::ProcessEvent()
{
  //Choose PHOS clusters and recalibrate them
  //that it recalculate energy, position and distance 
  //to closest track extrapolation	

  AliESDEvent *esd = 0x0 ; 
  AliAODEvent *aod = 0x0 ;
  if(fTender){
    esd = fTender->GetEvent();
    if(!esd)
      return ;
  }
  else{
    if(!fTask){
      return ;
    }
    esd = dynamic_cast<AliESDEvent*>(fTask->InputEvent()) ;
    aod = dynamic_cast<AliAODEvent*>(fTask->InputEvent()) ;
    if(!esd && !aod)
      return ;
  }
    
  if(!fPHOSCalibData 
    || (fTender && fTender->RunChanged())){ //In case of Task init called automatically
    InitTender();
    
  }

  TVector3 vertex ;
  if(esd){
    const AliESDVertex *esdVertex = esd->GetPrimaryVertex();
    vertex.SetXYZ(esdVertex->GetX(),esdVertex->GetY(),esdVertex->GetZ());
  }
  else{//AOD
    const AliAODVertex *aodVertex = aod->GetPrimaryVertex();
    vertex.SetXYZ(aodVertex->GetX(),aodVertex->GetY(),aodVertex->GetZ());
  }
  if(vertex.Mag()>99.) //vertex not defined?
    vertex.SetXYZ(0.,0.,0.) ;


  //For re-calibration
  const Double_t logWeight=4.5 ;  

  if(esd){ //To avoid multiple if in loops we made 
           //almost identical pecies of code. Please apply changes to both!!!
    Int_t multClust=esd->GetNumberOfCaloClusters();
    AliESDCaloCells * cells = esd->GetPHOSCells() ;
 
    for (Int_t i=0; i<multClust; i++) {
      AliESDCaloCluster *clu = esd->GetCaloCluster(i);    
      if ( !clu->IsPHOS()) continue;
      
    
      //Apply re-Calibreation
      AliPHOSEsdCluster cluPHOS(*clu);
      cluPHOS.Recalibrate(fPHOSCalibData,cells); // modify the cell energies
      cluPHOS.EvalAll(logWeight,vertex);         // recalculate the cluster parameters
      cluPHOS.SetE(CorrectNonlinearity(cluPHOS.E()));// Users's nonlinearity

      Float_t  position[3];
      cluPHOS.GetPosition(position);
      clu->SetPosition(position);                       //rec.point position in MARS      
      TVector3 global(position) ;
      Int_t relId[4] ;
      fPHOSGeo->GlobalPos2RelId(global,relId) ;
      Int_t mod  = relId[0] ;
      Int_t cellX = relId[2];
      Int_t cellZ = relId[3] ;
      if ( !IsGoodChannel(mod,cellX,cellZ) ) {
        clu->SetE(0.) ;
        continue ;
      }  
            
      Double_t ecore=CoreEnergy(&cluPHOS) ; 
      ecore=CorrectNonlinearity(ecore) ;
      
      clu->SetE(cluPHOS.E());                      //total particle energy
      clu->SetCoreEnergy(ecore);                            //core particle energy
           
      //Eval FullDispersion
      clu->SetDispersion(TestFullLambda(clu->E(),cluPHOS.GetM20(),cluPHOS.GetM02())) ;
      //Eval CoreDispersion
      Double_t m02=0.,m20=0.;
      EvalLambdas(&cluPHOS,m02, m20);   
      clu->SetChi2(TestCoreLambda(clu->E(),m20,m02));                     //not yet implemented     
      clu->SetM02(m02) ;               //second moment M2x
      clu->SetM20(m20) ;               //second moment M2z
      
      //correct distance to track      
      Double_t dx=0.,dz=0. ;
      fPHOSGeo->GlobalPos2RelId(global,relId) ;
      TVector3 locPos;
      fPHOSGeo->Global2Local(locPos,global,mod) ;

      Double_t pttrack=0.;
      Int_t charge=0;
      FindTrackMatching(mod,&locPos,dx,dz,pttrack,charge) ;
      Double_t r=TestCPV(dx, dz, pttrack,charge) ;
      clu->SetTrackDistance(dx,dz); 
     
      clu->SetEmcCpvDistance(r);    
      
      Double_t tof=EvalTOF(&cluPHOS,cells); 
//      if(TMath::Abs(tof-clu->GetTOF())>100.e-9) //something wrong in cell TOF!
//	tof=clu->GetTOF() ;
      clu->SetTOF(tof);       
      Double_t minDist=clu->GetDistanceToBadChannel() ;//Already calculated
      DistanceToBadChannel(mod,&locPos,minDist);
      clu->SetDistanceToBadChannel(minDist) ;

      Double_t ecross = EvalEcross(&cluPHOS);  
      clu->SetMCEnergyFraction(ecross) ;
    }
  }
  else{//AOD
    Int_t multClust=aod->GetNumberOfCaloClusters();
    AliAODCaloCells * cells = aod->GetPHOSCells() ;
  
    for (Int_t i=0; i<multClust; i++) {
      AliAODCaloCluster *clu = aod->GetCaloCluster(i);    
      if ( !clu->IsPHOS()) continue;
      
    
      //Apply re-Calibreation
      AliPHOSAodCluster cluPHOS(*clu);
      cluPHOS.Recalibrate(fPHOSCalibData,cells); // modify the cell energies
      cluPHOS.EvalAll(logWeight,vertex);         // recalculate the cluster parameters
      cluPHOS.SetE(CorrectNonlinearity(cluPHOS.E()));// Users's nonlinearity

      Float_t  position[3];
      cluPHOS.GetPosition(position);
      clu->SetPosition(position);                       //rec.point position in MARS
      TVector3 global(position) ;
      Int_t relId[4] ;
      fPHOSGeo->GlobalPos2RelId(global,relId) ;
      Int_t mod  = relId[0] ;
      Int_t cellX = relId[2];
      Int_t cellZ = relId[3] ;
      if ( !IsGoodChannel(mod,cellX,cellZ) ) {
        clu->SetE(0.) ;
        continue ;
      }  
      TVector3 locPosOld; //Use it to re-calculate distance to track
      fPHOSGeo->Global2Local(locPosOld,global,mod) ;
      
      Double_t ecore=CoreEnergy(&cluPHOS) ; 
      ecore=CorrectNonlinearity(ecore) ;
     
      clu->SetE(cluPHOS.E());                           //total particle energy
      clu->SetCoreEnergy(ecore);                  //core particle energy

      //Eval FullDispersion
      clu->SetDispersion(TestFullLambda(clu->E(),cluPHOS.GetM20(),cluPHOS.GetM02())) ;
      //Eval CoreDispersion
      Double_t m02=0.,m20=0.;
      EvalLambdas(&cluPHOS,m02, m20);   
      clu->SetChi2(TestCoreLambda(clu->E(),m20,m02));                     //not yet implemented
      clu->SetM02(m02) ;               //second moment M2x
      clu->SetM20(m20) ;               //second moment M2z
      
      //correct distance to track
      Double_t dx=clu->GetTrackDx() ;
      Double_t dz=clu->GetTrackDz() ;
      TVector3 locPos;
      fPHOSGeo->Global2Local(locPos,global,mod) ;
      if(dx!=-999.){ //there is matched track
        dx+=locPos.X()-locPosOld.X() ;
        dz+=locPos.Z()-locPosOld.Z() ;      
        clu->SetTrackDistance(dx,dz);
      }
      Double_t r = 999. ; //Big distance
      int nTracksMatched = clu->GetNTracksMatched();
      if(nTracksMatched > 0) {
        AliVTrack* track = dynamic_cast<AliVTrack*> (clu->GetTrackMatched(0));
        if ( track ) {
          Double_t pttrack = track->Pt();
          Short_t charge = track->Charge();
          r=TestCPV(dx, dz, pttrack,charge) ;
	}
      }
      clu->SetEmcCpvDistance(r); //Distance in sigmas


      Double_t tof=EvalTOF(&cluPHOS,cells); 
//      if(TMath::Abs(tof-clu->GetTOF())>100.e-9) //something wrong in cell TOF!
//	tof=clu->GetTOF() ;
      clu->SetTOF(tof);       
      Double_t minDist=clu->GetDistanceToBadChannel() ;//Already calculated
      DistanceToBadChannel(mod,&locPos,minDist);
      clu->SetDistanceToBadChannel(minDist) ;

      Double_t ecross = EvalEcross(&cluPHOS);  
      clu->SetMCEnergyFraction(ecross) ;      
    }
  }

}
//___________________________________________________________________________________________________
void AliPHOSTenderSupply::FindTrackMatching(Int_t mod,TVector3 *locpos,
					    Double_t &dx, Double_t &dz,
					    Double_t &pt,Int_t &charge){
  //Find track with closest extrapolation to cluster
  AliESDEvent *esd = 0x0 ;
  if(fTender)
    esd= fTender->GetEvent();
  else{ 
    esd= dynamic_cast<AliESDEvent*>(fTask->InputEvent());
  }
  
  if(!esd){
    AliError("ESD is not found") ;
    return ;
  }
  Double_t  magF = esd->GetMagneticField();
 
  Double_t magSign = 1.0;
  if(magF<0)magSign = -1.0;
  
  if (!TGeoGlobalMagField::Instance()->GetField()) {
    AliError("Margnetic filed was not initialized, use default") ;
    AliMagF* field = new AliMagF("Maps","Maps", magSign, magSign, AliMagF::k5kG);
    TGeoGlobalMagField::Instance()->SetField(field);
  }

  // *** Start the matching
  Int_t nt=0;
  nt = esd->GetNumberOfTracks();
  //Calculate actual distance to PHOS module
  TVector3 globaPos ;
  fPHOSGeo->Local2Global(mod, 0.,0., globaPos) ;
  const Double_t rPHOS = globaPos.Pt() ; //Distance to center of  PHOS module
  const Double_t kYmax = 72.+10. ; //Size of the module (with some reserve) in phi direction
  const Double_t kZmax = 64.+10. ; //Size of the module (with some reserve) in z direction
  const Double_t kAlpha0=330./180.*TMath::Pi() ; //First PHOS module angular direction
  const Double_t kAlpha= 20./180.*TMath::Pi() ; //PHOS module angular size
  Double_t minDistance = 1.e6;


  Double_t gposTrack[3] ; 

  Double_t bz = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->SolenoidField();
  bz = TMath::Sign(0.5*kAlmost0Field,bz) + bz;

  Double_t b[3]; 

    for (Int_t i=0; i<nt; i++) {
      AliESDtrack *esdTrack=esd->GetTrack(i);

      // Skip the tracks having "wrong" status (has to be checked/tuned)
      ULong_t status = esdTrack->GetStatus();
      if ((status & AliESDtrack::kTPCout)   == 0) continue;
     
      //Continue extrapolation from TPC outer surface
      const AliExternalTrackParam *outerParam=esdTrack->GetOuterParam();
      if (!outerParam) continue;
      AliExternalTrackParam t(*outerParam);
     
      t.GetBxByBz(b) ;
      //Direction to the current PHOS module
      Double_t phiMod=kAlpha0-kAlpha*mod ;
      if(!t.Rotate(phiMod))
        continue ;
    
      Double_t y;                       // Some tracks do not reach the PHOS
      if (!t.GetYAt(rPHOS,bz,y)) continue; //    because of the bending
      
      Double_t z; 
      if(!t.GetZAt(rPHOS,bz,z))
        continue ;
      if (TMath::Abs(z) > kZmax) 
        continue; // Some tracks miss the PHOS in Z
      if(TMath::Abs(y) < kYmax){
        t.PropagateToBxByBz(rPHOS,b);        // Propagate to the matching module
        //t.CorrectForMaterial(...); // Correct for the TOF material, if needed
        t.GetXYZ(gposTrack) ;
        TVector3 globalPositionTr(gposTrack) ;
        TVector3 localPositionTr ;
        fPHOSGeo->Global2Local(localPositionTr,globalPositionTr,mod) ;
        Double_t ddx = locpos->X()-localPositionTr.X();
        Double_t ddz = locpos->Z()-localPositionTr.Z();
        Double_t d2 = ddx*ddx + ddz*ddz;
        if(d2 < minDistance) {
	  dx = ddx ;
  	  dz = ddz ;
	  minDistance=d2 ;
	  pt=esdTrack->Pt() ;
	  charge=esdTrack->Charge() ;
        }
      }
    }//Scanned all tracks
 
}
//____________________________________________________________
Float_t AliPHOSTenderSupply::CorrectNonlinearity(Float_t en){

  //For backward compatibility, if no RecoParameters found
  if(fNonlinearityVersion=="Default"){
    return 0.0241+1.0504*en+0.000249*en*en ;
  }
  if(fNonlinearityVersion=="MC"){ //Default + some correction
    return (0.0241+1.0504*en+0.000249*en*en)*fNonlinearityParams[0]*(1+fNonlinearityParams[1]/(1.+en*en/fNonlinearityParams[2]/fNonlinearityParams[2])) ;
  }

  if(fNonlinearityVersion=="NoCorrection"){
    return en ;
  }
  if(fNonlinearityVersion=="Gustavo2005"){
    return fNonlinearityParams[0]+fNonlinearityParams[1]*en + fNonlinearityParams[2]*en*en ;
  }
  if(fNonlinearityVersion=="Henrik2010"){
    return en*(fNonlinearityParams[0]+fNonlinearityParams[1]*TMath::Exp(-en*fNonlinearityParams[2]))*(1.+fNonlinearityParams[3]*TMath::Exp(-en*fNonlinearityParams[4]))*(1.+fNonlinearityParams[6]/(en*en+fNonlinearityParams[5])) ;
  }

  return en ;
}
//_____________________________________________________________________________
Double_t AliPHOSTenderSupply::TestCoreLambda(Double_t pt,Double_t l1,Double_t l2){
//Parameterization for core dispersion   
//For R=4.5
  Double_t   l1Mean  = 1.150200 + 0.097886/(1.+1.486645*pt+0.000038*pt*pt) ;
  Double_t   l2Mean = 1.574706 + 0.997966*exp(-0.895075*pt)-0.010666*pt ;
  Double_t   l1Sigma = 0.100255 + 0.337177*exp(-0.517684*pt)+0.001170*pt ;
  Double_t   l2Sigma = 0.232580 + 0.573401*exp(-0.735903*pt)-0.002325*pt ;
  Double_t   c = -0.110983 -0.017353/(1.-1.836995*pt+0.934517*pt*pt) ;

/*
  //Parameterizatino for full dispersion
  Double_t l2Mean  = 1.53126+9.50835e+06/(1.+1.08728e+07*pt+1.73420e+06*pt*pt) ;
  Double_t l1Mean  = 1.12365+0.123770*TMath::Exp(-pt*0.246551)+5.30000e-03*pt ;
  Double_t l2Sigma = 6.48260e-02+7.60261e+10/(1.+1.53012e+11*pt+5.01265e+05*pt*pt)+9.00000e-03*pt;
  Double_t l1Sigma = 4.44719e-04+6.99839e-01/(1.+1.22497e+00*pt+6.78604e-07*pt*pt)+9.00000e-03*pt;
  Double_t c=-0.35-0.550*TMath::Exp(-0.390730*pt) ;
*/
  Double_t R2=0.5*(l1-l1Mean)*(l1-l1Mean)/l1Sigma/l1Sigma + 
              0.5*(l2-l2Mean)*(l2-l2Mean)/l2Sigma/l2Sigma +
              0.5*c*(l1-l1Mean)*(l2-l2Mean)/l1Sigma/l2Sigma ;
  return R2 ;
  
}
//_____________________________________________________________________________
Double_t AliPHOSTenderSupply::TestFullLambda(Double_t pt,Double_t l1,Double_t l2){
//Parameterization for full dispersion   
  //Parameterizatino for full dispersion
  Double_t l2Mean  = 1.53126+9.50835e+06/(1.+1.08728e+07*pt+1.73420e+06*pt*pt) ;
  Double_t l1Mean  = 1.12365+0.123770*TMath::Exp(-pt*0.246551)+5.30000e-03*pt ;
  Double_t l2Sigma = 6.48260e-02+7.60261e+10/(1.+1.53012e+11*pt+5.01265e+05*pt*pt)+9.00000e-03*pt;
  Double_t l1Sigma = 4.44719e-04+6.99839e-01/(1.+1.22497e+00*pt+6.78604e-07*pt*pt)+9.00000e-03*pt;
  Double_t c=-0.35-0.550*TMath::Exp(-0.390730*pt) ;

  Double_t R2=0.5*(l1-l1Mean)*(l1-l1Mean)/l1Sigma/l1Sigma + 
              0.5*(l2-l2Mean)*(l2-l2Mean)/l2Sigma/l2Sigma +
              0.5*c*(l1-l1Mean)*(l2-l2Mean)/l1Sigma/l2Sigma ;
  return R2 ;
  
}
//____________________________________________________________________________
Double_t AliPHOSTenderSupply::TestCPV(Double_t dx, Double_t dz, Double_t pt, Int_t charge){
  //Parameterization of LHC10h period
  //_true if neutral_
  
  Double_t meanX=0;
  Double_t meanZ=0.;
  Double_t sx=TMath::Min(5.4,2.59719e+02*TMath::Exp(-pt/1.02053e-01)+
              6.58365e-01*5.91917e-01*5.91917e-01/((pt-9.61306e-01)*(pt-9.61306e-01)+5.91917e-01*5.91917e-01)+1.59219);
  Double_t sz=TMath::Min(2.75,4.90341e+02*1.91456e-02*1.91456e-02/(pt*pt+1.91456e-02*1.91456e-02)+1.60) ;
  
  Double_t mf = 0.; //Positive for ++ and negative for --
  if(fTender){
    AliESDEvent *esd = fTender->GetEvent();
    mf = esd->GetMagneticField();
  }
  else{ 
    if(fTask){
      AliESDEvent *esd= dynamic_cast<AliESDEvent*>(fTask->InputEvent());
      if(esd)
         mf = esd->GetMagneticField();
      else{
        AliAODEvent *aod= dynamic_cast<AliAODEvent*>(fTask->InputEvent());
	if(aod)
          mf = aod->GetMagneticField();
      }
    }else{
       AliError("Neither Tender nor Task defined") ;    
    }
  }
  
  if(mf<0.){ //field --
    meanZ = -0.468318 ;
    if(charge>0)
      meanX=TMath::Min(7.3, 3.89994*1.20679*1.20679/(pt*pt+1.20679*1.20679)+0.249029+2.49088e+07*TMath::Exp(-pt*3.33650e+01)) ;
    else
      meanX=-TMath::Min(7.7,3.86040*0.912499*0.912499/(pt*pt+0.912499*0.912499)+1.23114+4.48277e+05*TMath::Exp(-pt*2.57070e+01)) ;
  }
  else{ //Field ++
    meanZ= -0.468318;
    if(charge>0)
      meanX=-TMath::Min(8.0,3.86040*1.31357*1.31357/(pt*pt+1.31357*1.31357)+0.880579+7.56199e+06*TMath::Exp(-pt*3.08451e+01)) ;
    else
      meanX= TMath::Min(6.85, 3.89994*1.16240*1.16240/(pt*pt+1.16240*1.16240)-0.120787+2.20275e+05*TMath::Exp(-pt*2.40913e+01)) ;     
  }

  Double_t rz=(dz-meanZ)/sz ;
  Double_t rx=(dx-meanX)/sx ;
  return TMath::Sqrt(rx*rx+rz*rz) ;
}

//________________________________________________________________________
Bool_t AliPHOSTenderSupply::IsGoodChannel(Int_t mod, Int_t ix, Int_t iz)
{
  //Check if this channel belogs to the good ones
  
  if(mod>4 || mod<1){
//    AliError(Form("No bad map for PHOS module %d ",mod)) ;
    return kTRUE ;
  }
  if(!fPHOSBadMap[mod]){
//     AliError(Form("No Bad map for PHOS module %d",mod)) ;
     return kTRUE ;
  }
  if(fPHOSBadMap[mod]->GetBinContent(ix,iz)>0)
    return kFALSE ;
  else
    return kTRUE ;
}
//________________________________________________________________________
void AliPHOSTenderSupply::ForceUsingBadMap(const char * filename){
  //Read TH2I histograms with bad maps from local or alien file 
  TFile * fbm = TFile::Open(filename) ;
  if(!fbm || !fbm->IsOpen()){
    AliError(Form("Can not open BadMaps file %s",filename)) ;
    return ;
  }
  gROOT->cd() ;
  char key[55] ;
  for(Int_t mod=1;mod<4; mod++){
    snprintf(key,55,"PHOS_BadMap_mod%d",mod) ;
    TH2I * h = (TH2I*)fbm->Get(key) ;
    if(h)
       fPHOSBadMap[mod] = new TH2I(*h) ;
  }
  fbm->Close() ;
  fUsePrivateBadMap=kTRUE ;
}
//________________________________________________________________________
void AliPHOSTenderSupply::ForceUsingCalibration(const char * filename){
  //Read PHOS recalibration parameters from the file.
  //We assume that file contains single entry: AliPHOSCalibData
  TFile * fc = TFile::Open(filename) ;
  if(!fc || !fc->IsOpen()){
    AliFatal(Form("Can not open Calibration file %s",filename)) ;
    return ;
  }
  fPHOSCalibData = (AliPHOSCalibData*)fc->Get("PHOSCalibration") ;
  fc->Close() ;
  fUsePrivateCalib=kTRUE; 
}
//________________________________________________________________________
void AliPHOSTenderSupply::CorrectPHOSMisalignment(TVector3 &global,Int_t mod){
   //Correct for PHOS modules misalignment 
  
    //correct misalignment
    const Float_t shiftX[6]={0.,-2.3,-2.11,-1.53,0.,0.} ;
    const Float_t shiftZ[6]={0.,-0.4, 0.52, 0.8,0.,0.} ;
    TVector3 localPos ;
    fPHOSGeo->Global2Local(localPos,global,mod) ;
    fPHOSGeo->Local2Global(mod,localPos.X()+shiftX[mod],localPos.Z()+shiftZ[mod],global);  
}
//________________________________________________________________________
void AliPHOSTenderSupply::EvalLambdas(AliVCluster * clu, Double_t &m02, Double_t &m20){ 
  //calculate dispecrsion of the cluster in the circle with radius distanceCut around the maximum
    
  const Double_t rCut=4.5 ;
  
  Double32_t * elist = clu->GetCellsAmplitudeFraction() ;  
// Calculates the center of gravity in the local PHOS-module coordinates
  Float_t wtot = 0;
  Double_t xc[100]={0} ;
  Double_t zc[100]={0} ;
  Double_t x = 0 ;
  Double_t z = 0 ;
  Int_t mulDigit=TMath::Min(100,clu->GetNCells()) ;
  const Double_t logWeight=4.5 ;
  for(Int_t iDigit=0; iDigit<mulDigit; iDigit++) {
    Int_t relid[4] ;
    Float_t xi ;
    Float_t zi ;
    fPHOSGeo->AbsToRelNumbering(clu->GetCellAbsId(iDigit), relid) ;
    fPHOSGeo->RelPosInModule(relid, xi, zi);
    xc[iDigit]=xi ;
    zc[iDigit]=zi ;
    if (clu->E()>0 && elist[iDigit]>0) {
      Float_t w = TMath::Max( 0., logWeight + TMath::Log( elist[iDigit] / clu->E() ) ) ;
      x    += xc[iDigit] * w ;
      z    += zc[iDigit] * w ;
      wtot += w ;
    }
  }
  if (wtot>0) {
    x /= wtot ;
    z /= wtot ;
  }
     
  wtot = 0. ;
  Double_t dxx  = 0.;
  Double_t dzz  = 0.;
  Double_t dxz  = 0.;
  Double_t xCut = 0. ;
  Double_t zCut = 0. ;
  for(Int_t iDigit=0; iDigit<mulDigit; iDigit++) {
    if (clu->E()>0 && elist[iDigit]>0.) {
        Double_t w = TMath::Max( 0., logWeight + TMath::Log( elist[iDigit] / clu->E() ) ) ;
        Double_t xi= xc[iDigit] ;
        Double_t zi= zc[iDigit] ;
	if((xi-x)*(xi-x)+(zi-z)*(zi-z) < rCut*rCut){
          xCut += w * xi ;
          zCut += w * zi ; 
          dxx  += w * xi * xi ;
          dzz  += w * zi * zi ;
          dxz  += w * xi * zi ; 
          wtot += w ;
	}
    }
    
  }
  if (wtot>0) {
    xCut/= wtot ;
    zCut/= wtot ;
    dxx /= wtot ;
    dzz /= wtot ;
    dxz /= wtot ;
    dxx -= xCut * xCut ;
    dzz -= zCut * zCut ;
    dxz -= xCut * zCut ;

    m02 =  0.5 * (dxx + dzz) + TMath::Sqrt( 0.25 * (dxx - dzz) * (dxx - dzz) + dxz * dxz )  ;
    m20 =  0.5 * (dxx + dzz) - TMath::Sqrt( 0.25 * (dxx - dzz) * (dxx - dzz) + dxz * dxz )  ;
  }
  else {
    m20=m02=0.;
  }

}
//____________________________________________________________________________
Double_t  AliPHOSTenderSupply::CoreEnergy(AliVCluster * clu){  
  //calculate energy of the cluster in the circle with radius distanceCut around the maximum
  
  //Can not use already calculated coordinates?
  //They have incidence correction...
  const Double_t distanceCut =3.5 ;
  const Double_t logWeight=4.5 ;
  
  Double32_t * elist = clu->GetCellsAmplitudeFraction() ;  
// Calculates the center of gravity in the local PHOS-module coordinates
  Float_t wtot = 0;
  Double_t xc[100]={0} ;
  Double_t zc[100]={0} ;
  Double_t x = 0 ;
  Double_t z = 0 ;
  Int_t mulDigit=TMath::Min(100,clu->GetNCells()) ;
  for(Int_t iDigit=0; iDigit<mulDigit; iDigit++) {
    Int_t relid[4] ;
    Float_t xi ;
    Float_t zi ;
    fPHOSGeo->AbsToRelNumbering(clu->GetCellAbsId(iDigit), relid) ;
    fPHOSGeo->RelPosInModule(relid, xi, zi);
    xc[iDigit]=xi ;
    zc[iDigit]=zi ;
    if (clu->E()>0 && elist[iDigit]>0) {
      Float_t w = TMath::Max( 0., logWeight + TMath::Log( elist[iDigit] / clu->E() ) ) ;
      x    += xc[iDigit] * w ;
      z    += zc[iDigit] * w ;
      wtot += w ;
    }
  }
  if (wtot>0) {
    x /= wtot ;
    z /= wtot ;
  }
  Double_t coreE=0. ;
  for(Int_t iDigit=0; iDigit < mulDigit; iDigit++) {
    Double_t distance = TMath::Sqrt((xc[iDigit]-x)*(xc[iDigit]-x)+(zc[iDigit]-z)*(zc[iDigit]-z)) ;
    if(distance < distanceCut)
      coreE += elist[iDigit] ;
  }
  //Apply non-linearity correction
  return coreE ;
}
//____________________________________________________________________________
Double_t AliPHOSTenderSupply::EvalEcross(AliVCluster * clu){  
  //Calculate propoerion of the cluster energy in cross around the 
  //cell with maximal energy deposition. Can be used to reject exotic clusters 
  
  Double32_t * elist = clu->GetCellsAmplitudeFraction() ;  
  Int_t mulDigit=clu->GetNCells() ;
  // Calculates the center of gravity in the local PHOS-module coordinates
  //Find cell with max E
  Double_t eMax=0.;
  Int_t iMax=0;
  for(Int_t iDigit=0; iDigit<mulDigit; iDigit++) {
    if(elist[iDigit]>eMax){
      eMax=elist[iDigit] ;
      iMax=iDigit ;
    }
  }
  //Calculate e in cross
  Double_t eCross=0 ;
  Int_t relidMax[4] ;
  fPHOSGeo->AbsToRelNumbering(clu->GetCellAbsId(iMax), relidMax) ;
  Int_t relid[4] ;
  for(Int_t iDigit=0; iDigit<mulDigit; iDigit++) {    
    fPHOSGeo->AbsToRelNumbering(clu->GetCellAbsId(iDigit), relid) ;
    if(TMath::Abs(relid[2]-relidMax[2])+TMath::Abs(relid[3]-relidMax[3])==1)
      eCross+= elist[iDigit] ; 
  }
  if(eMax>0)
    return 1.-eCross/eMax ;
  else
    return 0 ;
}


//________________________________________________________________________
Double_t AliPHOSTenderSupply::EvalTOF(AliVCluster * clu,AliVCaloCells * cells){ 
  //Evaluate TOF of the cluster after re-calibration
  //TOF here is weighted average of digits
  // -within 50ns from the most energetic cell
  // -not too soft.
    
  Double32_t * elist = clu->GetCellsAmplitudeFraction() ;  
  Int_t mulDigit=clu->GetNCells() ;

  Float_t tMax= 0.; //Time at the maximum
  Float_t eMax=0. ;
  for(Int_t iDigit=0; iDigit<mulDigit; iDigit++) {
    Int_t absId=clu->GetCellAbsId(iDigit) ;
    Bool_t isHG=cells->GetCellHighGain(absId) ;
    if( elist[iDigit]>eMax){
      tMax=CalibrateTOF(cells->GetCellTime(absId),absId,isHG) ;
      eMax=elist[iDigit] ;
    }
  }
  
   //Try to improve accuracy 
  //Do not account time of soft cells:
  //  const Double_t part=0.5 ;
  Double_t eMin=TMath::Min(0.5,0.2*eMax) ;
  Float_t wtot = 0.;
  Double_t t = 0. ;
  for(Int_t iDigit=0; iDigit<mulDigit; iDigit++) {
    Int_t absId=clu->GetCellAbsId(iDigit) ;
    Bool_t isHG=cells->GetCellHighGain(absId) ;
      
    Double_t ti=CalibrateTOF(cells->GetCellTime(absId),absId,isHG) ;
    if(TMath::Abs(ti-tMax)>50.e-9) //remove soft cells with wrong time
      continue ;
    
    //Remove too soft cells
    if(elist[iDigit]<eMin)
      continue ;
    
    if(elist[iDigit]>0){ 
      //weight = 1./sigma^2
      //Sigma is parameterization of TOF resolution 16.05.2013
      Double_t wi2=0.;
      if(isHG)
	wi2=1./(2.4 + 3.9/elist[iDigit]) ;
      else
	wi2=1./(2.4 + 3.9/(0.1*elist[iDigit])) ; //E of LG digit is 1/16 of correcponding HG  
      t+=ti*wi2 ;
      wtot+=wi2 ;
    }
  }
  if(wtot>0){
    t=t/wtot ;
  }
  else{
   t=tMax ; 
  }  
  
  return t ;
     
} 
//________________________________________________________________________
Double_t AliPHOSTenderSupply::CalibrateTOF(Double_t tof, Int_t absId, Bool_t isHG){
  //Apply time re-calibration separately for HG and LG channels
  //By default (if not filled) shifts are zero.  
    
  Int_t relId[4];
  fPHOSGeo->AbsToRelNumbering(absId,relId) ;
  Int_t   module = relId[0];
  Int_t   column = relId[3];
  Int_t   row    = relId[2];
  if(isHG)
    tof-=fPHOSCalibData->GetTimeShiftEmc(module, column, row);
  else{
    tof-=fPHOSCalibData->GetLGTimeShiftEmc(module, column, row);
  }
  return tof ;
  
}
//________________________________________________________________________
void AliPHOSTenderSupply::DistanceToBadChannel(Int_t mod, TVector3 * locPos, Double_t &minDist){
  //Check if distance to bad channel was reduced
  Int_t range = minDist/2.2 +1 ; //Distance at which bad channels should be serached
  
  Int_t relid[4]={0,0,0,0} ;
  fPHOSGeo->RelPosToRelId(mod, locPos->X(), locPos->Z(), relid) ; 
  Int_t xmin=TMath::Max(1,relid[2]-range) ;
  Int_t xmax=TMath::Min(64,relid[2]+range) ;
  Int_t zmin=TMath::Max(1,relid[3]-range) ;
  Int_t zmax=TMath::Min(56,relid[3]+range) ;
  
  Float_t x=0.,z=0.;
  for(Int_t ix=xmin;ix<=xmax;ix++){
    for(Int_t iz=zmin;iz<=zmax;iz++){
      if(fPHOSBadMap[mod]->GetBinContent(ix,iz)>0){ //Bad channel
        Int_t relidBC[4]={mod,0,ix,iz} ;
        fPHOSGeo->RelPosInModule(relidBC,x,z); 
        Double_t dist = TMath::Sqrt((x-locPos->X())*(x-locPos->X()) + (z-locPos->Z())*(z-locPos->Z()));
        if(dist<minDist) minDist = dist;
      }
    }  
  }
  
}


 AliPHOSTenderSupply.cxx:1
 AliPHOSTenderSupply.cxx:2
 AliPHOSTenderSupply.cxx:3
 AliPHOSTenderSupply.cxx:4
 AliPHOSTenderSupply.cxx:5
 AliPHOSTenderSupply.cxx:6
 AliPHOSTenderSupply.cxx:7
 AliPHOSTenderSupply.cxx:8
 AliPHOSTenderSupply.cxx:9
 AliPHOSTenderSupply.cxx:10
 AliPHOSTenderSupply.cxx:11
 AliPHOSTenderSupply.cxx:12
 AliPHOSTenderSupply.cxx:13
 AliPHOSTenderSupply.cxx:14
 AliPHOSTenderSupply.cxx:15
 AliPHOSTenderSupply.cxx:16
 AliPHOSTenderSupply.cxx:17
 AliPHOSTenderSupply.cxx:18
 AliPHOSTenderSupply.cxx:19
 AliPHOSTenderSupply.cxx:20
 AliPHOSTenderSupply.cxx:21
 AliPHOSTenderSupply.cxx:22
 AliPHOSTenderSupply.cxx:23
 AliPHOSTenderSupply.cxx:24
 AliPHOSTenderSupply.cxx:25
 AliPHOSTenderSupply.cxx:26
 AliPHOSTenderSupply.cxx:27
 AliPHOSTenderSupply.cxx:28
 AliPHOSTenderSupply.cxx:29
 AliPHOSTenderSupply.cxx:30
 AliPHOSTenderSupply.cxx:31
 AliPHOSTenderSupply.cxx:32
 AliPHOSTenderSupply.cxx:33
 AliPHOSTenderSupply.cxx:34
 AliPHOSTenderSupply.cxx:35
 AliPHOSTenderSupply.cxx:36
 AliPHOSTenderSupply.cxx:37
 AliPHOSTenderSupply.cxx:38
 AliPHOSTenderSupply.cxx:39
 AliPHOSTenderSupply.cxx:40
 AliPHOSTenderSupply.cxx:41
 AliPHOSTenderSupply.cxx:42
 AliPHOSTenderSupply.cxx:43
 AliPHOSTenderSupply.cxx:44
 AliPHOSTenderSupply.cxx:45
 AliPHOSTenderSupply.cxx:46
 AliPHOSTenderSupply.cxx:47
 AliPHOSTenderSupply.cxx:48
 AliPHOSTenderSupply.cxx:49
 AliPHOSTenderSupply.cxx:50
 AliPHOSTenderSupply.cxx:51
 AliPHOSTenderSupply.cxx:52
 AliPHOSTenderSupply.cxx:53
 AliPHOSTenderSupply.cxx:54
 AliPHOSTenderSupply.cxx:55
 AliPHOSTenderSupply.cxx:56
 AliPHOSTenderSupply.cxx:57
 AliPHOSTenderSupply.cxx:58
 AliPHOSTenderSupply.cxx:59
 AliPHOSTenderSupply.cxx:60
 AliPHOSTenderSupply.cxx:61
 AliPHOSTenderSupply.cxx:62
 AliPHOSTenderSupply.cxx:63
 AliPHOSTenderSupply.cxx:64
 AliPHOSTenderSupply.cxx:65
 AliPHOSTenderSupply.cxx:66
 AliPHOSTenderSupply.cxx:67
 AliPHOSTenderSupply.cxx:68
 AliPHOSTenderSupply.cxx:69
 AliPHOSTenderSupply.cxx:70
 AliPHOSTenderSupply.cxx:71
 AliPHOSTenderSupply.cxx:72
 AliPHOSTenderSupply.cxx:73
 AliPHOSTenderSupply.cxx:74
 AliPHOSTenderSupply.cxx:75
 AliPHOSTenderSupply.cxx:76
 AliPHOSTenderSupply.cxx:77
 AliPHOSTenderSupply.cxx:78
 AliPHOSTenderSupply.cxx:79
 AliPHOSTenderSupply.cxx:80
 AliPHOSTenderSupply.cxx:81
 AliPHOSTenderSupply.cxx:82
 AliPHOSTenderSupply.cxx:83
 AliPHOSTenderSupply.cxx:84
 AliPHOSTenderSupply.cxx:85
 AliPHOSTenderSupply.cxx:86
 AliPHOSTenderSupply.cxx:87
 AliPHOSTenderSupply.cxx:88
 AliPHOSTenderSupply.cxx:89
 AliPHOSTenderSupply.cxx:90
 AliPHOSTenderSupply.cxx:91
 AliPHOSTenderSupply.cxx:92
 AliPHOSTenderSupply.cxx:93
 AliPHOSTenderSupply.cxx:94
 AliPHOSTenderSupply.cxx:95
 AliPHOSTenderSupply.cxx:96
 AliPHOSTenderSupply.cxx:97
 AliPHOSTenderSupply.cxx:98
 AliPHOSTenderSupply.cxx:99
 AliPHOSTenderSupply.cxx:100
 AliPHOSTenderSupply.cxx:101
 AliPHOSTenderSupply.cxx:102
 AliPHOSTenderSupply.cxx:103
 AliPHOSTenderSupply.cxx:104
 AliPHOSTenderSupply.cxx:105
 AliPHOSTenderSupply.cxx:106
 AliPHOSTenderSupply.cxx:107
 AliPHOSTenderSupply.cxx:108
 AliPHOSTenderSupply.cxx:109
 AliPHOSTenderSupply.cxx:110
 AliPHOSTenderSupply.cxx:111
 AliPHOSTenderSupply.cxx:112
 AliPHOSTenderSupply.cxx:113
 AliPHOSTenderSupply.cxx:114
 AliPHOSTenderSupply.cxx:115
 AliPHOSTenderSupply.cxx:116
 AliPHOSTenderSupply.cxx:117
 AliPHOSTenderSupply.cxx:118
 AliPHOSTenderSupply.cxx:119
 AliPHOSTenderSupply.cxx:120
 AliPHOSTenderSupply.cxx:121
 AliPHOSTenderSupply.cxx:122
 AliPHOSTenderSupply.cxx:123
 AliPHOSTenderSupply.cxx:124
 AliPHOSTenderSupply.cxx:125
 AliPHOSTenderSupply.cxx:126
 AliPHOSTenderSupply.cxx:127
 AliPHOSTenderSupply.cxx:128
 AliPHOSTenderSupply.cxx:129
 AliPHOSTenderSupply.cxx:130
 AliPHOSTenderSupply.cxx:131
 AliPHOSTenderSupply.cxx:132
 AliPHOSTenderSupply.cxx:133
 AliPHOSTenderSupply.cxx:134
 AliPHOSTenderSupply.cxx:135
 AliPHOSTenderSupply.cxx:136
 AliPHOSTenderSupply.cxx:137
 AliPHOSTenderSupply.cxx:138
 AliPHOSTenderSupply.cxx:139
 AliPHOSTenderSupply.cxx:140
 AliPHOSTenderSupply.cxx:141
 AliPHOSTenderSupply.cxx:142
 AliPHOSTenderSupply.cxx:143
 AliPHOSTenderSupply.cxx:144
 AliPHOSTenderSupply.cxx:145
 AliPHOSTenderSupply.cxx:146
 AliPHOSTenderSupply.cxx:147
 AliPHOSTenderSupply.cxx:148
 AliPHOSTenderSupply.cxx:149
 AliPHOSTenderSupply.cxx:150
 AliPHOSTenderSupply.cxx:151
 AliPHOSTenderSupply.cxx:152
 AliPHOSTenderSupply.cxx:153
 AliPHOSTenderSupply.cxx:154
 AliPHOSTenderSupply.cxx:155
 AliPHOSTenderSupply.cxx:156
 AliPHOSTenderSupply.cxx:157
 AliPHOSTenderSupply.cxx:158
 AliPHOSTenderSupply.cxx:159
 AliPHOSTenderSupply.cxx:160
 AliPHOSTenderSupply.cxx:161
 AliPHOSTenderSupply.cxx:162
 AliPHOSTenderSupply.cxx:163
 AliPHOSTenderSupply.cxx:164
 AliPHOSTenderSupply.cxx:165
 AliPHOSTenderSupply.cxx:166
 AliPHOSTenderSupply.cxx:167
 AliPHOSTenderSupply.cxx:168
 AliPHOSTenderSupply.cxx:169
 AliPHOSTenderSupply.cxx:170
 AliPHOSTenderSupply.cxx:171
 AliPHOSTenderSupply.cxx:172
 AliPHOSTenderSupply.cxx:173
 AliPHOSTenderSupply.cxx:174
 AliPHOSTenderSupply.cxx:175
 AliPHOSTenderSupply.cxx:176
 AliPHOSTenderSupply.cxx:177
 AliPHOSTenderSupply.cxx:178
 AliPHOSTenderSupply.cxx:179
 AliPHOSTenderSupply.cxx:180
 AliPHOSTenderSupply.cxx:181
 AliPHOSTenderSupply.cxx:182
 AliPHOSTenderSupply.cxx:183
 AliPHOSTenderSupply.cxx:184
 AliPHOSTenderSupply.cxx:185
 AliPHOSTenderSupply.cxx:186
 AliPHOSTenderSupply.cxx:187
 AliPHOSTenderSupply.cxx:188
 AliPHOSTenderSupply.cxx:189
 AliPHOSTenderSupply.cxx:190
 AliPHOSTenderSupply.cxx:191
 AliPHOSTenderSupply.cxx:192
 AliPHOSTenderSupply.cxx:193
 AliPHOSTenderSupply.cxx:194
 AliPHOSTenderSupply.cxx:195
 AliPHOSTenderSupply.cxx:196
 AliPHOSTenderSupply.cxx:197
 AliPHOSTenderSupply.cxx:198
 AliPHOSTenderSupply.cxx:199
 AliPHOSTenderSupply.cxx:200
 AliPHOSTenderSupply.cxx:201
 AliPHOSTenderSupply.cxx:202
 AliPHOSTenderSupply.cxx:203
 AliPHOSTenderSupply.cxx:204
 AliPHOSTenderSupply.cxx:205
 AliPHOSTenderSupply.cxx:206
 AliPHOSTenderSupply.cxx:207
 AliPHOSTenderSupply.cxx:208
 AliPHOSTenderSupply.cxx:209
 AliPHOSTenderSupply.cxx:210
 AliPHOSTenderSupply.cxx:211
 AliPHOSTenderSupply.cxx:212
 AliPHOSTenderSupply.cxx:213
 AliPHOSTenderSupply.cxx:214
 AliPHOSTenderSupply.cxx:215
 AliPHOSTenderSupply.cxx:216
 AliPHOSTenderSupply.cxx:217
 AliPHOSTenderSupply.cxx:218
 AliPHOSTenderSupply.cxx:219
 AliPHOSTenderSupply.cxx:220
 AliPHOSTenderSupply.cxx:221
 AliPHOSTenderSupply.cxx:222
 AliPHOSTenderSupply.cxx:223
 AliPHOSTenderSupply.cxx:224
 AliPHOSTenderSupply.cxx:225
 AliPHOSTenderSupply.cxx:226
 AliPHOSTenderSupply.cxx:227
 AliPHOSTenderSupply.cxx:228
 AliPHOSTenderSupply.cxx:229
 AliPHOSTenderSupply.cxx:230
 AliPHOSTenderSupply.cxx:231
 AliPHOSTenderSupply.cxx:232
 AliPHOSTenderSupply.cxx:233
 AliPHOSTenderSupply.cxx:234
 AliPHOSTenderSupply.cxx:235
 AliPHOSTenderSupply.cxx:236
 AliPHOSTenderSupply.cxx:237
 AliPHOSTenderSupply.cxx:238
 AliPHOSTenderSupply.cxx:239
 AliPHOSTenderSupply.cxx:240
 AliPHOSTenderSupply.cxx:241
 AliPHOSTenderSupply.cxx:242
 AliPHOSTenderSupply.cxx:243
 AliPHOSTenderSupply.cxx:244
 AliPHOSTenderSupply.cxx:245
 AliPHOSTenderSupply.cxx:246
 AliPHOSTenderSupply.cxx:247
 AliPHOSTenderSupply.cxx:248
 AliPHOSTenderSupply.cxx:249
 AliPHOSTenderSupply.cxx:250
 AliPHOSTenderSupply.cxx:251
 AliPHOSTenderSupply.cxx:252
 AliPHOSTenderSupply.cxx:253
 AliPHOSTenderSupply.cxx:254
 AliPHOSTenderSupply.cxx:255
 AliPHOSTenderSupply.cxx:256
 AliPHOSTenderSupply.cxx:257
 AliPHOSTenderSupply.cxx:258
 AliPHOSTenderSupply.cxx:259
 AliPHOSTenderSupply.cxx:260
 AliPHOSTenderSupply.cxx:261
 AliPHOSTenderSupply.cxx:262
 AliPHOSTenderSupply.cxx:263
 AliPHOSTenderSupply.cxx:264
 AliPHOSTenderSupply.cxx:265
 AliPHOSTenderSupply.cxx:266
 AliPHOSTenderSupply.cxx:267
 AliPHOSTenderSupply.cxx:268
 AliPHOSTenderSupply.cxx:269
 AliPHOSTenderSupply.cxx:270
 AliPHOSTenderSupply.cxx:271
 AliPHOSTenderSupply.cxx:272
 AliPHOSTenderSupply.cxx:273
 AliPHOSTenderSupply.cxx:274
 AliPHOSTenderSupply.cxx:275
 AliPHOSTenderSupply.cxx:276
 AliPHOSTenderSupply.cxx:277
 AliPHOSTenderSupply.cxx:278
 AliPHOSTenderSupply.cxx:279
 AliPHOSTenderSupply.cxx:280
 AliPHOSTenderSupply.cxx:281
 AliPHOSTenderSupply.cxx:282
 AliPHOSTenderSupply.cxx:283
 AliPHOSTenderSupply.cxx:284
 AliPHOSTenderSupply.cxx:285
 AliPHOSTenderSupply.cxx:286
 AliPHOSTenderSupply.cxx:287
 AliPHOSTenderSupply.cxx:288
 AliPHOSTenderSupply.cxx:289
 AliPHOSTenderSupply.cxx:290
 AliPHOSTenderSupply.cxx:291
 AliPHOSTenderSupply.cxx:292
 AliPHOSTenderSupply.cxx:293
 AliPHOSTenderSupply.cxx:294
 AliPHOSTenderSupply.cxx:295
 AliPHOSTenderSupply.cxx:296
 AliPHOSTenderSupply.cxx:297
 AliPHOSTenderSupply.cxx:298
 AliPHOSTenderSupply.cxx:299
 AliPHOSTenderSupply.cxx:300
 AliPHOSTenderSupply.cxx:301
 AliPHOSTenderSupply.cxx:302
 AliPHOSTenderSupply.cxx:303
 AliPHOSTenderSupply.cxx:304
 AliPHOSTenderSupply.cxx:305
 AliPHOSTenderSupply.cxx:306
 AliPHOSTenderSupply.cxx:307
 AliPHOSTenderSupply.cxx:308
 AliPHOSTenderSupply.cxx:309
 AliPHOSTenderSupply.cxx:310
 AliPHOSTenderSupply.cxx:311
 AliPHOSTenderSupply.cxx:312
 AliPHOSTenderSupply.cxx:313
 AliPHOSTenderSupply.cxx:314
 AliPHOSTenderSupply.cxx:315
 AliPHOSTenderSupply.cxx:316
 AliPHOSTenderSupply.cxx:317
 AliPHOSTenderSupply.cxx:318
 AliPHOSTenderSupply.cxx:319
 AliPHOSTenderSupply.cxx:320
 AliPHOSTenderSupply.cxx:321
 AliPHOSTenderSupply.cxx:322
 AliPHOSTenderSupply.cxx:323
 AliPHOSTenderSupply.cxx:324
 AliPHOSTenderSupply.cxx:325
 AliPHOSTenderSupply.cxx:326
 AliPHOSTenderSupply.cxx:327
 AliPHOSTenderSupply.cxx:328
 AliPHOSTenderSupply.cxx:329
 AliPHOSTenderSupply.cxx:330
 AliPHOSTenderSupply.cxx:331
 AliPHOSTenderSupply.cxx:332
 AliPHOSTenderSupply.cxx:333
 AliPHOSTenderSupply.cxx:334
 AliPHOSTenderSupply.cxx:335
 AliPHOSTenderSupply.cxx:336
 AliPHOSTenderSupply.cxx:337
 AliPHOSTenderSupply.cxx:338
 AliPHOSTenderSupply.cxx:339
 AliPHOSTenderSupply.cxx:340
 AliPHOSTenderSupply.cxx:341
 AliPHOSTenderSupply.cxx:342
 AliPHOSTenderSupply.cxx:343
 AliPHOSTenderSupply.cxx:344
 AliPHOSTenderSupply.cxx:345
 AliPHOSTenderSupply.cxx:346
 AliPHOSTenderSupply.cxx:347
 AliPHOSTenderSupply.cxx:348
 AliPHOSTenderSupply.cxx:349
 AliPHOSTenderSupply.cxx:350
 AliPHOSTenderSupply.cxx:351
 AliPHOSTenderSupply.cxx:352
 AliPHOSTenderSupply.cxx:353
 AliPHOSTenderSupply.cxx:354
 AliPHOSTenderSupply.cxx:355
 AliPHOSTenderSupply.cxx:356
 AliPHOSTenderSupply.cxx:357
 AliPHOSTenderSupply.cxx:358
 AliPHOSTenderSupply.cxx:359
 AliPHOSTenderSupply.cxx:360
 AliPHOSTenderSupply.cxx:361
 AliPHOSTenderSupply.cxx:362
 AliPHOSTenderSupply.cxx:363
 AliPHOSTenderSupply.cxx:364
 AliPHOSTenderSupply.cxx:365
 AliPHOSTenderSupply.cxx:366
 AliPHOSTenderSupply.cxx:367
 AliPHOSTenderSupply.cxx:368
 AliPHOSTenderSupply.cxx:369
 AliPHOSTenderSupply.cxx:370
 AliPHOSTenderSupply.cxx:371
 AliPHOSTenderSupply.cxx:372
 AliPHOSTenderSupply.cxx:373
 AliPHOSTenderSupply.cxx:374
 AliPHOSTenderSupply.cxx:375
 AliPHOSTenderSupply.cxx:376
 AliPHOSTenderSupply.cxx:377
 AliPHOSTenderSupply.cxx:378
 AliPHOSTenderSupply.cxx:379
 AliPHOSTenderSupply.cxx:380
 AliPHOSTenderSupply.cxx:381
 AliPHOSTenderSupply.cxx:382
 AliPHOSTenderSupply.cxx:383
 AliPHOSTenderSupply.cxx:384
 AliPHOSTenderSupply.cxx:385
 AliPHOSTenderSupply.cxx:386
 AliPHOSTenderSupply.cxx:387
 AliPHOSTenderSupply.cxx:388
 AliPHOSTenderSupply.cxx:389
 AliPHOSTenderSupply.cxx:390
 AliPHOSTenderSupply.cxx:391
 AliPHOSTenderSupply.cxx:392
 AliPHOSTenderSupply.cxx:393
 AliPHOSTenderSupply.cxx:394
 AliPHOSTenderSupply.cxx:395
 AliPHOSTenderSupply.cxx:396
 AliPHOSTenderSupply.cxx:397
 AliPHOSTenderSupply.cxx:398
 AliPHOSTenderSupply.cxx:399
 AliPHOSTenderSupply.cxx:400
 AliPHOSTenderSupply.cxx:401
 AliPHOSTenderSupply.cxx:402
 AliPHOSTenderSupply.cxx:403
 AliPHOSTenderSupply.cxx:404
 AliPHOSTenderSupply.cxx:405
 AliPHOSTenderSupply.cxx:406
 AliPHOSTenderSupply.cxx:407
 AliPHOSTenderSupply.cxx:408
 AliPHOSTenderSupply.cxx:409
 AliPHOSTenderSupply.cxx:410
 AliPHOSTenderSupply.cxx:411
 AliPHOSTenderSupply.cxx:412
 AliPHOSTenderSupply.cxx:413
 AliPHOSTenderSupply.cxx:414
 AliPHOSTenderSupply.cxx:415
 AliPHOSTenderSupply.cxx:416
 AliPHOSTenderSupply.cxx:417
 AliPHOSTenderSupply.cxx:418
 AliPHOSTenderSupply.cxx:419
 AliPHOSTenderSupply.cxx:420
 AliPHOSTenderSupply.cxx:421
 AliPHOSTenderSupply.cxx:422
 AliPHOSTenderSupply.cxx:423
 AliPHOSTenderSupply.cxx:424
 AliPHOSTenderSupply.cxx:425
 AliPHOSTenderSupply.cxx:426
 AliPHOSTenderSupply.cxx:427
 AliPHOSTenderSupply.cxx:428
 AliPHOSTenderSupply.cxx:429
 AliPHOSTenderSupply.cxx:430
 AliPHOSTenderSupply.cxx:431
 AliPHOSTenderSupply.cxx:432
 AliPHOSTenderSupply.cxx:433
 AliPHOSTenderSupply.cxx:434
 AliPHOSTenderSupply.cxx:435
 AliPHOSTenderSupply.cxx:436
 AliPHOSTenderSupply.cxx:437
 AliPHOSTenderSupply.cxx:438
 AliPHOSTenderSupply.cxx:439
 AliPHOSTenderSupply.cxx:440
 AliPHOSTenderSupply.cxx:441
 AliPHOSTenderSupply.cxx:442
 AliPHOSTenderSupply.cxx:443
 AliPHOSTenderSupply.cxx:444
 AliPHOSTenderSupply.cxx:445
 AliPHOSTenderSupply.cxx:446
 AliPHOSTenderSupply.cxx:447
 AliPHOSTenderSupply.cxx:448
 AliPHOSTenderSupply.cxx:449
 AliPHOSTenderSupply.cxx:450
 AliPHOSTenderSupply.cxx:451
 AliPHOSTenderSupply.cxx:452
 AliPHOSTenderSupply.cxx:453
 AliPHOSTenderSupply.cxx:454
 AliPHOSTenderSupply.cxx:455
 AliPHOSTenderSupply.cxx:456
 AliPHOSTenderSupply.cxx:457
 AliPHOSTenderSupply.cxx:458
 AliPHOSTenderSupply.cxx:459
 AliPHOSTenderSupply.cxx:460
 AliPHOSTenderSupply.cxx:461
 AliPHOSTenderSupply.cxx:462
 AliPHOSTenderSupply.cxx:463
 AliPHOSTenderSupply.cxx:464
 AliPHOSTenderSupply.cxx:465
 AliPHOSTenderSupply.cxx:466
 AliPHOSTenderSupply.cxx:467
 AliPHOSTenderSupply.cxx:468
 AliPHOSTenderSupply.cxx:469
 AliPHOSTenderSupply.cxx:470
 AliPHOSTenderSupply.cxx:471
 AliPHOSTenderSupply.cxx:472
 AliPHOSTenderSupply.cxx:473
 AliPHOSTenderSupply.cxx:474
 AliPHOSTenderSupply.cxx:475
 AliPHOSTenderSupply.cxx:476
 AliPHOSTenderSupply.cxx:477
 AliPHOSTenderSupply.cxx:478
 AliPHOSTenderSupply.cxx:479
 AliPHOSTenderSupply.cxx:480
 AliPHOSTenderSupply.cxx:481
 AliPHOSTenderSupply.cxx:482
 AliPHOSTenderSupply.cxx:483
 AliPHOSTenderSupply.cxx:484
 AliPHOSTenderSupply.cxx:485
 AliPHOSTenderSupply.cxx:486
 AliPHOSTenderSupply.cxx:487
 AliPHOSTenderSupply.cxx:488
 AliPHOSTenderSupply.cxx:489
 AliPHOSTenderSupply.cxx:490
 AliPHOSTenderSupply.cxx:491
 AliPHOSTenderSupply.cxx:492
 AliPHOSTenderSupply.cxx:493
 AliPHOSTenderSupply.cxx:494
 AliPHOSTenderSupply.cxx:495
 AliPHOSTenderSupply.cxx:496
 AliPHOSTenderSupply.cxx:497
 AliPHOSTenderSupply.cxx:498
 AliPHOSTenderSupply.cxx:499
 AliPHOSTenderSupply.cxx:500
 AliPHOSTenderSupply.cxx:501
 AliPHOSTenderSupply.cxx:502
 AliPHOSTenderSupply.cxx:503
 AliPHOSTenderSupply.cxx:504
 AliPHOSTenderSupply.cxx:505
 AliPHOSTenderSupply.cxx:506
 AliPHOSTenderSupply.cxx:507
 AliPHOSTenderSupply.cxx:508
 AliPHOSTenderSupply.cxx:509
 AliPHOSTenderSupply.cxx:510
 AliPHOSTenderSupply.cxx:511
 AliPHOSTenderSupply.cxx:512
 AliPHOSTenderSupply.cxx:513
 AliPHOSTenderSupply.cxx:514
 AliPHOSTenderSupply.cxx:515
 AliPHOSTenderSupply.cxx:516
 AliPHOSTenderSupply.cxx:517
 AliPHOSTenderSupply.cxx:518
 AliPHOSTenderSupply.cxx:519
 AliPHOSTenderSupply.cxx:520
 AliPHOSTenderSupply.cxx:521
 AliPHOSTenderSupply.cxx:522
 AliPHOSTenderSupply.cxx:523
 AliPHOSTenderSupply.cxx:524
 AliPHOSTenderSupply.cxx:525
 AliPHOSTenderSupply.cxx:526
 AliPHOSTenderSupply.cxx:527
 AliPHOSTenderSupply.cxx:528
 AliPHOSTenderSupply.cxx:529
 AliPHOSTenderSupply.cxx:530
 AliPHOSTenderSupply.cxx:531
 AliPHOSTenderSupply.cxx:532
 AliPHOSTenderSupply.cxx:533
 AliPHOSTenderSupply.cxx:534
 AliPHOSTenderSupply.cxx:535
 AliPHOSTenderSupply.cxx:536
 AliPHOSTenderSupply.cxx:537
 AliPHOSTenderSupply.cxx:538
 AliPHOSTenderSupply.cxx:539
 AliPHOSTenderSupply.cxx:540
 AliPHOSTenderSupply.cxx:541
 AliPHOSTenderSupply.cxx:542
 AliPHOSTenderSupply.cxx:543
 AliPHOSTenderSupply.cxx:544
 AliPHOSTenderSupply.cxx:545
 AliPHOSTenderSupply.cxx:546
 AliPHOSTenderSupply.cxx:547
 AliPHOSTenderSupply.cxx:548
 AliPHOSTenderSupply.cxx:549
 AliPHOSTenderSupply.cxx:550
 AliPHOSTenderSupply.cxx:551
 AliPHOSTenderSupply.cxx:552
 AliPHOSTenderSupply.cxx:553
 AliPHOSTenderSupply.cxx:554
 AliPHOSTenderSupply.cxx:555
 AliPHOSTenderSupply.cxx:556
 AliPHOSTenderSupply.cxx:557
 AliPHOSTenderSupply.cxx:558
 AliPHOSTenderSupply.cxx:559
 AliPHOSTenderSupply.cxx:560
 AliPHOSTenderSupply.cxx:561
 AliPHOSTenderSupply.cxx:562
 AliPHOSTenderSupply.cxx:563
 AliPHOSTenderSupply.cxx:564
 AliPHOSTenderSupply.cxx:565
 AliPHOSTenderSupply.cxx:566
 AliPHOSTenderSupply.cxx:567
 AliPHOSTenderSupply.cxx:568
 AliPHOSTenderSupply.cxx:569
 AliPHOSTenderSupply.cxx:570
 AliPHOSTenderSupply.cxx:571
 AliPHOSTenderSupply.cxx:572
 AliPHOSTenderSupply.cxx:573
 AliPHOSTenderSupply.cxx:574
 AliPHOSTenderSupply.cxx:575
 AliPHOSTenderSupply.cxx:576
 AliPHOSTenderSupply.cxx:577
 AliPHOSTenderSupply.cxx:578
 AliPHOSTenderSupply.cxx:579
 AliPHOSTenderSupply.cxx:580
 AliPHOSTenderSupply.cxx:581
 AliPHOSTenderSupply.cxx:582
 AliPHOSTenderSupply.cxx:583
 AliPHOSTenderSupply.cxx:584
 AliPHOSTenderSupply.cxx:585
 AliPHOSTenderSupply.cxx:586
 AliPHOSTenderSupply.cxx:587
 AliPHOSTenderSupply.cxx:588
 AliPHOSTenderSupply.cxx:589
 AliPHOSTenderSupply.cxx:590
 AliPHOSTenderSupply.cxx:591
 AliPHOSTenderSupply.cxx:592
 AliPHOSTenderSupply.cxx:593
 AliPHOSTenderSupply.cxx:594
 AliPHOSTenderSupply.cxx:595
 AliPHOSTenderSupply.cxx:596
 AliPHOSTenderSupply.cxx:597
 AliPHOSTenderSupply.cxx:598
 AliPHOSTenderSupply.cxx:599
 AliPHOSTenderSupply.cxx:600
 AliPHOSTenderSupply.cxx:601
 AliPHOSTenderSupply.cxx:602
 AliPHOSTenderSupply.cxx:603
 AliPHOSTenderSupply.cxx:604
 AliPHOSTenderSupply.cxx:605
 AliPHOSTenderSupply.cxx:606
 AliPHOSTenderSupply.cxx:607
 AliPHOSTenderSupply.cxx:608
 AliPHOSTenderSupply.cxx:609
 AliPHOSTenderSupply.cxx:610
 AliPHOSTenderSupply.cxx:611
 AliPHOSTenderSupply.cxx:612
 AliPHOSTenderSupply.cxx:613
 AliPHOSTenderSupply.cxx:614
 AliPHOSTenderSupply.cxx:615
 AliPHOSTenderSupply.cxx:616
 AliPHOSTenderSupply.cxx:617
 AliPHOSTenderSupply.cxx:618
 AliPHOSTenderSupply.cxx:619
 AliPHOSTenderSupply.cxx:620
 AliPHOSTenderSupply.cxx:621
 AliPHOSTenderSupply.cxx:622
 AliPHOSTenderSupply.cxx:623
 AliPHOSTenderSupply.cxx:624
 AliPHOSTenderSupply.cxx:625
 AliPHOSTenderSupply.cxx:626
 AliPHOSTenderSupply.cxx:627
 AliPHOSTenderSupply.cxx:628
 AliPHOSTenderSupply.cxx:629
 AliPHOSTenderSupply.cxx:630
 AliPHOSTenderSupply.cxx:631
 AliPHOSTenderSupply.cxx:632
 AliPHOSTenderSupply.cxx:633
 AliPHOSTenderSupply.cxx:634
 AliPHOSTenderSupply.cxx:635
 AliPHOSTenderSupply.cxx:636
 AliPHOSTenderSupply.cxx:637
 AliPHOSTenderSupply.cxx:638
 AliPHOSTenderSupply.cxx:639
 AliPHOSTenderSupply.cxx:640
 AliPHOSTenderSupply.cxx:641
 AliPHOSTenderSupply.cxx:642
 AliPHOSTenderSupply.cxx:643
 AliPHOSTenderSupply.cxx:644
 AliPHOSTenderSupply.cxx:645
 AliPHOSTenderSupply.cxx:646
 AliPHOSTenderSupply.cxx:647
 AliPHOSTenderSupply.cxx:648
 AliPHOSTenderSupply.cxx:649
 AliPHOSTenderSupply.cxx:650
 AliPHOSTenderSupply.cxx:651
 AliPHOSTenderSupply.cxx:652
 AliPHOSTenderSupply.cxx:653
 AliPHOSTenderSupply.cxx:654
 AliPHOSTenderSupply.cxx:655
 AliPHOSTenderSupply.cxx:656
 AliPHOSTenderSupply.cxx:657
 AliPHOSTenderSupply.cxx:658
 AliPHOSTenderSupply.cxx:659
 AliPHOSTenderSupply.cxx:660
 AliPHOSTenderSupply.cxx:661
 AliPHOSTenderSupply.cxx:662
 AliPHOSTenderSupply.cxx:663
 AliPHOSTenderSupply.cxx:664
 AliPHOSTenderSupply.cxx:665
 AliPHOSTenderSupply.cxx:666
 AliPHOSTenderSupply.cxx:667
 AliPHOSTenderSupply.cxx:668
 AliPHOSTenderSupply.cxx:669
 AliPHOSTenderSupply.cxx:670
 AliPHOSTenderSupply.cxx:671
 AliPHOSTenderSupply.cxx:672
 AliPHOSTenderSupply.cxx:673
 AliPHOSTenderSupply.cxx:674
 AliPHOSTenderSupply.cxx:675
 AliPHOSTenderSupply.cxx:676
 AliPHOSTenderSupply.cxx:677
 AliPHOSTenderSupply.cxx:678
 AliPHOSTenderSupply.cxx:679
 AliPHOSTenderSupply.cxx:680
 AliPHOSTenderSupply.cxx:681
 AliPHOSTenderSupply.cxx:682
 AliPHOSTenderSupply.cxx:683
 AliPHOSTenderSupply.cxx:684
 AliPHOSTenderSupply.cxx:685
 AliPHOSTenderSupply.cxx:686
 AliPHOSTenderSupply.cxx:687
 AliPHOSTenderSupply.cxx:688
 AliPHOSTenderSupply.cxx:689
 AliPHOSTenderSupply.cxx:690
 AliPHOSTenderSupply.cxx:691
 AliPHOSTenderSupply.cxx:692
 AliPHOSTenderSupply.cxx:693
 AliPHOSTenderSupply.cxx:694
 AliPHOSTenderSupply.cxx:695
 AliPHOSTenderSupply.cxx:696
 AliPHOSTenderSupply.cxx:697
 AliPHOSTenderSupply.cxx:698
 AliPHOSTenderSupply.cxx:699
 AliPHOSTenderSupply.cxx:700
 AliPHOSTenderSupply.cxx:701
 AliPHOSTenderSupply.cxx:702
 AliPHOSTenderSupply.cxx:703
 AliPHOSTenderSupply.cxx:704
 AliPHOSTenderSupply.cxx:705
 AliPHOSTenderSupply.cxx:706
 AliPHOSTenderSupply.cxx:707
 AliPHOSTenderSupply.cxx:708
 AliPHOSTenderSupply.cxx:709
 AliPHOSTenderSupply.cxx:710
 AliPHOSTenderSupply.cxx:711
 AliPHOSTenderSupply.cxx:712
 AliPHOSTenderSupply.cxx:713
 AliPHOSTenderSupply.cxx:714
 AliPHOSTenderSupply.cxx:715
 AliPHOSTenderSupply.cxx:716
 AliPHOSTenderSupply.cxx:717
 AliPHOSTenderSupply.cxx:718
 AliPHOSTenderSupply.cxx:719
 AliPHOSTenderSupply.cxx:720
 AliPHOSTenderSupply.cxx:721
 AliPHOSTenderSupply.cxx:722
 AliPHOSTenderSupply.cxx:723
 AliPHOSTenderSupply.cxx:724
 AliPHOSTenderSupply.cxx:725
 AliPHOSTenderSupply.cxx:726
 AliPHOSTenderSupply.cxx:727
 AliPHOSTenderSupply.cxx:728
 AliPHOSTenderSupply.cxx:729
 AliPHOSTenderSupply.cxx:730
 AliPHOSTenderSupply.cxx:731
 AliPHOSTenderSupply.cxx:732
 AliPHOSTenderSupply.cxx:733
 AliPHOSTenderSupply.cxx:734
 AliPHOSTenderSupply.cxx:735
 AliPHOSTenderSupply.cxx:736
 AliPHOSTenderSupply.cxx:737
 AliPHOSTenderSupply.cxx:738
 AliPHOSTenderSupply.cxx:739
 AliPHOSTenderSupply.cxx:740
 AliPHOSTenderSupply.cxx:741
 AliPHOSTenderSupply.cxx:742
 AliPHOSTenderSupply.cxx:743
 AliPHOSTenderSupply.cxx:744
 AliPHOSTenderSupply.cxx:745
 AliPHOSTenderSupply.cxx:746
 AliPHOSTenderSupply.cxx:747
 AliPHOSTenderSupply.cxx:748
 AliPHOSTenderSupply.cxx:749
 AliPHOSTenderSupply.cxx:750
 AliPHOSTenderSupply.cxx:751
 AliPHOSTenderSupply.cxx:752
 AliPHOSTenderSupply.cxx:753
 AliPHOSTenderSupply.cxx:754
 AliPHOSTenderSupply.cxx:755
 AliPHOSTenderSupply.cxx:756
 AliPHOSTenderSupply.cxx:757
 AliPHOSTenderSupply.cxx:758
 AliPHOSTenderSupply.cxx:759
 AliPHOSTenderSupply.cxx:760
 AliPHOSTenderSupply.cxx:761
 AliPHOSTenderSupply.cxx:762
 AliPHOSTenderSupply.cxx:763
 AliPHOSTenderSupply.cxx:764
 AliPHOSTenderSupply.cxx:765
 AliPHOSTenderSupply.cxx:766
 AliPHOSTenderSupply.cxx:767
 AliPHOSTenderSupply.cxx:768
 AliPHOSTenderSupply.cxx:769
 AliPHOSTenderSupply.cxx:770
 AliPHOSTenderSupply.cxx:771
 AliPHOSTenderSupply.cxx:772
 AliPHOSTenderSupply.cxx:773
 AliPHOSTenderSupply.cxx:774
 AliPHOSTenderSupply.cxx:775
 AliPHOSTenderSupply.cxx:776
 AliPHOSTenderSupply.cxx:777
 AliPHOSTenderSupply.cxx:778
 AliPHOSTenderSupply.cxx:779
 AliPHOSTenderSupply.cxx:780
 AliPHOSTenderSupply.cxx:781
 AliPHOSTenderSupply.cxx:782
 AliPHOSTenderSupply.cxx:783
 AliPHOSTenderSupply.cxx:784
 AliPHOSTenderSupply.cxx:785
 AliPHOSTenderSupply.cxx:786
 AliPHOSTenderSupply.cxx:787
 AliPHOSTenderSupply.cxx:788
 AliPHOSTenderSupply.cxx:789
 AliPHOSTenderSupply.cxx:790
 AliPHOSTenderSupply.cxx:791
 AliPHOSTenderSupply.cxx:792
 AliPHOSTenderSupply.cxx:793
 AliPHOSTenderSupply.cxx:794
 AliPHOSTenderSupply.cxx:795
 AliPHOSTenderSupply.cxx:796
 AliPHOSTenderSupply.cxx:797
 AliPHOSTenderSupply.cxx:798
 AliPHOSTenderSupply.cxx:799
 AliPHOSTenderSupply.cxx:800
 AliPHOSTenderSupply.cxx:801
 AliPHOSTenderSupply.cxx:802
 AliPHOSTenderSupply.cxx:803
 AliPHOSTenderSupply.cxx:804
 AliPHOSTenderSupply.cxx:805
 AliPHOSTenderSupply.cxx:806
 AliPHOSTenderSupply.cxx:807
 AliPHOSTenderSupply.cxx:808
 AliPHOSTenderSupply.cxx:809
 AliPHOSTenderSupply.cxx:810
 AliPHOSTenderSupply.cxx:811
 AliPHOSTenderSupply.cxx:812
 AliPHOSTenderSupply.cxx:813
 AliPHOSTenderSupply.cxx:814
 AliPHOSTenderSupply.cxx:815
 AliPHOSTenderSupply.cxx:816
 AliPHOSTenderSupply.cxx:817
 AliPHOSTenderSupply.cxx:818
 AliPHOSTenderSupply.cxx:819
 AliPHOSTenderSupply.cxx:820
 AliPHOSTenderSupply.cxx:821
 AliPHOSTenderSupply.cxx:822
 AliPHOSTenderSupply.cxx:823
 AliPHOSTenderSupply.cxx:824
 AliPHOSTenderSupply.cxx:825
 AliPHOSTenderSupply.cxx:826
 AliPHOSTenderSupply.cxx:827
 AliPHOSTenderSupply.cxx:828
 AliPHOSTenderSupply.cxx:829
 AliPHOSTenderSupply.cxx:830
 AliPHOSTenderSupply.cxx:831
 AliPHOSTenderSupply.cxx:832
 AliPHOSTenderSupply.cxx:833
 AliPHOSTenderSupply.cxx:834
 AliPHOSTenderSupply.cxx:835
 AliPHOSTenderSupply.cxx:836
 AliPHOSTenderSupply.cxx:837
 AliPHOSTenderSupply.cxx:838
 AliPHOSTenderSupply.cxx:839
 AliPHOSTenderSupply.cxx:840
 AliPHOSTenderSupply.cxx:841
 AliPHOSTenderSupply.cxx:842
 AliPHOSTenderSupply.cxx:843
 AliPHOSTenderSupply.cxx:844
 AliPHOSTenderSupply.cxx:845
 AliPHOSTenderSupply.cxx:846
 AliPHOSTenderSupply.cxx:847
 AliPHOSTenderSupply.cxx:848
 AliPHOSTenderSupply.cxx:849
 AliPHOSTenderSupply.cxx:850
 AliPHOSTenderSupply.cxx:851
 AliPHOSTenderSupply.cxx:852
 AliPHOSTenderSupply.cxx:853
 AliPHOSTenderSupply.cxx:854
 AliPHOSTenderSupply.cxx:855
 AliPHOSTenderSupply.cxx:856
 AliPHOSTenderSupply.cxx:857
 AliPHOSTenderSupply.cxx:858
 AliPHOSTenderSupply.cxx:859
 AliPHOSTenderSupply.cxx:860
 AliPHOSTenderSupply.cxx:861
 AliPHOSTenderSupply.cxx:862
 AliPHOSTenderSupply.cxx:863
 AliPHOSTenderSupply.cxx:864
 AliPHOSTenderSupply.cxx:865
 AliPHOSTenderSupply.cxx:866
 AliPHOSTenderSupply.cxx:867
 AliPHOSTenderSupply.cxx:868
 AliPHOSTenderSupply.cxx:869
 AliPHOSTenderSupply.cxx:870
 AliPHOSTenderSupply.cxx:871
 AliPHOSTenderSupply.cxx:872
 AliPHOSTenderSupply.cxx:873
 AliPHOSTenderSupply.cxx:874
 AliPHOSTenderSupply.cxx:875
 AliPHOSTenderSupply.cxx:876
 AliPHOSTenderSupply.cxx:877
 AliPHOSTenderSupply.cxx:878
 AliPHOSTenderSupply.cxx:879
 AliPHOSTenderSupply.cxx:880
 AliPHOSTenderSupply.cxx:881
 AliPHOSTenderSupply.cxx:882
 AliPHOSTenderSupply.cxx:883
 AliPHOSTenderSupply.cxx:884
 AliPHOSTenderSupply.cxx:885
 AliPHOSTenderSupply.cxx:886
 AliPHOSTenderSupply.cxx:887
 AliPHOSTenderSupply.cxx:888
 AliPHOSTenderSupply.cxx:889
 AliPHOSTenderSupply.cxx:890
 AliPHOSTenderSupply.cxx:891
 AliPHOSTenderSupply.cxx:892
 AliPHOSTenderSupply.cxx:893
 AliPHOSTenderSupply.cxx:894
 AliPHOSTenderSupply.cxx:895
 AliPHOSTenderSupply.cxx:896
 AliPHOSTenderSupply.cxx:897
 AliPHOSTenderSupply.cxx:898
 AliPHOSTenderSupply.cxx:899
 AliPHOSTenderSupply.cxx:900
 AliPHOSTenderSupply.cxx:901
 AliPHOSTenderSupply.cxx:902
 AliPHOSTenderSupply.cxx:903
 AliPHOSTenderSupply.cxx:904
 AliPHOSTenderSupply.cxx:905
 AliPHOSTenderSupply.cxx:906
 AliPHOSTenderSupply.cxx:907
 AliPHOSTenderSupply.cxx:908
 AliPHOSTenderSupply.cxx:909
 AliPHOSTenderSupply.cxx:910
 AliPHOSTenderSupply.cxx:911
 AliPHOSTenderSupply.cxx:912
 AliPHOSTenderSupply.cxx:913
 AliPHOSTenderSupply.cxx:914
 AliPHOSTenderSupply.cxx:915
 AliPHOSTenderSupply.cxx:916
 AliPHOSTenderSupply.cxx:917
 AliPHOSTenderSupply.cxx:918
 AliPHOSTenderSupply.cxx:919
 AliPHOSTenderSupply.cxx:920
 AliPHOSTenderSupply.cxx:921
 AliPHOSTenderSupply.cxx:922
 AliPHOSTenderSupply.cxx:923
 AliPHOSTenderSupply.cxx:924
 AliPHOSTenderSupply.cxx:925
 AliPHOSTenderSupply.cxx:926
 AliPHOSTenderSupply.cxx:927
 AliPHOSTenderSupply.cxx:928
 AliPHOSTenderSupply.cxx:929
 AliPHOSTenderSupply.cxx:930
 AliPHOSTenderSupply.cxx:931
 AliPHOSTenderSupply.cxx:932
 AliPHOSTenderSupply.cxx:933
 AliPHOSTenderSupply.cxx:934
 AliPHOSTenderSupply.cxx:935
 AliPHOSTenderSupply.cxx:936
 AliPHOSTenderSupply.cxx:937
 AliPHOSTenderSupply.cxx:938
 AliPHOSTenderSupply.cxx:939
 AliPHOSTenderSupply.cxx:940
 AliPHOSTenderSupply.cxx:941
 AliPHOSTenderSupply.cxx:942
 AliPHOSTenderSupply.cxx:943
 AliPHOSTenderSupply.cxx:944
 AliPHOSTenderSupply.cxx:945
 AliPHOSTenderSupply.cxx:946
 AliPHOSTenderSupply.cxx:947
 AliPHOSTenderSupply.cxx:948
 AliPHOSTenderSupply.cxx:949
 AliPHOSTenderSupply.cxx:950
 AliPHOSTenderSupply.cxx:951
 AliPHOSTenderSupply.cxx:952
 AliPHOSTenderSupply.cxx:953
 AliPHOSTenderSupply.cxx:954
 AliPHOSTenderSupply.cxx:955
 AliPHOSTenderSupply.cxx:956
 AliPHOSTenderSupply.cxx:957
 AliPHOSTenderSupply.cxx:958
 AliPHOSTenderSupply.cxx:959
 AliPHOSTenderSupply.cxx:960
 AliPHOSTenderSupply.cxx:961
 AliPHOSTenderSupply.cxx:962
 AliPHOSTenderSupply.cxx:963
 AliPHOSTenderSupply.cxx:964
 AliPHOSTenderSupply.cxx:965
 AliPHOSTenderSupply.cxx:966
 AliPHOSTenderSupply.cxx:967
 AliPHOSTenderSupply.cxx:968
 AliPHOSTenderSupply.cxx:969
 AliPHOSTenderSupply.cxx:970