Added event counter in AliJetEventParticles to detect when events could not fully...
authorloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 30 Oct 2004 12:37:10 +0000 (12:37 +0000)
committerloizides <loizides@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 30 Oct 2004 12:37:10 +0000 (12:37 +0000)
JETAN/AliJetEventParticles.cxx
JETAN/AliJetEventParticles.h
JETAN/AliJetParticlesReader.cxx

index e82f12029ab08f0487ca1e029ad4cf58d2536cbe..5a1b63c95671d1015121e57f8a8880d38d18a6f0 100644 (file)
@@ -31,7 +31,8 @@ AliJetEventParticles::AliJetEventParticles(Int_t size) :
   fYJet(-1),
   fImpact(0.),
   fNHardScatters(0),
-  fNwNwColl(0)
+  fNwNwColl(0),
+  fEventNr(0)
 {
   // Default Constructor
   for (Int_t i = 0; i < 4; i++) fZquench[i] = 0.;
@@ -61,7 +62,8 @@ AliJetEventParticles::AliJetEventParticles(const AliJetEventParticles& source) :
   fYJet(source.GetXJet()),
   fImpact(source.GetImpact()),
   fNHardScatters(source.GetNhard()),
-  fNwNwColl(source.GetNpart())
+  fNwNwColl(source.GetNpart()),
+  fEventNr(source.GetEventNr())
 {
   //copy constructor
   for(Int_t i =0; i<fNParticles; i++)
@@ -105,6 +107,7 @@ void AliJetEventParticles::Set(const AliJetEventParticles& source)
   fImpact=source.GetImpact();
   fNHardScatters=source.GetNhard();
   fNwNwColl=source.GetNpart();
+  fEventNr=source.GetEventNr();
 
   for(Int_t i =0; i<fNParticles; i++)
     {
@@ -155,6 +158,7 @@ void  AliJetEventParticles::Reset(Int_t size)
   fImpact=0.;
   fNHardScatters=0;
   fNwNwColl=0;
+  fEventNr=0;
   for (Int_t i = 0; i < 4; i++) fZquench[i] = 0.;
   for (Int_t i = 0; i < 10; i++) 
     for (Int_t j = 0; j < 4; j++) {
@@ -451,6 +455,7 @@ void AliJetEventParticles::Print(Option_t* /*t*/) const
 {
   cout << "--- AliJetEventParticles ---" << endl;
   if(fHeader.Length()) cout << fHeader.Data() << endl;
+  cout << "Event Number: " << fEventNr << endl;
   cout << "Particles in Event: " << fNParticles << endl;
   if(fNUQJets){
     cout << "Unquenched Jets: " << fNUQJets << endl;
@@ -482,5 +487,4 @@ void AliJetEventParticles::Print(Option_t* /*t*/) const
       cout << i << " " << et << " " << etaj << " " << phj << endl;
     }
   }
-
 }
index ab0d67b0b0210da80f4039fb4463565563d13ce7..ddc59ca23943320a6eb0d8d95f0a71840ca51910 100644 (file)
@@ -60,28 +60,30 @@ class AliJetEventParticles: public TObject
   void     UQJet(Int_t i, Float_t &p1, Float_t &p2, Float_t &p3, Float_t &E)               const;
   void     Hard(Int_t i, Float_t &p1, Float_t &p2, Float_t &p3, Float_t &E, Float_t &type) const;
   void     Hard(Int_t i, Float_t p[4], Float_t &type) const;
+
+  void     AddJet(Float_t px, Float_t py, Float_t pz, Float_t e);
+  void     AddUQJet(Float_t px, Float_t py, Float_t pz, Float_t e);
+  void     AddJet(Float_t p[4]);
+  void     AddUQJet(Float_t p[4]);
+  void     AddHard(Int_t i,Float_t px, Float_t py, Float_t pz, Float_t e, Float_t type);
+
   Double_t GetXJet() const {return fXJet;}
   Double_t GetYJet() const {return fYJet;}    
   void     GetZQuench(Double_t z[4]) const;
   TString  GetHeader() const {return fHeader;}
-
-  Float_t  GetImpact() const {return fImpact;}
-  Int_t    GetNhard()  const {return fNHardScatters;}
-  Int_t    GetNpart()  const {return fNwNwColl;}
+  Float_t  GetImpact()  const {return fImpact;}
+  Int_t    GetNhard()   const {return fNHardScatters;}
+  Int_t    GetNpart()   const {return fNwNwColl;}
+  Int_t    GetEventNr() const {return fEventNr;}
 
   void     SetXYJet(Double_t x, Double_t y); 
   void     SetZQuench(Double_t z[4]);
   void     SetTrials(Int_t trials) {fTrials = trials;}
-  void     AddJet(Float_t px, Float_t py, Float_t pz, Float_t e);
-  void     AddUQJet(Float_t px, Float_t py, Float_t pz, Float_t e);
-  void     AddJet(Float_t p[4]);
-  void     AddUQJet(Float_t p[4]);
-  void     AddHard(Int_t i,Float_t px, Float_t py, Float_t pz, Float_t e, Float_t type);
 
   void     SetImpact(Float_t b){fImpact=b;}
   void     SetNhard(Int_t n){fNHardScatters=n;}
   void     SetNpart(Int_t n){fNwNwColl=n;}
-
+  void SetEventNr(Int_t n){fEventNr=n;}
   void     Print(Option_t *t="") const;
 
   protected:
@@ -107,6 +109,8 @@ class AliJetEventParticles: public TObject
   Int_t   fNHardScatters;   // number of hard scatterings
   Int_t   fNwNwColl;        // number of Nwounded-Nwounded collisions
 
-  ClassDef(AliJetEventParticles,5) //class AliJetEventParticles
+  Int_t fEventNr;           // simple counter to check event number
+
+  ClassDef(AliJetEventParticles,6) //class AliJetEventParticles
 };
 #endif
index 09449bd310f0109e923c52464455a56876f3d8b4..7961214f5300f5cfc86102aa217f1d3e486bc3d9 100644 (file)
@@ -86,6 +86,7 @@ Int_t AliJetParticlesReader::Next()
        fTree->Branch("particles","AliJetEventParticles",&fEventParticles,32000,1);
        fNewTree=0;
       }
+      fEventParticles->SetEventNr(fNEventsRead);
       fTree->Fill();
   }
   return kTRUE;