From 26d4b1416bff7602d6300ccf6c1e0fcfa2bd4f8e Mon Sep 17 00:00:00 2001 From: schutz Date: Wed, 16 Feb 2000 11:24:06 +0000 Subject: [PATCH] ParticleGuesser removed and replaced by PID --- PHOS/AliPHOSAnalyze.cxx | 40 +++----- PHOS/AliPHOSAnalyze.h | 3 +- PHOS/AliPHOSDigit.cxx | 94 ++++++++++++++----- PHOS/AliPHOSDigit.h | 9 +- ...PHOSParticleGuesser.cxx => AliPHOSPID.cxx} | 10 +- ...{AliPHOSParticleGuesser.h => AliPHOSPID.h} | 18 ++-- ...ParticleGuesserv1.cxx => AliPHOSPIDv1.cxx} | 12 +-- ...PHOSParticleGuesserv1.h => AliPHOSPIDv1.h} | 20 ++-- PHOS/AliPHOSRecParticle.h | 2 +- PHOS/AliPHOSRecPoint.cxx | 16 ++-- PHOS/AliPHOSReconstructioner.h | 11 ++- PHOS/AliPHOSv0.cxx | 16 +--- PHOS/Makefile | 2 +- PHOS/PHOSHistos.cxx | 10 +- PHOS/PHOSLinkDef.h | 6 +- 15 files changed, 154 insertions(+), 115 deletions(-) rename PHOS/{AliPHOSParticleGuesser.cxx => AliPHOSPID.cxx} (86%) rename PHOS/{AliPHOSParticleGuesser.h => AliPHOSPID.h} (66%) rename PHOS/{AliPHOSParticleGuesserv1.cxx => AliPHOSPIDv1.cxx} (84%) rename PHOS/{AliPHOSParticleGuesserv1.h => AliPHOSPIDv1.h} (51%) diff --git a/PHOS/AliPHOSAnalyze.cxx b/PHOS/AliPHOSAnalyze.cxx index a2e320f34ea..04e26a1c58f 100644 --- a/PHOS/AliPHOSAnalyze.cxx +++ b/PHOS/AliPHOSAnalyze.cxx @@ -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 ; diff --git a/PHOS/AliPHOSAnalyze.h b/PHOS/AliPHOSAnalyze.h index 638f143a1c1..3d41013b054 100644 --- a/PHOS/AliPHOSAnalyze.h +++ b/PHOS/AliPHOSAnalyze.h @@ -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 ; diff --git a/PHOS/AliPHOSDigit.cxx b/PHOS/AliPHOSDigit.cxx index 212c50e4f26..512f48a62a0 100644 --- a/PHOS/AliPHOSDigit.cxx +++ b/PHOS/AliPHOSDigit.cxx @@ -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 ; + } - + } diff --git a/PHOS/AliPHOSDigit.h b/PHOS/AliPHOSDigit.h index 9867142287c..e48ff1e4d44 100644 --- a/PHOS/AliPHOSDigit.h +++ b/PHOS/AliPHOSDigit.h @@ -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 diff --git a/PHOS/AliPHOSParticleGuesser.cxx b/PHOS/AliPHOSPID.cxx similarity index 86% rename from PHOS/AliPHOSParticleGuesser.cxx rename to PHOS/AliPHOSPID.cxx index 55bdc8f2326..b7958b7d897 100644 --- a/PHOS/AliPHOSParticleGuesser.cxx +++ b/PHOS/AliPHOSPID.cxx @@ -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 ////////////////////////////////////////////////////////////////////////////// @@ -29,18 +29,18 @@ // --- AliRoot header files --- -#include "AliPHOSParticleGuesser.h" +#include "AliPHOSPID.h" -ClassImp(AliPHOSParticleGuesser) +ClassImp(AliPHOSPID) //____________________________________________________________________________ -AliPHOSParticleGuesser::AliPHOSParticleGuesser() +AliPHOSPID::AliPHOSPID() { // ctor } //____________________________________________________________________________ -AliPHOSParticleGuesser::~AliPHOSParticleGuesser() +AliPHOSPID::~AliPHOSPID() { // dtor } diff --git a/PHOS/AliPHOSParticleGuesser.h b/PHOS/AliPHOSPID.h similarity index 66% rename from PHOS/AliPHOSParticleGuesser.h rename to PHOS/AliPHOSPID.h index 24b68f870e2..0d077f1b9a4 100644 --- a/PHOS/AliPHOSParticleGuesser.h +++ b/PHOS/AliPHOSPID.h @@ -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 // // // @@ -29,17 +29,17 @@ 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 diff --git a/PHOS/AliPHOSParticleGuesserv1.cxx b/PHOS/AliPHOSPIDv1.cxx similarity index 84% rename from PHOS/AliPHOSParticleGuesserv1.cxx rename to PHOS/AliPHOSPIDv1.cxx index d6c891d428d..9eb7804036a 100644 --- a/PHOS/AliPHOSParticleGuesserv1.cxx +++ b/PHOS/AliPHOSPIDv1.cxx @@ -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 ////////////////////////////////////////////////////////////////////////////// @@ -26,29 +26,29 @@ // --- 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 diff --git a/PHOS/AliPHOSParticleGuesserv1.h b/PHOS/AliPHOSPIDv1.h similarity index 51% rename from PHOS/AliPHOSParticleGuesserv1.h rename to PHOS/AliPHOSPIDv1.h index 8b99df9bf93..cf1ee9a173a 100644 --- a/PHOS/AliPHOSParticleGuesserv1.h +++ b/PHOS/AliPHOSPIDv1.h @@ -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 // @@ -19,19 +19,19 @@ // --- 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 diff --git a/PHOS/AliPHOSRecParticle.h b/PHOS/AliPHOSRecParticle.h index ec9870283ae..f6216fd6fc9 100644 --- a/PHOS/AliPHOSRecParticle.h +++ b/PHOS/AliPHOSRecParticle.h @@ -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 diff --git a/PHOS/AliPHOSRecPoint.cxx b/PHOS/AliPHOSRecPoint.cxx index 6fda0277d3a..9fd62da06ab 100644 --- a/PHOS/AliPHOSRecPoint.cxx +++ b/PHOS/AliPHOSRecPoint.cxx @@ -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 ; } //______________________________________________________________________________ diff --git a/PHOS/AliPHOSReconstructioner.h b/PHOS/AliPHOSReconstructioner.h index 37680df34ae..d86019759d4 100644 --- a/PHOS/AliPHOSReconstructioner.h +++ b/PHOS/AliPHOSReconstructioner.h @@ -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 diff --git a/PHOS/AliPHOSv0.cxx b/PHOS/AliPHOSv0.cxx index 2a1212ebc1d..b6666b4e6b3 100644 --- a/PHOS/AliPHOSv0.cxx +++ b/PHOS/AliPHOSv0.cxx @@ -1042,8 +1042,8 @@ Int_t AliPHOSv0::Digitize(Float_t Energy){ //___________________________________________________________________________ void AliPHOSv0::FinishEvent() { - cout << "//_____________________________________________________" << endl ; - cout << " AliPHOSv0::FinishEvent() -- Starting digitalization" << endl ; +// cout << "//_____________________________________________________" << endl ; +// cout << " 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); } } diff --git a/PHOS/Makefile b/PHOS/Makefile index 70ac0375b48..88764e73a23 100644 --- a/PHOS/Makefile +++ b/PHOS/Makefile @@ -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 diff --git a/PHOS/PHOSHistos.cxx b/PHOS/PHOSHistos.cxx index 25c2322390a..7d5274280ab 100644 --- a/PHOS/PHOSHistos.cxx +++ b/PHOS/PHOSHistos.cxx @@ -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 <