]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Coding cnventions
authorskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 17 Apr 2002 13:19:46 +0000 (13:19 +0000)
committerskowron <skowron@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 17 Apr 2002 13:19:46 +0000 (13:19 +0000)
EVGEN/AliGenCocktailAfterBurner.cxx
EVGEN/AliGenCocktailAfterBurner.h
EVGEN/AliGenHBTprocessor.cxx
EVGEN/AliGenHBTprocessor.h

index f34025815795fbd73c2ede4b7c4a52d15195017f..eff7d494a66a74cb7a5b5d052096a49a4641c594 100644 (file)
@@ -45,7 +45,7 @@ AliGenCocktailAfterBurner::AliGenCocktailAfterBurner()
 {
 // Constructor
     if (gDebug > 0) 
-       cout<<"AliGenCocktailAfterBurner::AliGenCocktailAfterBurner()"<<endl;
+       cout<<"AliGenCocktailAfterBurner::AliGenCocktailAfterBurner()"<<endl;
     SetName("AliGenCocktailAfterBurner");
     SetTitle("AliGenCocktailAfterBurner");
     fInternalStacks =0;
@@ -60,6 +60,11 @@ AliGenCocktailAfterBurner::AliGenCocktailAfterBurner()
     fNBgEvents = 0;
 }
 /*********************************************************************/ 
+AliGenCocktailAfterBurner::AliGenCocktailAfterBurner(const AliGenCocktailAfterBurner& in)
+{
+ //cpy ctor
+}
+
 /*********************************************************************/ 
 
 AliGenCocktailAfterBurner::~AliGenCocktailAfterBurner()
