11#include "TClonesArray.h"
13#include <FairRootManager.h>
22 : FairTask(
"CbmPsdMCbmHitProducer")
31 FairRootManager* manager = FairRootManager::Instance();
39 FairRootManager* manager = FairRootManager::Instance();
41 fCbmEvents =
dynamic_cast<TClonesArray*
>(manager->GetObject(
"CbmEvent"));
43 LOG(info) << GetName() <<
"::Init() CbmEvent NOT found \n";
46 LOG(info) << GetName() <<
"::Init() CbmEvent found";
53 fPsdHits =
new TClonesArray(
"CbmPsdMCbmHit");
54 manager->Register(
"PsdHit",
"PSD",
fPsdHits, IsOutputBranchPersistent(
"PsdHit"));
104 LOG(info) <<
"CbmPsdMCbmHitProducer Event " <<
fEventNum;
112 for (Int_t iUnit = 0; iUnit < nUnits; iUnit++) {
121 LOG(info) <<
"CbmPsdMCbmHitProducer CbmEvent mode. CbmEvent # " <<
event->GetNumber();
123 LOG(info) <<
"nofDigis: " << nofDigis;
125 for (Int_t iDigi = 0; iDigi < nofDigis; iDigi++) {
140 if (digi ==
nullptr)
return;
150 Int_t nofHits =
fPsdHits->GetEntriesFast();
ClassImp(CbmConverterManager)
@ kPsd
Projectile spectator detector.
static Int_t GetNofDigis(ECbmModuleId systemId)
static Bool_t IsPresent(ECbmModuleId systemId)
Presence of a digi branch.
InitStatus Init()
Initialisation.
const Digi * Get(Int_t index) const
Get a digi object.
static CbmDigiManager * Instance()
Static instance.
Class characterising one event by a collection of links (indices) to data objects,...
Data class for PSD digital information.
double GetEdep() const
Energy deposit.
double GetTime() const
Time.
double GetSectionID() const
Section Identifier.
double GetModuleID() const
Module Identifier.
CbmPsdMCbmHitProducer()
Default constructor.
virtual ~CbmPsdMCbmHitProducer()
Destructor.
virtual void SetParContainers()
Inherited from FairTask.
void ProcessData(CbmEvent *event)
virtual void Finish()
Inherited from FairTask.
CbmDigiManager * fDigiMan
void AddHit(CbmEvent *event, Double_t time, Double_t energy, UInt_t moduleId, UInt_t sectionId, Int_t index)
Add hit to the output array (and) CbmEvent if it is not NULL.
virtual void Exec(Option_t *option)
Inherited from FairTask.
bool isInEnRange(const double energy)
TClonesArray * fCbmEvents
virtual InitStatus Init()
Inherited from FairTask.
void ProcessDigi(CbmEvent *event, Int_t digiIndex)
data class for hit information in PSD
void SetTime(double time)
void SetSectionID(uint32_t sec)
void SetModuleID(uint32_t mod)
void SetEdep(double edep)