Changes for #90817 Please commit PHOS trigger part in the AliAnalysisTaskESDfilter.cxx
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 Feb 2012 19:34:18 +0000 (19:34 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 6 Feb 2012 19:34:18 +0000 (19:34 +0000)
ANALYSIS/AliAnalysisTaskESDfilter.cxx

index 4bf6f02..f13f8cd 100644 (file)
@@ -1482,8 +1482,22 @@ void AliAnalysisTaskESDfilter::ConvertCaloTrigger(TString calo, const AliESDEven
                \r
        if (calo == "PHOS") \r
        {\r
-               AliLog::Message(AliLog::kError, "PHOS ESD filter not yet implemented", MODULENAME(), "ConvertCaloTrigger", FUNCTIONNAME(), __FILE__, __LINE__);\r
-               return;\r
+         AliAODCaloTrigger &aodTrigger = *(AODEvent()->GetCaloTrigger(calo));\r
+         AliESDCaloTrigger &esdTrigger = *(esd.GetCaloTrigger(calo));\r
+\r
+         aodTrigger.Allocate(esdTrigger.GetEntries());\r
+         esdTrigger.Reset();\r
+\r
+         Float_t a;\r
+         Int_t tmod,tabsId;\r
+\r
+         while (esdTrigger.Next()) {\r
+           esdTrigger.GetPosition(tmod,tabsId);\r
+           esdTrigger.GetAmplitude(a);\r
+           aodTrigger.Add(tmod,tabsId,a,0.,(Int_t*)NULL,0,0,0);\r
+         }\r
+\r
+         return;\r
        }\r
                        \r
        AliAODHandler *aodHandler = dynamic_cast<AliAODHandler*>(AliAnalysisManager::GetAnalysisManager()->GetOutputEventHandler()); \r