- classes for pT spectra charged hadrons analysis added
[u/mrichter/AliRoot.git] / PWGLF / SPECTRA / ChargedHadrons / dNdPt / AlidNdPtTrackDumpTask.cxx
index 75ff5f8..cf460ee 100644 (file)
 \r
 #include "AliESDtrackCuts.h"\r
 #include "AliMCEventHandler.h"\r
-#include "dNdPt/AlidNdPt.h"\r
-#include "dNdPt/AlidNdPtEventCuts.h"\r
-#include "dNdPt/AlidNdPtAcceptanceCuts.h"\r
+#include "AlidNdPt.h"\r
+#include "AlidNdPtEventCuts.h"\r
+#include "AlidNdPtAcceptanceCuts.h"\r
 \r
-#include "dNdPt/AlidNdPtTrackDumpTask.h"\r
+#include "AlidNdPtTrackDumpTask.h"\r
 \r
 using namespace std;\r
 \r
@@ -200,7 +200,16 @@ void AlidNdPtTrackDumpTask::Process(AliESDEvent *const esdEvent, AliMCEvent * co
     Printf("ERROR: Could not receive input handler");\r
     return;\r
   }\r
+   \r
+  // get file name\r
+  TTree *chain = (TChain*)GetInputData(0);\r
+  if(!chain) { \r
+    Printf("ERROR: Could not receive input chain");\r
+    return;\r
+  }\r
+  TObjString fileName(chain->GetCurrentFile()->GetName());\r
 \r
+  // trigger\r
   if(evtCuts->IsTriggerRequired())  \r
   {\r
     // always MB\r
@@ -612,12 +621,16 @@ void AlidNdPtTrackDumpTask::Process(AliESDEvent *const esdEvent, AliMCEvent * co
       Double_t bz = esdEvent->GetMagneticField();\r
       Double_t runNumber = esdEvent->GetRunNumber();\r
       Double_t evtTimeStamp = esdEvent->GetTimeStamp();\r
+      Int_t evtNumberInFile = esdEvent->GetEventNumberInFile();\r
+\r
 \r
       //\r
       if(!fTreeSRedirector) return;\r
       (*fTreeSRedirector)<<"dNdPtTree"<<\r
+        "fileName.="<<&fileName<<\r
         "runNumber="<<runNumber<<\r
         "evtTimeStamp="<<evtTimeStamp<<\r
+        "evtNumberInFile="<<evtNumberInFile<<\r
         "Bz="<<bz<<\r
        "vertX="<<vert[0]<<\r
        "vertY="<<vert[1]<<\r