]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Using AliESDCaloCluster instead of AliESDtrack
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 10 Mar 2006 13:23:36 +0000 (13:23 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 10 Mar 2006 13:23:36 +0000 (13:23 +0000)
24 files changed:
EMCAL/AliEMCALRecPoint.cxx
EMCAL/AliEMCALRecPoint.h
EMCAL/AliEMCALReconstructor.cxx
EMCAL/AliEMCALReconstructor.h
PHOS/AliPHOSFastRecParticle.h
PHOS/AliPHOSGammaJet.cxx
PHOS/AliPHOSRecParticle.cxx
PHOS/AliPHOSRecParticle.h
PHOS/AliPHOSReconstructor.cxx
STEER/AliESD.cxx
STEER/AliESD.h
STEER/AliESDCaloCluster.cxx [new file with mode: 0644]
STEER/AliESDCaloCluster.h [new file with mode: 0644]
STEER/AliESDpid.cxx
STEER/AliESDtrack.cxx
STEER/AliESDtrack.h
STEER/AliEventTag.cxx
STEER/AliEventTag.h
STEER/AliReconstruction.cxx
STEER/AliTag.cxx
STEER/AliTag.h
STEER/AliTagCreator.cxx
STEER/ESDLinkDef.h
STEER/libESD.pkg

index 96f08930a77a589350c9a2e3dd069578e38f4500..41cac02ffa1d5082eace6593a51153076f8dc30a 100644 (file)
@@ -45,6 +45,7 @@ AliEMCALRecPoint::AliEMCALRecPoint()
   : AliRecPoint()
 {
   // ctor
   : AliRecPoint()
 {
   // ctor
+  fClusterType = -1;
   fMaxTrack = 0 ;
   fMulDigit   = 0 ;  
   fMaxParent = 0;
   fMaxTrack = 0 ;
   fMulDigit   = 0 ;  
   fMaxParent = 0;
@@ -52,6 +53,7 @@ AliEMCALRecPoint::AliEMCALRecPoint()
   fAmp   = 0. ;   
   fCoreEnergy = 0 ; 
   fEnergyList = 0 ;
   fAmp   = 0. ;   
   fCoreEnergy = 0 ; 
   fEnergyList = 0 ;
+  fTimeList = 0 ;
   fAbsIdList  = 0;
   fParentsList = 0;
   fTime = 0. ;
   fAbsIdList  = 0;
   fParentsList = 0;
   fTime = 0. ;
@@ -65,6 +67,7 @@ AliEMCALRecPoint::AliEMCALRecPoint()
 AliEMCALRecPoint::AliEMCALRecPoint(const char * opt) : AliRecPoint(opt)
 {
   // ctor
 AliEMCALRecPoint::AliEMCALRecPoint(const char * opt) : AliRecPoint(opt)
 {
   // ctor
+  fClusterType = -1;
   fMaxTrack = 1000 ;
   fMaxParent = 1000;
   fMulDigit   = 0 ; 
   fMaxTrack = 1000 ;
   fMaxParent = 1000;
   fMulDigit   = 0 ; 
@@ -72,6 +75,7 @@ AliEMCALRecPoint::AliEMCALRecPoint(const char * opt) : AliRecPoint(opt)
   fAmp   = 0. ;   
   fCoreEnergy = 0 ; 
   fEnergyList = 0 ;
   fAmp   = 0. ;   
   fCoreEnergy = 0 ; 
   fEnergyList = 0 ;
+  fTimeList = 0 ;
   fAbsIdList  = 0;
   fParentsList = new Int_t[fMaxParent];
   fTime = -1. ;
   fAbsIdList  = 0;
   fParentsList = new Int_t[fMaxParent];
   fTime = -1. ;
@@ -86,6 +90,8 @@ AliEMCALRecPoint::~AliEMCALRecPoint()
   // dtor
   if ( fEnergyList )
     delete[] fEnergyList ; 
   // dtor
   if ( fEnergyList )
     delete[] fEnergyList ; 
+  if ( fTimeList )
+    delete[] fTimeList ; 
   if ( fAbsIdList )
     delete[] fAbsIdList ; 
    if ( fParentsList)
   if ( fAbsIdList )
     delete[] fAbsIdList ; 
    if ( fParentsList)
@@ -100,6 +106,8 @@ void AliEMCALRecPoint::AddDigit(AliEMCALDigit & digit, Float_t Energy)
   
   if(fEnergyList == 0)
     fEnergyList =  new Float_t[fMaxDigit]; 
   
   if(fEnergyList == 0)
     fEnergyList =  new Float_t[fMaxDigit]; 
+  if(fTimeList == 0)
+    fTimeList =  new Float_t[fMaxDigit]; 
   if(fAbsIdList == 0) {
     fAbsIdList =  new Int_t[fMaxDigit];
     fSuperModuleNumber = geom->GetSuperModuleNumber(digit.GetId());
   if(fAbsIdList == 0) {
     fAbsIdList =  new Int_t[fMaxDigit];
     fSuperModuleNumber = geom->GetSuperModuleNumber(digit.GetId());
@@ -109,12 +117,14 @@ void AliEMCALRecPoint::AddDigit(AliEMCALDigit & digit, Float_t Energy)
     fMaxDigit*=2 ; 
     Int_t * tempo = new Int_t[fMaxDigit]; 
     Float_t * tempoE =  new Float_t[fMaxDigit];
     fMaxDigit*=2 ; 
     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 index ;     
     for ( index = 0 ; index < fMulDigit ; index++ ){
       tempo[index]   = fDigitsList[index] ;
       tempoE[index]  = fEnergyList[index] ; 
     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] ; 
     }
     
       tempoId[index] = fAbsIdList[index] ; 
     }
     
@@ -124,22 +134,28 @@ void AliEMCALRecPoint::AddDigit(AliEMCALDigit & digit, Float_t Energy)
     delete [] fEnergyList ;
     fEnergyList =  new Float_t[fMaxDigit];
 
     delete [] fEnergyList ;
     fEnergyList =  new Float_t[fMaxDigit];
 
+    delete [] fTimeList ;
+    fTimeList =  new Float_t[fMaxDigit];
+
     delete [] fAbsIdList ;
     fAbsIdList =  new Int_t[fMaxDigit];
 
     for ( index = 0 ; index < fMulDigit ; index++ ){
       fDigitsList[index] = tempo[index] ;
       fEnergyList[index] = tempoE[index] ; 
     delete [] fAbsIdList ;
     fAbsIdList =  new Int_t[fMaxDigit];
 
     for ( index = 0 ; index < fMulDigit ; index++ ){
       fDigitsList[index] = tempo[index] ;
       fEnergyList[index] = tempoE[index] ; 
+      fTimeList[index] = tempoT[index] ; 
       fAbsIdList[index]  = tempoId[index] ; 
     }
  
     delete [] tempo ;
     delete [] tempoE ; 
       fAbsIdList[index]  = tempoId[index] ; 
     }
  
     delete [] tempo ;
     delete [] tempoE ; 
+    delete [] tempoT ; 
     delete [] tempoId ; 
   } // if
   
   fDigitsList[fMulDigit]   = digit.GetIndexInList()  ; 
   fEnergyList[fMulDigit]   = Energy ;
     delete [] tempoId ; 
   } // if
   
   fDigitsList[fMulDigit]   = digit.GetIndexInList()  ; 
   fEnergyList[fMulDigit]   = Energy ;
+  fTimeList[fMulDigit]     = digit.GetTime() ;
   fAbsIdList[fMulDigit]    = digit.GetId();
   fMulDigit++ ; 
   fAmp += Energy ; 
   fAbsIdList[fMulDigit]    = digit.GetId();
   fMulDigit++ ; 
   fAmp += Energy ; 
@@ -159,8 +175,6 @@ Bool_t AliEMCALRecPoint::AreNeighbours(AliEMCALDigit * digit1, AliEMCALDigit * d
 
   areNeighbours = kFALSE ;
 
 
   areNeighbours = kFALSE ;
 
-  //  AliEMCALGeometry * geom =  AliEMCALGeometry::GetInstance();
-
   geom->GetCellIndex(digit1->GetId(), nSupMod,nTower,nIphi,nIeta);
   geom->GetCellPhiEtaIndexInSModule(nSupMod,nTower,nIphi,nIeta, relid1[0],relid1[1]);
 
   geom->GetCellIndex(digit1->GetId(), nSupMod,nTower,nIphi,nIeta);
   geom->GetCellPhiEtaIndexInSModule(nSupMod,nTower,nIphi,nIeta, relid1[0],relid1[1]);
 
@@ -344,7 +358,6 @@ void  AliEMCALRecPoint::EvalDispersion(Float_t logWeight, TClonesArray * digits)
   Double_t d = 0., wtot = 0., w = 0., xyzi[3], diff=0.;
   Int_t iDigit=0, nstat=0, i=0;
   AliEMCALDigit * digit ;
   Double_t d = 0., wtot = 0., w = 0., xyzi[3], diff=0.;
   Int_t iDigit=0, nstat=0, i=0;
   AliEMCALDigit * digit ;
-  //  AliEMCALGeometry * geom =  AliEMCALGeometry::GetInstance();
 
   // Calculates the centre of gravity in the local EMCAL-module coordinates   
   if (!fLocPos.Mag()) 
 
   // Calculates the centre of gravity in the local EMCAL-module coordinates   
   if (!fLocPos.Mag()) 
@@ -380,7 +393,6 @@ void AliEMCALRecPoint::EvalLocalPosition(Float_t logWeight, TClonesArray * digit
   //  Info("Print", " logWeight %f : cluster energy %f ", logWeight, fAmp); // for testing
   
   AliEMCALDigit * digit;
   //  Info("Print", " logWeight %f : cluster energy %f ", logWeight, fAmp); // for testing
   
   AliEMCALDigit * digit;
-  //  AliEMCALGeometry * geom =  AliEMCALGeometry::GetInstance();
   Int_t i=0, nstat=0;
   Double_t clXYZ[3]={0.,0.,0.}, clRmsXYZ[3]={0.,0.,0.}, xyzi[3], wtot=0., w=0.;
 
   Int_t i=0, nstat=0;
   Double_t clXYZ[3]={0.,0.,0.}, clRmsXYZ[3]={0.,0.,0.}, xyzi[3], wtot=0., w=0.;
 
@@ -444,7 +456,6 @@ void AliEMCALRecPoint::EvalCoreEnergy(Float_t logWeight, TClonesArray * digits)
 
   AliEMCALDigit * digit ;
   const Float_t kDeg2Rad = TMath::DegToRad() ;
 
   AliEMCALDigit * digit ;
   const Float_t kDeg2Rad = TMath::DegToRad() ;
-  //  AliEMCALGeometry * geom =  AliEMCALGeometry::GetInstance();
 
   Int_t iDigit;
 
 
   Int_t iDigit;
 
@@ -480,7 +491,6 @@ void  AliEMCALRecPoint::EvalElipsAxis(Float_t logWeight,TClonesArray * digits)
   const Float_t kDeg2Rad = TMath::DegToRad();
   AliEMCALDigit * digit ;
 
   const Float_t kDeg2Rad = TMath::DegToRad();
   AliEMCALDigit * digit ;
 
-  //  AliEMCALGeometry * geom =  AliEMCALGeometry::GetInstance();
   TString gn(geom->GetName());
 
   Int_t iDigit;
   TString gn(geom->GetName());
 
   Int_t iDigit;
@@ -835,11 +845,12 @@ void AliEMCALRecPoint::Print(Option_t *) const
 
   printf("\n Local x %6.2f y %7.2f z %7.1f \n", fLocPos[0], fLocPos[1], fLocPos[2]);
 
 
   printf("\n Local x %6.2f y %7.2f z %7.1f \n", fLocPos[0], fLocPos[1], fLocPos[2]);
 
-  message  = "       Multiplicity    = %d" ;
+  message  = "       ClusterType     = %d" ;
+  message += "       Multiplicity    = %d" ;
   message += "       Cluster Energy  = %f" ; 
   message += "       Core energy     = %f" ; 
   message += "       Core radius     = %f" ; 
   message += "       Number of primaries %d" ; 
   message += "       Stored at position %d" ; 
   message += "       Cluster Energy  = %f" ; 
   message += "       Core energy     = %f" ; 
   message += "       Core radius     = %f" ; 
   message += "       Number of primaries %d" ; 
   message += "       Stored at position %d" ; 
-  Info("Print", message.Data(), fMulDigit, fAmp, fCoreEnergy, fCoreRadius, fMulTrack, GetIndexInList() ) ;  
+  Info("Print", message.Data(), fClusterType, fMulDigit, fAmp, fCoreEnergy, fCoreRadius, fMulTrack, GetIndexInList() ) ;  
 }
 }
index f988d24d84977b57926274dc1f71a5cfdff00f68..4bd14e01c3ad23fbfdfe86d4e5d6b1d45e7ba223 100644 (file)
@@ -37,6 +37,9 @@ class AliEMCALRecPoint : public AliRecPoint {
   virtual void    Draw(Option_t * option="") ;
   virtual void    ExecuteEvent(Int_t event, Int_t, Int_t) ;
 
   virtual void    Draw(Option_t * option="") ;
   virtual void    ExecuteEvent(Int_t event, Int_t, Int_t) ;
 
+  virtual void    SetClusterType(Int_t ver) { fClusterType = ver; }
+  virtual Int_t   GetClusterType() const { return fClusterType; }
+
   virtual void    EvalAll(Float_t logWeight, TClonesArray * digits);
   virtual void    EvalLocalPosition(Float_t logWeight, TClonesArray * digits) ;
   //  void            EvalLocalPositionSimple(TClonesArray *digits); // ??
   virtual void    EvalAll(Float_t logWeight, TClonesArray * digits);
   virtual void    EvalLocalPosition(Float_t logWeight, TClonesArray * digits) ;
   //  void            EvalLocalPositionSimple(TClonesArray *digits); // ??
@@ -55,6 +58,7 @@ class AliEMCALRecPoint : public AliRecPoint {
   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
   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
+  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       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
   Float_t     GetMaximalEnergy(void) const ;                       // get the highest energy in the cluster
   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
@@ -80,6 +84,8 @@ class AliEMCALRecPoint : public AliRecPoint {
     return *this ; 
   }
 
     return *this ; 
   }
 
+  enum RecPointType {kPseudoCluster, kClusterv1};
+
 protected:
           void  EvalCoreEnergy(Float_t logWeight,TClonesArray * digits) ;             
          virtual void  EvalDispersion(Float_t logWeight,TClonesArray * digits) ;   // computes the dispersion of the shower
 protected:
           void  EvalCoreEnergy(Float_t logWeight,TClonesArray * digits) ;             
          virtual void  EvalDispersion(Float_t logWeight,TClonesArray * digits) ;   // computes the dispersion of the shower
@@ -89,10 +95,14 @@ protected:
          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:
+          Int_t   fClusterType;    // type of cluster stored:
+                                  // pseudocluster or v1
          Float_t fCoreEnergy ;       // energy in a shower core 
          Float_t fLambda[2] ;        // shower ellipse axes
          Float_t fCoreEnergy ;       // energy in a shower core 
          Float_t fLambda[2] ;        // shower ellipse axes
-         Float_t fDispersion ;       // shower dispersion
+         Float_t fDispersion ;       // shower dispersio
          Float_t *fEnergyList ;      //[fMulDigit] energy of digits
          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
          Float_t fCoreRadius;        // The radius in which the core energy is evaluated
           Int_t   *fAbsIdList;        //[fMulDigit] absId  of digits
          Float_t fTime ;             // Time of the digit with maximal energy deposition
          Float_t fCoreRadius;        // The radius in which the core energy is evaluated
index 6e4d388eafb3ef6bfaf2c2639d996fe5bd199a28..70aca110c64220c829706f0ec2660a52e6fafaaf 100644 (file)
@@ -67,8 +67,8 @@ void AliEMCALReconstructor::Reconstruct(AliRunLoader* runLoader) const
   if ( Debug() ) 
     clu.ExecuteTask("deb all") ; 
   else 
   if ( Debug() ) 
     clu.ExecuteTask("deb all") ; 
   else 
-    clu.ExecuteTask("") ;  
-
+    clu.ExecuteTask("pseudo") ;  
 }
 
 //____________________________________________________________________________
 }
 
 //____________________________________________________________________________
@@ -83,13 +83,13 @@ void AliEMCALReconstructor::Reconstruct(AliRunLoader* runLoader, AliRawReader* r
   rawreader->Reset() ; 
   TString headerFile(runLoader->GetFileName()) ; 
   TString branchName(runLoader->GetEventFolder()->GetName()) ;  
   rawreader->Reset() ; 
   TString headerFile(runLoader->GetFileName()) ; 
   TString branchName(runLoader->GetEventFolder()->GetName()) ;  
-  
+
   AliEMCALClusterizerv1 clu(headerFile, branchName);
   clu.SetEventRange(0, -1) ; // do all the events
   if ( Debug() ) 
   AliEMCALClusterizerv1 clu(headerFile, branchName);
   clu.SetEventRange(0, -1) ; // do all the events
   if ( Debug() ) 
-    clu.ExecuteTask("deb all") ; 
+    clu.ExecuteTask("deb pseudo all") ; 
   else 
   else 
-    clu.ExecuteTask("") ;  
+    clu.ExecuteTask("pseudo") ;  
 
 }
 
 
 }
 
@@ -103,42 +103,54 @@ void AliEMCALReconstructor::FillESD(AliRunLoader* runLoader, AliESD* esd) const
   TString headerFile(runLoader->GetFileName()) ; 
   TString branchName(runLoader->GetEventFolder()->GetName()) ;  
 
   TString headerFile(runLoader->GetFileName()) ; 
   TString branchName(runLoader->GetEventFolder()->GetName()) ;  
 
-  // PID is not implemented. Skipping for now
-  //AliEMCALPIDv1 pid(headerFile, branchName);
-
-  // do current event; the loop over events is done by AliReconstruction::Run()
-  /*
-  pid.SetEventRange(eventNumber, eventNumber) ; 
-  if ( Debug() ) 
-    pid.ExecuteTask("deb all") ;
-  else 
-    pid.ExecuteTask("") ;
-  */
-
-  // Creates AliESDtrack from AliEMCALRecPoints 
+  // Creates AliESDCaloCluster from AliEMCALRecPoints 
   AliRunLoader *rl = AliRunLoader::GetRunLoader();
   AliEMCALLoader *emcalLoader = dynamic_cast<AliEMCALLoader*>(rl->GetDetectorLoader("EMCAL"));
   rl->LoadRecPoints();
   rl->GetEvent(eventNumber);
   TObjArray *clusters = emcalLoader->RecPoints();
   Int_t nClusters = clusters->GetEntries();
   AliRunLoader *rl = AliRunLoader::GetRunLoader();
   AliEMCALLoader *emcalLoader = dynamic_cast<AliEMCALLoader*>(rl->GetDetectorLoader("EMCAL"));
   rl->LoadRecPoints();
   rl->GetEvent(eventNumber);
   TObjArray *clusters = emcalLoader->RecPoints();
   Int_t nClusters = clusters->GetEntries();
-  esd->SetNumberOfEMCALParticles(nClusters) ; 
-  esd->SetFirstEMCALParticle(esd->GetNumberOfTracks()) ; 
+  esd->SetNumberOfEMCALClusters(nClusters) ; 
+  esd->SetFirstEMCALCluster(esd->GetNumberOfCaloClusters()) ; 
   for (Int_t iClust = 0 ; iClust < nClusters ; iClust++) {
     const AliEMCALRecPoint * clust = emcalLoader->RecPoint(iClust);
   for (Int_t iClust = 0 ; iClust < nClusters ; iClust++) {
     const AliEMCALRecPoint * clust = emcalLoader->RecPoint(iClust);
-    if (Debug()) 
-      clust->Print();
-    AliESDtrack * et = new AliESDtrack() ; 
-    // fills the ESDtrack
-    Double_t xyz[3];
+
+    if (Debug()) clust->Print();
+
+    AliESDCaloCluster * ec = new AliESDCaloCluster() ; 
+    // fills the ESDCaloCluster
+    Float_t xyz[3];
     TVector3 gpos;
     clust->GetGlobalPosition(gpos);
     for (Int_t ixyz=0; ixyz<3; ixyz++) 
       xyz[ixyz] = gpos[ixyz];
     TVector3 gpos;
     clust->GetGlobalPosition(gpos);
     for (Int_t ixyz=0; ixyz<3; ixyz++) 
       xyz[ixyz] = gpos[ixyz];
-    et->SetEMCALposition(xyz) ; 
-    et->SetEMCALsignal  (clust->GetEnergy()) ; 
-    // add the track to the esd object
-    esd->AddTrack(et);
-    delete et;
+   
+    Int_t digitMult = clust->GetMultiplicity();
+    UShort_t *amplList = new UShort_t[digitMult];
+    UShort_t *timeList = new UShort_t[digitMult];
+    UShort_t *digiList = new UShort_t[digitMult];
+    Float_t *amplFloat = clust->GetEnergiesList();
+    Float_t *timeFloat = clust->GetTimeList();
+    Int_t   *digitInts = clust->GetAbsId();
+    // Convert Float_t* and Int_t* to UShort_t* to save memory
+    for (Int_t iDigit=0; iDigit<digitMult; iDigit++) {
+      amplList[iDigit] = (UShort_t)(amplFloat[iDigit]*500);
+      timeList[iDigit] = (UShort_t)(timeFloat[iDigit]*1e9*100);
+      digiList[iDigit] = (UShort_t)(digitInts[iDigit]);
+    }
+
+    ec->SetClusterType(clust->GetClusterType());
+    ec->SetGlobalPosition(xyz);
+    ec->SetClusterEnergy(clust->GetEnergy());
+    ec->SetClusterDisp(clust->GetDispersion());
+    ec->SetClusterChi2(-1); //not yet implemented
+    ec->SetNumberOfDigits(clust->GetMultiplicity());
+    ec->SetDigitAmplitude(amplList); //energies
+    ec->SetDigitTime(timeList);      //times
+    ec->SetDigitIndex(digiList);     //indices
+
+    // add the cluster to the esd object
+    esd->AddCaloCluster(ec);
+    delete ec;
   }
 }
   }
 }
