ParametersNumu.h
Go to the documentation of this file.
1 //
2 // ParametersNumu.hpp
3 // Created by Brian Rebel on 10/29/15.
4 //
5 
6 #ifndef ParametersNumu_hpp
7 #define ParametersNumu_hpp
8 
9 #include "RecoBase/Cluster.h"
10 #include "RecoBase/Energy.h"
11 #include "RecoBase/Prong.h"
12 #include "RecoBase/Track.h"
13 #include "RecoBase/RecoHit.h"
14 #include "RecoBase/Shower.h"
15 #include "RecoBase/Vertex.h"
16 #include "CosRej/CosRejObj.h"
17 #include "CosRej/NueCosRej.h"
18 #include "ShowerLID/ShowerLID.h"
19 #include "ShowerLID/EventLID.h"
20 #include "ReMId/ReMId.h"
21 #include "QEEventFinder/QePId.h"
22 #include "CVN/func/Result.h"
23 #include "NumuEnergy/NumuE.h"
26 #include "Geometry/LiveGeometry.h"
27 
28 namespace skim{
29  class ParametersNumu;
30 }
31 
32 
34 
35 public:
36 
38  ParametersNumu(size_t const& bestTrack,
39  rb::Energy const& energy,
40  remid::ReMId const& remid,
42  cosrej::NueCosRej const& nuecosrej,
43  rb::Vertex const& vertex,
44  std::vector<rb::Track const*> & tracks,
45  std::vector<rb::Shower const*> & showers,
46  std::vector<rb::Prong const*> & prongs,
47  std::vector<slid::ShowerLID const*> & slids,
48  numue::NumuE const& numue,
49  rb::Cluster const& slice,
50  rb::Track const& track,
51  cvn::Result const& cvn,
52  cvn::Result const& cvn2017,
53  bool const& isData);
54  ParametersNumu(size_t const& bestTrack,
55  rb::Energy const& energy,
56  remid::ReMId const& remid,
57  cosrej::CosRejObj const& cosrej,
58  cosrej::NueCosRej const& nuecosrej,
59  rb::Vertex const& vertex,
60  std::vector<rb::Track const*> & tracks,
61  std::vector<rb::Shower const*> & showers,
62  std::vector<rb::Prong const*> & prongs,
63  std::vector<slid::ShowerLID const*> & slids,
64  qeef::QePId const& qepid,
65  numue::NumuE const& numue,
66  rb::Cluster const& slice,
67  rb::Track const& track,
68  cvn::Result const& cvn,
69  cvn::Result const& cvn2017,
70  bool const& isData);
71  ParametersNumu(size_t const& bestTrack,
72  rb::Energy const& energy,
73  remid::ReMId const& remid,
74  cosrej::CosRejObj const& cosrej,
75  cosrej::NueCosRej const& nuecosrej,
76  rb::Vertex const& vertex,
77  std::vector<rb::Track const*> & tracks,
78  std::vector<rb::Shower const*> & showers,
79  std::vector<rb::Prong const*> & prongs,
80  std::vector<slid::ShowerLID const*> & slids,
81  rb::Track const& cosmictrack,
82  numue::NumuE const& numue,
83  rb::Cluster const& slice,
84  rb::Track const& track,
85  cvn::Result const& cvn,
86  cvn::Result const& cvn2017,
87  bool const& isData);
88 // ParametersNumu(caf::StandardRecord const& sr,
89 // bool const& isData);
90 
91  virtual ~ParametersNumu();
92 
93  // this object should not be copied or assigned.
94  //ParametersNumu(ParametersNumu const &) = delete;
95  //ParametersNumu(ParametersNumu &&) = delete;
96  //ParametersNumu & operator = (ParametersNumu const &) = delete;
97  //ParametersNumu & operator = (ParametersNumu &&) = delete;
98 
99  float const& BestPIDTrack() const { return fParameters.fBestPIDTrack; }
100  float const& NeutrinoE() const { return fParameters.fNeutrinoE; }
101  float const& NDHadronicCal() const { return fParameters.fNDHadronicCal; }
102  double const& ReMIdValue() const { return fParameters.fReMIdVal; }
103  float const& QePIDValue() const { return fParameters.fQePIDVal; }
104  float const& QePIDNTracks() const { return fParameters.fQePIDNTracks; }
105  float const& SliceHits() const { return fParameters.fSliceHits; }
106  float const& SliceCellsFromEdge() const { return fParameters.fSliceCellsFromEdge; }
107  float const& SliceClosestEdge() const { return fParameters.fSliceClosestEdge; }
108  int const& SliceNHitsNearEdge(int i) const { return fParameters.fSliceNHitsNearEdge[i]; }
109  float const& SliceContigPlanes() const { return fParameters.fSliceContigPlanes; }
110  float const& SliceMaxPlane() const { return fParameters.fSliceMaxPlane; }
111  float const& SliceMinPlane() const { return fParameters.fSliceMinPlane; }
112  float const& PlanesToFront() const { return fParameters.fPlanesToFront; }
113  float const& PlanesToBack() const { return fParameters.fPlanesToBack; }
114  float const& CosRejKalFwdCell() const { return fParameters.fCosRejKalFwdCell; }
115  float const& CosRejKalBakCell() const { return fParameters.fCosRejKalBakCell; }
116  float const& CosRejAngleKal() const { return fParameters.fCosRejAngleKal; }
117  float const& CosRejCosBakCell() const { return fParameters.fCosRejCosBakCell; }
118  float const& CosRejCosFwdCell() const { return fParameters.fCosRejCosFwdCell; }
119  float const& CosRejConCosPID() const { return fParameters.fCosRejConCosPID; }
120  float const& CosRejKalBakCellND() const { return fParameters.fCosRejKalBakCellND; }
121  float const& CosRejKalFwdCellND() const { return fParameters.fCosRejKalFwdCellND; }
122  float const& CosRejKalYPosAtTrans() const { return fParameters.fCosRejKalYPosAtTrans; }
123  float const& CosRejKalSpeed() const { return fParameters.fCosRejKalSpeed; }
124  float const& CosRejCosSpeed() const { return fParameters.fCosRejCosSpeed; }
125  float const& CosRejCosDirScore() const { return fParameters.fCosRejCosDirScore; }
126  TVector3 const& TrackStart() const { return fParameters.fTrackStart; }
127  TVector3 const& TrackStop() const { return fParameters.fTrackStop; }
128  float const& TrackStartZ() const { return fParameters.fTrackStartZ; }
129  float const& TrackStopZ() const { return fParameters.fTrackStopZ; }
130  TVector3 const& TrackEarliestHitPos() const { return fParameters.fTrackEarliestHitPos; }
131  TVector3 const& TrackLatestHitPos() const { return fParameters.fTrackLatestHitPos; }
132  float const& TrackStartTime() const { return fParameters.fTrackStartTime; }
133  float const& TrackStopTime() const { return fParameters.fTrackStopTime; }
134  int const& TrackNCellsFromEdge() const { return fParameters.fTrackNCellsFromEdge; }
135  int const& TrackClosestEdge() const { return fParameters.fTrackClosestEdge; }
136  int const& TrackNHitsNearEdge(int i) const { return fParameters.fTrackNHitsNearEdge[i]; }
137  TVector3 const& TrackDir() const { return fParameters.fTrackDir; }
138  float const& TrackCCE() const { return fParameters.fTrackCCE; }
139  TVector3 const& CosmicTrackStart() const { return fParameters.fCosmicTrackStart; }
140  TVector3 const& CosmicTrackStop() const { return fParameters.fCosmicTrackStop; }
143  TVector3 const& CosmicTrackDir() const { return fParameters.fCosmicTrackDir; }
144  float const& CosTrackStartTime() const { return fParameters.fCosTrackStartTime; }
145  float const& CosTrackStopTime() const { return fParameters.fCosTrackStopTime; }
146  float const& CosTrackHits() const { return fParameters.fCosTrackHits; }
147  float const& CosTrackXViewHits() const { return fParameters.fCosTrackXViewHits; }
148  float const& CosTrackYViewHits() const { return fParameters.fCosTrackYViewHits; }
150  int const& CosTrackClosestEdge() const { return fParameters.fCosTrackClosestEdge; }
151  int const& CosTrackNHitsNearEdge(int i) const { return fParameters.fCosTrackNHitsNearEdge[i]; }
152  float const& CosTrackTotalADC() const { return fParameters.fCosTrackTotalADC; }
153  float const& CosTrackTotalGeV() const { return fParameters.fCosTrackTotalGeV; }
155  float const& CosTrackMinTNS() const { return fParameters.fCosTrackMinTNS; }
156  TVector3 const& CosTrackMinXYZ() const { return fParameters.fCosTrackMinXYZ; }
157  float const& CosTrackMinPlane() const { return fParameters.fCosTrackMinPlane; }
158  float const& CosTrackMaxTNS() const { return fParameters.fCosTrackMaxTNS; }
159  TVector3 const& CosTrackMaxXYZ() const { return fParameters.fCosTrackMaxXYZ; }
160  float const& CosTrackMaxPlane() const { return fParameters.fCosTrackMaxPlane; }
161  std::vector< rb::RecoHit > AllHits() const { return fParameters.fAllHits; }
163 
164  // Analysis 2017
165  float const& DistAllTop() const { return fParameters.fDistAllTop; }
166  float const& DistAllBottom() const { return fParameters.fDistAllBottom; }
167  float const& DistAllWest() const { return fParameters.fDistAllWest; }
168  float const& DistAllEast() const { return fParameters.fDistAllEast; }
169  float const& DistAllFront() const { return fParameters.fDistAllFront; }
170  float const& DistAllBack() const { return fParameters.fDistAllBack; }
171 
172  float const& NumShowers() const { return fParameters.fNumShowers; }
173  float const& ShowerNumXCell() const { return fParameters.fShowerNumXCell; }
174  float const& ShowerNumYCell() const { return fParameters.fShowerNumYCell; }
175  float const& CosShowers() const { return fParameters.fCosShowers; }
176  float const& ProngLength() const { return fParameters.fProngLength; }
177  float const& ShowerCalE() const { return fParameters.fShowerCalE; }
178  float const& ShowerTotalE() const { return fParameters.fShowerTotalE; }
179  float const& FracShowerHits() const { return fParameters.fFracShowerHits; }
180  TVector3 const& ShowerDir() const { return fShowerDir; }
181  TVector3 const& ShowerEnd() const { return fShowerEnd; }
182  TVector3 const& ShowerVertex() const { return fShowerVertex; }
183  float const& ShowerVtxDist() const { return fParameters.fShowerVtxDist; }
184  float const& ShowerPt() const { return fParameters.fShowerPt; }
185  float const& ShowerMinX() const { return fParameters.fShowerMinX; }
186  float const& ShowerMinY() const { return fParameters.fShowerMinY; }
187  float const& ShowerMaxX() const { return fParameters.fShowerMaxX; }
188  float const& ShowerMaxY() const { return fParameters.fShowerMaxY; }
189  float const& ShowerMinVtxZ() const { return fParameters.fShowerMinVtxZ; }
190  float const& ShowerMinEndZ() const { return fParameters.fShowerMinEndZ; }
191  float const& ShowerMaxVtxZ() const { return fParameters.fShowerMaxVtxZ; }
192  float const& ShowerMaxEndZ() const { return fParameters.fShowerMaxEndZ; }
193  TVector3 const& Vertex() const { return fVertex; }
194  float const& VertexMaxW() const { return fParameters.fVertexMaxW; }
195  float const& NumShowersLID() const { return fParameters.fNumShowersLID; }
196 
197  float const& CVNValue() const { return fParameters.fCVNVal; }
198  float const& CVN2017Value() const { return fParameters.fCVN2017Val; }
199 
200  //Analysis 2018
201  float const& NueCosRejPngPtp() const { return fParameters.fNueCosRejPngPtp; }
202 
203  // Tracks in Mun Catcher
204  float const& MaxOtherTrackStartZ() const { return fParameters.fOtherTrackMaxVtxZ; }
205  float const& MaxOtherTrackStopZ() const { return fParameters.fOtherTrackMaxEndZ; }
206 
207  // all the values at once - useful for trees
208  NumuCutParameters const& ParametersStruct() const { return fParameters; }
209 
210  // float A2017NumuMuE (float rawEM, float rawHA);
211  // float A2017NumuHadE (float rawEM, float rawHA);
212  // float A2017NumuRecoE(float rawEM, float rawHA);
213  void Compare(NumuCutParameters const& compCuts);
214 
215  friend std::ostream& operator<< (std::ostream& o, ParametersNumu const& p);
216 
217 private:
218 
219  NumuCutParameters fParameters; ///< the relevant parameters to cut on for a numu selection
220 
221  void GetDetectorEdges();
222  float ProjectDistToEdge(TVector3 Pos,
223  TVector3 Dir);
224  std::pair<TVector3,TVector3> EarliestLatestHitPos(rb::Track const& track,
225  bool cosmictrack);
226 
227  TVector3 fShowerDir;
228  TVector3 fShowerEnd;
229  TVector3 fShowerVertex;
230  TVector3 fVertex;
231 
232  double fEdgeXPlusXZ;
234  double fEdgeFrontXZ;
235  double fEdgeBackXZ;
236  double fEdgeTopYZ;
238  double fEdgeFrontYZ;
239  double fEdgeBackYZ;
240  double fNumCells;
241  double fNumDiblocks;
242 
243 };
244 
245 
246 #endif /* ParametersNumu_hpp */
TVector3 fTrackDir
track direction (unit vector) at start point
float fShowerMaxVtxZ
maximum Z position of all showers
float const & TrackStopTime() const
TVector3 const & TrackLatestHitPos() const
TVector3 const & CosmicTrackDir() const
float const & SliceClosestEdge() const
int fTrackNHitsNearEdge[10]
float const & ProngLength() const
int const & CosTrackClosestEdge() const
A 3D position and time representing an interaction vertex.
Definition: Vertex.h:15
float fNumShowersLID
size of showerLIDs in a slice
float fFracShowerHits
fraction of slice hits in the primary shower
TVector3 fTrackStop
track end position (cm)
float const & CosTrackMinTNS() const
float const & ShowerMinVtxZ() const
float const & NumShowers() const
float fShowerMaxY
max y for all shower end points
float const & SliceCellsFromEdge() const
float fDistAllBottom
distance of all showers in slice from the bottom edge of detector
Definition: event.h:34
float const & MaxOtherTrackStartZ() const
Energy estimators for CC events.
Definition: FillEnergies.h:7
float fPlanesToFront
number of planes to the front of detector
float const & SliceHits() const
float const & CosRejCosFwdCell() const
float const & CosTrackStopTime() const
float fDistAllFront
distance of all showers in slice from the front edge of detector
float fDistAllEast
distance of all showers in slice from the east edge of detector
TVector3 fCosTrackMinXYZ
TVector3 const & TrackDir() const
float const & PlanesToBack() const
float fNeutrinoE
neutrino energy
float fShowerMinY
min y for all shower end points
TVector3 const & Vertex() const
float const & ShowerMaxVtxZ() const
int const & CosTrackNHitsNearEdge(int i) const
float fDistAllTop
distance of all showers in slice from the top edge of detector
float fSliceMaxPlane
maximum plane of the slice
float fTrackStopTime
track end time (ns)
int const & TrackNCellsFromEdge() const
float const & ShowerMinEndZ() const
ush Pos
Definition: deflate.h:89
float const & DiffLastFirstLiveDiblock() const
const char * p
Definition: xmltok.h:285
float fShowerNumXCell
number of x cells in slice
float const & ShowerMaxY() const
float fCosShowers
cosine of angle between showers in slice
Definition: event.h:19
int const & CosTrackNCellsFromEdge() const
A collection of associated CellHits.
Definition: Cluster.h:47
float const & CVN2017Value() const
float fCVN2017Val
value of the Old (2017) CVN PID //Analysis 2018
float fOtherTrackMaxVtxZ
maximum Z position of non Best-RemID tracks
double const & ReMIdValue() const
std::vector< rb::RecoHit > AllHits() const
float const & QePIDValue() const
float fShowerMinEndZ
minimum Z position of all showers
float fSliceHits
hits in the slice
A rb::Prong with full reconstructed trajectory.
Definition: Track.h:20
NumuCutParameters const & ParametersStruct() const
float const & ShowerNumXCell() const
float const & ShowerMinX() const
Defines an enumeration for prong classification.
float const & CosRejCosBakCell() const
float const & SliceContigPlanes() const
float const & CosRejKalBakCellND() const
Module to create a summary of total POT seen in a job.
Definition: Evaluator.h:27
TVector3 fCosTrackMaxXYZ
float fCosRejCosSpeed
inverse speed of the timing fit of the cosmic track
int fTrackClosestEdge
0:-x, 1:+x, 2:-y or 3:+y
float fDiffLastFirstLiveDiblock
float fTrackStopZ
track end z position
float const & SliceMinPlane() const
float fSliceCellsFromEdge
minimum cells to edge of detector
float const & DistAllWest() const
TVector3 fTrackLatestHitPos
position (cm) or track&#39;s latest hit in time
float const & CosTrackMaxPlane() const
float fDistAllBack
distance of all showers in slice from the back edge of detector
TVector3 const & CosmicTrackStart() const
float const & CosRejKalFwdCellND() const
float ProjectDistToEdge(TVector3 Pos, TVector3 Dir)
float const & CosRejKalFwdCell() const
float const & ShowerNumYCell() const
Result for CVN.
TVector3 const & CosmicTrackLatestHitPos() const
int const & SliceNHitsNearEdge(int i) const
TVector3 const & ShowerDir() const
float fCosRejKalBakCell
just what it looks like
float fShowerMinX
min x for all shower end points
float const & TrackCCE() const
float const & TrackStartTime() const
float const & DistAllTop() const
float const & CosTrackStartTime() const
float fVertexMaxW
maximum w value of the vertex
float fTrackStartZ
track starting z position
float const & CosRejAngleKal() const
int const & TrackClosestEdge() const
float const & CosTrackXViewHits() const
float const & TrackStopZ() const
float const & CVNValue() const
int const & TrackNHitsNearEdge(int i) const
double energy
Definition: plottest35.C:25
TVector3 fTrackEarliestHitPos
position (cm) or track&#39;s earliest hit in time
float fSliceClosestEdge
0:-x, 1:+x, 2:-y or 3:+y
friend std::ostream & operator<<(std::ostream &o, ParametersNumu const &p)
float const & MaxOtherTrackStopZ() const
float fTrackStartTime
track starting (ns)
float fCosRejKalSpeed
inverse speed of the timing fit of the kalman track
float const & CosTrackMaxTNS() const
float fCVNVal
value of the CVN PID
TVector3 const & CosmicTrackStop() const
float fNumShowers
number of showers in slice
TVector3 const & TrackStart() const
float fCosRejKalYPosAtTrans
just what it looks like
float const & CosRejCosDirScore() const
float fShowerVtxDist
distance between the shower vertex and interaction vertex
TVector3 fCosmicTrackLatestHitPos
float const & ShowerCalE() const
float const & CosRejCosSpeed() const
Vertex location in position and time.
float fNDHadronicCal
hadronic energy in the ND
float const & CosRejKalBakCell() const
float const & ShowerTotalE() const
TVector3 const & CosTrackMinXYZ() const
float fShowerMinVtxZ
minimum Z position of all showers
float const & CosTrackTotalADC() const
float const & FracShowerHits() const
TVector3 fCosmicTrackEarliestHitPos
TVector3 const & CosmicTrackEarliestHitPos() const
float const & CosTrackTotalCalorimetricEnergy() const
float const & TrackStartZ() const
float fShowerCalE
calorimetric energy in primary shower in slice
float const & CosRejKalYPosAtTrans() const
Cosmic Rejection PIDs for Numu analysis.
Definition: FillParentInfo.h:9
TVector3 fCosmicTrackStart
void Compare(NumuCutParameters const &compCuts)
float const & PlanesToFront() const
float fSliceContigPlanes
contiguous planes in slice
Result, basic output of CVN neural net.
Definition: Result.h:15
float const & NumShowersLID() const
float fOtherTrackMaxEndZ
maximum Z position of non Best-RemID tracks
A container for energy information.
Definition: Energy.h:20
float const & CosTrackHits() const
float fCosRejCosDirScore
difference between hough scores for timing fits of the cosmic track going forward and backwards ...
float const & DistAllBottom() const
float const & DistAllEast() const
TVector3 const & CosTrackMaxXYZ() const
TVector3 const & TrackEarliestHitPos() const
float fQePIDVal
value of QePId parameter
float const & SliceMaxPlane() const
float fShowerMaxEndZ
maximum Z position of all showers
float fProngLength
length of largest prong in slice
float const & CosRejKalSpeed() const
float const & VertexMaxW() const
std::vector< rb::RecoHit > fAllHits
all hits in track
TVector3 const & ShowerEnd() const
float const & CosTrackYViewHits() const
float fTrackCCE
track CC energy
float const & ShowerVtxDist() const
float fBestPIDTrack
track with the best PID
TVector3 fCosmicTrackStop
TVector3 fTrackStart
track starting position (cm)
float fQePIDNTracks
number of tracks for QePID
float fCosRejKalFwdCell
just what it looks like
float const & BestPIDTrack() const
float fDistAllWest
distance of all showers in slice from the west edge of detector
float const & CosShowers() const
NumuCutParameters fParameters
the relevant parameters to cut on for a numu selection
float const & NDHadronicCal() const
float const & DistAllFront() const
float const & QePIDNTracks() const
A PID for muons.
Definition: FillPIDs.h:10
float fShowerNumYCell
number of y cells in slice
TVector3 fCosmicTrackDir
float fSliceMinPlane
minimum plane of the slice
float const & CosRejConCosPID() const
float const & ShowerMaxX() const
float fCosTrackTotalCalorimetricEnergy
std::pair< TVector3, TVector3 > EarliestLatestHitPos(rb::Track const &track, bool cosmictrack)
float const & NueCosRejPngPtp() const
float const & CosTrackTotalGeV() const
float fShowerPt
shower transverse momentum
int fCosTrackNHitsNearEdge[10]
int fSliceNHitsNearEdge[10]
fSliceNHitsNearEdge[i] = Number of hits within i cells of the x or y edges
TVector3 const & ShowerVertex() const
float const & NeutrinoE() const
float const & ShowerMinY() const
TVector3 const & TrackStop() const
float const & ShowerMaxEndZ() const
double fReMIdVal
value of ReMId parameter
float const & CosTrackMinPlane() const
float fShowerTotalE
TotalE energy in primary shower in slice.
float fShowerMaxX
max x for all shower end points
float const & DistAllBack() const
float const & ShowerPt() const
float fPlanesToBack
number of planes to the back of the detector