~christopher-hunt08/maus/maus_integrated_kalman

« back to all changes in this revision

Viewing changes to src/common_cpp/Recon/Global/PIDVarH.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 PIDVarH
 
18
 *  @author Celeste Pidcott, University of Warwick
 
19
 *  PID variable class, for EMR density vs momentum measured in the downstream
 
20
 *  tracker, derivedfrom PIDBase
 
21
 */
 
22
 
 
23
#ifndef PIDVARH_HH
 
24
#define PIDVARH_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/PIDBase2D.hh"
 
39
 
 
40
namespace MAUS {
 
41
namespace recon {
 
42
namespace global {
 
43
 
 
44
  class PIDVarH : public PIDBase2D {
 
45
  public:
 
46
    /// Constructor to create a PDF
 
47
    explicit PIDVarH(std::string hypothesis, std::string unique_identifier);
 
48
    /// Constructor to use a PDF to perform PID analysis
 
49
    PIDVarH(TFile* file, std::string hypothesis, int XminH, int XmaxH, int YminH, int YmaxH);
 
50
    /// Destructor
 
51
    ~PIDVarH();
 
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
    /// Plane density in EMR
 
64
    double EMR_density;
 
65
    /// Track Points from global track
 
66
    std::vector<const MAUS::DataStructure::Global::TrackPoint*>
 
67
    global_track_points;
 
68
    /// Tracker 1 track points from global track
 
69
    std::vector<const MAUS::DataStructure::Global::TrackPoint*>
 
70
    tracker1_track_points;
 
71
 
 
72
    /// Name of PID variable
 
73
    static const std::string VARIABLE;
 
74
    /// Number of X bins in PDF
 
75
    static const int XnumBins = 150;
 
76
    /// Minimum value of X range of PDF
 
77
    static const int XminBinH = 50;
 
78
    /// Maximum value of X range of PDF
 
79
    static const int XmaxBinH = 350;
 
80
    /// Number of Y bins in PDF
 
81
    static const int YnumBins = 100;
 
82
    /// Minimum value of Y range of PDF
 
83
    static const int YminBinH = 0;
 
84
    /// Maximum value of Y range of PDF
 
85
    static const int YmaxBinH = 1;
 
86
    /// Minimum value of X cut for PID
 
87
    static const int XminH = 50;
 
88
    /// Maximum value of X cut for PID
 
89
    static const int XmaxH = 350;
 
90
    /// Minimum value of Y cut for PID
 
91
    static const int YminH = 0;
 
92
    /// Maximum value of Y cut for PID
 
93
    static const int YmaxH = 1;
 
94
  };
 
95
}
 
96
}
 
97
}
 
98
 
 
99
#endif