Updating to take into account different names for HIJING in cocktail
authorcoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 Mar 2013 19:56:49 +0000 (19:56 +0000)
committercoppedis <coppedis@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 Mar 2013 19:56:49 +0000 (19:56 +0000)
ZDC/AliZDCDigitizer.cxx

index bc3023f..d02f60f 100644 (file)
@@ -299,13 +299,22 @@ void AliZDCDigitizer::Digitize(Option_t* /*option*/)
     if(genHeader->InheritsFrom(AliGenHijingEventHeader::Class())) hijingHeader = dynamic_cast <AliGenHijingEventHeader*> (genHeader);
     else if(genHeader->InheritsFrom(AliGenCocktailEventHeader::Class())){
       TList* listOfHeaders = ((AliGenCocktailEventHeader*) genHeader)->GetHeaders();
-      if(listOfHeaders) hijingHeader = dynamic_cast <AliGenHijingEventHeader*> (listOfHeaders->FindObject("Hijing"));
+      if(listOfHeaders){ 
+        hijingHeader = dynamic_cast <AliGenHijingEventHeader*> (listOfHeaders->FindObject("Hijing"));
+        if(!hijingHeader) hijingHeader = dynamic_cast <AliGenHijingEventHeader*> (listOfHeaders->FindObject("HijingpPbPb"));
+        if(!hijingHeader) hijingHeader = dynamic_cast <AliGenHijingEventHeader*> (listOfHeaders->FindObject("HijingpPb"));
+        if(!hijingHeader) hijingHeader = dynamic_cast <AliGenHijingEventHeader*> (listOfHeaders->FindObject("HijingpPb_0"));      
+      }
       else{
         AliWarning(" No list of headers from generator -> skipping event\n");
        continue;
       }
     }
-    if(!hijingHeader) continue;
+    if(!hijingHeader){ 
+        listOfHeaders->Dump();
+        printf(" No HIJING header found in list of headers from generator\n");
+       //continue;
+    }
     
     if(fSpectators2Track==kTRUE){
       impPar = hijingHeader->ImpactParameter();