ParticleGuesser removed and replaced by PID
authorschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Feb 2000 11:24:06 +0000 (11:24 +0000)
committerschutz <schutz@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 16 Feb 2000 11:24:06 +0000 (11:24 +0000)
15 files changed:
PHOS/AliPHOSAnalyze.cxx
PHOS/AliPHOSAnalyze.h
PHOS/AliPHOSDigit.cxx
PHOS/AliPHOSDigit.h
PHOS/AliPHOSPID.cxx [moved from PHOS/AliPHOSParticleGuesser.cxx with 86% similarity]
PHOS/AliPHOSPID.h [moved from PHOS/AliPHOSParticleGuesser.h with 66% similarity]
PHOS/AliPHOSPIDv1.cxx [moved from PHOS/AliPHOSParticleGuesserv1.cxx with 84% similarity]
PHOS/AliPHOSPIDv1.h [moved from PHOS/AliPHOSParticleGuesserv1.h with 51% similarity]
PHOS/AliPHOSRecParticle.h
PHOS/AliPHOSRecPoint.cxx
PHOS/AliPHOSReconstructioner.h
PHOS/AliPHOSv0.cxx
PHOS/Makefile
PHOS/PHOSHistos.cxx
PHOS/PHOSLinkDef.h

index a2e320f34ea2c9aeeb435fd8e8247a3fed491c6f..04e26a1c58f3bf5633f2e6210ceb5eeadf4e6a81 100644 (file)
@@ -41,7 +41,7 @@
 #include "AliPHOSAnalyze.h"
 #include "AliPHOSClusterizerv1.h"
 #include "AliPHOSTrackSegmentMakerv1.h"
-#include "AliPHOSParticleGuesserv1.h"
+#include "AliPHOSPIDv1.h"
 #include "AliPHOSReconstructioner.h"
 #include "AliPHOSDigit.h"
 #include "AliPHOSTrackSegment.h"
@@ -90,8 +90,8 @@ AliPHOSAnalyze::~AliPHOSAnalyze()
   delete fClu ; 
   fClu = 0 ;
 
-  delete fPag ; 
-  fPag = 0 ;
+  delete fPID ; 
+  fPID = 0 ;
 
   delete fRec ; 
   fRec = 0 ;
@@ -162,10 +162,10 @@ void AliPHOSAnalyze::AnalyzeOneEvent(Int_t evt)
          fClu->SetCalibrationParameters(0., 0.00000001) ;  
          //========== Creates the track segment maker
          fTrs = new AliPHOSTrackSegmentMakerv1()  ; 
-         //========== Creates the particle guesser
-         fPag = new AliPHOSParticleGuesserv1() ;
+         //========== Creates the particle identifier
+         fPID = new AliPHOSPIDv1() ;
          //========== Creates the Reconstructioner  
-         fRec = new AliPHOSReconstructioner(fClu, fTrs, fPag) ; 
+         fRec = new AliPHOSReconstructioner(fClu, fTrs, fPID) ; 
          //========== Event Number
          if ( ( log10(ievent+1) - (Int_t)(log10(ievent+1)) ) == 0. ) cout <<  "AnalyzeManyEvents > " << "Event is " << ievent << endl ;  
          //=========== Connects the various Tree's for evt
@@ -249,10 +249,10 @@ void AliPHOSAnalyze::AnalyzeOneEvent(Int_t evt)
                    }
                }
            }
-         // Deleting fClu, fTrs, fPag et fRec
+         // Deleting fClu, fTrs, fPID et fRec
          fClu->Delete();
          fTrs->Delete();
-         fPag->Delete();
+         fPID->Delete();
          fRec->Delete();
 
        }   // endfor
@@ -338,14 +338,14 @@ Bool_t AliPHOSAnalyze::Init(Int_t evt)
     fTrs = new AliPHOSTrackSegmentMakerv1() ;
     cout <<  "AnalyzeOneEvent > using tack segment maker " << fTrs->GetName() << endl ; 
     
-    //========== Creates the particle guesser
+    //========== Creates the particle identifier
     
