GenCocktail and HijingPara were not adding their headers to eventual parent
authorshahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 14 Nov 2013 19:00:52 +0000 (19:00 +0000)
committershahoian <shahoian@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 14 Nov 2013 19:00:52 +0000 (19:00 +0000)
generator, while the AliGenPileUp expects this (was crashing with Cocktail)

EVGEN/AliGenCocktail.cxx
EVGEN/AliGenHIJINGpara.cxx

index 2ac18c3..32fd1bb 100644 (file)
@@ -259,10 +259,15 @@ AddGenerator(AliGenerator *Generator, const char* Name, Float_t RateExp, TFormul
     
     next.Reset();
 
-// Event Vertex
+    // Event Vertex
     fHeader->SetPrimaryVertex(eventVertex);
     fHeader->CalcNProduced();
-    gAlice->SetGenEventHeader(fHeader); 
+    if (fContainer) {
+      fHeader->SetName(fName);
+      fContainer->AddHeader(fHeader);
+    } else {
+      gAlice->SetGenEventHeader(fHeader);      
+    }
 }
 
 void AliGenCocktail::SetVertexSmear(VertexSmear_t smear)
index 737b0cd..f3fa75d 100644 (file)
@@ -408,7 +408,12 @@ void AliGenHIJINGpara::Generate()
     header->SetPrimaryVertex(eventVertex);
     header->SetInteractionTime(eventTime);
     header->SetNProduced(fNpartProd);
-    gAlice->SetGenEventHeader(header); 
+    if (fContainer) {
+      header->SetName(fName);
+      fContainer->AddHeader(header);
+    } else {
+      gAlice->SetGenEventHeader(header);       
+    }
 }
 
 void AliGenHIJINGpara::SetPtRange(Float_t ptmin, Float_t ptmax) {