New files needed by the HBT processor (P.Skowronski)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 Sep 2001 15:59:08 +0000 (15:59 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 27 Sep 2001 15:59:08 +0000 (15:59 +0000)
EVGEN/AliGenCocktailAfterBurner.cxx
EVGEN/AliGenCocktailAfterBurner.h
EVGEN/AliGenHBTprocessor.cxx [new file with mode: 0644]
EVGEN/AliGenHBTprocessor.h [new file with mode: 0644]
EVGEN/EVGENLinkDef.h
EVGEN/Makefile

index b7eb9bb..abf0d6c 100644 (file)
 // The class provides also iterator functionality.  
 // Author: andreas.morsch@cern.ch and piotr.skowronski@cern.ch
 //
-
+// 24.09.2001  Piotr Skowronski
+//             debug -> gDebug,
+//             fNEvents replaced with gAlice->GetEventsPerRun()
+//
 #include "AliGenCocktailAfterBurner.h"
 #include "AliGenCocktailEntry.h"
-#include "AliRun.h"
+
 #include "AliStack.h"
 #include <TObjArray.h>
 #include <TList.h>
 #include <TParticle.h>
 #include <iostream.h>
 
-static const Bool_t debug = kFALSE;
+
 ClassImp(AliGenCocktailAfterBurner)
+/*********************************************************************/ 
+/*********************************************************************/ 
 
 AliGenCocktailAfterBurner::AliGenCocktailAfterBurner()
 {
 // Constructor
-    if (debug) 
+    if (gDebug > 0) 
        cout<<"AliGenCocktailAfterBurner::AliGenCocktailAfterBurner()"<<endl;
     SetName("AliGenCocktailAfterBurner");
     SetTitle("AliGenCocktailAfterBurner");
@@ -51,14 +56,22 @@ AliGenCocktailAfterBurner::AliGenCocktailAfterBurner()
     
     fActiveEvent = -1;  
 }
-
+/*********************************************************************/ 
+/*********************************************************************/ 
 
 AliGenCocktailAfterBurner::~AliGenCocktailAfterBurner()
   {
-    fInternalStacks->SetOwner();
-    delete fInternalStacks;
-    delete fAfterBurnerEntries;
+//destructor
+
+    if (fInternalStacks) //delete stacks
+     { 
+       fInternalStacks->SetOwner();
+       delete fInternalStacks;
+    }
+    if (fAfterBurnerEntries) delete fAfterBurnerEntries; //delete entries
   }
+/*********************************************************************/ 
+/*********************************************************************/ 
 
 void AliGenCocktailAfterBurner::
 AddAfterBurner(AliGenerator *AfterBurner, char* Name, Float_t RateExp)
@@ -66,7 +79,7 @@ AddAfterBurner(AliGenerator *AfterBurner, char* Name, Float_t RateExp)
 //
 //  Forward parameters to the new AfterBurner
     
-    if (debug)cout<<"AliGenCocktailAfterBurner::AddAfterBurner  Named "<<Name<<endl;
+    if (gDebug>0)cout<<"AliGenCocktailAfterBurner::AddAfterBurner  Named "<<Name<<endl;
 
     if(TestBit(kPtRange)) 
        AfterBurner->SetPtRange(fPtMin,fPtMax);
@@ -92,16 +105,18 @@ AddAfterBurner(AliGenerator *AfterBurner, char* Name, Float_t RateExp)
     fAfterBurnerEntries->Add(entry);
     fNAfterBurners++;
 //
-    SetNumberOfEvents(gAlice->GetEventsPerRun());
     
 }
+/*********************************************************************/ 
+/*********************************************************************/ 
 
 void AliGenCocktailAfterBurner::Init()
 {
 // Initialisation
+    fGenerationDone = kFALSE;
     this->AliGenCocktail::Init(); 
     
-    if (debug) cout<<"AliGenCocktailAfterBurner::Init"<<endl;
+    if (gDebug>0) cout<<"AliGenCocktailAfterBurner::Init"<<endl;
     TIter next(fAfterBurnerEntries);
     AliGenCocktailEntry *entry;
     //
@@ -110,141 +125,167 @@ void AliGenCocktailAfterBurner::Init()
        entry->Generator()->Init();
     }  
 }
