HTA (Hidden track algorithm) improved+minors
authordibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 May 2007 16:35:17 +0000 (16:35 +0000)
committerdibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 8 May 2007 16:35:17 +0000 (16:35 +0000)
HMPID/AliHMPIDRecon.cxx
HMPID/AliHMPIDRecon.h
HMPID/AliHMPIDReconstructor.cxx
HMPID/AliHMPIDTracker.cxx
HMPID/AliHMPIDTracker.h
HMPID/Hconfig.C

index 41a820d..0173f0a 100644 (file)
@@ -53,6 +53,12 @@ AliHMPIDRecon::AliHMPIDRecon():TTask("RichRec","RichPat"),
     fPhotPhi [i] = -1;
     fPhotWei [i] =  0;
   }
+//hidden algorithm
+  fMipX=fMipY=fThTrkFit=fPhTrkFit=fCkovFit=-999;
+  fIdxMip=fNClu=0;
+  for (Int_t i=0; i<1000; i++) {
+    fXClu[i] = fYClu[i] = 0;
+  }
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 void AliHMPIDRecon::CkovAngle(AliESDtrack *pTrk,TClonesArray *pCluLst,Double_t nmean)
@@ -67,10 +73,10 @@ void AliHMPIDRecon::CkovAngle(AliESDtrack *pTrk,TClonesArray *pCluLst,Double_t n
   if(pCluLst->GetEntries()>pParam->MultCut()) fIsWEIGHT = kTRUE; // offset to take into account bkg in reconstruction
   else                                        fIsWEIGHT = kFALSE;
 
-  Float_t xRa,yRa,th,ph;       
+  Float_t xRa,yRa,th,ph;
   pTrk->GetHMPIDtrk(xRa,yRa,th,ph);        //initialize this track: th and ph angles at middle of RAD 
   SetTrack(xRa,yRa,th,ph);
-  
+
   fRadNmean=nmean;
 
   Float_t dMin=999,mipX=-1,mipY=-1;Int_t chId=-1,mipId=-1,mipQ=-1;                                                                           
@@ -98,7 +104,7 @@ void AliHMPIDRecon::CkovAngle(AliESDtrack *pTrk,TClonesArray *pCluLst,Double_t n
   pTrk->SetHMPIDcluIdx(chId,mipId);                                                           //set index of cluster
   if(iNacc<1)    pTrk->SetHMPIDsignal(kNoPhotAccept);                                         //no photon candidates is accepted
   else           pTrk->SetHMPIDsignal(FindRingCkov(pCluLst->GetEntries()));                   //find best Theta ckov for ring i.e. track
-  
+
   pTrk->SetHMPIDchi2(fCkovSigma2);                                                            //errors squared 
 
 }//CkovAngle()
@@ -297,7 +303,8 @@ void AliHMPIDRecon::Refract(TVector3 &dir,Double_t n1,Double_t n2)const
 Double_t AliHMPIDRecon::HoughResponse()
 {
 //
-//
+//    fIdxMip = mipId;
+
 //       
   Double_t kThetaMax=0.75;
   Int_t nChannels = (Int_t)(kThetaMax/fDTheta+0.5);
@@ -429,32 +436,20 @@ Double_t AliHMPIDRecon::SigGeom(Double_t thetaC, Double_t phiC,Double_t betaM)co
 }//SigGeom()
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 //
-//
-//
-//
-//
-//
-//
-//
-//
-//
-//
-// From here Hidden track algorithm....
-//
-//
-//
-//
-//
-//
+// From here HTA....
 //
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-void AliHMPIDRecon::CkovHiddenTrk(TClonesArray *pCluLst,Double_t nmean)
+Int_t AliHMPIDRecon::CkovHiddenTrk(AliESDtrack *pTrk,TClonesArray *pCluLst,Double_t nmean)
 {
-// Pattern recognition method without any infos from tracking...
+// Pattern recognition method without any infos from tracking:HTA (Hidden Track Algorithm)...
 // The method finds in the chmber the cluster with the highest charge
 // compatibile with a MIP, then the strategy is applied
-// Arguments:  pCluLst  - list of clusters for this chamber   
-//   Returns:           - track ckov angle, [rad], 
+// Arguments:  pTrk     - pointer to ESD track
+//             pCluLs   - list of clusters for a given chamber 
+//             nmean    - mean freon ref. index
+//   Returns:           - 0=ok,1=not fitted 
+  
+  AliHMPIDParam *pParam=AliHMPIDParam::Instance();
     
   fRadNmean=nmean;
 
@@ -470,27 +465,32 @@ void AliHMPIDRecon::CkovHiddenTrk(TClonesArray *pCluLst,Double_t nmean)
       mipId=iClu; mipX=pClu->X();mipY=pClu->Y();mipQ=(Int_t)pClu->Q();
     }                                                                                    
   }//clusters loop
