-
Notifications
You must be signed in to change notification settings - Fork 4
/
HadAna.h
98 lines (74 loc) · 2.58 KB
/
HadAna.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#ifndef HADANA_H
#define HADANA_H
#include <map>
#include "EventType.h"
#include "EventSelection.h"
#include "SliceParams.h"
#include "BetheBloch.h"
#include "TGraph.h"
class anavar;
class BetheBloch;
class HadAna{
public:
HadAna();
std::map< int, BetheBloch* > map_BB;
void InitPi();
void InitP();
void AddTruePDG(int pdg);
//Check if the desired particle is selected
bool isSelectedPart(const anavar& evt) const;
//Select events with cosmic trigger in data
bool isCosmics(const anavar& evt) const;
// Set beam cut values
void SetBeamQualityCuts(double dx_min = 3, double dx_max = -3,
double dy_min = 3, double dy_max = -3,
double dz_min = -3, double dz_max = 3,
double dxy_min = -1, double dxy_max = 3,
double costh_min = 0.95, double costh_max = 2);
int GetPiParType(const anavar& evt);
int GetPParType(const anavar& evt);
// Pandora slice pdg
int pandora_slice_pdg;
void SetPandoraSlicePDG(int pdg);
bool PassPandoraSliceCut(const anavar& evt) const;
bool PassBeamQualityCut(bool has_angle_cut = true) const;
bool PassBeamXYCut(const anavar& evt) const;
bool PassAPA3Cut(const anavar& evt) const;
bool PassCaloSizeCut(const anavar& evt) const;
bool PassMichelScoreCut() const;
bool PassProtonCut() const;
bool PassPiCuts(const anavar& evt) const;
bool PassPCuts(const anavar& evt) const;
// Event information
void ProcessEvent(const anavar& evt);
int pitype;
int ptype;
double median_dEdx;
double chi2_proton;
double daughter_michel_score;
double dEdx_5cm;
double beam_dx, beam_dy, beam_dz, beam_dxy, beam_costh;
double true_trklen;
double reco_trklen;
std::vector<double> true_trklen_accum;
std::vector<double> reco_trklen_accum;
double true_ffKE;
double Get_true_ffKE(const anavar& evt, double KE_in_TPC, double length_to_ff);
// == Momentum measurement using dE/dx and hit for a short track segment
double Fit_dEdx_Residual_Length(const anavar& evt, const vector<double> & dEdx, const vector<double> & ResRange, int PID, bool save_graph);
double trklen_csda_proton;
double beam_score;
double energy_calorimetry_SCE;
bool fAllTrackCheck = false;
private:
//Selected true pdg list
std::vector<int> truepdglist;
double beamcut_dx_min, beamcut_dx_max;
double beamcut_dy_min, beamcut_dy_max;
double beamcut_dz_min, beamcut_dz_max;
double beamcut_dxy_min, beamcut_dxy_max;
double beamcut_costh_min, beamcut_costh_max;
bool fProtonCSDACheck = true;
TGraph *csda_range_vs_mom_sm;
};
#endif