#ifndef AliHMPIDReconstructor_h
#define AliHMPIDReconstructor_h
#include <AliReconstructor.h>
#include "AliHMPIDTracker.h"
#include "AliHMPIDDigit.h"
#include "AliHMPIDRecoParamV1.h"
#include <TMatrixF.h> //UseDig()
#include <TClonesArray.h> //UseDig()
#include <TObjArray.h> //SigConv()
class AliRawReader;
class AliHMPIDCluster;
class AliHMPIDReconstructor: public AliReconstructor
{
public:
AliHMPIDReconstructor();
virtual ~AliHMPIDReconstructor() {delete fDig;delete fClu;}
AliTracker* CreateTracker () const {return new AliHMPIDTracker;}
void ConvertDigits (AliRawReader *pRR, TTree *pDigTree) const;
Bool_t HasDigitConversion() const {return kTRUE;}
void Reconstruct (TTree* digitsTree, TTree* clustersTree) const;
static Int_t StreamLevel() { return fgStreamLevel;}
static void SetStreamLevel(Int_t level) { fgStreamLevel = level;}
using AliReconstructor::FillESD;
using AliReconstructor::Reconstruct;
static void Dig2Clu (TObjArray *pDigLst,TObjArray *pCluLst,Int_t *pUserCut,Bool_t isUnfold=kTRUE );
static void FormClu (AliHMPIDCluster *pClu,AliHMPIDDigit *pDig,TClonesArray *pDigLst,TMatrixF *pPadMap);
static inline AliHMPIDDigit* UseDig (Int_t padX,Int_t padY, TClonesArray *pDigLst,TMatrixF *pDigMap);
inline Bool_t IsDigSurvive(Int_t *pUserCut, AliHMPIDDigit *pDig )const;
static const AliHMPIDRecoParamV1* GetRecoParam() { return dynamic_cast<const AliHMPIDRecoParamV1*>(AliReconstructor::GetRecoParam(5)); }
protected:
TObjArray *fDaqSig;
TObjArray *fDig;
TObjArray *fClu;
private:
AliHMPIDReconstructor(const AliHMPIDReconstructor&);
AliHMPIDReconstructor &operator=(const AliHMPIDReconstructor&);
static Int_t fgStreamLevel;
ClassDef(AliHMPIDReconstructor, 3)
};
AliHMPIDDigit* AliHMPIDReconstructor::UseDig(Int_t padX,Int_t padY,TClonesArray *pDigLst,TMatrixF *pPadMap)
{
Int_t iDig=(Int_t)(*pPadMap)(padX,padY);(*pPadMap)(padX,padY)=-1;
if(iDig!=-1) return (AliHMPIDDigit*)pDigLst->At(iDig);
else return 0;
}
Bool_t AliHMPIDReconstructor::IsDigSurvive(Int_t *pUserCut, AliHMPIDDigit *pDig)const
{
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
AliHMPIDReconstructor.h:1 AliHMPIDReconstructor.h:2 AliHMPIDReconstructor.h:3 AliHMPIDReconstructor.h:4 AliHMPIDReconstructor.h:5 AliHMPIDReconstructor.h:6 AliHMPIDReconstructor.h:7 AliHMPIDReconstructor.h:8 AliHMPIDReconstructor.h:9 AliHMPIDReconstructor.h:10 AliHMPIDReconstructor.h:11 AliHMPIDReconstructor.h:12 AliHMPIDReconstructor.h:13 AliHMPIDReconstructor.h:14 AliHMPIDReconstructor.h:15 AliHMPIDReconstructor.h:16 AliHMPIDReconstructor.h:17 AliHMPIDReconstructor.h:18 AliHMPIDReconstructor.h:19 AliHMPIDReconstructor.h:20 AliHMPIDReconstructor.h:21 AliHMPIDReconstructor.h:22 AliHMPIDReconstructor.h:23 AliHMPIDReconstructor.h:24 AliHMPIDReconstructor.h:25 AliHMPIDReconstructor.h:26 AliHMPIDReconstructor.h:27 AliHMPIDReconstructor.h:28 AliHMPIDReconstructor.h:29 AliHMPIDReconstructor.h:30 AliHMPIDReconstructor.h:31 AliHMPIDReconstructor.h:32 AliHMPIDReconstructor.h:33 AliHMPIDReconstructor.h:34 AliHMPIDReconstructor.h:35 AliHMPIDReconstructor.h:36 AliHMPIDReconstructor.h:37 AliHMPIDReconstructor.h:38 AliHMPIDReconstructor.h:39 AliHMPIDReconstructor.h:40 AliHMPIDReconstructor.h:41 AliHMPIDReconstructor.h:42 AliHMPIDReconstructor.h:43 AliHMPIDReconstructor.h:44 AliHMPIDReconstructor.h:45 AliHMPIDReconstructor.h:46 AliHMPIDReconstructor.h:47 AliHMPIDReconstructor.h:48 AliHMPIDReconstructor.h:49 AliHMPIDReconstructor.h:50 AliHMPIDReconstructor.h:51 AliHMPIDReconstructor.h:52 AliHMPIDReconstructor.h:53 AliHMPIDReconstructor.h:54 AliHMPIDReconstructor.h:55 AliHMPIDReconstructor.h:56 AliHMPIDReconstructor.h:57 AliHMPIDReconstructor.h:58 AliHMPIDReconstructor.h:59 AliHMPIDReconstructor.h:60 AliHMPIDReconstructor.h:61 AliHMPIDReconstructor.h:62 AliHMPIDReconstructor.h:63 AliHMPIDReconstructor.h:64 AliHMPIDReconstructor.h:65 AliHMPIDReconstructor.h:66 AliHMPIDReconstructor.h:67 AliHMPIDReconstructor.h:68 AliHMPIDReconstructor.h:69 AliHMPIDReconstructor.h:70 AliHMPIDReconstructor.h:71 AliHMPIDReconstructor.h:72 AliHMPIDReconstructor.h:73 AliHMPIDReconstructor.h:74 AliHMPIDReconstructor.h:75 AliHMPIDReconstructor.h:76 AliHMPIDReconstructor.h:77 AliHMPIDReconstructor.h:78 AliHMPIDReconstructor.h:79 AliHMPIDReconstructor.h:80 AliHMPIDReconstructor.h:81 AliHMPIDReconstructor.h:82 AliHMPIDReconstructor.h:83 AliHMPIDReconstructor.h:84