X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=HMPID%2FAliHMPIDReconstructor.h;h=1b516a17afe39b647ab974e926e99521f4d683ad;hb=c80e618dfb69334e0a3c3666d3244e0005269a56;hp=96ccb0f16a4390aa014c465fa6b8073adebf9039;hpb=555a0dbf01e2edf4446966c7d9bc2eb474b22c90;p=u%2Fmrichter%2FAliRoot.git diff --git a/HMPID/AliHMPIDReconstructor.h b/HMPID/AliHMPIDReconstructor.h index 96ccb0f16a4..1b516a17afe 100644 --- a/HMPID/AliHMPIDReconstructor.h +++ b/HMPID/AliHMPIDReconstructor.h @@ -8,9 +8,11 @@ #include //base class #include "AliHMPIDTracker.h" //CreateTracker() #include "AliHMPIDDigit.h" //Dig2Clu(), UseDig() +#include "AliHMPIDRecoParamV1.h" #include //UseDig() #include //UseDig() #include //SigConv() + class AliRawReader; //Reconstruct() with raw data class AliHMPIDCluster; //Dig2Clu() @@ -18,33 +20,41 @@ class AliHMPIDReconstructor: public AliReconstructor { public: AliHMPIDReconstructor(); - virtual ~AliHMPIDReconstructor() {delete fDig;delete fClu;delete [] fUserCut;}//dtor + virtual ~AliHMPIDReconstructor() {delete fDig;delete fClu;}//dtor //framework part - AliTracker* CreateTracker (AliRunLoader* )const{return new AliHMPIDTracker;} //from AliReconstructor for clusters->PID + AliTracker* CreateTracker () const {return new AliHMPIDTracker;} //from AliReconstructor for clusters->PID void ConvertDigits (AliRawReader *pRR, TTree *pDigTree) const; //from AliReconstruction for raw->digit Bool_t HasDigitConversion() const {return kTRUE;} //HMPID digits converted with ConvertDigits void Reconstruct (TTree* digitsTree, TTree* clustersTree) const; //from AliReconstruction for digit->cluster - void Reconstruct (AliRunLoader *pAL,AliRawReader* pRR)const; //from AliReconstruction for raw->cluster with Digits on fly - Bool_t HasLocalReconstruction() const {return kTRUE;} // HMPID has local reconstruction algorithm - void FillESD (AliRunLoader* pAL,AliESDEvent *pESD)const; //calculate pid for HMPID - + void FillESD (TTree* /*digitsTree*/, TTree* /*clustersTree*/, AliESDEvent *pESD)const; //calculate pid for HMPID + static Int_t StreamLevel() { return fgStreamLevel;} + static void SetStreamLevel(Int_t level) { fgStreamLevel = level;} + + using AliReconstructor::FillESD; // using AliReconstructor::Reconstruct; // //private part - static void Dig2Clu (TObjArray *pDigLst,TObjArray *pCluLst,Bool_t isUnfold=kTRUE );//digits->clusters + static void Dig2Clu (TObjArray *pDigLst,TObjArray *pCluLst,Int_t *pUserCut,Bool_t isUnfold=kTRUE );//digits->clusters static void FormClu (AliHMPIDCluster *pClu,AliHMPIDDigit *pDig,TClonesArray *pDigLst,TMatrixF *pPadMap);//cluster formation recursive algorithm static inline AliHMPIDDigit* UseDig (Int_t padX,Int_t padY, TClonesArray *pDigLst,TMatrixF *pDigMap);//use this pad's digit to form a cluster - inline Bool_t IsDigSurvive(AliHMPIDDigit *pDig )const;//check for sigma cut + inline Bool_t IsDigSurvive(Int_t *pUserCut, AliHMPIDDigit *pDig )const;//check for sigma cut + static const AliHMPIDRecoParamV1* GetRecoParam() { return dynamic_cast(AliReconstructor::GetRecoParam(5)); } //5 is the HMPID detector code + protected: - Int_t *fUserCut; // n sigmas for pedestals decided by the User for each chamber(if in OCDB) TObjArray *fDaqSig; // container for the pad pedestal sigmas TObjArray *fDig; // tmp list of digits TObjArray *fClu; // tmp list of clusters - ClassDef(AliHMPIDReconstructor, 0) // class for the HMPID reconstruction +// + private: + AliHMPIDReconstructor(const AliHMPIDReconstructor&); //Not implemented + AliHMPIDReconstructor &operator=(const AliHMPIDReconstructor&); //Not implemented + static Int_t fgStreamLevel; // flag for streaming - for HMPID reconstruction +// + ClassDef(AliHMPIDReconstructor, 3) // class for the HMPID reconstruction }; -//__________________________________________________________________________________________________ +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ AliHMPIDDigit* AliHMPIDReconstructor::UseDig(Int_t padX,Int_t padY,TClonesArray *pDigLst,TMatrixF *pPadMap) { //Digit map contains a matrix if digit numbers. @@ -58,17 +68,17 @@ AliHMPIDDigit* AliHMPIDReconstructor::UseDig(Int_t padX,Int_t padY,TClonesArray else return 0; } //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -Bool_t AliHMPIDReconstructor::IsDigSurvive(AliHMPIDDigit *pDig)const +Bool_t AliHMPIDReconstructor::IsDigSurvive(Int_t *pUserCut, AliHMPIDDigit *pDig)const { //Check if the current digit survive to a riapllied sigma cut //Arguments: pDig pointer to the current digit // Returns: kTRUE if charge > mean+n*sigma Int_t iCh = pDig->Ch(); Int_t iDaqSigCut =(Int_t)fDaqSig->At(iCh)->GetUniqueID(); - if(fUserCut[iCh]<=iDaqSigCut) return kTRUE; + if(pUserCut[iCh]<=iDaqSigCut) return kTRUE; TMatrixF *pM = (TMatrixF*)fDaqSig->At(pDig->Ch()); Float_t sig = (*pM)(pDig->PadChX(),pDig->PadChY()); - if(pDig->Q()>fUserCut[iCh]*sig) return kTRUE; + if(pDig->Q()>pUserCut[iCh]*sig) return kTRUE; else return kFALSE; }