R3BROOT
R3B analysis software
Loading...
Searching...
No Matches
R3BNeulandMapToCalParTask.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (C) 2019 GSI Helmholtzzentrum für Schwerionenforschung GmbH *
3 * Copyright (C) 2019-2023 Members of R3B Collaboration *
4 * *
5 * This software is distributed under the terms of the *
6 * GNU General Public Licence (GPL) version 3, *
7 * copied verbatim in the file "LICENSE". *
8 * *
9 * In applying this license GSI does not waive the privileges and immunities *
10 * granted to it by virtue of its status as an Intergovernmental Organization *
11 * or submit itself to any jurisdiction. *
12 ******************************************************************************/
13#pragma once
14
15#include "R3BFTCalEngine.h"
18#include <R3BIOConnector.h>
19#include <R3BNeulandBasePar.h>
21#include <R3BNeulandCommon.h>
22
23namespace R3B::Neuland
24{
26 {
27 public:
30 Map2CalParTask(std::string_view name, int iVerbose);
31
32 void SetTrigIDMapPrintFormat(TrigIDMappingPrintFormat format) { trigIDIO.SetFormat(format); }
33 void SetTrigEnabled(bool is_enabled) { is_trig_enabled_ = is_enabled; }
34 void SetCoarseTimeFreqMHz(float freq) { coarse_time_frequency_ = freq; }
35 void SetTrigIDMapAutoFind(bool is_auto = true) { is_trigID_auto_ = is_auto; }
36 void SetTrigIDMapDir(std::string_view dirName) { trigIDIO.SetDir(dirName); }
37 void SetTrigIDMapFileName(std::string_view fileName) { trigIDIO.SetFileName(fileName); }
38 void SetErrorMethod(ErrorMethod method) { cal_strategy_.Set_error_method(method); }
39
40 private:
41 bool is_trigID_auto_ = true;
42 bool is_trig_enabled_ = true;
43 unsigned int plane_num_ = 0;
44 float coarse_time_frequency_ = COARSE_TIME_CLOCK_FREQUENCY_MHZ;
45 calibration::FTCalStrategy cal_strategy_;
46 TrigIDMappingFinder trigIDMappingFinder_;
47 TrigMappingIO trigIDIO;
48
49 // IO data and paramters:
50 InputVectorConnector<PaddleTamexMappedData> mappedData_{ "NeulandMappedData" };
51 InputMapConnector<unsigned int, PaddleTamexTrigMappedData> trigMappedData_{ "NeulandTrigMappedData" };
52 Map2CalPar* calibrationPar_ = OutputPar<Map2CalPar>("LandTCalPar");
53 Map2CalPar* calibrationTrigPar_ = OutputPar<Map2CalPar>("LandTrigTCalPar");
54
55 // calibration engines:
56 calibration::FTEngine<calibration::PlaneCal> mapCalEngine_{ "MapCal" };
57 calibration::FTEngine<calibration::ModuleCal> trigMapCalEngine_{ "TrigMapCal" };
58
59 // virtual functions:
60 void TriggeredExec() override;
61 void ExtraInit(FairRootManager* rootMan) override;
62 void EndOfTask() override;
63
64 // non-virtual functions:
65 void write_parameter();
66 void RecordTrigMappingID();
67 void FillMapData();
68 void FillTrigMapData();
69 void PrintData() const;
70 void WriteHists();
71 void PrintTrigID() const;
72 };
73
74} // namespace R3B::Neuland
75
R3B::Neuland::Map2CalParTask R3BNeulandMapped2CalPar2
auto OutputPar(std::string_view par_name, FairRuntimeDb *rtdb=FairRuntimeDb::instance()) -> ParType *
void SetTrigIDMapFileName(std::string_view fileName)
calibration::FTCalErrorMethod ErrorMethod
void SetTrigIDMapAutoFind(bool is_auto=true)
void SetTrigIDMapDir(std::string_view dirName)
void SetTrigIDMapPrintFormat(TrigIDMappingPrintFormat format)
void ExtraInit(FairRootManager *rootMan) override
void SetErrorMethod(ErrorMethod method)
Simulation of NeuLAND Bar/Paddle.
constexpr auto COARSE_TIME_CLOCK_FREQUENCY_MHZ
InputConnector< std::vector< ElementType > > InputVectorConnector
InputConnector< std::map< KeyType, ValueType > > InputMapConnector