X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;ds=inline;f=HMPID%2FAliHMPIDReconstructor.h;h=4115df8aa86b47089f5fd736323942a103bc78dc;hb=e5c41d3ed41ca47ed14177a8898bed89b59b7d71;hp=33c6395ab4cecfadc220c6cb3052c6057343b78b;hpb=3c6274c1849fbc3ebd7554982d9948ddf9430756;p=u%2Fmrichter%2FAliRoot.git diff --git a/HMPID/AliHMPIDReconstructor.h b/HMPID/AliHMPIDReconstructor.h index 33c6395ab4c..4115df8aa86 100644 --- a/HMPID/AliHMPIDReconstructor.h +++ b/HMPID/AliHMPIDReconstructor.h @@ -2,44 +2,58 @@ #define AliHMPIDReconstructor_h /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * See cxx source for full Copyright notice */ - -#include //base class +//. +// HMPID base class to reconstruct an event +//. +#include //base class #include "AliHMPIDTracker.h" //CreateTracker() -#include //UseDig() -#include //UseDig() -class AliRawReader; //Reconstruct() with raw data -class AliHMPIDDigit; //Dig2Clu(), UseDig() +#include "AliHMPIDDigit.h" //Dig2Clu(), UseDig() +#include "AliHMPIDRecoParamV1.h" +#include //UseDig() +#include //UseDig() +#include //SigConv() + +class AliRawReader; //Reconstruct() with raw data class AliHMPIDCluster; //Dig2Clu() class AliHMPIDReconstructor: public AliReconstructor { public: - AliHMPIDReconstructor(): AliReconstructor() {}//default ctor - virtual ~AliHMPIDReconstructor() {}//dtor + AliHMPIDReconstructor(); + virtual ~AliHMPIDReconstructor() {delete fDig;delete fClu;}//dtor //framework part - AliTracker* CreateTracker (AliRunLoader* )const{return new AliHMPIDTracker;} //from AliReconstructor for clusters->PID - void Reconstruct (AliRunLoader* pAL )const; //from AliReconstruction for digits->clusters - void Reconstruct (AliRunLoader* pAL,AliRawReader *pRR)const; //from AliReconstruction for raws->clusters - virtual void FillESD (AliRunLoader* pAL,AliESD *pESD)const; //calculate pid for HMPID - virtual void FillESD(AliRunLoader*, AliRawReader*, AliESD*) const { }; - virtual void FillESD(AliRawReader*, TTree*, AliESD*) const { }; - virtual void FillESD(TTree*, TTree*, AliESD*) const { }; + 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 + static Int_t StreamLevel() { return fgStreamLevel;} + static void SetStreamLevel(Int_t level) { fgStreamLevel = level;} - - using AliReconstructor::Reconstruct; //to get rid of virtual hidden warning + + 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(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: - ClassDef(AliHMPIDReconstructor, 0) //class for the HMPID reconstruction + TObjArray *fDaqSig; // container for the pad pedestal sigmas + TObjArray *fDig; // tmp list of digits + TObjArray *fClu; // tmp list of clusters +// + 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 }; -typedef AliHMPIDReconstructor AliRICHReconstructor; // for backward compatibility - -//__________________________________________________________________________________________________ +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ AliHMPIDDigit* AliHMPIDReconstructor::UseDig(Int_t padX,Int_t padY,TClonesArray *pDigLst,TMatrixF *pPadMap) { //Digit map contains a matrix if digit numbers. @@ -52,5 +66,19 @@ AliHMPIDDigit* AliHMPIDReconstructor::UseDig(Int_t padX,Int_t padY,TClonesArray if(iDig!=-1) return (AliHMPIDDigit*)pDigLst->At(iDig); //digit pointer else return 0; } +//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +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(pUserCut[iCh]<=iDaqSigCut) return kTRUE; + TMatrixF *pM = (TMatrixF*)fDaqSig->At(pDig->Ch()); + Float_t sig = (*pM)(pDig->PadChX(),pDig->PadChY()); + if(pDig->Q()>pUserCut[iCh]*sig) return kTRUE; + else return kFALSE; +} #endif