From: morsch Date: Tue, 15 Aug 2006 14:13:08 +0000 (+0000) Subject: EffC++ warnings corrected. X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;ds=inline;h=e8a8adcd2b85d93b595b56b8dceb8f27d1f7c0ad;p=u%2Fmrichter%2FAliRoot.git EffC++ warnings corrected. --- diff --git a/PYTHIA6/AliDecayerPythia.cxx b/PYTHIA6/AliDecayerPythia.cxx index f0a98cddddd..2093bd42d08 100644 --- a/PYTHIA6/AliDecayerPythia.cxx +++ b/PYTHIA6/AliDecayerPythia.cxx @@ -54,14 +54,24 @@ extern "C" void type_of_call Bool_t AliDecayerPythia::fgInit = kFALSE; -AliDecayerPythia::AliDecayerPythia() +AliDecayerPythia::AliDecayerPythia(): + fPythia(AliPythia::Instance()), + fDecay(kAll) { // Default Constructor - fPythia=AliPythia::Instance(); for (Int_t i=0; i< 501; i++) fBraPart[i]= 1.; ReadDecayTable(); } +AliDecayerPythia::AliDecayerPythia(const AliDecayerPythia &decayer): + AliDecayer(decayer), + fPythia(0), + fDecay(kAll) +{ + // Copy Constructor + decayer.Copy(*this); +} + void AliDecayerPythia::Init() { // Initialisation diff --git a/PYTHIA6/AliDecayerPythia.h b/PYTHIA6/AliDecayerPythia.h index fab96f4f3d0..6c469bdf950 100644 --- a/PYTHIA6/AliDecayerPythia.h +++ b/PYTHIA6/AliDecayerPythia.h @@ -18,9 +18,8 @@ public AliDecayer { public: AliDecayerPythia(); - AliDecayerPythia(const AliDecayerPythia &decayer):AliDecayer(decayer) - {decayer.Copy(*this);} -// + AliDecayerPythia(const AliDecayerPythia &decayer); + // virtual ~AliDecayerPythia(){;} virtual void Init(); virtual void Decay(Int_t idpart, TLorentzVector *p); diff --git a/PYTHIA6/AliGenPythia.cxx b/PYTHIA6/AliGenPythia.cxx index ddbbe4fd0c8..c7559da8b02 100644 --- a/PYTHIA6/AliGenPythia.cxx +++ b/PYTHIA6/AliGenPythia.cxx @@ -45,43 +45,144 @@ ClassImp(AliGenPythia) -AliGenPythia::AliGenPythia() - :AliGenMC() + +AliGenPythia::AliGenPythia(): + AliGenMC(), + fProcess(kPyCharm), + fStrucFunc(kCTEQ5L), + fEnergyCMS(5500.), + fKineBias(0.), + fTrials(0), + fTrialsRun(0), + fQ(0.), + fX1(0.), + fX2(0.), + fEventTime(0.), + fInteractionRate(0.), + fTimeWindow(0.), + fCurSubEvent(0), + fEventsTime(0), + fNev(0), + fFlavorSelect(0), + fXsection(0.), + fPythia(0), + fPtHardMin(0.), + fPtHardMax(1.e4), + fYHardMin(-1.e10), + fYHardMax(1.e10), + fGinit(1), + fGfinal(1), + fHadronisation(1), + fNpartons(0), + fReadFromFile(0), + fQuench(0), + fPtKick(1.), + fFullEvent(kTRUE), + fDecayer(new AliDecayerPythia()), + fDebugEventFirst(-1), + fDebugEventLast(-1), + fEtMinJet(0.), + fEtMaxJet(1.e4), + fEtaMinJet(-20.), + fEtaMaxJet(20.), + fPhiMinJet(0.), + fPhiMaxJet(2.* TMath::Pi()), + fJetReconstruction(kCell), + fEtaMinGamma(-20.), + fEtaMaxGamma(20.), + fPhiMinGamma(0.), + fPhiMaxGamma(2. * TMath::Pi()), + fPycellEtaMax(2.), + fPycellNEta(274), + fPycellNPhi(432), + fPycellThreshold(0.), + fPycellEtSeed(4.), + fPycellMinEtJet(10.), + fPycellMaxRadius(1.), + fStackFillOpt(kFlavorSelection), + fFeedDownOpt(kTRUE), + fFragmentation(kTRUE), + fSetNuclei(kFALSE), + fNewMIS(kFALSE), + fHFoff(kFALSE), + fTriggerParticle(0), + fTriggerEta(0.9), + fCountMode(kCountAll), + fHeader(0), + fRL(0), + fFileName(0) { // Default Constructor - fParticles = 0; - fPythia = 0; - fHeader = 0; - fReadFromFile = 0; - fEventTime = 0.; - fInteractionRate = 0.; - fTimeWindow = 0.; - fEventsTime = 0; - fCurSubEvent = 0; - fDecayer = new AliDecayerPythia(); - SetEventListRange(); - SetJetPhiRange(); - SetJetEtaRange(); - SetJetEtRange(); - SetGammaPhiRange(); - SetGammaEtaRange(); - SetPtKick(); - SetQuench(); - SetHadronisation(); - SetTriggerParticle(); SetNuclei(0,0); - fSetNuclei = kFALSE; - fNewMIS = kFALSE; - fHFoff = kFALSE; - fGinit = 1; - fGfinal = 1; - if (!AliPythiaRndm::GetPythiaRandom()) - AliPythiaRndm::SetPythiaRandom(GetRandom()); + AliPythiaRndm::SetPythiaRandom(GetRandom()); } AliGenPythia::AliGenPythia(Int_t npart) - :AliGenMC(npart) + :AliGenMC(npart), + fProcess(kPyCharm), + fStrucFunc(kCTEQ5L), + fEnergyCMS(5500.), + fKineBias(0.), + fTrials(0), + fTrialsRun(0), + fQ(0.), + fX1(0.), + fX2(0.), + fEventTime(0.), + fInteractionRate(0.), + fTimeWindow(0.), + fCurSubEvent(0), + fEventsTime(0), + fNev(0), + fFlavorSelect(0), + fXsection(0.), + fPythia(0), + fPtHardMin(0.), + fPtHardMax(1.e4), + fYHardMin(-1.e10), + fYHardMax(1.e10), + fGinit(kTRUE), + fGfinal(kTRUE), + fHadronisation(kTRUE), + fNpartons(0), + fReadFromFile(kFALSE), + fQuench(kFALSE), + fPtKick(1.), + fFullEvent(kTRUE), + fDecayer(new AliDecayerPythia()), + fDebugEventFirst(-1), + fDebugEventLast(-1), + fEtMinJet(0.), + fEtMaxJet(1.e4), + fEtaMinJet(-20.), + fEtaMaxJet(20.), + fPhiMinJet(0.), + fPhiMaxJet(2.* TMath::Pi()), + fJetReconstruction(kCell), + fEtaMinGamma(-20.), + fEtaMaxGamma(20.), + fPhiMinGamma(0.), + fPhiMaxGamma(2. * TMath::Pi()), + fPycellEtaMax(2.), + fPycellNEta(274), + fPycellNPhi(432), + fPycellThreshold(0.), + fPycellEtSeed(4.), + fPycellMinEtJet(10.), + fPycellMaxRadius(1.), + fStackFillOpt(kFlavorSelection), + fFeedDownOpt(kTRUE), + fFragmentation(kTRUE), + fSetNuclei(kFALSE), + fNewMIS(kFALSE), + fHFoff(kFALSE), + fTriggerParticle(0), + fTriggerEta(0.9), + fCountMode(kCountAll), + fHeader(0), + fRL(0), + fFileName(0) { // default charm production at 5. 5 TeV // semimuonic decay @@ -89,57 +190,79 @@ AliGenPythia::AliGenPythia(Int_t npart) // fName = "Pythia"; fTitle= "Particle Generator using PYTHIA"; - fXsection = 0.; - fReadFromFile = 0; - fEventTime = 0.; - fInteractionRate = 0.; - fTimeWindow = 0.; - fEventsTime = 0; - fCurSubEvent = 0; - SetProcess(); - SetStrucFunc(); SetForceDecay(); - SetPtHard(); - SetYHard(); - SetEnergyCMS(); - fDecayer = new AliDecayerPythia(); // Set random number generator if (!AliPythiaRndm::GetPythiaRandom()) AliPythiaRndm::SetPythiaRandom(GetRandom()); - fFlavorSelect = 0; - // Produced particles fParticles = new TClonesArray("TParticle",1000); - fHeader = 0; - SetEventListRange(); - SetJetPhiRange(); - SetJetEtaRange(); - SetJetEtRange(); - SetGammaPhiRange(); - SetGammaEtaRange(); - SetJetReconstructionMode(); - SetQuench(); - SetHadronisation(); - SetPtKick(); - SetTriggerParticle(); SetNuclei(0,0); - // Options determining what to keep in the stack (Heavy flavour generation) - fStackFillOpt = kFlavorSelection; // Keep particle with selected flavor - fFeedDownOpt = kTRUE; // allow feed down from higher family - // Fragmentation on/off - fFragmentation = kTRUE; - // Default counting mode - fCountMode = kCountAll; - // Pycel - SetPycellParameters(); - fSetNuclei = kFALSE; - fNewMIS = kFALSE; - fHFoff = kFALSE; - fGinit = 1; - fGfinal = 1; } AliGenPythia::AliGenPythia(const AliGenPythia & Pythia) - :AliGenMC(Pythia) + :AliGenMC(Pythia), + fProcess(kPyCharm), + fStrucFunc(kCTEQ5L), + fEnergyCMS(5500.), + fKineBias(0.), + fTrials(0), + fTrialsRun(0), + fQ(0.), + fX1(0.), + fX2(0.), + fEventTime(0.), + fInteractionRate(0.), + fTimeWindow(0.), + fCurSubEvent(0), + fEventsTime(0), + fNev(0), + fFlavorSelect(0), + fXsection(0.), + fPythia(0), + fPtHardMin(0.), + fPtHardMax(1.e4), + fYHardMin(-1.e10), + fYHardMax(1.e10), + fGinit(kTRUE), + fGfinal(kTRUE), + fHadronisation(kTRUE), + fNpartons(0), + fReadFromFile(kFALSE), + fQuench(kFALSE), + fPtKick(1.), + fFullEvent(kTRUE), + fDecayer(new AliDecayerPythia()), + fDebugEventFirst(-1), + fDebugEventLast(-1), + fEtMinJet(0.), + fEtMaxJet(1.e4), + fEtaMinJet(-20.), + fEtaMaxJet(20.), + fPhiMinJet(0.), + fPhiMaxJet(2.* TMath::Pi()), + fJetReconstruction(kCell), + fEtaMinGamma(-20.), + fEtaMaxGamma(20.), + fPhiMinGamma(0.), + fPhiMaxGamma(2. * TMath::Pi()), + fPycellEtaMax(2.), + fPycellNEta(274), + fPycellNPhi(432), + fPycellThreshold(0.), + fPycellEtSeed(4.), + fPycellMinEtJet(10.), + fPycellMaxRadius(1.), + fStackFillOpt(kFlavorSelection), + fFeedDownOpt(kTRUE), + fFragmentation(kTRUE), + fSetNuclei(kFALSE), + fNewMIS(kFALSE), + fHFoff(kFALSE), + fTriggerParticle(0), + fTriggerEta(0.9), + fCountMode(kCountAll), + fHeader(0), + fRL(0), + fFileName(0) { // copy constructor Pythia.Copy(*this); diff --git a/PYTHIA6/AliGenPythiaEventHeader.cxx b/PYTHIA6/AliGenPythiaEventHeader.cxx index 9e8724cff4d..a203bfbc5cb 100644 --- a/PYTHIA6/AliGenPythiaEventHeader.cxx +++ b/PYTHIA6/AliGenPythiaEventHeader.cxx @@ -19,26 +19,31 @@ ClassImp(AliGenPythiaEventHeader) - -AliGenPythiaEventHeader::AliGenPythiaEventHeader() +AliGenPythiaEventHeader::AliGenPythiaEventHeader(): + fProcessType(0), + fTrials(0), + fNJets(0), + fNUQJets(0), + fXJet(-1.), + fYJet(-1.), + fPtHard(0.) { // Default Constructor - fNJets = 0; - fNUQJets = 0; for (Int_t i = 0; i < 4; i++) fZquench[i] = 0.; - fXJet = -1.; - fYJet = -1.; } -AliGenPythiaEventHeader::AliGenPythiaEventHeader(const char* name):AliGenEventHeader(name) +AliGenPythiaEventHeader::AliGenPythiaEventHeader(const char* name): + AliGenEventHeader(name), + fProcessType(0), + fTrials(0), + fNJets(0), + fNUQJets(0), + fXJet(-1.), + fYJet(-1.), + fPtHard(0.) { // Constructor - fNJets = 0; - fNUQJets = 0; for (Int_t i = 0; i < 4; i++) fZquench[i] = 0.; - fXJet = -1.; - fYJet = -1.; - } void AliGenPythiaEventHeader::AddJet(Float_t px, Float_t py, Float_t pz, Float_t e) diff --git a/PYTHIA6/AliPythia.cxx b/PYTHIA6/AliPythia.cxx index f58c91526a8..ba02c52167e 100644 --- a/PYTHIA6/AliPythia.cxx +++ b/PYTHIA6/AliPythia.cxx @@ -51,7 +51,14 @@ extern "C" void type_of_call pyevnw(){;} AliPythia* AliPythia::fgAliPythia=NULL; -AliPythia::AliPythia() +AliPythia::AliPythia(): + fProcess(kPyMb), + fEcms(0.), + fStrucFunc(kCTEQ5L), + fXJet(0.), + fYJet(0.), + fGlauber(0), + fQuenchingWeights(0) { // Default Constructor // @@ -62,6 +69,19 @@ AliPythia::AliPythia() fQuenchingWeights = 0; } +AliPythia::AliPythia(const AliPythia& pythia): + fProcess(kPyMb), + fEcms(0.), + fStrucFunc(kCTEQ5L), + fXJet(0.), + fYJet(0.), + fGlauber(0), + fQuenchingWeights(0) +{ + // Copy Constructor + pythia.Copy(*this); +} + void AliPythia::ProcInit(Process_t process, Float_t energy, StrucFunc_t strucfunc) { // Initialise the process to generate @@ -1201,3 +1221,18 @@ void AliPythia::AtlasTuning() SetPARP(86,0.66); // Regulates gluon prod. mechanism SetPARP(67,1); // Regulates Initial State Radiation } + +AliPythia& AliPythia::operator=(const AliPythia& rhs) +{ +// Assignment operator + rhs.Copy(*this); + return *this; +} + + void AliPythia::Copy(TObject&) const +{ + // + // Copy + // + Fatal("Copy","Not implemented!\n"); +} diff --git a/PYTHIA6/AliPythia.h b/PYTHIA6/AliPythia.h index 4f534aafdd8..708e877c1ef 100644 --- a/PYTHIA6/AliPythia.h +++ b/PYTHIA6/AliPythia.h @@ -49,6 +49,9 @@ class AliPythia : public TPythia6, public AliRndm // return instance of the singleton static AliPythia* Instance(); virtual void Quench(); + // Assignment Operator + AliPythia & operator=(const AliPythia & rhs); + void Copy(TObject&) const; protected: Process_t fProcess; // Process type Float_t fEcms; // Centre of mass energy @@ -63,6 +66,7 @@ class AliPythia : public TPythia6, public AliRndm static AliPythia* fgAliPythia; // Pointer to single instance private: AliPythia(); + AliPythia(const AliPythia& pythia); void ConfigHeavyFlavor(); void AtlasTuning(); ClassDef(AliPythia,1) //ALICE UI to PYTHIA