1
|
/* This file is part of MAUS: http://micewww.pp.rl.ac.uk/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
|
#ifndef _SRC_COMMON_CPP_DATASTRUCTURE_GLOBALPRIMARYCHAIN_HH_
|
18
|
#define _SRC_COMMON_CPP_DATASTRUCTURE_GLOBALPRIMARYCHAIN_HH_
|
19
|
|
20
|
// C++ headers
|
21
|
#include <string>
|
22
|
#include <vector>
|
23
|
|
24
|
// ROOT headers
|
25
|
#include "TObject.h"
|
26
|
#include "TRefArray.h"
|
27
|
#include "Rtypes.h"
|
28
|
|
29
|
// MAUS headers
|
30
|
#include "src/common_cpp/Utils/VersionNumber.hh"
|
31
|
#include "Utils/Exception.hh"
|
32
|
#include "DataStructure/Global/Track.hh"
|
33
|
#include "DataStructure/Global/SpacePoint.hh"
|
34
|
|
35
|
namespace MAUS {
|
36
|
namespace DataStructure {
|
37
|
namespace Global {
|
38
|
|
39
|
class PrimaryChain : public TObject {
|
40
|
public:
|
41
|
|
42
|
/// Default constructor - initialises to 0/NULL
|
43
|
PrimaryChain();
|
44
|
|
45
|
/// Copy constructor - any pointers are deep copied
|
46
|
PrimaryChain(const PrimaryChain &primary_chain);
|
47
|
|
48
|
/// Constructor setting mapper name - everything else initialises to
|
49
|
/// 0/NULL
|
50
|
explicit PrimaryChain(std::string mapper_name);
|
51
|
|
52
|
/// Destructor
|
53
|
virtual ~PrimaryChain();
|
54
|
|
55
|
/// Assignment operator
|
56
|
PrimaryChain& operator=(const PrimaryChain &primary_chain);
|
57
|
|
58
|
void AddLRSpacePoint(SpacePoint* spacepoint);
|
59
|
|
60
|
void AddLRTrack(Track* track);
|
61
|
|
62
|
void AddTrack(Track* track);
|
63
|
|
64
|
std::vector<SpacePoint*> GetLRSpacePoints() const;
|
65
|
|
66
|
std::vector<Track*> GetLRTracks() const;
|
67
|
|
68
|
std::vector<Track*> GetTracks() const;
|
69
|
|
70
|
std::vector<Track*> GetTracks(std::string mapper_name) const;
|
71
|
|
72
|
TRefArray* get_lr_spacepoints() const { return _lr_spacepoints; }
|
73
|
|
74
|
void set_lr_spacepoints(TRefArray* lr_spacepoints) const {
|
75
|
_lr_spacepoints = lr_spacepoints; }
|
76
|
|
77
|
TRefArray* get_lr_tracks() const { return _lr_tracks; }
|
78
|
|
79
|
void set_lr_tracks(TRefArray* lr_tracks) const { _lr_tracks = lr_tracks; }
|
80
|
|
81
|
TRefArray* get_tracks() const { return _tracks; }
|
82
|
|
83
|
void set_tracks(TRefArray* tracks) const { _tracks = tracks; }
|
84
|
|
85
|
// Getters and Setters for the member variables
|
86
|
/// Set the name for the mapper which produced the result, #_mapper_name.
|
87
|
void set_mapper_name(std::string mapper_name);
|
88
|
/// Get the name for the mapper which produced the result, #_mapper_name.
|
89
|
std::string get_mapper_name() const;
|
90
|
|
91
|
|
92
|
private:
|
93
|
|
94
|
/// The name of the mapper that last edited this object
|
95
|
std::string _mapper_name;
|
96
|
|
97
|
/// All SpacePoints in the Event from Local Reconstruction (TOFs, CKovs, KL)
|
98
|
TRefArray* _lr_spacepoints;
|
99
|
|
100
|
/// All Tracks in the Event from Local Reconstruction (Trackers, EMR)
|
101
|
TRefArray* _lr_tracks;
|
102
|
|
103
|
/// All Tracks created in the track-matching, PID, and track-fitting
|
104
|
TRefArray* _tracks;
|
105
|
|
106
|
|
107
|
MAUS_VERSIONED_CLASS_DEF(PrimaryChain);
|
108
|
}; // ~class PrimaryChain
|
109
|
|
110
|
} // ~namespace Global
|
111
|
} // ~namespace DataStructure
|
112
|
} // ~namespace MAUS
|
113
|
|
114
|
#endif
|