Project

General

Profile

Support #1089 » SciFiEvent.hh

Dobbs, Adam, 05 August 2012 02:48

 
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_SCIFIEVENT_
18
#define _SRC_COMMON_CPP_DATASTRUCTURE_SCIFIEVENT_
19

    
20
// C++ headers
21
#include <vector>
22

    
23
// ROOT headers
24
#include "Rtypes.h"
25

    
26
// MAUS headers
27
#include "src/common_cpp/DataStructure/Hit.hh"
28
#include "src/common_cpp/DataStructure/SciFiDigit.hh"
29
#include "src/common_cpp/DataStructure/SciFiCluster.hh"
30
#include "src/common_cpp/DataStructure/SciFiSpacePoint.hh"
31
#include "src/common_cpp/DataStructure/SciFiStraightPRTrack.hh"
32
#include "src/common_cpp/DataStructure/SciFiHelicalPRTrack.hh"
33

    
34
namespace MAUS {
35

    
36

    
37
/** @class SciFiEvent A container to hold other SciFi containers, representing a particle event
38
 *
39
 */
40

    
41
class SciFiEvent {
42
  public:
43
    /** Default constructor - initialises to 0/NULL */
44
    SciFiEvent();
45

    
46
    /** Copy constructor - any pointers are deep copied */
47
    SciFiEvent(const SciFiEvent& _scifievent);
48

    
49
    /** Assignment operator - any pointers are deep copied */
50
    SciFiEvent& operator=(const SciFiEvent& _scifievent);
51

    
52
    /** Destructor - any member pointers are deleted */
53
    virtual ~SciFiEvent();
54

    
55
    /** Hits */
56
    void add_hit(SciFiHit* hit) { _scifihits.push_back(hit); }
57
    SciFiHitPArray hits() const { return _scifihits; }
58

    
59
    /** Digits */
60
    void add_digit(SciFiDigit* digit) { _scifidigits.push_back(digit); }
61
    SciFiDigitPArray digits() const { return _scifidigits; }
62

    
63
    /** Clusters */
64
    void add_cluster(SciFiCluster* cluster) { _scificlusters.push_back(cluster); }
65
    SciFiClusterPArray clusters() const { return _scificlusters; }
66

    
67
    /** Spacepoints */
68
    void add_spacepoint(SciFiSpacePoint* spacepoint) { _scifispacepoints.push_back(spacepoint); }
69
    SciFiSpacePointPArray spacepoints() const { return _scifispacepoints; }
70

    
71
    /** Seeds */
72
    void add_seeds(SciFiSpacePoint* seed) { _scifiseeds.push_back(seed); }
73
    SciFiSpacePointPArray seeds() const { return _scifiseeds; }
74

    
75
    /** Straight Pattern Recognition tracks */
76
    void add_straightprtrack(SciFiStraightPRTrack track) {
77
                             _scifistraightprtracks.push_back(track); }
78
    void set_straightprtrack(SciFiStraightPRTrackArray tracks) { _scifistraightprtracks = tracks; }
79
    SciFiStraightPRTrackArray straightprtracks() const { return _scifistraightprtracks; }
80

    
81
    /** Helical Pattern Recognition tracks */
82
    void add_helicalprtrack(SciFiHelicalPRTrack track) { _scifihelicalprtracks.push_back(track); }
83
    void set_helicalprtrack(SciFiHelicalPRTrackArray tracks) { _scifihelicalprtracks = tracks; }
84
    SciFiHelicalPRTrackArray helicalprtracks() const { return _scifihelicalprtracks; }
85

    
86

    
87
  private:
88

    
89
    /** Hits in an event */
90
    SciFiHitPArray                      _scifihits;
91

    
92
    /** Digits in an event */
93
    SciFiDigitPArray                    _scifidigits;
94

    
95
    /** Clusters in an event */
96
    SciFiClusterPArray                  _scificlusters;
97

    
98
    /** SpacePoints in an event */
99
    SciFiSpacePointPArray               _scifispacepoints;
100

    
101
    /** Seeds for track fitting */
102
    SciFiSpacePointPArray               _scifiseeds;
103

    
104
    /** Straight tracks */
105
    SciFiStraightPRTrackArray           _scifistraightprtracks;
106

    
107
    /** Helical tracks */
108
    SciFiHelicalPRTrackArray            _scifihelicalprtracks;
109

    
110
    ClassDef(SciFiEvent, 1)
111
};
112

    
113
typedef std::vector<SciFiEvent*> SciFiEventPArray;
114
typedef std::vector<SciFiEvent> SciFiEventArray;
115

    
116
} // ~namespace MAUS
117

    
118
#endif  // _SRC_COMMON_CPP_DATASTRUCTURE_SCIFIEVENT_
119

    
(2-2/3)