~christopher-hunt08/maus/maus_integrated_kalman

« back to all changes in this revision

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

merging in changes in merge branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
#include <string>
37
37
#include <sstream>
38
38
#include <vector>
 
39
#include <algorithm>
39
40
 
40
41
// Other headers
41
42
#include "Interface/Squeak.hh"
48
49
#include "src/common_cpp/JsonCppProcessors/SpillProcessor.hh"
49
50
 
50
51
#include "DataStructure/Global/Track.hh"
 
52
#include "src/common_cpp/DataStructure/Global/PIDLogLPair.hh"
51
53
 
52
54
#include "src/common_cpp/Recon/Global/PIDVarA.hh"
53
55
#include "src/common_cpp/Recon/Global/PIDVarB.hh"
54
56
#include "src/common_cpp/Recon/Global/PIDVarC.hh"
 
57
#include "src/common_cpp/Recon/Global/PIDVarD.hh"
 
58
#include "src/common_cpp/Recon/Global/PIDVarE.hh"
 
59
#include "src/common_cpp/Recon/Global/PIDVarF.hh"
 
60
#include "src/common_cpp/Recon/Global/PIDVarG.hh"
 
61
#include "src/common_cpp/Recon/Global/PIDVarH.hh"
 
62
#include "src/common_cpp/Recon/Global/ComPIDVarA.hh"
 
63
#include "src/common_cpp/Recon/Global/ComPIDVarB.hh"
 
64
#include "src/common_cpp/Recon/Global/ComPIDVarC.hh"
 
65
#include "src/common_cpp/Recon/Global/ComPIDVarD.hh"
 
66
#include "src/common_cpp/Recon/Global/ComPIDVarE.hh"
 
67
#include "src/common_cpp/Recon/Global/ComPIDVarF.hh"
 
68
#include "src/common_cpp/Recon/Global/ComPIDVarG.hh"
55
69
 
56
70
 
57
71
namespace MAUS {
60
74
  public:
61
75
    /** Constructor, setting the internal variable #_classname */
62
76
    MapCppGlobalPID();
 
77
    ~MapCppGlobalPID();
63
78
 
64
79
  private:
65
80
    /** @brief Sets up the worker
83
98
     */
84
99
    void _process(MAUS::Data* data) const;
85
100
 
 
101
    /** @brief calculate Confidence Level
 
102
     *
 
103
     *  Calculate the confidence of a track having a given pid from the log likelihoods.
 
104
     *  @param LL_x log-likelihood of pid x
 
105
     *  @param sum_L sum of likelihoods for all pids
 
106
     */
 
107
    double ConfidenceLevel(double LL_x, double sum_L) const;
86
108
 
87
109
    bool _configCheck;
88
110
    /// This will contain the configuration
103
125
    /// The current spill
104
126
    Spill* _spill;
105
127
 
 
128
    /// PID cut limits from datacard
 
129
    double _minA;
 
130
    double _maxA;
 
131
    double _XminB;
 
132
    double _XmaxB;
 
133
    double _YminB;
 
134
    double _YmaxB;
 
135
    double _XminC;
 
136
    double _XmaxC;
 
137
    double _YminC;
 
138
    double _YmaxC;
 
139
    double _minD;
 
140
    double _maxD;
 
141
    double _minE;
 
142
    double _maxE;
 
143
    double _XminF;
 
144
    double _XmaxF;
 
145
    double _YminF;
 
146
    double _YmaxF;
 
147
    double _minG;
 
148
    double _maxG;
 
149
    double _XminH;
 
150
    double _XmaxH;
 
151
    double _YminH;
 
152
    double _YmaxH;
 
153
    double _XminI;
 
154
    double _XmaxI;
 
155
    double _YminI;
 
156
    double _YmaxI;
 
157
    double _XminJ;
 
158
    double _XmaxJ;
 
159
    double _YminJ;
 
160
    double _YmaxJ;
 
161
    double _minComA;
 
162
    double _maxComA;
 
163
    double _XminComB;
 
164
    double _XmaxComB;
 
165
    double _YminComB;
 
166
    double _YmaxComB;
 
167
    double _minComC;
 
168
    double _maxComC;
 
169
    double _minComD;
 
170
    double _maxComD;
 
171
    double _XminComE;
 
172
    double _XmaxComE;
 
173
    double _YminComE;
 
174
    double _YmaxComE;
 
175
    double _minComF;
 
176
    double _maxComF;
 
177
    double _XminComG;
 
178
    double _XmaxComG;
 
179
    double _YminComG;
 
180
    double _YmaxComG;
 
181
    double _XminComH;
 
182
    double _XmaxComH;
 
183
    double _YminComH;
 
184
    double _YmaxComH;
 
185
    double _XminComI;
 
186
    double _XmaxComI;
 
187
    double _YminComI;
 
188
    double _YmaxComI;
 
189
 
 
190
    /// MICE configuration for PID
 
191
    std::string _pid_config;
 
192
 
 
193
    /// PID running mode
 
194
    std::string _pid_mode;
 
195
 
 
196
    /// list of PID variables to be used when mode is custom
 
197
    std::string _custom_pid_set;
 
198
 
106
199
    /// File containing PDFs for use in PID
107
200
    std::string PDF_file;
 
201
 
 
202
    /// Confidence level
 
203
    int _pid_confidence_level;
108
204
  }; // Don't forget this trailing colon!!!!
109
205
} // ~MAUS
110
206