Casting TH1 to TH2
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 9 Dec 2010 12:50:07 +0000 (12:50 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 9 Dec 2010 12:50:07 +0000 (12:50 +0000)
PWG3/muon/AliAnalysisTaskSingleMu.cxx

index 4d919ea..98870fe 100644 (file)
@@ -845,7 +845,7 @@ void AliAnalysisTaskSingleMu::Terminate(Option_t *) {
     TCanvas *c1_SingleMu = new TCanvas(currName.Data(),"Vz vs Pt",10,10,310,310);
     c1_SingleMu->SetFillColor(10); c1_SingleMu->SetHighLightColor(10);
     c1_SingleMu->SetLeftMargin(0.15); c1_SingleMu->SetBottomMargin(0.15);
-    TH2* histo = container->Project(kHvarPt,kHvarVz,kStepReconstructed);
+    TH2* histo = dynamic_cast<TH2*>(container->Project(kHvarPt,kHvarVz,kStepReconstructed));
     currName = GetName();
     currName.Prepend("hPtVz_");
     histo->SetName(currName.Data());