index c426f07f5c2a5ef47abed0cf0e7d36088486761b..ad4e63ea33434b4fdcc1b94e89d5305504d9b3fa 100644 (file)
@@ -17,7 +17,6 @@
 #include "AliReconstructor.h" 
 class AliEMCALDigitizer ;
 class AliEMCALClusterizer ;
 #include "AliReconstructor.h" 
 class AliEMCALDigitizer ;
 class AliEMCALClusterizer ;
-class AliEMCALPID ;
 class AliEMCALSDigitizer ;
 class AliESD ;
 class AliRawReaderFile ; 
 class AliEMCALSDigitizer ;
 class AliESD ;
 class AliRawReaderFile ; 
index ae9ffff743d581ab45d44d4e9b34099c250ffa92..faa5ddcd4924b95566f11ea99589fbddd3bd928e 100644 (file)
@@ -8,6 +8,9 @@
 /* History of cvs commits:
  *
  * $Log$
 /* History of cvs commits:
  *
  * $Log$
+ * Revision 1.36  2005/05/28 14:19:04  schutz
+ * Compilation warnings fixed by T.P.
+ *
  */
 
 //_________________________________________________________________________
  */
 
 //_________________________________________________________________________
@@ -22,8 +25,7 @@
 
 class TClonesArray;
 #include "TParticle.h"
 
 class TClonesArray;
 #include "TParticle.h"