@@ -262,7 +267,7 @@ AliGenCocktailAfterBurner& AliGenCocktailAfterBurner::operator=(const  AliGenCoc
 /*********************************************************************/
 /*********************************************************************/ 
 
-AliStack* AliGenCocktailAfterBurner::GetStack(Int_t n)
+AliStack* AliGenCocktailAfterBurner::GetStack(Int_t n) const
 {
 //Returns the pointer to the N'th stack (event)
   if( ( n<0 ) || ( n>=GetNumberOfEvents() ) )
@@ -302,13 +307,13 @@ void AliGenCocktailAfterBurner::SetTracks(Int_t stackno)
     TVector3 pol;
     
     TParticle * p;
-    Int_t N = instack->GetNtrack();
+    Int_t n = instack->GetNtrack();
     if (gDebug) 
     {
-      cout<<"AliGenCocktailAfterBurner::SetTracks("<<stackno<<"). Number of particles is: "<<N<<"\n";
+      cout<<"AliGenCocktailAfterBurner::SetTracks("<<stackno<<"). Number of particles is: "<<n<<"\n";
     }
     
-    for(Int_t i = 0; i < N; i++)
+    for(Int_t i = 0; i < n; i++)
     {
        
       p = instack->Particle(i);
@@ -340,7 +345,7 @@ void AliGenCocktailAfterBurner::SetTracks(Int_t stackno)
 AliMCProcess AliGenCocktailAfterBurner::IntToMCProcess(Int_t no)
 {
  //Mothod used to convert uniqueID (integer) to AliMCProcess type
-    const AliMCProcess MCprocesses[kMaxMCProcess] = 
+    const AliMCProcess kMCprocesses[kMaxMCProcess] = 
     {
      kPNoProcess, kPMultipleScattering, kPEnergyLoss, kPMagneticFieldL, 
      kPDecay, kPPair, kPCompton, kPPhotoelectric, kPBrem, kPDeltaRay,
@@ -352,10 +357,9 @@ AliMCProcess AliGenCocktailAfterBurner::IntToMCProcess(Int_t no)
     
     for (Int_t i = 0;i<kMaxMCProcess;i++)
     {
-      if (MCprocesses[i] == no)
+      if (kMCprocesses[i] == no)
         {
-          //if (debug) cout<<"IntToMCProcess("<<no<<") returned AliMCProcess Named \""<<AliMCProcessName[MCprocesses[i]]<<"\""<<endl;
-          return MCprocesses[i];
+          return kMCprocesses[i];
         }
     } 
     return kPNoProcess;
index 6817fbb4ee37cb99c9b54337193ddd9a1de17cde..cb06d3f6eeff9a4db2b5cacb685e7cd61ef040d5 100644 (file)
@@ -7,9 +7,8 @@
 
 // Container class for AliGenerator through recursion.
 // (Container is itself an AliGenerator)
-// Author: andreas.morsch@cern.ch 
+// Author: piotr.skowronski@cern.ch 
 //
-#include "AliGenCocktailAfterBurner.h"
 #include "AliGenCocktail.h"
 #include "AliRun.h"
 
@@ -18,31 +17,34 @@ class AliStack;
 
 class AliGenCocktailAfterBurner : public  AliGenCocktail
 {
+//container class for other generators
+//extends AliGenCocktail functionality
+//with possiblity of adding after-burners
+
  public:
     AliGenCocktailAfterBurner();
-//    AliGenCocktailAfterBurner(const AliGenCocktailAfterBurner &cocktail){}
-     
+    AliGenCocktailAfterBurner(const AliGenCocktailAfterBurner& in);
     virtual ~AliGenCocktailAfterBurner();
-    virtual void Init();
-    virtual void Generate();
-    virtual void SetTracks(Int_t stackno);
+    AliGenCocktailAfterBurner & operator=(const AliGenCocktailAfterBurner & rhs);
+    
+    virtual void  Init();
+    virtual void  Generate();
+    virtual void  SetTracks(Int_t stackno);
     //
     // Add a new generator to the list
-    virtual void AddAfterBurner
+    virtual void  AddAfterBurner
        (AliGenerator *Generator, char* Name, Float_t RateExp );
-    AliGenCocktailAfterBurner & operator=(const AliGenCocktailAfterBurner & rhs);
     
-    AliStack* GetStack(Int_t n);
-    AliStack* GetActiveStack() {return fActiveStack;}
+    AliStack*     GetStack(Int_t n) const;
+    AliStack*     GetActiveStack() const{return fActiveStack;}
     
-    AliGenerator* GetCurrentGenerator();
+    AliGenerator* GetCurrentGenerator() const;
     virtual void  SetActiveEventNumber(Int_t actev);
-    Int_t GetActiveEventNumber() {return fActiveEvent;}
-    virtual Int_t GetNumberOfEvents() {return gAlice->GetEventsPerRun() + fNBgEvents;}
+    Int_t         GetActiveEventNumber() const {return fActiveEvent;}
+    virtual Int_t GetNumberOfEvents() const {return gAlice->GetEventsPerRun() + fNBgEvents;}
+    void          SetNBgEvents(Int_t nbg=0){fNBgEvents = nbg;}
 
     static AliMCProcess IntToMCProcess(Int_t no);
-    void SetNBgEvents(Int_t nbg=0){fNBgEvents = nbg;}
-
 
  protected:
     Int_t fNAfterBurners;       // Number of afterburners  
@@ -62,14 +64,17 @@ class AliGenCocktailAfterBurner : public  AliGenCocktail
                               //are addressed to this event
     
     AliGenerator *fCurrentGenerator;      // Current event generator 
-    Int_t fNBgEvents;
-    
+    Int_t fNBgEvents;                     //Nuber of backgrouns events 
+                                          //(events that are generated only temporarly)
+                                          //needed by some afterburners that works better with higher statistics 
+                                          //this generates such a artificial one
+ private:   
     ClassDef(AliGenCocktailAfterBurner,2) // Particle cocktail generator a la SHAKER
                                           //background events added
 };
 
 inline  AliGenerator*  
-    AliGenCocktailAfterBurner::GetCurrentGenerator()
+    AliGenCocktailAfterBurner::GetCurrentGenerator() const
 {
   return fCurrentGenerator;
 }
index 5eb97e9b4a582850fc61fca18b0e6f0e012eb987..fc4dfefe4d78661030a72134dc7a01117a442d66 100644 (file)
 #include "AliGenHBTprocessor.h"
 #include "TROOT.h"
 #include <iostream.h>
-
+#include <TFile.h>
+#include <TTree.h>
 #include "AliRun.h"
 #include "AliStack.h"
 #include "TParticle.h"
+#include "THBTprocessor.h"
 #include "AliGenCocktailAfterBurner.h"
 
 
@@ -71,13 +73,20 @@ ClassImp(AliGenHBTprocessor)
 
 AliGenCocktailAfterBurner*  GetGenerator();
 /*******************************************************************/
+AliGenHBTprocessor::AliGenHBTprocessor(const AliGenHBTprocessor& in)
+{
+//copy contructor
+ AliGenHBTprocessor::AliGenHBTprocessor();
+}
 
 AliGenHBTprocessor::AliGenHBTprocessor() : AliGenerator() 
 {
   //
   // Standard constructor
   // Sets default veues of all parameters
-  fHbtPStatCodes = 0;
+  fHbtPStatCodes = 0x0;
+  fHBTprocessor = 0x0;
+
   SetName("AliGenHBTprocessor");
   SetTitle("AliGenHBTprocessor");
   
@@ -172,7 +181,8 @@ void AliGenHBTprocessor::InitStatusCodes()
 /*******************************************************************/
 
 void AliGenHBTprocessor::CleanStatusCodes()
-{//Cleans up status codes
+{
+ //Cleans up status codes
   if (fHbtPStatCodes)
   {
     for (Int_t i =0; i<GetGenerator()->GetNumberOfEvents(); i++)
@@ -202,7 +212,7 @@ void AliGenHBTprocessor::Init()
          thbtp->SetPIDs(IdFromPDG(fPid[0]) ,0);
        thbtp->SetNPIDtypes(1);
        
-       if (fSwitch_type !=1)
+       if (fSwitchType !=1)
           Warning("AliGenHBTprocessor::Init","\nThere is only one particle type set,\n\
                    and Switch_Type differnt then 1,\n which does not make sense.\n\
                    Setting it to 1.\n");
@@ -213,14 +223,14 @@ void AliGenHBTprocessor::Init()
     {
        thbtp->SetPIDs(IdFromPDG(fPid[0]) ,IdFromPDG(fPid[1]));
        SetNPIDtypes(2);
-       thbtp->SetSwitchType(fSwitch_type); 
+       thbtp->SetSwitchType(fSwitchType); 
     }
    
    thbtp->SetMaxIterations(fMaxit);
    thbtp->SetDelChi(fDelchi);
    thbtp->SetIRand(fIrand);
    thbtp->SetLambda(fLambda);
-   thbtp->SetR1d(fR_1d);
+   thbtp->SetR1d(fR1d);
    thbtp->SetRSide(fRside);
    thbtp->SetROut(fRout);
    thbtp->SetRLong(fRlong);
@@ -228,33 +238,33 @@ void AliGenHBTprocessor::Init()
    thbtp->SetRParallel(fRparallel);
    thbtp->SetR0(fR0);
    thbtp->SetQ0(fQ0);
-   thbtp->SetSwitch1D(fSwitch_1d);
-   thbtp->SetSwitch3D(fSwitch_3d);
-   thbtp->SetSwitchType(fSwitch_type);
-   thbtp->SetSwitchCoherence(fSwitch_coherence);
-   thbtp->SetSwitchCoulomb(fSwitch_coulomb);
-   thbtp->SetSwitchFermiBose(fSwitch_fermi_bose);
+   thbtp->SetSwitch1D(fSwitch1d);
+   thbtp->SetSwitch3D(fSwitch3d);
+   thbtp->SetSwitchType(fSwitchType);
+   thbtp->SetSwitchCoherence(fSwitchCoherence);
+   thbtp->SetSwitchCoulomb(fSwitchCoulomb);
+   thbtp->SetSwitchFermiBose(fSwitchFermiBose);
    thbtp->SetPtRange(fPtMin,fPtMax);
-   thbtp->SetPxRange(fPx_min,fPx_max);
-   thbtp->SetPyRange(fPy_min,fPy_max);
-   thbtp->SetPzRange(fPz_min,fPz_max);
+   thbtp->SetPxRange(fPxMin,fPxMax);
+   thbtp->SetPyRange(fPyMin,fPyMax);
+   thbtp->SetPzRange(fPzMin,fPzMax);
    thbtp->SetPhiRange(fPhiMin*180./TMath::Pi(),fPhiMax*180./TMath::Pi());
-   thbtp->SetEtaRange(fEta_min,fEta_max);
-   thbtp->SetNPtBins(fN_pt_bins);
-   thbtp->SetNPhiBins(fN_phi_bins);
-   thbtp->SetNEtaBins(fN_eta_bins);
-   thbtp->SetNPxBins(fN_px_bins);
-   thbtp->SetNPyBins(fN_py_bins);
-   thbtp->SetNPzBins(fN_pz_bins);
-   thbtp->SetNBins1DFineMesh(fN_1d_fine);
-   thbtp->SetBinSize1DFineMesh(fBinsize_1d_fine);
-   thbtp->SetNBins1DCoarseMesh(fN_1d_coarse);
-   thbtp->SetBinSize1DCoarseMesh(fBinsize_1d_coarse);
-   thbtp->SetNBins3DFineMesh(fN_3d_fine);
-   thbtp->SetBinSize3DFineMesh(fBinsize_3d_fine);
-   thbtp->SetNBins3DCoarseMesh(fN_3d_coarse);
-   thbtp->SetBinSize3DCoarseMesh(fBinsize_3d_coarse);
-   thbtp->SetNBins3DFineProjectMesh(fN_3d_fine_project);
+   thbtp->SetEtaRange(fEtaMin,fEtaMax);
+   thbtp->SetNPtBins(fNPtBins);
+   thbtp->SetNPhiBins(fNPhiBins);
+   thbtp->SetNEtaBins(fNEtaBins);
+   thbtp->SetNPxBins(fNPxBins);
+   thbtp->SetNPyBins(fNPyBins);
+   thbtp->SetNPzBins(fNPzBins);
+   thbtp->SetNBins1DFineMesh(fN1dFine);
+   thbtp->SetBinSize1DFineMesh(fBinsize1dFine);
+   thbtp->SetNBins1DCoarseMesh(fN1dCoarse);
+   thbtp->SetBinSize1DCoarseMesh(fBinsize1dCoarse);
+   thbtp->SetNBins3DFineMesh(fN3dFine);
+   thbtp->SetBinSize3DFineMesh(fBinsize3dFine);
+   thbtp->SetNBins3DCoarseMesh(fN3dCoarse);
+   thbtp->SetBinSize3DCoarseMesh(fBinsize3dCoarse);
+   thbtp->SetNBins3DFineProjectMesh(fN3dFineProject);
        
  }
 /*******************************************************************/
@@ -309,16 +319,16 @@ Int_t AliGenHBTprocessor::GetHbtPStatusCode(Int_t part) const
 //returns the status code of the given particle in the active event
 //see SetActiveEvent in the bottom of AliGenHBTprocessor.cxx
 //and in AliCocktailAfterBurner
-  Int_t ActiveEvent = GetGenerator()->GetActiveEventNumber();
-  return fHbtPStatCodes[ActiveEvent][part];
+  Int_t activeEvent = GetGenerator()->GetActiveEventNumber();
+  return fHbtPStatCodes[activeEvent][part];
 }
 
 /*******************************************************************/
 void  AliGenHBTprocessor::SetHbtPStatusCode(Int_t hbtstatcode, Int_t part)
 {
  //Sets the given status code to given particle number (part) in the active event
-  Int_t ActiveEvent = GetGenerator()->GetActiveEventNumber();
-  fHbtPStatCodes[ActiveEvent][part] = hbtstatcode;
+  Int_t activeEvent = GetGenerator()->GetActiveEventNumber();
+  fHbtPStatCodes[activeEvent][part] = hbtstatcode;
 }
 
 /*******************************************************************/
@@ -445,7 +455,7 @@ void AliGenHBTprocessor::SetR1d(Float_t r)
   {
     //default 7.0
     //Sets Spherical source model radius (fm)
-    fR_1d = r;
+    fR1d = r;
     fHBTprocessor->SetR1d(r);
   }
 /*******************************************************************/
@@ -504,7 +514,7 @@ void AliGenHBTprocessor::SetQ0(Float_t q0)
   //Sets Q0                = NA35 Coulomb parameter for finite source size in (GeV/c)
   //                         if fSwitchCoulomb = 2
   //                       = Spherical Coulomb source radius in (fm) 
-  //                         if switch_coulomb = 3, used to interpolate the
+  //                         if switchCoulomb = 3, used to interpolate the
   //                         input Pratt/Cramer discrete Coulomb source
   //                         radii tables.
     fQ0 = q0;
@@ -515,25 +525,25 @@ void AliGenHBTprocessor::SetQ0(Float_t q0)
 void AliGenHBTprocessor::SetSwitch1D(Int_t s1d) 
   {
 //default s1d = 3
-// Sets fSwitch_1d   
+// Sets fSwitch1d   
 //                          = 0 to not compute the 1D two-body //orrelations.
 //                          = 1 to compute this using Q-invariant
 //                          = 2 to compute this using Q-total
 //                          = 3 to compute this using Q-3-ve//tor
 
-    fSwitch_1d = s1d;
+    fSwitch1d = s1d;
     fHBTprocessor->SetSwitch1D(s1d);
   }
 /*******************************************************************/
 void AliGenHBTprocessor::SetSwitch3D(Int_t s3d) 
   {
 //default s3d = 0
-// Sets fSwitch_3d
+// Sets fSwitch3d
 //                         = 0 to not compute the 3D two-body correlations.
 //                         = 1 to compute this using the side-out-long form
 //                         = 2 to compute this using the Yanno-Koonin-Pogoredskij form.   
      
-    fSwitch_3d = s3d;
+    fSwitch3d = s3d;
     fHBTprocessor->SetSwitch3D(s3d);
   }
 /*******************************************************************/
@@ -546,40 +556,40 @@ void AliGenHBTprocessor::SetSwitchType(Int_t st)
 //See SetPIDs and Init
 //If only one particle type is set, unly==1 makes sens
   
-    fSwitch_type = st;
+    fSwitchType = st;
     fHBTprocessor->SetSwitchType(st);
   }
 /*******************************************************************/
 void AliGenHBTprocessor::SetSwitchCoherence(Int_t sc)
   {
 // default  sc = 0
-//        switch_coherence  = 0 for purely incoherent source (but can have
+//        switchCoherence  = 0 for purely incoherent source (but can have
 //                              lambda < 1.0)
 //                          = 1 for mixed incoherent and coherent source
   
-    fSwitch_coherence = sc;
+    fSwitchCoherence = sc;
     fHBTprocessor->SetSwitchCoherence(sc);
   }
 /*******************************************************************/
 void AliGenHBTprocessor::SetSwitchCoulomb(Int_t scol) 
   {
 //default scol = 2
-//        switch_coulomb    = 0 no Coulomb correction
+//        switchCoulomb    = 0 no Coulomb correction
 //                          = 1 Point source Gamow correction only
 //                          = 2 NA35 finite source size correction
 //                          = 3 Pratt/Cramer finite source size correction;
 //                              interpolated from input tables.
-    fSwitch_coulomb =scol;
+    fSwitchCoulomb =scol;
     fHBTprocessor->SetSwitchCoulomb(scol);
   }
 /*******************************************************************/
 void AliGenHBTprocessor::SetSwitchFermiBose(Int_t sfb)
   {
 //default sfb = 1
-//        switch_fermi_bose =  1 Boson pairs
+//        switchFermiBose =  1 Boson pairs
 //                          = -1 Fermion pairs
 
-    fSwitch_fermi_bose = sfb;
+    fSwitchFermiBose = sfb;
     fHBTprocessor->SetSwitchFermiBose(sfb);
   }
 /*******************************************************************/
@@ -596,8 +606,8 @@ void AliGenHBTprocessor::SetPxRange(Float_t pxmin, Float_t pxmax)
  {
 //default pxmin = -1.0, pxmax = 1.0
 //Sets Px range 
-  fPx_min =pxmin;
-  fPx_max =pxmax;
+  fPxMin =pxmin;
+  fPxMax =pxmax;
   fHBTprocessor->SetPxRange(pxmin,pxmax);
  }
 /*******************************************************************/
@@ -605,8 +615,8 @@ void AliGenHBTprocessor::SetPyRange(Float_t pymin, Float_t pymax)
  {
 //default  pymin = -1.0, pymax = 1.0
 //Sets Py range 
-  fPy_min =pymin;
-  fPy_max =pymax;
+  fPyMin =pymin;
+  fPyMax =pymax;
    fHBTprocessor->SetPyRange(pymin,pymax);
  }
 /*******************************************************************/
@@ -614,8 +624,8 @@ void AliGenHBTprocessor::SetPzRange(Float_t pzmin, Float_t pzmax)
  {
 //default pzmin = -3.6, pzmax = 3.6
 //Sets Py range
-   fPz_min =pzmin;
-   fPz_max =pzmax; 
+   fPzMin =pzmin;
+   fPzMax =pzmax; 
    fHBTprocessor->SetPzRange(pzmin,pzmax);
  }
 void AliGenHBTprocessor::SetMomentumRange(Float_t pmin, Float_t pmax)
@@ -639,16 +649,16 @@ void AliGenHBTprocessor::SetEtaRange(Float_t etamin, Float_t etamax)
  {
 //default etamin = -1.5, etamax = 1.5
 //Sets \\Eta range   
-   fEta_min= etamin;
-   fEta_max =etamax;
+   fEtaMin= etamin;
+   fEtaMax =etamax;
    fHBTprocessor->SetEtaRange(etamin,etamax);
    
    //set the azimothal angle range in the AliGeneraor - 
    //to keep coherency between azimuthal angle and pseudorapidity
    //DO NOT CALL this->SetThetaRange, because it calls this method (where we are) 
    //which must cause INFINITE LOOP
-   AliGenerator::SetThetaRange(RadiansToDegrees(EtaToTheta(fEta_min)), 
-                               RadiansToDegrees(EtaToTheta(fEta_max)));
+   AliGenerator::SetThetaRange(RadiansToDegrees(EtaToTheta(fEtaMin)), 
+                               RadiansToDegrees(EtaToTheta(fEtaMax)));
    
  }
 /*******************************************************************/
@@ -670,7 +680,7 @@ void AliGenHBTprocessor::SetNPtBins(Int_t nptbin)
  {
   //default nptbin = 50
   //set number of Pt bins  
-   fN_pt_bins= nptbin; 
+   fNPtBins= nptbin; 
    fHBTprocessor->SetNPtBins(nptbin);
  }
 /*******************************************************************/
@@ -678,7 +688,7 @@ void AliGenHBTprocessor::SetNPhiBins(Int_t nphibin)
 { 
   //default nphibin = 50
   //set number of Phi bins
-  fN_phi_bins=nphibin;
+  fNPhiBins=nphibin;
   fHBTprocessor->SetNPhiBins(nphibin);
 }
 /*******************************************************************/
@@ -686,7 +696,7 @@ void AliGenHBTprocessor::SetNEtaBins(Int_t netabin)
 {
   //default netabin = 50
   //set number of Eta bins
-  fN_eta_bins = netabin;
+  fNEtaBins = netabin;
   fHBTprocessor->SetNEtaBins(netabin);
 }
 /*******************************************************************/
@@ -694,7 +704,7 @@ void AliGenHBTprocessor::SetNPxBins(Int_t npxbin)
 {
   //default  npxbin = 20
   //set number of Px bins
-  fN_px_bins = npxbin; 
+  fNPxBins = npxbin; 
   fHBTprocessor->SetNPxBins(npxbin);
 }
 /*******************************************************************/
@@ -702,7 +712,7 @@ void AliGenHBTprocessor::SetNPyBins(Int_t npybin)
 {
   //default  npybin = 20
   //set number of Py bins
-  fN_py_bins = npybin;
+  fNPyBins = npybin;
   fHBTprocessor->SetNPyBins(npybin);
 }
 /*******************************************************************/
@@ -710,7 +720,7 @@ void AliGenHBTprocessor::SetNPzBins(Int_t npzbin)
 {
   //default npzbin = 70
   //set number of Pz bins
-  fN_pz_bins = npzbin;
+  fNPzBins = npzbin;
   fHBTprocessor->SetNPzBins(npzbin);
 }
 /*******************************************************************/
@@ -718,7 +728,7 @@ void AliGenHBTprocessor::SetNBins1DFineMesh(Int_t n)
 {
 //default n = 10
 //Sets the number of bins in the 1D mesh
-   fN_1d_fine =n;
+   fN1dFine =n;
    fHBTprocessor->SetNBins1DFineMesh(n);
    
 }
@@ -727,7 +737,7 @@ void AliGenHBTprocessor::SetBinSize1DFineMesh(Float_t x)
 {
 //default x=0.01
 //Sets the bin size in the 1D mesh
-   fBinsize_1d_fine = x;
+   fBinsize1dFine = x;
    fHBTprocessor->SetBinSize1DFineMesh(x);
 }
 /*******************************************************************/
@@ -736,7 +746,7 @@ void AliGenHBTprocessor::SetNBins1DCoarseMesh(Int_t n)
 {
 //default n =2
 //Sets the number of bins in the coarse 1D mesh
-  fN_1d_coarse =n;
+  fN1dCoarse =n;
   fHBTprocessor->SetNBins1DCoarseMesh(n);
 }
 /*******************************************************************/
@@ -744,7 +754,7 @@ void AliGenHBTprocessor::SetBinSize1DCoarseMesh(Float_t x)
 {
 //default x=0.05
 //Sets the bin size in the coarse 1D mesh
-  fBinsize_1d_coarse =x;
+  fBinsize1dCoarse =x;
   fHBTprocessor->SetBinSize1DCoarseMesh(x);
 }
 /*******************************************************************/
@@ -753,7 +763,7 @@ void AliGenHBTprocessor::SetNBins3DFineMesh(Int_t n)
 {
 //default n = 8
 //Sets the number of bins in the 3D mesh
-  fN_3d_fine =n;
+  fN3dFine =n;
   fHBTprocessor->SetNBins3DFineMesh(n);
 }
 /*******************************************************************/
@@ -761,7 +771,7 @@ void AliGenHBTprocessor::SetBinSize3DFineMesh(Float_t x)
 {
 //default x=0.01
 //Sets the bin size in the 3D mesh
-  fBinsize_3d_fine =x;
+  fBinsize3dFine =x;
   fHBTprocessor->SetBinSize3DFineMesh(x);
 }
 /*******************************************************************/
@@ -771,7 +781,7 @@ void AliGenHBTprocessor::SetNBins3DCoarseMesh(Int_t n)
 //default n = 2
 //Sets the number of bins in the coarse 3D mesh
 
-  fN_3d_coarse = n;
+  fN3dCoarse = n;
   fHBTprocessor->SetNBins3DCoarseMesh(n);
 }
 /*******************************************************************/
@@ -779,7 +789,7 @@ void AliGenHBTprocessor::SetBinSize3DCoarseMesh(Float_t x)
 {
 //default x=0.08
 //Sets the bin size in the coarse 3D mesh
-  fBinsize_3d_coarse = x;
+  fBinsize3dCoarse = x;
   fHBTprocessor->SetBinSize3DCoarseMesh(x);
 }
 /*******************************************************************/
@@ -788,7 +798,7 @@ void AliGenHBTprocessor::SetNBins3DFineProjectMesh(Int_t n )
 {
 //default n =3
 //Sets the number of bins in the fine project mesh
-  fN_3d_fine_project = n;
+  fN3dFineProject = n;
   fHBTprocessor->SetNBins3DFineProjectMesh(n);
 }
 /*******************************************************************/
@@ -892,7 +902,7 @@ Double_t AliGenHBTprocessor::ThetaToEta(Double_t arg)
   # define alihbtp_initialize alihbtp_initialize_
   # define alihbtp_setactiveeventnumber alihbtp_setactiveeventnumber_
   # define alihbtp_setparameters alihbtp_setparameters_
-  # define type_of_call
+  # define type_ofCall
 
 #else
   # define hbtpran HBTPRAN
@@ -903,7 +913,7 @@ Double_t AliGenHBTprocessor::ThetaToEta(Double_t arg)
   # define alihbtp_initialize ALIHBTP_INITIALIZE
   # define alihbtp_setactiveeventnumber ALIHBTP_SETACTIVEEVENTNUMBER
   # define alihbtp_setparameters ALIHBTP_SETPARAMETERS
-  # define type_of_call  _stdcall
+  # define type_ofCall  _stdcall
 #endif    
 
 #include "AliGenCocktailAfterBurner.h"
@@ -940,16 +950,16 @@ AliGenCocktailAfterBurner*  GetGenerator()
    TClass* genclass = gen->IsA();//get TClass of the generator we got from galice 
    //use casting implemented in TClass
    //cast gen to cabclass
-   AliGenCocktailAfterBurner* CAB=(AliGenCocktailAfterBurner*)genclass->DynamicCast(cabclass,gen);
+   AliGenCocktailAfterBurner* cab=(AliGenCocktailAfterBurner*)genclass->DynamicCast(cabclass,gen);
                                                                         
-   if (CAB == 0x0)//if generator that we got is not AliGenCocktailAfterBurner or its descendant we get null
+   if (cab == 0x0)//if generator that we got is not AliGenCocktailAfterBurner or its descendant we get null
    {              //then quit with error
       gAlice->Fatal("AliGenHBTprocessor.cxx: GetGenerator()",
                     "\nThe main Generator is not a AliGenCocktailAfterBurner, exiting\n");
       return 0x0;
    }
    //   cout<<endl<<"Got generator"<<endl;
-   return CAB;
+   return cab;
    
  }
 /*******************************************************************/
@@ -981,19 +991,19 @@ AliGenHBTprocessor* GetAliGenHBTprocessor()
 }
 
 /*******************************************************************/
-extern "C" void type_of_call alihbtp_setparameters()
+extern "C" void type_ofCall alihbtp_setparameters()
  {
    //dummy
  }
 
-extern "C" void type_of_call  alihbtp_initialize()
+extern "C" void type_ofCall  alihbtp_initialize()
  {
    //dummy
  }
 
 /*******************************************************************/
 
-extern "C" void type_of_call alihbtp_getnumberevents(Int_t &nev)
+extern "C" void type_ofCall alihbtp_getnumberevents(Int_t &nev)
  {
   //passes number of events to the fortran 
    if(gDebug) cout<<"alihbtp_getnumberevents("<<nev<<") ....";
@@ -1012,7 +1022,7 @@ extern "C" void type_of_call alihbtp_getnumberevents(Int_t &nev)
 
 /*******************************************************************/
 
-extern "C" void type_of_call  alihbtp_setactiveeventnumber(Int_t & nev)
+extern "C" void type_ofCall  alihbtp_setactiveeventnumber(Int_t & nev)
  {
 //sets active event in generator (AliGenCocktailAfterBurner)
 
@@ -1027,7 +1037,7 @@ extern "C" void type_of_call  alihbtp_setactiveeventnumber(Int_t & nev)
  }
 /*******************************************************************/
  
-extern "C" void type_of_call  alihbtp_getnumbertracks(Int_t &ntracks)
+extern "C" void type_ofCall  alihbtp_getnumbertracks(Int_t &ntracks)
  {
 //passes number of particles in active event to the fortran  
    if(gDebug>5) cout<<"alihbtp_getnumbertracks("<<ntracks<<") ....";
@@ -1045,7 +1055,7 @@ extern "C" void type_of_call  alihbtp_getnumbertracks(Int_t &ntracks)
  
 /*******************************************************************/
  
-extern "C" void type_of_call  
+extern "C" void type_ofCall  
    alihbtp_puttrack(Int_t & n,Int_t& flag, Float_t& px, 
                     Float_t& py, Float_t& pz, Int_t& geantpid)
  {
@@ -1080,8 +1090,8 @@ extern "C" void type_of_call
    
    
    Float_t m = track->GetMass();
-   Float_t E = TMath::Sqrt(m*m+px*px+py*py+pz*pz);
-   track->SetMomentum(px,py,pz,E);
+   Float_t e = TMath::Sqrt(m*m+px*px+py*py+pz*pz);
+   track->SetMomentum(px,py,pz,e);
    
    g->SetHbtPStatusCode(flag,n-1);
    
@@ -1090,7 +1100,7 @@ extern "C" void type_of_call
 
 /*******************************************************************/
 
-extern "C" void type_of_call  
+extern "C" void type_ofCall  
   alihbtp_gettrack(Int_t & n,Int_t & flag, Float_t & px, 
                    Float_t & py, Float_t & pz, Int_t & geantpid)
   
@@ -1128,7 +1138,7 @@ extern "C" void type_of_call
  }
 
 /*******************************************************************/
-extern "C" Float_t type_of_call hbtpran(Int_t &)
+extern "C" Float_t type_ofCall hbtpran(Int_t &)
 {
 //interface to the random number generator
   return sRandom->Rndm();
index 6a2ae9f73c9f861e195ca05af9cc2b12e58f4058..8f5593c51a217f4f383e0f9c17885fb3dc7fc76b 100644 (file)
@@ -9,27 +9,34 @@
 // Author: Piotr Krzysztof Skowronski <Piotr.Skowronski@cern.ch>
 
 #include "AliGenerator.h"
-#include <TFile.h>
-#include <TTree.h>
 #include <AliPDG.h>
-#include "THBTprocessor.h"
+
+class THBTprocessor;
+class TClonesArray;
 
 enum {kHBTPMaxParticleTypes = 50};
 
-class AliGenHBTprocessor : public AliGenerator { 
+class AliGenHBTprocessor : public AliGenerator 
+{ 
+//Wrapper class for THBTProcessor 
+//which is an wrapper to Fortran 
+//program HBT processor written by Lanny Ray
+//
+//Piotr.Skowronski@cern.ch
 
   public:
     AliGenHBTprocessor();
+    AliGenHBTprocessor(const AliGenHBTprocessor& in);
     virtual ~AliGenHBTprocessor();
 
     virtual void Init();
     virtual void Generate();
     virtual void GetParticles(TClonesArray * particles);
-    Int_t        IdFromPDG(Int_t) const;
-    Int_t        PDGFromId(Int_t) const;
+    Int_t        IdFromPDG(Int_t pdg) const;
+    Int_t        PDGFromId(Int_t id) const;
 
-    Int_t   GetHbtPStatusCode(Int_t part) const; 
-    void    SetHbtPStatusCode(Int_t hbtstatcode, Int_t part);
+    Int_t        GetHbtPStatusCode(Int_t part) const; 
+    void         SetHbtPStatusCode(Int_t hbtstatcode, Int_t part);
 /************* S E T T E R S ******************/  
 
     virtual void SetTrackRejectionFactor(Float_t trf = 1.0);
@@ -39,7 +46,7 @@ class AliGenHBTprocessor : public AliGenerator {
     virtual void SetNPIDtypes(Int_t npidt = 2); //Number ofparticle types to be processed
     virtual void SetDeltap(Float_t deltp = 0.1); //maximum range for random momentum shifts in GeV/c;
                                                  //px,py,pz independent; Default = 0.1 GeV/c.
-    virtual void SetMaxIterations(Int_t maxiter = 50);
+    virtual void SetMaxIterations(Int_t maxiter = 50);//
     virtual void SetDelChi(Float_t dc = 0.1);
     virtual void SetIRand(Int_t irnd = 76564) ;
      
@@ -123,51 +130,50 @@ class AliGenHBTprocessor : public AliGenerator {
       Int_t fNPidTypes;             // # particle ID types to correlate
       Int_t fPid[2];                // Geant particle ID #s, max of 2 types
       Int_t fNevents ;              // # events in input event text file
-      Int_t fSwitch_1d;              // Include 1D correlations
-      Int_t fSwitch_3d;              // Include 3D correlations
-      Int_t fSwitch_type ;           // For like, unlike or both PID pairs
-      Int_t fSwitch_coherence;       // To include incoh/coher mixed source
-      Int_t fSwitch_coulomb;         // Coulomb correction selection options
-      Int_t fSwitch_fermi_bose;      // For fermions or bosons
+      Int_t fSwitch1d;              // Include 1D correlations
+      Int_t fSwitch3d;              // Include 3D correlations
+      Int_t fSwitchType ;           // For like, unlike or both PID pairs
+      Int_t fSwitchCoherence;       // To include incoh/coher mixed source
+      Int_t fSwitchCoulomb;         // Coulomb correction selection options
+      Int_t fSwitchFermiBose;      // For fermions or bosons
 
 //   Numbers of particles and pairs:
 
-      Int_t fN_part_1_trk;           // Total # PID #1 in 'trk', all flags
-      Int_t fN_part_2_trk;           // Total # PID #2 in 'trk', all flags
-      Int_t fN_part_tot_trk;         // Total # all part. in 'trk', all flgs
-      Int_t fN_part_used_1_trk;      // # PID#1, used (flag=0) in 'trk'
-      Int_t fN_part_used_2_trk;      // # PID#2, used (flag=0) in 'trk'
-
-      Int_t fN_part_1_trk2;          // Total # PID #1 in 'trk2', all flags
-      Int_t fN_part_2_trk2;          // Total # PID #2 in 'trk2', all flags
-      Int_t fN_part_tot_trk2;        // Total # all part. in 'trk2', all flgs
-      Int_t fN_part_used_1_trk2;     // # PID#1, used (flag=0) in 'trk2'
-      Int_t fN_part_used_2_trk2;     // # PID#2, used (flag=0) in 'trk2'
-
-      Int_t fN_part_used_1_ref;      // # PID#1, used (flag=0) in Reference
-      Int_t fN_part_used_2_ref;      // # PID#2, used (flag=0) in Reference
-      Int_t fN_part_used_1_inc;      // # PID#1, used (flag=0) in Inclusive 
-      Int_t fN_part_used_2_inc;      // # PID#2, used (flag=0) in Inclusive
-
-      Int_t fNum_pairs_like;         // # like pairs used (flag=0) in fit 
-      Int_t fNum_pairs_unlike;       // # unlike pairs used (flag=0) in fit
-      Int_t fNum_pairs_like_ref;     // # like pairs used (flag=0) in Ref. 
-      Int_t fNum_pairs_unlike_ref;   // # unlike pairs used (flag=0) in Ref. 
-      Int_t fNum_pairs_like_inc;     // # like pairs used (flag=0) in Incl. 
-      Int_t fNum_pairs_unlike_inc;   // # unlike pairs used (flag=0) in Incl. 
+      Int_t fNPart1Trk;           // Total # PID #1 in 'trk', all flags
+      Int_t fNPart2Trk;           // Total # PID #2 in 'trk', all flags
+      Int_t fNPartTotTrk;         // Total # all part. in 'trk', all flgs
+      Int_t fNPartUsed1Trk;      // # PID#1, used (flag=0) in 'trk'
+      Int_t fNPartUsed2Trk;      // # PID#2, used (flag=0) in 'trk'
+
+      Int_t fNPart1Trk2;          // Total # PID #1 in 'trk2', all flags
+      Int_t fNPart2Trk2;          // Total # PID #2 in 'trk2', all flags
+      Int_t fNPartTotTrk2;        // Total # all part. in 'trk2', all flgs
+      Int_t fNPartUsed1Trk2;     // # PID#1, used (flag=0) in 'trk2'
+      Int_t fNPartUsed2Trk2;     // # PID#2, used (flag=0) in 'trk2'
+
+      Int_t fNPartUsed1Ref;      // # PID#1, used (flag=0) in Reference
+      Int_t fNPartUsed2Ref;      // # PID#2, used (flag=0) in Reference
+      Int_t fNPartUsed1Inc;      // # PID#1, used (flag=0) in Inclusive 
+      Int_t fNPartUsed2Inc;      // # PID#2, used (flag=0) in Inclusive
+
+      Int_t fNumPairsLike;         // # like pairs used (flag=0) in fit 
+      Int_t fNumPairsUnlike;       // # unlike pairs used (flag=0) in fit
+      Int_t fNumPairsLikeRef;     // # like pairs used (flag=0) in Ref. 
+      Int_t fNumPairsUnlike_ref;   // # unlike pairs used (flag=0) in Ref. 
+      Int_t fNumPairsLikeInc;     // # like pairs used (flag=0) in Incl. 
+      Int_t fNumPairsUnlike_inc;   // # unlike pairs used (flag=0) in Incl. 
 
 //   Counters:
 
-      Int_t fEvent_line_counter;     // Input event text file line counter
+      Int_t fEventLineCounter;     // Input event text file line counter
       Int_t fMaxit;                  // Max # iterations in track adjustment
       Int_t fIrand;                  // Random # starting seed (Def=12345)      
-      Int_t fFile10_line_counter;    // Output, correlated event text file
 //                                    //    line counter
 
 //   Correlation Model Parameters:
 
       Float_t    fLambda;               // Chaoticity parameter
-      Float_t    fR_1d;                   // Spherical source radius (fm)
+      Float_t    fR1d;                   // Spherical source radius (fm)
       Float_t    fRside;                  // 3D Bertsch-Pratt source 'side' R (fm)
       Float_t    fRout;                   // 3D Bertsch-Pratt source 'out'  R (fm)
       Float_t    fRlong;                  // 3D Bertsch-Pratt source 'long' R (fm)
@@ -184,86 +190,62 @@ class AliGenHBTprocessor : public AliGenerator {
       Float_t    fDelchi;                 // Min% change in Chi-Sq to stop iterat.
 
 
-//   Chi-Square Values:
-
-      Float_t    fChisq_wt_like_1d;          // 1D, Like pairs
-      Float_t    fChisq_wt_unlike_1d;        // 1D, Unlike pairs
-      Float_t    fChisq_wt_like_3d_fine;     // 3D, Like pairs, Fine Mesh
-      Float_t    fChisq_wt_unlike_3d_fine;   // 3D, Unlike pairs, Fine Mesh
-      Float_t    fChisq_wt_like_3d_coarse;   // 3D, Like pairs, Coarse Mesh
-      Float_t    fChisq_wt_unlike_3d_coarse; // 3D, Unlike pairs, Coarse Mesh
-      Float_t    fChisq_wt_hist1_1;          // One-body, particle ID type #1
-      Float_t    fChisq_wt_hist1_2;          // One-body, particle ID type #2
-
 //   Particle Masses:
 
-      Float_t    fMass1, fMass2;           // Particle ID# 1 and 2 masses (GeV)
-
 
   /**********   M E S H  ****************/      
 
 
-      Int_t fN_pt_bins;                  // # one-body pt bins
-      Int_t fN_phi_bins;                 // # one-body phi bins
-      Int_t fN_eta_bins;                 // # one-body eta bins
+      Int_t fNPtBins;                  // # one-body pt bins
+      Int_t fNPhiBins;                 // # one-body phi bins
+      Int_t fNEtaBins;                 // # one-body eta bins
      
-      Int_t fN_1d_fine;                  // # bins for 1D, Fine Mesh
-      Int_t fN_1d_coarse;                // # bins for 1D, Coarse Mesh
-      Int_t fN_1d_total;                 // Total # bins for 1D
-      Int_t fN_3d_fine ;                 // # bins for 3D, Fine Mesh
-      Int_t fN_3d_coarse;                // # bins for 3D, Coarse Mesh
-      Int_t fN_3d_total;                 // Total # bins for 3D
-      Int_t fN_3d_fine_project;          // # 3D fine mesh bins to sum over for
+      Int_t fN1dFine;                  // # bins for 1D, Fine Mesh
+      Int_t fN1dCoarse;                // # bins for 1D, Coarse Mesh
+      Int_t fN1dTotal;                 // Total # bins for 1D
+      Int_t fN3dFine ;                 // # bins for 3D, Fine Mesh
+      Int_t fN3dCoarse;                // # bins for 3D, Coarse Mesh
+      Int_t fN3dTotal;                 // Total # bins for 3D
+      Int_t fN3dFineProject;          // # 3D fine mesh bins to sum over for
 
 //   Momentum Space Sectors for Track Sorting:
 
-      Int_t fN_px_bins;                  // # sector bins in px
-      Int_t fN_py_bins;                  // # sector bins in py
-      Int_t fN_pz_bins;                  // # sector bins in pz
-      Int_t fN_sectors;                  // Total # sectors in 3D momentum space
-
-//   Temporary Momentum Space Sector information storage during trk adjust.
-
-      Int_t fOld_sec_ntrk;               // Old sector # tracks
-      Int_t fOld_sec_flag;               // Old sector flag value
-      Int_t fOld_sec_trkid[MAX_TRK_SAVE];         // Old sector track id array
+      Int_t fNPxBins;                  // # sector bins in px
+      Int_t fNPyBins;                  // # sector bins in py
+      Int_t fNPzBins;                  // # sector bins in pz
+      Int_t fNSectors;                  // Total # sectors in 3D momentum space
 
-      Int_t fNew_sec_ntrk;               // New sector # tracks
-      Int_t fNew_sec_flag;               // New sector flag value
-      Int_t fNew_sec_trkid[MAX_TRK_SAVE];// New sector track id array
-      Int_t fNew_sec_save;               // New sector ID value
-      Int_t fNld_sec_save;               // Old sector ID value
      
-      Float_t    fPt_bin_size ;          // One-body pt bin size in (GeV/c)
+      Float_t    fPtBinSize ;          // One-body pt bin size in (GeV/c)
 
       
-      Float_t    fPhi_bin_size;          // One-body phi bin size in (degrees)
+      Float_t    fPhiBinSize;          // One-body phi bin size in (degrees)
       
-      Float_t    fEta_bin_size ;         // One-body eta bin size
-      Float_t    fEta_min;               // One-body eta min/max
-      Float_t    fEta_max;
+      Float_t    fEtaBinSize ;         // One-body eta bin size
+      Float_t    fEtaMin;               // One-body eta min/max
+      Float_t    fEtaMax;
 //   Two-Body Histograms and Correlation Mesh for 1D and 3D distributions:
 //                                       // projections onto single axis.
 
-      Float_t    fBinsize_1d_fine;       // Bin Size - 1D, Fine Mesh in (GeV/c)
-      Float_t    fBinsize_1d_coarse;     // Bin Size - 1D, Coarse Mesh in (GeV/c)
-      Float_t    fQmid_1d;               // q (GeV/c) at fine-coarse mesh boundary
-      Float_t    fQmax_1d;               // Max q (GeV/c) for 1D distributions
-      Float_t    fBinsize_3d_fine;       // Bin Size - 3D, Fine Mesh in (GeV/c)
-      Float_t    fBinsize_3d_coarse;     // Bin Size - 3D, Coarse Mesh in (GeV/c)
-      Float_t    fQmid_3d;               // q (GeV/c) at fine-coarse mesh boundary
-      Float_t    fQmax_3d;               // Max q (GeV/c) for 3D distributions
-
-      Float_t    fPx_min;                // Sector range in px in GeV/c
-      Float_t    fPx_max;                //--//--
+      Float_t    fBinsize1dFine;       // Bin Size - 1D, Fine Mesh in (GeV/c)
+      Float_t    fBinsize1dCoarse;     // Bin Size - 1D, Coarse Mesh in (GeV/c)
+      Float_t    fQmid1d;               // q (GeV/c) at fine-coarse mesh boundary
+      Float_t    fQmax1d;               // Max q (GeV/c) for 1D distributions
+      Float_t    fBinsize3dFine;       // Bin Size - 3D, Fine Mesh in (GeV/c)
+      Float_t    fBinsize3dCoarse;     // Bin Size - 3D, Coarse Mesh in (GeV/c)
+      Float_t    fQmid3d;               // q (GeV/c) at fine-coarse mesh boundary
+      Float_t    fQmax3d;               // Max q (GeV/c) for 3D distributions
+
+      Float_t    fPxMin;                // Sector range in px in GeV/c
+      Float_t    fPxMax;                //--//--
       Float_t    fDelpx;                 // Mom. space sector cell size - px(GeV/c)     
       
-      Float_t    fPy_min;                // Sector range in py in GeV/c 
-      Float_t    fPy_max;                // --//--
+      Float_t    fPyMin;                // Sector range in py in GeV/c 
+      Float_t    fPyMax;                // --//--
       Float_t    fDelpy;                 // Mom. space sector cell size - py(GeV/c)     
 
-      Float_t    fPz_min;                // Sector range in pz in GeV/c min
-      Float_t    fPz_max;                // Sector range in pz in GeV/c max
+      Float_t    fPzMin;                // Sector range in pz in GeV/c min
+      Float_t    fPzMax;                // Sector range in pz in GeV/c max
       Float_t    fDelpz;                 // Mom. space sector cell size - pz(GeV/c)