X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;ds=sidebyside;f=STEER%2FAliReconstruction.cxx;h=e73860a10c542eaa94b2a9af2a2a786d9c2feab4;hb=e0919e877c6f962639a2af56bc822a7d58a7f33b;hp=5b53f5094d520385bbbc05e89bfae41ad5e87dac;hpb=1f9831abf71114f584f67d9d98eb3086fdf712a6;p=u%2Fmrichter%2FAliRoot.git diff --git a/STEER/AliReconstruction.cxx b/STEER/AliReconstruction.cxx index 5b53f5094d5..e73860a10c5 100644 --- a/STEER/AliReconstruction.cxx +++ b/STEER/AliReconstruction.cxx @@ -130,6 +130,7 @@ #include #include #include +#include #include "AliAlignObj.h" #include "AliCDBEntry.h" @@ -238,6 +239,7 @@ AliReconstruction::AliReconstruction(const char* gAliceFilename) : fFirstEvent(0), fLastEvent(-1), fNumberOfEventsPerFile((UInt_t)-1), + fFractionFriends(0.04), fOptions(), fLoadAlignFromCDB(kTRUE), fLoadAlignData("ALL"), @@ -344,6 +346,7 @@ AliReconstruction::AliReconstruction(const AliReconstruction& rec) : fFirstEvent(rec.fFirstEvent), fLastEvent(rec.fLastEvent), fNumberOfEventsPerFile(rec.fNumberOfEventsPerFile), + fFractionFriends(rec.fFractionFriends), fOptions(), fLoadAlignFromCDB(rec.fLoadAlignFromCDB), fLoadAlignData(rec.fLoadAlignData), @@ -466,6 +469,7 @@ AliReconstruction& AliReconstruction::operator = (const AliReconstruction& rec) fFirstEvent = rec.fFirstEvent; fLastEvent = rec.fLastEvent; fNumberOfEventsPerFile = rec.fNumberOfEventsPerFile; + fFractionFriends = rec.fFractionFriends; for (Int_t i = 0; i < rec.fOptions.GetEntriesFast(); i++) { if (rec.fOptions[i]) fOptions.Add(rec.fOptions[i]->Clone()); @@ -2050,7 +2054,17 @@ Bool_t AliReconstruction::ProcessEvent(Int_t iEvent) fesd->GetESDfriend(fesdf); ftree->Fill(); - if (fWriteESDfriend) ftreeF->Fill(); + if (fWriteESDfriend) { + // Sampling + Double_t rnd = gRandom->Rndm(); + if (fFractionFriends < rnd) { + fesdf->~AliESDfriend(); + new (fesdf) AliESDfriend(); // Reset... + fesdf->SetSkipBit(kTRUE); + } + + ftreeF->Fill(); + } // Auto-save the ESD tree in case of prompt reco @P2 if (fRawReader && fRawReader->UseAutoSaveESD()) {