}
TTree *xtree = (TTree*)fxsec->Get("Xsection");
if(!xtree){
- Printf("%s:%d tree not found in the pyxsec.root",(char*)__FILE__,__LINE__);
+ AliWarning(Form("%s:%d tree not found in the pyxsec.root",(char*)__FILE__,__LINE__));
return kTRUE;
}
xtree->SetBranchAddress("xsection",&xsection);
fHistList(0x0)
{
// Default constructor
- DefineOutput(1,TList::Class());
+ DefineOutput(1, TList::Class());
}
/*
// Get the proper MC Collision Geometry
AliGenEventHeader* mcEH = mcE->GenEventHeader();
- AliGenPythiaEventHeader *pyH = dynamic_cast<AliGenPythiaEventHeader*>(mcEH);
- AliGenHijingEventHeader *hiH = 0;
- AliCollisionGeometry *colG = 0;
+ AliGenPythiaEventHeader *pyH = dynamic_cast<AliGenPythiaEventHeader*>(mcEH);
+ AliGenHijingEventHeader *hiH = 0;
+ AliCollisionGeometry *colG = 0;
AliGenDPMjetEventHeader *dpmH = 0;
// it can be only one save some casts
// assuming PYTHIA and HIJING are the most likely ones...
if(!pyH){
- hiH = dynamic_cast<AliGenHijingEventHeader*>(mcEH);
- if(!hiH){
- colG = dynamic_cast<AliCollisionGeometry *>(mcEH);
- if(!colG)dpmH = dynamic_cast<AliGenDPMjetEventHeader*>(mcEH);
- }
+ hiH = dynamic_cast<AliGenHijingEventHeader*>(mcEH);
+ if(!hiH){
+ dpmH = dynamic_cast<AliGenDPMjetEventHeader*>(mcEH);
+ }
}
-
+
+ if (hiH || dpmH) colG = dynamic_cast<AliCollisionGeometry*>(mcEH);
// fetch the trials on a event by event basis, not from pyxsec.root otherwise
// we will get a problem when running on proof since Notify may be called
if (colG) {
aodMCHo->SetReactionPlaneAngle(colG->ReactionPlaneAngle());
- printf("Found Collision Geometry. Got Reaction Plane %lf\n", colG->ReactionPlaneAngle());
+ AliInfo(Form("Found Collision Geometry. Got Reaction Plane %lf\n", colG->ReactionPlaneAngle()));
}
//
- TTree *tree = (TTree*)GetOutputData(0);
fHistList = (TList*)GetOutputData(1);
if(!fHistList){
Printf("%s:%d Output list not found",(char*)__FILE__,__LINE__);
return;
}
- if(!tree){
- Printf("%s:%d Output tree not found",(char*)__FILE__,__LINE__);
- return;
- }
-
TProfile *hXsec = ((TProfile*)(fHistList->FindObject("h1Xsec")));
TH1F* hTrials = ((TH1F*)(fHistList->FindObject("h1Trials")));
if(!hXsec)return;
Float_t xsec = hXsec->GetBinContent(1);
Float_t trials = hTrials->Integral();
AliInfo(Form("Average -section %.4E and total number of trials %E",xsec,trials));
-
- // This only works if the tree is not a special output
- // in this case it is already written
- /*
- TParameter<float> *x = new TParameter<float>("xsection",xsec);
- tree->GetUserInfo()->Add(x);
- TParameter<float> *t = new TParameter<float>("trials",trials);
- tree->GetUserInfo()->Add(t);
- */
-
}