down scaling of low-pT tracks
authorjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 15 Dec 2011 15:11:57 +0000 (15:11 +0000)
committerjotwinow <jotwinow@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 15 Dec 2011 15:11:57 +0000 (15:11 +0000)
PWG0/dNdPt/AlidNdPtTrackDumpTask.cxx

index 8824f24..75ff5f8 100644 (file)
@@ -25,6 +25,7 @@
 #include "TList.h"\r
 #include "TFile.h"\r
 #include "TMatrixD.h"\r
+#include "TRandom.h"\r
 \r
 #include "AliHeader.h"  \r
 #include "AliGenEventHeader.h"  \r
@@ -285,6 +286,7 @@ void AlidNdPtTrackDumpTask::Process(AliESDEvent *const esdEvent, AliMCEvent * co
   // check event cuts\r
   if(isEventOK && isEventTriggered)\r
   {\r
+    TRandom random;\r
 \r
     for (Int_t iTrack = 0; iTrack < esdEvent->GetNumberOfTracks(); iTrack++)\r
     {\r
@@ -294,6 +296,9 @@ void AlidNdPtTrackDumpTask::Process(AliESDEvent *const esdEvent, AliMCEvent * co
       if(!esdTrackCuts->AcceptTrack(track)) continue;\r
       if(!accCuts->AcceptTrack(track)) continue;\r
 \r
+      // downscale low-pT tracks\r
+      if(TMath::Exp(2*track->Pt())<1000*random.Rndm()) continue;\r
+\r
       // Dump to the tree \r
       // vertex\r
       // TPC constrained tracks\r
@@ -606,15 +611,17 @@ void AlidNdPtTrackDumpTask::Process(AliESDEvent *const esdEvent, AliMCEvent * co
       Int_t mult = vtxESD->GetNContributors();\r
       Double_t bz = esdEvent->GetMagneticField();\r
       Double_t runNumber = esdEvent->GetRunNumber();\r
+      Double_t evtTimeStamp = esdEvent->GetTimeStamp();\r
 \r
       //\r
       if(!fTreeSRedirector) return;\r
       (*fTreeSRedirector)<<"dNdPtTree"<<\r
         "runNumber="<<runNumber<<\r
+        "evtTimeStamp="<<evtTimeStamp<<\r
         "Bz="<<bz<<\r
-        "vertX="<<vert[0]<<\r
-        "vertY="<<vert[1]<<\r
-        "vertZ="<<vert[2]<<\r
+       "vertX="<<vert[0]<<\r
+       "vertY="<<vert[1]<<\r
+       "vertZ="<<vert[2]<<\r
         "mult="<<mult<<\r
         "esdTrack.="<<track<<\r
         "extTPCInnerC.="<<tpcInnerC<<\r