]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coding violations corrected
authorskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 17 Mar 2004 09:41:46 +0000 (09:41 +0000)
committerskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 17 Mar 2004 09:41:46 +0000 (09:41 +0000)
TMEVSIM/TMevSim.cxx
TMEVSIM/TMevSim.h

index a4e9bd0a932f55ea071d090fd727d21dfec61eea..a143c7754b4c322e49e436e8b36a02ae2d3daa30 100644 (file)
 ///////////////////////////////////////////////////////////////////////////////
 
 
-
-
 #include <Riostream.h>
-#include "TMevSim.h"
 
-#include "MevSimCommon.h"
+#include "TMevSim.h"
+#include"TMevSimPartTypeParams.h"
 #include "TParticle.h"
-#include "TFile.h"
 
 #ifndef WIN32
 # define multgen multgen_
@@ -468,7 +465,8 @@ TMevSim::TMevSim(TMevSim& mevsim) : TGenerator(mevsim) {
    *this = mevsim;
 }
 //______________________________________________________________________________
-TMevSim& TMevSim::operator=(TMevSim& mevsim) {
+
+TMevSim& TMevSim::operator=(const TMevSim& mevsim) {
 // An assignment operator: initializes all the event-wide variables of MevSim with
 // the ones from a copied object. It also copies the parameters specific to
 // each particle species.
@@ -564,11 +562,11 @@ void        TMevSim::Initialize() {
 
 }
 //______________________________________________________________________________
-void        TMevSim::GenerateEvent() {
+void TMevSim::GenerateEvent() {
 // Generates one MevSim event. TMevSim::Initialize() must be called prior
 // to calling this function.
    
-   cout << "Calling FORTRAN multgen()" << endl;
+   Info("GenerateEvent","Calling FORTRAN multgen()");
    multgen();
 }
 
@@ -581,8 +579,8 @@ Int_t TMevSim::ImportParticles(TClonesArray *particles, Option_t */*option*/)
 // information is Geant PID, 3 momentum components and the energy of the particle.
    
    if (particles == 0) return 0;
-   TClonesArray &Particles = *particles;
-   Particles.Clear();
+   TClonesArray &aParticles = *particles;
+   aParticles.Clear();
    
    Int_t totpart = 0;
    for (Int_t nrpidtype=0; nrpidtype < (fParticleTypeParameters->GetLast() + 1); nrpidtype++) {
@@ -597,7 +595,7 @@ Int_t TMevSim::ImportParticles(TClonesArray *particles, Option_t */*option*/)
         Float_t pz = TRACK.pout[poffset];
         poffset += NPID;
         Float_t mass = TRACK.pout[poffset];
-        new(Particles[totpart+nrpart]) TParticle(
+        new(aParticles[totpart+nrpart]) TParticle(
                                          PDGFromId(pidcode),  // Get the PDG ID from GEANT ID
                                          0,
                                          0,
@@ -809,7 +807,7 @@ void        TMevSim::SetPartTypeParams(Int_t index, TMevSimPartTypeParams *param
    *((TMevSimPartTypeParams *) ((*fParticleTypeParameters)[index])) = *params;
 }
 //______________________________________________________________________________
-void        TMevSim::GetPartTypeParamsByIndex(Int_t index, TMevSimPartTypeParams *params) 
+void TMevSim::GetPartTypeParamsByIndex(Int_t index, TMevSimPartTypeParams *params) const
 {
 // Return the particle parameters stored in the list at the postion index.   
 // Returns NULL if index is out of bounds.
@@ -820,7 +818,7 @@ void        TMevSim::GetPartTypeParamsByIndex(Int_t index, TMevSimPartTypeParams
      params = NULL;
 }
 //______________________________________________________________________________
-void        TMevSim::GetPartTypeParamsByGPid(Int_t gpid, TMevSimPartTypeParams *params) 
+void TMevSim::GetPartTypeParamsByGPid(Int_t gpid, TMevSimPartTypeParams *params) const
 {
 // Return the particle parameters for the particle with Geant PID gpid.
 // Returns NULL if the parameters for such particle do not exist in the list.   
index e17b4036fd90f9615eb43cd3c0e12fe9f5e5e7a1..d6b29ae549fcc980dee293229a17fdd96f3c75cd 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ROOT_TMevSim
-#define ROOT_TMevSim
+#ifndef TMEVSIM_H
+#define TMEVSIM_H
 
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 //////////////////////////////////////////////////////////////////////////
 
 #include "TGenerator.h"
-#include "MevSimCommon.h"
-#include "TMevSimPartTypeParams.h"
-#include "TObjArray.h"
 
-class TMevSim : public TGenerator {
-
-protected:
+class TMevSimPartTypeParams;
 
-  Int_t fNEvents;
-  Int_t fModelType;
-  Int_t fReacPlaneCntrl;
-  Float_t fPsiRMean, fPsiRStDev;
-  Float_t fMultFacMean, fMultFacStDev;
-  Float_t fPtCutMin, fPtCutMax;
-  Float_t fEtaCutMin, fEtaCutMax;
-  Float_t fPhiCutMin, fPhiCutMax;
-  Float_t fNStDevMult, fNStDevTemp, fNStDevSigma, fNStDevExpVel, fNStdDevPSIr, fNStDevVn, fNStDevMultFac;
-  Int_t fNIntegPts;
-  Int_t fNScanPts;
-  Int_t firand;  
-  TClonesArray *fParticleTypeParameters;
-   
-// Copied from AliGeant
-  enum {kMaxParticles = 35};
-
-  Int_t fNPDGCodes;               // Number of PDG codes known by G3
-
-  Int_t fPDGCode[kMaxParticles];  // Translation table of PDG codes
+class TMevSim : public TGenerator {
 
  public:   
    // Constructors and destructors
@@ -53,13 +29,9 @@ protected:
           Float_t phiCutMin=0.0, Float_t phiCutMax=360.0, Int_t irand=87266);
 
    TMevSim(TMevSim& mevsim);                    // copy constructor
-
+   TMevSim& operator=(const TMevSim& mevsim);
    virtual            ~TMevSim();
    
-   // Assignment operator
-  
-   virtual TMevSim& operator=(TMevSim& mevsim);
-
    // Mandatory TGenerator functions
    
    virtual void        Initialize();
@@ -138,14 +110,47 @@ protected:
 
    virtual void        AddPartTypeParams(TMevSimPartTypeParams *params);
    virtual void        SetPartTypeParams(Int_t index, TMevSimPartTypeParams *params);
-   virtual void        GetPartTypeParamsByIndex(Int_t index, TMevSimPartTypeParams *params);
-   virtual void        GetPartTypeParamsByGPid(Int_t gpid, TMevSimPartTypeParams *params);
+   virtual void        GetPartTypeParamsByIndex(Int_t index, TMevSimPartTypeParams *params) const;
+   virtual void        GetPartTypeParamsByGPid(Int_t gpid, TMevSimPartTypeParams *params) const;
 
    // conversion   
 
    virtual Int_t       PDGFromId(Int_t gpid) const;
    virtual void        DefineParticles();
-   
+
+protected:
+
+   Int_t fNEvents; // number of events to generate
+   Int_t fModelType;// type of the model  (see class descr at .cxx)
+   Int_t fReacPlaneCntrl;//reaction plane constrol switch (see class descr at .cxx)
+   Float_t fPsiRMean; //Reaction plane angle mean (degrees) (see class descr at .cxx)
+   Float_t fPsiRStDev;//Reaction plane angle variance (degrees) (see class descr at .cxx)
+   Float_t fMultFacMean;// Mean of Overall multiplicity scaling factor  (see class descr at .cxx)
+   Float_t fMultFacStDev;//Variance of Overall multiplicity scaling factor (see class descr at .cxx)
+   Float_t fPtCutMin; //Min Range of transverse momentum in GeV/c  (see class descr at .cxx)
+   Float_t fPtCutMax;//Max Range of transverse momentum in GeV/c (see class descr at .cxx)
+   Float_t fEtaCutMin; //Min Pseudorapidity range(see class descr at .cxx)
+   Float_t fEtaCutMax;//Max Pseudorapidity range(see class descr at .cxx)
+   Float_t fPhiCutMin; //Min of Azimuthal angular range in degrees.(see class descr at .cxx)
+   Float_t fPhiCutMax;//Max  of Azimuthal angular range in degrees. (see class descr at .cxx)
+   Float_t fNStDevMult; //Number of standard deviations  the mean value of multiplicity(see class descr at .cxx)
+   Float_t fNStDevTemp; //Number of standard deviations  the mean value of temperature
+   Float_t fNStDevSigma; //Number of standard deviations  the mean value of rapidity
+   Float_t fNStDevExpVel; //Number of standard deviations  the mean value of expansion velocity 
+   Float_t fNStdDevPSIr; //Number of standard deviations  the mean value of reaction plane angle
+   Float_t fNStDevVn; ////Number of standard deviations  the mean value of 
+   Float_t fNStDevMultFac;////Number of standard deviations  the mean value of multiplicity scaling factor
+   Int_t fNIntegPts;//Number of mesh points to use in the random model
+   Int_t fNScanPts;//Number of mesh points to use to scan the (pt,y)
+   Int_t firand; //seed of RNG
+   TClonesArray *fParticleTypeParameters;//pointer to particle parameters
+
+ // Copied from AliGeant
+   enum {kMaxParticles = 35};
+
+   Int_t fNPDGCodes;               // Number of PDG codes known by G3
+
+   Int_t fPDGCode[kMaxParticles];  // Translation table of PDG codes
 
    ClassDef(TMevSim,1)  //Interface to MevSim Event Generator