Example train to produce HF candidates
[u/mrichter/AliRoot.git] / THbtp / AliGenHBTprocessor.cxx
index f631310..96c7770 100644 (file)
@@ -76,6 +76,7 @@
 #include "THBTprocessor.h"
 
 #include "AliStack.h"
+#include "AliMC.h"
 #include "AliGenCocktailAfterBurner.h"
 #include "AliLog.h"
 
@@ -88,21 +89,76 @@ static TRandom* gAliRandom;//RNG to be used by the fortran code
 
 AliGenCocktailAfterBurner*  GetGenerator();
 /*******************************************************************/
-AliGenHBTprocessor::AliGenHBTprocessor(const AliGenHBTprocessor& in):
-  AliGenerator(in), 
-  fHBTprocessor(0x0),
-  fHbtPStatCodes(0x0),
-  fEventMerge(1)
-{
-//copy contructor
-  // AliGenHBTprocessor::AliGenHBTprocessor();
 
-}
 AliGenHBTprocessor::AliGenHBTprocessor(): 
   AliGenerator(), 
   fHBTprocessor(0x0),
   fHbtPStatCodes(0x0),
-  fEventMerge(1)
+  fNPDGCodes(0),
+  fTrackRejectionFactor(0),
+  fReferenceControl(0),
+  fPrintFull(0),
+  fPrintSectorData(0),
+  fNPidTypes(0),
+  fNevents(0),
+  fSwitch1d(0),
+  fSwitch3d(0),
+  fSwitchType(0),
+  fSwitchCoherence(0),
+  fSwitchCoulomb(0),
+  fSwitchFermiBose(0),
+  fEventLineCounter(0),
+  fMaxit(0),
+  fIrand(0),
+  fLambda(0),
+  fR1d(0),
+  fRside(0),
+  fRout(0),
+  fRlong(0),
+  fRperp(0),
+  fRparallel(0),
+  fR0(0),
+  fQ0(0),
+  fDeltap(0),
+  fDelchi(0),
+  fNPtBins(0),
+  fNPhiBins(0),
+  fNEtaBins(0),
+  fN1dFine(0),
+  fN1dCoarse(0),
+  fN1dTotal(0),
+  fN3dFine(0),
+  fN3dCoarse(0),
+  fN3dTotal(0),
+  fN3dFineProject(0),
+  fNPxBins(0),
+  fNPyBins(0),
+  fNPzBins(0),
+  fNSectors(0),
+  fPtBinSize(0),
+  fPhiBinSize(0),
+  fEtaBinSize(0),
+  fEtaMin(0),
+  fEtaMax(0),
+  fBinsize1dFine(0),
+  fBinsize1dCoarse(0),
+  fQmid1d(0),
+  fQmax1d(0),
+  fBinsize3dFine(0),
+  fBinsize3dCoarse(0),
+  fQmid3d(0),
+  fQmax3d(0),
+  fPxMin(0),
+  fPxMax(0),
+  fDelpx(0),
+  fPyMin(0),
+  fPyMax(0),
+  fDelpy(0),
+  fPzMin(0),
+  fPzMax(0),
+  fDelpz(0),
+  fEventMerge(1),
+  fActiveStack(0)
 {
   //
   // Standard constructor
@@ -853,7 +909,7 @@ void AliGenHBTprocessor::SetPrintFull(Int_t flag)
 Int_t  AliGenHBTprocessor::GetNumberOfEvents()
 {
 //returns number of available events
-  AliGenerator* g = gAlice->Generator();
+  AliGenerator* g = gAlice->GetMCApp()->Generator();
   AliGenCocktailAfterBurner* cab = (g)?dynamic_cast<AliGenCocktailAfterBurner*>(g):0x0;
   if (cab == 0x0)
    {
@@ -876,7 +932,7 @@ void AliGenHBTprocessor::SetActiveEventNumber(Int_t n)
 Int_t  AliGenHBTprocessor::GetNumberOfTracks()
 {
 //returns number of tracks in active event
-  AliGenerator* g = gAlice->Generator();
+  AliGenerator* g = gAlice->GetMCApp()->Generator();
   AliGenCocktailAfterBurner* cab = (g)?dynamic_cast<AliGenCocktailAfterBurner*>(g):0x0;
   if (cab == 0x0)
    {
@@ -908,7 +964,7 @@ TParticle* AliGenHBTprocessor::GetTrack(Int_t n)
 { 
 //returns track that hbtp thinks is n in active event
   AliDebug(5,Form("n = %d",n));
-  AliGenerator* g = gAlice->Generator();
+  AliGenerator* g = gAlice->GetMCApp()->Generator();
   AliGenCocktailAfterBurner* cab = (g)?dynamic_cast<AliGenCocktailAfterBurner*>(g):0x0;
   if (cab == 0x0)
    {
@@ -932,7 +988,7 @@ TParticle* AliGenHBTprocessor::GetTrack(Int_t n)
 void AliGenHBTprocessor::GetTrackEventIndex(Int_t n, Int_t &evno, Int_t &index) const
 {
  //returns event(stack) number and particle index
-  AliGenerator* g = gAlice->Generator();
+  AliGenerator* g = gAlice->GetMCApp()->Generator();
   AliGenCocktailAfterBurner* cab = (g)?dynamic_cast<AliGenCocktailAfterBurner*>(g):0x0;
   if (cab == 0x0)
    {
@@ -1099,7 +1155,7 @@ AliGenCocktailAfterBurner*  GetGenerator()
               "Running HBT Processor without gAlice... Exiting \n");
       return 0x0;//pro forma
     }
-   AliGenerator * gen = gAlice->Generator();
+   AliGenerator * gen = gAlice->GetMCApp()->Generator();
    
    if (!gen) 
     {