PandaRoot
PndPattern.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 /*
14  * PndPattern.h
15  *
16  * Created on: Nov 8, 2017
17  * Author: Michael Papenbrock
18  */
19 
20 #ifndef PNDTRACKERS_PNDPATTERNMATCHER_PNDPATTERN_H_
21 #define PNDTRACKERS_PNDPATTERNMATCHER_PNDPATTERN_H_
22 
23 #include <set>
24 #include <map>
25 #include <vector>
26 #include <TVector3.h>
27 
28 class PndPattern : public TObject {
29  public:
30  PndPattern();
31  virtual ~PndPattern();
32 
33  void Clear();
34 
35  void SetSectorID(int sectorID) { fsectorID = sectorID; }
36  void AddMomentum(TVector3 momentum) { fmomenta.push_back(momentum); }
37  void AddMomenta(std::vector<TVector3> momenta);
38  void AddTubeID(int tubeID) { ftubeIDs.insert(tubeID); }
39  void SetTubeIDs(std::set<int> tubeIDs) { ftubeIDs = tubeIDs; }
40  void RaisePatternCount() { fcount++; }
41  void SetPatternCount(int count) { fcount = count; }
42  bool IsEmpty();
43 
44  std::set<int> GetTubeIDs() const { return ftubeIDs; }
45  short GetSectorID() const { return fsectorID; }
46  int GetCount() const { return fcount; }
47  std::vector<TVector3> GetMomenta() const { return fmomenta; }
48 
49  private:
50  std::set<int> ftubeIDs;
51  short fpdgCode;
52  short fsectorID;
53  int fcount;
54  std::vector<TVector3> fmomenta;
55 
56  ClassDef(PndPattern, 1);
57 };
58 
59 #endif /* PNDTRACKERS_PNDPATTERNMATCHER_PNDPATTERN_H_ */
int GetCount() const
Definition: PndPattern.h:46
void SetPatternCount(int count)
Definition: PndPattern.h:41
void SetTubeIDs(std::set< int > tubeIDs)
Definition: PndPattern.h:39
void RaisePatternCount()
Definition: PndPattern.h:40
std::set< int > GetTubeIDs() const
Definition: PndPattern.h:44
virtual ~PndPattern()
void SetSectorID(int sectorID)
Definition: PndPattern.h:35
void AddMomentum(TVector3 momentum)
Definition: PndPattern.h:36
void Clear()
void AddTubeID(int tubeID)
Definition: PndPattern.h:38
std::vector< TVector3 > GetMomenta() const
Definition: PndPattern.h:47
bool IsEmpty()
short GetSectorID() const
Definition: PndPattern.h:45
void AddMomenta(std::vector< TVector3 > momenta)