-    fPag = new AliPHOSParticleGuesserv1() ;
-    cout <<  "AnalyzeOneEvent > using particle guess " << fPag->GetName() << endl ; 
+    fPID = new AliPHOSPIDv1() ;
+    cout <<  "AnalyzeOneEvent > using particle identifier " << fPID->GetName() << endl ; 
     
     //========== Creates the Reconstructioner  
     
-    fRec = new AliPHOSReconstructioner(fClu, fTrs, fPag) ;     
+    fRec = new AliPHOSReconstructioner(fClu, fTrs, fPID) ;     
     
     //=========== Connect the various Tree's for evt
     
@@ -572,14 +572,6 @@ void AliPHOSAnalyze::DisplayRecPoints()
          fGeom->AbsToRelNumbering(digit->GetId(), relid) ;
          if (relid[0] == module)  
            {  
-
-Int_t nprim = digit->GetNprimary() ;
- cout << " digit nprim = " << nprim << endl ;
-Int_t ii ;
-Int_t * aprim = digit->GetPrimary() ; 
-for ( ii = 0 ; ii < nprim ; ii++)
-  cout << ii << " prim = " << aprim[ii] << endl ;
-
              nDigits++ ;
              energy = fClu->Calibrate(digit->GetAmp()) ;
              etot += energy ; 
@@ -602,22 +594,16 @@ for ( ii = 0 ; ii < nprim ; ii++)
       AliPHOSEmcRecPoint * emc ;
       while((emc = (AliPHOSEmcRecPoint *)nextemc())) 
        {
-
          Int_t numberofprimaries ;
          Int_t * primariesarray = new Int_t[10] ;
          emc->GetPrimaries(numberofprimaries, primariesarray) ;
-         //      cout << " HELLO " << numberofprimaries << endl ;
-         //      Int_t index ;
-         //for ( index = 0 ; index < numberofprimaries ; index++) 
-         // cout << index << " " << primariesarray[index] << endl;
-
          totalnClusters++ ;
          if ( emc->GetPHOSMod() == module )
            { 
              nClusters++ ; 
              energy = emc->GetTotalEnergy() ;   
              etot+= energy ;  
-             emc->Draw("P") ;
+             emc->Draw("M") ;
            }
        }
       cout << "DrawRecPoints > Found " << totalnClusters << " EMC Clusters in PHOS" << endl ; 
index 638f143a1c1340541917198c53e046b53a2998c4..3d41013b054f13450709a81c7357ace805c0cbe0 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "AliPHOSv0.h"
 #include "AliPHOSGeometry.h"
+#include "AliPHOSPID.h"
 
 class AliPHOSAnalyze : public TObject {
 
@@ -50,7 +51,7 @@ private:
   Int_t fEvt ;                      // the evt number being processed 
   AliPHOSGeometry * fGeom;          // the PHOS Geometry object
   AliPHOSv0 * fPHOS ;               // the PHOS object from the root file 
-  AliPHOSParticleGuesser * fPag ;   // a particle guesser
+  AliPHOSPID * fPID ;               // a particle identifier
   AliPHOSReconstructioner * fRec ;  // a reconstructioner  
   TFile * fRootFile ;               // the root file that contains the data
   AliPHOSTrackSegmentMaker * fTrs ; // a tracksegmentmaker ;
index 212c50e4f26d115e99c3b8577e7e8a1917060b1b..512f48a62a06bf1234a48be859b3322c9156e5f9 100644 (file)
@@ -35,6 +35,10 @@ ClassImp(AliPHOSDigit)
 //____________________________________________________________________________
   AliPHOSDigit::AliPHOSDigit() : fPrimary(0)
 {
+  fNprimary = 0 ;  
+  Int_t index ; 
+  for (index = 1 ; index <= 3 ; index++)
+    SetPrimary(index, 0) ; 
 }
 
 //____________________________________________________________________________
@@ -45,6 +49,8 @@ AliPHOSDigit::AliPHOSDigit(Int_t primary, Int_t id, Int_t DigEnergy)
   fPrimary    = new Int_t[1] ; 
   fPrimary[0] = primary ;
   fNprimary   = 1 ; 
+  SetPrimary(1, primary) ; 
+
 }
 
 //____________________________________________________________________________
@@ -56,14 +62,18 @@ AliPHOSDigit::AliPHOSDigit(const AliPHOSDigit & digit)
   fPrimary  = new Int_t[fNprimary] ;
   Int_t * primary = digit.GetPrimary() ;
   Int_t  index ;
-  for ( index = 0 ; index < fNprimary ; index++ )
+  for ( index = 0 ; index < fNprimary ; index++ ) {
     fPrimary[index] = primary[index] ;
+    SetPrimary( index+1, digit.GetPrimary(index+1) ) ; 
+  }
+
 }
 
 //____________________________________________________________________________
 AliPHOSDigit::~AliPHOSDigit()
 {
-  delete fPrimary ; 
+  if ( fPrimary != 0 ) 
+    delete fPrimary ; 
 }
 
 //____________________________________________________________________________
