~christopher-hunt08/maus/maus_integrated_kalman

« back to all changes in this revision

Viewing changes to src/common_cpp/Recon/Global/ComPIDVarC.hh

merging in changes in merge branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of MAUS: http://  micewww.pp.rl.ac.uk:8080/projects/maus
 
2
 * 
 
3
 * MAUS is free software: you can redistribute it and/or modify
 
4
 * it under the terms of the GNU General Public License as published by
 
5
 * the Free Software Foundation, either version 3 of the License, or
 
6
 * (at your option) any later version.
 
7
 * 
 
8
 * MAUS is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 * 
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with MAUS.  If not, see <http://  www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
 /** @class ComPIDVarC
 
18
 *  @author Celeste Pidcott, University of Warwick
 
19
 *  Commissioning PID variable class, for KL ADC charge product, derived
 
20
 *  from PIDBase
 
21
 */
 
22
 
 
23
#ifndef COMPIDVARC_HH
 
24
#define COMPIDVARC_HH
 
25
 
 
26
#include <string>
 
27
#include <utility>
 
28
#include <vector>
 
29
 
 
30
#include "TLorentzVector.h"
 
31
#include "TH1.h"
 
32
#include "TFile.h"
 
33
 
 
34
#include "DataStructure/Global/Track.hh"
 
35
#include "DataStructure/Global/TrackPoint.hh"
 
36
#include "DataStructure/Global/BasePoint.hh"
 
37
 
 
38
#include "Recon/Global/PIDBase1D.hh"
 
39
 
 
40
namespace MAUS {
 
41
namespace recon {
 
42
namespace global {
 
43
 
 
44
  class ComPIDVarC : public PIDBase1D {
 
45
  public:
 
46
    /// Constructor to create a PDF
 
47
    explicit ComPIDVarC(std::string hypothesis, std::string unique_identifier);
 
48
    /// Constructor to use a PDF to perform PID analysis
 
49
    ComPIDVarC(TFile* file, std::string hypothesis, int minD, int maxD);
 
50
    /// Destructor
 
51
    ~ComPIDVarC();
 
52
 
 
53
  private:
 
54
 
 
55
    /** @brief Calculate value of PID variable
 
56
     *
 
57
     *  @param track The track for which the variable is calculated
 
58
     *
 
59
     *  @return Returns value of PID variable
 
60
     */
 
61
    std::pair<double, double> Calc_Var(MAUS::DataStructure::Global::Track* track);
 
62
 
 
63
    /// Track Points from global track
 
64
    std::vector<const MAUS::DataStructure::Global::TrackPoint*>
 
65
    global_track_points;
 
66
    /// KL track points from global track
 
67
    std::vector<const MAUS::DataStructure::Global::TrackPoint*>
 
68
    kl_track_points;
 
69
 
 
70
    /// Name of PID variable
 
71
    static const std::string VARIABLE;
 
72
    /// Number of bins in PDF
 
73
    static const int numBins = 160;
 
74
    /// Minimum value of range of PDF
 
75
    static const int minBinComC = 0;
 
76
    /// Maximum value of range of PDF
 
77
    static const int maxBinComC = 8000;
 
78
    /// Minimum value of cut for PID
 
79
    static const int minComC = 0;
 
80
    /// Maximum value of cut for PID
 
81
    static const int maxComC = 8000;
 
82
  };
 
83
}
 
84
}
 
85
}
 
86
 
 
87
#endif