-#include "AliESDtrack.h" 
-
+#include "AliPID.h"
 // --- Standard library ---
 
 // --- AliRoot header files ---
 // --- Standard library ---
 
 // --- AliRoot header files ---
@@ -102,7 +104,7 @@ class AliPHOSFastRecParticle : public TParticle {
   Int_t fIndexInList ; // the index of this RecParticle in the list stored in TreeR (to be set by analysis)
   Float_t fTof ;       // time of fliht
   Int_t fType ;        // particle type obtained by "virtual" reconstruction
   Int_t fIndexInList ; // the index of this RecParticle in the list stored in TreeR (to be set by analysis)
   Float_t fTof ;       // time of fliht
   Int_t fType ;        // particle type obtained by "virtual" reconstruction
-  Double_t fPID[AliPID::kSPECIESN] ; // PID probability densities
+  Float_t fPID[AliPID::kSPECIESN] ; // PID probability densities
 
  private:
 
 
  private:
 
index b04234927419d0e88325bcd9be7fd072c5b48602..5be2356ef2b3ad10f68a29bad94e870fc7b163c4 100644 (file)
@@ -17,6 +17,9 @@
 /* History of cvs commits:
  *
  * $Log$
 /* History of cvs commits:
  *
  * $Log$
+ * Revision 1.11  2006/01/31 20:30:52  hristov
+ * Including TFile.h
+ *
  * Revision 1.10  2006/01/23 18:04:08  hristov
  * Removing meaningless const
  *
  * Revision 1.10  2006/01/23 18:04:08  hristov
  * Removing meaningless const
  *
@@ -59,6 +62,7 @@
 #include "AliPHOSFastGlobalReconstruction.h"
 #include "AliESD.h"
 #include "AliESDtrack.h"
 #include "AliPHOSFastGlobalReconstruction.h"
 #include "AliESD.h"
 #include "AliESDtrack.h"
+#include "AliESDCaloCluster.h"
 #include "Riostream.h"
 
 
 #include "Riostream.h"
 
 
@@ -839,26 +843,26 @@ void AliPHOSGammaJet::CreateParticleListFromESD(TClonesArray * pl,
 
   Int_t index = pl->GetEntries() ; 
   Int_t npar  = 0 ;
 
   Int_t index = pl->GetEntries() ; 
   Int_t npar  = 0 ;
-  Double_t pid[AliPID::kSPECIESN];  
+  Float_t *pid = new Float_t[AliPID::kSPECIESN];  
 
   //########### PHOS ##############
   //Info("CreateParticleListFromESD","Fill ESD PHOS list");
 
   //########### PHOS ##############
   //Info("CreateParticleListFromESD","Fill ESD PHOS list");
-  Int_t begphos = esd->GetFirstPHOSParticle();  
-  Int_t endphos = esd->GetFirstPHOSParticle() + 
-    esd->GetNumberOfPHOSParticles() ;  
+  Int_t begphos = esd->GetFirstPHOSCluster();  
+  Int_t endphos = esd->GetFirstPHOSCluster() + 
+    esd->GetNumberOfPHOSClusters() ;  
   Int_t indexNePHOS = plNePHOS->GetEntries() ;
   if(strstr(fOptionGJ,"deb all"))
     Info("CreateParticleListFromESD","PHOS: first particle %d, last particle %d",
         begphos,endphos);
 
   for (npar =  begphos; npar <  endphos; npar++) {//////////////PHOS track loop
   Int_t indexNePHOS = plNePHOS->GetEntries() ;
   if(strstr(fOptionGJ,"deb all"))
     Info("CreateParticleListFromESD","PHOS: first particle %d, last particle %d",
         begphos,endphos);
 
   for (npar =  begphos; npar <  endphos; npar++) {//////////////PHOS track loop
-    AliESDtrack * track = esd->GetTrack(npar) ; // retrieve track from esd
+      AliESDCaloCluster * clus = esd->GetCaloCluster(npar) ; // retrieve track from esd
    
     //Create a TParticle to fill the particle list
 
    
     //Create a TParticle to fill the particle list
 
-    Double_t en = track->GetPHOSsignal() ;
-    Double_t * p = new Double_t();
-    track->GetPHOSposition(p) ;
+    Float_t en = clus->GetClusterEnergy() ;
+    Float_t *p = new Float_t();
+    clus->GetGlobalPosition(p) ;
     TVector3 pos(p[0],p[1],p[2]) ; 
     Double_t phi  = pos.Phi();
     Double_t theta= pos.Theta();
     TVector3 pos(p[0],p[1],p[2]) ; 
     Double_t phi  = pos.Phi();
     Double_t theta= pos.Theta();
@@ -871,7 +875,7 @@ void AliPHOSGammaJet::CreateParticleListFromESD(TClonesArray * pl,
 
     //Select only photons
     
 
     //Select only photons
     
-    track->GetPHOSpid(pid);
+    pid=clus->GetPid();
     //cout<<"pid "<<pid[AliPID::kPhoton]<<endl ;
     if( pid[AliPID::kPhoton] > 0.75)
       new((*plNePHOS)[indexNePHOS++])   TParticle(*particle) ;
     //cout<<"pid "<<pid[AliPID::kPhoton]<<endl ;
     if( pid[AliPID::kPhoton] > 0.75)
       new((*plNePHOS)[indexNePHOS++])   TParticle(*particle) ;
@@ -911,20 +915,20 @@ void AliPHOSGammaJet::CreateParticleListFromESD(TClonesArray * pl,
   //##########Uncomment when ESD for EMCAL works ##########  
   //Info("CreateParticleListFromESD","Fill ESD EMCAL list");
  
   //##########Uncomment when ESD for EMCAL works ##########  
   //Info("CreateParticleListFromESD","Fill ESD EMCAL list");
  
-  Int_t begem = esd->GetFirstEMCALParticle();  
-  Int_t endem = esd->GetFirstEMCALParticle() + 
-    esd->GetNumberOfEMCALParticles() ;  
+  Int_t begem = esd->GetFirstEMCALCluster();  
+  Int_t endem = esd->GetFirstEMCALCluster() + 
+    esd->GetNumberOfEMCALClusters() ;  
   Int_t indexNe  = plNe->GetEntries() ; 
   if(strstr(fOptionGJ,"deb all"))
     Info("CreateParticleListFromESD","EMCAL: first particle %d, last particle %d",
         begem,endem);
    
   for (npar =  begem; npar <  endem; npar++) {//////////////EMCAL track loop
   Int_t indexNe  = plNe->GetEntries() ; 
   if(strstr(fOptionGJ,"deb all"))
     Info("CreateParticleListFromESD","EMCAL: first particle %d, last particle %d",
         begem,endem);
    
   for (npar =  begem; npar <  endem; npar++) {//////////////EMCAL track loop
-     AliESDtrack * track = esd->GetTrack(npar) ; // retrieve track from esd
+     AliESDCaloCluster * clus = esd->GetCaloCluster(npar) ; // retrieve track from esd
   
   
-    Double_t en = track->GetEMCALsignal() ;
-    Double_t *p = new Double_t();
-    track->GetEMCALposition(p) ;
+    Float_t en = clus->GetClusterEnergy() ;
+    Float_t *p = new Float_t();
+    clus->GetGlobalPosition(p) ;
     TVector3 pos(p[0],p[1],p[2]) ;
     Double_t phi  = pos.Phi();
     Double_t theta= pos.Theta();
     TVector3 pos(p[0],p[1],p[2]) ;
     Double_t phi  = pos.Phi();
     Double_t theta= pos.Theta();
index 8a4881b88ec784a049f8237b331ee22953f07960..78224515d148b1011588586dd441e979dab4414c 100644 (file)
@@ -263,7 +263,7 @@ const TParticle * AliPHOSRecParticle::GetPrimary(Int_t index) const
 }
 
 //____________________________________________________________________________
 }
 
 //____________________________________________________________________________
-void AliPHOSRecParticle::SetPID(Int_t type, Double_t weight)
+void AliPHOSRecParticle::SetPID(Int_t type, Float_t weight)
 {
   // Set the probability densities that this reconstructed particle
   // has a type of i:
 {
   // Set the probability densities that this reconstructed particle
   // has a type of i:
index 1d85e880ccbb0ca84c7fbcc162452a22187f38d9..297e5b36b1dc4d9dd4d4b87d78a76f97968175fa 100644 (file)
@@ -37,9 +37,9 @@ class AliPHOSRecParticle : public AliPHOSFastRecParticle {
   virtual const TParticle * GetPrimary(Int_t index) const ;
   virtual const TParticle * GetPrimary() const ;
   Int_t GetPrimaryIndex() const ;
   virtual const TParticle * GetPrimary(Int_t index) const ;
   virtual const TParticle * GetPrimary() const ;
   Int_t GetPrimaryIndex() const ;
-  const Double_t *GetPID() { return fPID ; }
+  const Float_t *GetPID() { return fPID ; }
   void    SetDebug() { fDebug = kTRUE ; } 
   void    SetDebug() { fDebug = kTRUE ; } 
-  void    SetPID(Int_t type, Double_t weight) ; 
+  void    SetPID(Int_t type, Float_t weight) ; 
   void    SetPos(TVector3 pos) { fPos.SetXYZ( pos.X(), pos.Y(), pos.Z() ); } 
   void    UnsetDebug() { fDebug = kFALSE ; }
   void    SetTrackSegment(Int_t index){fPHOSTrackSegment = index; }
   void    SetPos(TVector3 pos) { fPos.SetXYZ( pos.X(), pos.Y(), pos.Z() ); } 
   void    UnsetDebug() { fDebug = kFALSE ; }
   void    SetTrackSegment(Int_t index){fPHOSTrackSegment = index; }
index 24824c599b34e70887955c2d094791a4966fe96a..9c8b0d1df58a121fbe2da4596453eb49fb24f405 100644 (file)
@@ -109,25 +109,26 @@ void AliPHOSReconstructor::FillESD(AliRunLoader* runLoader, AliESD* esd) const
   AliPHOSGetter::Instance()->Event(eventNumber, "P") ; 
   TClonesArray *recParticles = AliPHOSGetter::Instance()->RecParticles();
   Int_t nOfRecParticles = recParticles->GetEntries();
   AliPHOSGetter::Instance()->Event(eventNumber, "P") ; 
   TClonesArray *recParticles = AliPHOSGetter::Instance()->RecParticles();
   Int_t nOfRecParticles = recParticles->GetEntries();
-  esd->SetNumberOfPHOSParticles(nOfRecParticles) ; 
-  esd->SetFirstPHOSParticle(esd->GetNumberOfTracks()) ; 
+  esd->SetNumberOfPHOSClusters(nOfRecParticles) ; 
+  esd->SetFirstPHOSCluster(esd->GetNumberOfTracks()) ; 
 
   for (Int_t recpart = 0 ; recpart < nOfRecParticles ; recpart++) {
     AliPHOSRecParticle * rp = dynamic_cast<AliPHOSRecParticle*>(recParticles->At(recpart));
     if (Debug()) 
       rp->Print();
 
   for (Int_t recpart = 0 ; recpart < nOfRecParticles ; recpart++) {
     AliPHOSRecParticle * rp = dynamic_cast<AliPHOSRecParticle*>(recParticles->At(recpart));
     if (Debug()) 
       rp->Print();
-    AliESDtrack * et = new AliESDtrack() ; 
-    // fills the ESDtrack
-    Double_t xyz[3];
+    AliESDCaloCluster * ec = new AliESDCaloCluster() ; 
+//     AliESDtrack * et = new AliESDtrack() ; 
+    // fills the ESDCaloCluster
+    Float_t xyz[3];
     for (Int_t ixyz=0; ixyz<3; ixyz++) 
       xyz[ixyz] = rp->GetPos()[ixyz];
     for (Int_t ixyz=0; ixyz<3; ixyz++) 
       xyz[ixyz] = rp->GetPos()[ixyz];
-    et->SetPHOSposition(xyz) ; 
-    et->SetPHOSsignal  (rp->Energy()) ; 
-    et->SetPHOSpid     (rp->GetPID()) ;
-    et->SetLabel       (rp->GetPrimaryIndex());
+    ec->SetGlobalPosition(xyz);
+    ec->SetClusterEnergy(rp->Energy());
+    ec->SetPid          (rp->GetPID()) ;
+    ec->SetPrimaryIndex (rp->GetPrimaryIndex());
     // add the track to the esd object
     // add the track to the esd object
-    esd->AddTrack(et);
-    delete et;
+    esd->AddCaloCluster(ec);
+    delete ec;
   }
 }
 
   }
 }
 
index 9deb7f24545eabf0cb45b7b56506c8425dc1e00f..d79514cca260a5023f06aaee39b1067da2df2f8a 100644 (file)
@@ -48,12 +48,14 @@ AliESD::AliESD():
   fCascades("AliESDcascade",20),
   fKinks("AliESDkink",4000),
   fV0MIs("AliESDV0MI",4000),
   fCascades("AliESDcascade",20),
   fKinks("AliESDkink",4000),
   fV0MIs("AliESDV0MI",4000),
-  fPHOSParticles(0), 
-  fEMCALParticles(0), 
-  fFirstPHOSParticle(-1), 
-  fFirstEMCALParticle(-1),
+  fCaloClusters("AliESDCaloCluster",10000),
+  fEMCALClusters(0), 
+  fFirstEMCALCluster(-1),
+  fPHOSClusters(0), 
+  fFirstPHOSCluster(-1),
   fESDFMD(0x0)
 {
   fESDFMD(0x0)
 {
+
 }
 
 //______________________________________________________________________________
 }
 
 //______________________________________________________________________________
@@ -71,6 +73,7 @@ AliESD::~AliESD()
   fCascades.Delete();
   fKinks.Delete();
   fV0MIs.Delete();
   fCascades.Delete();
   fKinks.Delete();
   fV0MIs.Delete();
+  fCaloClusters.Delete();
   delete fESDFMD;
 }
 
   delete fESDFMD;
 }
 
@@ -115,10 +118,11 @@ void AliESD::Reset()
   fPmdTracks.Clear();
   fV0s.Clear();
   fCascades.Clear();
   fPmdTracks.Clear();
   fV0s.Clear();
   fCascades.Clear();
-  fPHOSParticles=0; 
-  fEMCALParticles=0; 
-  fFirstPHOSParticle=-1; 
-  fFirstEMCALParticle=-1;
+  fCaloClusters.Clear();
+  fEMCALClusters=0; 
+  fFirstEMCALCluster=-1; 
+  fPHOSClusters=0; 
+  fFirstPHOSCluster=-1; 
   if (fESDFMD) fESDFMD->Clear();
 }
 
   if (fESDFMD) fESDFMD->Clear();
 }
 
@@ -140,16 +144,17 @@ void AliESD::Print(Option_t *) const
         fPrimaryVertex.GetZv(), fPrimaryVertex.GetZRes());
   printf("Event from reconstruction version %d \n",fRecoVersion);
   printf("Number of tracks: \n");
         fPrimaryVertex.GetZv(), fPrimaryVertex.GetZRes());
   printf("Event from reconstruction version %d \n",fRecoVersion);
   printf("Number of tracks: \n");
-  printf("                 charged   %d\n",GetNumberOfTracks()-GetNumberOfPHOSParticles()-GetNumberOfEMCALParticles());
+  printf("                 charged   %d\n", GetNumberOfTracks());
   printf("                 hlt CF    %d\n", GetNumberOfHLTConfMapTracks());
   printf("                 hlt HT    %d\n", GetNumberOfHLTHoughTracks());
   printf("                 hlt CF    %d\n", GetNumberOfHLTConfMapTracks());
   printf("                 hlt HT    %d\n", GetNumberOfHLTHoughTracks());
-  printf("                 phos      %d\n", GetNumberOfPHOSParticles());
-  printf("                 emcal     %d\n", GetNumberOfEMCALParticles());
+  printf("                 phos      %d\n", GetNumberOfPHOSClusters());
+  printf("                 emcal     %d\n", GetNumberOfEMCALClusters());
   printf("                 muon      %d\n", GetNumberOfMuonTracks());
   printf("                 pmd       %d\n", GetNumberOfPmdTracks());
   printf("                 v0        %d\n", GetNumberOfV0s());
   printf("                 cascades  %d\n)", GetNumberOfCascades());
   printf("                 kinks     %d\n)", GetNumberOfKinks());
   printf("                 V0MIs     %d\n)", GetNumberOfV0MIs());
   printf("                 muon      %d\n", GetNumberOfMuonTracks());
   printf("                 pmd       %d\n", GetNumberOfPmdTracks());
   printf("                 v0        %d\n", GetNumberOfV0s());
   printf("                 cascades  %d\n)", GetNumberOfCascades());
   printf("                 kinks     %d\n)", GetNumberOfKinks());
   printf("                 V0MIs     %d\n)", GetNumberOfV0MIs());
+  printf("                 CaloClusters %d\n)", GetNumberOfCaloClusters());
   printf("                 FMD       %s\n)", (fESDFMD ? "yes" : "no"));
 }
   printf("                 FMD       %s\n)", (fESDFMD ? "yes" : "no"));
 }
index 05a92d8cb51b29c5943289ad60e07c9a7e35c47c..70c86156e6932bac6f1736ece302ccfb44d705c8 100644 (file)
@@ -24,6 +24,7 @@
 #include "AliESDkink.h"
 #include "AliESDtrack.h"
 #include "AliESDHLTtrack.h"
 #include "AliESDkink.h"
 #include "AliESDtrack.h"
 #include "AliESDHLTtrack.h"
+#include "AliESDCaloCluster.h"
 #include "AliESDv0.h"
 #include "AliESDV0MI.h"
 #include "AliESDFMD.h"
 #include "AliESDv0.h"
 #include "AliESDV0MI.h"
 #include "AliESDFMD.h"
@@ -107,7 +108,15 @@ public:
     return fV0MIs.GetEntriesFast()-1;
   }
 
     return fV0MIs.GetEntriesFast()-1;
   }
 
-
+  AliESDCaloCluster *GetCaloCluster(Int_t i) const {
+    return (AliESDCaloCluster *)fCaloClusters.UncheckedAt(i);
+  }
+  Int_t AddCaloCluster(const AliESDCaloCluster *c) {
+    AliESDCaloCluster *clus = new(fCaloClusters[fCaloClusters.GetEntriesFast()]) AliESDCaloCluster(*c);
+    clus->SetID(fCaloClusters.GetEntriesFast()-1);
+    return fCaloClusters.GetEntriesFast()-1;
+  }
+    
   void SetVertex(const AliESDVertex* vertex) {
     new(&fPrimaryVertex) AliESDVertex(*vertex);
   }
   void SetVertex(const AliESDVertex* vertex) {
     new(&fPrimaryVertex) AliESDVertex(*vertex);
   }
@@ -126,14 +135,17 @@ public:
   Int_t GetNumberOfCascades() const {return fCascades.GetEntriesFast();}
   Int_t GetNumberOfKinks() const {return fKinks.GetEntriesFast();}
   Int_t GetNumberOfV0MIs() const {return fV0MIs.GetEntriesFast();}
   Int_t GetNumberOfCascades() const {return fCascades.GetEntriesFast();}
   Int_t GetNumberOfKinks() const {return fKinks.GetEntriesFast();}
   Int_t GetNumberOfV0MIs() const {return fV0MIs.GetEntriesFast();}
-  Int_t GetNumberOfPHOSParticles() const {return fPHOSParticles;}
-  void  SetNumberOfPHOSParticles(Int_t part) { fPHOSParticles = part ; }
-  void  SetFirstPHOSParticle(Int_t index) { fFirstPHOSParticle = index ; } 
-  Int_t GetFirstPHOSParticle() const  { return fFirstPHOSParticle ; }
-  Int_t GetNumberOfEMCALParticles() const {return fEMCALParticles;}
-  void  SetNumberOfEMCALParticles(Int_t part) { fEMCALParticles = part ; }
-  void  SetFirstEMCALParticle(Int_t index) { fFirstEMCALParticle = index ; } 
-  Int_t GetFirstEMCALParticle() const { return fFirstEMCALParticle ; } 
+  Int_t GetNumberOfCaloClusters() const {return fCaloClusters.GetEntriesFast();}
+
+  Int_t GetNumberOfEMCALClusters() const {return fEMCALClusters;}
+  void  SetNumberOfEMCALClusters(Int_t clus) {fEMCALClusters = clus;}
+  Int_t GetFirstEMCALCluster() const {return fFirstEMCALCluster;}
+  void  SetFirstEMCALCluster(Int_t index) {fFirstEMCALCluster = index;}
+
+  Int_t GetNumberOfPHOSClusters() const {return fPHOSClusters;}
+  void  SetNumberOfPHOSClusters(Int_t part) { fPHOSClusters = part ; }
+  void  SetFirstPHOSCluster(Int_t index) { fFirstPHOSCluster = index ; } 
+  Int_t GetFirstPHOSCluster() const  { return fFirstPHOSCluster ; }
 
   Float_t GetT0zVertex() const {return fT0zVertex;}
   void SetT0zVertex(Float_t z) {fT0zVertex=z;}
 
   Float_t GetT0zVertex() const {return fT0zVertex;}
   void SetT0zVertex(Float_t z) {fT0zVertex=z;}
@@ -185,10 +197,12 @@ protected:
   TClonesArray fCascades;        // Cascade vertices
   TClonesArray fKinks;           // Kinks
   TClonesArray fV0MIs;           // V0MI
   TClonesArray fCascades;        // Cascade vertices
   TClonesArray fKinks;           // Kinks
   TClonesArray fV0MIs;           // V0MI
-  Int_t        fPHOSParticles;   // Number of PHOS particles (stored as fTracks)
-  Int_t        fEMCALParticles;  // Number of EMCAL particles (stored as fTracks)
-  Int_t        fFirstPHOSParticle; // First PHOS particle in the fTracks list 
-  Int_t        fFirstEMCALParticle;// First EMCAL particle in the fTracks list 
+  TClonesArray fCaloClusters;    // Calorimeter clusters for PHOS/EMCAL
+  Int_t        fEMCALClusters;   // Number of EMCAL clusters (subset of caloclusters)
+  Int_t        fFirstEMCALCluster; // First EMCAL cluster in the fCaloClusters list 
+
+  Int_t        fPHOSClusters;     // Number of PHOS clusters (subset of caloclusters)
+  Int_t        fFirstPHOSCluster; // First PHOS cluster in the fCaloClusters list 
  
   AliESDFMD *  fESDFMD; // FMD object containing rough multiplicity
 
  
   AliESDFMD *  fESDFMD; // FMD object containing rough multiplicity
 
diff --git a/STEER/AliESDCaloCluster.cxx b/STEER/AliESDCaloCluster.cxx
new file mode 100644 (file)
index 0000000..b506ebf
--- /dev/null
@@ -0,0 +1,129 @@
+/**************************************************************************
+ * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ *                                                                        *
+ * Author: The ALICE Off-line Project.                                    *
+ * Contributors are mentioned in the code where appropriate.              *
+ *                                                                        *
+ * Permission to use, copy, modify and distribute this software and its   *
+ * documentation strictly for non-commercial purposes is hereby granted   *
+ * without fee, provided that the above copyright notice appears in all   *
+ * copies and that both the copyright notice and this permission notice   *
+ * appear in the supporting documentation. The authors make no claims     *
+ * about the suitability of this software for any purpose. It is          *
+ * provided "as is" without express or implied warranty.                  *
+ **************************************************************************/
+
+/* $Id$ */
+/* $Log $ */
+
+//-----------------------------------------------------------------
+//           Implementation of the ESD Calorimeter cluster class
+//   ESD = Event Summary Data
+//   This is the class to deal with during the phisics analysis of data
+//
+//   J.L. Klay (LLNL)
+//-----------------------------------------------------------------
+
+#include "AliESDCaloCluster.h"
+
+ClassImp(AliESDCaloCluster)
+
+//_______________________________________________________________________
+AliESDCaloCluster::AliESDCaloCluster() : 
+  fID(0),
+  fClusterType(-1),
+  fEMCALCluster(kFALSE),
+  fEnergy(-1),
+  fDispersion(-1),
+  fChi2(-1),
+  fNumberOfDigits(0),
+  fDigitAmplitude(0),
+  fDigitTime(0),
+  fDigitIndex(0)
+{
+  //
+  // The default ESD constructor 
+  //
+  fGlobalPos[0] = fGlobalPos[1] = fGlobalPos[2] = 0.;
+  for(Int_t i=0; i<AliPID::kSPECIESN; i++) fPID[i] = 0.;
+}
+
+//_______________________________________________________________________
+AliESDCaloCluster::AliESDCaloCluster(const AliESDCaloCluster& clus) : 
+  TObject(clus),
+  fID(clus.fID),
+  fClusterType(clus.fClusterType),
+  fEMCALCluster(clus.fEMCALCluster),
+  fEnergy(clus.fEnergy),
+  fDispersion(clus.fDispersion),
+  fChi2(clus.fChi2),
+  fNumberOfDigits(clus.fNumberOfDigits)
+{
+  //
+  // The copy constructor 
+  //
+  fGlobalPos[0] = clus.fGlobalPos[0];
+  fGlobalPos[1] = clus.fGlobalPos[1];
+  fGlobalPos[2] = clus.fGlobalPos[2];
+
+  for(Int_t i=0; i<AliPID::kSPECIESN; i++) fPID[i] = clus.fPID[i];
+
+  fDigitAmplitude = clus.fDigitAmplitude;
+  fDigitTime = clus.fDigitTime;
+  fDigitIndex = clus.fDigitIndex;
+
+}
+
+
+//_______________________________________________________________________
+AliESDCaloCluster::~AliESDCaloCluster(){ 
+  //
+  // This is destructor according Coding Conventrions 
+  //
+  //printf("Delete cluster\n");
+
+  //Not sure why but it won't let me delete these in the dtor here.
+  //The Reconstruction gives me the error
+  //*** glibc detected *** double free or corruption (!prev):
+  //0x0c1550b0 ***
+  /*
+  if(fDigitAmplitude)
+    delete[] fDigitAmplitude;
+  if(fDigitTime)
+    delete[] fDigitTime;
+  if(fDigitIndex)
+    delete[] fDigitIndex;
+  */
+}
+
+//_______________________________________________________________________
+void AliESDCaloCluster::SetPid(const Float_t *p) {
+  // Sets the probability of each particle type
+  // Copied from AliESDtrack SetPIDValues
+  // This function copies "n" PID weights from "scr" to "dest"
+  // and normalizes their sum to 1 thus producing conditional
+  // probabilities.
+  // The negative weights are set to 0.
+  // In case all the weights are non-positive they are replaced by
+  // uniform probabilities
+
+  Int_t n = AliPID::kSPECIESN;
+
+  Float_t uniform = 1./(Float_t)n;
+
+  Float_t sum = 0;
+  for (Int_t i=0; i<n; i++)
+    if (p[i]>=0) {
+      sum+=p[i];
+      fPID[i] = p[i];
+    }
+    else {
+      fPID[i] = 0;
+    }
+
+  if(sum>0)
+    for (Int_t i=0; i<n; i++) fPID[i] /= sum;
+  else
+    for (Int_t i=0; i<n; i++) fPID[i] = uniform;
+
+}
diff --git a/STEER/AliESDCaloCluster.h b/STEER/AliESDCaloCluster.h
new file mode 100644 (file)
index 0000000..afa806f
--- /dev/null
@@ -0,0 +1,124 @@
+#ifndef ALIESDCALOCLUSTER_H
+#define ALIESDCALOCLUSTER_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+/* $Log $ */
+
+//-------------------------------------------------------------------------
+//                          Class AliESDCaloCluster
+//   This is the class to deal with during the physics analysis of data
+//
+//   New container for calorimeter clusters, which are the effective 
+//   "tracks" for calorimeter detectors.  Can be used by PHOS and EMCAL
+//
+//     J.L. Klay (LLNL)
+//-------------------------------------------------------------------------
+
+#include <TObject.h>
+#include "AliPID.h"
+
+
+class AliESDCaloCluster : public TObject {
+
+public:
+
+  AliESDCaloCluster();
+  AliESDCaloCluster(const AliESDCaloCluster& clus);
+  virtual ~AliESDCaloCluster();
+
+  void SetID(Int_t id) {fID = id;}
+  Int_t GetID() const {return fID;}
+
+  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;}
+
+  void SetPHOS(Bool_t phos) { fPHOSCluster = phos;}
+  Bool_t IsPHOS() const {return fPHOSCluster;}
+
+  void SetGlobalPosition(const Float_t *pos) {
+    fGlobalPos[0] = pos[0]; fGlobalPos[1] = pos[1]; fGlobalPos[2] = pos[2];
+  }
+  void GetGlobalPosition(Float_t *pos) const {
+    pos[0] = fGlobalPos[0]; pos[1] = fGlobalPos[1]; pos[2] = fGlobalPos[2];
+  }
+
+  void SetClusterEnergy(Float_t ene) { fEnergy = ene;}
+  Float_t GetClusterEnergy() const   { return fEnergy;}
+
+  void SetClusterDisp(Float_t disp)  { fDispersion = disp; }
+  Float_t GetClusterDisp() const     { return fDispersion; }
+
+  void SetClusterChi2(Float_t chi2)  { fChi2 = chi2; }
+  Float_t GetClusterChi2() const     { return fChi2; }
+
+  void SetPid(const Float_t *p);
+  Float_t *GetPid() {return fPID;}
+
+  void SetPrimaryIndex(Int_t primary)     { fPrimaryIndex = primary; }
+  Int_t GetPrimaryIndex() const           { return fPrimaryIndex; }
+
+  void SetM20(Float_t m20)                { fM20 = m20; }
+  Float_t GetM20() const                  { return fM20; }
+
+  void SetM02(Float_t m02)                { fM02 = m02; }
+  Float_t GetM02() const                  { return fM02; }
+
+  void SetM11(Float_t m11)                { fM11 = m11; }
+  Float_t GetM11() const                  { return fM11; }
+
+  void SetNExMax(UShort_t nExMax)         { fNExMax = nExMax; }
+  UShort_t GetNExMax() const              { return fNExMax; }
+
+  void SetEmcCpvDistance(Float_t dEmcCpv) { fEmcCpvDistance = dEmcCpv; }
+  Float_t GetEmcCpvDistance() const       { return fEmcCpvDistance; }
+
+  void SetNumberOfDigits(Int_t ndig)      { fNumberOfDigits = ndig; }
+  Int_t GetNumberOfDigits() const         { return fNumberOfDigits; }
+  
+  void SetDigitAmplitude(UShort_t *adc)   { fDigitAmplitude = adc;}
+  UShort_t *GetDigitAmplitude() const     { return fDigitAmplitude;}
+
+  void SetDigitTime(UShort_t *time)       { fDigitTime = time;}
+  UShort_t *GetDigitTime() const          { return fDigitTime;}
+
+  void SetDigitIndex(UShort_t *digit)     { fDigitIndex = digit;}
+  UShort_t *GetDigitIndex() const         { return fDigitIndex; }
+
+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)
+  Int_t     fPrimaryIndex;     // primary track number associated with this cluster
+  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
+
+
+
+  Int_t     fNumberOfDigits;   // number of calorimeter digits in cluster
+                               // Very important! The streamer needs to
+                               // know how big these arrays are for
+                               // each event that is written out: 
+  UShort_t* fDigitAmplitude;   //[fNumberOfDigits] digit energy (integer units)
+  UShort_t* fDigitTime;        //[fNumberOfDigits] time of this digit (integer units)
+  UShort_t* fDigitIndex;       //[fNumberOfDigits] calorimeter digit index
+
+  ClassDef(AliESDCaloCluster,1)  //ESDCaloCluster 
+};
+
+#endif 
+
index e512d95a25d282399fe6b0c579d39b2c677dff43..49844a1a67572286725185a3f4958b9d5a48a3e6 100644 (file)
@@ -81,14 +81,14 @@ Int_t AliESDpid::MakePID(AliESD *event)
       for (j=0; j<ns; j++) p[j]*=d[j];
     }
 
       for (j=0; j<ns; j++) p[j]*=d[j];
     }
 