@@ -85,6 +95,31 @@ Int_t AliPHOSDigit::Compare(TObject * obj)
   return rv ; 
 
 }
+
+//____________________________________________________________________________
+Int_t AliPHOSDigit::GetPrimary(Int_t index) const
+{
+  Int_t rv = -1 ; 
+  if ( index > 3 )
+    cout << "AliPHOSDigit  ERROR > only 3 primaries allowed" << endl ; 
+  else {
+    switch (index) {  
+    case 1 :
+      rv = fPrimary1 ; 
+      break ; 
+    case 2 :
+      rv = fPrimary2 ; 
+      break ; 
+    case 3 :
+      rv = fPrimary3 ; 
+      break ; 
+    }
+  } 
+
+  return rv ; 
+
+}
+
 //____________________________________________________________________________
 Bool_t AliPHOSDigit::operator==(AliPHOSDigit const & digit) const 
 {
@@ -121,7 +156,28 @@ AliPHOSDigit& AliPHOSDigit::operator+(AliPHOSDigit const & digit)
     fPrimary[index] = digit.fPrimary[jndex] ; 
     jndex++ ; 
   }
-      
+
+  // Here comes something crummy ... but I do not know how to stream pointers
+  // because AliPHOSDigit is in a TCLonesArray
+
+    if ( fNprimary > 3 )
+      cout << "AliPHOSDigit + operator  ERROR > too many primaries, modify AliPHOSDigit" << endl ; 
+    else {
+      switch (fNprimary) {  
+      case 1 :
+       SetPrimary(1, fPrimary[0]) ; 
+       break ; 
+      case 2 :
+       SetPrimary(2, fPrimary[1]) ; 
+       break ; 
+      case 3:
+       SetPrimary(3, fPrimary[2]) ; 
+       break ; 
+      }
+    }
+
+ // end of crummy stuff      
+
   return *this ;
 }
 
@@ -133,23 +189,19 @@ ostream& operator << ( ostream& out , const AliPHOSDigit & digit)
   return out ;
 }
 
-//______________________________________________________________________________
-void AliPHOSDigit::Streamer(TBuffer &R__b)
+//____________________________________________________________________________
+void AliPHOSDigit::SetPrimary(Int_t index, Int_t value) 
 {
-  assert(0==1) ; 
-   // Stream an object of class AliPHOSDigit.
-   if (R__b.IsReading()) {
-      Version_t R__v = R__b.ReadVersion(); if (R__v) { }
-      AliDigitNew::Streamer(R__b);
-      R__b.ReadArray(fPrimary);
-      R__b >> fNprimary;
-   } else {
-      R__b.WriteVersion(AliPHOSDigit::IsA());
-      AliDigitNew::Streamer(R__b);
-      R__b.WriteArray(fPrimary, fNprimary);
-      R__b << fNprimary;
-
-   }
-}
+  switch (index) {
+  case 1 : 
+    fPrimary1 = value ; 
+    break ; 
+  case 2 : 
+    fPrimary2 = value ; 
+    break ; 
+  case 3 :
+    fPrimary3 = value ; 
+    break ; 
+  }
 
