fGeom(NULL),
fCalibData(NULL),
fCaloPed(NULL),
- fADCchannelECA(0.),fADCpedestalECA(0.),
+ fADCchannelECA(0.),fADCpedestalECA(0.), fTimeECA(1.),
fTimeMin(-1.),fTimeMax(1.),fTimeCut(1.),
fDefaultInit(kFALSE),fToUnfold(kFALSE),
fNumberOfECAClusters(0), fECAClusteringThreshold(0.),
fGeom(geometry),
fCalibData(NULL),
fCaloPed(NULL),
- fADCchannelECA(0.),fADCpedestalECA(0.),
+ fADCchannelECA(0.),fADCpedestalECA(0.), fTimeECA(1.),
fTimeMin(-1.),fTimeMax(1.),fTimeCut(1.),
fDefaultInit(kFALSE),fToUnfold(kFALSE),
fNumberOfECAClusters(0), fECAClusteringThreshold(0.),
fGeom(geometry),
fCalibData(calib),
fCaloPed(caloped),
- fADCchannelECA(0.),fADCpedestalECA(0.),
+ fADCchannelECA(0.),fADCpedestalECA(0.), fTimeECA(1.),
fTimeMin(-1.),fTimeMax(1.),fTimeCut(1.),
fDefaultInit(kFALSE),fToUnfold(kFALSE),
fNumberOfECAClusters(0), fECAClusteringThreshold(0.),
}
//____________________________________________________________________________
-Float_t AliEMCALClusterizer::Calibrate(const Float_t amp, const Float_t time, const Int_t absId)
+void AliEMCALClusterizer::Calibrate(Float_t & amp, Float_t & time, const Int_t absId)
{
- // Convert digitized amplitude into energy.
- // Calibration parameters are taken from calibration data base for raw data,
- // or from digitizer parameters for simulated data.
+ // Convert digitized amplitude into energy, calibrate time
+ // Calibration parameters are taken from OCDB : OCDB/EMCAL/Calib/Data
//Return energy with default parameters if calibration is not available
if (!fCalibData&&!fCaloPed) {
if (fIsInputCalibrated == kTRUE)
{
AliDebug(10, Form("Input already calibrated!"));
- return amp;
+ return ;
}
- return -fADCpedestalECA + amp * fADCchannelECA ;
+ time *= fTimeECA ;
+ amp = amp * fADCchannelECA - fADCpedestalECA ;
+
+ return;
+
}
if (fGeom==0)
//assert(0); // GCB: This aborts reconstruction of raw simulations
//where simulation had more SM than default geometry,
//change to return 0, to avoid aborting good generations.
- return 0;
+ amp = 0;
+ time = 0;
+ return ;
}
fGeom->GetCellPhiEtaIndexInSModule(iSupMod,nModule,nIphi, nIeta,iphi,ieta);
Int_t channelStatus = (Int_t)(fCaloPed->GetDeadMap(iSupMod))->GetBinContent(ieta,iphi);
if(channelStatus == AliCaloCalibPedestal::kHot || channelStatus == AliCaloCalibPedestal::kDead) {
AliDebug(2,Form("Tower from SM %d, ieta %d, iphi %d is BAD : status %d !!!",iSupMod,ieta,iphi, channelStatus));
- return 0;
+ amp = 0 ;
+ time = 0 ;
+ return ;
}
}
//Check if time is too large or too small, indication of a noisy channel, remove in this case
- if(time > fTimeMax || time < fTimeMin) return 0;
+ if(time > fTimeMax || time < fTimeMin) {
+ amp = 0 ;
+ time = 0 ;
+ return ;
+ }
if (fIsInputCalibrated||!fCalibData)
{
AliDebug(10, Form("Input already calibrated!"));
- return amp;
+ return ;
}
fADCchannelECA = fCalibData->GetADCchannel (iSupMod,ieta,iphi);
fADCpedestalECA = fCalibData->GetADCpedestal(iSupMod,ieta,iphi);
-
- return -fADCpedestalECA + amp * fADCchannelECA ;
+ fTimeECA = fCalibData->GetTimeChannel(iSupMod,ieta,iphi);
+
+ time -= fTimeECA ;
+ amp = amp * fADCchannelECA - fADCpedestalECA ;
+
}
//____________________________________________________________________________
virtual void Digits2Clusters(Option_t *option) = 0;
- virtual Float_t Calibrate(const Float_t amp, const Float_t time, const Int_t cellId);
+ virtual void Calibrate(Float_t & amp, Float_t & time, const Int_t cellId);
virtual void Init();
virtual void InitParameters();
virtual void InitParameters(const AliEMCALRecParam* recParam);
Float_t fADCchannelECA; // width of one ADC channel for EC section (GeV)
Float_t fADCpedestalECA; // pedestal of ADC for EC section (GeV)
-
+ Float_t fTimeECA; // calibration parameter for channels time
+
Float_t fTimeMin; // minimum time of physical signal in a cell/digit
Float_t fTimeMax; // maximum time of physical signal in a cell/digit
Float_t fTimeCut; // maximum time difference between the digits inside EMC cluster
AliEMCALClusterizer(const AliEMCALClusterizer &);
AliEMCALClusterizer & operator = (const AliEMCALClusterizer &);
- ClassDef(AliEMCALClusterizer,6) // Clusterization algorithm class
+ ClassDef(AliEMCALClusterizer,7) // Clusterization algorithm class
};
#endif // AliEMCALCLUSTERIZER_H
fNumberOfECAClusters = 0;
fRecPoints->Delete();
- // Set up TObjArray with pointers to digits to work on
+ // Set up TObjArray with pointers to digits to work on, calibrate digits
TObjArray digitsC;
TIter nextdigit(fDigitsArr);
AliEMCALDigit *digit = 0;
while ( (digit = static_cast<AliEMCALDigit*>(nextdigit())) ) {
- Float_t dEnergyCalibrated = Calibrate(digit->GetAmplitude(), digit->GetTime(),digit->GetId());
+ Float_t dEnergyCalibrated = digit->GetAmplitude();
+ Float_t time = digit->GetTime();
+ Calibrate(dEnergyCalibrated,time ,digit->GetId());
digit->SetCalibAmp(dEnergyCalibrated);
+ digit->SetTime(time);
digitsC.AddLast(digit);
}
for (Int_t idig = 0; idig < clusterDigitList.GetEntries(); idig++)
{
digit = (AliEMCALDigit*)clusterDigitList.At(idig);
- Float_t dEnergyCalibrated = digit->GetCalibAmp();
AliDebug(5, Form(" Adding digit %d", digit->GetId()));
// note: this way the sharing info is lost!
- recPoint->AddDigit(*digit, dEnergyCalibrated, kFALSE); //Time or TimeR?
+ recPoint->AddDigit(*digit, digit->GetCalibAmp(), kFALSE); //Time or TimeR?
digitsC.Remove(digit);
}
}// recpoint
fRecPoints->Delete();
- // Set up TObjArray with pointers to digits to work on
+ // Set up TObjArray with pointers to digits to work on calibrated digits
TObjArray *digitsC = new TObjArray();
- TIter nextdigit(fDigitsArr);
AliEMCALDigit *digit;
- while ( (digit = dynamic_cast<AliEMCALDigit*>(nextdigit())) ) {
- digitsC->AddLast(digit);
- }
-
- double e = 0.0, ehs = 0.0;
- TIter nextdigitC(digitsC);
- while ( (digit = dynamic_cast<AliEMCALDigit *>(nextdigitC())) ) { // clean up digits
- e = Calibrate(digit->GetAmplitude(), digit->GetTime(),digit->GetId());//Time or TimeR?
- if ( e < fMinECut) //|| digit->GetTimeR() > fTimeCut ) // time window of cell checked in calibrate
- digitsC->Remove(digit);
- else
- ehs += e;
+ Float_t dEnergyCalibrated = 0.0, ehs = 0.0, time = 0.0;
+ TIter nextdigit(fDigitsArr);
+ while ( (digit = dynamic_cast<AliEMCALDigit *>(nextdigit())) ) { // calibrate and clean up digits
+ dEnergyCalibrated = digit->GetAmplitude();
+ time = digit->GetTime();
+ Calibrate(dEnergyCalibrated,time,digit->GetId());
+ digit->SetCalibAmp(dEnergyCalibrated);
+ digit->SetTime(time);
+ if ( dEnergyCalibrated < fMinECut){
+ continue;
+ }
+ else if (!fGeom->CheckAbsCellId(digit->GetId()))
+ continue;
+ else{
+ ehs += dEnergyCalibrated;
+ digitsC->AddLast(digit);
+ }
}
+
AliDebug(1,Form("MakeClusters: Number of digits %d -> (e %f), ehs %f\n",
fDigitsArr->GetEntries(),fMinECut,ehs));
- nextdigitC.Reset();
-
+ TIter nextdigitC(digitsC);
while ( (digit = dynamic_cast<AliEMCALDigit *>(nextdigitC())) ) { // scan over the list of digitsC
TArrayI clusterECAdigitslist(fDigitsArr->GetEntries());
-
- if(fGeom->CheckAbsCellId(digit->GetId()) && (Calibrate(digit->GetAmplitude(), digit->GetTime(),digit->GetId()) > fECAClusteringThreshold ) ){
+ dEnergyCalibrated = digit->GetCalibAmp();
+ time = digit->GetTime();
+ if(fGeom->CheckAbsCellId(digit->GetId()) && ( dEnergyCalibrated > fECAClusteringThreshold ) ){
// start a new Tower RecPoint
if(fNumberOfECAClusters >= fRecPoints->GetSize()) fRecPoints->Expand(2*fNumberOfECAClusters+1);
fNumberOfECAClusters++;
recPoint->SetClusterType(AliVCluster::kEMCALClusterv1);
-
- recPoint->AddDigit(*digit, Calibrate(digit->GetAmplitude(), digit->GetTime(),digit->GetId()),kFALSE); //Time or TimeR?
+ recPoint->AddDigit(*digit, digit->GetCalibAmp(), kFALSE); //Time or TimeR?
TObjArray clusterDigits;
clusterDigits.AddLast(digit);
digitsC->Remove(digit);
- AliDebug(1,Form("MakeClusters: OK id = %d, ene = %f , cell.th. = %f \n", digit->GetId(),
- Calibrate(digit->GetAmplitude(),digit->GetTime(),digit->GetId()), fECAClusteringThreshold)); //Time or TimeR?
- Float_t time = digit->GetTime();//Time or TimeR?
+ AliDebug(1,Form("MakeClusters: OK id = %d, ene = %f , cell.th. = %f \n", digit->GetId(), dEnergyCalibrated, fECAClusteringThreshold)); //Time or TimeR?
+
// Grow cluster by finding neighbours
TIter nextClusterDigit(&clusterDigits);
+
while ( (digit = dynamic_cast<AliEMCALDigit*>(nextClusterDigit())) ) { // scan over digits in cluster
TIter nextdigitN(digitsC);
AliEMCALDigit *digitN = 0; // digi neighbor
while ( (digitN = (AliEMCALDigit *)nextdigitN()) ) { // scan over all digits to look for neighbours
-
//Do not add digits with too different time
Bool_t shared = kFALSE;//cluster shared by 2 SuperModules?
if(TMath::Abs(time - digitN->GetTime()) > fTimeCut ) continue; //Time or TimeR?
if (AreNeighbours(digit, digitN, shared)==1) { // call (digit,digitN) in THAT order !!!!!
- recPoint->AddDigit(*digitN, Calibrate(digitN->GetAmplitude(), digitN->GetTime(), digitN->GetId()),shared); //Time or TimeR?
+ recPoint->AddDigit(*digitN, digitN->GetCalibAmp(), shared);
clusterDigits.AddLast(digitN);
digitsC->Remove(digitN);
} // if(ineb==1)
fRecPoints->Delete();
- // set up TObjArray with pointers to digits to work on
+ // set up TObjArray with pointers to digits to work on, calibrate digits
TObjArray digitsC;
Double_t ehs = 0.0;
AliEMCALDigit *digit = 0;
TIter nextdigit(fDigitsArr);
while ( (digit = static_cast<AliEMCALDigit*>(nextdigit())) ) {
- Float_t dEnergyCalibrated = Calibrate(digit->GetAmplitude(), digit->GetTime(),digit->GetId());
+ Float_t dEnergyCalibrated = digit->GetAmplitude();
+ Float_t time = digit->GetTime();
+ Calibrate(dEnergyCalibrated, time ,digit->GetId());
digit->SetCalibAmp(dEnergyCalibrated);
+ digit->SetTime(time);
if (dEnergyCalibrated < fMinECut)
continue;
if (!fGeom->CheckAbsCellId(digit->GetId()))
nextdigitC.Reset();
while ( (digit = static_cast<AliEMCALDigit *>(nextdigitC())) ) {
Float_t dEnergyCalibrated = digit->GetCalibAmp();
- if (dEnergyCalibrated>fECAClusteringThreshold && dEnergyCalibrated>dMaxEnergyDigit) {
+ if (dEnergyCalibrated>fECAClusteringThreshold && dEnergyCalibrated>dMaxEnergyDigit) {
dMaxEnergyDigit = dEnergyCalibrated;
iMaxEnergyDigit = digit->GetId();
pMaxEnergyDigit = digit;
AliEMCALRecPoint *recPoint = new AliEMCALRecPoint("");
recPoint->SetClusterType(AliVCluster::kEMCALClusterv1);
- recPoint->AddDigit(*pMaxEnergyDigit, dMaxEnergyDigit, kFALSE);
+ recPoint->AddDigit(*pMaxEnergyDigit, pMaxEnergyDigit->GetCalibAmp(), kFALSE);
fRecPoints->AddAt(recPoint, fNumberOfECAClusters++);
digitsC.Remove(pMaxEnergyDigit);
TObjArray clusterDigits;
}
//____________________________________________________________________________
-void AliEMCALRecPoint::AddDigit(AliEMCALDigit & digit, Float_t energy, Bool_t shared)
+void AliEMCALRecPoint::AddDigit(AliEMCALDigit & digit, const Float_t energy, const Bool_t shared)
{
// Adds a digit to the RecPoint
// and accumulates the total amplitude and the multiplicity
if(fEnergyList == 0)
fEnergyList = new Float_t[fMaxDigit];
if(fTimeList == 0)
- fTimeList = new Float_t[fMaxDigit];
+ fTimeList = new Float_t[fMaxDigit];
if(fAbsIdList == 0) {
- fAbsIdList = new Int_t[fMaxDigit];
+ fAbsIdList = new Int_t [fMaxDigit];
}
if ( fMulDigit >= fMaxDigit ) { // increase the size of the lists
fMaxDigit*=2 ;
- Int_t * tempo = new Int_t[fMaxDigit];
+ Int_t * tempo = new Int_t [fMaxDigit];
Float_t * tempoE = new Float_t[fMaxDigit];
Float_t * tempoT = new Float_t[fMaxDigit];
- Int_t * tempoId = new Int_t[fMaxDigit];
+ Int_t * tempoId = new Int_t [fMaxDigit];
Int_t index ;
for ( index = 0 ; index < fMulDigit ; index++ ){
- tempo[index] = fDigitsList[index] ;
- tempoE[index] = fEnergyList[index] ;
- tempoT[index] = fTimeList[index] ;
- tempoId[index] = fAbsIdList[index] ;
+ tempo [index] = fDigitsList[index] ;
+ tempoE [index] = fEnergyList[index] ;
+ tempoT [index] = fTimeList [index] ;
+ tempoId[index] = fAbsIdList [index] ;
}
delete [] fDigitsList ;
fDigitsList[fMulDigit] = digit.GetIndexInList() ;
fEnergyList[fMulDigit] = energy ;
- fTimeList[fMulDigit] = digit.GetTimeR() ;
- fAbsIdList[fMulDigit] = digit.GetId();
+ fTimeList [fMulDigit] = digit.GetTime();
+ fAbsIdList [fMulDigit] = digit.GetId();
fMulDigit++ ;
fAmp += energy ;
virtual ~AliEMCALRecPoint();
- virtual void AddDigit(AliDigitNew &) const {
- Fatal("AddDigit", "use AddDigit(AliEMCALDigit & digit, Float_t Energy )") ;
- }
- virtual void AddDigit(AliEMCALDigit & digit, Float_t Energy, Bool_t shared);
+ virtual void AddDigit(AliEMCALDigit & digit, const Float_t energy, const Bool_t shared);
virtual Int_t Compare(const TObject * obj) const;
- //virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);//Not used, remove?
virtual void Draw(Option_t * option="") ;
- //virtual void ExecuteEvent(Int_t event, Int_t, Int_t) ;//Not used, remove?
- virtual void SetClusterType(Int_t ver) { fClusterType = ver; }
- virtual Int_t GetClusterType() const { return fClusterType; }
+ virtual void SetClusterType(Int_t ver) { fClusterType = ver ; }
+ virtual Int_t GetClusterType() const { return fClusterType; }
- virtual void EvalAll(Float_t logWeight, TClonesArray * digits, const Bool_t justClusters);
+ virtual void EvalAll (Float_t logWeight, TClonesArray * digits, const Bool_t justClusters);
virtual void EvalLocalPosition (Float_t logWeight, TClonesArray * digits);
virtual void EvalGlobalPosition(Float_t logWeight, TClonesArray * digits);
virtual void EvalPrimaries(TClonesArray * digits) ;
- virtual void EvalParents(TClonesArray * digits) ;
+ virtual void EvalParents (TClonesArray * digits) ;
- virtual int * GetDigitsList(void) const { return fDigitsList ; }
- virtual Float_t GetEnergy() const {return fAmp; }
-
- void EvalLocal2TrackingCSTransform();
- void EvalLocalPositionFit(Double_t deff, Double_t w0, Double_t phiSlope,TClonesArray * digits);
- Bool_t EvalLocalPosition2(TClonesArray *digits, TArrayD &ed);
-
- Bool_t EvalLocalPositionFromDigits(const Double_t esum, const Double_t deff, const Double_t w0,
+ void EvalLocal2TrackingCSTransform();
+ void EvalLocalPositionFit(Double_t deff, Double_t w0, Double_t phiSlope,TClonesArray * digits);
+ Bool_t EvalLocalPosition2(TClonesArray *digits, TArrayD &ed);
+ Bool_t EvalLocalPositionFromDigits(const Double_t esum, const Double_t deff, const Double_t w0,
TClonesArray *digits, TArrayD &ed, TVector3 &locPos);
- Bool_t EvalLocalPositionFromDigits(TClonesArray *digits, TArrayD &ed, TVector3 &locPos);
+ Bool_t EvalLocalPositionFromDigits(TClonesArray *digits, TArrayD &ed, TVector3 &locPos);
static void GetDeffW0(const Double_t esum, Double_t &deff, Double_t &w0);
- //virtual void GetGlobalPosition(TVector3 & gpos, TMatrixF & gmat) const; // return global position (x, y, z) in ALICE
virtual void GetGlobalPosition(TVector3 & gpos) const; // return global position (x, y, z) in ALICE
- virtual void GetLocalPosition(TVector3 & lpos) const; // return local position (x, y, z) in EMCAL SM
- virtual Int_t * GetPrimaries(Int_t & number) const {number = fMulTrack ;
- return fTracksList ; }
- virtual Int_t * GetParents(Int_t & number) const {number = fMulParent ;
- return fParentsList ; }
+ virtual void GetLocalPosition (TVector3 & lpos) const; // return local position (x, y, z) in EMCAL SM
+
+ virtual Int_t * GetPrimaries(Int_t & number) const { number = fMulTrack ;
+ return fTracksList ; }
+ virtual Int_t * GetParents (Int_t & number) const { number = fMulParent ;
+ return fParentsList ; }
- virtual Int_t GetDigitsMultiplicity(void) const { return fMulDigit ; }
+ virtual Int_t GetDigitsMultiplicity(void) const { return fMulDigit ; }
Int_t GetIndexInList() const { return fIndexInList ; }
-
- Float_t GetCoreEnergy()const {return fCoreEnergy ;}
- virtual Float_t GetDispersion()const {return fDispersion ;}
- virtual void GetElipsAxis(Float_t * lambda)const {lambda[0] = fLambda[0]; lambda[1] = fLambda[1];};
-
- Float_t * GetEnergiesList() const {return fEnergyList ;} // gets the list of energies making this recpoint
- Double_t GetPointEnergy() const; // gets point energy (sum of energy list)
- Float_t * GetTimeList() const {return fTimeList ;} // gets the list of digit times in this recpoint
- Float_t GetMaximalEnergy(void) const ; // get the highest energy in the cluster
- Int_t GetMaximalEnergyIndex(void) const ; // get the index of highest energy digit
- Int_t GetMaximumMultiplicity() const {return fMaxDigit ;} // gets the maximum number of digits allowed
- Int_t GetMultiplicity(void) const { return fMulDigit ; } // gets the number of digits making this recpoint
- Int_t GetMultiplicityAtLevel(Float_t level) const ; // computes multiplicity of digits with
- Int_t * GetAbsId() const {return fAbsIdList;}
- Int_t GetAbsId(Int_t i) const {if(i>=0 && i<fMulDigit)return fAbsIdList[i]; else return -1;}
- Int_t GetAbsIdMaxDigit() const {return GetAbsId(fDigitIndMax);}
- Int_t GetIndMaxDigit() const {return fDigitIndMax;}
- void SetIndMaxDigit(const Int_t ind) {fDigitIndMax = ind;}
- void SetIndexInList(Int_t val) { fIndexInList = val ; }
-
- virtual Int_t GetSuperModuleNumber(void) const { return fSuperModuleNumber;}
+ virtual int * GetDigitsList(void) const { return fDigitsList ; }
+ virtual Float_t GetEnergy() const { return fAmp ; }
+ Float_t GetCoreEnergy() const { return fCoreEnergy ; }
+ virtual Float_t GetDispersion() const { return fDispersion ; }
+ virtual void GetElipsAxis(Float_t * lambda) const {lambda[0] = fLambda[0]; lambda[1] = fLambda[1];};
+ Float_t * GetEnergiesList() const { return fEnergyList ; } // gets the list of energies making this recpoint
+ Double_t GetPointEnergy() const; // gets point energy (sum of energy list)
+ Float_t * GetTimeList() const { return fTimeList ; } // gets the list of digit times in this recpoint
+ Float_t GetMaximalEnergy(void) const ; // get the highest energy in the cluster
+ Int_t GetMaximalEnergyIndex(void) const ; // get the index of highest energy digit
+ Int_t GetMaximumMultiplicity() const { return fMaxDigit ; } // gets the maximum number of digits allowed
+ Int_t GetMultiplicity(void) const { return fMulDigit ; } // gets the number of digits making this recpoint
+ Int_t GetMultiplicityAtLevel(Float_t level) const ; // computes multiplicity of digits with
+ Int_t * GetAbsId() const { return fAbsIdList ; }
+ Int_t GetAbsId(Int_t i) const { if(i>=0 && i<fMulDigit)
+ return fAbsIdList[i];
+ else return -1 ; }
+ Int_t GetAbsIdMaxDigit() const { return GetAbsId(fDigitIndMax) ; }
+ Int_t GetIndMaxDigit() const { return fDigitIndMax ; }
+ void SetIndMaxDigit(const Int_t ind) { fDigitIndMax = ind ; }
+ void SetIndexInList(Int_t val) { fIndexInList = val ; }
+
+ virtual Int_t GetSuperModuleNumber(void) const { return fSuperModuleNumber;}
// energy above relative level
- virtual Int_t GetNumberOfLocalMax(AliEMCALDigit ** maxAt, Float_t * maxAtEnergy,
- Float_t locMaxCut,TClonesArray * digits ) const ;
+ virtual Int_t GetNumberOfLocalMax(AliEMCALDigit ** maxAt, Float_t * maxAtEnergy,
+ Float_t locMaxCut,TClonesArray * digits ) const ;
// searches for the local maxima
// Number of local maxima found in cluster in unfolding:
// 0: no unfolding
//-1: unfolding failed
- Short_t GetNExMax(void) const { return fNExMax ;} // Number of maxima found in cluster in unfolding
- void SetNExMax(Int_t nmax=1) {fNExMax = static_cast<Short_t>(nmax) ;}
+ Short_t GetNExMax(void) const { return fNExMax ; } // Number of maxima found in cluster in unfolding
+ void SetNExMax(Int_t nmax=1) { fNExMax = static_cast<Short_t>(nmax) ;}
- Int_t GetPrimaryIndex() const ;
+ Int_t GetPrimaryIndex() const ;
- Float_t GetTime(void) const { return fTime ; }
+ Float_t GetTime(void) const { return fTime ; }
- Bool_t SharedCluster(void) const { return fSharedCluster ; }
- void SetSharedCluster(Bool_t s){ fSharedCluster = s ; }
+ Bool_t SharedCluster(void) const { return fSharedCluster ; }
+ void SetSharedCluster(Bool_t s) { fSharedCluster = s ; }
- virtual Bool_t IsEmc(void) const { return kTRUE ; }
- virtual Bool_t IsSortable() const {
- // tells that this is a sortable object
- return kTRUE ;
- }
+ virtual Bool_t IsEmc(void) const { return kTRUE ; }
+ virtual Bool_t IsSortable() const { return kTRUE ; }
virtual void Paint(Option_t * option="");
virtual void Print(Option_t * option="") const ;
- Double_t TmaxInCm(const Double_t e=0.0, const Int_t key=0);
+ Double_t TmaxInCm(const Double_t e=0.0, const Int_t key=0);
- Float_t GetDistanceToBadTower() const {return fDistToBadTower;}
- void EvalDistanceToBadChannels(AliCaloCalibPedestal* caloped);
+ Float_t GetDistanceToBadTower() const {return fDistToBadTower;}
+ void EvalDistanceToBadChannels(AliCaloCalibPedestal* caloped);
protected:
- void EvalCoreEnergy(Float_t logWeight,TClonesArray * digits) ;
- virtual void EvalDispersion(Float_t logWeight,TClonesArray * digits) ; // computes the dispersion of the shower
- virtual void EvalElipsAxis(Float_t logWeight, TClonesArray * digits ); // computes the axis of shower ellipsoide
- void EvalTime( TClonesArray * digits );
+ void EvalCoreEnergy(Float_t logWeight, TClonesArray * digits) ;
+ virtual void EvalDispersion(Float_t logWeight, TClonesArray * digits) ; // computes the dispersion of the shower
+ virtual void EvalElipsAxis (Float_t logWeight, TClonesArray * digits ); // computes the axis of shower ellipsoide
+ void EvalTime( TClonesArray * digits );
virtual Bool_t AreNeighbours(AliEMCALDigit * digit1, AliEMCALDigit * digit2 ) const;
- Float_t ThetaToEta(Float_t arg) const; //Converts Theta (Radians) to Eta(Radians)
- Float_t EtaToTheta(Float_t arg) const; //Converts Eta (Radians) to Theta(Radians)
+ Float_t ThetaToEta(Float_t arg) const; //Converts Theta (Radians) to Eta(Radians)
+ Float_t EtaToTheta(Float_t arg) const; //Converts Eta (Radians) to Theta(Radians)
private:
- //JLK do we need this?
AliEMCALGeometry* fGeomPtr; //! Pointer to geometry for utilities
- Float_t fAmp ; // summed amplitude of digits
- Int_t fIndexInList ; // the index of this RecPoint in the
- // list stored in TreeR (to be set by analysis)
- TVector3 fGlobPos ; // global position
- TVector3 fLocPos ; // local position in the sub-detector coordinate
- Int_t fMaxDigit ; //! max initial size of digits array (not saved)
- Int_t fMulDigit ; // total multiplicity of digits
- Int_t fMaxTrack ; //! max initial size of tracks array (not saved)
- Int_t fMulTrack ; // total multiplicity of tracks
- Int_t * fDigitsList ; //[fMulDigit] list of digit's indexes from which the point was reconstructed
- Int_t * fTracksList ; //[fMulTrack] list of tracks to which the point was assigned
-
- Int_t fClusterType; // type of cluster stored: v1
- Float_t fCoreEnergy ; // energy in a shower core
- Float_t fLambda[2] ; // shower ellipse axes
- Float_t fDispersion ; // shower dispersion
- Float_t *fEnergyList ; //[fMulDigit] energy of digits
- Float_t *fTimeList ; //[fMulDigit] time of digits
- Int_t *fAbsIdList; //[fMulDigit] absId of digits
- Float_t fTime ; // Time of the digit with maximal energy deposition
- Short_t fNExMax ; // number of (Ex-)maxima before unfolding
- Float_t fCoreRadius; // The radius in which the core energy is evaluated
- Float_t *fDETracksList ; //[fMulTrack] list of tracks to which the point was assigned
- Int_t fMulParent; // Multiplicity of the parents
- Int_t fMaxParent; // Maximum number of parents allowed
- Int_t * fParentsList; // [fMulParent] list of the parents of the digits
- Float_t * fDEParentsList; // [fMulParent] list of the parents of the digits
- Int_t fSuperModuleNumber; // number identifying supermodule containing recpoint, reference is cell with maximum energy.
- Int_t fDigitIndMax; // Index of digit with max energy in array fAbsIdList
- Float_t fDistToBadTower; // Distance to nearest bad tower
- Bool_t fSharedCluster; // States if cluster is shared by 2 SuperModules in same phi rack (0,1), (2,3) ... (10,11).
+ Float_t fAmp ; // summed amplitude of digits
+ Int_t fIndexInList ; // the index of this RecPoint in the
+ // list stored in TreeR (to be set by analysis)
+ TVector3 fGlobPos ; // global position
+ TVector3 fLocPos ; // local position in the sub-detector coordinate
+ Int_t fMaxDigit ; //! max initial size of digits array (not saved)
+ Int_t fMulDigit ; // total multiplicity of digits
+ Int_t fMaxTrack ; //! max initial size of tracks array (not saved)
+ Int_t fMulTrack ; // total multiplicity of tracks
+ Int_t *fDigitsList ; //[fMulDigit] list of digit's indexes from which the point was reconstructed
+ Int_t *fTracksList ; //[fMulTrack] list of tracks to which the point was assigned
+
+ Int_t fClusterType; // type of cluster stored: v1
+ Float_t fCoreEnergy ; // energy in a shower core
+ Float_t fLambda[2] ; // shower ellipse axes
+ Float_t fDispersion ; // shower dispersion
+ Float_t *fEnergyList ; //[fMulDigit] energy of digits
+ Float_t *fTimeList ; //[fMulDigit] time of digits
+ Int_t *fAbsIdList; //[fMulDigit] absId of digits
+ Float_t fTime ; // Time of the digit with maximal energy deposition
+ Short_t fNExMax ; // number of (Ex-)maxima before unfolding
+ Float_t fCoreRadius; // The radius in which the core energy is evaluated
+ Float_t *fDETracksList ; //[fMulTrack] list of tracks to which the point was assigned
+ Int_t fMulParent; // Multiplicity of the parents
+ Int_t fMaxParent; // Maximum number of parents allowed
+ Int_t *fParentsList; // [fMulParent] list of the parents of the digits
+ Float_t *fDEParentsList; // [fMulParent] list of the parents of the digits
+ Int_t fSuperModuleNumber; // number identifying supermodule containing recpoint, reference is cell with maximum energy.
+ Int_t fDigitIndMax; // Index of digit with max energy in array fAbsIdList
+ Float_t fDistToBadTower; // Distance to nearest bad tower
+ Bool_t fSharedCluster; // States if cluster is shared by 2 SuperModules in same phi rack (0,1), (2,3) ... (10,11).
ClassDef(AliEMCALRecPoint,12) // RecPoint for EMCAL (Base Class)
#include "AliEMCALRawUtils.h"
#include "AliEMCALDigit.h"
#include "AliEMCALClusterizerv1.h"
+#include "AliEMCALClusterizerv2.h"
#include "AliEMCALClusterizerNxN.h"
#include "AliEMCALRecPoint.h"
#include "AliEMCALPID.h"
//printf("ReCreate clusterizer? Clusterizer set <%d>, Clusterizer in use <%s>\n",
// clusterizerType, fgClusterizer->Version());
- if (clusterizerType == AliEMCALRecParam::kClusterizerv1 && !strcmp(fgClusterizer->Version(),"clu-v1")) return;
+ if (clusterizerType == AliEMCALRecParam::kClusterizerv1 && !strcmp(fgClusterizer->Version(),"clu-v1")) return;
else if(clusterizerType == AliEMCALRecParam::kClusterizerNxN && !strcmp(fgClusterizer->Version(),"clu-NxN")) return;
+ else if(clusterizerType == AliEMCALRecParam::kClusterizerv2 && !strcmp(fgClusterizer->Version(),"clu-v2")) return;
+
//Need to create new clusterizer, the one set previously is not the correct one
delete fgClusterizer;
}
else return;
}
- if (clusterizerType == AliEMCALRecParam::kClusterizerv1)
+ if (clusterizerType == AliEMCALRecParam::kClusterizerv1)
{
- fgClusterizer = new AliEMCALClusterizerv1(fGeom, fCalibData,fPedestalData);
+ fgClusterizer = new AliEMCALClusterizerv1 (fGeom, fCalibData,fPedestalData);
}
- else
+ else if (clusterizerType == AliEMCALRecParam::kClusterizerNxN)
{
fgClusterizer = new AliEMCALClusterizerNxN(fGeom, fCalibData,fPedestalData);
}
+ else if (clusterizerType == AliEMCALRecParam::kClusterizerv2)
+ {
+ fgClusterizer = new AliEMCALClusterizerv2 (fGeom, fCalibData,fPedestalData);
+ }
+ else
+ {
+ AliFatal(Form("Unknown clusterizer %d ", clusterizerType));
+ }
}
//____________________________________________________________________________
Int_t nDigits = fgDigitsArr->GetEntries(), idignew = 0 ;
AliDebug(1,Form("%d digits",nDigits));
-
AliESDCaloCells &emcCells = *(esd->GetEMCALCells());
emcCells.CreateContainer(nDigits);
emcCells.SetType(AliVCaloCells::kEMCALCell);
Float_t energy = 0;
+ Float_t time = 0;
for (Int_t idig = 0 ; idig < nDigits ; idig++) {
const AliEMCALDigit * dig = (const AliEMCALDigit*)fgDigitsArr->At(idig);
- if(dig->GetAmplitude() > 0 ){
- energy = fgClusterizer->Calibrate(dig->GetAmplitude(),dig->GetTime(),dig->GetId()); //TimeR or Time?
- if(energy > 0){ //Digits tagged as bad (dead, hot, not alive) are set to 0 in calibrate, remove them
- emcCells.SetCell(idignew,dig->GetId(),energy, dig->GetTime());
+ time = dig->GetTime(); // Time already calibrated in clusterizer
+ energy = dig->GetAmplitude(); // energy calibrated in clusterizer
+ if(energy > 0 ){
+ fgClusterizer->Calibrate(energy,time,dig->GetId()); //Digits already calibrated in clusterizers
+ if(energy > 0){ //Digits tagged as bad (dead, hot, not alive) are set to 0 in calibrate, remove them
+ emcCells.SetCell(idignew,dig->GetId(),energy, time);
idignew++;
}
}