X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EMCAL%2FAliEMCALv1.cxx;h=52c48c1dd60a5c9ff93012286a704b3460c2bffb;hb=080c191b5f852f751ace8ce524807be1328c000a;hp=1f71607d7f1b05e754e4b4d30db93a545cff30a5;hpb=cde6a23d58b267012e25a0d2e75f9b6e4831e9d2;p=u%2Fmrichter%2FAliRoot.git diff --git a/EMCAL/AliEMCALv1.cxx b/EMCAL/AliEMCALv1.cxx index 1f71607d7f1..52c48c1dd60 100644 --- a/EMCAL/AliEMCALv1.cxx +++ b/EMCAL/AliEMCALv1.cxx @@ -30,6 +30,7 @@ // 2. Timing signal is collected and added to hit // --- ROOT system --- +#include #include #include @@ -41,18 +42,30 @@ #include "AliEMCALGeometry.h" #include "AliRun.h" #include "AliMC.h" +#include "AliStack.h" ClassImp(AliEMCALv1) //______________________________________________________________________ -AliEMCALv1::AliEMCALv1():AliEMCALv0(), fCurPrimary(-1), fCurParent(-1), fCurTrack(-1){ - // ctor +AliEMCALv1::AliEMCALv1() + : AliEMCALv0(), + fCurPrimary(-1), + fCurParent(-1), + fCurTrack(-1), + fTimeCut(30e-09) +{ + // default ctor } //______________________________________________________________________ -AliEMCALv1::AliEMCALv1(const char *name, const char *title): - AliEMCALv0(name,title), fCurPrimary(-1), fCurParent(-1), fCurTrack(-1) { +AliEMCALv1::AliEMCALv1(const char *name, const char *title) + : AliEMCALv0(name,title), + fCurPrimary(-1), + fCurParent(-1), + fCurTrack(-1), + fTimeCut(30e-09) +{ // Standard Creator. fHits= new TClonesArray("AliEMCALHit",1000); @@ -60,7 +73,6 @@ AliEMCALv1::AliEMCALv1(const char *name, const char *title): fNhits = 0; fIshunt = 2; // All hits are associated with particles entering the calorimeter - fTimeCut = 30e-09; } //______________________________________________________________________ @@ -122,6 +134,9 @@ void AliEMCALv1::StepManager(void){ AliEMCALGeometry * geom = GetGeometry() ; + TParticle *part; + Int_t parent; + static Int_t idXPHI = gMC->VolId("XPHI"); if(gMC->CurrentVolID(copy) == idXPHI ) { // We are in a Scintillator Layer Float_t depositedEnergy ; @@ -132,16 +147,20 @@ void AliEMCALv1::StepManager(void){ if (fCurParent==-1 || tracknumber != fCurTrack) { // Check parentage - Int_t parent=tracknumber; + //Int_t parent=tracknumber; + parent=tracknumber; if (fCurParent != -1) { while (parent != fCurParent && parent != -1) { - TParticle *part=gAlice->GetMCApp()->Particle(parent); + //TParticle *part=gAlice->GetMCApp()->Particle(parent); + part=gAlice->GetMCApp()->Particle(parent); parent=part->GetFirstMother(); } } if (fCurParent==-1 || parent==-1) { - Int_t parent=tracknumber; - TParticle *part=gAlice->GetMCApp()->Particle(parent); + //Int_t parent=tracknumber; + //TParticle *part=gAlice->GetMCApp()->Particle(parent); + parent=tracknumber; + part=gAlice->GetMCApp()->Particle(parent); while (parent != -1 && geom->IsInEMCAL(part->Vx(),part->Vy(),part->Vz())) { parent=part->GetFirstMother(); if (parent!=-1) @@ -151,7 +170,8 @@ void AliEMCALv1::StepManager(void){ if (fCurParent==-1) Error("StepManager","Cannot find parent"); else { - TParticle *part=gAlice->GetMCApp()->Particle(fCurParent); + //TParticle *part=gAlice->GetMCApp()->Particle(fCurParent); + part=gAlice->GetMCApp()->Particle(fCurParent); ienergy = part->Energy(); } while (parent != -1) { @@ -214,6 +234,7 @@ void AliEMCALv1::StepManager(void){ } } +//___________________________________________________________ void AliEMCALv1::RemapTrackHitIDs(Int_t *map) { // remap track index numbers for primary and parent indices // (Called by AliStack::PurifyKine) @@ -232,6 +253,7 @@ void AliEMCALv1::RemapTrackHitIDs(Int_t *map) { } } +//___________________________________________________________ void AliEMCALv1::FinishPrimary() { // finish primary fCurPrimary=-1;