-   
+ }
index 9867142287c73aac306c15fde5cf8a71144ed34b..e48ff1e4d44508cc15af0b3b7cf3ce201171c48c 100644 (file)
@@ -40,12 +40,17 @@ public:
   Int_t   Compare(TObject * obj) ;  
   Int_t   GetNprimary() const { return fNprimary ; }
   Int_t * GetPrimary() const { return fPrimary ; }
+  Int_t   GetPrimary(Int_t index) const ; 
   Bool_t  IsSortable() const { return kTRUE ; }
   void    SetAmp(Int_t Amp) { fAmp=Amp ; } 
-   
+  void    SetPrimary(Int_t index, Int_t value) ; 
+
 private:
 
-  Int_t * fPrimary ;         // Array of primary particles which contribute to the digit 
+  Int_t * fPrimary ;         //! Array of primary particles which contribute to the digit 
+  Int_t fPrimary1 ;          // first primary (because I do not know how to stream *fPrimary) 
+  Int_t fPrimary2 ;          // second primary (because I do not know how to stream *fPrimary) 
+  Int_t fPrimary3 ;          // third primary (because I do not know how to stream *fPrimary) 
   Int_t fNprimary ;          // Number of primaries
   
   ClassDef(AliPHOSDigit,1)   // Digit in PHOS, version 1 
similarity index 86%
rename from PHOS/AliPHOSParticleGuesser.cxx
rename to PHOS/AliPHOSPID.cxx
index 55bdc8f23266080fb73484625b1d28b79f32a780..b7958b7d897cf8dc9c849345e1fd4747b7376754 100644 (file)
@@ -14,7 +14,7 @@
  **************************************************************************/
 
 //_________________________________________________________________________
-// To guess the type of particle detected in PHOS with or without the help 
+// To identify the type of particle detected in PHOS with or without the help 
 // from other detectors
 //*-- Author : Yves Schutz  SUBATECH 
 //////////////////////////////////////////////////////////////////////////////
 
 // --- AliRoot header files ---
 
-#include "AliPHOSParticleGuesser.h"
+#include "AliPHOSPID.h"
 
-ClassImp(AliPHOSParticleGuesser)
+ClassImp(AliPHOSPID)
 
 //____________________________________________________________________________
-AliPHOSParticleGuesser::AliPHOSParticleGuesser()
+AliPHOSPID::AliPHOSPID()
 {
   // ctor
 }
 
 //____________________________________________________________________________
-AliPHOSParticleGuesser::~AliPHOSParticleGuesser()
+AliPHOSPID::~AliPHOSPID()
 {
   // dtor
 }
similarity index 66%
rename from PHOS/AliPHOSParticleGuesser.h
rename to PHOS/AliPHOSPID.h
index 24b68f870e2116745811453e0e89718fddd24c75..0d077f1b9a47c109149947e1b0760cbc616fd3ec 100644 (file)
@@ -1,14 +1,14 @@
-#ifndef ALIPHOSPARTICLEGUESSER_H
-#define ALIPHOSPARTICLEGUESSER_H
+#ifndef ALIPHOSPID_H
+#define ALIPHOSPID_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
                             
 /* $Id$ */
 
 ////////////////////////////////////////////////
-//  Algorithme class for the guess of         //
+//  Algorithme class for the identification of//
 //          particles detected in PHOS        //
-//  interface class                           //
+//  base  class                               //
 //  Version SUBATECH                          //
 //  Author Yves Schutz     SUBATECH           //
 //                                            //  
 
 typedef TClonesArray RecParticlesList ; 
 