-  
-  fIdxMip = mipId;
-  fMipX = mipX; fMipY=mipY;
-  DoRecHiddenTrk();  
 
+  if(qRef>pParam->QCut()){                                                                       //charge compartible with MIP clusters      
+    fIdxMip = mipId;
+    fMipX = mipX; fMipY=mipY; fMipQ = qRef;
+    if(!DoRecHiddenTrk()) return 1;                                                               //Do track and ring reconstruction,if problems returns 1
+    pTrk->SetHMPIDtrk(fRadX,fRadY,fThTrkFit,fPhTrkFit);                                          //store track intersection info
+    pTrk->SetHMPIDmip(fMipX,fMipY,(Int_t)fMipQ,fNClu);                                           //store mip info 
+    pTrk->SetHMPIDcluIdx(pCluLst->GetUniqueID(),fIdxMip);                                        //set cham number and index of cluster
+    pTrk->SetHMPIDsignal(fCkovFit);                                                              //find best Theta ckov for ring i.e. track
+  }
+  return 0;
 }//CkovHiddenTrk()
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-void AliHMPIDRecon::DoRecHiddenTrk()
+Bool_t AliHMPIDRecon::DoRecHiddenTrk()
 {
 // Pattern recognition method without any infos from tracking...
-// Before a preclustering filter to avoid part of the noise
+// First a preclustering filter to avoid part of the noise
 // Then only ellipsed-rings are fitted (no possibility, 
-// for the moment, to reconstruct very inclined tracks
-// Finally a fitting with (th,ph) free starting by very close values
+// for the moment, to reconstruct very inclined tracks)
+// Finally a fitting with (th,ph) free, starting by very close values
 // previously evaluated.
 // Arguments:   none
 //   Returns:   none
   Double_t phiRec;
   CluPreFilter();
-  if(!FitEllipse(phiRec)) {Printf("Not an ellipse, bye!");return;}
-  Printf("--->now it starts the free fit with phi = %f",phiRec*TMath::RadToDeg());
+  if(!FitEllipse(phiRec)) {return kFALSE;}
   return FitFree(phiRec);
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@@ -527,9 +527,9 @@ Bool_t AliHMPIDRecon::FitEllipse(Double_t &phiRec)
   //       AB - H^2
   
   Double_t cA,cB,cF,cG,cH;
-  Double_t aArg=-1,parStep,parLow,parHigh;      Int_t iErrFlg;                         //tmp vars for TMinuit
+  Double_t aArg=-1;      Int_t iErrFlg;                                                //tmp vars for TMinuit
 
-  if(!gMinuit) gMinuit = new TMinuit(100);                                             //init MINUIT with this number of parameters (5 params)
+  if(!gMinuit) gMinuit = new TMinuit(5);                                               //init MINUIT with this number of parameters (5 params)
   gMinuit->mncler();                                                                   // reset Minuit list of paramters
   gMinuit->SetObjectFit((TObject*)this);  gMinuit->SetFCN(AliHMPIDRecon::FunMinEl);    //set fit function
   gMinuit->mnexcm("SET PRI",&aArg,1,iErrFlg);                                          //suspend all printout from TMinuit 
@@ -538,11 +538,11 @@ Bool_t AliHMPIDRecon::FitEllipse(Double_t &phiRec)
   Double_t d1,d2,d3;
   TString sName;
 
-  gMinuit->mnparm(0," A ",1,parStep=0.01,parLow=0,parHigh=0,iErrFlg);
-  gMinuit->mnparm(1," B ",1,parStep=0.01,parLow=0,parHigh=0,iErrFlg);
-  gMinuit->mnparm(2," H ",1,parStep=0.01,parLow=0,parHigh=0,iErrFlg);
-  gMinuit->mnparm(3," G ",1,parStep=0.01,parLow=0,parHigh=0,iErrFlg);
-  gMinuit->mnparm(4," F ",1,parStep=0.01,parLow=0,parHigh=0,iErrFlg);
+  gMinuit->mnparm(0," A ",1,0.01,0,0,iErrFlg);
+  gMinuit->mnparm(1," B ",1,0.01,0,0,iErrFlg);
+  gMinuit->mnparm(2," H ",1,0.01,0,0,iErrFlg);
+  gMinuit->mnparm(3," G ",1,0.01,0,0,iErrFlg);
+  gMinuit->mnparm(4," F ",1,0.01,0,0,iErrFlg);
 
   gMinuit->mnexcm("SIMPLEX" ,&aArg,0,iErrFlg);
   gMinuit->mnexcm("MIGRAD" ,&aArg,0,iErrFlg);   
@@ -575,7 +575,7 @@ Bool_t AliHMPIDRecon::FitEllipse(Double_t &phiRec)
 //
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-void AliHMPIDRecon::FitFree(Double_t phiRec)
+Bool_t AliHMPIDRecon::FitFree(Double_t phiRec)
 {
 // Fit performed by minimizing RMS/sqrt(n) of the
 // photons reconstructed. First phi is fixed and theta
@@ -583,8 +583,8 @@ void AliHMPIDRecon::FitFree(Double_t phiRec)
 // as free parameters
 // Arguments:    PhiRec phi of the track
 //   Returns:    none
-  Double_t aArg=-1,parStep,parLow,parHigh;              Int_t iErrFlg;                 //tmp vars for TMinuit
-  if(!gMinuit) gMinuit = new TMinuit(100);                                             //init MINUIT with this number of parameters (5 params)
+  Double_t aArg=-1;  Int_t iErrFlg;                                                    //tmp vars for TMinuit
+  if(!gMinuit) gMinuit = new TMinuit(2);                                               //init MINUIT with this number of parameters (5 params)
   gMinuit->mncler();                                                                   // reset Minuit list of paramters
   gMinuit->SetObjectFit((TObject*)this);  gMinuit->SetFCN(AliHMPIDRecon::FunMinPhot);  //set fit function
   gMinuit->mnexcm("SET PRI",&aArg,1,iErrFlg);                                          //suspend all printout from TMinuit 
@@ -597,8 +597,8 @@ void AliHMPIDRecon::FitFree(Double_t phiRec)
   gMinuit->mnexcm("SET PRI",&aArg,1,iErrFlg);                                          //suspend all printout from TMinuit
   gMinuit->mnexcm("SET NOW",&aArg,0,iErrFlg);
 
-  gMinuit->mnparm(0," theta ",0.01,parStep=0.01,parLow=0,parHigh=TMath::PiOver2(),iErrFlg);
-  gMinuit->mnparm(1," phi   ",phiRec,parStep=0.01,parLow=0,parHigh=TMath::TwoPi(),iErrFlg);
+  gMinuit->mnparm(0," theta ",  0.01,0.01,0,TMath::PiOver2(),iErrFlg);
+  gMinuit->mnparm(1," phi   ",phiRec,0.01,0,TMath::TwoPi()  ,iErrFlg);
   
   gMinuit->FixParameter(1);
   gMinuit->mnexcm("SIMPLEX" ,&aArg,0,iErrFlg);   
@@ -608,8 +608,13 @@ void AliHMPIDRecon::FitFree(Double_t phiRec)
   
   gMinuit->mnpout(0,sName,th,d1,d2,d3,iErrFlg);
   gMinuit->mnpout(1,sName,ph,d1,d2,d3,iErrFlg);   
+
+  Double_t outPar[2] = {th,ph}; Double_t g; Double_t f;Int_t flag = 3;
+  gMinuit->Eval(2, &g, f, outPar,flag);  
+
+  SetTrkFit(th,ph);
   
-  Printf(" reconstr. theta %f  phi %f",th*TMath::RadToDeg(),ph*TMath::RadToDeg());
+  return kTRUE;
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Double_t AliHMPIDRecon::FunConSect(Double_t *c,Double_t x,Double_t y)
@@ -630,16 +635,15 @@ void AliHMPIDRecon::FunMinEl(Int_t &/* */,Double_t* /* */,Double_t &f,Double_t *
   f = minFun;
 }
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-void AliHMPIDRecon::FunMinPhot(Int_t &/* */,Double_t* /* */,Double_t &f,Double_t *par,Int_t /* */)
+void AliHMPIDRecon::FunMinPhot(Int_t &/* */,Double_t* /* */,Double_t &f,Double_t *par,Int_t iflag)
 {
   AliHMPIDRecon *pRec=(AliHMPIDRecon*)gMinuit->GetObjectFit();
-  
-  Double_t sizeCh = fgkRadThick+fgkWinThick+fgkGapThick;
+  Double_t sizeCh = 0.5*fgkRadThick+fgkWinThick+fgkGapThick;
   Double_t thTrk = par[0]; 
   Double_t phTrk = par[1]; 
   Double_t xrad = pRec->MipX() - sizeCh*TMath::Tan(thTrk)*TMath::Cos(phTrk);
   Double_t yrad = pRec->MipY() - sizeCh*TMath::Tan(thTrk)*TMath::Sin(phTrk);
-  
+  pRec->SetRadXY(xrad,yrad);
   pRec->SetTrack(xrad,yrad,thTrk,phTrk);
 
   Double_t meanCkov=0;
@@ -654,5 +658,12 @@ void AliHMPIDRecon::FunMinPhot(Int_t &/* */,Double_t* /* */,Double_t &f,Double_t
   meanCkov/=pRec->NClu();
   Double_t rms = TMath::Sqrt(meanCkov2/pRec->NClu() - meanCkov*meanCkov);
   f = rms/TMath::Sqrt(pRec->NClu());
-  pRec->SetCkovFit(meanCkov);
+  Printf(" mean %f rms/sqrt(n) %f",meanCkov,f);  
+  if(iflag==3) pRec->SetCkovFit(meanCkov);
+  
 }//FunMinPhot()
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+//
+// ended Hidden track algorithm....
+//
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
index b3743f4..2460e0d 100644 (file)
@@ -25,7 +25,7 @@ public :
              AliHMPIDRecon();
     virtual ~AliHMPIDRecon()                                                          {}
 
-  
+
   void     CkovAngle    (AliESDtrack *pTrk,TClonesArray *pCluLst,Double_t nmean             );     //reconstructed Theta Cerenkov
   Bool_t   FindPhotCkov (Double_t cluX,Double_t cluY,Double_t &thetaCer,Double_t &phiCer    );     //find ckov angle for single photon candidate
   Double_t FindRingCkov (Int_t iNclus                                                       );     //best ckov for ring formed by found photon candidates
@@ -46,20 +46,24 @@ public :
   Double_t SigCrom      (Double_t ckovTh,Double_t ckovPh,Double_t beta                      )const;//error due to unknonw photon energy
   Double_t Sigma2       (Double_t ckovTh,Double_t ckovPh                                    )const;//photon candidate sigma
   enum ETrackingFlags {kMipDistCut=-9,kMipQdcCut=-5,kNoPhotAccept=-11};
-// hidden track algorithm
-  void     CkovHiddenTrk    (TClonesArray *pCluLst,Double_t nmean);                                //Pattern recognition without trackinf information
+// HTA hidden track algorithm
+  Int_t    CkovHiddenTrk    (AliESDtrack *pTrk,TClonesArray *pCluLst,Double_t nmean);              //Pattern recognition without trackinf information
   void     CluPreFilter     (                                    );                                //Pre clustering filter to cut bkg clusters
-  void     DoRecHiddenTrk   (                                    );                                //Calling to the fitted procedures
+  Bool_t   DoRecHiddenTrk   (                                    );                                //Calling to the fitted procedures
   Bool_t   FitEllipse       (Double_t &phiRec                    );                                //Fit clusters with a conical section (kTRUE only for ellipses)
-  void     FitFree          (Double_t phiRec                     );                                //Fit (th,ph) of the track and ckovFit as result
+  Bool_t   FitFree          (Double_t phiRec                     );                                //Fit (th,ph) of the track and ckovFit as result
   Double_t FunConSect       (Double_t *c,Double_t x,Double_t y   );                                //Function of a general conical section
   void     SetCkovFit       (Double_t ckov                       ) {fCkovFit=ckov;}                //Setter for ckof fitted
   void     SetTrkFit        (Double_t th,Double_t ph             ) {fThTrkFit = th;fPhTrkFit = ph;}//Setter for (th,ph) of the track
+  void     SetRadXY         (Double_t  x,Double_t y              ) {fRadX = x;fRadY = y;}          //Setter for (th,ph) of the track
   static void     FunMinEl  (Int_t&/* */,Double_t* /* */,Double_t &f,Double_t *par,Int_t /* */);   //Fit function to find ellipes parameters
-  static void     FunMinPhot(Int_t&/* */,Double_t* /* */,Double_t &f,Double_t *par,Int_t /* */);   //Fit function to minimize thetaCer RMS/Sqrt(n) of n clusters
+  static void     FunMinPhot(Int_t&/* */,Double_t* /* */,Double_t &f,Double_t *par,Int_t iflag);   //Fit function to minimize thetaCer RMS/Sqrt(n) of n clusters
   Int_t    IdxMip       ()const {return fIdxMip;}                                                  //Getter index of MIP
   Double_t MipX         ()const {return fMipX;}                                                    //Getter of x MIP in LORS
   Double_t MipY         ()const {return fMipY;}                                                    //Getter of y MIP in LORS
+  Double_t MipQ         ()const {return fMipQ;}                                                    //Getter of Q MIP
+  Double_t RadX         ()const {return fRadX;}                                                    //Getter of x at RAD in LORS
+  Double_t RadY         ()const {return fRadY;}                                                    //Getter of y at RAD in LORS
   Int_t    NClu         ()const {return fNClu;}                                                    //Getter of cluster multiplicity
   Double_t XClu         (Int_t i)const {return fXClu[i];}                                          //Getter of x clu
   Double_t YClu         (Int_t i)const {return fYClu[i];}                                          //Getter of y clu
@@ -83,9 +87,12 @@ protected:
   TVector3 fTrkDir;                            //track direction in LORS at RAD
   TVector2 fTrkPos;                            //track positon in LORS at RAD
   TVector2 fPc;                                //track position at PC
-// hidden track algorithm
+// HTA hidden track algorithm
   Double_t fMipX;                              //mip X position for Hidden Track Algorithm  
   Double_t fMipY;                              //mip Y position for Hidden Track Algorithm
+  Double_t fMipQ;                              //mip Q          for Hidden Track Algorithm
+  Double_t fRadX;                              //rad X position for Hidden Track Algorithm  
+  Double_t fRadY;                              //rad Y position for Hidden Track Algorithm
   Int_t    fIdxMip;                            //mip index in the clus list
   Int_t    fNClu;                              //n clusters to fit
   Double_t fXClu[1000];                        //container for x clus position
@@ -94,13 +101,13 @@ protected:
   Double_t fPhTrkFit;                          //phi   fitted of the track
   Double_t fCkovFit;                           //estimated ring Cherenkov angle
 //
-private:  
+private:
   static const Double_t fgkRadThick;                      //radiator thickness
   static const Double_t fgkWinThick;                      //window thickness
   static const Double_t fgkGapThick;                      //proximity gap thickness
   static const Double_t fgkWinIdx;                        //mean refractive index of WIN material (SiO2) 
   static const Double_t fgkGapIdx;                        //mean refractive index of GAP material (CH4)
-  
+
   ClassDef(AliHMPIDRecon,0)
 };
 
index 35e4d08..2d717d8 100644 (file)
@@ -39,7 +39,9 @@ AliHMPIDReconstructor::AliHMPIDReconstructor():AliReconstructor(),fUserCut(0),fD
 
   for(int i=AliHMPIDDigit::kMinCh;i<=AliHMPIDDigit::kMaxCh;i++){ 
     fDig->AddAt(new TClonesArray("AliHMPIDDigit"),i);
-    fClu->AddAt(new TClonesArray("AliHMPIDCluster"),i);
+    TClonesArray *pClus = new TClonesArray("AliHMPIDCluster");
+    pClus->SetUniqueID(i);
+    fClu->AddAt(pClus,i);
   }
   
   AliCDBEntry *pUserCutEnt =AliCDBManager::Instance()->Get("HMPID/Calib/UserCut");    //contains TObjArray of 14 TObject with n. of sigmas to cut charge 
index a13b1e2..52ea913 100644 (file)
@@ -86,7 +86,7 @@ Int_t AliHMPIDTracker::PropagateBack(AliESD *pEsd)
   if(!pQthreEnt) AliFatal("No Qthre");
     
   return Recon(pEsd,fClu,(TObjArray*)pNmeanEnt->GetObject());  
-}
+}//PropagateBack()
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 Int_t AliHMPIDTracker::Recon(AliESD *pEsd,TObjArray *pClus,TObjArray *pNmean)
 {
@@ -104,5 +104,18 @@ Int_t AliHMPIDTracker::Recon(AliESD *pEsd,TObjArray *pClus,TObjArray *pNmean)
     recon.CkovAngle(pTrk,(TClonesArray *)pClus->At(cham),nmean);                                 //search for Cerenkov angle of this track
   }                                                                                              //ESD tracks loop
   return 0; // error code: 0=no error;
