1 #ifndef ERTelescopeUnpack_H 2 #define ERTelescopeUnpack_H 9 #include "DetEventDetector.h" 15 ERTelescopeStation(TString _type, Int_t _sideCount, TString _ampStName, TString _timeStName,
16 TString _ampStName2, TString _timeStName2, TString _ampCalFile, TString _timeCalFile,
17 TString _ampCalFile2, TString _timeCalFile2, TString _XY, TString _XYside,
18 ChannelMapping* _channelsMapping1, ChannelMapping* _channelsMapping2,
19 Bool_t _skipAloneChannels);
30 TMatrixD* ampCalTable =
nullptr;
31 TMatrixD* timeCalTable =
nullptr;
32 TMatrixD* ampCalTable2 =
nullptr;
33 TMatrixD* timeCalTable2 =
nullptr;
34 ChannelMapping* channelsMapping1 =
nullptr;
35 ChannelMapping* channelsMapping2 =
nullptr;
40 Bool_t skipAloneChannels;
47 void AddSingleSiStation(TString name, TString ampStName, TString timeStName,
48 TString ampCalFile, TString timeCalFile, TString XYside,
49 ChannelMapping* channelsMapping =
nullptr,
50 Bool_t skipAloneChannels = kTRUE);
51 void AddDoubleSiStation(TString name, TString ampStName, TString timeStName,
52 TString ampStName2, TString timeStName2, TString ampCalFile, TString timeCalFile,
53 TString ampCalFile2, TString timeCalFile2, TString XY,
54 ChannelMapping* channelsMapping1 =
nullptr,
55 ChannelMapping* channelsMapping2 =
nullptr,
56 Bool_t skipAloneChannels = kTRUE);
57 void AddCsIStation(TString name,TString ampStName, TString timeStName, TString ampCalFile, TString timeCalFile,
58 ChannelMapping* channelsMapping =
nullptr, Bool_t skipAloneChannels = kTRUE);
60 virtual void Register();
61 virtual std::vector<TString> InputBranchNames()
const;
62 virtual void UnpackSignalFromStations();
63 void CreateDigisFromRawStations(
const TString& er_station,
const TString& er_branch_name,
64 const TString& amp_station,
const TString& time_station,
65 TMatrixD* amp_cal_table, TMatrixD* time_cal_table,
66 const ChannelMapping* channel_mapping,
bool skip_alone_channels);
67 void AddDigi(
float edep,
float time, ERChannel channel, TString digiBranchName);
68 TString FormBranchName(TString type,
int sideCount, TString stName, TString XY, TString XYside);
69 void FormAllBranches();
70 Bool_t ReadCalFiles();
71 void DumpStationsInfo();
72 std::pair<float, float> ApplyCalibration(ERChannel channel, Signal amp, Signal time,
73 TMatrixD* ampCalTable, TMatrixD* timeCalTable);
76 std::map<TString, ERTelescopeStation*> fStations;