fEmcTimeGate = 1.e-8 ;
fToUnfold = kTRUE ;
-
+
+ fPurifyThreshold = 0.012 ;
+
TString clusterizerName( GetName()) ;
if (clusterizerName.IsNull() )
clusterizerName = "Default" ;
Int_t index ;
//Evaluate position, dispersion and other RecPoint properties...
- for(index = 0; index < emcRecPoints->GetEntries(); index++)
- ((AliPHOSEmcRecPoint *)emcRecPoints->At(index))->EvalAll(fW0,digits) ;
-
+ for(index = 0; index < emcRecPoints->GetEntries(); index++){
+ AliPHOSEmcRecPoint * emcrp = static_cast<AliPHOSEmcRecPoint *>(emcRecPoints->At(index)) ;
+ emcrp->Purify(fPurifyThreshold) ;
+ if(emcrp->GetMultiplicity())
+ emcrp->EvalAll(fW0,digits) ;
+ else
+ emcRecPoints->Remove(emcrp) ;
+ }
+
+ emcRecPoints->Compress() ;
emcRecPoints->Sort() ;
for(index = 0; index < emcRecPoints->GetEntries(); index++)
((AliPHOSEmcRecPoint *)emcRecPoints->At(index))->SetIndexInList(index) ;
virtual Float_t GetCpvClusteringThreshold()const{ return fCpvClusteringThreshold; }
virtual Float_t GetCpvLocalMaxCut()const { return fCpvLocMaxCut;}
virtual Float_t GetCpvLogWeight()const { return fW0CPV;}
+ virtual Float_t GetPurifyThreshold()const {return fPurifyThreshold; }
virtual const char * GetRecPointsBranch() const{ return GetName() ;}
virtual const Int_t GetRecPointsInRun() const {return fRecPointsInRun ;}
virtual void SetCpvClusteringThreshold(Float_t cluth) { fCpvClusteringThreshold = cluth ; }
virtual void SetCpvLocalMaxCut(Float_t cut) { fCpvLocMaxCut = cut ; }
virtual void SetCpvLogWeight(Float_t w) { fW0CPV = w ; }
- virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) { fToUnfold = toUnfold ;}
+ virtual void SetUnfolding(Bool_t toUnfold = kTRUE ) { fToUnfold = toUnfold ;}
+ virtual void SetPirifyThreshold(Float_t threshold) {fPurifyThreshold = threshold ;}
static Double_t ShowerShape(Double_t r) ; // Shape of EM shower used in unfolding;
//class member function (not object member function)
static void UnfoldingChiSquare(Int_t & nPar, Double_t * Grad, Double_t & fret, Double_t * x, Int_t iflag) ;
Float_t fADCpedestalEmc ; //
Float_t fADCchanelCpv ; // width of one ADC channel in CPV 'popugais'
Float_t fADCpedestalCpv ; //
-
+
+ Float_t fPurifyThreshold ; // threshold for cell energies after unfolding
Float_t fEmcClusteringThreshold ; // minimum energy to include a EMC digit in a cluster
Float_t fCpvClusteringThreshold ; // minimum energy to include a CPV digit in a cluster
Float_t fEmcLocMaxCut ; // minimum energy difference to distinguish local maxima in a cluster
}
//____________________________________________________________________________
-void AliPHOSEmcRecPoint::Print(Option_t * option)
+void AliPHOSEmcRecPoint::Purify(Float_t threshold){
+ //Removes digits below threshold
+
+ Int_t * tempo = new ( Int_t[fMaxDigit] ) ;
+ Float_t * tempoE = new ( Float_t[fMaxDigit] ) ;
+
+ Int_t mult = 0 ;
+ for(Int_t iDigit=0;iDigit< fMulDigit ;iDigit++){
+ if(fEnergyList[iDigit] > threshold){
+ tempo[mult] = fDigitsList[iDigit] ;
+ tempoE[mult] = fEnergyList[iDigit] ;
+ mult++ ;
+ }
+ }
+
+ fMulDigit = mult ;
+ delete [] fDigitsList ;
+ delete [] fEnergyList ;
+ fDigitsList = new (Int_t[fMulDigit]) ;
+ fEnergyList = new ( Float_t[fMulDigit]) ;
+
+ for(Int_t iDigit=0;iDigit< fMulDigit ;iDigit++){
+ fDigitsList[iDigit] = tempo[iDigit];
+ fEnergyList[iDigit] = tempoE[iDigit] ;
+ }
+
+ delete [] tempo ;
+ delete [] tempoE ;
+
+}
+//____________________________________________________________________________
+void AliPHOSEmcRecPoint::Print(Option_t * option) const
{
// Print the list of digits belonging to the cluster
virtual Int_t GetNumberOfLocalMax(AliPHOSDigit ** maxAt, Float_t * maxAtEnergy,
Float_t locMaxCut,TClonesArray * digits ) const ;
// searches for the local maxima
+ //returns number of local maxima in parent cluster or -2 if unfolding failed
Float_t GetTime(void) const{return fTime ; }
Bool_t IsEmc(void) const { return kTRUE ; } // true if the recpoint is in EMC
Bool_t IsSortable() const {return kTRUE ; } // says that emcrecpoints are sortable objects
- void Print(Option_t * opt = "void") ;
+ void Print(Option_t * opt = "void")const ;
+ void Purify(Float_t threshold) ; //Removes digits below threshold
AliPHOSEmcRecPoint & operator = (const AliPHOSEmcRecPoint & rvalue) {
// assignement operator requested by coding convention but not needed