-    if ((t->GetStatus()&AliESDtrack::kPHOSpid )!=0) {
-      Double_t d[10];
-      t->GetPHOSpid(d);
-      Int_t j, ok=0;
-      for (j=0; j<ns; j++) if (d[j]>keps) ok=1;
-      if (ok) 
-      for (j=0; j<ns; j++) p[j]*=d[j];
-    }
+    //    if ((t->GetStatus()&AliESDtrack::kPHOSpid )!=0) {
+    //  Double_t d[10];
+    //  t->GetPHOSpid(d);
+    //  Int_t j, ok=0;
+    //  for (j=0; j<ns; j++) if (d[j]>keps) ok=1;
+    //  if (ok) 
+    //  for (j=0; j<ns; j++) p[j]*=d[j];
+    //}
 
     if ((t->GetStatus()&AliESDtrack::kRICHpid )!=0) {
       Double_t d[10];
 
     if ((t->GetStatus()&AliESDtrack::kRICHpid )!=0) {
       Double_t d[10];
index f164e3be837caf9bea0d4d96188ec1523af9387e..e04fcb65d75beb22ef51e90e470fcd199fe61997 100644 (file)
@@ -96,8 +96,7 @@ AliESDtrack::AliESDtrack() :
   fTOFchi2(0),
   fTOFindex(0),
   fTOFsignal(-1),
   fTOFchi2(0),
   fTOFindex(0),
   fTOFsignal(-1),
-  fPHOSsignal(-1),
-  fEMCALsignal(-1),
+  //  fPHOSsignal(-1),
   fRICHchi2(1e10),
   fRICHncls(0),
   fRICHindex(0),
   fRICHchi2(1e10),
   fRICHncls(0),
   fRICHindex(0),
@@ -121,14 +120,11 @@ AliESDtrack::AliESDtrack() :
     fRICHr[i]=1.;
   }
   
     fRICHr[i]=1.;
   }
   
