Go to the documentation of this file.
18 #include "FairLogger.h"
19 #include "TClonesArray.h"
28 : FairTask(
"CbmRichHitProducer")
33 , fRotationNeeded(true)
34 , fHitError(0.6 /
sqrt(12.))
39 FairRootManager* manager = FairRootManager::Instance();
46 FairRootManager* manager = FairRootManager::Instance();
48 fCbmEvents =
dynamic_cast<TClonesArray*
>(manager->GetObject(
"Event"));
50 LOG(info) <<
": CbmEvent NOT found \n \n \n";
52 LOG(info) <<
": CbmEvent found \n \n \n";
58 Fatal(
"CbmRichHitProducer::Init",
"No RichDigi array!");
61 fRichHits =
new TClonesArray(
"CbmRichHit");
63 "RichHit",
"RICH",
fRichHits, IsOutputBranchPersistent(
"RichHit"));
70 LOG(info) <<
"CbmRichHitProducer Event (or TimeSlice) " <<
fEventNum;
78 for (Int_t iUnit = 0; iUnit < nUnits; iUnit++) {
88 LOG(info) <<
"CbmRichHitProducer CbmEvent mode. CbmEvent # "
89 <<
event->GetNumber();
91 LOG(info) <<
"nofDigis: " << nofDigis;
93 for (Int_t iDigi = 0; iDigi < nofDigis; iDigi++) {
108 if (digi ==
nullptr)
return;
114 posPoint.SetXYZ(data->
fX, data->
fY, data->
fZ);
127 Int_t nofHits =
fRichHits->GetEntriesFast();
void ProcessDigi(CbmEvent *event, Int_t digiIndex)
static CbmRichGeoManager & GetInstance()
friend F32vec4 sqrt(const F32vec4 &a)
InitStatus Init()
Initialisation.
static Int_t GetNofDigis(ECbmModuleId systemId)
virtual InitStatus Init()
Inherited from FairTask.
static Bool_t IsPresent(ECbmModuleId systemId)
Presence of a digi branch.
static CbmDigiManager * Instance()
Static instance.
void SetRefId(Int_t refId)
virtual void Exec(Option_t *option)
Inherited from FairTask.
CbmDigiManager * fDigiMan
Class for producing RICH hits directly from MCPoints.
CbmRichHitProducer()
Default constructor.
const Digi * Get(Int_t index) const
Get a digi object.
void RotatePoint(TVector3 *inPos, TVector3 *outPos, Bool_t noTilting=false)
@ kRich
Ring-Imaging Cherenkov Detector.
TClonesArray * fCbmEvents
ClassImp(CbmConverterManager) InitStatus CbmConverterManager
virtual ~CbmRichHitProducer()
Destructor.
CbmDigiManager * fDigiMan
void SetTime(Double_t time)
virtual void SetParContainers()
Inherited from FairTask.
virtual void Finish()
Inherited from FairTask.
Class for producing RICH hits directly from MCPoints.
void SetPosition(const TVector3 &pos)
Sets position of the hit.
void AddHit(CbmEvent *event, TVector3 &posHit, Double_t time, Int_t index)
Add hit to the output array (and) CbmEvent if it is not NULL.
Class characterising one event by a collection of links (indices) to data objects,...
static CbmRichDigiMapManager & GetInstance()
void ProcessData(CbmEvent *event)
CbmRichPixelData * GetPixelDataByAddress(Int_t address)