Go to the documentation of this file.
7 #include "FairLogger.h"
8 #include "TClonesArray.h"
17 : FairTask(
"CbmPsdMCbmHitProducer")
24 FairRootManager* manager = FairRootManager::Instance();
31 FairRootManager* manager = FairRootManager::Instance();
33 fCbmEvents =
dynamic_cast<TClonesArray*
>(manager->GetObject(
"CbmEvent"));
35 LOG(info) <<
": CbmEvent NOT found \n \n \n";
37 LOG(info) <<
": CbmEvent found \n \n \n";
43 Fatal(
"CbmPsdMCbmHitProducer::Init",
"No PsdDigi array!");
45 fPsdHits =
new TClonesArray(
"CbmPsdMCbmHit");
47 "PsdHit",
"PSD",
fPsdHits, IsOutputBranchPersistent(
"PsdHit"));
96 LOG(info) <<
"CbmPsdMCbmHitProducer Event " <<
fEventNum;
104 for (Int_t iUnit = 0; iUnit < nUnits; iUnit++) {
114 LOG(info) <<
"CbmPsdMCbmHitProducer CbmEvent mode. CbmEvent # "
115 <<
event->GetNumber();
117 LOG(info) <<
"nofDigis: " << nofDigis;
119 for (Int_t iDigi = 0; iDigi < nofDigis; iDigi++) {
134 if (digi ==
nullptr)
return;
153 Int_t nofHits =
fPsdHits->GetEntriesFast();
virtual void Finish()
Inherited from FairTask.
void SetSectionID(UInt_t sec)
InitStatus Init()
Initialisation.
bool isInEnRange(const double energy)
void ProcessDigi(CbmEvent *event, Int_t digiIndex)
static Int_t GetNofDigis(ECbmModuleId systemId)
void ProcessData(CbmEvent *event)
Int_t GetAddress() const
Address.
static Bool_t IsPresent(ECbmModuleId systemId)
Presence of a digi branch.
static CbmDigiManager * Instance()
Static instance.
void SetEdep(Double_t edep)
virtual InitStatus Init()
Inherited from FairTask.
virtual void Exec(Option_t *option)
Inherited from FairTask.
CbmDigiManager * fDigiMan
const Digi * Get(Int_t index) const
Get a digi object.
Double_t GetTime() const
Time.
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
Double_t GetModuleID() const
Module Identifier.
CbmPsdMCbmHitProducer()
Default constructor.
Class characterising one event by a collection of links (indices) to data objects,...
data class for hit information in PSD
virtual void SetParContainers()
Inherited from FairTask.
void SetModuleID(UInt_t mod)
@ kPsd
Projectile spectator detector.
Data class for PSD digital information.
void SetTime(Double_t time)
virtual ~CbmPsdMCbmHitProducer()
Destructor.
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.
Double_t GetSectionID() const
Section Identifier.
TClonesArray * fCbmEvents
Double_t GetEdep() const
Energy deposit.