-}//PropagateBack()
+}//Recon()
+//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+Int_t AliHMPIDTracker::ReconHiddenTrk(Int_t iCh,AliESDtrack *pTrk,TObjArray *pClusObj,TObjArray *pNmean)
+{
+// Static method to reconstruct Theta Ckov for all valid tracks of a given event.
+// Arguments: pEsd- pointer ESD; pClu- pointer to clusters for all chambers; pNmean - pointer to all function Nmean=f(time)
+//   Returns: error code, 0 if no errors
+  AliHMPIDRecon recon;                                                                          //instance of reconstruction class, nothing important in ctor
+  Double_t nmean=((TF1*)pNmean->At(3*iCh))->Eval(0);                                            //C6F14 Nmean for this chamber
+  TClonesArray *pCluLst = (TClonesArray *)pClusObj->At(iCh);
+  if(pCluLst->GetEntriesFast()<4) return 1;                                                     //min 4 clusters (3 + 1 mip) to find a ring! 
+  return recon.CkovHiddenTrk(pTrk,pCluLst,nmean);                                               //search for track parameters and Cerenkov angle of this track
+                                                                                                // error code: 0=no error,1=fit not performed;
+}//Recon()
 //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
index 5750fb2..70156de 100644 (file)
@@ -25,8 +25,9 @@ public:
          Int_t       RefitInward    (AliESD *                   )       {return 0;} //pure virtual from AliTracker 
          void        UnloadClusters (                           )       {         } //pure virtual from AliTracker 
 //private part  
