Adding information about 2012 pp data triggers (in histos and a new counter). (Chiara...
[u/mrichter/AliRoot.git] / EVGEN / AliGenCocktailAfterBurner.h
index ccef04f..0930e19 100644 (file)
@@ -7,56 +7,88 @@
 
 // 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 <TMCProcess.h>
+
+#include "AliGenCocktail.h"
+#include "AliRunLoader.h"
 
 class AliGenCocktailEntry;
 class AliStack;
+class AliCollisionGeometry;
+class AliGenCocktailEventHeader;
+
 
 class AliGenCocktailAfterBurner : public  AliGenCocktail
 {
+//container class for other generators
+//extends AliGenCocktail functionality
+//with possiblity of adding after-burners
+
  public:
     AliGenCocktailAfterBurner();
-//    AliGenCocktailAfterBurner(const AliGenCocktailAfterBurner &cocktail){}
-     
     virtual ~AliGenCocktailAfterBurner();
-    virtual void Init();
-    virtual void Generate();
-    virtual void SetTracks(Int_t stackno);
+    
+    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;}
     
-    AliGenerator* GetCurrentGenerator();
+    AliStack*     GetStack(Int_t n) const;
+    AliStack*     GetActiveStack() const{return fActiveStack;}
+
+    AliCollisionGeometry* GetCollisionGeometry(Int_t n) const;
+    AliGenerator* GetCurrentGenerator() const;
     virtual void  SetActiveEventNumber(Int_t actev);
-    Int_t GetActiveEventNumber() {return fActiveEvent;}
-    static AliMCProcess IntToMCProcess(Int_t no);
+    Int_t         GetActiveEventNumber() const {return fActiveEvent;}
+    virtual Int_t GetNumberOfEvents() const {return AliRunLoader::Instance()->GetNumberOfEventsPerRun() + fNBgEvents;}
+    void          SetNBgEvents(Int_t nbg=0){fNBgEvents = nbg;}
+    AliGenCocktailEventHeader* GetActiveEventHeader() const { return fHeaders[fActiveEvent]; }
+
+    static TMCProcess IntToMCProcess(Int_t no);
+
  protected:
-    Int_t fNAfterBurners; 
-    TList  *fAfterBurnerEntries;
-    Bool_t fGenerationDone;
-    TObjArray *fInternalStacks; // ! List of internal stacks
-    Int_t fCurrentEvent; //  Number of current event/stack
+    Int_t fNAfterBurners;       // Number of afterburners  
+    TList  *fAfterBurnerEntries;// List of afterburners
+    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
+
+    AliCollisionGeometry**      fCollisionGeometries; //! List of Collision Geometries
+    AliGenCocktailEventHeader** fHeaders;             //! List of Headers
     
+    Int_t fCurrentEvent;        //  Number of current event/stack
     
-    AliStack* fActiveStack; // ! pointer to the current stack
-    Int_t fActiveEvent;
-   
-    AliGenerator *fCurrentGenerator;
+
+    AliStack* fActiveStack;   //! pointer to the current stack
+    Int_t fActiveEvent;       //HBT Processor needs more then one event to do correlations
+                              //Due to complications in fortran, it first calls C routine
+                              //that sets the active event to be read. All alihbtp_gettrack
+                              //are addressed to this event
     
-    ClassDef(AliGenCocktailAfterBurner,1) // Particle cocktail generator a la SHAKER
+    AliGenerator *fCurrentGenerator;      // Current event generator 
+    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:
+    AliGenCocktailAfterBurner(const AliGenCocktailAfterBurner& in);
+    AliGenCocktailAfterBurner & operator=(const AliGenCocktailAfterBurner & rhs);
+
+    ClassDef(AliGenCocktailAfterBurner,2) // Particle cocktail generator a la SHAKER
+                                          //background events added
 };
 
 inline  AliGenerator*  
-    AliGenCocktailAfterBurner::GetCurrentGenerator()
+    AliGenCocktailAfterBurner::GetCurrentGenerator() const
 {
   return fCurrentGenerator;
 }