/* $Id: */ // ------------------------------------------------------------------------- // ----- PndGemEventBuilderOnMCEvents source file ----- // ----- Created 22/08/2013 by R. Karabowicz ----- // ------------------------------------------------------------------------- /** PndGemEventBuilderOnMCEvents *@author Radoslaw Karabowicz *@since 22.08.2013 *@version 1.0 ** ** PANDA task class for creating RecoEvents ideally from MC events. ** Task level RECO **/ #include "PndGemEventBuilderOnMCEvents.h" #include "PndDetectorList.h" #include "FairRecoEventHeader.h" #include "FairEventHeader.h" #include "FairRootManager.h" #include "FairRunAna.h" #include "FairRuntimeDb.h" #include "TMath.h" #include "TRandom2.h" #include "TClonesArray.h" #include using std::cout; using std::cerr; using std::endl; using std::flush; using std::fixed; using std::right; using std::left; using std::setw; using std::setprecision; using std::set; using std::map; using std::sort; // ----- Default constructor ------------------------------------------ PndGemEventBuilderOnMCEvents::PndGemEventBuilderOnMCEvents() : FairEventBuffer(), fEventHeader (NULL), fTNofEvents (0), fTNofRecoEvents(0), fExecTime (0.) { } // ------------------------------------------------------------------------- // ----- Constructor with name ----------------------------------------- PndGemEventBuilderOnMCEvents::PndGemEventBuilderOnMCEvents(const char* name, Int_t iVerbose) : FairEventBuffer(), fEventHeader (NULL), fTNofEvents (0), fTNofRecoEvents(0), fExecTime (0.) { } // ------------------------------------------------------------------------- // ----- Destructor ---------------------------------------------------- PndGemEventBuilderOnMCEvents::~PndGemEventBuilderOnMCEvents() { } // ------------------------------------------------------------------------- // ----- Public method Exec -------------------------------------------- std::vector > PndGemEventBuilderOnMCEvents::FindEvents() { std::vector > result; std::pair singleResult; FairRecoEventHeader* recoEvent = new FairRecoEventHeader(); recoEvent->SetEventTime(fEventHeader->GetEventTime()); singleResult.first = recoEvent->GetEventTime(); singleResult.second = recoEvent; result.push_back(singleResult); return result; } // ------------------------------------------------------------------------- std::vector > PndGemEventBuilderOnMCEvents::Modify(std::pair oldData, std::pair newData) { std::vector > result; result.push_back(newData); return result; } void PndGemEventBuilderOnMCEvents::AddNewDataToTClonesArray(FairTimeStamp* data) { } double PndGemEventBuilderOnMCEvents::FindTimeForData(FairTimeStamp* data) { return -1; } void PndGemEventBuilderOnMCEvents::FillDataMap(FairTimeStamp* data, double activeTime) { } void PndGemEventBuilderOnMCEvents::EraseDataFromDataMap(FairTimeStamp* data) { } // ----- Private method SetParContainers ------------------------------- void PndGemEventBuilderOnMCEvents::SetParContainers() { // Get run and runtime database FairRunAna* run = FairRunAna::Instance(); if ( ! run ) Fatal("SetParContainers", "No analysis run"); FairRuntimeDb* db = run->GetRuntimeDb(); if ( ! db ) Fatal("SetParContainers", "No runtime database"); } // ------------------------------------------------------------------------- // ----- Private method Init ------------------------------------------- Bool_t PndGemEventBuilderOnMCEvents::Init() { // Get input array FairRootManager* ioman = FairRootManager::Instance(); if ( ! ioman ) Fatal("Init", "No FairRootManager"); fEventHeader = (FairEventHeader*) ioman->GetObject("EventHeader."); return kTRUE; } // ------------------------------------------------------------------------- // ----- Private method ReInit ----------------------------------------- Bool_t PndGemEventBuilderOnMCEvents::ReInit() { // Create sectorwise digi sets // MakeSets(); return kTRUE; } // ------------------------------------------------------------------------- // ----- Public method Finish ------------------------------------------ void PndGemEventBuilderOnMCEvents::Finish() { } // ------------------------------------------------------------------------- ClassImp(PndGemEventBuilderOnMCEvents)