Fields for HMPID in the ESD filled in an optimized way+minors
authordibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Apr 2008 11:47:29 +0000 (11:47 +0000)
committerdibari <dibari@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 2 Apr 2008 11:47:29 +0000 (11:47 +0000)
HMPID/AliHMPIDRecon.cxx
HMPID/Hconfig.C
HMPID/Hdisp.C

index 5949ee6..56b1549 100644 (file)
@@ -142,33 +142,37 @@ void AliHMPIDRecon::CkovAngle(AliESDtrack *pTrk,TClonesArray *pCluLst,Double_t n
     }
   }//clusters loop
   
-  fMipPos.Set(mipX,mipY);
-  
   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
     return;
   }
   
-  if(mipId==-1)              {pTrk->SetHMPIDsignal(kMipQdcCut);  return;}                     //no clusters with QDC more the threshold at all
-  if(dMin>fParam->DistCut()) {pTrk->SetHMPIDsignal(kMipDistCut); return;}                     //closest cluster with enough charge is still too far from intersection
+  if(mipId==-1) {
+    pTrk->SetHMPIDcluIdx(chId,9999);                                                          //set index of cluster
+    pTrk->SetHMPIDsignal(kMipQdcCut);
+    return;
+  }                                                                                           //no clusters with QDC more the threshold at all
+    pTrk->SetHMPIDcluIdx(chId,mipId);                                                         //set index of cluster
+    if(dMin>fParam->DistCut()) {pTrk->SetHMPIDsignal(kMipDistCut); return;}                   //closest cluster with enough charge is still too far from intersection
+  
+  fMipPos.Set(mipX,mipY);
+  
   
 //PATTERN RECOGNITION STARTED: 
   
   Int_t iNrec=FlagPhot(HoughResponse());                                                      //flag photons according to individual theta ckov with respect to most probable
   pTrk->SetHMPIDmip(mipX,mipY,mipQ,iNrec);                                                    //store mip info 
 
-  pTrk->SetHMPIDcluIdx(chId,mipId);                                                           //set index of cluster
-  
   if(iNrec<1){
     pTrk->SetHMPIDsignal(kNoPhotAccept);                                                      //no photon candidates are accepted
+    return;
   }
-  else {
-    Double_t thetaC = FindRingCkov(pCluLst->GetEntries());                                    //find the best reconstructed theta Cherenkov
+  Double_t thetaC = FindRingCkov(pCluLst->GetEntries());                                    //find the best reconstructed theta Cherenkov
 //    FindRingGeom(thetaC,2);
-    pTrk->SetHMPIDsignal(thetaC);                                                             //store theta Cherenkov
-    pTrk->SetHMPIDchi2(fCkovSigma2);                                                          //store errors squared
-  }
+  pTrk->SetHMPIDsignal(thetaC);                                                             //store theta Cherenkov
+  pTrk->SetHMPIDchi2(fCkovSigma2);                                                          //store errors squared
 
   DeleteVars();
 }//CkovAngle()
index e5c7442..7a96665 100644 (file)
@@ -675,8 +675,8 @@ void HmpConfig::WriteBatch()
                                                     fprintf(fp,"  cout<<\"!!!!!!!!!!!!Info in <sim.C>: Stop  time: \";time.Set();  time.Print();\n");
                                                     fprintf(fp,"  gBenchmark->Show(\"ALICE\");\n");
   
-                                                    fprintf(fp,"  gSystem->Exec(\"aliroot rec.C\");\n");
                                                     fprintf(fp,"  gSystem->Exec(\"touch ZZZ______finished_______SSS\");\n}\n");
+                                                    fprintf(fp,"  gSystem->Exec(\"aliroot rec.C\");\n");
   fclose(fp);  
   char *sBatchName="rec";
   FILE *fp=fopen(Form("%s.C",sBatchName),"w"); if(!fp){Info("CreateRec","Cannot open output file: %s.C",sBatchName);return;}
index 2504d44..3453ea7 100644 (file)
@@ -324,7 +324,7 @@ void RenderEsd(AliESDEvent *pEsd)
     if(ch<AliHMPIDParam::AliHMPIDParam::kMinCh||ch>AliHMPIDParam::kMaxCh) continue;//this track does not intersect any chamber
     Float_t xPc,yPc,xRa,yRa,thRa,phRa; 
     Int_t chamb = AliHMPIDTracker::IntTrkCha(pTrk,xPc,yPc,xRa,yRa,thRa,phRa);   //find again intersection of track with PC--> it is not stored in ESD!
-    if(ch!=chamb){(" CHAMBER MISMATCH: in ESDTrack chamber %i - in IntTrkCha chamber %i",ch,chamb);End();}
+    if(ch!=chamb){Printf(" CHAMBER MISMATCH: in ESDTrack chamber %i - in IntTrkCha chamber %i",ch,chamb);End();}
     Int_t npTrk = fRenTxC[ch]->SetNextPoint(xPc,yPc);                           //add this intersection point
     Float_t ckov=pTrk->GetHMPIDsignal();                                        //get ckov angle stored for this track  
     if(ckov>0){
@@ -751,7 +751,7 @@ void Hdisp()
     } else {delete fEsdFile; delete fEsdTree;}
     //clm: we need to set the magnetic field  
     if(gSystem->IsFileInIncludePath("galice.root")){
-    if(gAlice) delete gAlice;                       
+    if(gAlice) gAlice=0x0;                       
     gAL=AliRunLoader::Open();                       
     gAL->LoadgAlice();           
     if(gAL)AliHMPIDTracker::SetFieldMap(gAL->GetAliRun()->Field(),kTRUE);