Changes to improve performance while running over MC
authormfloris <mfloris@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 1 Nov 2010 17:06:48 +0000 (17:06 +0000)
committermfloris <mfloris@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 1 Nov 2010 17:06:48 +0000 (17:06 +0000)
PWG0/multPbPb/AliAnalysisTaskMultPbTracks.cxx
PWG0/multPbPb/correct.C
PWG0/multPbPb/run.C

index a4789601f88fca9cfca798181459fefe1a0f51f0..2a911193dcd1c3534655846a84247351a06c52d7 100644 (file)
@@ -151,8 +151,10 @@ void AliAnalysisTaskMultPbTracks::UserExec(Option_t *)
     } else {
       
       //loop on the MC event
-      Int_t nMCTracks = fMCEvent->GetNumberOfTracks();
-      for (Int_t ipart=0; ipart<nMCTracks; ipart++) { 
+      //      Int_t nMCTracks = fMCEvent->GetNumberOfTracks();
+      Int_t offset    = fMCEvent->GetPrimaryOffset();
+      Int_t nMCTracks = fMCEvent->GetNumberOfPrimaries()+offset;
+      for (Int_t ipart=offset; ipart<nMCTracks; ipart++) { 
        
        AliMCParticle *mcPart  = (AliMCParticle*)fMCEvent->GetTrack(ipart);
        
index 66a2b0ac80bd460508934dc2cc07d610bb96adbb..9e890e32a737f31c3d189c222b607dd496c2b886 100644 (file)
@@ -150,13 +150,12 @@ Double_t CheckSecondaries() {
   c1->SetLogy();
   // Draw all
   //  hDataDCA->Draw();
-  // //  hMCDCAGen ->Draw("same");
   //  hMCDCARec ->Draw("same");
   // hMCDCAPri ->Draw("same");
   // hMCDCASW ->Draw("same");
   // hMCDCASM ->Draw("same");
   // hMCDCAFak ->Draw("same");
-  //  return;
+  //  return 1;
   
   TH1D * hMCPrimSMFak = (TH1D*) hMCDCAPri->Clone("hMCPrimSMFak");
   hMCPrimSMFak->Add(hMCDCASM);
index 7bcb04c7c8f0cdc387138ed7a2872421a6fd278f..3ac7bb520804cee37a53296bbb9b8009600ec16f 100644 (file)
@@ -29,6 +29,7 @@ void run(Char_t* data, Long64_t nev = -1, Long64_t offset = 0, Bool_t debug = kF
 
   if(isMC) {
     AliMCEventHandler* handler = new AliMCEventHandler;
+    handler->SetPreReadMode(AliMCEventHandler::kLmPreRead);
     mgr->SetMCtruthEventHandler(handler);
   }