~christopher-hunt08/maus/maus_integrated_kalman

« back to all changes in this revision

Viewing changes to src/common_cpp/Recon/Global/ComPIDVarG.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 ComPIDVarG
 
18
 *  @author Celeste Pidcott, University of Warwick
 
19
 *  Comissioning PID variable class, for EMR density vs TOF1-TOF2 time of flight,
 
20
 *  derived from PIDBase
 
21
 */
 
22
 
 
23
#ifndef COMPIDVARG_HH
 
24
#define COMPIDVARG_HH
 
25
 
 
26
#include <string>
 
27
#include <utility>
 
28
 
 
29
#include "TLorentzVector.h"
 
30
#include "TH1.h"
 
31
#include "TFile.h"
 
32
 
 
33
#include "DataStructure/Global/Track.hh"
 
34
#include "DataStructure/Global/TrackPoint.hh"
 
35
#include "DataStructure/Global/BasePoint.hh"
 
36
 
 
37
#include "Recon/Global/PIDBase2D.hh"
 
38
 
 
39
namespace MAUS {
 
40
namespace recon {
 
41
namespace global {
 
42
 
 
43
  class ComPIDVarG : public PIDBase2D {
 
44
  public:
 
45
    /// Constructor to create a PDF
 
46
    explicit ComPIDVarG(std::string hypothesis, std::string unique_identifier);
 
47
    /// Constructor to use a PDF to perform PID analysis
 
48
    ComPIDVarG(TFile* file, std::string hypothesis, int XminComG,
 
49
               int XmaxComG, int YminComG, int YmaxComG);
 
50
    /// Destructor
 
51
    ~ComPIDVarG();
 
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
    /// (Primary) range of particle in EMR
 
64
    double EMR_density;
 
65
 
 
66
    /// Name of PID variable
 
67
    static const std::string VARIABLE;
 
68
    /// Number of X bins in PDF
 
69
    static const int XnumBins = 80;
 
70
    /// Minimum value of X range of PDF
 
71
    static const int XminBinComG = 30;
 
72
    /// Maximum value of X range of PDF
 
73
    static const int XmaxBinComG = 70;
 
74
    /// Number of Y bins in PDF
 
75
    static const int YnumBins = 100;
 
76
    /// Minimum value of Y range of PDF
 
77
    static const int YminBinComG = 0;
 
78
    /// Maximum value of Y range of PDF
 
79
    static const int YmaxBinComG = 1;
 
80
    /// Minimum value of X cut for PID
 
81
    static const int XminComG = 20;
 
82
    /// Maximum value of X cut for PID
 
83
    static const int XmaxComG = 40;
 
84
    /// Minimum value of Y cut for PID
 
85
    static const int YminComG = 0;
 
86
    /// Maximum value of Y cut for PID
 
87
    static const int YmaxComG = 1;
 
88
  };
 
89
}
 
90
}
 
91
}
 
92
 
 
93
#endif