er  dev
ERBeamDetUnpack.h
1 #ifndef ERBeamDetUnpack_H
2 #define ERBeamDetUnpack_H
3 
4 #include "TString.h"
5 
6 #include "ERUnpack.h"
7 
8 class ERBeamDetUnpack : public ERUnpack {
9  public:
10  ERBeamDetUnpack(const TString& detector_name);
11  virtual ~ERBeamDetUnpack() = default;
12  void SetToFCalibration(float F3_A, float F3_B, float F5_A, float F5_B);
13  void SetMWPCCalibration(float A, float B);
14  void SetMWPCMapping(const ChannelMapping& mapping) { mwpc_channels_mapping_ = mapping;}
15  protected:
16  virtual void Register();
17  virtual void UnpackSignalFromStations();
18  virtual std::vector<TString> InputBranchNames() const;
19  void UnpackToFStation(const TString& amplitude_station, const TString& time_station,
20  ushort tof_number);
21  void UnpackMWPCStations();
22  float CalibrateToF(float time, ushort tof_number);
23  void AddToFDigi(float edep, float time, ushort tof_number);
24  void AddMWPCDigi(float edep, float time, TString mwpcSt, Int_t wireNb);
25  const std::map<TString, ERChannel> mwpc_amplitude_station_to_time_channel_;
26  const std::map<TString, TString> mwpc_branch_names_;
27  ChannelMapping mwpc_channels_mapping_;
28  float F3_time_calibration_A = 0.125;
29  float F3_time_calibration_B = 0.;
30  float F5_time_calibration_A = 0.125;
31  float F5_time_calibration_B = 0.;
32  float MWPC_time_calibration_A = 0.125;
33  float MWPC_time_calibration_B = 0.;
34  ClassDef(ERBeamDetUnpack, 0)
35 };
36 
37 
38 #endif