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

#include "AliHMPIDCluster.h"  //class header
#include <TVirtualFitter.h>  //Solve()
#include <TMinuit.h>         //Solve()
#include <TClonesArray.h>    //Solve()
#include <TMarker.h>         //Draw()

#include "AliLog.h"          //FindCusterSize()

Bool_t AliHMPIDCluster::fgDoCorrSin=kTRUE;

ClassImp(AliHMPIDCluster)
    

void AliHMPIDCluster::SetClusterParams(Double_t xL,Double_t yL,Int_t iCh  )
{
  //------------------------------------------------------------------------
  //Set the cluster properties for the AliCluster3D part
  //------------------------------------------------------------------------

  fParam = AliHMPIDParam::Instance();
    
  if(!fParam->GetInstType())               //if there is no geometry we cannot retrieve the volId (only for monitoring)
  {
    new(this) AliCluster3D(); return;
  }
  
  //Get the volume ID from the previously set PNEntry
  UShort_t volId=AliGeomManager::LayerToVolUID(AliGeomManager::kHMPID,iCh);

  
  //get L->T cs matrix for a given chamber
  const TGeoHMatrix *t2l= AliGeomManager::GetTracking2LocalMatrix(volId);

  fParam = AliHMPIDParam::Instance();

  //transformation from the pad cs to local
  xL -= 0.5*fParam->SizeAllX();      //size of all pads with dead zones included
  yL -= 0.5*fParam->SizeAllY();

  // Get the position in the tracking cs
  Double_t posL[3]={xL, yL, 0.};            //this is the LORS of HMPID
  Double_t posT[3];
  t2l->MasterToLocal(posL,posT);

 //Get the cluster covariance matrix in the tracking cs
  Double_t covL[9] = {
    0.8*0.8/12., 0.,            0.0,                 //pad size X
    0.,          0.84*0.84/12., 0.0,                 //pad size Y
    0.,          0.,            0.1,                 //just 1 , no Z dimension ???
  };
                
  TGeoHMatrix m;
  m.SetRotation(covL);
  m.Multiply(t2l);
  m.MultiplyLeft(&t2l->Inverse());
  Double_t *covT = m.GetRotationMatrix();

  new(this) AliCluster3D(volId,            // Can be done safer
       posT[0],posT[1],posT[2],
       covT[0],covT[1],covT[2],
	       covT[4],covT[5],
		       covT[8], 
			  0x0);            // No MC labels ?
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
AliHMPIDCluster::~AliHMPIDCluster()
{
  if(fDigs)  delete fDigs; fDigs=0;
  //PH  if(fParam) delete fParam; fParam=0;
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void AliHMPIDCluster::CoG()
{
// Calculates naive cluster position as a center of gravity of its digits.
// Arguments: none 
//   Returns: none
  Int_t minPadX=999,minPadY=999,maxPadX=-1,maxPadY=-1;      //for box finding  
  if(fDigs==0) return;                                      //no digits in this cluster
  fXX=fYY=fQRaw=0;                                          //init summable parameters
  fCh = -1;                                                 //init chamber
  Int_t maxQpad=-1,maxQ=-1;                                 //to calculate the pad with the highest charge
  AliHMPIDDigit *pDig=0x0;
  for(Int_t iDig=0;iDig<fDigs->GetEntriesFast();iDig++){    //digits loop
    pDig=(AliHMPIDDigit*)fDigs->At(iDig);                   //get pointer to next digit
    if(!pDig) continue;                                     //protection
    if(pDig->PadPcX() > maxPadX) maxPadX = pDig->PadPcX();  // find the minimum box that contain the cluster  MaxX                            
    if(pDig->PadPcY() > maxPadY) maxPadY = pDig->PadPcY();  //                                                MaxY
    if(pDig->PadPcX() < minPadX) minPadX = pDig->PadPcX();  //                                                MinX   
    if(pDig->PadPcY() < minPadY) minPadY = pDig->PadPcY();  //                                                MinY   
    
    Float_t q=pDig->Q();                                    //get QDC 
    fXX += pDig->LorsX()*q;fYY +=pDig->LorsY()*q;             //add digit center weighted by QDC
    fQRaw+=q;                                               //increment total charge 
    if(q>maxQ) {maxQpad = pDig->Pad();maxQ=(Int_t)q;}       // to find pad with highest charge
    fCh=pDig->Ch();                                         //initialize chamber number
  }//digits loop
  
  fBox=(maxPadX-minPadX+1)*100+maxPadY-minPadY+1;           // dimension of the box: format Xdim*100+Ydim
  
  if ( fQRaw != 0 ) {fXX/=fQRaw;fYY/=fQRaw;}                //final center of gravity
   
  if(fDigs->GetEntriesFast()>1&&fgDoCorrSin)CorrSin();       //correct it by sinoid   
  
  fQ  = fQRaw;                                              // Before starting fit procedure, Q and QRaw must be equal
  fMaxQpad = maxQpad; fMaxQ=maxQ;                           //store max charge pad to the field
  fChi2=0;                                                  // no Chi2 to find
  fNlocMax=0;                                               // proper status from this method
  fSt=kCoG;
  
  SetClusterParams(fXX,fYY,fCh);                              //need to fill the AliCluster3D part
 
}//CoG()
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void AliHMPIDCluster::CorrSin() 
{
// Correction of cluster x position due to sinoid, see HMPID TDR  page 30
// Arguments: none
//   Returns: none
  Int_t pc,px,py;
  fParam->Lors2Pad(fXX,fYY,pc,px,py);             //tmp digit to get it center
  Float_t x=fXX-fParam->LorsX(pc,px);                    //diff between cluster x and center of the pad contaning this cluster   
  fXX+=3.31267e-2*TMath::Sin(2*TMath::Pi()/0.8*x)-2.66575e-3*TMath::Sin(4*TMath::Pi()/0.8*x)+2.80553e-3*TMath::Sin(6*TMath::Pi()/0.8*x)+0.0070;
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void AliHMPIDCluster::Draw(Option_t*)
{
  TMarker *pMark=new TMarker(X(),Y(),5); pMark->SetUniqueID(fSt);pMark->SetMarkerColor(kBlue); pMark->Draw();
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void AliHMPIDCluster::FitFunc(Int_t &iNpars, Double_t* deriv, Double_t &chi2, Double_t *par, Int_t iflag)
{
// Cluster fit function 
// par[0]=x par[1]=y par[2]=q for the first Mathieson shape
// par[3]=x par[4]=y par[5]=q for the second Mathieson shape and so on up to iNpars/3 Mathieson shapes
// For each pad of the cluster calculates the difference between actual pad charge and the charge induced to this pad by all Mathieson distributions
// Then the chi2 is calculated as the sum of this value squared for all pad in the cluster.  
// Arguments: iNpars - number of parameters which is number of local maxima of cluster * 3
//            chi2   - function result to be minimised 
//            par   - parameters array of size iNpars            
//   Returns: none  
  
  AliHMPIDCluster *pClu=(AliHMPIDCluster*)TVirtualFitter::GetFitter()->GetObjectFit();

  Int_t nPads = pClu->Size();  
  
  chi2 = 0;
  
  Int_t iNshape = iNpars/3;
  
  for(Int_t i=0;i<nPads;i++){                                                          //loop on all pads of the cluster
    Double_t dQpadMath = 0;
    for(Int_t j=0;j<iNshape;j++){                                                      //Mathiesons loop as all of them may contribute to this pad
      Double_t fracMathi = pClu->Dig(i)->IntMathieson(par[3*j],par[3*j+1]);
      dQpadMath+=par[3*j+2]*fracMathi;                                                 // par[3*j+2] is charge par[3*j] is x par[3*j+1] is y of current Mathieson
    }
    if(dQpadMath>0 && pClu->Dig(i)->Q()>0) {
      chi2 +=TMath::Power((pClu->Dig(i)->Q()-dQpadMath),2)/pClu->Dig(i)->Q();          //chi2 function to be minimized
    }
  }
//---calculate gradients...  
  if(iflag==2) {
    Double_t **derivPart;

    derivPart = new Double_t*[iNpars];

    for(Int_t j=0;j<iNpars;j++){                                                      
      deriv[j] = 0;
      derivPart[j] = new Double_t[nPads];
      for(Int_t i=0;i<nPads;i++){                                                          
        derivPart[j][i] = 0;
      }
    }

    for(Int_t i=0;i<nPads;i++){                                                          //loop on all pads of the cluster
      for(Int_t j=0;j<iNshape;j++){                                                      //Mathiesons loop as all of them may contribute to this pad
        Double_t fracMathi = pClu->Dig(i)->IntMathieson(par[3*j],par[3*j+1]);
        derivPart[3*j  ][i] += par[3*j+2]*(pClu->Dig(i)->MathiesonX(par[3*j]-pClu->Dig(i)->LorsX()-0.5*AliHMPIDParam::SizePadX())-
                                           pClu->Dig(i)->MathiesonX(par[3*j]-pClu->Dig(i)->LorsX()+0.5*AliHMPIDParam::SizePadX()))*
                                           pClu->Dig(i)->IntPartMathiY(par[3*j+1]);
        derivPart[3*j+1][i] += par[3*j+2]*(pClu->Dig(i)->MathiesonY(par[3*j+1]-pClu->Dig(i)->LorsY()-0.5*AliHMPIDParam::SizePadY())-
                                           pClu->Dig(i)->MathiesonY(par[3*j+1]-pClu->Dig(i)->LorsY()+0.5*AliHMPIDParam::SizePadY()))*
                                           pClu->Dig(i)->IntPartMathiX(par[3*j]);
        derivPart[3*j+2][i] += fracMathi;
      }
    }
                                                                                         //loop on all pads of the cluster     
    for(Int_t i=0;i<nPads;i++){                                                          //loop on all pads of the cluster
      Double_t dQpadMath = 0;                                                            //pad charge collector  
      for(Int_t j=0;j<iNshape;j++){                                                      //Mathiesons loop as all of them may contribute to this pad
        Double_t fracMathi = pClu->Dig(i)->IntMathieson(par[3*j],par[3*j+1]);
        dQpadMath+=par[3*j+2]*fracMathi;                                                 
        if(dQpadMath>0 && pClu->Dig(i)->Q()>0) {
          deriv[3*j]   += 2/pClu->Dig(i)->Q()*(pClu->Dig(i)->Q()-dQpadMath)*derivPart[3*j  ][i];
          deriv[3*j+1] += 2/pClu->Dig(i)->Q()*(pClu->Dig(i)->Q()-dQpadMath)*derivPart[3*j+1][i];
          deriv[3*j+2] += 2/pClu->Dig(i)->Q()*(pClu->Dig(i)->Q()-dQpadMath)*derivPart[3*j+2][i];
        }
      }
    }
    //delete array...
    for(Int_t i=0;i<iNpars;i++) delete [] derivPart[i]; delete [] derivPart;
  }
//---gradient calculations ended

// fit ended. Final calculations
  
  
}//FitFunction()
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void AliHMPIDCluster::Print(Option_t* opt)const
{
//Print current cluster  
  const char *status=0;
  switch(fSt){
    case        kFrm  : status="formed        "   ;break;
    case        kUnf  : status="unfolded (fit)"   ;break;
    case        kCoG  : status="coged         "   ;break;
    case        kLo1  : status="locmax 1 (fit)"   ;break;
    case        kMax  : status="exceeded (cog)"   ;break;
    case        kNot  : status="not done (cog)"   ;break;
    case        kEmp  : status="empty         "   ;break;
    case        kEdg  : status="edge     (fit)"   ;break;
    case 	kSi1  : status="size 1   (cog)"   ;break;
    case 	kNoLoc: status="no LocMax(fit)"   ;break;
    case 	kAbn  : status="Abnormal fit  "   ;break;
    case 	kBig  : status="Big Clu(>100) "   ;break;
    
    default:            status="??????"          ;break;   
  }
  Double_t ratio=0;
  if(Q()>0&&QRaw()>0) ratio = Q()/QRaw()*100;
  Printf("%sCLU: ch=%i  (%7.3f,%7.3f) Q=%8.3f Qraw=%8.3f(%3.0f%%) Size=%2i DimBox=%i LocMax=%i Chi2=%7.3f   %s",
         opt,Ch(),X(),Y(),Q(),QRaw(),ratio,Size(),fBox,fNlocMax,fChi2,status);
  if(fDigs) fDigs->Print();    
}//Print()
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Int_t AliHMPIDCluster::Solve(TClonesArray *pCluLst,Int_t *pSigmaCut, Bool_t isTryUnfold)
{
//This methode is invoked when the cluster is formed to solve it. Solve the cluster means to try to unfold the cluster
//into the local maxima number of clusters. This methode is invoked by AliHMPIDRconstructor::Dig2Clu() on cluster by cluster basis.  
//At this point, cluster contains a list of digits, cluster charge and size is precalculated in AddDigit(), position is preset to (-1,-1) in ctor,
//status is preset to kFormed in AddDigit(), chamber-sector info is preseted to actual values in AddDigit()
//Method first finds number of local maxima and if it's more then one tries to unfold this cluster into local maxima number of clusters
//Arguments: pCluLst     - cluster list pointer where to add new cluster(s)
//           isTryUnfold - flag to switch on/off unfolding   
//  Returns: number of local maxima of original cluster
  const Int_t kMaxLocMax=6;                                                              //max allowed number of loc max for fitting
//  
  CoG();                                                                                 //First calculate CoG for the given cluster
  
  Int_t iCluCnt=pCluLst->GetEntriesFast();                                               //get current number of clusters already stored in the list by previous operations
  
  Int_t rawSize = Size();                                                                //get current raw cluster size
  
  if(rawSize>100) {
    fSt = kBig;
  } else if(isTryUnfold==kFALSE) {
    fSt = kNot;
  } else if(rawSize==1) {
    fSt = kSi1;
  }
  
  if(rawSize>100 || isTryUnfold==kFALSE || rawSize==1) {                                 //No deconv if: 1 - big cluster (also avoid no zero suppression!)
                                                                                         //              2 - flag is set to FALSE
    SetClusterParams(fXX,fYY,fCh);                                                       //              3 - size = 1
    new ((*pCluLst)[iCluCnt++]) AliHMPIDCluster(*this);  //add this raw cluster 
    return 1;
    
  } 
  
//Phase 0. Initialise Fitter  
  Double_t arglist[10];
  Int_t ierflg = 0;
  TVirtualFitter* fitter = TVirtualFitter::Fitter(this,3*6);                       //initialize Fitter
  //
  arglist[0] = -1;
  ierflg = fitter->ExecuteCommand("SET PRI", arglist, 1);                               // no printout
  ierflg = fitter->ExecuteCommand("SET NOW", arglist, 0);                               //no warning messages
  arglist[0] =  1;
  ierflg = fitter->ExecuteCommand("SET GRA", arglist, 1);                               //force Fitter to use my gradient

  fitter->SetFCN(AliHMPIDCluster::FitFunc);

//  arglist[0] = 1;
//  ierflg = fitter->ExecuteCommand("SET ERR", arglist ,1);
  
// Set starting values and step sizes for parameters
    
//Phase 1. Find number of local maxima. Strategy is to check if the current pad has QDC more then all neigbours. Also find the box contaning the cluster   
  fNlocMax=0;

  for(Int_t iDig1=0;iDig1<rawSize;iDig1++) {                                               //first digits loop
    
    AliHMPIDDigit *pDig1 = Dig(iDig1);                                                   //take next digit    
    Int_t iCnt = 0;                                                                      //counts how many neighbouring pads has QDC more then current one
    
    for(Int_t iDig2=0;iDig2<rawSize;iDig2++) {                                            //loop on all digits again
      
      if(iDig1==iDig2) continue;                                                         //the same digit, no need to compare 
      AliHMPIDDigit *pDig2 = Dig(iDig2);                                                 //take second digit to compare with the first one
      Int_t dist = TMath::Sign(Int_t(pDig1->PadChX()-pDig2->PadChX()),1)+TMath::Sign(Int_t(pDig1->PadChY()-pDig2->PadChY()),1);//distance between pads
      if(dist==1)                                                                        //means dig2 is a neighbour of dig1
         if(pDig2->Q()>=pDig1->Q()) iCnt++;                                              //count number of pads with Q more then Q of current pad
      
    }//second digits loop
    
    if(iCnt==0&&fNlocMax<kMaxLocMax){                                                    //this pad has Q more then any neighbour so it's local maximum
      
      Double_t xStart=pDig1->LorsX();Double_t yStart=pDig1->LorsY();
      Double_t xMin=xStart-fParam->SizePadX();
      Double_t xMax=xStart+fParam->SizePadX();
      Double_t yMin=yStart-fParam->SizePadY();
      Double_t yMax=yStart+fParam->SizePadY();
      
      ierflg = fitter->SetParameter(3*fNlocMax  ,Form("x%i",fNlocMax),xStart,0.1,xMin,xMax);    // X,Y,Q initial values of the loc max pad
      ierflg = fitter->SetParameter(3*fNlocMax+1,Form("y%i",fNlocMax),yStart,0.1,yMin,yMax);    // X, Y constrained to be near the loc max
      ierflg = fitter->SetParameter(3*fNlocMax+2,Form("q%i",fNlocMax),pDig1->Q(),0.1,0,10000);  // Q constrained to be positive
      
      fNlocMax++;
      
    }//if this pad is local maximum
  }//first digits loop
  
//Phase 2. Fit loc max number of Mathiesons or add this current cluster to the list
// case 1 -> no loc max found
 if ( fNlocMax == 0) {                                                                       // case of no local maxima found: pads with same charge...
   fNlocMax = 1;
   fSt=kNoLoc;
   SetClusterParams(fXX,fYY,fCh);                                                          //need to fill the AliCluster3D part
   new ((*pCluLst)[iCluCnt++]) AliHMPIDCluster(*this);	                                   //add new unfolded cluster
   return fNlocMax;
 }

// case 2 -> loc max found. Check # of loc maxima 
 if ( fNlocMax >= kMaxLocMax)  { 
   SetClusterParams(fXX,fYY,fCh);                                                           // if # of local maxima exceeds kMaxLocMax...
   fSt = kMax;   new ((*pCluLst)[iCluCnt++]) AliHMPIDCluster(*this);                      //...add this raw cluster  
 } else {                                                                               //or resonable number of local maxima to fit and user requested it
  // Now ready for minimization step
   arglist[0] = 500;                                                                      //number of steps and sigma on pads charges
   arglist[1] = 1.;                                                                       //

   ierflg = fitter->ExecuteCommand("SIMPLEX",arglist,2);                                  //start fitting with Simplex
   if (!ierflg)
     fitter->ExecuteCommand("MIGRAD" ,arglist,2);                                         //fitting improved by Migrad
   if(ierflg) {
     Double_t strategy=2;
     ierflg = fitter->ExecuteCommand("SET STR",&strategy,1);                              //change level of strategy 
     if(!ierflg) {
       ierflg = fitter->ExecuteCommand("SIMPLEX",arglist,2);                              //start fitting with Simplex
       if (!ierflg)
         fitter->ExecuteCommand("MIGRAD" ,arglist,2);                                     //fitting improved by Migrad
     }
   }        
   if(ierflg) fSt=kAbn;                                                                   //no convergence of the fit...
   Double_t dummy; char sName[80];                                                        //vars to get results from Minuit
   Double_t edm, errdef;
   Int_t nvpar, nparx;
   
   for(Int_t i=0;i<fNlocMax;i++){                                                        //store the local maxima parameters
     fitter->GetParameter(3*i   ,sName,  fXX, fErrX , dummy, dummy);                     // X
     fitter->GetParameter(3*i+1 ,sName,  fYY, fErrY , dummy, dummy);                     // Y
     fitter->GetParameter(3*i+2 ,sName,  fQ, fErrQ , dummy, dummy);                      // Q
     fitter->GetStats(fChi2, edm, errdef, nvpar, nparx);                                 //get fit infos

     if(fNlocMax>1)FindClusterSize(i,pSigmaCut);                                         //find clustersize for deconvoluted clusters
                                                                                         //after this call, fSi temporarly is the calculated size. Later is set again 
                                                                                         //to its original value
     if(fSt!=kAbn) {         
      if(fNlocMax!=1)fSt=kUnf;                                                           // if unfolded
      if(fNlocMax==1&&fSt!=kNoLoc) fSt=kLo1;                                             // if only 1 loc max
      if ( !IsInPc()) fSt = kEdg;                                                        // if Out of Pc
      if(fSt==kNoLoc) fNlocMax=0;                                                        // if with no loc max (pads with same charge..)
     }
     SetClusterParams(fXX,fYY,fCh);                                                      //need to fill the AliCluster3D part
     new ((*pCluLst)[iCluCnt++]) AliHMPIDCluster(*this);	                         //add new unfolded cluster
     if(fNlocMax>1)SetSize(rawSize);                                                     //Original raw size is set again to its proper value
   }
 }

 return fNlocMax;
 
}//Solve()
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void AliHMPIDCluster::FindClusterSize(Int_t i,Int_t *pSigmaCut)
{

//Estimate of the clustersize for a deconvoluted cluster
  Int_t size = 0;
  for(Int_t iDig=0;iDig<Size();iDig++) {                                               //digits loop
    AliHMPIDDigit *pDig = Dig(iDig);                                                   //take digit
    Int_t iCh = pDig->Ch();
    Double_t qPad = Q()*pDig->IntMathieson(X(),Y());                                   //pad charge
    AliDebug(1,Form("Chamber %i X %i Y %i SigmaCut %i pad %i qpadMath %8.2f qPadRaw %8.2f Qtotal %8.2f cluster n.%i",iCh,pDig->PadChX(),pDig->PadChY(),
        pSigmaCut[iCh],iDig,qPad,pDig->Q(),QRaw(),i));
    if(qPad>pSigmaCut[iCh]) size++;
   }
  AliDebug(1,Form(" Calculated size %i",size));
  if(size>0) SetSize(size);                                                            //in case of size == 0, original raw clustersize used 
}
 AliHMPIDCluster.cxx:1
 AliHMPIDCluster.cxx:2
 AliHMPIDCluster.cxx:3
 AliHMPIDCluster.cxx:4
 AliHMPIDCluster.cxx:5
 AliHMPIDCluster.cxx:6
 AliHMPIDCluster.cxx:7
 AliHMPIDCluster.cxx:8
 AliHMPIDCluster.cxx:9
 AliHMPIDCluster.cxx:10
 AliHMPIDCluster.cxx:11
 AliHMPIDCluster.cxx:12
 AliHMPIDCluster.cxx:13
 AliHMPIDCluster.cxx:14
 AliHMPIDCluster.cxx:15
 AliHMPIDCluster.cxx:16
 AliHMPIDCluster.cxx:17
 AliHMPIDCluster.cxx:18
 AliHMPIDCluster.cxx:19
 AliHMPIDCluster.cxx:20
 AliHMPIDCluster.cxx:21
 AliHMPIDCluster.cxx:22
 AliHMPIDCluster.cxx:23
 AliHMPIDCluster.cxx:24
 AliHMPIDCluster.cxx:25
 AliHMPIDCluster.cxx:26
 AliHMPIDCluster.cxx:27
 AliHMPIDCluster.cxx:28
 AliHMPIDCluster.cxx:29
 AliHMPIDCluster.cxx:30
 AliHMPIDCluster.cxx:31
 AliHMPIDCluster.cxx:32
 AliHMPIDCluster.cxx:33
 AliHMPIDCluster.cxx:34
 AliHMPIDCluster.cxx:35
 AliHMPIDCluster.cxx:36
 AliHMPIDCluster.cxx:37
 AliHMPIDCluster.cxx:38
 AliHMPIDCluster.cxx:39
 AliHMPIDCluster.cxx:40
 AliHMPIDCluster.cxx:41
 AliHMPIDCluster.cxx:42
 AliHMPIDCluster.cxx:43
 AliHMPIDCluster.cxx:44
 AliHMPIDCluster.cxx:45
 AliHMPIDCluster.cxx:46
 AliHMPIDCluster.cxx:47
 AliHMPIDCluster.cxx:48
 AliHMPIDCluster.cxx:49
 AliHMPIDCluster.cxx:50
 AliHMPIDCluster.cxx:51
 AliHMPIDCluster.cxx:52
 AliHMPIDCluster.cxx:53
 AliHMPIDCluster.cxx:54
 AliHMPIDCluster.cxx:55
 AliHMPIDCluster.cxx:56
 AliHMPIDCluster.cxx:57
 AliHMPIDCluster.cxx:58
 AliHMPIDCluster.cxx:59
 AliHMPIDCluster.cxx:60
 AliHMPIDCluster.cxx:61
 AliHMPIDCluster.cxx:62
 AliHMPIDCluster.cxx:63
 AliHMPIDCluster.cxx:64
 AliHMPIDCluster.cxx:65
 AliHMPIDCluster.cxx:66
 AliHMPIDCluster.cxx:67
 AliHMPIDCluster.cxx:68
 AliHMPIDCluster.cxx:69
 AliHMPIDCluster.cxx:70
 AliHMPIDCluster.cxx:71
 AliHMPIDCluster.cxx:72
 AliHMPIDCluster.cxx:73
 AliHMPIDCluster.cxx:74
 AliHMPIDCluster.cxx:75
 AliHMPIDCluster.cxx:76
 AliHMPIDCluster.cxx:77
 AliHMPIDCluster.cxx:78
 AliHMPIDCluster.cxx:79
 AliHMPIDCluster.cxx:80
 AliHMPIDCluster.cxx:81
 AliHMPIDCluster.cxx:82
 AliHMPIDCluster.cxx:83
 AliHMPIDCluster.cxx:84
 AliHMPIDCluster.cxx:85
 AliHMPIDCluster.cxx:86
 AliHMPIDCluster.cxx:87
 AliHMPIDCluster.cxx:88
 AliHMPIDCluster.cxx:89
 AliHMPIDCluster.cxx:90
 AliHMPIDCluster.cxx:91
 AliHMPIDCluster.cxx:92
 AliHMPIDCluster.cxx:93
 AliHMPIDCluster.cxx:94
 AliHMPIDCluster.cxx:95
 AliHMPIDCluster.cxx:96
 AliHMPIDCluster.cxx:97
 AliHMPIDCluster.cxx:98
 AliHMPIDCluster.cxx:99
 AliHMPIDCluster.cxx:100
 AliHMPIDCluster.cxx:101
 AliHMPIDCluster.cxx:102
 AliHMPIDCluster.cxx:103
 AliHMPIDCluster.cxx:104
 AliHMPIDCluster.cxx:105
 AliHMPIDCluster.cxx:106
 AliHMPIDCluster.cxx:107
 AliHMPIDCluster.cxx:108
 AliHMPIDCluster.cxx:109
 AliHMPIDCluster.cxx:110
 AliHMPIDCluster.cxx:111
 AliHMPIDCluster.cxx:112
 AliHMPIDCluster.cxx:113
 AliHMPIDCluster.cxx:114
 AliHMPIDCluster.cxx:115
 AliHMPIDCluster.cxx:116
 AliHMPIDCluster.cxx:117
 AliHMPIDCluster.cxx:118
 AliHMPIDCluster.cxx:119
 AliHMPIDCluster.cxx:120
 AliHMPIDCluster.cxx:121
 AliHMPIDCluster.cxx:122
 AliHMPIDCluster.cxx:123
 AliHMPIDCluster.cxx:124
 AliHMPIDCluster.cxx:125
 AliHMPIDCluster.cxx:126
 AliHMPIDCluster.cxx:127
 AliHMPIDCluster.cxx:128
 AliHMPIDCluster.cxx:129
 AliHMPIDCluster.cxx:130
 AliHMPIDCluster.cxx:131
 AliHMPIDCluster.cxx:132
 AliHMPIDCluster.cxx:133
 AliHMPIDCluster.cxx:134
 AliHMPIDCluster.cxx:135
 AliHMPIDCluster.cxx:136
 AliHMPIDCluster.cxx:137
 AliHMPIDCluster.cxx:138
 AliHMPIDCluster.cxx:139
 AliHMPIDCluster.cxx:140
 AliHMPIDCluster.cxx:141
 AliHMPIDCluster.cxx:142
 AliHMPIDCluster.cxx:143
 AliHMPIDCluster.cxx:144
 AliHMPIDCluster.cxx:145
 AliHMPIDCluster.cxx:146
 AliHMPIDCluster.cxx:147
 AliHMPIDCluster.cxx:148
 AliHMPIDCluster.cxx:149
 AliHMPIDCluster.cxx:150
 AliHMPIDCluster.cxx:151
 AliHMPIDCluster.cxx:152
 AliHMPIDCluster.cxx:153
 AliHMPIDCluster.cxx:154
 AliHMPIDCluster.cxx:155
 AliHMPIDCluster.cxx:156
 AliHMPIDCluster.cxx:157
 AliHMPIDCluster.cxx:158
 AliHMPIDCluster.cxx:159
 AliHMPIDCluster.cxx:160
 AliHMPIDCluster.cxx:161
 AliHMPIDCluster.cxx:162
 AliHMPIDCluster.cxx:163
 AliHMPIDCluster.cxx:164
 AliHMPIDCluster.cxx:165
 AliHMPIDCluster.cxx:166
 AliHMPIDCluster.cxx:167
 AliHMPIDCluster.cxx:168
 AliHMPIDCluster.cxx:169
 AliHMPIDCluster.cxx:170
 AliHMPIDCluster.cxx:171
 AliHMPIDCluster.cxx:172
 AliHMPIDCluster.cxx:173
 AliHMPIDCluster.cxx:174
 AliHMPIDCluster.cxx:175
 AliHMPIDCluster.cxx:176
 AliHMPIDCluster.cxx:177
 AliHMPIDCluster.cxx:178
 AliHMPIDCluster.cxx:179
 AliHMPIDCluster.cxx:180
 AliHMPIDCluster.cxx:181
 AliHMPIDCluster.cxx:182
 AliHMPIDCluster.cxx:183
 AliHMPIDCluster.cxx:184
 AliHMPIDCluster.cxx:185
 AliHMPIDCluster.cxx:186
 AliHMPIDCluster.cxx:187
 AliHMPIDCluster.cxx:188
 AliHMPIDCluster.cxx:189
 AliHMPIDCluster.cxx:190
 AliHMPIDCluster.cxx:191
 AliHMPIDCluster.cxx:192
 AliHMPIDCluster.cxx:193
 AliHMPIDCluster.cxx:194
 AliHMPIDCluster.cxx:195
 AliHMPIDCluster.cxx:196
 AliHMPIDCluster.cxx:197
 AliHMPIDCluster.cxx:198
 AliHMPIDCluster.cxx:199
 AliHMPIDCluster.cxx:200
 AliHMPIDCluster.cxx:201
 AliHMPIDCluster.cxx:202
 AliHMPIDCluster.cxx:203
 AliHMPIDCluster.cxx:204
 AliHMPIDCluster.cxx:205
 AliHMPIDCluster.cxx:206
 AliHMPIDCluster.cxx:207
 AliHMPIDCluster.cxx:208
 AliHMPIDCluster.cxx:209
 AliHMPIDCluster.cxx:210
 AliHMPIDCluster.cxx:211
 AliHMPIDCluster.cxx:212
 AliHMPIDCluster.cxx:213
 AliHMPIDCluster.cxx:214
 AliHMPIDCluster.cxx:215
 AliHMPIDCluster.cxx:216
 AliHMPIDCluster.cxx:217
 AliHMPIDCluster.cxx:218
 AliHMPIDCluster.cxx:219
 AliHMPIDCluster.cxx:220
 AliHMPIDCluster.cxx:221
 AliHMPIDCluster.cxx:222
 AliHMPIDCluster.cxx:223
 AliHMPIDCluster.cxx:224
 AliHMPIDCluster.cxx:225
 AliHMPIDCluster.cxx:226
 AliHMPIDCluster.cxx:227
 AliHMPIDCluster.cxx:228
 AliHMPIDCluster.cxx:229
 AliHMPIDCluster.cxx:230
 AliHMPIDCluster.cxx:231
 AliHMPIDCluster.cxx:232
 AliHMPIDCluster.cxx:233
 AliHMPIDCluster.cxx:234
 AliHMPIDCluster.cxx:235
 AliHMPIDCluster.cxx:236
 AliHMPIDCluster.cxx:237
 AliHMPIDCluster.cxx:238
 AliHMPIDCluster.cxx:239
 AliHMPIDCluster.cxx:240
 AliHMPIDCluster.cxx:241
 AliHMPIDCluster.cxx:242
 AliHMPIDCluster.cxx:243
 AliHMPIDCluster.cxx:244
 AliHMPIDCluster.cxx:245
 AliHMPIDCluster.cxx:246
 AliHMPIDCluster.cxx:247
 AliHMPIDCluster.cxx:248
 AliHMPIDCluster.cxx:249
 AliHMPIDCluster.cxx:250
 AliHMPIDCluster.cxx:251
 AliHMPIDCluster.cxx:252
 AliHMPIDCluster.cxx:253
 AliHMPIDCluster.cxx:254
 AliHMPIDCluster.cxx:255
 AliHMPIDCluster.cxx:256
 AliHMPIDCluster.cxx:257
 AliHMPIDCluster.cxx:258
 AliHMPIDCluster.cxx:259
 AliHMPIDCluster.cxx:260
 AliHMPIDCluster.cxx:261
 AliHMPIDCluster.cxx:262
 AliHMPIDCluster.cxx:263
 AliHMPIDCluster.cxx:264
 AliHMPIDCluster.cxx:265
 AliHMPIDCluster.cxx:266
 AliHMPIDCluster.cxx:267
 AliHMPIDCluster.cxx:268
 AliHMPIDCluster.cxx:269
 AliHMPIDCluster.cxx:270
 AliHMPIDCluster.cxx:271
 AliHMPIDCluster.cxx:272
 AliHMPIDCluster.cxx:273
 AliHMPIDCluster.cxx:274
 AliHMPIDCluster.cxx:275
 AliHMPIDCluster.cxx:276
 AliHMPIDCluster.cxx:277
 AliHMPIDCluster.cxx:278
 AliHMPIDCluster.cxx:279
 AliHMPIDCluster.cxx:280
 AliHMPIDCluster.cxx:281
 AliHMPIDCluster.cxx:282
 AliHMPIDCluster.cxx:283
 AliHMPIDCluster.cxx:284
 AliHMPIDCluster.cxx:285
 AliHMPIDCluster.cxx:286
 AliHMPIDCluster.cxx:287
 AliHMPIDCluster.cxx:288
 AliHMPIDCluster.cxx:289
 AliHMPIDCluster.cxx:290
 AliHMPIDCluster.cxx:291
 AliHMPIDCluster.cxx:292
 AliHMPIDCluster.cxx:293
 AliHMPIDCluster.cxx:294
 AliHMPIDCluster.cxx:295
 AliHMPIDCluster.cxx:296
 AliHMPIDCluster.cxx:297
 AliHMPIDCluster.cxx:298
 AliHMPIDCluster.cxx:299
 AliHMPIDCluster.cxx:300
 AliHMPIDCluster.cxx:301
 AliHMPIDCluster.cxx:302
 AliHMPIDCluster.cxx:303
 AliHMPIDCluster.cxx:304
 AliHMPIDCluster.cxx:305
 AliHMPIDCluster.cxx:306
 AliHMPIDCluster.cxx:307
 AliHMPIDCluster.cxx:308
 AliHMPIDCluster.cxx:309
 AliHMPIDCluster.cxx:310
 AliHMPIDCluster.cxx:311
 AliHMPIDCluster.cxx:312
 AliHMPIDCluster.cxx:313
 AliHMPIDCluster.cxx:314
 AliHMPIDCluster.cxx:315
 AliHMPIDCluster.cxx:316
 AliHMPIDCluster.cxx:317
 AliHMPIDCluster.cxx:318
 AliHMPIDCluster.cxx:319
 AliHMPIDCluster.cxx:320
 AliHMPIDCluster.cxx:321
 AliHMPIDCluster.cxx:322
 AliHMPIDCluster.cxx:323
 AliHMPIDCluster.cxx:324
 AliHMPIDCluster.cxx:325
 AliHMPIDCluster.cxx:326
 AliHMPIDCluster.cxx:327
 AliHMPIDCluster.cxx:328
 AliHMPIDCluster.cxx:329
 AliHMPIDCluster.cxx:330
 AliHMPIDCluster.cxx:331
 AliHMPIDCluster.cxx:332
 AliHMPIDCluster.cxx:333
 AliHMPIDCluster.cxx:334
 AliHMPIDCluster.cxx:335
 AliHMPIDCluster.cxx:336
 AliHMPIDCluster.cxx:337
 AliHMPIDCluster.cxx:338
 AliHMPIDCluster.cxx:339
 AliHMPIDCluster.cxx:340
 AliHMPIDCluster.cxx:341
 AliHMPIDCluster.cxx:342
 AliHMPIDCluster.cxx:343
 AliHMPIDCluster.cxx:344
 AliHMPIDCluster.cxx:345
 AliHMPIDCluster.cxx:346
 AliHMPIDCluster.cxx:347
 AliHMPIDCluster.cxx:348
 AliHMPIDCluster.cxx:349
 AliHMPIDCluster.cxx:350
 AliHMPIDCluster.cxx:351
 AliHMPIDCluster.cxx:352
 AliHMPIDCluster.cxx:353
 AliHMPIDCluster.cxx:354
 AliHMPIDCluster.cxx:355
 AliHMPIDCluster.cxx:356
 AliHMPIDCluster.cxx:357
 AliHMPIDCluster.cxx:358
 AliHMPIDCluster.cxx:359
 AliHMPIDCluster.cxx:360
 AliHMPIDCluster.cxx:361
 AliHMPIDCluster.cxx:362
 AliHMPIDCluster.cxx:363
 AliHMPIDCluster.cxx:364
 AliHMPIDCluster.cxx:365
 AliHMPIDCluster.cxx:366
 AliHMPIDCluster.cxx:367
 AliHMPIDCluster.cxx:368
 AliHMPIDCluster.cxx:369
 AliHMPIDCluster.cxx:370
 AliHMPIDCluster.cxx:371
 AliHMPIDCluster.cxx:372
 AliHMPIDCluster.cxx:373
 AliHMPIDCluster.cxx:374
 AliHMPIDCluster.cxx:375
 AliHMPIDCluster.cxx:376
 AliHMPIDCluster.cxx:377
 AliHMPIDCluster.cxx:378
 AliHMPIDCluster.cxx:379
 AliHMPIDCluster.cxx:380
 AliHMPIDCluster.cxx:381
 AliHMPIDCluster.cxx:382
 AliHMPIDCluster.cxx:383
 AliHMPIDCluster.cxx:384
 AliHMPIDCluster.cxx:385
 AliHMPIDCluster.cxx:386
 AliHMPIDCluster.cxx:387
 AliHMPIDCluster.cxx:388
 AliHMPIDCluster.cxx:389
 AliHMPIDCluster.cxx:390
 AliHMPIDCluster.cxx:391
 AliHMPIDCluster.cxx:392
 AliHMPIDCluster.cxx:393
 AliHMPIDCluster.cxx:394
 AliHMPIDCluster.cxx:395
 AliHMPIDCluster.cxx:396
 AliHMPIDCluster.cxx:397
 AliHMPIDCluster.cxx:398
 AliHMPIDCluster.cxx:399
 AliHMPIDCluster.cxx:400
 AliHMPIDCluster.cxx:401
 AliHMPIDCluster.cxx:402
 AliHMPIDCluster.cxx:403
 AliHMPIDCluster.cxx:404
 AliHMPIDCluster.cxx:405
 AliHMPIDCluster.cxx:406
 AliHMPIDCluster.cxx:407
 AliHMPIDCluster.cxx:408
 AliHMPIDCluster.cxx:409
 AliHMPIDCluster.cxx:410
 AliHMPIDCluster.cxx:411
 AliHMPIDCluster.cxx:412
 AliHMPIDCluster.cxx:413
 AliHMPIDCluster.cxx:414