-class AliPHOSParticleGuesser : public TObject {
+class AliPHOSPID : public TObject {
 
 public:
 
-  AliPHOSParticleGuesser() ;          // ctor            
-  virtual ~AliPHOSParticleGuesser() ; // dtor
+  AliPHOSPID() ;          // ctor            
+  virtual ~AliPHOSPID() ; // dtor
 
   virtual void GuessParticleType(TrackSegmentsList * trsl, RecParticlesList * rpl) {} ; 
 
-  ClassDef(AliPHOSParticleGuesser,1)  // Particle Guesser interface, version 1
+  ClassDef(AliPHOSPID,1)  // Particle Guesser interface, version 1
 
 } ;
 
-#endif // ALIPHOSPARTICLEGUESSER_H
+#endif // ALIPHOSPID_H
similarity index 84%
rename from PHOS/AliPHOSParticleGuesserv1.cxx
rename to PHOS/AliPHOSPIDv1.cxx
index d6c891d428d738dcfd5beed649cf4f0ebcad567d..9eb7804036ab5267bc4745df0ca07fe15869c29c 100644 (file)
@@ -14,7 +14,7 @@
  **************************************************************************/
 
 //_________________________________________________________________________
-// Algorithm class to guess the type of particle from the PHOS TrackSegment alone 
+// Algorithm class to identify the type of particle from the PHOS TrackSegment alone 
 //*-- Author : Y. Schutz SUBATECH
 //////////////////////////////////////////////////////////////////////////////
 
 
 // --- AliRoot header files ---
 
-#include "AliPHOSParticleGuesserv1.h"
+#include "AliPHOSPIDv1.h"
 #include "AliPHOSTrackSegment.h"
 #include "AliPHOSRecParticle.h"
 
-ClassImp( AliPHOSParticleGuesserv1) 
+ClassImp( AliPHOSPIDv1) 
 
 
 //____________________________________________________________________________
- AliPHOSParticleGuesserv1::AliPHOSParticleGuesserv1() 
+ AliPHOSPIDv1::AliPHOSPIDv1() 
 {
   // ctor
 
 }
 
 //____________________________________________________________________________
- AliPHOSParticleGuesserv1::~AliPHOSParticleGuesserv1()
+ AliPHOSPIDv1::~AliPHOSPIDv1()
 { 
   // dtor
 }
 
 
 //____________________________________________________________________________
-void  AliPHOSParticleGuesserv1::GuessParticleType(TrackSegmentsList * trsl, RecParticlesList * rpl)
+void  AliPHOSPIDv1::GetParticleType(TrackSegmentsList * trsl, RecParticlesList * rpl)
 {
   // main function, does the job
 
similarity index 51%
rename from PHOS/AliPHOSParticleGuesserv1.h
rename to PHOS/AliPHOSPIDv1.h
index 8b99df9bf93013efe8d97ad506b5cc89925219ec..cf1ee9a173a8e5811d484b5b7810157ae1efe325 100644 (file)
@@ -1,12 +1,12 @@
-#ifndef ALIPHOSPARTICLEGUESSERV1_H
-#define ALIPHOSPARTICLEGUESSERV1_H
+#ifndef ALIPHOSPIDV1_H
+#define ALIPHOSPIDV1_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
 /* $Id$ */
 
 ///////////////////////////////////////////////////
-//  Particle Guesser    class for PHOS           //
+//  Particle Identifier   class for PHOS         //
 //  Version SUBATECH                             //
 //  Author Yves Schutz                           //
 //     comment: guess the type of particle       //  
 
 // --- AliRoot header files ---
 
-#include "AliPHOSParticleGuesser.h"
+#include "AliPHOSPID.h"
 
-class  AliPHOSParticleGuesserv1 : public AliPHOSParticleGuesser {
+class  AliPHOSPIDv1 : public AliPHOSPID {
 
 public:
 
-  AliPHOSParticleGuesserv1() ;                     
-  virtual ~ AliPHOSParticleGuesserv1() ; // dtor
+  AliPHOSPIDv1() ;                     
+  virtual ~ AliPHOSPIDv1() ; // dtor
 
-  void    GuessParticleType(TrackSegmentsList * trsl, RecParticlesList * rpl ) ; // does the job
+  void    GetParticleType(TrackSegmentsList * trsl, RecParticlesList * rpl ) ; // does the job
 
-  ClassDef( AliPHOSParticleGuesserv1,1)  // particle guesser implementation , version 1
+  ClassDef( AliPHOSPIDv1,1)  // particle identifier implementation , version 1
 
 };
 
-#endif // AliPHOSPARTICLEGUESSERV1_H
+#endif // AliPHOSPIDV1_H
index ec9870283aee4a43b5a8070a7b70aaa3c706fa31..f6216fd6fc956502655829bed6f110a148207edb 100644 (file)
@@ -40,7 +40,7 @@ public:
 private:
 
   AliPHOSTrackSegment * fPHOSTrackSegment ; // pointer to the associated track segment in PHOS  
-  Int_t fType ;                             // guessed particle type
+  Int_t fType ;                             // identified particle type
 
   ClassDef(AliPHOSRecParticle,1)  // Reconstructed Particle, version 1
 
index 6fda0277d3aa85dd6d7dbe8c5e594bdaeba4cb46..9fd62da06abccb9339f2ac3f3b0892840f830818 100644 (file)
@@ -175,24 +175,25 @@ void AliPHOSRecPoint::GetPrimaries(Int_t & number, Int_t * list)
 {
   AliPHOSDigit * digit ;
   Int_t index ;
-  Int_t maxcounter = 10 ;
+  Int_t maxcounter = 3 ;
   Int_t counter    = 0 ;
   Int_t * tempo    = new Int_t[maxcounter] ;
   
   for ( index = 0 ; index < GetDigitsMultiplicity() ; index++ ) { // all digits
     digit = (AliPHOSDigit *) fDigitsList[index] ; 
-    Int_t * newprimaryarray = digit->GetPrimary() ;
     Int_t nprimaries = digit->GetNprimary() ;
-    //  cout << " nprimaries = " << nprimaries << endl ;
+    Int_t * newprimaryarray = new Int_t[nprimaries] ;
+    Int_t ii ; 
+    for ( ii = 0 ; ii < nprimaries ; ii++)
+      newprimaryarray[ii] = digit->GetPrimary(ii+1) ; 
     Int_t jndex ;
     for ( jndex = 0 ; jndex < nprimaries ; jndex++ ) { // all primaries in digit
-      if ( counter >= maxcounter ) {
+      if ( counter > maxcounter ) {
        number = - 1 ;
        cout << "AliPHOSRecPoint::GetNprimaries ERROR > increase maxcounter " << endl ;
        break ;
       }
       Int_t newprimary = newprimaryarray[jndex] ;
-      //     cout << "GetPrimaries " << newprimary << endl ;
       Int_t kndex ;
       Bool_t already = kFALSE ;
       for ( kndex = 0 ; kndex < counter ; kndex++ ) { //check if not already stored
@@ -206,13 +207,14 @@ void AliPHOSRecPoint::GetPrimaries(Int_t & number, Int_t * list)
          counter++ ;
       } // store it
     } // all primaries in digit
+    delete newprimaryarray ; 
   } // all digits
 
-  counter-- ;
   number = counter ; 
   for ( index = 0 ; index < number ; index ++ )
     list[index] = tempo[index] ;
-
+  
+  delete tempo ; 
 }
 
 //______________________________________________________________________________
index 37680df34aed2d524187d852ab009367074ad0de..d86019759d4a367ce626f06eb9fea5624394c6e8 100644 (file)
@@ -10,7 +10,8 @@
 //                                            //
 //  Author Gines MARTINEZ     SUBATECH        //
 //                                            //
-//  january 2000: added Particle guesser (YS) //
+//  january 2000:                             //
+//             added Particle identifier (YS) //
 //                                            //  
 //                                            //
 ////////////////////////////////////////////////
@@ -20,7 +21,7 @@
 #include "TObject.h"
 #include "AliPHOSClusterizer.h"
 #include "AliPHOSTrackSegmentMaker.h"
-#include "AliPHOSParticleGuesser.h"
+#include "AliPHOSPID.h"
 #include "TClonesArray.h" 
 
 // --- Standard library ---
@@ -33,12 +34,12 @@ public:
 
   AliPHOSReconstructioner(); //ctor            
   AliPHOSReconstructioner(AliPHOSClusterizer * Clusterizer, AliPHOSTrackSegmentMaker * Tracker, 
-                         AliPHOSParticleGuesser * Guesser); //ctor            
+                         AliPHOSPID * Identifier); //ctor            
   ~AliPHOSReconstructioner(); // dtor
 
   AliPHOSClusterizer * GetClusterizer() { return fClusterizer ; }
   void Init(AliPHOSClusterizer * Clusterizer, AliPHOSTrackSegmentMaker * Tracker, 
-                         AliPHOSParticleGuesser * Guesser) ;  
+                         AliPHOSPID * Identifier) ;  
   void Make(TClonesArray * DL, RecPointsList * emccl, RecPointsList * ppsdl, 
            TrackSegmentsList * trsl, RecParticlesList * rpl) ; // does the job
 
@@ -47,7 +48,7 @@ private:
   
   AliPHOSClusterizer * fClusterizer ;             // Method for clusterization 
   AliPHOSTrackSegmentMaker * fTrackSegmentMaker ; // Method for track segments finding
-  AliPHOSParticleGuesser * fParticleGuesser ;     // Method for guessing the type of particle
+  AliPHOSPID * fPID ;                             // Method for identifying the type of particle
  
   ClassDef(AliPHOSReconstructioner,1)  // Reconstruction interface , version 1
 
index 2a1212ebc1d391b3f0a2bf414cd52ea0b1e52502..b6666b4e6b37115e301dda00edc5b384f2967957 100644 (file)
@@ -1042,8 +1042,8 @@ Int_t AliPHOSv0::Digitize(Float_t Energy){
 //___________________________________________________________________________
 void AliPHOSv0::FinishEvent()
 {
-   cout << "//_____________________________________________________" << endl ;
-   cout << "<I> AliPHOSv0::FinishEvent() -- Starting digitalization" << endl ;
+//    cout << "//_____________________________________________________" << endl ;
+//    cout << "<I> AliPHOSv0::FinishEvent() -- Starting digitalization" << endl ;
   Int_t i ;
   Int_t relid[4];
   Int_t j ; 
@@ -1072,16 +1072,10 @@ void AliPHOSv0::FinishEvent()
   } 
   
   // Noise induced by the PIN diode of the PbWO crystals
+
   Float_t energyandnoise ;
   for ( i = 0 ; i < fNdigits ; i++ ) {
     newdigit =  (AliPHOSDigit * ) fDigits->At(i) ;
-
-//     int nprim = newdigit->GetNprimary() ; 
-//     cout << " finishevent " << nprim << endl ; 
-//     int * prim = newdigit->GetPrimary() ; 
-//     for (int ii = 0 ; ii < nprim ; ii++)
-//       cout << ii << " prim = " << prim[ii] << endl ;
-
     fGeom->AbsToRelNumbering(newdigit->GetId(), relid) ;
     if (relid[1]==0){   // Digits belong to EMC (PbW0_4 crystals)
       energyandnoise = newdigit->GetAmp() + Digitize(gRandom->Gaus(0., fPINElectronicNoise)) ;
@@ -1091,8 +1085,6 @@ void AliPHOSv0::FinishEvent()
     }
   }
 
-
-  // Reset the array of all the "accumulated hits" of this event.
   fNTmpHits = 0 ;
   fTmpHits->Delete();
 }
@@ -1131,7 +1123,7 @@ void AliPHOSv0::MakeBranch(Option_t* opt)
   
   if (fDigits && gAlice->TreeD() && cd) {
     gAlice->TreeD()->Branch(branchname,&fDigits, fBufferSize);
-    printf("* AliPHOS::MakeBranch * Making Branch %s for digits\n",branchname);
+    //    printf("* AliPHOS::MakeBranch * Making Branch %s for digits\n",branchname);
   }
 }
 
index 70ac0375b485483f9351ca6566d011bf7b137cf5..88764e73a236dbbdc8200d9fd376e9ca8190488b 100644 (file)
@@ -16,7 +16,7 @@ SRCS          =    AliPHOS.cxx AliPHOSv0.cxx AliPHOSv1.cxx AliPHOSHit.cxx \
                   AliPHOSClusterizer.cxx AliPHOSClusterizerv1.cxx  AliPHOSLink.cxx \
                   AliPHOSReconstructioner.cxx  AliPHOSTrackSegment.cxx \
                    AliPHOSTrackSegmentMaker.cxx AliPHOSTrackSegmentMakerv1.cxx \
-                   AliPHOSRecParticle.cxx AliPHOSParticleGuesser.cxx AliPHOSParticleGuesserv1.cxx \
+                   AliPHOSRecParticle.cxx AliPHOSPID.cxx AliPHOSPIDv1.cxx \
                    AliPHOSAnalyze.cxx 
 
 
index 25c2322390ad6a2d231f59ee3492f3e0859f58e2..7d5274280ab64e6a29988941467e028aa52018d0 100644 (file)
@@ -43,7 +43,7 @@
 #include "AliPHOSReconstructioner.h"
 #include "AliPHOSTrackSegment.h"
 #include "AliPHOSTrackSegmentMakerv1.h"
-#include "AliPHOSParticleGuesserv1.h"
+#include "AliPHOSPIDv1.h"
 #include "PHOSHistos.h"
 
 
@@ -58,9 +58,9 @@ void PHOSHistos (Text_t* infile, Int_t nevent, Int_t Module)
   AliPHOSGeometry * Geom = AliPHOSGeometry::GetInstance(PHOS->GetGeometry()->GetName(),PHOS->GetGeometry()->GetTitle());
 //========== Creates the track segment maker
   AliPHOSTrackSegmentMakerv1 * tracksegmentmaker = new AliPHOSTrackSegmentMakerv1() ;
-  //========== Creates the particle guesser
-  AliPHOSParticleGuesserv1 * particleguesser = new AliPHOSParticleGuesserv1 ;
-  cout <<  "AnalyzeOneEvent > using particle guess " << particleguesser->GetName() << endl ; 
+  //========== Creates the particle identifier
+  AliPHOSPIDv1 * particleidentifier = new AliPHOSPIDv1 ;
+  cout <<  "AnalyzeOneEvent > using particle guess " << particleidentifier->GetName() << endl ; 
     
   TH1F * hEmcDigit       = new TH1F("hEmcDigit","hEmcDigit",1000,0.,5.);
   TH1F * hVetoDigit      = new TH1F("hVetoDigit","hVetoDigit",1000,0.,3.e-5);
@@ -86,7 +86,7 @@ void PHOSHistos (Text_t* infile, Int_t nevent, Int_t Module)
     clusterizer->SetCalibrationParameters(0., 0.00000001) ;
 
   //========== Creates the Reconstructioner  
-    AliPHOSReconstructioner * Reconstructioner = new AliPHOSReconstructioner(clusterizer, tracksegmentmaker, particleguesser) ;
+    AliPHOSReconstructioner * Reconstructioner = new AliPHOSReconstructioner(clusterizer, tracksegmentmaker, particleidentifier) ;
      
     cout << "Event " << ievent <<endl;
 
index bdcfd0ff0175e3ce441e1af280d4c8b12875709c..8c4d99ab669fb2482c5e228c728bbeb14755797d 100644 (file)
@@ -7,7 +7,7 @@
 #pragma link C++ class AliPHOS ;
 #pragma link C++ class AliPHOSClusterizer ;
 #pragma link C++ class AliPHOSClusterizerv1 ;
-#pragma link C++ class AliPHOSDigit- ;
+#pragma link C++ class AliPHOSDigit ;
 #pragma link C++ class AliPHOSEmcRecPoint- ;
 #pragma link C++ class AliPHOSGeometry ;
 #pragma link C++ class AliPHOSHit ;
@@ -21,8 +21,8 @@
 #pragma link C++ class AliPHOSTrackSegmentMaker ;
 #pragma link C++ class AliPHOSTrackSegmentMakerv1 ;
 #pragma link C++ class AliPHOSRecParticle ;
-#pragma link C++ class AliPHOSParticleGuesser ;
-#pragma link C++ class AliPHOSParticleGuesserv1 ;
+#pragma link C++ class AliPHOSPID ;
+#pragma link C++ class AliPHOSPIDv1 ;
 #pragma link C++ class AliPHOSAnalyze ;
 
 #endif