-  for (Int_t i=0; i<AliPID::kSPECIESN; i++) {
-    fPHOSr[i]  = 1.;
-    fEMCALr[i] = 1.;
-  }
+  //  for (Int_t i=0; i<AliPID::kSPECIESN; i++) {
+  //  fPHOSr[i]  = 1.;
+  // } 
+  //  fPHOSpos[0]=fPHOSpos[1]=fPHOSpos[2]=0.;
 
 
-  fPHOSpos[0]=fPHOSpos[1]=fPHOSpos[2]=0.;
-  fEMCALpos[0]=fEMCALpos[1]=fEMCALpos[2]=0.;
   Int_t i;
   for (i=0;i<12;i++) fITSchi2MIP[i] =1e10;
   for (i=0; i<6; i++)  { fITSindex[i]=0; }
   Int_t i;
   for (i=0;i<12;i++) fITSchi2MIP[i] =1e10;
   for (i=0; i<6; i++)  { fITSindex[i]=0; }
@@ -188,8 +184,7 @@ AliESDtrack::AliESDtrack(const AliESDtrack& track):
   fTOFchi2(track.fTOFchi2),
   fTOFindex(track.fTOFindex),
   fTOFsignal(track.fTOFsignal),
   fTOFchi2(track.fTOFchi2),
   fTOFindex(track.fTOFindex),
   fTOFsignal(track.fTOFsignal),
