/home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/ds/include/RAT/DS/MCNestedTube.hh Source File

Ratpac-two: /home/docs/checkouts/readthedocs.org/user_builds/ratpac/checkouts/latest/src/ds/include/RAT/DS/MCNestedTube.hh Source File
Ratpac-two
MCNestedTube.hh
1 
10 #ifndef __RAT_DS_MCNestedTube__
11 #define __RAT_DS_MCNestedTube__
12 
13 #include <RAT/DS/MCNestedTubeHit.hh>
14 #include <RAT/Log.hh>
15 #include <vector>
16 
17 namespace RAT {
18 namespace DS {
19 
20 class MCNestedTube : public TObject {
21  public:
22  MCNestedTube() : TObject() {}
23  virtual ~MCNestedTube() {}
24 
26  virtual Int_t GetID() const { return id; };
27  virtual void SetID(Int_t _id) { id = _id; };
28 
30  MCNestedTubeHit *GetMCNestedTubeHit(Int_t i) { return &photon[i]; }
31  Int_t GetMCNestedTubeHitCount() const { return photon.size(); }
32  MCNestedTubeHit *AddNewMCNestedTubeHit() {
33  photon.resize(photon.size() + 1);
34  return &photon.back();
35  }
36  void RemoveMCNestedTubeHit(Int_t i) { photon.erase(photon.begin() + i); }
37  void PruneMCNestedTubeHit() { photon.resize(0); }
38  void SortMCNestedTubeHits() { std::sort(photon.begin(), photon.end()); }
39 
40  ClassDef(MCNestedTube, 3);
41 
42  protected:
43  Int_t id;
44  Int_t type;
45  std::vector<MCNestedTubeHit> photon;
46 };
47 
48 } // namespace DS
49 } // namespace RAT
50 
51 #endif
Definition: MCNestedTubeHit.hh:20
Definition: MCNestedTube.hh:20
virtual Int_t GetID() const
Definition: MCNestedTube.hh:26
MCNestedTubeHit * GetMCNestedTubeHit(Int_t i)
Definition: MCNestedTube.hh:30
Definition: CCCrossSecMessenger.hh:29