#include "AliEMCALDigit.h"
#include "AliEMCALGeometry.h"
+#include "AliEMCALGetter.h"
ClassImp(AliEMCALDigit)
fIndexInList = -1 ;
fNprimary = 0 ;
- fNMaxPrimary = 21 ;
+ fNMaxPrimary = 5 ;
fNiparent = 0 ;
fNMaxiparent = fNMaxPrimary*10;
+ fPrimary = new Int_t[fNMaxPrimary] ;
+ fIparent = new Int_t[fNMaxiparent] ;
}
//____________________________________________________________________________
{
// ctor with all data
- fNMaxPrimary = 21 ;
+ fNMaxPrimary = 5 ;
fNMaxiparent = fNMaxPrimary*10;
+ fPrimary = new Int_t[fNMaxPrimary] ;
+ fIparent = new Int_t[fNMaxiparent] ;
fAmp = DigEnergy ;
fTime = time ;
fId = id ;
fNMaxPrimary = digit.fNMaxPrimary ;
fNMaxiparent = digit.fNMaxiparent ;
+ fPrimary = new Int_t[fNMaxPrimary] ;
+ fIparent = new Int_t[fNMaxiparent] ;
Int_t i ;
for ( i = 0; i < fNMaxPrimary ; i++)
fPrimary[i] = digit.fPrimary[i] ;
AliEMCALDigit::~AliEMCALDigit()
{
// Delete array of primiries if any
-
+ delete [] fPrimary ;
+ delete [] fIparent ;
}
//____________________________________________________________________________
}
+//______________________________________________________________________
+const Bool_t AliEMCALDigit::IsInPreShower() const
+{
+ Bool_t rv = kFALSE ;
+ const AliEMCALGeometry * geom = AliEMCALGetter::GetInstance()->EMCALGeometry() ;
+ if( GetId() > (geom->GetNZ() * geom->GetNPhi() ))
+ rv = kTRUE;
+ return rv;
+}
//____________________________________________________________________________
void AliEMCALDigit::ShiftPrimary(Int_t shift){
Int_t GetIparent(Int_t index) const ;
const Float_t GetPhi() const;
Float_t GetTime(void) const {return fTime ;}
-
+ const Bool_t IsInPreShower() const ;
Bool_t IsSortable() const {
// says that AliEMCALDigits are sortable (needed for Sort method
return kTRUE ; }
- void SetAmp(Int_t Amp) {
+ void SetAmp(Int_t amp) {
// sets the amplitude data member
- fAmp= Amp ; }
- void SetTime(Float_t Time) {fTime = Time ;}
+ fAmp= amp ; }
+ void SetId(Int_t id) {fId = id ;}
+ void SetTime(Float_t time) {fTime = time ;}
void ShiftPrimary(Int_t shift); // shift to semarate different TreeK in merging
- private:
-
+ private:
Int_t fNprimary ; // Number of primaries
- Int_t fNMaxPrimary ; //! Max Number of primaries
- Int_t fPrimary[5] ; // Array of primaries
+ Int_t fNMaxPrimary ; // Max Number of primaries
+ Int_t *fPrimary ; //[fNMaxPrimary] Array of primaries
Int_t fNiparent ; // Number of initial parents
- Int_t fNMaxiparent ; //! Max Number of parents
- Int_t fIparent[50] ; // Array of parents
+ Int_t fNMaxiparent ; // Max Number of parents
+ Int_t *fIparent ; //[fNMaxiparent] Array of parents
Float_t fTime ; // Calculated time
ClassDef(AliEMCALDigit,1) // Digit in EMCAL