-  fPHOSsignal(track.fPHOSsignal),
-  fEMCALsignal(track.fEMCALsignal),
+  //fPHOSsignal(track.fPHOSsignal),
   fRICHchi2(track.fRICHchi2),
   fRICHncls(track.fRICHncls),
   fRICHindex(track.fRICHindex),
   fRICHchi2(track.fRICHchi2),
   fRICHncls(track.fRICHncls),
   fRICHindex(track.fRICHindex),
@@ -226,11 +221,8 @@ AliESDtrack::AliESDtrack(const AliESDtrack& track):
   for (Int_t i=0;i<3;i++) fTOFLabel[i]=track.fTOFLabel[i];
   for (Int_t i=0;i<10;i++) fTOFInfo[i]=track.fTOFInfo[i];
   //
   for (Int_t i=0;i<3;i++) fTOFLabel[i]=track.fTOFLabel[i];
   for (Int_t i=0;i<10;i++) fTOFInfo[i]=track.fTOFInfo[i];
   //
-  for (Int_t i=0;i<3;i++) fPHOSpos[i]=track.fPHOSpos[i]; 
-  for (Int_t i=0;i<AliPID::kSPECIESN;i++) fPHOSr[i]=track.fPHOSr[i]; 
-  //
-  for (Int_t i=0;i<3;i++) fEMCALpos[i]=track.fEMCALpos[i]; 
-  for (Int_t i=0;i<AliPID::kSPECIESN;i++) fEMCALr[i]=track.fEMCALr[i]; 
+  //  for (Int_t i=0;i<3;i++) fPHOSpos[i]=track.fPHOSpos[i]; 
+  //for (Int_t i=0;i<AliPID::kSPECIESN;i++) fPHOSr[i]=track.fPHOSr[i]; 
   //
   for (Int_t i=0;i<AliPID::kSPECIES;i++) fRICHr[i]=track.fRICHr[i];
 
   //
   for (Int_t i=0;i<AliPID::kSPECIES;i++) fRICHr[i]=track.fRICHr[i];
 
@@ -336,15 +328,10 @@ void AliESDtrack::MakeMiniESDtrack(){
   for (Int_t i=0;i<10;i++) fTOFInfo[i] = 0;
 
   // Reset PHOS related track information
   for (Int_t i=0;i<10;i++) fTOFInfo[i] = 0;
 
   // Reset PHOS related track information
-  for (Int_t i=0;i<3;i++) fPHOSpos[i] = 0; 
-  fPHOSsignal = 0; 
-  for (Int_t i=0;i<AliPID::kSPECIESN;i++) fPHOSr[i] = 0;
-  // Reset EMCAL related track information
-  for (Int_t i=0;i<3;i++) fEMCALpos[i] = 0; 
-  fEMCALsignal = 0; 
-  for (Int_t i=0;i<AliPID::kSPECIESN;i++) fEMCALr[i] = 0;
+  //for (Int_t i=0;i<3;i++) fPHOSpos[i] = 0; 
+  //fPHOSsignal = 0; 
+  //for (Int_t i=0;i<AliPID::kSPECIESN;i++) fPHOSr[i] = 0;
+  
   // Reset RICH related track information
   fRICHchi2 = 0;     
   fRICHncls = 0;     
   // Reset RICH related track information
   fRICHchi2 = 0;     
   fRICHncls = 0;     
@@ -793,32 +780,6 @@ void AliESDtrack::SetTOFInfo(Float_t*info) {
 
 
 
 
 
 
-//_______________________________________________________________________
-void AliESDtrack::SetPHOSpid(const Double_t *p) {  
-  // Sets the probability of each particle type (in PHOS)
-  SetPIDValues(fPHOSr,p,AliPID::kSPECIESN);
-  SetStatus(AliESDtrack::kPHOSpid);
-}
-
-//_______________________________________________________________________
-void AliESDtrack::GetPHOSpid(Double_t *p) const {
-  // Gets probabilities of each particle type (in PHOS)
-  for (Int_t i=0; i<AliPID::kSPECIESN; i++) p[i]=fPHOSr[i];
-}
-
-//_______________________________________________________________________
-void AliESDtrack::SetEMCALpid(const Double_t *p) {  
-  // Sets the probability of each particle type (in EMCAL)
-  SetPIDValues(fEMCALr,p,AliPID::kSPECIESN);
-  SetStatus(AliESDtrack::kEMCALpid);
-}
-
-//_______________________________________________________________________
-void AliESDtrack::GetEMCALpid(Double_t *p) const {
-  // Gets probabilities of each particle type (in EMCAL)
-  for (Int_t i=0; i<AliPID::kSPECIESN; i++) p[i]=fEMCALr[i];
-}
-
 //_______________________________________________________________________
 void AliESDtrack::SetRICHpid(const Double_t *p) {  
   // Sets the probability of each particle type (in RICH)
 //_______________________________________________________________________
 void AliESDtrack::SetRICHpid(const Double_t *p) {  
   // Sets the probability of each particle type (in RICH)
@@ -950,18 +911,13 @@ void AliESDtrack::Print(Option_t *) const {
       printf("%f, ", p[index]) ;
     printf("\n           signal = %f\n", GetRICHsignal()) ;
   }
       printf("%f, ", p[index]) ;
     printf("\n           signal = %f\n", GetRICHsignal()) ;
   }
-  if( IsOn(kPHOSpid) ){
-    printf("From PHOS: ") ; 
-    GetPHOSpid(p) ; 
-    for(index = 0 ; index < AliPID::kSPECIESN; index++) 
-      printf("%f, ", p[index]) ;
-    printf("\n           signal = %f\n", GetPHOSsignal()) ;
-  }
-  if( IsOn(kEMCALpid) ){
-    printf("From EMCAL: ") ; 
-    GetEMCALpid(p) ; 
-    for(index = 0 ; index < AliPID::kSPECIESN; index++) 
-      printf("%f, ", p[index]) ;
-    printf("\n           signal = %f\n", GetEMCALsignal()) ;
-  }
+  // Since 9 March 2006 PHOS left ESDtrack for ESDCaloCluster
+  // and cannot participate in the global PID for the moment
+//   if( IsOn(kPHOSpid) ){
+//     printf("From PHOS: ") ; 
+//     GetPHOSpid(p) ; 
+//     for(index = 0 ; index < AliPID::kSPECIESN; index++) 
+//       printf("%f, ", p[index]) ;
+//     printf("\n           signal = %f\n", GetPHOSsignal()) ;
+//   }
 } 
 } 
index 1cc8408a6491f224f97d4838f887b5d19b7c70e6..086bb34a8a094ba98920f070e0e84bd6f8eaaa5d 100644 (file)
@@ -191,32 +191,20 @@ public:
     dx=fRICHdx; dy=fRICHdy;
   }
   
     dx=fRICHdx; dy=fRICHdy;
   }
   
-  void SetPHOSposition(const Double_t *pos)  {
-    fPHOSpos[0] = pos[0]; fPHOSpos[1]=pos[1]; fPHOSpos[2]=pos[2];
-  }
-  void SetPHOSsignal(Double_t ene) {fPHOSsignal = ene; }
-  void SetPHOSpid(const Double_t *p);
-  void GetPHOSposition(Double_t *pos) const {
-    pos[0]=fPHOSpos[0]; pos[1]=fPHOSpos[1]; pos[2]=fPHOSpos[2];
-  }
-  Float_t GetPHOSsignal() const {return fPHOSsignal;}
-  void GetPHOSpid(Double_t *p) const;  
-
-  void SetEMCALposition(const Double_t *pos)  {
-    fEMCALpos[0] = pos[0]; fEMCALpos[1]=pos[1]; fEMCALpos[2]=pos[2];
-  }
-  void SetEMCALsignal(Double_t ene) {fEMCALsignal = ene; }
-  void SetEMCALpid(const Double_t *p);
-  void GetEMCALposition(Double_t *pos) const {
-    pos[0]=fEMCALpos[0]; pos[1]=fEMCALpos[1]; pos[2]=fEMCALpos[2];
-  }
-  Float_t GetEMCALsignal() const {return fEMCALsignal;}
-  void GetEMCALpid(Double_t *p) const;  
+ /*  void SetPHOSposition(const Double_t *pos)  { */
+/*     fPHOSpos[0] = pos[0]; fPHOSpos[1]=pos[1]; fPHOSpos[2]=pos[2]; */
+/*   } */
+/*   void SetPHOSsignal(Double_t ene) {fPHOSsignal = ene; } */
+/*   void SetPHOSpid(const Double_t *p); */
+/*   void GetPHOSposition(Double_t *pos) const { */
+/*     pos[0]=fPHOSpos[0]; pos[1]=fPHOSpos[1]; pos[2]=fPHOSpos[2]; */
+/*   } */
+/*   Float_t GetPHOSsignal() const {return fPHOSsignal;} */
+/*   void GetPHOSpid(Double_t *p) const;   */
 
   Bool_t IsOn(Int_t mask) const {return (fFlags&mask)>0;}
   Bool_t IsRICH()  const {return fFlags&kRICHpid;}
   Bool_t IsPHOS()  const {return fFlags&kPHOSpid;}
 
   Bool_t IsOn(Int_t mask) const {return (fFlags&mask)>0;}
   Bool_t IsRICH()  const {return fFlags&kRICHpid;}
   Bool_t IsPHOS()  const {return fFlags&kPHOSpid;}
-  Bool_t IsEMCAL() const {return fFlags&kEMCALpid;}
 
   void   SetTrackPointArray(AliTrackPointArray *points) { fPoints = points; }
   AliTrackPointArray *GetTrackPointArray() const { return fPoints; }
 
   void   SetTrackPointArray(AliTrackPointArray *points) { fPoints = points; }
   AliTrackPointArray *GetTrackPointArray() const { return fPoints; }
