#include "AliMCEventHandler.h"
#include "AliAODEvent.h"
#include "AliAODHeader.h"
+#include "AliAODMCHeader.h"
#include "AliAODHandler.h"
#include "AliAODVertex.h"
#include "AliAODMCParticle.h"
// Create the output container
if (OutputTree()&&fTrackFilterMother)
OutputTree()->GetUserInfo()->Add(fTrackFilterMother);
- // how is this is reset cleared in the UserExec....
- // Can this be handled by the framework?
+
+ // this part is mainly needed to set the MCEventHandler
+ // to the AODHandler, this will not be needed when
+ // AODHandler goes to ANALYSISalice
+ // setting in the steering macro will not work on proof :(
+ // so we have to do it in a task
+
+ // the branch booking can also go into the AODHandler then
+
+
+ // mcparticles
TClonesArray *tca = new TClonesArray("AliAODMCParticle", 0);
tca->SetName(AliAODMCParticle::StdBranchName());
AddAODBranch("TClonesArray",&tca);
- AliMCEventHandler *mcH = (AliMCEventHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetMCtruthEventHandler());
+ // MC header...
+ AliAODMCHeader *mcHeader = new AliAODMCHeader();
+ Printf("AODMCHeader %p",mcHeader);
+ Printf("AODMCHeader ** %p",&mcHeader);
+ mcHeader->SetName(AliAODMCHeader::StdBranchName());
+ AddAODBranch("AliAODMCHeader",&mcHeader);
+
+
+
+ AliMCEventHandler *mcH = (AliMCEventHandler*) ((AliAnalysisManager::GetAnalysisManager())->GetMCtruthEventHandler());
AliAODHandler *aodH = dynamic_cast<AliAODHandler*> ((AliAnalysisManager::GetAnalysisManager())->GetOutputEventHandler());
if(!aodH){
Printf("%s:&d Could not get AODHandler",(char*)__FILE__,__LINE__);
return;
}
aodH->SetMCEventHandler(mcH);
- // TODO ADD MC VERTEX
+
}
Float_t rv = TMath::Sqrt(xv * xv + yv * yv);
Bool_t write = kFALSE;
- Int_t flag = 0;
-
if (ip < nprim) {
// Select the primary event