#include <AliCDBManager.h> //ctor
#include <AliESDEvent.h> //FillEsd()
#include <AliRawReader.h> //Reconstruct() for raw digits
+#include <AliLog.h> //
#include "AliHMPIDRawStream.h" //ConvertDigits()
#include "AliHMPIDRecoParam.h" //ctor
ClassImp(AliHMPIDReconstructor)
fClu->AddAt(pClus,i);
}
- if(fgkRecoParam!=0x0 && fgkRecoParam->GetUserCutMode()==kFALSE)
- {
- for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) {
+ if(fgkRecoParam!=0x0 && fgkRecoParam->GetUserCutMode()==kTRUE) {
+ for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) {
fUserCut[iCh] = fgkRecoParam->GetUserCut(iCh);
AliDebug(1,Form("UserCut successfully loaded (from RecoParam) for chamber %i -> %i ",iCh,fUserCut[iCh]));
- }
+ }
}
else {
- AliCDBEntry *pUserCutEnt =AliCDBManager::Instance()->Get("HMPID/Calib/UserCut"); //contains TObjArray of 14 TObject with n. of sigmas to cut charge
- if(pUserCutEnt) {
- TObjArray *pUserCut = (TObjArray*)pUserCutEnt->GetObject();
- for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++){ //chambers loop
- fUserCut[iCh] = pUserCut->At(iCh)->GetUniqueID();
- AliDebug(1,Form("UserCut successfully loaded (from OCDB) for chamber %i -> %i ",iCh,fUserCut[iCh]));
+ for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) {
+ fUserCut[iCh] = 3; // minimal requirement for sigma cut
+ AliDebug(1,Form("UserCut loaded from defaults for chamber %i -> %i ",iCh,fUserCut[iCh]));
}
- }
- }
-
- AliCDBEntry *pQthreEnt =AliCDBManager::Instance()->Get("HMPID/Calib/Qthre"); //contains TObjArray of 7 TF1
- if(!pQthreEnt) AliFatal("No Qthre available");
- TObjArray *pQthre = (TObjArray*)pQthreEnt->GetObject();
- for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) {
- for(Int_t isec=0;isec<=5;isec++) {
- TF1 *pfQthre = (TF1*)pQthre->At(6*iCh+isec);
- Double_t tMin,tMax;
- pfQthre->GetRange(tMin,tMax);
- Double_t qthre=pfQthre->Eval(tMin);
- AliDebug(1,Form("Qthre successfully loaded for chamber %i sector %i -> %f ",iCh,isec,qthre));
- }
- }
+ }
-
AliCDBEntry *pDaqSigEnt =AliCDBManager::Instance()->Get("HMPID/Calib/DaqSig"); //contains TObjArray of TObjArray 14 TMatrixF sigmas values for pads
if(!pDaqSigEnt) AliFatal("No pedestals from DAQ!");
fDaqSig = (TObjArray*)pDaqSigEnt->GetObject();
}
}//AliHMPIDReconstructor
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-void AliHMPIDReconstructor::Dig2Clu(TObjArray *pDigAll,TObjArray *pCluAll,Bool_t isTryUnfold)
+void AliHMPIDReconstructor::Dig2Clu(TObjArray *pDigAll,TObjArray *pCluAll,Int_t *pUserCut,Bool_t isTryUnfold)
{
// Finds all clusters for a given digits list provided not empty. Currently digits list is a list of all digits for a single chamber.
// Puts all found clusters in separate lists, one per clusters.
AliHMPIDDigit *pDig=(AliHMPIDDigit*)pDigCur->At(iDig); //take current digit
if(!(pDig=UseDig(pDig->PadChX(),pDig->PadChY(),pDigCur,&padMap))) continue; //this digit is already taken in FormClu(), go after next digit
FormClu(&clu,pDig,pDigCur,&padMap); //form cluster starting from this digit by recursion
-
- clu.Solve(pCluCur,isTryUnfold); //solve this cluster and add all unfolded clusters to provided list
+ clu.Solve(pCluCur,pUserCut,isTryUnfold); //solve this cluster and add all unfolded clusters to provided list
clu.Reset(); //empty current cluster
}//digits loop for current chamber
}//chambers loop
pDigTree->SetBranchAddress(Form("HMPID%d",iCh),&((*fDig)[iCh]));
}
pDigTree->GetEntry(0);
- Dig2Clu(fDig,fClu); //cluster finder
+ Dig2Clu(fDig,fClu,fUserCut); //cluster finder
pCluTree->Fill(); //fill tree for current event
for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++){