@@ -234,7 +222,7 @@ public:
     kTPCin=0x0010,kTPCout=0x0020,kTPCrefit=0x0040,kTPCpid=0x0080,
     kTRDin=0x0100,kTRDout=0x0200,kTRDrefit=0x0400,kTRDpid=0x0800,
     kTOFin=0x1000,kTOFout=0x2000,kTOFrefit=0x4000,kTOFpid=0x8000,
     kTPCin=0x0010,kTPCout=0x0020,kTPCrefit=0x0040,kTPCpid=0x0080,
     kTRDin=0x0100,kTRDout=0x0200,kTRDrefit=0x0400,kTRDpid=0x0800,
     kTOFin=0x1000,kTOFout=0x2000,kTOFrefit=0x4000,kTOFpid=0x8000,
-    kPHOSpid=0x10000, kRICHpid=0x20000, kEMCALpid=0x40000,
+    kPHOSpid=0x10000, kRICHpid=0x20000,
     kTRDbackup=0x80000,
     kTRDStop=0x20000000,
     kESDpid=0x40000000,
     kTRDbackup=0x80000,
     kTRDStop=0x20000000,
     kESDpid=0x40000000,
@@ -315,14 +303,9 @@ protected:
   Float_t fTOFInfo[10];       //! TOF informations
 
   // PHOS related track information 
   Float_t fTOFInfo[10];       //! TOF informations
 
   // PHOS related track information 
-  Float_t fPHOSpos[3]; // position localised by PHOS in global coordinate system
-  Float_t fPHOSsignal; // energy measured by PHOS
-  Float_t fPHOSr[AliPID::kSPECIESN]; // PID information from PHOS
-
-  // EMCAL related track information 
-  Float_t fEMCALpos[3]; //position localised by EMCAL in global coordinate system
-  Float_t fEMCALsignal; // energy measured by EMCAL
-  Float_t fEMCALr[AliPID::kSPECIESN]; // PID information from EMCAL
+  //  Float_t fPHOSpos[3]; // position localised by PHOS in global coordinate system
+  // Float_t fPHOSsignal; // energy measured by PHOS
+  //Float_t fPHOSr[AliPID::kSPECIESN]; // PID information from PHOS
 
   // HMPID related track information
   Float_t fRICHchi2;       // chi2 in the RICH
 
   // HMPID related track information
   Float_t fRICHchi2;       // chi2 in the RICH
@@ -337,7 +320,7 @@ protected:
 
   AliTrackPointArray *fPoints; // Array which contains the track space points in the global frame
 
 
   AliTrackPointArray *fPoints; // Array which contains the track space points in the global frame
 
-  ClassDef(AliESDtrack,22)  //ESDtrack 
+  ClassDef(AliESDtrack,23)  //ESDtrack 
 };
 
 #endif 
 };
 
 #endif 
index 085a58b6d9cb3c0c198dd6426daf117217b30c4b..d7a0889e53f806e7248f8abfde87cf09b82bd9c3 100644 (file)
@@ -53,9 +53,9 @@ ClassImp(AliEventTag)
     fNumberOfCascades(-10),
     fNumberOfKinks(-10),
     fNumberOfPMDTracks(-10),
     fNumberOfCascades(-10),
     fNumberOfKinks(-10),
     fNumberOfPMDTracks(-10),
-    fNumberOfPHOSTracks(-10),
-    fNumberOfEMCALTracks(-10),
     fNumberOfFMDTracks(-10),
     fNumberOfFMDTracks(-10),
+    fNumberOfPHOSClusters(-10),
+    fNumberOfEMCALClusters(-10),
     fNumberOfJetCandidates(-10),
     fMaxJetEnergy(-100.0),
     fNumberOfHardPhotonsCandidates(-10),
     fNumberOfJetCandidates(-10),
     fMaxJetEnergy(-100.0),
     fNumberOfHardPhotonsCandidates(-10),
@@ -131,10 +131,10 @@ AliEventTag::AliEventTag(const AliEventTag & EvTag) : TObject(EvTag)
   SetNumOfKinks(EvTag.GetNumOfKinks());
   
   SetNumOfPMDTracks(EvTag.GetNumOfPMDTracks());
   SetNumOfKinks(EvTag.GetNumOfKinks());
   
   SetNumOfPMDTracks(EvTag.GetNumOfPMDTracks());
-  SetNumOfPHOSTracks(EvTag.GetNumOfPHOSTracks());
-  SetNumOfEMCALTracks(EvTag.GetNumOfEMCALTracks());
   SetNumOfFMDTracks(EvTag.GetNumOfFMDTracks());
   SetNumOfFMDTracks(EvTag.GetNumOfFMDTracks());
-  
+  SetNumOfPHOSClusters(EvTag.GetNumOfPHOSClusters());
+  SetNumOfEMCALClusters(EvTag.GetNumOfEMCALClusters());
+
   SetNumOfJetCandidates(EvTag.GetNumOfJetCandidates());
   SetNumOfHardPhotonsCandidates(EvTag.GetNumOfHardPhotonsCandidates());
 
   SetNumOfJetCandidates(EvTag.GetNumOfJetCandidates());
   SetNumOfHardPhotonsCandidates(EvTag.GetNumOfHardPhotonsCandidates());
 
@@ -218,9 +218,9 @@ AliEventTag & AliEventTag::operator=(const AliEventTag &EvTag)
     SetNumOfKinks(EvTag.GetNumOfKinks());
     
     SetNumOfPMDTracks(EvTag.GetNumOfPMDTracks());
     SetNumOfKinks(EvTag.GetNumOfKinks());
     
     SetNumOfPMDTracks(EvTag.GetNumOfPMDTracks());
-    SetNumOfPHOSTracks(EvTag.GetNumOfPHOSTracks());
-    SetNumOfEMCALTracks(EvTag.GetNumOfEMCALTracks());
     SetNumOfFMDTracks(EvTag.GetNumOfFMDTracks());
     SetNumOfFMDTracks(EvTag.GetNumOfFMDTracks());
+    SetNumOfPHOSClusters(EvTag.GetNumOfPHOSClusters());
+    SetNumOfEMCALClusters(EvTag.GetNumOfEMCALClusters());
     
     SetNumOfJetCandidates(EvTag.GetNumOfJetCandidates());
     SetNumOfHardPhotonsCandidates(EvTag.GetNumOfHardPhotonsCandidates());
     
     SetNumOfJetCandidates(EvTag.GetNumOfJetCandidates());
     SetNumOfHardPhotonsCandidates(EvTag.GetNumOfHardPhotonsCandidates());
index baf85179f1481c5a3ff13b81094a8e1656811af1..45da3eabfac869f2e4776194a66e78f6d1ec7104 100644 (file)
@@ -61,14 +61,13 @@ class AliEventTag : public TObject
   void   SetNumOfKinks(Int_t Ptr) {fNumberOfKinks = Ptr;}
 
   void   SetNumOfPMDTracks(Int_t Ptr) {fNumberOfPMDTracks = Ptr;}
   void   SetNumOfKinks(Int_t Ptr) {fNumberOfKinks = Ptr;}
 
   void   SetNumOfPMDTracks(Int_t Ptr) {fNumberOfPMDTracks = Ptr;}
-  void   SetNumOfPHOSTracks(Int_t Ptr) {fNumberOfPHOSTracks = Ptr;}
-  void   SetNumOfEMCALTracks(Int_t Ptr) {fNumberOfEMCALTracks = Ptr;}
   void   SetNumOfFMDTracks(Int_t Ptr) {fNumberOfFMDTracks = Ptr;}
   void   SetNumOfFMDTracks(Int_t Ptr) {fNumberOfFMDTracks = Ptr;}
+  void   SetNumOfPHOSClusters(Int_t Ptr) {fNumberOfPHOSClusters = Ptr;}
+  void   SetNumOfEMCALClusters(Int_t Ptr) {fNumberOfEMCALClusters = Ptr;}
 
   void   SetNumOfJetCandidates(Int_t Ptr) {fNumberOfJetCandidates = Ptr;}
   void   SetNumOfHardPhotonsCandidates(Int_t Ptr) {fNumberOfHardPhotonsCandidates = Ptr;}
 
 
   void   SetNumOfJetCandidates(Int_t Ptr) {fNumberOfJetCandidates = Ptr;}
   void   SetNumOfHardPhotonsCandidates(Int_t Ptr) {fNumberOfHardPhotonsCandidates = Ptr;}
 
-
   void   SetMaxJetEnergy(Float_t f) {fMaxJetEnergy = f;}
   void   SetMaxNeutralEnergy(Float_t f) {fMaxNeutralEnergy = f;}
   
   void   SetMaxJetEnergy(Float_t f) {fMaxJetEnergy = f;}
   void   SetMaxNeutralEnergy(Float_t f) {fMaxNeutralEnergy = f;}
   
@@ -143,9 +142,9 @@ class AliEventTag : public TObject
   Int_t   GetNumOfKinks() const {return fNumberOfKinks;}
 
   Int_t   GetNumOfPMDTracks() const {return fNumberOfPMDTracks;}
   Int_t   GetNumOfKinks() const {return fNumberOfKinks;}
 
   Int_t   GetNumOfPMDTracks() const {return fNumberOfPMDTracks;}
-  Int_t   GetNumOfPHOSTracks() const {return fNumberOfPHOSTracks;}
-  Int_t   GetNumOfEMCALTracks() const {return fNumberOfEMCALTracks;}
   Int_t   GetNumOfFMDTracks() const {return fNumberOfFMDTracks;}
   Int_t   GetNumOfFMDTracks() const {return fNumberOfFMDTracks;}
+  Int_t   GetNumOfPHOSClusters() const {return fNumberOfPHOSClusters;}
+  Int_t   GetNumOfEMCALClusters() const {return fNumberOfEMCALClusters;}
 
   Int_t   GetNumOfJetCandidates() const {return fNumberOfJetCandidates;}
   Int_t   GetNumOfHardPhotonsCandidates() const {return fNumberOfHardPhotonsCandidates;}
 
   Int_t   GetNumOfJetCandidates() const {return fNumberOfJetCandidates;}
   Int_t   GetNumOfHardPhotonsCandidates() const {return fNumberOfHardPhotonsCandidates;}
@@ -219,9 +218,9 @@ class AliEventTag : public TObject
   Int_t    fNumberOfCascades;                 //Number of cascades
   Int_t    fNumberOfKinks;                    //Number of kinks
   Int_t    fNumberOfPMDTracks;                //PMD tracks
   Int_t    fNumberOfCascades;                 //Number of cascades
   Int_t    fNumberOfKinks;                    //Number of kinks
   Int_t    fNumberOfPMDTracks;                //PMD tracks
-  Int_t    fNumberOfPHOSTracks;                       //PHOS tracks
-  Int_t    fNumberOfEMCALTracks;              //EMCAL tracks
   Int_t    fNumberOfFMDTracks;                //FMD tracks
   Int_t    fNumberOfFMDTracks;                //FMD tracks
+  Int_t    fNumberOfPHOSClusters;             //PHOS clusters
+  Int_t    fNumberOfEMCALClusters;            //EMCAL clusters
   Int_t    fNumberOfJetCandidates;            //Jet candidates
 
   Float_t  fMaxJetEnergy;                      //jet energy info
   Int_t    fNumberOfJetCandidates;            //Jet candidates
 
   Float_t  fMaxJetEnergy;                      //jet energy info
@@ -268,7 +267,7 @@ class AliEventTag : public TObject
   Float_t  fEventPlaneAngle;                  //event plane info
   Float_t  fHBTRadii;                          //HBT info
 
   Float_t  fEventPlaneAngle;                  //event plane info
   Float_t  fHBTRadii;                          //HBT info
 
-  ClassDef(AliEventTag,4)  //(ClassName, ClassVersion)
+  ClassDef(AliEventTag,5)  //(ClassName, ClassVersion)
     };
 //______________________________________________________________________________
 
     };
 //______________________________________________________________________________
 
