~jan.greis/maus/1811

« back to all changes in this revision

Viewing changes to src/map/MapCppTrackerMCDigitization/MapCppTrackerMCDigitization.hh

  • Committer: Adam Dobbs
  • Date: 2015-11-26 18:09:34 UTC
  • mfrom: (659.2.13 release-candidate)
  • Revision ID: phuccj@gmail.com-20151126180934-u4v8ozg6gje3zeoh
Tags: MAUS-v1.3, MAUS-v1.3.0
MAUS-v1.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 *
21
21
 */
22
22
 
23
 
#ifndef _COMPONENTS_MAP_MAPCPPTRACKERMCDIGITIZATION_H_
24
 
#define _COMPONENTS_MAP_MAPCPPTRACKERMCDIGITIZATION_H_
 
23
#ifndef _COMPONENTS_MAP_MapCppTrackerMCDigitization_H_
 
24
#define _COMPONENTS_MAP_MapCppTrackerMCDigitization_H_
25
25
 
26
26
// C headers
27
27
#include <json/json.h>
49
49
namespace MAUS {
50
50
 
51
51
class MapCppTrackerMCDigitization : public MapBase<Data> {
52
 
 public:
 
52
  public:
 
53
    typedef std::vector<int> IntChannelArray;
 
54
 
53
55
  /** Constructor - initialises pointers to NULL */
54
56
  MapCppTrackerMCDigitization();
55
57
 
97
99
 
98
100
  /** @brief computes adc from npe.
99
101
   */
100
 
  int compute_adc_counts(double numb_pe) const;
 
102
  double compute_adc_counts(MAUS::SciFiDigit *digit_j) const;
101
103
 
102
104
  /** @brief checks if hits belong to the same scifi channel.
103
105
   */
104
106
  bool check_param(MAUS::SciFiHit *hit1, MAUS::SciFiHit *hit2) const;
105
107
 
 
108
  void discriminator(SciFiDigitPArray &digits) const;
 
109
 
 
110
  /** @brief load calibration data
 
111
  *
 
112
  *  Used to determine calibrated values
 
113
  *  for pe from simulated adc.
 
114
  *  Identical to data digitization for completeness
 
115
  */
 
116
  bool load_mapping(std::string file);
 
117
  bool load_calibration(std::string file);
 
118
  bool load_bad_channels(std::string file);
 
119
 
106
120
 private:
107
121
  /// The ratio of deposited eV to NPE
108
122
  double _eV_to_phe;
109
123
  double _SciFiNPECut;
110
 
  double _SciFivlpcEnergyRes;
111
 
  double _SciFiadcFactor;
 
124
  double _SciFivlpcRes;
112
125
  double _SciFitdcBits;
113
126
  double _SciFivlpcTimeRes;
114
127
  double _SciFitdcFactor;
118
131
  double _SciFivlpcQE;
119
132
  double _SciFiFiberTransmissionEff;
120
133
  double _SciFiMUXTransmissionEff;
 
134
  double _SciFiadcBits;
 
135
  double _SciFiDisCut;
 
136
  int _disc_sim_on;
 
137
 
 
138
  static const int _number_channels       = 128;
 
139
  static const int _number_banks          = 64;
 
140
  static const int _number_boards         = 16;
 
141
  static const int _total_number_channels = 6403;
 
142
 
 
143
  IntChannelArray _board;
 
144
  IntChannelArray _bank;
 
145
  IntChannelArray _chan_ro;
 
146
  IntChannelArray _tracker;
 
147
  IntChannelArray _station;
 
148
  IntChannelArray _view;
 
149
  IntChannelArray _fibre;
 
150
  IntChannelArray _extWG;
 
151
  IntChannelArray _inWG;
 
152
  IntChannelArray _WGfib;
 
153
  std::string _mapping_file;
 
154
  std::string _calibration_file;
 
155
  std::string _bad_chan_file;
 
156
  Json::Value _calibration[_number_banks][_number_channels];
 
157
  bool _good_chan[_number_banks][_number_channels];
121
158
 
122
159
  /// an array contaning all MiceModules
123
160
  std::vector<const MiceModule*> modules;