forked from marcodeltutto/UBXSec
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVertexCheck.h
More file actions
85 lines (61 loc) · 2.03 KB
/
Copy pathVertexCheck.h
File metadata and controls
85 lines (61 loc) · 2.03 KB
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
/**
* \file VertexCheck.h
*
* \ingroup UBXSec
*
* \brief Class def header for a class VertexCheck
*
* @author Marco Del Tutto
*/
/** \addtogroup UBXSec
@{*/
#ifndef VERTEXCHECK_H
#define VERTEXCHECK_H
#include <iostream>
#include "fhiclcpp/ParameterSet.h"
#include "lardataobj/RecoBase/Track.h"
#include "lardataobj/RecoBase/Vertex.h"
#include "lardataobj/RecoBase/PFParticle.h"
#include "larpandora/LArPandoraInterface/LArPandoraHelper.h"
namespace ubxsec{
/**
\class VertexCheck
User defined class VertexCheck ... these comments are used to generate
doxygen documentation!
*/
class VertexCheck {
public:
/// Default constructor
VertexCheck();
/// Construct setting TPC object and Vertex
VertexCheck(lar_pandora::TrackVector, recob::Vertex);
/// Default destructor
~VertexCheck(){}
/// Configure function parameters
void Configure(fhicl::ParameterSet const& p);
/// Printd the current configuration
void PrintConfig();
/// Sets the TPC object
void SetTPCObj(lar_pandora::TrackVector);
/// Sets the TPC object
void SetVtx(recob::Vertex);
/// Restores flags
void Clear();
/// Returns the distance between two points (the first a 3d array, the second a TVector3...I know...)
double GetDistance(double *, TVector3);
/// Returns the angle between the two longest tracks in the TPC obj
double AngleBetweenLongestTracks();
protected:
lar_pandora::TrackVector _track_v; ///< the TPC object
recob::Vertex _vtx; ///< the vertex
double _max_distance;
bool _tpcObjIsSet, _vtxIsSet;
double xyz[3]; ///< will store vertex location
TVector3 start, end; ///< will store track start and end
double dist; ///< will store track distance
std::vector<recob::Track> keep_track; ///< will store tracks to be kept for calculation
std::vector<TVector3> track_dir; ///< will store the track direction (always away from the vertex) to calcuate the angle
};
}
#endif
/** @} */ // end of doxygen group