- Renaming fEventNumber (and the associated getters/setters) to
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Feb 2007 11:30:16 +0000 (11:30 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 27 Feb 2007 11:30:16 +0000 (11:30 +0000)
 fEventNumberInFile change esd->GetEventNumber() to esd->GetEventNumberInFile()
 in all places where it was called; add a comment which acts as a warning that
 this number is probably not what people want

- Removing fEventNumber (and associated getters/setters) from the AOD
 adding fBunchCrossNumber and fOrbitNumber (+ getters and setters) to the AOD
 and the ESD; increase ClassDef of AliESD to 18

- Prevent taking sqrt of a negative number, 'division by zero', and
 'out of bounds' errors in AliAODRedCov.h, which lead to crashes

- Major revision of CreateAODfromESD.C to be actually able to create AODs from
 ESDs in compiled and uncompiled mode without crashes (= includes updated,
 naming of variables changed to avoid CINT problems)

- Major changes in ReadAOD.C in order to be able to read an AOD back in
 compiled and uncompiled mode without crashes (= includes updated, protection
 for zero pointers added, code cleanup). This only works correctly with
 ROOT v5-15-02 or later (due to a bug in the naming scheme of ROOT),
 otherwise the only event read back is the first one (even N times if you try
 to read N subsequent events).

- Changing the name of the cluster array from 'neutrals' to 'clusters'
- Some cosmetic changes

Markus

17 files changed:
ANALYSIS/AliAODevent.cxx
ANALYSIS/AliD0toKpiAnalysis.cxx
FMD/AliFMDReconstructor.cxx
STEER/AliAODCluster.h
STEER/AliAODEvent.cxx
STEER/AliAODHeader.cxx
STEER/AliAODHeader.h
STEER/AliAODRedCov.h
STEER/AliAODVertex.cxx
STEER/AliESD.cxx
STEER/AliESD.h
STEER/AliReconstruction.cxx
STEER/CreateAODfromESD.C
STEER/ReadAOD.C
TPC/AliTPCtrackerMI.cxx
TPC/AliTPCtrackerParam.cxx
TRD/AliTRDtracker.cxx

index 39cb7f96fa4c80339260bf74ec9eb67d8e5d4b8b..dfd4fac31bbfda130ca40a3d04d4d753d18c5575 100644 (file)
@@ -41,7 +41,7 @@ AliAODevent::AliAODevent(AliESD* e) {
   fV0s      = new TClonesArray("AliAODv0");
   fCascades = new TClonesArray("AliAODxi");
   fRunNumber        = (UInt_t)e->GetRunNumber();
-  fEventNumber      = (UInt_t)e->GetEventNumber();
+  fEventNumber      = (UInt_t)e->GetEventNumberInFile(); // This is most likely NOT the event number you'd like to use. It has nothing to do with the 'real' event number.
   fNumberOfTracks   = (UInt_t)e->GetNumberOfTracks();
 
   const AliESDVertex* esdVertex = e->GetVertex();
index 5f66cee93020eb4f7ed60ce2dd3c09b46a11b182..e9294d2dd6c455b52076f888f1ae50f32a04c159 100644 (file)
@@ -193,7 +193,7 @@ void AliD0toKpiAnalysis::FindCandidates(Int_t evFirst,Int_t evLast,
   for(Int_t iEvent = evFirst; iEvent < tree->GetEntries(); iEvent++) {
     if(iEvent > evLast) break;
     tree->GetEvent(iEvent);
-    Int_t ev = (Int_t)event->GetEventNumber();
+    Int_t ev = (Int_t)event->GetEventNumberInFile(); // This is most likely NOT the event number you'd like to use. It has nothing to do with the 'real' event number.
     printf("--- Finding D0 -> Kpi in event %d\n",ev);
     // count the total number of events
     nTotEv++;
@@ -521,7 +521,7 @@ void AliD0toKpiAnalysis::MakeTracksRefFile(AliRun *gAlice,
   for(Int_t iEvent=evFirst; iEvent<tree->GetEntries(); iEvent++) {
     if(iEvent>evLast) break;
     tree->GetEvent(iEvent);
-    Int_t ev = (Int_t)event->GetEventNumber();
+    Int_t ev = (Int_t)event->GetEventNumberInFile(); // This is most likely NOT the event number you'd like to use. It has nothing to do with the 'real' event number.
 
     gAlice->GetEvent(ev);
 
index a4e568f863bf3c61f95be2360e541799f30c2839..85de1f371b59d0223d9204c6fcb312f0b660baab 100644 (file)
@@ -490,7 +490,7 @@ AliFMDReconstructor::FillESD(TTree*  /* digitsTree */,
 
   if (!fDiagnostics || !esd) return;
   static bool first = true;
-  Int_t evno = esd->GetEventNumber();
+  Int_t evno = esd->GetEventNumberInFile(); // This is most likely NOT the event number you'd like to use. It has nothing to do with the 'real' event number.
   AliDebug(1, Form("Writing diagnostics histograms to FMD.Diag.root/%03d",
                   evno));
   TFile f("FMD.Diag.root", (first ? "RECREATE" : "UPDATE"));
index 56adb49f909be3bd5472cc4c213a929912408761..0ebbddfd3f7dbd684798454d065abe99c632abc9 100644 (file)
@@ -114,7 +114,7 @@ class AliAODCluster : public AliVirtualParticle {
   virtual Double_t Phi() const {return 0.;}
   virtual Double_t Theta() const {return 0.;}
   virtual Double_t Eta() const {return 0.;}
-  virtual Short_t Charge() const {return 0.;}
+  virtual Short_t Charge() const {return 0;}
 
  private :
 
@@ -128,7 +128,7 @@ class AliAODCluster : public AliVirtualParticle {
   Int_t         fID;             // unique track ID, points back to the ESD track
   Int_t         fLabel;          // particle label, points back to MC track
   
-  AliAODRedCov<4> *fCovMatrix;      // covariance matrix (x, y, z, E)
+  AliAODRedCov<4> *fCovMatrix;   // covariance matrix (x, y, z, E)
   TRef          fProdVertex;     // vertex of origin
   TRef          fPrimTrack;      // primary track number associated with this cluster
 
index f808851a3557ac59ab7c5855f87c5080193cd8e2..54535c018c4860c69f3528a6dc605f1d755ad1f0 100644 (file)
@@ -82,7 +82,7 @@ void AliAODEvent::CreateStdContent()
   // set names
   fTracks->SetName("tracks");
   fVertices->SetName("vertices");
-  fClusters->SetName("neutrals");
+  fClusters->SetName("clusters");
   fJets->SetName("jets");
 
 }
index 40618a00035f6e594acb7ea805f8893979b0f445..be37076223ab6ebe1bd7bcc1e49f783d437bed71 100644 (file)
@@ -26,12 +26,13 @@ ClassImp(AliAODHeader)
 
 //______________________________________________________________________________
 AliAODHeader::AliAODHeader() : 
-  TNamed("header.",""),
+  TNamed("header",""),
   fMagneticField(-999.),
   fCentrality(-999.),
   fTriggerMask(0),
   fEventType(0),
-  fEventNumber(-999),
+  fBunchCrossNumber(0),
+  fOrbitNumber(0),
   fRunNumber(-999),  
   fRefMult(-999),
   fRefMultPos(-999),
@@ -43,15 +44,17 @@ AliAODHeader::AliAODHeader() :
 }
 
 //______________________________________________________________________________
-AliAODHeader::AliAODHeader(Int_t nEvt, 
-                          Int_t nRun, 
+AliAODHeader::AliAODHeader(Int_t nRun, 
+                          UShort_t nBunchX,
+                          UInt_t nOrbit,
                           Char_t *title) :
   TNamed("header", title),
   fMagneticField(-999.),
   fCentrality(-999.),
   fTriggerMask(0),
   fEventType(0),
-  fEventNumber(nEvt),
+  fBunchCrossNumber(nBunchX),
+  fOrbitNumber(nOrbit),
   fRunNumber(nRun),
   fRefMult(-999),
   fRefMultPos(-999),
@@ -62,8 +65,9 @@ AliAODHeader::AliAODHeader(Int_t nEvt,
 }
 
 //______________________________________________________________________________
-AliAODHeader::AliAODHeader(Int_t nEvt, 
-                          Int_t nRun,
+AliAODHeader::AliAODHeader(Int_t nRun, 
+                          UShort_t nBunchX,
+                          UInt_t nOrbit,
                           Int_t refMult,
                           Int_t refMultPos,
                           Int_t refMultNeg,
@@ -73,12 +77,13 @@ AliAODHeader::AliAODHeader(Int_t nEvt,
                           UChar_t trigClus,
                           UInt_t evttype,
                           Char_t *title) :
-  TNamed("header.",title),
+  TNamed("header",title),
   fMagneticField(magField),
   fCentrality(cent),
   fTriggerMask(trigMask),
   fEventType(evttype),
-  fEventNumber(nEvt),
+  fOrbitNumber(nOrbit),
+  fBunchCrossNumber(nBunchX),
   fRunNumber(nRun),  
   fRefMult(refMult),
   fRefMultPos(refMultPos),
@@ -102,7 +107,8 @@ AliAODHeader::AliAODHeader(const AliAODHeader& hdr) :
   fCentrality(hdr.fCentrality),
   fTriggerMask(hdr.fTriggerMask),
   fEventType(hdr.fEventType),
-  fEventNumber(hdr.fEventNumber),
+  fOrbitNumber(hdr.fOrbitNumber),
+  fBunchCrossNumber(hdr.fBunchCrossNumber),
   fRunNumber(hdr.fRunNumber),  
   fRefMult(hdr.fRefMult), 
   fRefMultPos(hdr.fRefMultPos), 
@@ -121,16 +127,17 @@ AliAODHeader& AliAODHeader::operator=(const AliAODHeader& hdr)
     // TObject
     TNamed::operator=(hdr);
     
-    fMagneticField  = hdr.fMagneticField;
-    fCentrality     = hdr.fCentrality;
-    fTriggerMask    = hdr.fTriggerMask;
-    fEventType      = hdr.fEventType;
-    fEventNumber    = hdr.fEventNumber;
-    fRunNumber      = hdr.fRunNumber;
-    fRefMult        = hdr.fRefMult;
-    fRefMultPos     = hdr.fRefMultPos;
-    fRefMultNeg     = hdr.fRefMultNeg;
-    fTriggerCluster = hdr.fTriggerCluster;
+    fMagneticField    = hdr.fMagneticField;
+    fCentrality       = hdr.fCentrality;
+    fTriggerMask      = hdr.fTriggerMask;
+    fEventType        = hdr.fEventType;
+    fOrbitNumber      = hdr.fOrbitNumber;
+    fBunchCrossNumber = hdr.fBunchCrossNumber;
+    fRunNumber        = hdr.fRunNumber;
+    fRefMult          = hdr.fRefMult;
+    fRefMultPos       = hdr.fRefMultPos;
+    fRefMultNeg       = hdr.fRefMultNeg;
+    fTriggerCluster   = hdr.fTriggerCluster;
   }
 
   return *this;
@@ -141,8 +148,9 @@ void AliAODHeader::Print(Option_t* /*option*/) const
 {
   // prints event information
 
-  printf("Event #                 : %d\n", fEventNumber);
   printf("Run #                   : %d\n", fRunNumber);
+  printf("Bunch Crossing  #       : %d\n", fBunchCrossNumber);
+  printf("Orbit Number #          : %d\n", fOrbitNumber);
   printf("Trigger mask            : %lld\n", fTriggerMask);
   printf("Trigger cluster         : %d\n", fTriggerCluster);
   printf("Event Type              : %d\n", fEventType);
index 0f7bc3872d767ba10aecfd09a315ab59653325d1..2105b870628f21ea185ecaa6c09f4203cfe33fbf 100644 (file)
 class AliAODHeader : public TNamed {
 
  public :
-   AliAODHeader();
+  AliAODHeader();
  
- AliAODHeader(Int_t nEvt, Int_t nRun, Char_t *title="");
- AliAODHeader(Int_t nEvt, 
-             Int_t nRun,
-             Int_t refMult,
-             Int_t refMultPos,
-             Int_t refMultNeg,
-             Double_t magField,
-             Double_t cent, 
-             ULong64_t fTriggerMask,
-             UChar_t   fTriggerCluster,
-             UInt_t    fEventType,
-             Char_t *title="");
-
+  AliAODHeader(Int_t nRun, UShort_t nBunchX, UInt_t nOrbit,Char_t *title="");
+  AliAODHeader(Int_t nRun, 
+              UShort_t nBunchX,
+              UInt_t nOrbit,
+              Int_t refMult,
+              Int_t refMultPos,
+              Int_t refMultNeg,
+              Double_t magField,
+              Double_t cent, 
+              ULong64_t fTriggerMask,
+              UChar_t   fTriggerCluster,
+              UInt_t    fEventType,
+              Char_t *title="");
+  
   virtual ~AliAODHeader();
   AliAODHeader(const AliAODHeader& evt); 
   AliAODHeader& operator=(const AliAODHeader& evt);
 
-  Int_t     GetEventNumber()        const { return fEventNumber; }
   Int_t     GetRunNumber()          const { return fRunNumber; }
+  UShort_t  GetBunchCrossNumber()   const { return fBunchCrossNumber; }
+  UInt_t    GetOrbitNumber()        const { return fOrbitNumber; }
   ULong64_t GetTriggerMask()        const { return fTriggerMask; }
   UChar_t   GetTriggerCluster()     const { return fTriggerCluster; }
   UInt_t    GetEventType()          const { return fEventType; }
@@ -47,8 +49,9 @@ class AliAODHeader : public TNamed {
   Int_t     GetRefMultiplicityPos() const { return fRefMultPos; }
   Int_t     GetRefMultiplicityNeg() const { return fRefMultNeg; }
 
-  void SetEventNumber(Int_t nEvt)              { fEventNumber = nEvt; }
   void SetRunNumber(Int_t nRun)                { fRunNumber = nRun; }
+  void SetBunchCrossNumber(UShort_t nBx)       { fBunchCrossNumber = nBx; }
+  void SetOrbitNumber(Int_t nOr)               { fOrbitNumber = nOr; }
   void SetTriggerMask(ULong64_t trigMsk)       { fTriggerMask = trigMsk; }
   void SetTriggerCluster(UChar_t trigClus)     { fTriggerCluster = trigClus; }
   void SetEventType(UInt_t evttype)            { fEventType = evttype; }
@@ -68,7 +71,8 @@ class AliAODHeader : public TNamed {
    Double32_t  fCentrality;          // Centrality
    ULong64_t   fTriggerMask;         // Trigger Type (mask)
    UInt_t      fEventType;           // Type of Event
-   Int_t       fEventNumber;         // Event Number
+   UInt_t      fOrbitNumber;         // Orbit Number
+   UShort_t    fBunchCrossNumber;    // BunchCrossingNumber
    Int_t       fRunNumber;           // Run Number
    Int_t       fRefMult;             // reference multiplicity
    Int_t       fRefMultPos;          // reference multiplicity of positive particles
index 2f2024864b167a48ce99cf587f935c57ade154d2..cb4c6207e0b614a62cfecbdaf65878bc0eb70e2c 100644 (file)
@@ -63,18 +63,19 @@ template <Int_t N> template <class T> inline void AliAODRedCov<N>::GetCovMatrix(
   for(Int_t i=0; i<N; ++i) {
     // Off diagonal elements
     for(Int_t j=0; j<i; ++j) {
+      cmat[i*(i+1)/2+j] = (fDiag[j] >= 0. && fDiag[i] >= 0.) ? fODia[(i-1)*i/2+j]*fDiag[j]*fDiag[i]: -999.;
 #ifdef DEBUG
-      printf("cmat[%2d] = fODia[%2d]*fDiag[%2d]*fDiag[%2d];\n",
-            i*(i+1)/2+j,(i-1)*i/2+j,j,i);
+      printf("cmat[%2d] = fODia[%2d]*fDiag[%2d]*fDiag[%2d] = %f\n",
+            i*(i+1)/2+j,(i-1)*i/2+j,j,i,cmat[i*(i+1)/2+j]);
 #endif
-      cmat[i*(i+1)/2+j] = fODia[(i-1)*i/2+j]*fDiag[j]*fDiag[i];}
+    }
 
     // Diagonal elements
+    cmat[i*(i+1)/2+i] = (fDiag[i] >= 0.) ? fDiag[i]*fDiag[i] : -999.;
 #ifdef DEBUG
-    printf("cmat[%2d] = fDiag[%2d]*fDiag[%2d];\n",
-          i*(i+1)/2+i,i,i);
+    printf("cmat[%2d] = fDiag[%2d]*fDiag[%2d] = %f\n",
+          i*(i+1)/2+i,i,i,cmat[i*(i+1)/2+i]);
 #endif
-    cmat[i*(i+1)/2+i] = fDiag[i]*fDiag[i];
   }
 }
 
@@ -87,28 +88,51 @@ template <Int_t N> template <class T> inline void AliAODRedCov<N>::SetCovMatrix(
   //
 
   if(cmat) {
+    
+#ifdef DEBUG
+    for (Int_t i=0; i<(N*(N+1))/2; i++) {
+      printf("cmat[%d] = %f\n", i, cmat[i]);
+    }
+#endif
+    
     // Diagonal elements first
     for(Int_t i=0; i<N; ++i) {
+      fDiag[i] = (cmat[i*(i+1)/2+i] >= 0.) ? TMath::Sqrt(cmat[i*(i+1)/2+i]) : -999.;
 #ifdef DEBUG
-      printf("fDiag[%2d] = TMath::Sqrt(cmat[%2d]);\n",
-            i,i*(i+1)/2+i);
+       printf("fDiag[%2d] = TMath::Sqrt(cmat[%2d]) = %f\n",
+              i,i*(i+1)/2+i, fDiag[i]);
 #endif
-      fDiag[i] = TMath::Sqrt(cmat[i*(i+1)/2+i]);}
-
+  }
+  
   // ... then the ones off diagonal
   for(Int_t i=0; i<N; ++i) 
     // Off diagonal elements
     for(Int_t j=0; j<i; ++j) {
+      fODia[(i-1)*i/2+j] = (fDiag[i] > 0. && fDiag[j] > 0.) ? cmat[i*(i+1)/2+j]/(fDiag[j]*fDiag[i]) : 0.;
+      // check for division by zero (due to diagonal element of 0) and for fDiag != -999. (due to negative input diagonal element).
+      if (fODia[(i-1)*i/2+j]>1.) { // check upper boundary
+#ifdef DEBUG
+       printf("out of bounds: %f\n", fODia[(i-1)*i/2+j]);
+#endif
+       fODia[(i-1)*i/2+j] = 1.;
+      }
+      if (fODia[(i-1)*i/2+j]<-1.) { // check lower boundary
 #ifdef DEBUG
-      printf("fODia[%2d] = cmat[%2d]/(fDiag[%2d]*fDiag[%2d]);\n",
-            (i-1)*i/2+j,i*(i+1)/2+j,j,i);
+       printf("out of bounds: %f\n", fODia[(i-1)*i/2+j]);
+#endif
+       fODia[(i-1)*i/2+j] = -1.; 
+      }
+#ifdef DEBUG
+       printf("fODia[%2d] = cmat[%2d]/(fDiag[%2d]*fDiag[%2d]) = %f\n",
+              (i-1)*i/2+j,i*(i+1)/2+j,j,i,fODia[(i-1)*i/2+j]); 
 #endif
-      fODia[(i-1)*i/2+j] = cmat[i*(i+1)/2+j]/(fDiag[j]*fDiag[i]);
     }
   } else {
     for(Int_t i=0; i< N; ++i) fDiag[i]=-999.;
     for(Int_t i=0; i< N*(N-1)/2; ++i) fODia[i]=0.;
   }
+
+  return;
 }
 
 #undef DEBUG
index 2b51fe3d78a4fa3b0b3a1d0736c13d198a9ce822..97e452b0e34f84aa0e93349070dd5d5bb27dd07d 100644 (file)
@@ -42,7 +42,7 @@ AliAODVertex::AliAODVertex() :
 
 //______________________________________________________________________________
 AliAODVertex::AliAODVertex(const Double_t position[3], 
-                          const Double_t  covMatrix[6],
+                          const Double_t covMatrix[6],
                           Double_t  chi2,
                           TObject  *parent,
                           Char_t vtype) :
index a60b406669e40ad3be22b53ec3b32ee35724700d..321535c86aa403fe175b7cead631e6eda4fec389 100644 (file)
@@ -29,7 +29,9 @@ ClassImp(AliESD)
 
 //______________________________________________________________________________
 AliESD::AliESD():
-  fEventNumber(0),
+  fEventNumberInFile(0),
+  fBunchCrossNumber(0),
+  fOrbitNumber(0),
   fRunNumber(0),
   fTimeStamp(0),
   fEventType(0),
@@ -78,7 +80,9 @@ AliESD::AliESD():
 //______________________________________________________________________________
 AliESD::AliESD(const AliESD& esd):
   TObject(esd),
-  fEventNumber(esd.fEventNumber),
+  fEventNumberInFile(esd.fEventNumberInFile),
+  fBunchCrossNumber(esd.fBunchCrossNumber),
+  fOrbitNumber(esd.fOrbitNumber),
   fRunNumber(esd.fRunNumber),
   fTimeStamp(esd.fTimeStamp),
   fEventType(esd.fEventType),
@@ -131,7 +135,9 @@ AliESD & AliESD::operator=(const AliESD& source) {
 
   if(&source == this) return *this;
 
-  fEventNumber = source.fEventNumber;
+  fEventNumberInFile = source.fEventNumberInFile;
+  fBunchCrossNumber = source.fBunchCrossNumber;
+  fOrbitNumber = source.fOrbitNumber;
   fRunNumber = source.fRunNumber;
   fTimeStamp   = source.fTimeStamp;
   fEventType   = source.fEventType;
@@ -213,7 +219,9 @@ AliESD::~AliESD()
 //______________________________________________________________________________
 void AliESD::Reset()
 {
-  fEventNumber=0;
+  fEventNumberInFile=0;
+  fBunchCrossNumber=0;
+  fOrbitNumber=0;
   fRunNumber=0;
   fTimeStamp = 0;
   fEventType = 0;
@@ -268,8 +276,10 @@ void AliESD::Print(Option_t *) const
   // Print header information of the event
   //
   printf("ESD run information\n");
-  printf("Event # %d Run # %d Trigger %lld Magnetic field %f \n",
-        GetEventNumber(),
+  printf("Event # in file %d Bunch crossing # %d Orbit # %d Run # %d Trigger %lld Magnetic field %f \n",
+        GetEventNumberInFile(),
+        GetBunchCrossNumber(),
+        GetOrbitNumber(),
         GetRunNumber(),
         GetTriggerMask(),
         GetMagneticField() );
index 403da7b23c940d5955d3aa8165d87a59a5b3458b..61180b392d4cb77f863ff5fef083fabd39a93630 100644 (file)
@@ -42,7 +42,9 @@ public:
   void SetESDfriend(const AliESDfriend *f);
   void GetESDfriend(AliESDfriend *f) const;
 
-  void SetEventNumber(Int_t n) {fEventNumber=n;}
+  void SetEventNumberInFile(Int_t n) {fEventNumberInFile=n;}
+  void SetBunchCrossNumber(UShort_t n) {fBunchCrossNumber=n;}
+  void SetOrbitNumber(UInt_t n) {fOrbitNumber=n;}
   void SetRunNumber(Int_t n) {fRunNumber=n;}
   void SetTimeStamp(UInt_t timeStamp){fTimeStamp = timeStamp;}
   void SetEventType(UInt_t eventType){fEventType = eventType;}
@@ -142,7 +144,9 @@ public:
   }
   const AliESDVertex *GetPrimaryVertex() const {return &fPrimaryVertex;}
 
-  Int_t  GetEventNumber() const {return fEventNumber;}
+  Int_t  GetEventNumberInFile() const {return fEventNumberInFile;}
+  UShort_t GetBunchCrossNumber() const {return fBunchCrossNumber;}
+  UInt_t GetOrbitNumber() const {return fOrbitNumber;}
   Int_t  GetRunNumber() const {return fRunNumber;}
   UInt_t    GetTimeStamp()  const { return fTimeStamp;}
   UInt_t    GetEventType()  const { return fEventType;}
@@ -216,7 +220,9 @@ protected:
   AliESD &operator=(const AliESD& source);
 
   // Event Identification
-  Int_t        fEventNumber;     // Event Number
+  Int_t        fEventNumberInFile;// running Event count in the file
+  UShort_t     fBunchCrossNumber;// Bunch Crossing Number
+  UInt_t       fOrbitNumber;     // Orbit Number
   Int_t        fRunNumber;       // Run Number
   UInt_t       fTimeStamp;       // Time stamp
   UInt_t       fEventType;       // Type of Event
@@ -264,7 +270,7 @@ protected:
   AliESDFMD   *fESDFMD;   // FMD object containing rough multiplicity
   AliESDVZERO *fESDVZERO; // VZERO object containing rough multiplicity
 
-  ClassDef(AliESD,16)  //ESD class 
+  ClassDef(AliESD,18)  //ESD class 
 };
 #endif 
 
index 69b41b47f5628e33c8282f9af0da5fde3f1310fe..1c03396d3c38e4a63dde28e408170e19b6f9b3b4 100644 (file)
@@ -702,8 +702,8 @@ Bool_t AliReconstruction::Run(const char* input)
     esd = new AliESD; hltesd = new AliESD;
     esd->SetRunNumber(fRunLoader->GetHeader()->GetRun());
     hltesd->SetRunNumber(fRunLoader->GetHeader()->GetRun());
-    esd->SetEventNumber(fRunLoader->GetHeader()->GetEventNrInRun());
-    hltesd->SetEventNumber(fRunLoader->GetHeader()->GetEventNrInRun());
+    esd->SetEventNumberInFile(fRunLoader->GetHeader()->GetEventNrInRun());
+    hltesd->SetEventNumberInFile(fRunLoader->GetHeader()->GetEventNrInRun());
 
     // Set magnetic field from the tracker
     esd->SetMagneticField(AliTracker::GetBz());
@@ -1319,12 +1319,16 @@ Bool_t AliReconstruction::FillRawEventHeaderESD(AliESD*& esd)
   // 
 
   AliInfo("Filling information from RawReader Header");
+  esd->SetBunchCrossNumber(0);
+  esd->SetOrbitNumber(0);
   esd->SetTimeStamp(0);
   esd->SetEventType(0);
   const AliRawEventHeaderBase * eventHeader = fRawReader->GetEventHeader();
   if (eventHeader){
+    esd->SetBunchCrossNumber((eventHeader->GetP("Id")[0]));
+    esd->SetOrbitNumber((eventHeader->GetP("Id")[1]));
     esd->SetTimeStamp((eventHeader->Get("Timestamp")));  
-    esd->SetEventType((eventHeader->Get("Type")));  
+    esd->SetEventType((eventHeader->Get("Type")));
   }
 
   return kTRUE;
@@ -1619,7 +1623,7 @@ Bool_t AliReconstruction::ReadESD(AliESD*& esd, const char* recStep) const
   if (!esd) return kFALSE;
   char fileName[256];
   sprintf(fileName, "ESD_%d.%d_%s.root", 
-         esd->GetRunNumber(), esd->GetEventNumber(), recStep);
+         esd->GetRunNumber(), esd->GetEventNumberInFile(), recStep);
   if (gSystem->AccessPathName(fileName)) return kFALSE;
 
   AliInfo(Form("reading ESD from file %s", fileName));
@@ -1647,7 +1651,7 @@ void AliReconstruction::WriteESD(AliESD* esd, const char* recStep) const
   if (!esd) return;
   char fileName[256];
   sprintf(fileName, "ESD_%d.%d_%s.root", 
-         esd->GetRunNumber(), esd->GetEventNumber(), recStep);
+         esd->GetRunNumber(), esd->GetEventNumberInFile(), recStep);
 
   AliDebug(1, Form("writing ESD to file %s", fileName));
   TFile* file = TFile::Open(fileName, "recreate");
index 0572a048cfdede1d19169146526c1b7df67fd109..2e2778c26552550cb00e61269bfaafa35d01779a 100644 (file)
@@ -6,6 +6,7 @@
 #include <TMath.h>
 
 #include "AliAODEvent.h"
+#include "AliAODHeader.h"
 #include "AliAODVertex.h"
 #include "AliAODTrack.h"
 #include "AliAODCluster.h"
@@ -14,7 +15,7 @@
 #include "AliESDtrack.h"
 #include "AliESDVertex.h"
 #include "AliESDv0.h"
-#include "AliESDCascade.h"
+#include "AliESDcascade.h"
 #include "AliESDCaloCluster.h"
 
 #endif
@@ -53,8 +54,9 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
       if (esd->GetTrack(iTrack)->GetSign()> 0) nPosTracks++;
 
     // create the header
-    aod->AddHeader(new AliAODHeader(esd ->GetEventNumber(), 
-                                   esd->GetRunNumber(),
+    aod->AddHeader(new AliAODHeader(esd->GetRunNumber(),
+                                   esd->GetBunchCrossNumber(),
+                                   esd->GetOrbitNumber(),
                                    nTracks,
                                    nPosTracks,
                                    nTracks-nPosTracks,
@@ -105,11 +107,11 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
       
     Double_t pos[3];
     vtx->GetXYZ(pos); // position
-    Double_t cov[6];
-    vtx->GetCovMatrix(cov); //covariance matrix
+    Double_t covVtx[6]; // We have to give changing names to the variables (like cov?, x?, and p?) because CINT doesn't recognize blocks correctly.
+    vtx->GetCovMatrix(covVtx); //covariance matrix
 
     AliAODVertex * primary = new(vertices[jVertices++])
-      AliAODVertex(pos, cov, vtx->GetChi2(), NULL, AliAODVertex::kPrimary);
+      AliAODVertex(pos, covVtx, vtx->GetChi2(), NULL, AliAODVertex::kPrimary);
          
     // Create vertices starting from the most complex objects
       
@@ -145,10 +147,10 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
       for (Int_t iV0=0; iV0<nV0s; ++iV0) {
 
        v0 = esd->GetV0(iV0);
-       Int_t pos = v0->GetPindex();
-       Int_t neg = v0->GetNindex();
+       Int_t posV0 = v0->GetPindex();
+       Int_t negV0 = v0->GetNindex();
 
-       if (pos==posFromV0 && neg==negFromV0) {
+       if (posV0==posFromV0 && negV0==negFromV0) {
          indV0 = iV0;
          break;
        }
@@ -164,11 +166,11 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
        
        Double_t posV0[3];
        v0->GetXYZ(posV0[0], posV0[1], posV0[2]);
-       Double_t covV0[6];
-       v0->GetPosCov(covV0);
+       Double_t covV0_1[6];
+       v0->GetPosCov(covV0_1);
        
        vV0FromCascade = new(vertices[jVertices++]) AliAODVertex(posV0,
-                                                                covV0,
+                                                                covV0_1,
                                                                 v0->GetChi2V0(),
                                                                 vcascade,
                                                                 AliAODVertex::kV0);
@@ -179,13 +181,13 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
             << " The V0 " << indV0 
             << " doesn't exist in the array of V0s or was used!" << endl;
 
-       Double_t posV0[3];
-       cascade->GetXYZ(posV0[0], posV0[1], posV0[2]);
-       Double_t covV0[6];
-       cascade->GetPosCov(covV0);
+       Double_t posV0_2[3];
+       cascade->GetXYZ(posV0_2[0], posV0_2[1], posV0_2[2]);
+       Double_t covV0_2[6];
+       cascade->GetPosCov(covV0_2);
       
-       vV0FromCascade = new(vertices[jVertices++]) AliAODVertex(posV0,
-                                                                covV0,
+       vV0FromCascade = new(vertices[jVertices++]) AliAODVertex(posV0_2,
+                                                                covV0_2,
                                                                 v0->GetChi2V0(),
                                                                 vcascade,
                                                                 AliAODVertex::kV0);
@@ -200,28 +202,29 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
 
        AliESDtrack *esdTrack = esd->GetTrack(posFromV0);
        
-       Double_t p[3];
-       esdTrack->GetPxPyPz(p);
+       Double_t p1[3];
+       esdTrack->GetPxPyPz(p1);
        
-       Double_t x[3];
-       esdTrack->GetXYZ(x);
+       Double_t x1[3];
+       esdTrack->GetXYZ(x1);
        
-       Double_t cov[21];
-       esdTrack->GetCovarianceXYZPxPyPz(cov);
+       Double_t covV0PosTr[21];
+       esdTrack->GetCovarianceXYZPxPyPz(covV0PosTr);
        
-       Double_t pid[10];
-       esdTrack->GetESDpid(pid);
+       Double_t pid1[10];
+       esdTrack->GetESDpid(pid1);
        
        vV0FromCascade->AddDaughter(
                                    new(tracks[jTracks++]) AliAODTrack(esdTrack->GetID(),
                                           esdTrack->GetLabel(), 
-                                          p, kTRUE,
-                                          x,
+                                          p1, 
+                                          kTRUE,
+                                          x1,
                                           kFALSE,
-                                          cov, 
+                                          covV0PosTr
                                           (Short_t)esdTrack->GetSign(),
                                           esdTrack->GetITSClusterMap(), 
-                                          pid,
+                                          pid1,
                                           vV0FromCascade,
                                           AliAODTrack::kSecondary)
                );
@@ -239,29 +242,29 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
        
        AliESDtrack *esdTrack = esd->GetTrack(negFromV0);
        
-       Double_t p[3];
-       esdTrack->GetPxPyPz(p);
+       Double_t p2[3];
+       esdTrack->GetPxPyPz(p2);
        
-       Double_t x[3];
-       esdTrack->GetXYZ(x);
+       Double_t x2[3];
+       esdTrack->GetXYZ(x2);
        
-       Double_t cov[21];
-       esdTrack->GetCovarianceXYZPxPyPz(cov);
+       Double_t covV0NegTr[21];
+       esdTrack->GetCovarianceXYZPxPyPz(covV0NegTr);
        
-       Double_t pid[10];
-       esdTrack->GetESDpid(pid);
+       Double_t pid2[10];
+       esdTrack->GetESDpid(pid2);
        
        vV0FromCascade->AddDaughter(
                 new(tracks[jTracks++]) AliAODTrack(esdTrack->GetID(),
                                           esdTrack->GetLabel(),
-                                          p,
+                                          p2,
                                           kTRUE,
-                                          x,
+                                          x2,
                                           kFALSE,
-                                          cov, 
+                                          covV0NegTr
                                           (Short_t)esdTrack->GetSign(),
                                           esdTrack->GetITSClusterMap(), 
-                                          pid,
+                                          pid2,
                                           vV0FromCascade,
                                           AliAODTrack::kSecondary)
                );
@@ -281,29 +284,29 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
        
        AliESDtrack *esdTrack = esd->GetTrack(bachelor);
        
-       Double_t p[3];
-       esdTrack->GetPxPyPz(p);
+       Double_t p3[3];
+       esdTrack->GetPxPyPz(p3);
        
-       Double_t x[3];
-       esdTrack->GetXYZ(x);
+       Double_t x3[3];
+       esdTrack->GetXYZ(x3);
        
-       Double_t cov[21];
-       esdTrack->GetCovarianceXYZPxPyPz(cov);
+       Double_t covXiTr[21];
+       esdTrack->GetCovarianceXYZPxPyPz(covXiTr);
        
-       Double_t pid[10];
-       esdTrack->GetESDpid(pid);
+       Double_t pid3[10];
+       esdTrack->GetESDpid(pid3);
 
        vcascade->AddDaughter(
                new(tracks[jTracks++]) AliAODTrack(esdTrack->GetID(),
                                           esdTrack->GetLabel(),
-                                          p,
+                                          p3,
                                           kTRUE,
-                                          x,
+                                          x3,
                                           kFALSE,
-                                          cov, 
+                                          covXiTr
                                           (Short_t)esdTrack->GetSign(),
                                           esdTrack->GetITSClusterMap(), 
-                                          pid,
+                                          pid3,
                                           vcascade,
                                           AliAODTrack::kSecondary)
                );
@@ -325,14 +328,14 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
 
       AliESDv0 *v0 = esd->GetV0(nV0);
       
-      Double_t posV0[3];
-      v0->GetXYZ(posV0[0], posV0[1], posV0[2]);
-      Double_t covV0[6];
-      v0->GetPosCov(covV0);
+      Double_t posV0_3[3];
+      v0->GetXYZ(posV0_3[0], posV0_3[1], posV0_3[2]);
+      Double_t covV0_3[6];
+      v0->GetPosCov(covV0_3);
 
       AliAODVertex * vV0 = 
-       new(vertices[jVertices++]) AliAODVertex(posV0,
-                                               covV0,
+       new(vertices[jVertices++]) AliAODVertex(posV0_3,
+                                               covV0_3,
                                                v0->GetChi2V0(),
                                                primary,
                                                AliAODVertex::kV0);
@@ -340,7 +343,7 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
 
       Int_t posFromV0 = v0->GetPindex();
       Int_t negFromV0 = v0->GetNindex();
-
+      
       // Add the positive tracks from the V0
 
       if (!usedTrack[posFromV0]) {
@@ -349,28 +352,29 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
 
        AliESDtrack *esdTrack = esd->GetTrack(posFromV0);
       
-       Double_t p[3];
-       esdTrack->GetPxPyPz(p);
+       Double_t p4[3];
+       esdTrack->GetPxPyPz(p4);
        
-       Double_t x[3];
-       esdTrack->GetXYZ(x);
+       Double_t x4[3];
+       esdTrack->GetXYZ(x4);
        
-       Double_t cov[21];
-       esdTrack->GetCovarianceXYZPxPyPz(cov);
+       Double_t covV0PosTr_2[21];
+       esdTrack->GetCovarianceXYZPxPyPz(covV0PosTr_2);
        
-       Double_t pid[10];
-       esdTrack->GetESDpid(pid);
+       Double_t pid4[10];
+       esdTrack->GetESDpid(pid4);
        
        vV0->AddDaughter(
                new(tracks[jTracks++]) AliAODTrack(esdTrack->GetID(),
                                           esdTrack->GetLabel(), 
-                                          p, kTRUE,
-                                          x,
+                                          p4, 
+                                          kTRUE,
+                                          x4,
                                           kFALSE,
-                                          cov, 
+                                          covV0PosTr_2
                                           (Short_t)esdTrack->GetSign(),
                                           esdTrack->GetITSClusterMap(), 
-                                          pid,
+                                          pid4,
                                           vV0,
                                           AliAODTrack::kSecondary)
                );
@@ -388,29 +392,29 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
 
        AliESDtrack *esdTrack = esd->GetTrack(negFromV0);
       
-       Double_t p[3];
-       esdTrack->GetPxPyPz(p);
+       Double_t p5[3];
+       esdTrack->GetPxPyPz(p5);
        
-       Double_t x[3];
-       esdTrack->GetXYZ(x);
+       Double_t x5[3];
+       esdTrack->GetXYZ(x5);
        
-       Double_t cov[21];
-       esdTrack->GetCovarianceXYZPxPyPz(cov);
+       Double_t covV0NegTr_2[21];
+       esdTrack->GetCovarianceXYZPxPyPz(covV0NegTr_2);
        
-       Double_t pid[10];
-       esdTrack->GetESDpid(pid);
+       Double_t pid5[10];
+       esdTrack->GetESDpid(pid5);
 
        vV0->AddDaughter(
                 new(tracks[jTracks++]) AliAODTrack(esdTrack->GetID(),
                                           esdTrack->GetLabel(),
-                                          p,
+                                          p5,
                                           kTRUE,
-                                          x,
+                                          x5,
                                           kFALSE,
-                                          cov, 
+                                          covV0NegTr_2
                                           (Short_t)esdTrack->GetSign(),
                                           esdTrack->GetITSClusterMap(), 
-                                          pid,
+                                          pid5,
                                           vV0,
                                           AliAODTrack::kSecondary)
                );
@@ -480,30 +484,29 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
        
              AliESDtrack *esdTrack = esd->GetTrack(imother);
        
-             Double_t p[3];
-             esdTrack->GetPxPyPz(p);
-             
-             Double_t x[3];
-             esdTrack->GetXYZ(x);
+             Double_t p6[3];
+             esdTrack->GetPxPyPz(p6);
              
-             Double_t cov[21];
-             esdTrack->GetCovarianceXYZPxPyPz(cov);
-             
-             Double_t pid[10];
-             esdTrack->GetESDpid(pid);
+             Double_t x6[3];
+             esdTrack->GetXYZ(x6);
              
+             Double_t covKinkMother[21];
+             esdTrack->GetCovarianceXYZPxPyPz(covKinkMother);
              
+             Double_t pid6[10];
+             esdTrack->GetESDpid(pid6);
+
              mother = 
                new(tracks[jTracks++]) AliAODTrack(esdTrack->GetID(),
                                           esdTrack->GetLabel(),
-                                          p,
+                                          p6,
                                           kTRUE,
-                                          x,
+                                          x6,
                                           kFALSE,
-                                          cov, 
+                                          covKinkMother
                                           (Short_t)esdTrack->GetSign(),
                                           esdTrack->GetITSClusterMap(), 
-                                          pid,
+                                          pid6,
                                           primary,
                                           AliAODTrack::kPrimary);
              primary->AddDaughter(mother);
@@ -532,30 +535,29 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
        
              AliESDtrack *esdTrack = esd->GetTrack(idaughter);
        
-             Double_t p[3];
-             esdTrack->GetPxPyPz(p);
-             
-             Double_t x[3];
-             esdTrack->GetXYZ(x);
+             Double_t p7[3];
+             esdTrack->GetPxPyPz(p7);
              
-             Double_t cov[21];
-             esdTrack->GetCovarianceXYZPxPyPz(cov);
-             
-             Double_t pid[10];
-             esdTrack->GetESDpid(pid);
+             Double_t x7[3];
+             esdTrack->GetXYZ(x7);
              
+             Double_t covKinkDaughter[21];
+             esdTrack->GetCovarianceXYZPxPyPz(covKinkDaughter);
              
+             Double_t pid7[10];
+             esdTrack->GetESDpid(pid7);
+
              daughter = 
                new(tracks[jTracks++]) AliAODTrack(esdTrack->GetID(),
                                           esdTrack->GetLabel(),
-                                          p,
+                                          p7,
                                           kTRUE,
-                                          x,
+                                          x7,
                                           kFALSE,
-                                          cov, 
+                                          covKinkDaughter
                                           (Short_t)esdTrack->GetSign(),
                                           esdTrack->GetITSClusterMap(), 
-                                          pid,
+                                          pid7,
                                           vkink,
                                           AliAODTrack::kPrimary);
              vkink->AddDaughter(daughter);
@@ -583,17 +585,17 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
 
       AliESDtrack *esdTrack = esd->GetTrack(nTrack);
       
-      Double_t p[3];
-      esdTrack->GetPxPyPz(p);
+      Double_t p8[3];
+      esdTrack->GetPxPyPz(p8);
       
-      Double_t x[3];
-      esdTrack->GetXYZ(x);
+      Double_t x8[3];
+      esdTrack->GetXYZ(x8);
       
-      Double_t cov[21];
-      esdTrack->GetCovarianceXYZPxPyPz(cov);
-       
-      Double_t pid[10];
-      esdTrack->GetESDpid(pid);
+      Double_t covTr[21];
+      esdTrack->GetCovarianceXYZPxPyPz(covTr);
+       
+      Double_t pid8[10];
+      esdTrack->GetESDpid(pid8);
 
       Float_t impactXY, impactZ;
 
@@ -605,14 +607,14 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
        primary->AddDaughter(
            new(tracks[jTracks++]) AliAODTrack(esdTrack->GetID(),
                                         esdTrack->GetLabel(),
-                                        p,
+                                        p8,
                                         kTRUE,
-                                        x,
+                                        x8,
                                         kFALSE,
-                                        cov, 
+                                        covTr
                                         (Short_t)esdTrack->GetSign(),
                                         esdTrack->GetITSClusterMap(), 
-                                        pid,
+                                        pid8,
                                         primary,
                                         AliAODTrack::kPrimary)
            );
@@ -621,14 +623,14 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
        // outside the beam pipe: orphan track
            new(tracks[jTracks++]) AliAODTrack(esdTrack->GetID(),
                                         esdTrack->GetLabel(),
-                                        p,
+                                        p8,
                                         kTRUE,
-                                        x,
+                                        x8,
                                         kFALSE,
-                                        cov, 
+                                        covTr
                                         (Short_t)esdTrack->GetSign(),
                                         esdTrack->GetITSClusterMap(), 
-                                        pid,
+                                        pid8,
                                         NULL,
                                         AliAODTrack::kOrphan);
       }        
@@ -649,10 +651,10 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
       Int_t id = cluster->GetID();
       Int_t label = -1;
       Float_t energy = cluster->GetClusterEnergy();
-      Float_t x[3];
-      cluster->GetGlobalPosition(x);
+      Float_t x9[3];
+      cluster->GetGlobalPosition(x9);
       Float_t * covMatrix = NULL;
-      Float_t * pid = NULL; 
+      Float_t * pid9 = NULL; 
       AliAODVertex *prodVertex = primary;
       AliAODTrack *primTrack = NULL;
       Char_t ttype=AliAODCluster::kUndef;
@@ -670,9 +672,9 @@ void CreateAODfromESD(const char *inFileName = "AliESDs.root",
       new(clusters[jClusters++]) AliAODCluster(id,
                                               label,
                                               energy,
-                                              x,
+                                              x9,
                                               covMatrix,
-                                              pid,
+                                              pid9,
                                               prodVertex,
                                               primTrack,
                                               ttype);
index a44779eadf91dfe0b10e78821681fd192786dc4d..d28a43e7da91189e8c62b5bfd7789343cc085909 100644 (file)
@@ -1,13 +1,27 @@
+#if !defined(__CINT__) || defined(__MAKECINT__)
+
+#include <Riostream.h>
+#include "TFile.h"
+#include "TTree.h"
+
+#include "AliAODEvent.h"
+#include "AliAODHeader.h"
+#include "AliAODVertex.h"
+#include "AliAODTrack.h"
+#include "AliAODCluster.h"
+
+#endif
+
 void ReadAOD(const char *fileName = "AliAOD.root") {
 
   // open input file and get the TTree
   TFile inFile(fileName, "READ");
   TTree *aodTree = (TTree*)inFile.Get("AOD");
 
-  AliAODEvent *aod = aodTree->GetUserInfo()->FindObject("AliAODEvent");
+  AliAODEvent *aod = (AliAODEvent*)aodTree->GetUserInfo()->FindObject("AliAODEvent");
   TIter next(aod->GetList());
   TObject *el;
-  while(el=(TNamed*)next()) 
+  while((el=(TNamed*)next())) 
     aodTree->SetBranchAddress(el->GetName(),aod->GetList()->GetObjectRef(el));
 
   // loop over events
@@ -28,8 +42,14 @@ void ReadAOD(const char *fileName = "AliAOD.root") {
     Int_t nTracks = aod->GetNTracks();
     for (Int_t nTr = 0; nTr < nTracks; nTr++) {
       
+      AliAODTrack *tr = aod->GetTrack(nTr);
+
       // print track info
-      cout << nTr+1 << "/" << nTracks << ": track pt: " << aod->GetTrack(nTr)->Pt() << ", vertex x of this track: " << aod->GetTrack(nTr)->GetProdVertex()->GetX() << endl;
+      cout << nTr+1 << "/" << nTracks << ": track pt: " << tr->Pt();
+      if (tr->GetProdVertex()) {
+       cout << ", vertex z of this track: " << tr->GetProdVertex()->GetZ();
+      }
+      cout << endl;
     }
 
     // loop over vertices
index 156daba45dc3d3f84842c419317ae1181c5c7030..ebf8cf73c5353c72dd9324a266a6b3f594fcf0c1 100644 (file)
@@ -2713,10 +2713,11 @@ Int_t AliTPCtrackerMI::PropagateBack(AliESD *event)
       Float_t dedx  = seed->GetdEdx();
       esd->SetTPCsignal(dedx, sdedx, ndedx);
       ntracks++;
-      Int_t eventnumber = event->GetEventNumber();// patch 28 fev 06
+      Int_t eventnumber = event->GetEventNumberInFile();// patch 28 fev 06
+      // This is most likely NOT the event number you'd like to use. It has nothing to do with the 'real' event number      
       (*fDebugStreamer)<<"Cback"<<
        "Tr0.="<<seed<<
-       "EventNr="<<eventnumber<<
+       "EventNrInFile="<<eventnumber<<
        "\n"; // patch 28 fev 06   
     }
   }
@@ -4960,7 +4961,7 @@ void  AliTPCtrackerMI::FindV0s(TObjArray * array, AliESD *esd)
       tpcv0s->AddLast(new AliESDv0(vertex));      
       ncandidates++;
       {
-       Int_t eventNr = esd->GetEventNumber();
+       Int_t eventNr = esd->GetEventNumberInFile(); // This is most likely NOT the event number you'd like to use. It has nothing to do with the 'real' event number
        Double_t radiusm= (delta[0]<delta[1])? TMath::Sqrt(radius[0]):TMath::Sqrt(radius[1]);  
        Double_t deltam= (delta[0]<delta[1])? TMath::Sqrt(delta[0]):TMath::Sqrt(delta[1]);  
        if (AliTPCReconstructor::StreamLevel()>0) {
@@ -5074,7 +5075,7 @@ void  AliTPCtrackerMI::FindV0s(TObjArray * array, AliESD *esd)
       naccepted++;
     }
     {
-      Int_t eventNr = esd->GetEventNumber();
+      Int_t eventNr = esd->GetEventNumberInFile(); // This is most likely NOT the event number you'd like to use. It has nothing to do with the 'real' event number
       if (AliTPCReconstructor::StreamLevel()>0) {
        Int_t lab0=track0->GetLabel();
        Int_t lab1=track1->GetLabel();
index 87ca70f21e27fe445fea9b59b3953a6b4227d0d4..5221a5c9bf2bb98de6f89cf205706e8883ea87d7 100644 (file)
@@ -348,7 +348,7 @@ Int_t AliTPCtrackerParam::BuildTPCtracks(AliESD *event) {
   Int_t        nParticles,nSeeds,arrentr;
   //Int_t nSel=0,nAcc=0;
 
-  Int_t evt=event->GetEventNumber();
+  Int_t evt=event->GetEventNumberInFile(); // This is most likely NOT the event number you'd like to use. It has nothing to do with the 'real' event number.
   
   tracks=0;
 
index d2bd77d7a7c892c6a3b88f05b466b4fc920fcb49..e967ec85e1aa9dfef1ace8228f860790bc4c2a13 100644 (file)
@@ -791,11 +791,11 @@ Int_t AliTRDtracker::PropagateBack(AliESD *event)
     /**/
     // Debug part of tracking
     TTreeSRedirector &cstream = *fDebugStreamer;
-    Int_t eventNr = event->GetEventNumber();
+    Int_t eventNrInFile = event->GetEventNumberInFile(); // This is most likely NOT the event number you'd like to use. It has nothing to do with the 'real' event number.
     if (AliTRDReconstructor::StreamLevel() > 0) {
       if (track->GetBackupTrack()) {
        cstream << "Tracks"
-               << "EventNr="  << eventNr
+               << "EventNrInFile="  << eventNrInFile
                << "ESD.="     << seed
                << "trd.="     << track
                << "trdback.=" << track->GetBackupTrack()
@@ -803,7 +803,7 @@ Int_t AliTRDtracker::PropagateBack(AliESD *event)
       }
       else {
        cstream << "Tracks"
-               << "EventNr="  << eventNr
+               << "EventNrInFile="  << eventNrInFile
                << "ESD.="     << seed
                << "trd.="     << track
                << "trdback.=" << track
@@ -2624,7 +2624,7 @@ void AliTRDtracker::MakeSeedsMI(Int_t /*inner*/, Int_t /*outer*/, AliESD *esd)
          }
        }
 
-       Int_t eventNr = esd->GetEventNumber();
+       Int_t eventNrInFile = esd->GetEventNumberInFile(); // This is most likely NOT the event number you'd like to use. It has nothing to do with the 'real' event number.
        TTreeSRedirector &cstream = *fDebugStreamer;
 
        //
@@ -2643,7 +2643,7 @@ void AliTRDtracker::MakeSeedsMI(Int_t /*inner*/, Int_t /*outer*/, AliESD *esd)
          TTreeSRedirector &cstream = *fDebugStreamer;
          if (AliTRDReconstructor::StreamLevel() > 0) {
            cstream << "Tracks"
-                   << "EventNr="  << eventNr
+                   << "EventNrInFile="  << eventNrInFile
                    << "ESD.="     << &esdtrack
                    << "trd.="     << track
                    << "trdback.=" << track
@@ -2673,7 +2673,7 @@ void AliTRDtracker::MakeSeedsMI(Int_t /*inner*/, Int_t /*outer*/, AliESD *esd)
                  << "Findable="  << findable
                  << "NUsed="     << nused
                  << "sLayer="    << sLayer
-                 << "EventNr="   << eventNr
+                 << "EventNrInFile="   << eventNrInFile
                  << "\n";
        }