MIP cluster size added (compacted word) and infos re-arranganged in HMPID
authordibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Aug 2008 11:07:35 +0000 (11:07 +0000)
committerdibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 19 Aug 2008 11:07:35 +0000 (11:07 +0000)
HMPID/AliHMPIDRecon.cxx
HMPID/AliHMPIDReconHTA.cxx

index 7af3e5b..820e818 100644 (file)
@@ -102,14 +102,16 @@ void AliHMPIDRecon::CkovAngle(AliESDtrack *pTrk,TClonesArray *pCluLst,Double_t n
 
   fParam->SetRefIdx(nmean);
 
 
   fParam->SetRefIdx(nmean);
 
-  Float_t dMin=999,mipX=-1,mipY=-1;Int_t chId=-1,mipId=-1,mipQ=-1;                                                                           
-  fPhotCnt=0;                                                      
+  Float_t dMin=999,mipX=-1,mipY=-1;Int_t chId=-1,mipId=-1,mipQ=-1;
+  Int_t sizeClu = -1;
+  fPhotCnt=0;
   for (Int_t iClu=0; iClu<pCluLst->GetEntriesFast();iClu++){//clusters loop
     AliHMPIDCluster *pClu=(AliHMPIDCluster*)pCluLst->UncheckedAt(iClu);                       //get pointer to current cluster    
     chId=pClu->Ch();
     if(pClu->Q()>qthre){                                                                      //charge compartible with MIP clusters      
       Float_t dX=fPc.X()-pClu->X(),dY=fPc.Y()-pClu->Y(),d =TMath::Sqrt(dX*dX+dY*dY);          //distance between current cluster and intersection point
   for (Int_t iClu=0; iClu<pCluLst->GetEntriesFast();iClu++){//clusters loop
     AliHMPIDCluster *pClu=(AliHMPIDCluster*)pCluLst->UncheckedAt(iClu);                       //get pointer to current cluster    
     chId=pClu->Ch();
     if(pClu->Q()>qthre){                                                                      //charge compartible with MIP clusters      
       Float_t dX=fPc.X()-pClu->X(),dY=fPc.Y()-pClu->Y(),d =TMath::Sqrt(dX*dX+dY*dY);          //distance between current cluster and intersection point
-      if( d < dMin) {mipId=iClu; dMin=d;mipX=pClu->X();mipY=pClu->Y();mipQ=(Int_t)pClu->Q();} //current cluster is closer, overwrite data for min cluster
+      if( d < dMin) {mipId=iClu; dMin=d;mipX=pClu->X();
+                     mipY=pClu->Y();mipQ=(Int_t)pClu->Q();sizeClu=pClu->Size();}              //current cluster is closer, overwrite data for min cluster
     }else{                                                                                    //charge compatible with photon cluster
       Double_t thetaCer,phiCer;
       if(FindPhotCkov(pClu->X(),pClu->Y(),thetaCer,phiCer)){                                  //find ckov angle for this  photon candidate
     }else{                                                                                    //charge compatible with photon cluster
       Double_t thetaCer,phiCer;
       if(FindPhotCkov(pClu->X(),pClu->Y(),thetaCer,phiCer)){                                  //find ckov angle for this  photon candidate
@@ -120,11 +122,12 @@ void AliHMPIDRecon::CkovAngle(AliESDtrack *pTrk,TClonesArray *pCluLst,Double_t n
       }
     }
   }//clusters loop
       }
     }
   }//clusters loop
-  
+
+  pTrk->SetHMPIDmip(mipX,mipY,mipQ,fPhotCnt);                                                //store mip info in any case 
+     
   if(fPhotCnt<=nMinPhotAcc) {                                                                 //no reconstruction with <=3 photon candidates
     pTrk->SetHMPIDsignal(kNoPhotAccept);                                                      //set the appropriate flag
   if(fPhotCnt<=nMinPhotAcc) {                                                                 //no reconstruction with <=3 photon candidates
     pTrk->SetHMPIDsignal(kNoPhotAccept);                                                      //set the appropriate flag
-    pTrk->SetHMPIDmip(mipX,mipY,mipQ,fPhotCnt);                                               //store mip info 
-    pTrk->SetHMPIDcluIdx(-1,-1);                                                              //set index of cluster
+    pTrk->SetHMPIDcluIdx(chId,mipId+1000*sizeClu);                                            //set index of cluster
     return;
   }
   
     return;
   }
   
@@ -133,7 +136,7 @@ void AliHMPIDRecon::CkovAngle(AliESDtrack *pTrk,TClonesArray *pCluLst,Double_t n
     pTrk->SetHMPIDsignal(kMipQdcCut);
     return;
   }                                                                                           //no clusters with QDC more the threshold at all
     pTrk->SetHMPIDsignal(kMipQdcCut);
     return;
   }                                                                                           //no clusters with QDC more the threshold at all
-    pTrk->SetHMPIDcluIdx(chId,mipId);                                                         //set index of cluster
+    pTrk->SetHMPIDcluIdx(chId,mipId+1000*sizeClu);                                            //set chamber, index of cluster + cluster size
     if(dMin>fParam->DistCut()) {pTrk->SetHMPIDsignal(kMipDistCut); return;}                   //closest cluster with enough charge is still too far from intersection
   
   fMipPos.Set(mipX,mipY);
     if(dMin>fParam->DistCut()) {pTrk->SetHMPIDsignal(kMipDistCut); return;}                   //closest cluster with enough charge is still too far from intersection
   
   fMipPos.Set(mipX,mipY);
index ebbc27c..68773e4 100644 (file)
@@ -105,6 +105,7 @@ Bool_t AliHMPIDReconHTA::CkovHiddenTrk(AliESDtrack *pTrk,TClonesArray *pCluLst,D
   Float_t mipX=-1,mipY=-1;Int_t mipId=-1,mipQ=-1;                                                                           
   Double_t qRef = 0;
   Int_t nCh=0;
   Float_t mipX=-1,mipY=-1;Int_t mipId=-1,mipQ=-1;                                                                           
   Double_t qRef = 0;
   Int_t nCh=0;
+  Int_t sizeClu=0;
   for (Int_t iClu=0;iClu<pCluLst->GetEntriesFast();iClu++){                                   //clusters loop
     AliHMPIDCluster *pClu=(AliHMPIDCluster*)pCluLst->UncheckedAt(iClu);                       //get pointer to current cluster    
     nCh = pClu->Ch();
   for (Int_t iClu=0;iClu<pCluLst->GetEntriesFast();iClu++){                                   //clusters loop
     AliHMPIDCluster *pClu=(AliHMPIDCluster*)pCluLst->UncheckedAt(iClu);                       //get pointer to current cluster    
     nCh = pClu->Ch();
@@ -114,6 +115,7 @@ Bool_t AliHMPIDReconHTA::CkovHiddenTrk(AliESDtrack *pTrk,TClonesArray *pCluLst,D
     if(pClu->Q()>qRef){                                                                       //searching the highest charge to select a MIP      
       qRef = pClu->Q();
       mipId=iClu; mipX=pClu->X();mipY=pClu->Y();mipQ=(Int_t)pClu->Q();
     if(pClu->Q()>qRef){                                                                       //searching the highest charge to select a MIP      
       qRef = pClu->Q();
       mipId=iClu; mipX=pClu->X();mipY=pClu->Y();mipQ=(Int_t)pClu->Q();
+      sizeClu=pClu->Size();
     }                                                                                    
 //    Printf(" n. %d x %f y %f Q %f",iClu,pClu->X(),pClu->Y(),pClu->Q());
   }//clusters loop
     }                                                                                    
 //    Printf(" n. %d x %f y %f Q %f",iClu,pClu->X(),pClu->Y(),pClu->Q());
   }//clusters loop
@@ -130,7 +132,7 @@ Bool_t AliHMPIDReconHTA::CkovHiddenTrk(AliESDtrack *pTrk,TClonesArray *pCluLst,D
     }                                                                           //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 
     }                                                                           //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(nCh,fIdxMip);                                                         //set cham number and index of cluster
+    pTrk->SetHMPIDcluIdx(nCh,fIdxMip+1000*sizeClu);                                            //set cham number, index of cluster + cluster size
     pTrk->SetHMPIDsignal(fCkovFit);                                                            //find best Theta ckov for ring i.e. track
     pTrk->SetHMPIDchi2(fCkovSig2);                                                             //errors squared
 //    Printf(" n clusters tot %i accepted %i",pCluLst->GetEntriesFast(),fNClu);
     pTrk->SetHMPIDsignal(fCkovFit);                                                            //find best Theta ckov for ring i.e. track
     pTrk->SetHMPIDchi2(fCkovSig2);                                                             //errors squared
 //    Printf(" n clusters tot %i accepted %i",pCluLst->GetEntriesFast(),fNClu);