From f1970e74adf888c7c72ecccd09eedb9dab2d5775 Mon Sep 17 00:00:00 2001 From: dibari Date: Wed, 2 Apr 2008 11:47:29 +0000 Subject: [PATCH] Fields for HMPID in the ESD filled in an optimized way+minors --- HMPID/AliHMPIDRecon.cxx | 26 +++++++++++++++----------- HMPID/Hconfig.C | 2 +- HMPID/Hdisp.C | 4 ++-- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/HMPID/AliHMPIDRecon.cxx b/HMPID/AliHMPIDRecon.cxx index 5949ee61d25..56b1549b5ce 100644 --- a/HMPID/AliHMPIDRecon.cxx +++ b/HMPID/AliHMPIDRecon.cxx @@ -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() diff --git a/HMPID/Hconfig.C b/HMPID/Hconfig.C index e5c74422804..7a96665e44f 100644 --- a/HMPID/Hconfig.C +++ b/HMPID/Hconfig.C @@ -675,8 +675,8 @@ void HmpConfig::WriteBatch() fprintf(fp," cout<<\"!!!!!!!!!!!!Info in : 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;} diff --git a/HMPID/Hdisp.C b/HMPID/Hdisp.C index 2504d44b42f..3453ea7afd0 100644 --- a/HMPID/Hdisp.C +++ b/HMPID/Hdisp.C @@ -324,7 +324,7 @@ void RenderEsd(AliESDEvent *pEsd) if(chAliHMPIDParam::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); -- 2.39.3