//Evaluate position, dispersion and other RecPoint properties for EC section
for(index = 0; index < fRecPoints->GetEntries(); index++) {
- if (dynamic_cast<AliEMCALRecPoint *>(fRecPoints->At(index))->GetClusterType() != AliESDCaloCluster::kPseudoCluster)
+ if (dynamic_cast<AliEMCALRecPoint *>(fRecPoints->At(index))->GetClusterType() != AliESDCaloCluster::kEMCALPseudoCluster)
dynamic_cast<AliEMCALRecPoint *>(fRecPoints->At(index))->EvalAll(fECAW0,fDigitsArr) ;
}
nSM = fGeom->GetSuperModuleNumber(digit->GetId());
if(recPoints[nSM] == 0) {
recPoints[nSM] = new AliEMCALRecPoint(Form("PC%2.2i", nSM));
- recPoints[nSM]->SetClusterType(AliESDCaloCluster::kPseudoCluster);
+ recPoints[nSM]->SetClusterType(AliESDCaloCluster::kEMCALPseudoCluster);
}
recPoints[nSM]->AddDigit(*digit, Calibrate(digit->GetAmp(), digit->GetId()));
}
recPoint = dynamic_cast<AliEMCALRecPoint *>(fRecPoints->At(fNumberOfECAClusters)) ;
fNumberOfECAClusters++ ;
- recPoint->SetClusterType(AliESDCaloCluster::kClusterv1);
+ recPoint->SetClusterType(AliESDCaloCluster::kEMCALClusterv1);
recPoint->AddDigit(*digit, Calibrate(digit->GetAmp(), digit->GetId())) ;
TObjArray clusterDigits;
// const UShort_t* dgAmp = cl->GetDigitAmplitude(); // This is energy - bad definition
rp = new AliEMCALRecPoint(""); // opt=""
- rp->SetClusterType(AliESDCaloCluster::kClusterv1);
+ rp->SetClusterType(AliESDCaloCluster::kEMCALClusterv1);
AliEMCALDigit* dg=0;
TClonesArray digits("AliEMCALDigit", ndg);
Int_t absId = 0;
/* History of cvs commits:
*
* $Log$
+ * Revision 1.14 2007/07/26 16:54:53 morsch
+ * Changes in AliESDEvent fwd declarartions.
+ *
* Revision 1.13 2007/07/11 13:43:29 hristov
* New class AliESDEvent, backward compatibility with the old AliESD (Christian)
*
lambda0 = clust->GetM02();
// verify cluster type
Int_t clusterType= clust->GetClusterType();
- if (clusterType == AliESDCaloCluster::kClusterv1 && lambda0 != 0 && energy < 1000) {
+ if (clusterType == AliESDCaloCluster::kEMCALClusterv1 && lambda0 != 0 && energy < 1000) {
// reject clusters with lambda0 = 0
* provided "as is" without express or implied warranty. *
**************************************************************************/
-/* $Log$co: warning: `/* $Log' is obsolescent; use ` * $Log'.
+/* $Log$
+/* Revision 1.2 2007/09/11 19:38:15 pavlinov
+/* added pi0 calibration, linearity, shower profile
+/*co: warning: `/* $Log' is obsolescent; use ` * $Log'.
* Revision 1.1 2007/08/08 15:58:01 hristov
* New calibration classes. (Aleksei)
* */
static Double_t erec=0., ecorr=0.0;
for(int i=indOfFirstEmcalRP; i<indOfFirstEmcalRP+nEmcalClusters; i++) {
cl = fESD->GetCaloCluster(i);
- if(cl->GetClusterType() == AliESDCaloCluster::kPseudoCluster) {
+ if(cl->GetClusterType() == AliESDCaloCluster::kEMCALPseudoCluster) {
nEmcalPseudoClusters++;
l = fLofHistsPC;
- } else if(cl->GetClusterType() == AliESDCaloCluster::kClusterv1){
+ } else if(cl->GetClusterType() == AliESDCaloCluster::kEMCALClusterv1){
nEmcalRP++;
if(fEMCAL->GetIterationNumber()>1||GetKeyOptsValue(kIDEAL)||GetKeyOptsValue(kRECALIB)||GetKeyOptsValue(kFIT)) {
AliEMCALRecPoint *rp=0;
for(int id=0; id<cl->GetNumberOfDigits(); id++) {
eDigi = double(digiAmpl[id]) / 500.; // See AliEMCALClusterizerv1
// if(eDigi <= 0.0) { // sometimes it is happen
- //if(eDigi > 10.0 && cl->GetClusterType() == AliESDCaloCluster::kClusterv1) {
+ //if(eDigi > 10.0 && cl->GetClusterType() == AliESDCaloCluster::kEMCALClusterv1) {
// printf(" %i digiAmpl %i : %f \n", id, int(digiAmpl[id]), eDigi);
//}
u::FillH1(l, 5, eDigi);
for (Int_t iClust = 0 ; iClust < nClusters ; iClust++) {
const AliEMCALRecPoint * clust = (const AliEMCALRecPoint*)clusters->At(iClust);
- //if(clust->GetClusterType()== AliESDCaloCluster::kClusterv1) nRP++; else nPC++;
+ //if(clust->GetClusterType()== AliESDCaloCluster::kEMCALClusterv1) nRP++; else nPC++;
if (Debug()) clust->Print();
// Get information from EMCAL reconstruction points
Float_t xyz[3];
digiList[newdigitMult] = (UShort_t)(digitInts[iDigit]);
newdigitMult++;
}
- else if (clust->GetClusterType() != AliESDCaloCluster::kPseudoCluster)
+ else if (clust->GetClusterType() != AliESDCaloCluster::kEMCALPseudoCluster)
Warning("FillESD()","Negative or 0 digit amplitude in cluster");
}
// fills the ESDCaloCluster
AliESDCaloCluster * ec = new AliESDCaloCluster() ;
- ec->SetEMCAL(kTRUE);
ec->SetClusterType(clust->GetClusterType());
ec->SetPosition(xyz);
ec->SetE(clust->GetEnergy());
ec->AddDigitTime(arrayTimeList);
ec->AddDigitIndex(arrayIndexList);
- if(clust->GetClusterType()== AliESDCaloCluster::kClusterv1){
+ if(clust->GetClusterType()== AliESDCaloCluster::kEMCALClusterv1){
ec->SetClusterDisp(clust->GetDispersion());
ec->SetClusterChi2(-1); //not yet implemented
for (Int_t i = 0; i < nClusters; i++) {
AliEMCALRecPoint *cluster = (AliEMCALRecPoint*)clusters->At(i);
if (!cluster) continue;
- if (cluster->GetClusterType() != AliESDCaloCluster::kClusterv1) continue;
+ if (cluster->GetClusterType() != AliESDCaloCluster::kEMCALClusterv1) continue;
AliEMCALMatchCluster *matchCluster = new AliEMCALMatchCluster(i, cluster);
fClusters->AddLast(matchCluster);
}
for (i = start; i < end; i++) {
AliESDCaloCluster *cluster = esd->GetCaloCluster(i);
if (!cluster) continue;
- if (cluster->GetClusterType() != AliESDCaloCluster::kClusterv1) continue;
+ if (cluster->GetClusterType() != AliESDCaloCluster::kEMCALClusterv1) continue;
AliEMCALMatchCluster *matchCluster = new AliEMCALMatchCluster(i, cluster);
fClusters->AddLast(matchCluster);
}
AliESDCaloCluster * caloCluster = fESD->GetCaloCluster(emcalCluster) ;
if (caloCluster) {
Float_t pos[3] ;
- if(caloCluster->GetClusterType() == AliESDCaloCluster::kClusterv1) {
+ if(caloCluster->GetClusterType() == AliESDCaloCluster::kEMCALClusterv1) {
caloCluster->GetPosition(pos) ;
fhEMCALPos->Fill(pos[0],pos[1],pos[2]) ;
fhEMCALEnergy->Fill(caloCluster->E()) ;
nDigitTot = fClus->GetNumberOfDigits();
// Keep clusters or pseudo clusters
- if (type != AliESDCaloCluster::kClusterv1) continue;
+ if (type != AliESDCaloCluster::kEMCALClusterv1) continue;
// if (type != AliESDCaloCluster::kPseudoCluster) continue;
// Get the digit index and the digit information
// fills the ESDCaloCluster
- ec->SetPHOS(kTRUE);
- ec->SetPosition(xyz); //rec.point position in MARS
- ec->SetE(rp->Energy()); //total particle energy
+ ec->SetClusterType(AliESDCaloCluster::kPHOSCluster);
+ ec->SetPosition(xyz); //rec.point position in MARS
+ ec->SetE(rp->Energy()); //total particle energy
ec->SetClusterDisp(emcRP->GetDispersion()); //cluster dispersion
ec->SetPid(rp->GetPID()) ; //array of particle identification
ec->SetM02(emcRP->GetM2x()) ; //second moment M2x
//_______________________________________________________________________
AliESDCaloCluster::AliESDCaloCluster() :
- fID(0),
- fClusterType(-1),
- fEMCALCluster(kFALSE),
- fPHOSCluster(kFALSE),
- fEnergy(-1),
- fDispersion(-1),
- fChi2(-1),
- fM20(0),
- fM02(0),
- fM11(0),
- fNExMax(0),
- fEmcCpvDistance(9999),
- fDistToBadChannel(9999),
+ TObject(),
fTracksMatched(0x0),
fLabels(0x0),
fDigitAmplitude(0x0),
fDigitTime(0x0),
- fDigitIndex(0x0)
+ fDigitIndex(0x0),
+ fEnergy(0),
+ fDispersion(0),
+ fChi2(0),
+ fM20(0),
+ fM02(0),
+ fM11(0),
+ fEmcCpvDistance(1024),
+ fDistToBadChannel(1024),
+ fID(0),
+ fNExMax(0),
+ fClusterType(kUndef)
{
//
// The default ESD constructor
//_______________________________________________________________________
AliESDCaloCluster::AliESDCaloCluster(const AliESDCaloCluster& clus) :
TObject(clus),
- fID(clus.fID),
- fClusterType(clus.fClusterType),
- fEMCALCluster(clus.fEMCALCluster),
- fPHOSCluster(clus.fPHOSCluster),
+ fTracksMatched(clus.fTracksMatched?new TArrayS(*clus.fTracksMatched):0x0),
+ fLabels(clus.fLabels?new TArrayS(*clus.fLabels):0x0),
+ fDigitAmplitude(clus.fDigitAmplitude?new TArrayS(*clus.fDigitAmplitude):0x0),
+ fDigitTime(clus.fDigitTime?new TArrayS(*clus.fDigitTime):0x0),
+ fDigitIndex(clus.fDigitIndex?new TArrayS(*clus.fDigitIndex):0x0),
fEnergy(clus.fEnergy),
fDispersion(clus.fDispersion),
fChi2(clus.fChi2),
fM20(clus.fM20),
fM02(clus.fM02),
fM11(clus.fM11),
- fNExMax(clus.fNExMax),
fEmcCpvDistance(clus.fEmcCpvDistance),
fDistToBadChannel(clus.fDistToBadChannel),
- fTracksMatched(clus.fTracksMatched?new TArrayS(*clus.fTracksMatched):0x0),
- fLabels(clus.fLabels?new TArrayS(*clus.fLabels):0x0),
- fDigitAmplitude(clus.fDigitAmplitude?new TArrayS(*clus.fDigitAmplitude):0x0),
- fDigitTime(clus.fDigitTime?new TArrayS(*clus.fDigitTime):0x0),
- fDigitIndex(clus.fDigitIndex?new TArrayS(*clus.fDigitIndex):0x0)
+ fID(clus.fID),
+ fNExMax(clus.fNExMax),
+ fClusterType(clus.fClusterType)
{
//
// The copy constructor
// assignment operator
if(&source == this) return *this;
+ TObject::operator=(source);
+
+ fGlobalPos[0] = source.fGlobalPos[0];
+ fGlobalPos[1] = source.fGlobalPos[1];
+ fGlobalPos[2] = source.fGlobalPos[2];
+
- fID = source.fID;
- fClusterType = source.fClusterType;
- fEMCALCluster = source.fEMCALCluster;
- fPHOSCluster = source.fPHOSCluster;
fEnergy = source.fEnergy;
fDispersion = source.fDispersion;
fChi2 = source.fChi2;
fM20 = source.fM20;
fM02 = source.fM02;
fM11 = source.fM11;
- fNExMax = source.fNExMax;
fEmcCpvDistance = source.fEmcCpvDistance;
fDistToBadChannel = source.fDistToBadChannel ;
-
- fGlobalPos[0] = source.fGlobalPos[0];
- fGlobalPos[1] = source.fGlobalPos[1];
- fGlobalPos[2] = source.fGlobalPos[2];
-
for(Int_t i=0; i<AliPID::kSPECIESN; i++) fPID[i] = source.fPID[i];
+ fID = source.fID;
+ delete fTracksMatched;
fTracksMatched = source.fTracksMatched?new TArrayS(*source.fTracksMatched):0x0;
+ delete fLabels;
fLabels = source.fLabels?new TArrayS(*source.fLabels):0x0;
+
+ delete fDigitAmplitude;
fDigitAmplitude = source.fDigitAmplitude?new TArrayS(*source.fDigitAmplitude):0x0;
+
+ delete fDigitTime;
fDigitTime = source.fDigitTime?new TArrayS(*source.fDigitTime):0x0;
+
+ delete fDigitIndex;
fDigitIndex = source.fDigitIndex?new TArrayS(*source.fDigitIndex):0x0;
+ fNExMax = source.fNExMax;
+ fClusterType = source.fClusterType;
+
return *this;
}
delete fDigitAmplitude;
delete fDigitTime;
delete fDigitIndex;
-
}
//_______________________________________________________________________
#define ALIESDCALOCLUSTER_H
/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
* See cxx source for full Copyright notice */
-
/* $Id$ */
/* $Log $ */
void SetID(Int_t id) {fID = id;}
Int_t GetID() const {return fID;}
- enum ClusterType {kPseudoCluster, kClusterv1};//Two types of clusters stored
- //in EMCAL.
+ //similar to AliAODCluster but offset by one for
+ // backward comp. -1 was undefined, which only applied
+ // for PHOS clusters before
+ enum ESDClu_t {kUndef = -2,
+ kPHOSCluster,
+ kEMCALPseudoCluster,
+ kEMCALClusterv1};
void SetClusterType(Int_t type) { fClusterType = type; }
- Int_t GetClusterType() const {return fClusterType; }
-
- void SetEMCAL(Bool_t emc) { fEMCALCluster = emc;}
- Bool_t IsEMCAL() const {return fEMCALCluster;}
+ Char_t GetClusterType() const {return fClusterType; }
- void SetPHOS(Bool_t phos) { fPHOSCluster = phos;}
- Bool_t IsPHOS() const {return fPHOSCluster;}
+ Bool_t IsEMCAL() const {return (fClusterType == kEMCALClusterv1||fClusterType == kEMCALPseudoCluster);}
+ Bool_t IsEMCALPseudo() {return (fClusterType == kEMCALPseudoCluster);}
+ Bool_t IsPHOS() const {return (fClusterType == kPHOSCluster);}
void SetPosition(const Float_t *pos) {
fGlobalPos[0] = pos[0]; fGlobalPos[1] = pos[1]; fGlobalPos[2] = pos[2];
}
void SetE(Float_t ene) { fEnergy = ene;}
- Float_t E() const { return fEnergy;}
+ Double_t E() const { return fEnergy;}
void SetClusterDisp(Float_t disp) { fDispersion = disp; }
- Float_t GetClusterDisp() const { return fDispersion; }
+ Double_t GetClusterDisp() const { return fDispersion; }
void SetClusterChi2(Float_t chi2) { fChi2 = chi2; }
- Float_t GetClusterChi2() const { return fChi2; }
+ Double_t GetClusterChi2() const { return fChi2; }
void SetPid(const Float_t *p);
- Float_t *GetPid() {return fPID;}
+ Double_t *GetPid() {return fPID;}
void SetM20(Float_t m20) { fM20 = m20; }
- Float_t GetM20() const { return fM20; }
+ Double_t GetM20() const { return fM20; }
void SetM02(Float_t m02) { fM02 = m02; }
- Float_t GetM02() const { return fM02; }
+ Double_t GetM02() const { return fM02; }
void SetM11(Float_t m11) { fM11 = m11; }
- Float_t GetM11() const { return fM11; }
+ Double_t GetM11() const { return fM11; }
- void SetNExMax(UShort_t nExMax) { fNExMax = nExMax; }
- UShort_t GetNExMax() const { return fNExMax; }
+ void SetNExMax(UChar_t nExMax) { fNExMax = nExMax; }
+ UChar_t GetNExMax() const { return fNExMax; }
void SetEmcCpvDistance(Float_t dEmcCpv) { fEmcCpvDistance = dEmcCpv; }
- Float_t GetEmcCpvDistance() const { return fEmcCpvDistance; }
+ Double_t GetEmcCpvDistance() const { return fEmcCpvDistance; }
void SetDistanceToBadChannel(Float_t dist) {fDistToBadChannel=dist;}
- Float_t GetDistanceToBadChannel() const {return fDistToBadChannel;}
+ Double_t GetDistanceToBadChannel() const {return fDistToBadChannel;}
void AddTracksMatched(TArrayS & array) { fTracksMatched = new TArrayS(array) ; }
void AddLabels(TArrayS & array) { fLabels = new TArrayS(array) ; }
protected:
- Int_t fID; // Unique Id of the cluster
- Int_t fClusterType; // Flag for different clustering versions
- Bool_t fEMCALCluster; // Is this is an EMCAL cluster?
- Bool_t fPHOSCluster; // Is this is a PHOS cluster?
- Float_t fGlobalPos[3]; // position in global coordinate system
- Float_t fEnergy; // energy measured by calorimeter
- Float_t fDispersion; // cluster dispersion, for shape analysis
- Float_t fChi2; // chi2 of cluster fit
- Float_t fPID[AliPID::kSPECIESN]; //"detector response probabilities" (for the PID)
- Float_t fM20; // 2-nd moment along the main eigen axis
- Float_t fM02; // 2-nd moment along the second eigen axis
- Float_t fM11; // 2-nd mixed moment Mxy
- UShort_t fNExMax ; // number of (Ex-)maxima before unfolding
- Float_t fEmcCpvDistance; // the distance from PHOS EMC rec.point to the closest CPV rec.point
- Float_t fDistToBadChannel; // Distance to nearest bad channel
-
TArrayS * fTracksMatched; //Index of tracks close to cluster. First entry is the most likely match.
TArrayS * fLabels; //list of primaries that generated the cluster, ordered in deposited energy.
TArrayS * fDigitAmplitude; //digit energy (integer units)
TArrayS * fDigitTime; //time of this digit (integer units)
TArrayS * fDigitIndex; //calorimeter digit index
- ClassDef(AliESDCaloCluster,4) //ESDCaloCluster
+
+ Double32_t fGlobalPos[3]; // position in global coordinate systemD
+ Double32_t fEnergy; // energy measured by calorimeter
+ Double32_t fDispersion; // cluster dispersion, for shape analysis
+ Double32_t fChi2; // chi2 of cluster fi
+ Double32_t fM20; // 2-nd moment along the main eigen axis
+ Double32_t fM02; // 2-nd moment along the second eigen axis
+ Double32_t fM11; // 2-nd mixed moment Mxy
+ Double32_t fEmcCpvDistance; // the distance from PHOS EMC rec.point to the closest CPV rec.point
+ Double32_t fDistToBadChannel; // Distance to nearest bad channel
+ Double32_t fPID[AliPID::kSPECIESN]; //[0,1,8]"detector response probabilities" (for the PID)
+ Int_t fID; // Unique Id of the cluster
+ UChar_t fNExMax ; // number of (Ex-)maxima before unfolding
+ Char_t fClusterType; // Flag for different cluster type/versions
+
+ ClassDef(AliESDCaloCluster,5) //ESDCaloCluster
};
#endif