From 20427a27dbae985b3a63ab29200df37e89bb2198 Mon Sep 17 00:00:00 2001 From: martinez Date: Mon, 3 Apr 2000 15:13:26 +0000 Subject: [PATCH] Using the constructor for AliPHOSHit in AliPHOSv0hits::StepManager() --- PHOS/AliPHOSv0hits.cxx | 16 +++++++++------- PHOS/AliPHOSv0hits.h | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/PHOS/AliPHOSv0hits.cxx b/PHOS/AliPHOSv0hits.cxx index 2d45f6ef3bd..ead9ddd386a 100644 --- a/PHOS/AliPHOSv0hits.cxx +++ b/PHOS/AliPHOSv0hits.cxx @@ -82,15 +82,16 @@ AliPHOSv0hits::~AliPHOSv0hits() } //____________________________________________________________________________ -void AliPHOSv0hits::AddHit(Int_t tracknumber, Int_t Id, Float_t * hits) +void AliPHOSv0hits::AddHit(Int_t primary, Int_t tracknumber, Int_t Id, Float_t * hits) { // Add a hit to the hit list. // In this version of AliPHOSv0, a PHOS hit is real geant // hits in a single crystal or in a single PPSD gas cell - // cout << "Tracknumber is " << tracknumber << endl; - //cout << "Vol Id is " << Id << endl; - //cout << "hits is " << hits[0] << " " << hits[1] << " " << hits[2] << " " << hits[3] <Print(""); - newHit = new AliPHOSHit(tracknumber, Id, hits) ; + newHit = new AliPHOSHit(primary, tracknumber, Id, hits) ; // We DO want to save in TreeH the raw hits // TClonesArray &lhits = *fHits; @@ -200,6 +201,7 @@ void AliPHOSv0hits::StepManager(void) Int_t copy ; Int_t tracknumber = gAlice->CurrentTrack() ; + Int_t primary = gAlice->GetPrimary( gAlice->CurrentTrack() ); TString name = fGeom->GetName() ; if ( name == "GPS2" ) { // the CPV is a PPSD @@ -225,7 +227,7 @@ void AliPHOSv0hits::StepManager(void) fGeom->RelToAbsNumbering(relid, absid) ; // add current hit to the hit list - AddHit(tracknumber, absid, xyze); + AddHit(primary, tracknumber, absid, xyze); } // there is deposited energy } // We are inside the gas of the CPV @@ -252,7 +254,7 @@ void AliPHOSv0hits::StepManager(void) // add current hit to the hit list - AddHit(tracknumber, absid, xyze); + AddHit(primary,tracknumber, absid, xyze); } // there is deposited energy } // we are inside a PHOS Xtal diff --git a/PHOS/AliPHOSv0hits.h b/PHOS/AliPHOSv0hits.h index f87cc0524dc..58e394a2c35 100644 --- a/PHOS/AliPHOSv0hits.h +++ b/PHOS/AliPHOSv0hits.h @@ -23,7 +23,7 @@ public: AliPHOSv0hits(const char *name, const char *title="") ; virtual ~AliPHOSv0hits(void) ; - virtual void AddHit( Int_t primary, Int_t id, Float_t *hits ) ; + virtual void AddHit( Int_t primary, Int_t track, Int_t id, Float_t *hits ) ; // adds a hit to the hit tree (any pre=digitalization is done here (so large root file !!) void FinishEvent(void) ; // makes the digits from the hits virtual void StepManager(void) ; // StepManager to keep current tack number in the hit -- 2.43.0