37#include <FairRootManager.h>
41#include <TClonesArray.h>
49#include <unordered_map>
51#include <yaml-cpp/yaml.h>
57 namespace constants = cbm::algo::ca::constants;
63 template<ca::EDetectorID DetID>
94 void Exec(Option_t* option);
131 double fPhiU{constants::Undef<double>};
132 double fPhiV{constants::Undef<double>};
134 double fDu{constants::Undef<double>};
135 double fDv{constants::Undef<double>};
136 double fDt{constants::Undef<double>};
199 template<ca::EDetectorID DetID>
203 auto pos = TVector3{};
204 auto dpos = TVector3{};
205 auto address = pHit->GetAddress();
207 pHit->PositionError(
dpos);
211 auto statNr = pHit->GetStationNr();
212 auto iCentrX = pHit->GetIndexCentralX();
213 auto iCentrY = pHit->GetIndexCentralY();
214 auto iClust = pHit->GetClusterIndex();
215 auto flag = pHit->GetFlag();
219 auto time = pHit->GetTime();
220 auto dtime = pHit->GetTimeError();
222 auto dxy = pHit->GetDxy();
223 auto iClustF = pHit->GetFrontClusterId();
224 auto iClustB = pHit->GetBackClusterId();
225 auto du = pHit->GetDu();
226 auto dv = pHit->GetDv();
230 auto dxy = pHit->GetDxy();
231 auto refId = pHit->GetRefId();
232 auto planeId = pHit->GetPlaneId();
233 LOG(info) <<
"MUCH: " << pHit->GetRefId() <<
' ' << pHit->GetPlaneId();
237 auto dxy = pHit->GetDxy();
238 auto refId = pHit->GetRefId();
239 auto eLoss = pHit->GetELoss();
244 auto flag = pHit->GetFlag();
245 auto channel = pHit->GetCh();
253 template<ca::EDetectorID DetID>
258 if (pHitMatch->GetNofLinks() > 0) {
259 const auto& link = pHitMatch->GetMatchedLink();
260 if (link.GetIndex() > -1) {
261 return std::make_optional(link);
269 template<ca::EDetectorID DetID>
274 case 1: value +=
fRandom.Uniform<
double>(0., sigma);
break;
275 default: LOG(fatal) <<
"IdealHitProducerDet::SmearValue: illegal option: opt = " << opt;
Random generator utility class for CA tracking.
Compile-time constants definition for the CA tracking algorithm.
ECbmDataType
Enumerator for CBM data types.
Implementation of L1DetectorID enum class for CBM.
Class for pixel hits in MUCH detector.
A manager for setup representation in CBM reconstruction.
Data class for a reconstructed hit in the STS.
Class for hits in TRD detector.
Access to a MC data branch for time-based analysis.
Access to a MC data branch for time-based analysis.
Container class for MC events with number, file and start time.
data class for a reconstructed 3-d hit in the STS
Bookkeeping of time-slice content.
data class for a reconstructed Energy-4D measurement in the TRD
A class, providing ROOT-free access to randomly generated variables.
TClonesArray * fpRecoEvents
Array of reconstructed events.
std::vector< unsigned char > fvbPointIsLegit
Map of used point index.
void Exec(Option_t *option)
Execution of the task.
static constexpr double kHitWSize
half-width for the bounded gaussian [sigma]
TClonesArray * fpBrHitsTmp
Temporary array of hits.
IdealHitProducerDet()
Constructor.
ECbmDataType fHitDataType
Hit data type.
IdealHitProducerDet & operator=(IdealHitProducerDet &&)=delete
Move assignment operator.
PointTypes_t::at< DetID > Point_t
CbmMCEventList * fpMCEventList
MC event list.
TClonesArray * fpBrHitMatchesTmp
Temporary array of hit matches.
void SetRandomSeed(int seed)
Sets random seed (1 by default)
std::unordered_map< uint32_t, double > fTofRpcZpos
void SetConfigName(const char *name)
Sets YAML configuration file name.
std::vector< HitParameters > fvStationPars
Parameters, stored for each station.
const cbm::algo::RecoSetupUnit_t< ToCbmModuleId(DetID)> * fpDetInterface
Detector interface.
IdealHitProducerDet(IdealHitProducerDet &&)=delete
Move constructor.
IdealHitProducerDet & operator=(const IdealHitProducerDet &)=delete
Copy assignment operator.
CbmMCDataObject * fpMCEventHeader
MC event header.
int fHitCounter
Hit counter in a new branch.
~IdealHitProducerDet()
Destructor.
CbmTimeSlice * fpTimeSlice
Current time slice.
void PushBackHit(const Hit_t *pHit)
Pushes back a hit into the hits branch.
std::optional< CbmLink > GetMatchedPointLink(int iH)
Gets pointer to matched MC point.
bool fbRunTheRoutine
Management flag, which does run the routine if there was a request.
void FillPointIsLegit(int iEvGlob)
Fills map of legit points (inside MC event!)
std::string fsConfigName
Name of configuration file.
HitTypes_t::at< DetID > Hit_t
InitStatus Init()
Initialization of the task.
CbmMCDataArray * fpBrMCTracks
Branch: array of MC tracks.
ca::Random fRandom
< z-position of TOF RPCs (filled only for TOF)
InitStatus ReInit()
Re-initialization of the task.
void ParseConfig()
Parses the YAML configuration file.
TClonesArray * fpBrHits
Branch: array of hits.
TClonesArray * fpBrHitMatches
Branch: array of hit matches.
void SmearValue(double &value, double sigma, int opt)
Smears the value by a given standard deviation with a selected function.
CbmMCDataArray * fpBrPoints
Branch: array of MC points.
IdealHitProducerDet(const IdealHitProducerDet &)=delete
Copy constructor.
typename detail::RecoSetupUnitMapper< ModuleId >::type RecoSetupUnit_t
std::tuple_element_t< static_cast< std::size_t >(DetID), std::tuple< Types... > > at
A structure to keep hit adjustment/creation settings for each station.
double fDu
Error of u-coordinate measurement [cm].
double fPhiU
Angle of the first independent measured coordinate [rad].
double fPhiV
Angle of the second independent measured coordinate [rad].
double fDt
Error of time measurement [ns].
double fDv
Error of v-coordinate measurement [cm].