]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
AliAODCluster.h: PID particle types like in ESD but with two more for FMD/PMD kCharge...
authormorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 15 May 2008 08:23:07 +0000 (08:23 +0000)
committermorsch <morsch@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 15 May 2008 08:23:07 +0000 (08:23 +0000)
increased to 13. Setter of PID added to set PID array from ESDs which is 2 units smaller.
AliAODCluster.cxx, AliAODCaloCluster.cxx, .h: Size of PID arrays increased to 13
(Gustavo Conesa)

STEER/AliAODCaloCluster.cxx
STEER/AliAODCaloCluster.h
STEER/AliAODCluster.cxx
STEER/AliAODCluster.h

index be5beaea2be630b15278b20fef8c11c3a6b799e2..f9d6efa03e314af19eff3cf11d700390824def99 100644 (file)
@@ -50,7 +50,7 @@ AliAODCaloCluster::AliAODCaloCluster(Int_t id,
                                     Int_t *label, 
                                     Double_t energy,
                                     Double_t x[3],
-                                    Double_t pid[9],
+                                    Double_t pid[13],
                                     Char_t ttype,
                                     UInt_t selectInfo) :
   AliAODCluster(id, nLabel, label, energy, x, pid, ttype, selectInfo),
@@ -76,7 +76,7 @@ AliAODCaloCluster::AliAODCaloCluster(Int_t id,
                                     Int_t *label, 
                                     Float_t energy,
                                     Float_t x[3],
-                                    Float_t pid[9],
+                                    Float_t pid[13],
                                     Char_t ttype,
                                     UInt_t selectInfo) :
   AliAODCluster(id, nLabel, label, energy, x, pid, ttype, selectInfo),
index 24d937c00435aabd31f4eaf993b4b750f57d9003..45fe8a182735d30ecbd253b6058877475f86a8cb 100644 (file)
@@ -28,7 +28,7 @@ class AliAODCaloCluster : public AliAODCluster {
                    Int_t *label,
                    Double_t energy,
                    Double_t x[3],
-                   Double_t pid[9],
+                   Double_t pid[13],
                    Char_t ttype=kUndef,
                    UInt_t selectInfo=0);
   
@@ -37,7 +37,7 @@ class AliAODCaloCluster : public AliAODCluster {
                    Int_t *label,
                    Float_t energy,
                    Float_t x[3],
-                   Float_t pid[9],
+                   Float_t pid[13],
                    Char_t ttype=kUndef,
                    UInt_t selectInfo=0);
   
index c198f9d9e5b3e312ab305fdf5ba7f4c96f6bf7bb..aaabd96325268e9b0c03eeb000d1080799b2cb45 100644 (file)
@@ -46,7 +46,7 @@ AliAODCluster::AliAODCluster(Int_t id,
                             Int_t *label, 
                             Double_t energy,
                             Double_t x[3],
-                            Double_t pid[9],
+                            Double_t pid[13],
                             Char_t ttype,
                             UInt_t selectInfo) :
   fEnergy(energy),
@@ -70,7 +70,7 @@ AliAODCluster::AliAODCluster(Int_t id,
                             Int_t *label, 
                             Float_t energy,
                             Float_t x[3],
-                            Float_t pid[9],
+                            Float_t pid[13],
                             Char_t ttype,
                             UInt_t selectInfo) :
   fEnergy(energy),
@@ -160,7 +160,7 @@ AliAODCluster::AODCluPID_t AliAODCluster::GetMostProbablePID() const
 {
   // Returns the most probable PID array element.
   
-  Int_t nPID = 9;
+  Int_t nPID = 13;
   if (fPID) {
     AODCluPID_t loc = kUnknown;
     Double_t max = 0.;
index f3e11712be40b377982abb7b41912d0ef8675ff2..f742ebad3b7634612ffdb6240694daa29d255285 100644 (file)
@@ -24,15 +24,20 @@ class AliAODCluster : public TObject {
                 kPMDCharged};
 
   enum AODCluPID_t {
-    kUnknown = 0, 
-    kPhoton  = 1, 
-    kPi0     = 2, 
-    kNeutron = 3, 
-    kKaon0   = 4,
-    kEleCon  = 5, 
-    kCharged = 6, 
-    kNeutral = 7 , 
-    kOther   = 8};
+    kElectron = 0,
+    kMuon = 1,
+    kPion = 2,
+    kKaon = 3,
+    kProton = 4,
+    kPhoton = 5,
+    kPi0 = 6,
+    kNeutron = 7,
+    kKaon0 = 8,
+    kEleCon = 9,
+    kUnknown = 10,
+    kCharged   = 11, //For PMD?
+    kNeutral   =12 //For PMD? 
+  };
 
   AliAODCluster();
   AliAODCluster(Int_t id,
@@ -40,7 +45,7 @@ class AliAODCluster : public TObject {
                Int_t *label,
                Double_t energy,
                Double_t x[3],
-               Double_t pid[9],
+               Double_t pid[13],
                Char_t ttype=kUndef,
                UInt_t selectInfo=0);
 
@@ -49,7 +54,7 @@ class AliAODCluster : public TObject {
                 Int_t *label,
                 Float_t energy,
                 Float_t x[3],
-                Float_t pid[9],
+                Float_t pid[13],
                 Char_t ttype=kUndef,
                 UInt_t selectInfo=0);
 
@@ -66,11 +71,15 @@ class AliAODCluster : public TObject {
   AODCluPID_t GetMostProbablePID() const;
  
   template <class T> void GetPID(T *pid) const {
-    for(Int_t i=0; i<9; ++i) pid[i]=fPID[i];}
+    for(Int_t i=0; i<13; ++i) pid[i]=fPID[i];}
  
   template <class T> void SetPID(const T *pid) {
-    if(pid) for(Int_t i=0; i<9; ++i) fPID[i]=pid[i];
-    else {for(Int_t i=0; i<9; fPID[i++]=0);} fPID[AliAODCluster::kUnknown]=1.;}
+    if(pid) for(Int_t i=0; i<13; ++i) fPID[i]=pid[i];
+    else {for(Int_t i=0; i<13; fPID[i++]=0);} fPID[AliAODCluster::kUnknown]=1.;}
+
+  template <class T> void SetPIDFromESD(const T *pid) {
+    if(pid) {for(Int_t i=0; i<11; ++i) fPID[i]=pid[i];  fPID[11]=0;   fPID[12]=0;}
+    else {for(Int_t i=0; i<13; fPID[i++]=0);} fPID[AliAODCluster::kUnknown]=1.;}
 
   Int_t  GetID() const { return fID; }
   Int_t  GetLabel(UInt_t i) const;
@@ -108,7 +117,7 @@ class AliAODCluster : public TObject {
   Double32_t    fPosition[3];    // position of the cluster
 
   Double32_t    fChi2;           // chi2 (probably not necessary for PMD)
-  Double32_t    fPID[9];         // [0.,1.,8] pointer to PID object
+  Double32_t    fPID[13];         // [0.,1.,8] pointer to PID object
 
   Int_t         fID;             // unique cluster ID, points back to the ESD cluster
   Int_t         fNLabel;         // number of original track for this cluster      
@@ -117,7 +126,7 @@ class AliAODCluster : public TObject {
   
   Char_t        fType;           // cluster type
 
-  ClassDef(AliAODCluster,4);
+  ClassDef(AliAODCluster,5);
 };
 
 #endif