index 86a6886acf2586436d332c60f9e892fa0107fb1f..2c03c433db929516b636e033b250fa2e5bd01193 100644 (file)
@@ -1439,8 +1439,8 @@ void AliReconstruction::CreateTag(TFile* file)
     evTag->SetNumOfElectronsAbove3GeV(nEl3GeV);
     evTag->SetNumOfElectronsAbove10GeV(nEl10GeV);
     
     evTag->SetNumOfElectronsAbove3GeV(nEl3GeV);
     evTag->SetNumOfElectronsAbove10GeV(nEl10GeV);
     
-    evTag->SetNumOfPHOSTracks(esd->GetNumberOfPHOSParticles());
-    evTag->SetNumOfEMCALTracks(esd->GetNumberOfEMCALParticles());
+    evTag->SetNumOfPHOSClusters(esd->GetNumberOfPHOSClusters());
+    evTag->SetNumOfEMCALClusters(esd->GetNumberOfEMCALClusters());
     
     evTag->SetTotalMomentum(totalP);
     evTag->SetMeanPt(meanPt);
     
     evTag->SetTotalMomentum(totalP);
     evTag->SetMeanPt(meanPt);
index 3fc34ea05b485d90748141b28f73612ec64d0861..982146d3f8f3d84c0b995302d716164f59de7432 100644 (file)
@@ -160,9 +160,9 @@ AliEventTag::AliEventTag()
        fNumberOfKinks = -10;
 
        fNumberOfPMDTracks = -10;
        fNumberOfKinks = -10;
 
        fNumberOfPMDTracks = -10;
-       fNumberOfPHOSTracks = -10;
-       fNumberOfEMCALTracks = -10;
        fNumberOfFMDTracks = -10;
        fNumberOfFMDTracks = -10;
+       fNumberOfPHOSTracks = -10;
+       fNumberOfEMCALClusters = -10;
 
        fNumberOfJetCandidates = -10;
        fNumberOfHardPhotonsCandidates = -10;
 
        fNumberOfJetCandidates = -10;
        fNumberOfHardPhotonsCandidates = -10;
@@ -236,9 +236,9 @@ void AliEventTag::CopyTag(AliEventTag *EvTag)
        SetNumOfKinks(EvTag->GetNumOfKinks());
 
        SetNumOfPMDTracks(EvTag->GetNumOfPMDTracks());
        SetNumOfKinks(EvTag->GetNumOfKinks());
 
        SetNumOfPMDTracks(EvTag->GetNumOfPMDTracks());
-       SetNumOfPHOSTracks(EvTag->GetNumOfPHOSTracks());
-       SetNumOfEMCALTracks(EvTag->GetNumOfEMCALTracks());
        SetNumOfFMDTracks(EvTag->GetNumOfFMDTracks());
        SetNumOfFMDTracks(EvTag->GetNumOfFMDTracks());
+       SetNumOfPHOSTracks(EvTag->GetNumOfPHOSTracks());
+       SetNumOfEMCALClusters(EvTag->GetNumOfEMCALClusters());
 
        SetNumOfJetCandidates(EvTag->GetNumOfJetCandidates());
        SetNumOfHardPhotonsCandidates(EvTag->GetNumOfHardPhotonsCandidates());
 
        SetNumOfJetCandidates(EvTag->GetNumOfJetCandidates());
        SetNumOfHardPhotonsCandidates(EvTag->GetNumOfHardPhotonsCandidates());
index 7519aa42dc4c563f74fd66a55d819a22df10427b..a77bed064a966b361b5ee8b77bdd88bb921e4da6 100644 (file)
@@ -32,8 +32,8 @@ class AliEventTag : public TObject
                Int_t    fNumberOfCascades;                //Number of cascades
                Int_t    fNumberOfKinks;                   //Number of kinks
                Int_t    fNumberOfPMDTracks;               //PMD tracks
                Int_t    fNumberOfCascades;                //Number of cascades
                Int_t    fNumberOfKinks;                   //Number of kinks
                Int_t    fNumberOfPMDTracks;               //PMD tracks
-               Int_t    fNumberOfPHOSTracks;              //PHOS tracks
-               Int_t    fNumberOfEMCALTracks;             //EMCAL tracks
+               Int_t    fNumberOfPHOSClusters;            //PHOS clusters
+               Int_t    fNumberOfEMCALClusters;           //EMCAL clusters
                Int_t    fNumberOfFMDTracks;               //FMD tracks
                Int_t    fNumberOfJetCandidates;           //Jet candidates
                Int_t    fNumberOfHardPhotonsCandidates;   //Hard photons candidates
                Int_t    fNumberOfFMDTracks;               //FMD tracks
                Int_t    fNumberOfJetCandidates;           //Jet candidates
                Int_t    fNumberOfHardPhotonsCandidates;   //Hard photons candidates
@@ -93,8 +93,8 @@ class AliEventTag : public TObject
                void          SetNumOfKinks(Int_t Ptr) {fNumberOfKinks = Ptr;}
 
                void          SetNumOfPMDTracks(Int_t Ptr) {fNumberOfPMDTracks = Ptr;}
                void          SetNumOfKinks(Int_t Ptr) {fNumberOfKinks = Ptr;}
 
                void          SetNumOfPMDTracks(Int_t Ptr) {fNumberOfPMDTracks = Ptr;}
-               void          SetNumOfPHOSTracks(Int_t Ptr) {fNumberOfPHOSTracks = Ptr;}
-               void          SetNumOfEMCALTracks(Int_t Ptr) {fNumberOfEMCALTracks = Ptr;}
+               void          SetNumOfPHOSClusters(Int_t Ptr) {fNumberOfPHOSClusters = Ptr;}
+               void          SetNumOfEMCALClusters(Int_t Ptr) {fNumberOfEMCALClusters = Ptr;}
                void          SetNumOfFMDTracks(Int_t Ptr) {fNumberOfFMDTracks = Ptr;}
 
                void          SetNumOfJetCandidates(Int_t Ptr) {fNumberOfJetCandidates = Ptr;}
                void          SetNumOfFMDTracks(Int_t Ptr) {fNumberOfFMDTracks = Ptr;}
 
                void          SetNumOfJetCandidates(Int_t Ptr) {fNumberOfJetCandidates = Ptr;}
@@ -155,9 +155,9 @@ class AliEventTag : public TObject
                Int_t         GetNumOfKinks() {return fNumberOfKinks;}
 
                Int_t         GetNumOfPMDTracks() {return fNumberOfPMDTracks;}
                Int_t         GetNumOfKinks() {return fNumberOfKinks;}
 
                Int_t         GetNumOfPMDTracks() {return fNumberOfPMDTracks;}
-               Int_t         GetNumOfPHOSTracks() {return fNumberOfPHOSTracks;}
-               Int_t         GetNumOfEMCALTracks() {return fNumberOfEMCALTracks;}
                Int_t         GetNumOfFMDTracks() {return fNumberOfFMDTracks;}
                Int_t         GetNumOfFMDTracks() {return fNumberOfFMDTracks;}
+               Int_t         GetNumOfPHOSClusters() {return fNumberOfPHOSClusters;}
+               Int_t         GetNumOfEMCALClusters() {return fNumberOfEMCALClusters;}
 
                Int_t         GetNumOfJetCandidates() {return fNumberOfJetCandidates;}
                Int_t         GetNumOfHardPhotonsCandidates() {return fNumberOfHardPhotonsCandidates;}
 
                Int_t         GetNumOfJetCandidates() {return fNumberOfJetCandidates;}
                Int_t         GetNumOfHardPhotonsCandidates() {return fNumberOfHardPhotonsCandidates;}
@@ -186,7 +186,7 @@ class AliEventTag : public TObject
                Float_t       GetFlowV1() {return fFlowV1;}
                Float_t       GetFlowV2() {return fFlowV2;}
 
                Float_t       GetFlowV1() {return fFlowV1;}
                Float_t       GetFlowV2() {return fFlowV2;}
 
-       ClassDef(AliEventTag,1)  //(ClassName, ClassVersion)
+       ClassDef(AliEventTag,2)  //(ClassName, ClassVersion)
 };
 //______________________________________________________________________________
 
 };
 //______________________________________________________________________________
 
index e0d64093954850cc24bd20571f9a91daf4e98ece..fe1789a1e456d3e15a7f9a6decc639fe3a912988 100644 (file)
@@ -440,8 +440,8 @@ void AliTagCreator::CreateTag(TFile* file, const char *guid, const char *md5, co
     evTag->SetNumOfElectronsAbove3GeV(nEl3GeV);
     evTag->SetNumOfElectronsAbove10GeV(nEl10GeV);
     
     evTag->SetNumOfElectronsAbove3GeV(nEl3GeV);
     evTag->SetNumOfElectronsAbove10GeV(nEl10GeV);
     
-    evTag->SetNumOfPHOSTracks(esd->GetNumberOfPHOSParticles());
-    evTag->SetNumOfEMCALTracks(esd->GetNumberOfEMCALParticles());
+    evTag->SetNumOfPHOSClusters(esd->GetNumberOfPHOSClusters());
+    evTag->SetNumOfEMCALClusters(esd->GetNumberOfEMCALClusters());
     
     evTag->SetTotalMomentum(totalP);
     evTag->SetMeanPt(meanPt);
     
     evTag->SetTotalMomentum(totalP);
     evTag->SetMeanPt(meanPt);
index fbcb02548412750b13f905672a6e6ccc87ef7c41..434cc31d9845320ec931d0193d5fb494b2d8cb01 100644 (file)
@@ -22,6 +22,7 @@
 #pragma link C++ class  AliESDkink+;
 #pragma link C++ class  AliESDV0MI+;
 #pragma link C++ class  AliESDV0MIParams+;
 #pragma link C++ class  AliESDkink+;
 #pragma link C++ class  AliESDV0MI+;
 #pragma link C++ class  AliESDV0MIParams+;
+#pragma link C++ class  AliESDCaloCluster+;
 
 #pragma link C++ class  AliKalmanTrack+;
 #pragma link C++ class  AliHelix+;
 
 #pragma link C++ class  AliKalmanTrack+;
 #pragma link C++ class  AliHelix+;
index f2372cbc02c475c84b9b89ed7fe74e49afbc938c..75f128a7a4d25c154700acac448220396741fdfe 100644 (file)
@@ -3,6 +3,7 @@ SRCS = AliESD.cxx \
        AliESDMuonTrack.cxx AliESDPmdTrack.cxx AliESDHLTtrack.cxx \
        AliESDv0.cxx AliESDcascade.cxx AliESDVertex.cxx \
        AliESDpid.cxx AliESDkink.cxx AliESDV0MI.cxx \
        AliESDMuonTrack.cxx AliESDPmdTrack.cxx AliESDHLTtrack.cxx \
        AliESDv0.cxx AliESDcascade.cxx AliESDVertex.cxx \
        AliESDpid.cxx AliESDkink.cxx AliESDV0MI.cxx \
+       AliESDCaloCluster.cxx \
        AliKalmanTrack.cxx AliHelix.cxx AliExternalTrackParam.cxx \
        AliLog.cxx AliPID.cxx AliESDV0MIParams.cxx \
        AliRunTag.cxx AliLHCTag.cxx AliDetectorTag.cxx AliEventTag.cxx \
        AliKalmanTrack.cxx AliHelix.cxx AliExternalTrackParam.cxx \
        AliLog.cxx AliPID.cxx AliESDV0MIParams.cxx \
        AliRunTag.cxx AliLHCTag.cxx AliDetectorTag.cxx AliEventTag.cxx \