~christopher-hunt08/maus/maus_integrated_kalman

« back to all changes in this revision

Viewing changes to src/common_cpp/Recon/Global/ComPIDVarA.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 ComPIDVarA
 
18
 *  @author Celeste Pidcott, University of Warwick
 
19
 *  Commissioning PID variable class, for TOF2 time - TOF1 time, derived
 
20
 *  from PIDBase1D
 
21
 */
 
22
 
 
23
#ifndef COMPIDVARA_HH
 
24
#define COMPIDVARA_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/PIDBase1D.hh"
 
38
 
 
39
namespace MAUS {
 
40
namespace recon {
 
41
namespace global {
 
42
 
 
43
  class ComPIDVarA : public PIDBase1D {
 
44
  public:
 
45
    /// Constructor to create a PDF
 
46
    explicit ComPIDVarA(std::string hypothesis, std::string unique_identifier);
 
47
    /// Constructor to use a PDF to perform PID analysis
 
48
    ComPIDVarA(TFile* file, std::string hypothesis, int minComA, int maxComA);
 
49
    /// Destructor
 
50
    ~ComPIDVarA();
 
51
 
 
52
  private:
 
53
 
 
54
    /** @brief Calculate value of PID variable
 
55
     *
 
56
     *  @param track The track for which the variable is calculated
 
57
     *
 
58
     *  @return Returns value of PID variable
 
59
     */
 
60
    std::pair<double, double> Calc_Var(MAUS::DataStructure::Global::Track* track);
 
61
 
 
62
    /// Name of PID variable
 
63
    static const std::string VARIABLE;
 
64
    /// Number of bins in PDF
 
65
    static const int numBins = 200;
 
66
    /// Minimum value of range of PDF
 
67
    static const int minBinComA = 25;
 
68
    /// Maximum value of range of PDF
 
69
    static const int maxBinComA = 65;
 
70
    /// Minimum value of cut for PID
 
71
    static const int minComA = 20;
 
72
    /// Maximum value of cur for PID
 
73
    static const int maxComA = 50;
 
74
  };
 
75
}
 
76
}
 
77
}
 
78
 
 
79
#endif