-  static Int_t       IntTrkCha(AliESDtrack *pTrk,Float_t &xPc,Float_t &yPc        );//find track-PC intersection, retuns chamber ID
-  static Int_t       Recon    (AliESD *pEsd,TObjArray *pCluAll,TObjArray *pNmean=0);//do actual job, returns status code  
+  static Int_t       IntTrkCha     (AliESDtrack *pTrk,Float_t &xPc,Float_t &yPc        );           //find track-PC intersection, retuns chamber ID
+  static Int_t       Recon         (AliESD *pEsd,TObjArray *pCluAll,TObjArray *pNmean=0);           //do actual job, returns status code  
+  static Int_t       ReconHiddenTrk(Int_t iCh,AliESDtrack *pTrk,TObjArray *pClus,TObjArray *pNmean);//do actual job with Hidden Track Algorithm    
 protected:
   TObjArray            *fClu;                     //! each chamber holds it's one list of clusters 
 ClassDef(AliHMPIDTracker,0)
index 6e49d3d..054e34a 100644 (file)
@@ -698,7 +698,7 @@ void HmpConfig::WriteConfig()
   WritePhys(pF); //physics processes
   
 //Field
-       if(fMagBG->GetButton(kFld0)->GetState())     fprintf(pF,"  gAlice->SetField(0);        //no field\n\n");
+       if(fMagBG->GetButton(kFld0)->GetState())     fprintf(pF,"  gAlice->SetField(new AliMagFMaps(\"Maps\",\"Maps\",0,1,10,0));       //no field\n\n");
   else if(fMagBG->GetButton(kFld2)->GetState())     fprintf(pF,"  gAlice->SetField(new AliMagFMaps(\"Maps\",\"Maps\",2,1,10,0));//0.2 Tesla field\n\n");
   else if(fMagBG->GetButton(kFld4)->GetState())     fprintf(pF,"  gAlice->SetField(new AliMagFMaps(\"Maps\",\"Maps\",2,1,10,1));//0.4 Tesla field\n\n");
   else if(fMagBG->GetButton(kFld5)->GetState())     fprintf(pF,"  gAlice->SetField(new AliMagFMaps(\"Maps\",\"Maps\",2,1,10,2));//0.5 Tesla field\n\n");