+/*********************************************************************/ 
+/*********************************************************************/ 
 
 void AliGenCocktailAfterBurner::Generate()
 {
 //
-// Generate event 
-    if (debug)cout<<"#####################################"<<endl
-                  <<"#AliGenCocktailAfterBurner::Generate#"
-                 <<endl<<"#####################################"<<endl;
+// Generate event
+//  Firsts runs each generator for all events
+//  than after burners ones for each event
+//
+//  It generates and processes all events during
+//  first call only.
+//  In next calls it just returns already generated 
+//  and processed events to the gAlice
+
+    if (gDebug>0)
+      cout<<"#####################################"<<endl
+          <<"#AliGenCocktailAfterBurner::Generate#"<<endl
+          <<"#####################################"<<endl;
     
     Int_t i; //iterator
     AliStack * stack;
+    
     if (fGenerationDone)
-    { 
-       SetTracks(++fCurrentEvent);
-       cout<<"Returning event "<<fCurrentEvent<<endl;
-       return;  
+    {//if generation is done (in first call) 
+     //just copy particles from the stack to the gAlice
+      SetTracks(++fCurrentEvent);
+      cout<<"Returning event "<<fCurrentEvent<<endl;
+      return;  
     }
     else
-    { 
-       fCurrentEvent=0;
-       fInternalStacks = new TObjArray(fNumberOfEvents); //Create array of internal stacks
-       for(i=0;i<fNumberOfEvents;i++) 
-       {       
-           stack = new AliStack(10000);
-           stack->Reset();
-           fInternalStacks->Add(stack);
-       }
+    { //Here we are in the first call of the method
+      fCurrentEvent=0;
+      Int_t numberOfEvents = gAlice->GetEventsPerRun();
+      //Create stacks
+      fInternalStacks = new TObjArray(numberOfEvents); //Create array of internal stacks
+      for(i=0;i<numberOfEvents;i++) 
+       {       
+        stack = new AliStack(10000);
+        stack->Reset();
+        fInternalStacks->Add(stack);
+       }
 /*********************************************************************/ 
-       TIter next(fEntries);
-       AliGenCocktailEntry *entry;
-       AliGenCocktailEntry *e1;
-       AliGenCocktailEntry *e2;
-       TObjArray *partArray;
-       //
-       // Loop over generators and generate events
-       Int_t igen=0;
-       while((entry = (AliGenCocktailEntry*)next())) 
-       {
-           igen++;
-           cout<<"Generator number "<<igen<<endl;
-           /***********************************************/
+      TIter next(fEntries);
+      AliGenCocktailEntry *entry;
+      AliGenCocktailEntry *e1;
+      AliGenCocktailEntry *e2;
+      TObjArray *partArray;
+  //
+  // Loop over generators and generate events
+      Int_t igen=0;
+      while((entry = (AliGenCocktailEntry*)next())) 
+      {
+        igen++;
+        cout<<"Generator "<<igen<<"  : "<<entry->GetName()<<endl;
+/***********************************************/
 //First generator for all evenets, than second for all events, etc...
-           for(i=0;i<fNumberOfEvents;i++) 
-           {  
-               
-               cout<<"                  EVENT "<<i<<endl;
-               stack = GetStack(i);
-               partArray = stack->Particles();
-               fCurrentGenerator = entry->Generator();
-               fCurrentGenerator->SetStack(stack);
-               
-               if (igen ==1) 
-               {
-                   entry->SetFirst(0);
-               } 
-               else 
-               {
-                   entry->SetFirst((partArray->GetEntriesFast())+1);
-               }
-               fCurrentGenerator->Generate();
-               entry->SetLast(partArray->GetEntriesFast());
-           }
-           /***********************************************/
-       }
-       next.Reset();
-       while((entry = (AliGenCocktailEntry*)next())) 
-       {
-           entry->PrintInfo();
-       }
-       for ( entry=FirstGenerator();entry;entry=NextGenerator() ) 
-       {
-           entry->PrintInfo();
-       }
-       
-       for (FirstGeneratorPair(e1,e2); (e1&&e2); NextGeneratorPair(e1,e2) )
-       {
-           printf("\n -----------------------------");
-           e1->PrintInfo();
-           e2->PrintInfo();
+        for(i=0;i<numberOfEvents;i++) 
+          {  
+            cout<<"                  EVENT "<<i<<endl;
+            stack = GetStack(i);
+            partArray = stack->Particles();
+            fCurrentGenerator = entry->Generator();
+            fCurrentGenerator->SetStack(stack);
+            if (igen ==1) 
+              {
+                entry->SetFirst(0);
+              } 
+            else 
+              {
+                entry->SetFirst((partArray->GetEntriesFast())+1);
+              }
+                fCurrentGenerator->Generate();
+                entry->SetLast(partArray->GetEntriesFast());
+           }
+/***********************************************/
+      }
+      next.Reset();
+      while((entry = (AliGenCocktailEntry*)next())) 
+        {
+          entry->PrintInfo();
+        }
+      for ( entry=FirstGenerator();entry;entry=NextGenerator() ) 
+        {
+          entry->PrintInfo();
+        }
+      for (FirstGeneratorPair(e1,e2); (e1&&e2); NextGeneratorPair(e1,e2) )
+        {
+          printf("\n -----------------------------");
+          e1->PrintInfo();
+          e2->PrintInfo();
         }
        
-       /***********************************************/
-       /*******After Burners Processing****************/
-       /***********************************************/
-       TIter nextAfterBurner(fAfterBurnerEntries);
-       AliGenCocktailEntry *afterBurnerEntry;
-       Int_t iab =0;
-       cout<<"\n\nRunning After Burners"<<endl;
-       while((afterBurnerEntry = (AliGenCocktailEntry*)nextAfterBurner()))
-       {
-           cout<<"After Burner number "<<iab++<<endl;
-           fCurrentGenerator = afterBurnerEntry->Generator();
-           fCurrentGenerator->Generate();
-       }
-       cout<<endl<<"Finished. Processed "<<iab<<" After Burners"<<endl;
        
-       /***********************************************/
-       /***********************************************/
-       /***********************************************/       
+      /***********************************************/
+      /*******After Burners Processing****************/
+      /***********************************************/
+      TIter nextAfterBurner(fAfterBurnerEntries);
+      AliGenCocktailEntry *afterBurnerEntry;
+      Int_t iab =0; //number of current after burner / counter
+      
+      cout<<"\n\nRunning After Burners"<<endl;
+      while((afterBurnerEntry = (AliGenCocktailEntry*)nextAfterBurner()))
+        {
+          cout<<"After Burner "<<iab++<<"  :"<<afterBurnerEntry->GetName()<<endl;
+          fCurrentGenerator = afterBurnerEntry->Generator();
+          fCurrentGenerator->Generate();
+        }
+      cout<<endl<<"Finished. Processed "<<iab<<" After Burners"<<endl;
+
+      /***********************************************/
+      /***********************************************/
+      /***********************************************/       
         
-       fGenerationDone=kTRUE; 
-       SetTracks(0); //copy event 0 to gAlice stack
+      fGenerationDone=kTRUE; 
+      SetTracks(0); //copy event 0 to gAlice stack
        
 /*********************************************************************/
        
     }//else generated
 }
-
+/*********************************************************************/
+/*********************************************************************/ 
 
 AliGenCocktailAfterBurner& AliGenCocktailAfterBurner::operator=(const  AliGenCocktailAfterBurner& rhs)
 {
 // Assignment operator
     return *this;
 }
-
+/*********************************************************************/
+/*********************************************************************/ 
 
 AliStack* AliGenCocktailAfterBurner::GetStack(Int_t n)
 {
-    if( (n<0) || (n>=fNumberOfEvents) )
+//Returns the pointer to the N'th stack (event)
+  if( ( n<0 ) || ( n>=GetNumberOfEvents() ) )
     {
-       Fatal("AliGenCocktailAfterBurner::GetStack","Asked for non existing stack (%d)",n);
-       return 0; 
+      Fatal("AliGenCocktailAfterBurner::GetStack","Asked for non existing stack (%d)",n);
+      return 0; 
     }
-    //PH    return ((AliStack*) ((*fInternalStacks)[n]) );
     return ((AliStack*) fInternalStacks->At(n) );
 }
+/*********************************************************************/ 
+/*********************************************************************/ 
 
 void AliGenCocktailAfterBurner::SetActiveEventNumber(Int_t actev)
 {
+//Set Active Events Number and Active Stack
+//There is only one active event number
+//Made fo convinience of work with AfterBurners (HBT processor)
+
     fActiveEvent = actev;
     fActiveStack = GetStack(actev);
 }
+/*********************************************************************/ 
+/*********************************************************************/ 
 
 void AliGenCocktailAfterBurner::SetTracks(Int_t stackno)
 {
+//Method which copies tracks from given stack to the
+//gAlice's stack
     AliStack* instack = GetStack(stackno);
     Int_t done;
     Int_t parent; 
@@ -257,56 +298,60 @@ void AliGenCocktailAfterBurner::SetTracks(Int_t stackno)
     
     TParticle * p;
     Int_t N = instack->GetNtrack();
-    if (debug) 
+    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++)
     {
        
-       p = instack->Particle(i);
-       done = !p->TestBit(kDoneBit);
-       if (debug) {cout<<i<<"  "<<done<<"  "; fflush(0);}
-       parent = p->GetMother(0);
-       pdg = p->GetPdgCode();
-       px = p->Px();
-       py = p->Py();
-       pz = p->Pz();
-       e  = p->Energy();
-       vx = p->Vx();
-       vy = p->Vy();
-       vz = p->Vz();
-       tof = p->T();
-       p->GetPolarisation(pol);
-       polx = pol.X();
-       poly = pol.Y();
-       polz = pol.Z();
-       mech = AliGenCocktailAfterBurner::IntToMCProcess(p->GetUniqueID());
-       weight = p->GetWeight();
-       
-       gAlice->SetTrack(done, parent, pdg, px, py, pz, e, vx, vy, vz, tof,
-                        polx, poly, polz, mech, ntr, weight);
+      p = instack->Particle(i);
+      done = !p->TestBit(kDoneBit);
+      parent = p->GetMother(0);
+      pdg = p->GetPdgCode();
+      px = p->Px();
+      py = p->Py();
+      pz = p->Pz();
+      e  = p->Energy();
+      vx = p->Vx();
+      vy = p->Vy();
+      vz = p->Vz();
+      tof = p->T();
+      p->GetPolarisation(pol);
+      polx = pol.X();
+      poly = pol.Y();
+      polz = pol.Z();
+      mech = AliGenCocktailAfterBurner::IntToMCProcess(p->GetUniqueID());
+      weight = p->GetWeight();
+
+      gAlice->SetTrack(done, parent, pdg, px, py, pz, e, vx, vy, vz, tof,
+                       polx, poly, polz, mech, ntr, weight);
     }
 }
+/*********************************************************************/ 
+/*********************************************************************/ 
 
 AliMCProcess AliGenCocktailAfterBurner::IntToMCProcess(Int_t no)
 {
+ //Mothod used to convert uniqueID (integer) to AliMCProcess type
     const AliMCProcess MCprocesses[kMaxMCProcess] = 
-    {kPNoProcess, kPMultipleScattering, kPEnergyLoss, kPMagneticFieldL, 
+    {
+     kPNoProcess, kPMultipleScattering, kPEnergyLoss, kPMagneticFieldL, 
      kPDecay, kPPair, kPCompton, kPPhotoelectric, kPBrem, kPDeltaRay,
      kPAnnihilation, kPHadronic, kPNoProcess, kPEvaporation, kPNuclearFission,
      kPNuclearAbsorption, kPPbarAnnihilation, kPNCapture, kPHElastic, 
      kPHInhelastic, kPMuonNuclear, kPTOFlimit,kPPhotoFission, kPNoProcess, 
-     kPRayleigh, kPNoProcess, kPNoProcess, kPNoProcess, kPNull, kPStop};
+     kPRayleigh, kPNoProcess, kPNoProcess, kPNoProcess, kPNull, kPStop
+    };
     
     for (Int_t i = 0;i<kMaxMCProcess;i++)
     {
-       if (MCprocesses[i] == no)
-       {
-           //if (debug) cout<<"IntToMCProcess("<<no<<") returned AliMCProcess Named \""<<AliMCProcessName[MCprocesses[i]]<<"\""<<endl;
-           return MCprocesses[i];
-       }
+      if (MCprocesses[i] == no)
+        {
+          //if (debug) cout<<"IntToMCProcess("<<no<<") returned AliMCProcess Named \""<<AliMCProcessName[MCprocesses[i]]<<"\""<<endl;
+          return MCprocesses[i];
+        }
     } 
     return kPNoProcess;
 }
index 3a0e78d..229a16d 100644 (file)
@@ -11,7 +11,7 @@
 //
 #include "AliGenCocktailAfterBurner.h"
 #include "AliGenCocktail.h"
-
+#include "AliRun.h"
 
 class AliGenCocktailEntry;
 class AliStack;
@@ -38,18 +38,19 @@ class AliGenCocktailAfterBurner : public  AliGenCocktail
     AliGenerator* GetCurrentGenerator();
     virtual void  SetActiveEventNumber(Int_t actev);
     Int_t GetActiveEventNumber() {return fActiveEvent;}
-    virtual void SetNumberOfEvents(Int_t n)   {fNumberOfEvents=n;}
-    virtual Int_t GetNumberOfEvents() {return fNumberOfEvents;}
+    virtual Int_t GetNumberOfEvents() {return gAlice->GetEventsPerRun();}
 
     static AliMCProcess IntToMCProcess(Int_t no);
  protected:
     Int_t fNAfterBurners;       // Number of afterburners  
     TList  *fAfterBurnerEntries;// List of afterburners
-    Bool_t fGenerationDone;
+    Bool_t fGenerationDone;     // flag if generation is already done 
+                                //   during first call of Generate method
+                                //   if true just return event to gAlice
+                                //   
     TObjArray *fInternalStacks; //! List of internal stacks
     Int_t fCurrentEvent;        //  Number of current event/stack
     
-    Int_t fNumberOfEvents;      // Number of events to process
 
     AliStack* fActiveStack;   //! pointer to the current stack
     Int_t fActiveEvent;       //HBT Processor needs more then one event to do correlations
diff --git a/EVGEN/AliGenHBTprocessor.cxx b/EVGEN/AliGenHBTprocessor.cxx
new file mode 100644 (file)
index 0000000..9e43aca
--- /dev/null
@@ -0,0 +1,1070 @@
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+// Implementation of the interface for THBTprocessor
+// Author: Piotr Krzysztof Skowronski <Piotr.Skowronski@cern.ch>
+
+// 27.09.2001 Piotr Skowronski
+// removing of redefinition of defaults velues 
+// in method's implementation. 
+//  
+
+#include "AliGenHBTprocessor.h"
+#include "TROOT.h"
+#include <iostream.h>
+
+#include "AliRun.h"
+#include "AliStack.h"
+#include "TParticle.h"
+#include "AliGenCocktailAfterBurner.h"
+
+
+
+const Int_t AliGenHBTprocessor::fgkHBTPMAXPART = 100000;
+
+ClassImp(AliGenHBTprocessor)
+
+//Wrapper class for "hbt processor" after burner
+//The origibal code is written in fortran by Lanny Ray
+//and is put in the directory $ALICE_ROOT/HBTprocessor
+//Detailed description is on the top of the file hbt_event_processor.f
+//
+//This class can be used ONLY with AliGenCocktailAfterBurner wrapper generator
+//i.e. (in Config.C)
+// ....
+// AliGenCocktailAfterBurner = gener = new AliGenCocktailAfterBurner();
+// gener->SetPhiRange(0, 360); //Set global parameters
+// gener->SetThetaRange(35., 145.); 
+// AliGenHIJINGpara *hijing = new AliGenHIJINGpara(10000); //Add some generator
+// hijing->SetMomentumRange(0, 999);   
+// gener->AddGenerator(hijing,"HIJING PARAMETRIZATION",1); 
+//
+// AliGenHBTprocessor *hbtp = new AliGenHBTprocessor(); //create object
+// hbtp->SetRefControl(2); //set parameters
+// hbtp->SetSwitch1D(1);
+// hbtp->SetR0(6);//fm - radius
+// hbtp->SetLambda(0.7);//chaocity parameter
+// gener->AddAfterBurner(hbtp,"HBT PROCESSOR",1); //add to the main generator
+// 
+// gener->Init();
+//
+//CAUTIONS: 
+//         A)  HBT PROCESSOR NEEDS MORE THAN ONE EVENT TO WORK
+//             AS MORE AS IT BETTER WORKS
+//         B)  IT IS ABLE TO "ADD" CORRELATIONS ONLY UP TO TWO PARTICLE TYPES AT ONES
+
+
+AliGenCocktailAfterBurner*  GetGenerator();
+/*******************************************************************/
+
+AliGenHBTprocessor::AliGenHBTprocessor() : AliGenerator(-1) 
+{
+  //
+  // Standard constructor
+  // Sets default veues of all parameters
+  SetName("AliGenHBTprocessor");
+  SetTitle("AliGenHBTprocessor");
+  
+  sRandom = fRandom;
+  fHBTprocessor = new THBTprocessor();
+
+  fNPDGCodes = 0;
+  DefineParticles();
+
+  SetTrackRejectionFactor();
+  SetRefControl();
+  SetPIDs();
+  SetNPIDtypes();
+  SetDeltap();
+  SetMaxIterations();
+  SetDelChi();
+  SetIRand();
+  SetLambda();
+  SetR1d() ;
+  SetRSide();
+  SetROut() ;
+  SetRLong() ;
+  SetRPerp();
+  SetRParallel();
+  SetR0();
+  SetQ0();
+  SetSwitch1D();
+  SetSwitch3D();
+  SetSwitchType();
+  SetSwitchCoherence();
+  SetSwitchCoulomb();
+  SetSwitchFermiBose();
+  //SetMomentumRange();
+  SetPtRange();
+  SetPxRange();
+  SetPyRange(); 
+  SetPzRange(); 
+  SetPhiRange(); 
+  SetEtaRange();  
+  SetNPtBins();  
+  SetNPhiBins();  
+  SetNEtaBins();
+  SetNPxBins(); 
+  SetNPyBins();
+  SetNPzBins(); 
+  SetNBins1DFineMesh();
+  SetBinSize1DFineMesh();
+  SetNBins1DCoarseMesh();
+  SetBinSize1DCoarseMesh();
+  SetNBins3DFineMesh();
+  SetBinSize3DFineMesh();
+  SetNBins3DCoarseMesh();
+  SetBinSize3DCoarseMesh();
+  SetNBins3DFineProjectMesh();
+}
+
+/*******************************************************************/
+
+
+/*******************************************************************/
+
+AliGenHBTprocessor::~AliGenHBTprocessor()
+{
+//destructor
+  CleanStatusCodes();
+  if (fHBTprocessor) delete fHBTprocessor; //delete generator
+  
+}
+
+/*******************************************************************/
+
+void AliGenHBTprocessor::InitStatusCodes()
+{
+ //creates and inits status codes array to zero
+  AliGenCocktailAfterBurner *cab = GetGenerator();
+
+  if(!cab) Fatal("AliGenHBTprocessor::InitStatusCodes()","Can not find AliGenCocktailAfterBurner generator");
+
+  Int_t nev = cab->GetNumberOfEvents();
+
+  fHbtPStatCodes = new Int_t* [nev];
+  for( Int_t i =0; i<nev;i++)
+  { 
+    Int_t nprim = cab->GetStack(i)->GetNprimary();
+    fHbtPStatCodes[i] = new Int_t[nprim];
+    for (Int_t k =0 ;k<nprim;k++)
+      fHbtPStatCodes[i][k] =0;
+    
+  }
+  
+}
+/*******************************************************************/
+
+void AliGenHBTprocessor::CleanStatusCodes()
+{//Cleans up status codes
+  if (fHbtPStatCodes)
+  {
+    for (Int_t i =0; i<GetGenerator()->GetNumberOfEvents(); i++)
+      delete [] fHbtPStatCodes[i];  
+    delete fHbtPStatCodes;
+    fHbtPStatCodes = 0;
+  }
+
+}
+/*******************************************************************/
+
+void AliGenHBTprocessor::Init()
+  {  
+  //sets up parameters in generator
+   THBTprocessor *thbtp = fHBTprocessor;
+   
+   thbtp->SetTrackRejectionFactor(fTrackRejectionFactor);
+   thbtp->SetRefControl(fReferenceControl);
+   
+   if ((fPid[0] == fPid[1]) || (fPid[0] == 0) || (fPid[1] == 0))
+    {
+       if (fPid[0] == 0)
+         thbtp->SetPIDs(IdFromPDG(fPid[1]) ,0);
+       else
+         thbtp->SetPIDs(IdFromPDG(fPid[0]) ,0);
+       thbtp->SetNPIDtypes(1);
+       
+       if (fSwitch_type !=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");
+                   
+       SetSwitchType(1);
+    }
+   else
+    {
+       thbtp->SetPIDs(IdFromPDG(fPid[0]) ,IdFromPDG(fPid[1]));
+       SetNPIDtypes(2);
+       thbtp->SetSwitchType(fSwitch_type); 
+    }
+   
+   thbtp->SetMaxIterations(fMaxit);
+   thbtp->SetDelChi(fDelchi);
+   thbtp->SetIRand(fIrand);
+   thbtp->SetLambda(fLambda);
+   thbtp->SetR1d(fR_1d);
+   thbtp->SetRSide(fRside);
+   thbtp->SetROut(fRout);
+   thbtp->SetRLong(fRlong);
+   thbtp->SetRPerp(fRperp);
+   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->SetPtRange(fPtMin,fPtMax);
+   thbtp->SetPxRange(fPx_min,fPx_max);
+   thbtp->SetPyRange(fPy_min,fPy_max);
+   thbtp->SetPzRange(fPz_min,fPz_max);
+   thbtp->SetPhiRange(fPhiMin*180/TMath::Pi(),fPhiMax*180/TMath::Pi());
+//   cout<<"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n";
+//   cout<<fPhiMin<<fPhiMax<<endl;
+//   cout<<"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\n";
+   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);
+       
+ }
+/*******************************************************************/
+  
+void AliGenHBTprocessor::Generate()
+ {
+ //starts processig 
+   
+   if (gAlice->GetEventsPerRun() <2)
+    {
+      Fatal("AliGenHBTprocessor::Generate()",
+            "HBT Processor needs more than 1 event to work properly,\
+             but there is only %d set", gAlice->GetEventsPerRun());
+    }
+   
+   InitStatusCodes(); //Init status codes
+   
+   fHBTprocessor->GenerateEvent(); //Generates event
+   
+   CleanStatusCodes(); //Clean Status codes - thet are not needed anymore
+ }
+/*******************************************************************/
+
+
+/*******************************************************************/
+void AliGenHBTprocessor::GetParticles(TClonesArray * particles)
+ {//practically dumm
+   if (!particles)
+    {
+      cout<<"Particles has to be initialized"<<endl;
+      return;
+    } 
+   fHBTprocessor->ImportParticles(particles);
+ }
+
+/*******************************************************************/
+
+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];
+}
+
+/*******************************************************************/
+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;
+}
+
+/*******************************************************************/
+
+void AliGenHBTprocessor::SetTrackRejectionFactor(Float_t trf) //def 1.0
+  {
+   //Sets the Track Rejection Factor
+   //variates in range 0.0 <-> 1.0
+   //Describes the factor of particles rejected from the output.
+   //Used only in case of low muliplicity particles e.g. lambdas.
+   //Processor generates addisional particles and builds the 
+   //correletions on such a statistics.
+   //At the end these particels are left in the event according 
+   //to this factor: 1==all particles are left
+   //                0==all are removed 
+   
+    fTrackRejectionFactor=trf;
+    fHBTprocessor->SetTrackRejectionFactor(trf);
+  }
+/*******************************************************************/
+
+void AliGenHBTprocessor::SetRefControl(Int_t rc) //default 2
+ {
+ //Sets the Refernce Control Switch
+ //switch wether read reference histograms from file =1
+ //              compute from input events =2 - default
+   fReferenceControl=rc;
+   fHBTprocessor->SetRefControl(rc);
+ }
+/*******************************************************************/
+
+void AliGenHBTprocessor::SetPIDs(Int_t pid1,Int_t pid2)
+  {
+   //default pi+ pi-
+   //Sets PDG Codes of particles to be processed, default \\Pi^{+} and \\Pi^{-}
+   //This method accepts PDG codes which is
+   //in opposite to THBBProcessor which accepts GEANT PID
+    if ( (pid1 == 0) && (pid2 == 0) )
+    {
+      Error("AliGenHBTprocessor::SetPIDs","Sensless Particle Types setting: 0 0, Ignoring\n");
+    }
+    
+    fPid[0]=pid1;
+    fPid[1]=pid2;
+    
+    if(pid1 == pid2)
+       {
+        fHBTprocessor->SetPIDs(IdFromPDG(pid1) ,0);
+       SetNPIDtypes(1);
+       SetSwitchType(1);
+       }
+    else
+       { 
+        fHBTprocessor->SetPIDs(IdFromPDG(pid1) ,IdFromPDG(pid2));
+       SetNPIDtypes(2);
+       }
+  }
+/*******************************************************************/
+
+void AliGenHBTprocessor::SetNPIDtypes(Int_t npidt)
+  {
+    //Number ofparticle types to be processed - default 2
+    //see AliGenHBTprocessor::SetPIDs
+    
+    fNPidTypes = npidt;
+    fHBTprocessor->SetNPIDtypes(npidt);
+  }
+/*******************************************************************/
+
+void AliGenHBTprocessor::SetDeltap(Float_t deltp) 
+  {
+  //default = 0.1 GeV
+  //maximum range for random momentum shifts in GeV/c;
+  //px,py,pz independent; Default = 0.1 GeV/c.
+    fDeltap=deltp;
+    fHBTprocessor->SetDeltap(deltp); 
+  }
+/*******************************************************************/
+
+void AliGenHBTprocessor::SetMaxIterations(Int_t maxiter) 
+  { 
+  //maximum # allowed iterations thru all the 
+  //tracks for each event. Default = 50.
+  //If maxit=0, then calculate the correlations 
+  //for the input set of events without doing the
+  //track adjustment procedure.
+    
+    fMaxit=maxiter;
+    fHBTprocessor->SetMaxIterations(maxiter);
+  }
+
+/*******************************************************************/
+void AliGenHBTprocessor::SetDelChi(Float_t dc)
+  {
+    //min % change in total chi-square for which
+    //the track adjustment iterations may stop,
+    //Default = 0.1%.
+    
+    fDelchi=dc;
+    fHBTprocessor->SetDelChi(dc);
+  }
+/*******************************************************************/
+
+void AliGenHBTprocessor::SetIRand(Int_t irnd) 
+  { 
+    //if fact dummy - used only for compatibility
+    //we are using AliRoot built in RNG
+    //dummy in fact since we are using aliroot build-in RNG
+    //Sets renaodom number generator
+    fIrand=irnd;
+    fHBTprocessor->SetIRand(irnd);
+  }
+/*******************************************************************/
+      
+void AliGenHBTprocessor::SetLambda(Float_t lam) 
+  { 
+  //default = 0.6
+  // Sets Chaoticity Parameter
+    fLambda = lam;
+    fHBTprocessor->SetLambda(lam);
+  }
+/*******************************************************************/
+void AliGenHBTprocessor::SetR1d(Float_t r) 
+  {
+    //default 7.0
+    //Sets Spherical source model radius (fm)
+    fR_1d = r;
+    fHBTprocessor->SetR1d(r);
+  }
+/*******************************************************************/
+void AliGenHBTprocessor::SetRSide(Float_t rs) 
+  {
+   //default rs = 6.0
+   //Rside,Rout,Rlong  = Non-spherical Bertsch-Pratt source model (fm)
+   
+    fRside = rs;
+    fHBTprocessor->SetRSide(rs);
+  }
+/*******************************************************************/
+void AliGenHBTprocessor::SetROut(Float_t ro) 
+  {
+    //default ro = 7.0
+    //Rside,Rout,Rlong  = Non-spherical Bertsch-Pratt source model (fm)
+    fRout = ro;
+    fHBTprocessor->SetROut(ro);
+  }
+/*******************************************************************/
+void AliGenHBTprocessor::SetRLong(Float_t rl) 
+  {
+    //default rl = 4.0
+    //Rside,Rout,Rlong  = Non-spherical Bertsch-Pratt source model (fm)
+    fRlong = rl;
+    fHBTprocessor->SetRLong(rl);
+  }
+/*******************************************************************/
+void AliGenHBTprocessor::SetRPerp(Float_t rp) 
+  {
+   //default rp = 6.0
+   //Rperp,Rparallel,R0= Non-spherical Yano-Koonin-Podgoretski source model (fm).
+    fRperp = rp;
+    fHBTprocessor->SetRPerp(rp);
+  }
+/*******************************************************************/
+void AliGenHBTprocessor::SetRParallel(Float_t rprl) 
+  { 
+   //default rprl = 4.0
+   //Rperp,Rparallel,R0= Non-spherical Yano-Koonin-Podgoretski source model (fm).
+    fRparallel = rprl;
+    fHBTprocessor->SetRParallel(rprl);
+  }
+/*******************************************************************/
+void AliGenHBTprocessor::SetR0(Float_t r0) 
+  {
+  //default r0 = 4.0
+  //Rperp,Rparallel,R0= Non-spherical Yano-Koonin-Podgoretski source model (fm).
+    fR0 = r0;
+    fHBTprocessor->SetR0(r0);
+  }
+/*******************************************************************/
+void AliGenHBTprocessor::SetQ0(Float_t q0) 
+  { 
+  //default q0 = 9.0
+  //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
+  //                         input Pratt/Cramer discrete Coulomb source
+  //                         radii tables.
+    fQ0 = q0;
+    fHBTprocessor->SetQ0(q0);
+  }
+
+/*******************************************************************/
+void AliGenHBTprocessor::SetSwitch1D(Int_t s1d) 
+  {
+//default s1d = 3
+// Sets fSwitch_3d
+//                         = 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_1d = s1d;
+    fHBTprocessor->SetSwitch1D(s1d);
+  }
+/*******************************************************************/
+void AliGenHBTprocessor::SetSwitch3D(Int_t s3d) 
+  {
+//default s3d = 0
+// Sets fSwitch_3d   
+//                          = 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_3d = s3d;
+    fHBTprocessor->SetSwitch3D(s3d);
+  }
+/*******************************************************************/
+void AliGenHBTprocessor::SetSwitchType(Int_t st)
+  {
+//default st = 3
+//  Sets  switch_type       = 1 to fit only the like pair correlations
+//                          = 2 to fit only the unlike pair correlations
+//                          = 3 to fit both the like and unlike pair correl.
+//See SetPIDs and Init
+//If only one particle type is set, unly==1 makes sens
+  
+    fSwitch_type = st;
+    fHBTprocessor->SetSwitchType(st);
+  }
+/*******************************************************************/
+void AliGenHBTprocessor::SetSwitchCoherence(Int_t sc)
+  {
+// default  sc = 0
+//        switch_coherence  = 0 for purely incoherent source (but can have
+//                              lambda < 1.0)
+//                          = 1 for mixed incoherent and coherent source
+  
+    fSwitch_coherence = sc;
+    fHBTprocessor->SetSwitchCoherence(sc);
+  }
+/*******************************************************************/
+void AliGenHBTprocessor::SetSwitchCoulomb(Int_t scol) 
+  {
+//default scol = 2
+//        switch_coulomb    = 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;
+    fHBTprocessor->SetSwitchCoulomb(scol);
+  }
+/*******************************************************************/
+void AliGenHBTprocessor::SetSwitchFermiBose(Int_t sfb)
+  {
+//default sfb = 1
+//        switch_fermi_bose =  1 Boson pairs
+//                          = -1 Fermion pairs
+
+    fSwitch_fermi_bose = sfb;
+    fHBTprocessor->SetSwitchFermiBose(sfb);
+  }
+/*******************************************************************/
+void AliGenHBTprocessor::SetPtRange(Float_t ptmin, Float_t ptmax)
+ {
+// default ptmin = 0.1, ptmax = 0.98
+//Sets Pt range (GeV)
+   AliGenerator::SetPtRange(ptmin,ptmax);
+   fHBTprocessor->SetPtRange(ptmin,ptmax);
+ }
+
+/*******************************************************************/
+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;
+  fHBTprocessor->SetPxRange(pxmin,pxmax);
+ }
+/*******************************************************************/
+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;
+   fHBTprocessor->SetPyRange(pymin,pymax);
+ }
+/*******************************************************************/
+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; 
+   fHBTprocessor->SetPzRange(pzmin,pzmax);
+ }
+void AliGenHBTprocessor::SetMomentumRange(Float_t pmin, Float_t pmax)
+ {
+ //default pmin=0, pmax=0
+ //Do not use this method!
+    MayNotUse("AliGenHBTprocessor::SetMomentumRange Method is Dummy");
+ }
+ /*******************************************************************/
+void AliGenHBTprocessor::SetPhiRange(Float_t phimin, Float_t phimax)
+ {
+//
+//Sets \\Phi range  
+  AliGenerator::SetPhiRange(phimin,phimax);
+  
+  fHBTprocessor->SetPhiRange(phimin,phimax);
+ }
+/*******************************************************************/
+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;
+   fHBTprocessor->SetEtaRange(etamin,etamax);
+ }
+/*******************************************************************/
+void AliGenHBTprocessor::SetNPtBins(Int_t nptbin)
+ {
+  //default nptbin = 50
+  //set number of Pt bins  
+   fN_pt_bins= nptbin; 
+   fHBTprocessor->SetNPtBins(nptbin);
+ }
+/*******************************************************************/
+void AliGenHBTprocessor::SetNPhiBins(Int_t nphibin)
+{ 
+  //default nphibin = 50
+  //set number of Phi bins
+  fN_phi_bins=nphibin;
+  fHBTprocessor->SetNPhiBins(nphibin);
+}
+/*******************************************************************/
+void AliGenHBTprocessor::SetNEtaBins(Int_t netabin)
+{
+  //default netabin = 50
+  //set number of Eta bins
+  fN_eta_bins = netabin;
+  fHBTprocessor->SetNEtaBins(netabin);
+}
+/*******************************************************************/
+void AliGenHBTprocessor::SetNPxBins(Int_t npxbin)
+{
+  //default  npxbin = 20
+  //set number of Px bins
+  fN_px_bins = npxbin; 
+  fHBTprocessor->SetNPxBins(npxbin);
+}
+/*******************************************************************/
+void AliGenHBTprocessor::SetNPyBins(Int_t npybin)
+{
+  //default  npybin = 20
+  //set number of Py bins
+  fN_py_bins = npybin;
+  fHBTprocessor->SetNPyBins(npybin);
+}
+/*******************************************************************/
+void AliGenHBTprocessor::SetNPzBins(Int_t npzbin)
+{
+  //default npzbin = 70
+  //set number of Pz bins
+  fN_pz_bins = npzbin;
+  fHBTprocessor->SetNPzBins(npzbin);
+}
+/*******************************************************************/
+void AliGenHBTprocessor::SetNBins1DFineMesh(Int_t n)
+{
+//default n = 10
+//Sets the number of bins in the 1D mesh
+   fN_1d_fine =n;
+   fHBTprocessor->SetNBins1DFineMesh(n);
+   
+}
+/*******************************************************************/
+void AliGenHBTprocessor::SetBinSize1DFineMesh(Float_t x)
+{
+//default x=0.01
+//Sets the bin size in the 1D mesh
+   fBinsize_1d_fine = x;
+   fHBTprocessor->SetBinSize1DFineMesh(x);
+}
+/*******************************************************************/
+      
+void AliGenHBTprocessor::SetNBins1DCoarseMesh(Int_t n)
+{
+//default n =2
+//Sets the number of bins in the coarse 1D mesh
+  fN_1d_coarse =n;
+  fHBTprocessor->SetNBins1DCoarseMesh(n);
+}
+/*******************************************************************/
+void AliGenHBTprocessor::SetBinSize1DCoarseMesh(Float_t x)
+{
+//default x=0.05
+//Sets the bin size in the coarse 1D mesh
+  fBinsize_1d_coarse =x;
+  fHBTprocessor->SetBinSize1DCoarseMesh(x);
+}
+/*******************************************************************/
+      
+void AliGenHBTprocessor::SetNBins3DFineMesh(Int_t n)
+{
+//default n = 8
+//Sets the number of bins in the 3D mesh
+  fN_3d_fine =n;
+  fHBTprocessor->SetNBins3DFineMesh(n);
+}
+/*******************************************************************/
+void AliGenHBTprocessor::SetBinSize3DFineMesh(Float_t x)
+{
+//default x=0.01
+//Sets the bin size in the 3D mesh
+  fBinsize_3d_fine =x;
+  fHBTprocessor->SetBinSize3DFineMesh(x);
+}
+/*******************************************************************/
+      
+void AliGenHBTprocessor::SetNBins3DCoarseMesh(Int_t n)
+{
+//default n = 2
+//Sets the number of bins in the coarse 3D mesh
+
+  fN_3d_coarse = n;
+  fHBTprocessor->SetNBins3DCoarseMesh(n);
+}
+/*******************************************************************/
+void AliGenHBTprocessor::SetBinSize3DCoarseMesh(Float_t x)
+{
+//default x=0.08
+//Sets the bin size in the coarse 3D mesh
+  fBinsize_3d_coarse = x;
+  fHBTprocessor->SetBinSize3DCoarseMesh(x);
+}
+/*******************************************************************/
+      
+void AliGenHBTprocessor::SetNBins3DFineProjectMesh(Int_t n )
+{
+//default n =3
+//Sets the number of bins in the fine project mesh
+  fN_3d_fine_project = n;
+  fHBTprocessor->SetNBins3DFineProjectMesh(n);
+}
+/*******************************************************************/
+
+
+/*******************************************************************/
+
+
+
+
+
+
+void AliGenHBTprocessor::DefineParticles()
+{
+  //
+  // Load standard numbers for GEANT particles and PDG conversion
+  fNPDGCodes = 0; //this is done in the constructor - but in any case ...
+  
+  fPDGCode[fNPDGCodes++]=-99;   //  0 = unused location
+  fPDGCode[fNPDGCodes++]=22;    //  1 = photon
+  fPDGCode[fNPDGCodes++]=-11;   //  2 = positron
+  fPDGCode[fNPDGCodes++]=11;    //  3 = electron
+  fPDGCode[fNPDGCodes++]=12;    //  4 = neutrino e
+  fPDGCode[fNPDGCodes++]=-13;   //  5 = muon +
+  fPDGCode[fNPDGCodes++]=13;    //  6 = muon -
+  fPDGCode[fNPDGCodes++]=111;   //  7 = pi0
+  fPDGCode[fNPDGCodes++]=211;   //  8 = pi+
+  fPDGCode[fNPDGCodes++]=-211;  //  9 = pi-
+  fPDGCode[fNPDGCodes++]=130;   // 10 = Kaon Long
+  fPDGCode[fNPDGCodes++]=321;   // 11 = Kaon +
+  fPDGCode[fNPDGCodes++]=-321;  // 12 = Kaon -
+  fPDGCode[fNPDGCodes++]=2112;  // 13 = Neutron
+  fPDGCode[fNPDGCodes++]=2212;  // 14 = Proton
+  fPDGCode[fNPDGCodes++]=-2212; // 15 = Anti Proton
+  fPDGCode[fNPDGCodes++]=310;   // 16 = Kaon Short
+  fPDGCode[fNPDGCodes++]=221;   // 17 = Eta
+  fPDGCode[fNPDGCodes++]=3122;  // 18 = Lambda
+  fPDGCode[fNPDGCodes++]=3222;  // 19 = Sigma +
+  fPDGCode[fNPDGCodes++]=3212;  // 20 = Sigma 0
+  fPDGCode[fNPDGCodes++]=3112;  // 21 = Sigma -
+  fPDGCode[fNPDGCodes++]=3322;  // 22 = Xi0
+  fPDGCode[fNPDGCodes++]=3312;  // 23 = Xi-
+  fPDGCode[fNPDGCodes++]=3334;  // 24 = Omega-
+  fPDGCode[fNPDGCodes++]=-2112; // 25 = Anti Proton
+  fPDGCode[fNPDGCodes++]=-3122; // 26 = Anti Proton
+  fPDGCode[fNPDGCodes++]=-3222; // 27 = Anti Sigma -
+  fPDGCode[fNPDGCodes++]=-3212; // 28 = Anti Sigma 0
+  fPDGCode[fNPDGCodes++]=-3112; // 29 = Anti Sigma 0
+  fPDGCode[fNPDGCodes++]=-3322; // 30 = Anti Xi 0
+  fPDGCode[fNPDGCodes++]=-3312; // 31 = Anti Xi +
+  fPDGCode[fNPDGCodes++]=-3334; // 32 = Anti Omega +
+}  
+
+/*******************************************************************/
+Int_t AliGenHBTprocessor::IdFromPDG(Int_t pdg) const 
+{
+  //
+  // Return Geant3 code from PDG and pseudo ENDF code
+  //
+  for(Int_t i=0;i<fNPDGCodes;++i)
+    if(pdg==fPDGCode[i]) return i;
+  return -1;
+}
+Int_t AliGenHBTprocessor::PDGFromId(Int_t id) const
+{
+  //
+  // Return PDG code and pseudo ENDF code from Geant3 code
+  //
+  if(id>0 && id<fNPDGCodes) return fPDGCode[id];
+  else return -1;
+}                                  
+/*******************************************************************/
+/******      ROUTINES    USED    FOR     COMMUNUCATION      ********/
+/********************     WITH      FORTRAN     ********************/
+/*******************************************************************/
+
+#ifndef WIN32
+  # define hbtpran hbtpran_  
+  # define alihbtp_puttrack alihbtp_puttrack_
+  # define alihbtp_gettrack alihbtp_gettrack_
+  # define alihbtp_getnumberevents alihbtp_getnumberevents_
+  # define alihbtp_getnumbertracks  alihbtp_getnumbertracks_
+  # define alihbtp_initialize alihbtp_initialize_
+  # define alihbtp_setactiveeventnumber alihbtp_setactiveeventnumber_
+  # define alihbtp_setparameters alihbtp_setparameters_
+  # define type_of_call
+
+#else
+  # define hbtpran HBTPRAN
+  # define alihbtp_puttrack ALIHBTP_PUTTRACK
+  # define alihbtp_gettrack ALIHBTP_GETTRACK
+  # define alihbtp_getnumberevents ALIHBTP_GETNUMBEREVENTS
+  # define alihbtp_getnumbertracks  ALIHBTP_GETNUMBERTRACKS
+  # define alihbtp_initialize ALIHBTP_INITIALIZE
+  # define alihbtp_setactiveeventnumber ALIHBTP_SETACTIVEEVENTNUMBER
+  # define alihbtp_setparameters ALIHBTP_SETPARAMETERS
+  # define type_of_call  _stdcall
+#endif    
+
+#include "AliGenCocktailAfterBurner.h"
+#include <string.h>
+/*******************************************************************/
+
+AliGenCocktailAfterBurner*  GetGenerator()
+ {
+   // This function has two tasks:
+   // Check if environment is OK (exist gAlice and generator)
+   // Returns pointer to genrator
+   //to be changed with TFolders
+
+   if(!gAlice)
+    {
+      cout<<endl<<"ERROR: There is NO gALICE! Check what you are doing!"<<endl;
+      gAlice->Fatal("AliGenHBTprocessor.cxx: alihbtp_getnumofev()",
+                    "\nRunning HBT Processor without gAlice... Exiting \n");
+      return 0;
+    }
+   AliGenerator * gen = gAlice->Generator();
+   
+   if (!gen) 
+    {
+      gAlice->Fatal("AliGenHBTprocessor.cxx: GetGenerator()",
+                   "\nThere is no generator in gAlice, exiting\n");
+      return 0;
+    }
+   
+   const Char_t *genname = gen->GetName();
+   Char_t name[30];
+   strcpy(name,"AliGenCocktailAfterBurner");
+   
+   if (strcmp(name,genname))
+   {
+      gAlice->Fatal("AliGenHBTprocessor.cxx: GetGenerator()",
+                   "\nThe main Generator is not a AliGenCocktailAfterBurner, exiting\n");
+      return 0;
+   }
+   
+   AliGenCocktailAfterBurner* CAB= (AliGenCocktailAfterBurner*) gen;
+
+   //   cout<<endl<<"Got generator"<<endl;
+   return CAB;
+   
+ }
+/*******************************************************************/
+
+AliGenHBTprocessor* GetAliGenHBTprocessor()
+{
+//returns pointer to the current instance of AliGenHBTprocessor in
+//AliGenCocktailAfterBurner (can be more than one)
+//
+ AliGenCocktailAfterBurner* gen = GetGenerator();
+ AliGenerator * g = gen->GetCurrentGenerator();
+ const Char_t *genname = g->GetName();
+ Char_t name[30];
+ strcpy(name,"AliGenHBTprocessor");
+   
+ if (strcmp(name,genname))
+   {
+      gAlice->Fatal("AliGenHBTprocessor.cxx: GetAliGenHBTprocessor()",
+                    "\nCurrernt generator in AliGenCocktailAfterBurner is not a AliGenHBTprocessor, exiting\n");
+      return 0;
+   }
+ AliGenHBTprocessor* hbtp = (AliGenHBTprocessor*)g;
+ return hbtp;
+}
+
+/*******************************************************************/
+extern "C" void type_of_call alihbtp_setparameters()
+ {
+   //dummy
+ }
+
+extern "C" void type_of_call  alihbtp_initialize()
+ {
+   //dummy
+ }
+
+/*******************************************************************/
+
+extern "C" void type_of_call alihbtp_getnumberevents(Int_t &nev)
+ {
+  //passes number of events to the fortran 
+   if(gDebug) cout<<"alihbtp_getnumberevents("<<nev<<") ....";
+   AliGenCocktailAfterBurner* gen = GetGenerator();
+   if(!gen)
+    {
+     nev = -1;
+     return;
+    } 
+     
+    nev = gen->GetNumberOfEvents();
+    
+   if(gDebug>5) cout<<"EXITED N Ev = "<<nev<<endl; 
+   
+ }
+
+/*******************************************************************/
+
+extern "C" void type_of_call  alihbtp_setactiveeventnumber(Int_t & nev)
+ {
+//sets active event in generator (AliGenCocktailAfterBurner)
+
+   if(gDebug>5) cout<<"alihbtp_setactiveeventnumber("<<nev<<") ....";
+   if(gDebug>0) cout<<"Asked for event "<<nev-1<<endl;
+   AliGenCocktailAfterBurner* gen = GetGenerator();
+   if(!gen) return;
+   gen->SetActiveEventNumber(nev - 1); //fortran numerates events from 1 to N
+   
+   if(gDebug>5) cout<<"EXITED returned "<<nev<<endl; 
+   
+ }
+/*******************************************************************/
+extern "C" void type_of_call  alihbtp_getnumbertracks(Int_t &ntracks)
+ {
+//passes number of particles in active event to the fortran  
+   if(gDebug>5) cout<<"alihbtp_getnumbertracks("<<ntracks<<") ....";
+
+   AliGenCocktailAfterBurner* gen = GetGenerator();
+   if (!gen) 
+    {
+     ntracks = -1;
+     return;
+    } 
+
+   ntracks = gen->GetActiveStack()->GetNprimary();
+   if(gDebug>5) cout<<"EXITED Ntracks = "<<ntracks<<endl; 
+ }
+/*******************************************************************/
+extern "C" void type_of_call  
+   alihbtp_puttrack(Int_t & n,Int_t& flag, Float_t& px, 
+                    Float_t& py, Float_t& pz, Int_t& geantpid)
+ {
+//sets new parameters (momenta) in track number n
+// in the active event
+// n - number of the track in active event
+// flag - flag of the track
+// px,py,pz - momenta
+// geantpid - type of the particle - Geant Particle ID
+   if(gDebug>5) cout<<"alihbtp_puttrack("<<n<<") ....";
+
+   AliGenCocktailAfterBurner* gen = GetGenerator();
+   if(!gen) return;
+   
+   TParticle * track = gen->GetActiveStack()->Particle(n-1);
+   
+   AliGenHBTprocessor* g = GetAliGenHBTprocessor();
+       
+   //check to be deleted 
+   if (geantpid != (g->IdFromPDG( track->GetPdgCode() )))
+    {
+      cout<<endl<<" AliGenHBTprocessor.cxx: alihbtp_puttrack: SOMETHING IS GOING BAD:\n   GEANTPIDS ARE NOT THE SAME"<<endl;
+    }
+   
+   if(gDebug>0)
+     if (px != track->Px()) 
+       cout<<"Px diff. = "<<px - track->Px()<<endl;
+   
+   if(gDebug>3) cout<<" track->GetPdgCode() --> "<<track->GetPdgCode()<<endl;
+   
+   
+   
+   Float_t m =track->GetMass();
+   track->SetMomentum(px,py,pz,m*m+px*px+py*py+pz*pz);
+   
+   g->SetHbtPStatusCode(flag,n-1);
+   
+   if(gDebug>5) cout<<"EXITED "<<endl; 
+ }
+
+/*******************************************************************/
+
+extern "C" void type_of_call  
+  alihbtp_gettrack(Int_t & n,Int_t & flag, Float_t & px, 
+                   Float_t & py, Float_t & pz, Int_t & geantpid)
+  
+ {
+//passes track parameters to the fortran
+// n - number of the track in active event
+// flag - flag of the track
+// px,py,pz - momenta
+// geantpid - type of the particle - Geant Particle ID
+   if(gDebug>5) cout<<"alihbtp_gettrack("<<n<<") ....";
+   AliGenCocktailAfterBurner* gen = GetGenerator();
+
+   if (!gen) 
+    {
+     n = -1;
+     flag =-1;
+     px = py = pz = -1;
+     geantpid = -1;
+     return;
+    } 
+
+   TParticle * track = gen->GetActiveStack()->Particle(n-1);
+   AliGenHBTprocessor* g = GetAliGenHBTprocessor();
+   
+   flag = g->GetHbtPStatusCode(n-1);
+
+   px = (Float_t)track->Px();
+   py = (Float_t)track->Py();
+   pz = (Float_t)track->Pz();
+  
+   geantpid = g->IdFromPDG( track->GetPdgCode() );
+  
+   if(gDebug>5) cout<<"EXITED "<<endl; 
+ }
+
+/*******************************************************************/
+extern "C" Float_t type_of_call hbtpran(Int_t &)
+{
+//interface to the random number generator
+  return sRandom->Rndm();
+}        
+
+/*******************************************************************/
+
+
+/*******************************************************************/
diff --git a/EVGEN/AliGenHBTprocessor.h b/EVGEN/AliGenHBTprocessor.h
new file mode 100644 (file)
index 0000000..29a490e
--- /dev/null
@@ -0,0 +1,271 @@
+#ifndef ALIGENHBTPROCESSOR_H
+#define ALIGENHBTPROCESSOR_H
+/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
+ * See cxx source for full Copyright notice                               */
+
+/* $Id$ */
+
+// Implementation of the interface for THBTprocessor
+// Author: Piotr Krzysztof Skowronski <Piotr.Skowronski@cern.ch>
+
+#include "AliGenerator.h"
+#include <TFile.h>
+#include <TTree.h>
+#include <AliPDG.h>
+#include "THBTprocessor.h"
+
+enum {kHBTPMaxParticleTypes = 50};
+
+class AliGenHBTprocessor : public AliGenerator { 
+
+  public:
+    AliGenHBTprocessor();
+    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   GetHbtPStatusCode(Int_t part) const; 
+    void    SetHbtPStatusCode(Int_t hbtstatcode, Int_t part);
+    static const Int_t fgkHBTPMAXPART;
+/************* S E T T E R S ******************/  
+
+    virtual void SetTrackRejectionFactor(Float_t trf = 1.0);
+
+    virtual void SetRefControl(Int_t rc =2);
+    virtual void SetPIDs(Int_t pid1 = kPiPlus,Int_t pid2 = kPiMinus); //PDG Codes of particles to be processed, default \\Pi^{+} and \\Pi^{-}
+    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 SetDelChi(Float_t dc = 0.1);
+    virtual void SetIRand(Int_t irnd = 76564) ;
+     
+    virtual void SetLambda(Float_t lam = 0.6);
+    virtual void SetR1d(Float_t r = 7.0) ;
+    virtual void SetRSide(Float_t rs = 6.0);
+    virtual void SetROut(Float_t ro = 7.0) ;
+    virtual void SetRLong(Float_t rl = 4.0) ;
+    virtual void SetRPerp(Float_t rp = 6.0);
+    virtual void SetRParallel(Float_t rprl = 4.0);
+    virtual void SetR0(Float_t r0 = 4.0) ;
+    virtual void SetQ0(Float_t q0 = 9.0) ;
+    virtual void SetSwitch1D(Int_t s1d = 3);
+    virtual void SetSwitch3D(Int_t s3d = 0) ;
+    virtual void SetSwitchType(Int_t st = 3);
+    virtual void SetSwitchCoherence(Int_t sc = 0);
+    virtual void SetSwitchCoulomb(Int_t scol = 2);
+    virtual void SetSwitchFermiBose(Int_t sfb = 1);
+    
+    virtual void SetMomentumRange(Float_t pmin=0, Float_t pmax=0); //Dummy method
+    virtual void SetPtRange(Float_t ptmin = 0.1, Float_t ptmax = 0.98);
+    virtual void SetPxRange(Float_t pxmin = -1.0, Float_t pxmax = 1.0);
+    virtual void SetPyRange(Float_t pymin = -1.0, Float_t pymax = 1.0);  
+    virtual void SetPzRange(Float_t pzmin = -3.6, Float_t pzmax = 3.6);
+    
+    virtual void SetPhiRange(Float_t phimin = 0.0, Float_t phimax = 360.0);//Angle in degrees
+                                                                                   //coherent with AliGenCocktail
+                                                                                   //incohernet with AliGenerator
+    virtual void SetEtaRange(Float_t etamin = -1.5, Float_t etamax = 1.5);//Pseudorapidity
+    
+    virtual void SetNPtBins(Int_t nptbin = 50);
+    virtual void SetNPhiBins(Int_t nphibin = 50);
+    virtual void SetNEtaBins(Int_t netabin = 50);
+    virtual void SetNPxBins(Int_t npxbin = 20);
+    virtual void SetNPyBins(Int_t npybin = 20);
+    virtual void SetNPzBins(Int_t npzbin = 70);
+   
+    
+    virtual void SetNBins1DFineMesh(Int_t n = 10);
+    virtual void SetBinSize1DFineMesh(Float_t x=0.01);
+      
+    virtual void SetNBins1DCoarseMesh(Int_t n =2 );
+    virtual void SetBinSize1DCoarseMesh(Float_t x=0.05);
+      
+    virtual void SetNBins3DFineMesh(Int_t n = 8);
+    virtual void SetBinSize3DFineMesh(Float_t x=0.01);
+      
+    virtual void SetNBins3DCoarseMesh(Int_t n = 2);
+    virtual void SetBinSize3DCoarseMesh(Float_t x=0.08);
+      
+    virtual void SetNBins3DFineProjectMesh(Int_t n =3 );
+/***********************************************************************/
+/* * * * * * *    P R O T E C T E D   A R E A    * * * * * * * * * * * */ 
+/***********************************************************************/
+  protected:
+    
+    THBTprocessor * fHBTprocessor;       //pointer to generator (TGenerator)
+    Int_t         **fHbtPStatCodes;      //! hbtp status codes of particles
+    Int_t           fNPDGCodes;          //! Number of defined particles   
+    Int_t           fPDGCode[kHBTPMaxParticleTypes]; //! PDG codes (for conversion PDG<->Geant)
+    void            DefineParticles();   //initiates array with PDG codes
+    void            InitStatusCodes();   //Initiates status codes (allocates memory and sets everything to zero) 
+    void            CleanStatusCodes();   //deletes array with status codes
+    /**********   P A R A M E T E R S  OF THE GENERATOR****************/
+          
+    Float_t fTrackRejectionFactor; //variates in range 0.0 <-> 1.0
+                                   //Describes the factor of particles rejected from the output.
+                                   //Used only in case of low muliplicity particles e.g. lambdas.
+                                   //Processor generates addisional particles and builds the 
+                                   //correletions on such a statistics.
+                                   //At the end these particels are left in the event according 
+                                   //to this factor: 1==all particles are left
+                                   //                0==all are removed
+      Int_t fReferenceControl;     //switch wether read reference histograms from file =1
+                                   //              compute from input events =2 - default
+      Int_t fPrintFull;             // Full print out option - each event
+      Int_t fPrintSectorData;       // Print sector overflow diagnostics
+      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
+
+//   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. 
+
+//   Counters:
+
+      Int_t fEvent_line_counter;     // 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    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)
+      Float_t    fRperp;                  // 3D YKP source transverse radius  (fm)
+      Float_t    fRparallel;              // 3D YKP source longitudinal radius(fm)
+      Float_t    fR0;                     // 3D YKP source emission time durat(fm)
+      Float_t    fQ0;                     // NA35 Coulomb parameter (GeV/c) or
+//                                    // Coul radius for Pratt finite src (fm)
+
+//   Search Control Parameters:
+
+
+      Float_t    fDeltap;                 // Max limit for x,y,z momt shifts(GeV/c)
+      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 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
+
+//   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 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    fPhi_bin_size;          // 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;
+//   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    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    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    fDelpz;                 // Mom. space sector cell size - pz(GeV/c)
+
+  public:  
+    ClassDef(AliGenHBTprocessor,1) // Interface class for AliMevsim
+    
+};
+#endif
index 80ccfa2..46fce0b 100644 (file)
@@ -42,6 +42,7 @@
 #pragma link C++ class  AliMevSimParticle+;
 #pragma link C++ class  AliGenMevSim+;
 #pragma link C++ class  AliGenMC+;
+#pragma link C++ class  AliGenHBTprocessor+;
 #endif
 
 
index 11de90d..ddc105c 100644 (file)
@@ -22,7 +22,8 @@ SRCS          = AliGenHIJINGpara.cxx AliGenBox.cxx AliGenFixed.cxx \
                AliGenHijingEventHeader.cxx AliGenPythiaEventHeader.cxx \
                AliDecayer.cxx AliDecayerPythia.cxx \
                 AliGenMevSim.cxx AliMevSimParticle.cxx AliMevSimConfig.cxx \
-               AliGenMC.cxx AliGenCocktailAfterBurner.cxx
+               AliGenMC.cxx AliGenCocktailAfterBurner.cxx \
+         AliGenHBTprocessor.cxx 
 # C++ Headers
 
 HDRS          = $(SRCS:.cxx=.h) $(ALICE_ROOT)/include/THijing.h \