From 25c1936c4d1d846f618ba1397e146f45e98251fb Mon Sep 17 00:00:00 2001 From: fca Date: Tue, 20 Oct 2009 21:17:55 +0000 Subject: [PATCH] Removal of warnings by the authors --- TUHKMgen/AliGenUHKM.cxx | 35 ++++++++++++++++++----------------- TUHKMgen/TUHKMgen.cxx | 9 +++++---- TUHKMgen/UHKM/Particle.h | 4 ++-- 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/TUHKMgen/AliGenUHKM.cxx b/TUHKMgen/AliGenUHKM.cxx index d03f2515854..dd00056a06c 100755 --- a/TUHKMgen/AliGenUHKM.cxx +++ b/TUHKMgen/AliGenUHKM.cxx @@ -347,15 +347,11 @@ void AliGenUHKM::Generate() //_________ Loop for particle selection for(Int_t i=0; iGetPdgCode(); Bool_t hasMother = (iparticle->GetFirstMother() >= 0); Bool_t hasDaughter = (iparticle->GetNDaughters() > 0); - + if(hasDaughter) { // This particle has decayed // It will not be tracked @@ -376,13 +372,14 @@ void AliGenUHKM::Generate() imo = iparticle->GetFirstMother(); //index of mother particle in fParticles } // if has mother Bool_t trackFlag = kFALSE; // tFlag is kFALSE --> do not track the particle - - PushTrack(trackFlag, (imo>=0 ? idsOnStack[imo+1] : imo), kf, + + PushTrack(trackFlag, (imo>=0 ? idsOnStack[imo] : imo), kf, p[0], p[1], p[2], energy, v[0], v[1], v[2], time, polar[0], polar[1], polar[2], (hasMother ? kPDecay : kPNoProcess), nt); idsOnStack[i] = nt; + fNprimaries++; KeepTrack(nt); } @@ -394,6 +391,7 @@ void AliGenUHKM::Generate() // this one will not be tracked // Second time with event-wide c0ordinates and vertex smearing // this one will be tracked + Float_t p[3] = {p[0] = iparticle->Px(), p[1] = iparticle->Py(), p[2] = iparticle->Pz()}; @@ -406,19 +404,21 @@ void AliGenUHKM::Generate() Int_t type = iparticle->GetStatusCode(); // 1-from jet / 0-from hydro Int_t coeffT=1; if(type==1) coeffT=-1; //to separate particles from jets + Int_t imo = -1; if(hasMother) { imo = iparticle->GetFirstMother(); } // if has mother + Bool_t trackFlag = kFALSE; // tFlag = kFALSE --> do not track this one, its for femtoscopy PushTrack(trackFlag, (imo>=0 ? idsOnStack[imo] : imo), kf, p[0], p[1], p[2], energy, v[0], v[1], v[2], (iparticle->T())*coeffT, polar[0], polar[1], polar[2], hasMother ? kPDecay:kPNoProcess, nt); - + idsOnStack[i] = nt; fNprimaries++; KeepTrack(nt); @@ -435,6 +435,7 @@ void AliGenUHKM::Generate() origin[0], origin[1], origin[2], iparticle->T(), polar[0], polar[1], polar[2], hasMother ? kPDecay:kPNoProcess, nt); + fNprimaries++; KeepTrack(nt); } @@ -521,17 +522,17 @@ void AliGenUHKM::SetAllParameters() { // fUHKMgen->SetMinimumMass(fMinMass); // fUHKMgen->SetMaximumMass(fMaxMass); - cout << "AliGenUHKM::Init() no. stable flagged particles = " << fStableFlagged << endl; + // cout << "AliGenUHKM::Init() no. stable flagged particles = " << fStableFlagged << endl; for(Int_t i=0; iGetPDG()); if(uhkmTestParticle->GetWidth()<1e-10) - cout << uhkmTestParticle->GetPDG() << "its mass " + cout << uhkmTestParticle->GetPDG() << " with mass " << TDatabasePDG::Instance()->GetParticle(uhkmTestParticle->GetPDG())->Mass() << TDatabasePDG::Instance()->GetParticle(uhkmTestParticle->GetPDG())->Width() << endl; } } // end for -} +} \ No newline at end of file diff --git a/TUHKMgen/TUHKMgen.cxx b/TUHKMgen/TUHKMgen.cxx index 2796f9aba66..cf81d4a32a8 100755 --- a/TUHKMgen/TUHKMgen.cxx +++ b/TUHKMgen/TUHKMgen.cxx @@ -37,6 +37,8 @@ ClassImp(TUHKMgen) TUHKMgen::TUHKMgen() : TGenerator("UHKM","UHKM"), fInitialState(0x0), + fAllocator(), + fSecondariesList(), fNPprim(0), fNPsec(0), fHydjetParams(), @@ -44,8 +46,8 @@ TUHKMgen::TUHKMgen() : { // default constructor setting reasonable defaults for initial parameters (central Pb+Pb at 5.5 TeV) - ParticleAllocator fAllocator; - List_t fSecondariesList; + // ParticleAllocator fAllocator; + // List_t fSecondariesList; // Set reasonable default values for LHC @@ -259,7 +261,7 @@ Int_t TUHKMgen::ImportParticles(TClonesArray *particles, const Option_t* option) // Function overloading the TGenerator::ImportParticles() member function. // The particles from the local particle list (fSecondariesList) are // forwarded to the TGenerator::fParticles - + option = option; // just to avoid the warning if(particles==0) return 0; @@ -395,4 +397,3 @@ void TUHKMgen::SetAllParameters() { // fInitialState->SetPDGParticleStable(fStableFlagPDG[i], fStableFlagStatus[i]); // cout << "TUHKMgen::SetAllParameters() OUT" << endl; } - diff --git a/TUHKMgen/UHKM/Particle.h b/TUHKMgen/UHKM/Particle.h index 7dc2cd00ce2..ccfc10392cd 100644 --- a/TUHKMgen/UHKM/Particle.h +++ b/TUHKMgen/UHKM/Particle.h @@ -153,7 +153,7 @@ typedef std::list::iterator LPIT_t; class ParticleAllocator { public: - ParticleAllocator() {}; + ParticleAllocator() : fFreeNodes() {}; void AddParticle(const Particle & particle, List_t & list); void FreeListNode(List_t & list, LPIT_t it); void FreeList(List_t & list); @@ -162,4 +162,4 @@ class ParticleAllocator { List_t fFreeNodes; }; -#endif +#endif \ No newline at end of file -- 2.43.5