X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=HMPID%2FAliHMPIDReconstructor.cxx;h=d01ca390bd2fc1207948fa8cc5c1e555ed74f307;hb=cceb8cecd3c961ff855468a2b778da39e039d7de;hp=3af7d04d113587bb88f7e4d65e5a07f90920c64c;hpb=c458aab656f60eb9cd2c466da67883c068606aee;p=u%2Fmrichter%2FAliRoot.git diff --git a/HMPID/AliHMPIDReconstructor.cxx b/HMPID/AliHMPIDReconstructor.cxx index 3af7d04d113..d01ca390bd2 100644 --- a/HMPID/AliHMPIDReconstructor.cxx +++ b/HMPID/AliHMPIDReconstructor.cxx @@ -28,19 +28,20 @@ #include //Reconstruct() for raw digits #include // #include "AliHMPIDRawStream.h" //ConvertDigits() -#include "AliHMPIDRecoParamV1.h" //ctor - +#include "AliHMPIDRecoParamV1.h" //ctor +#include ClassImp(AliHMPIDReconstructor) +Int_t AliHMPIDReconstructor::fgStreamLevel = 0; // stream (debug) level + //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -AliHMPIDReconstructor::AliHMPIDReconstructor():AliReconstructor(),fUserCut(0),fDaqSig(0),fDig(0),fClu(0) +AliHMPIDReconstructor::AliHMPIDReconstructor():AliReconstructor(),fDaqSig(0),fDig(0),fClu(0) { // //ctor // AliHMPIDParam::Instance(); //geometry loaded for reconstruction - fUserCut = new Int_t[7]; fClu=new TObjArray(AliHMPIDParam::kMaxCh+1); fClu->SetOwner(kTRUE); fDig=new TObjArray(AliHMPIDParam::kMaxCh+1); fDig->SetOwner(kTRUE); @@ -51,23 +52,6 @@ AliHMPIDReconstructor::AliHMPIDReconstructor():AliReconstructor(),fUserCut(0),fD fClu->AddAt(pClus,i); } - - if(AliHMPIDReconstructor::GetRecoParam()) { - for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) { - fUserCut[iCh] = AliHMPIDReconstructor::GetRecoParam()->GetHmpUserCut(iCh); - AliDebug(1,Form("UserCut successfully loaded (from AliHMPIDRecoParamV1) for chamber %i -> %i ",iCh,fUserCut[iCh])); - } - } - else { - 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])); - AliDebug(1,Form("Cannot get AliHMPIDRecoParamV1!")); - } - } - - - 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(); @@ -84,6 +68,7 @@ void AliHMPIDReconstructor::Dig2Clu(TObjArray *pDigAll,TObjArray *pCluAll,Int_t // pCluAll - list of clusters for all chambers // isTryUnfold - flag to choose between CoG and Mathieson fitting // Returns: none + TMatrixF padMap(AliHMPIDParam::kMinPx,AliHMPIDParam::kMaxPcx,AliHMPIDParam::kMinPy,AliHMPIDParam::kMaxPcy); //pads map for single chamber 0..159 x 0..143 for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++){ //chambers loop @@ -139,15 +124,35 @@ void AliHMPIDReconstructor::Reconstruct(TTree *pDigTree,TTree *pCluTree)const pCluTree->Branch(Form("HMPID%d",iCh),&((*fClu)[iCh]),7); pDigTree->SetBranchAddress(Form("HMPID%d",iCh),&((*fDig)[iCh])); } + + Int_t pUserCut[7]; + + if(AliHMPIDReconstructor::GetRecoParam()) { + for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) { + pUserCut[iCh] = AliHMPIDReconstructor::GetRecoParam()->GetHmpUserCut(iCh); + AliDebug(1,Form("UserCut successfully loaded (from AliHMPIDRecoParamV1) for chamber %i -> %i ",iCh,pUserCut[iCh])); + } + } + else { + for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) { + pUserCut[iCh] = 4; // minimal requirement for sigma cut + AliDebug(1,Form("UserCut loaded from defaults for chamber %i -> %i ",iCh,pUserCut[iCh])); + AliDebug(1,Form("Cannot get AliHMPIDRecoParamV1!")); + } + } + TVirtualFitter* fitter = TVirtualFitter::GetFitter(); + delete fitter; + fitter = TVirtualFitter::Fitter(0,3*6); // create a new fitter to avoid interferrence with others pDigTree->GetEntry(0); - Dig2Clu(fDig,fClu,fUserCut); //cluster finder + Dig2Clu(fDig,fClu,pUserCut); //cluster finder pCluTree->Fill(); //fill tree for current event - + delete fitter; for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++){ fDig->At(iCh)->Clear(); fClu->At(iCh)->Clear(); } + AliDebug(1,"Stop."); }//Reconstruct(for simulated digits) //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -166,6 +171,22 @@ void AliHMPIDReconstructor::ConvertDigits(AliRawReader *pRR,TTree *pDigTree)cons pDigTree->Branch(Form("HMPID%d",iCh),&((*fDig)[iCh])); } + Int_t pUserCut[7]; + + if(AliHMPIDReconstructor::GetRecoParam()) { + for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) { + pUserCut[iCh] = AliHMPIDReconstructor::GetRecoParam()->GetHmpUserCut(iCh); + AliDebug(1,Form("UserCut successfully loaded (from AliHMPIDRecoParamV1) for chamber %i -> %i ",iCh,pUserCut[iCh])); + } + } + else { + for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) { + pUserCut[iCh] = 4; // minimal requirement for sigma cut + AliDebug(1,Form("UserCut loaded from defaults for chamber %i -> %i ",iCh,pUserCut[iCh])); + AliDebug(1,Form("Cannot get AliHMPIDRecoParamV1!")); + } + } + AliHMPIDRawStream stream(pRR); while(stream.Next()) @@ -173,7 +194,7 @@ void AliHMPIDReconstructor::ConvertDigits(AliRawReader *pRR,TTree *pDigTree)cons Int_t ch = AliHMPIDParam::DDL2C(stream.GetDDLNumber()); for(Int_t iPad=0;iPadAt(ch)))[iDigCnt[ch]++]) AliHMPIDDigit(dig); //add this digit to the tmp list } } @@ -182,21 +203,7 @@ void AliHMPIDReconstructor::ConvertDigits(AliRawReader *pRR,TTree *pDigTree)cons for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++)fDig->At(iCh)->Clear(); + AliDebug(1,"Stop."); }//Reconstruct digits from raw digits //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -void AliHMPIDReconstructor::FillESD(TTree */*digitsTree*/, TTree */*clustersTree*/, AliESDEvent *pESD) const -{ -// Fill ESD with all the infos from HMPID -// Probability vector from AliHMPIDPid -//... - AliHMPIDPid pID; - Double_t prob[AliPID::kSPECIES]; - - for(Int_t iTrk=0;iTrkGetNumberOfTracks();iTrk++){//ESD tracks loop - AliESDtrack *pTrk = pESD->GetTrack(iTrk);// get next reconstructed track - pID.FindPid(pTrk,AliPID::kSPECIES,prob); - pTrk->SetHMPIDpid(prob); - }//ESD tracks loop - -}//FillESD()