ATLAS Offline Software
CMApatterns.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef CMAPATTERNS_H
6 #define CMAPATTERNS_H
7 
8 #include <string>
9 #include <list>
10 #include <queue>
11 #include <functional>
13 
16 
18 
19 
21 {
22  public:
23  typedef std::pair < float, float > TRIGdistance;
24  static const TRIGdistance no_distance;
25 
26  typedef std::list < CMAtrigger > TRIGlist;
27  typedef std::priority_queue< CMAtrigger > TrigSigns;
28 
29  private:
30  unsigned long int m_debug;
31 
32  int m_sector;
34 
41 
42  std::unique_ptr<Matrix> m_low_pt_matrix;
43  std::unique_ptr<Matrix> m_high_pt_matrix;
44 
45 
46  bitPATTERN decluster(const bitPATTERN&) const;
48 
49  void update_distance(const TRIGdistance&,TRIGdistance&) const;
50 
52  const bitPATTERN&)const;
54  const bitPATTERN&,const bitPATTERN&)const;
56  CMAtrigger trigger_threshold(int,int,TrigType) const;
57 
60 
62  const bitPATTERN&,const bitPATTERN&) const;
63 
65  const bitPATTERN&) const;
66 
67 
68  void create_hardware(TrigType, uint NOBXS, uint BCZERO);
69  void load_data(int,int,const bitPATTERN&,Matrix*);
70 
71  public:
72  CMApatterns(int,const CMAparameters*,unsigned long int);
73  CMApatterns(const CMApatterns&);
74 
76 
77  bool operator==(const CMApatterns&) const;
78  bool operator!=(const CMApatterns&) const;
79  bool operator< (const CMApatterns&) const;
80 
81  void load_digit(const RPCdigit*);
83 
84  unsigned long int debug(void) const {return m_debug;}
85 
86  int sector(void) const {return m_sector;}
87  const CMAparameters& cma_parameters(void) const {return *m_cma_parameters;}
88 
89  const bitPATTERN& pivot0(void) const {return m_pivot0;}
90  const bitPATTERN& pivot1(void) const {return m_pivot1;}
91  const bitPATTERN& lowPt0(void) const {return m_lowPt0;}
92  const bitPATTERN& lowPt1(void) const {return m_lowPt1;}
93  const bitPATTERN& highPt0(void) const {return m_highPt0;}
94  const bitPATTERN& highPt1(void) const {return m_highPt1;}
95 
97  const
99  const TRIGdistance distance (const RPCdigit*,const RPCdigit*) const;
100 
101  const CMAtrigger give_trigger(Lvl1RPCalgo) const;
102 
103  Matrix* give_low_pt_matrix(uint NOBXS, uint BCZERO);
104  Matrix* give_high_pt_matrix(uint NOBXS, uint BCZERO);
105 
106  void Print (std::ostream&,bool) const;
107 };
108 
109 template <class X> X& operator<<(X& stream,const CMApatterns& data)
110 {
111  std::ostringstream display;
112  data.Print(display,false);
113  stream << display.str();
114  return stream;
115 }
116 
117 
118 #endif
Matrix
Definition: Trigger/TrigT1/TrigT1RPChardware/TrigT1RPChardware/Matrix.h:15
TrigType
TrigType
Definition: TRIGGERidentity.h:17
CMApatterns::find_trigger
CMAtrigger find_trigger(const bitPATTERN &, const bitPATTERN &, const bitPATTERN &) const
Definition: CMApatterns.cxx:466
CMApatterns::m_pivot0
bitPATTERN m_pivot0
Definition: CMApatterns.h:35
CMApatterns::operator<
bool operator<(const CMApatterns &) const
Definition: CMApatterns.cxx:79
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
CMApatterns::m_low_pt_matrix
std::unique_ptr< Matrix > m_low_pt_matrix
Definition: CMApatterns.h:42
CMApatterns::majority
bitPATTERN majority(bitPATTERN &, bitPATTERN &) const
Definition: CMApatterns.cxx:159
bitPATTERN.h
CMApatterns::m_pivot1
bitPATTERN m_pivot1
Definition: CMApatterns.h:36
bitPATTERN
Definition: bitPATTERN.h:13
CMApatterns::m_sector
int m_sector
Definition: CMApatterns.h:32
CMApatterns::load_data
void load_data(int, int, const bitPATTERN &, Matrix *)
Definition: CMApatterns.cxx:940
CMApatterns::no_distance
static const TRIGdistance no_distance
Definition: CMApatterns.h:24
CMApatterns::m_lowPt0
bitPATTERN m_lowPt0
Definition: CMApatterns.h:37
CMApatterns::give_high_pt_matrix
Matrix * give_high_pt_matrix(uint NOBXS, uint BCZERO)
Definition: CMApatterns.cxx:963
CMApatterns::highPt0
const bitPATTERN & highPt0(void) const
Definition: CMApatterns.h:93
CMAparameters.h
CMApatterns::TRIGdistance
std::pair< float, float > TRIGdistance
Definition: CMApatterns.h:23
CMApatterns::pivot0
const bitPATTERN & pivot0(void) const
Definition: CMApatterns.h:89
Matrix.h
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
CMApatterns::m_high_pt_matrix
std::unique_ptr< Matrix > m_high_pt_matrix
Definition: CMApatterns.h:43
CMApatterns::operator==
bool operator==(const CMApatterns &) const
Definition: CMApatterns.cxx:62
operator<<
X & operator<<(X &stream, const CMApatterns &data)
Definition: CMApatterns.h:109
Monitored::X
@ X
Definition: HistogramFillerUtils.h:24
CMApatterns::operator<<
CMApatterns & operator<<(const RPCdigit *)
Definition: CMApatterns.cxx:678
CMApatterns::m_highPt1
bitPATTERN m_highPt1
Definition: CMApatterns.h:40
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
CMApatterns::trigger_threshold
CMAtrigger trigger_threshold(int, int, TrigType) const
Definition: CMApatterns.cxx:629
CMApatterns::cma_parameters
const CMAparameters & cma_parameters(void) const
Definition: CMApatterns.h:87
CMApatterns::operator=
CMApatterns operator=(const CMApatterns &)
Definition: CMApatterns.cxx:45
CMApatterns::coincidence_distance
void coincidence_distance(TRIGdistance &, TRIGdistance &) const
Definition: CMApatterns.cxx:196
CMApatterns::trigger_window
CMAtrigger trigger_window(TRIGdistance, TrigType) const
Definition: CMApatterns.cxx:585
CMApatterns::m_lowPt1
bitPATTERN m_lowPt1
Definition: CMApatterns.h:38
CMApatterns::create_hardware
void create_hardware(TrigType, uint NOBXS, uint BCZERO)
Definition: CMApatterns.cxx:720
CMApatterns::m_cma_parameters
const CMAparameters * m_cma_parameters
Definition: CMApatterns.h:33
pyroot.display
display
Definition: pyroot.py:44
CMApatterns::m_debug
unsigned long int m_debug
Definition: CMApatterns.h:30
CMApatterns::load_digit
void load_digit(const RPCdigit *)
Definition: CMApatterns.cxx:89
CMApatterns::highPt1
const bitPATTERN & highPt1(void) const
Definition: CMApatterns.h:94
CMApatterns::update_distance
void update_distance(const TRIGdistance &, TRIGdistance &) const
Definition: CMApatterns.cxx:190
CMApatterns::debug
unsigned long int debug(void) const
Definition: CMApatterns.h:84
CMApatterns::m_highPt0
bitPATTERN m_highPt0
Definition: CMApatterns.h:39
CMApatterns::Print
void Print(std::ostream &, bool) const
Definition: CMApatterns.cxx:684
CMApatterns::lowPt1
const bitPATTERN & lowPt1(void) const
Definition: CMApatterns.h:92
CMAtrigger
Definition: CMAtrigger.h:23
RPCtrigDataObject
Definition: RPCtrigDataObject.h:15
RPCdigit
Definition: RPCdigit.h:16
Lvl1RPCalgo
Lvl1RPCalgo
Definition: CMAtrigger.h:20
CMApatterns::lowPt0
const bitPATTERN & lowPt0(void) const
Definition: CMApatterns.h:91
CMApatterns::TrigSigns
std::priority_queue< CMAtrigger > TrigSigns
Definition: CMApatterns.h:27
CMAparameters
Definition: CMAparameters.h:21
CMApatterns::search_for_lowPt
void search_for_lowPt(Lvl1RPCalgo, TrigSigns &) const
Definition: CMApatterns.cxx:313
CMApatterns::search_signatures
void search_signatures(Lvl1RPCalgo, TrigType, TrigSigns &, const bitPATTERN &, const bitPATTERN &) const
Definition: CMApatterns.cxx:362
CMApatterns::lowest_distance
const TRIGdistance lowest_distance(const bitPATTERN &, const bitPATTERN &) const
Definition: CMApatterns.cxx:228
CMApatterns::TRIGlist
std::list< CMAtrigger > TRIGlist
Definition: CMApatterns.h:26
CMApatterns::sector
int sector(void) const
Definition: CMApatterns.h:86
CMApatterns::pivot1
const bitPATTERN & pivot1(void) const
Definition: CMApatterns.h:90
CMApatterns::decluster
bitPATTERN decluster(const bitPATTERN &) const
Definition: CMApatterns.cxx:119
CMApatterns
Definition: CMApatterns.h:21
CMApatterns::distance
const TRIGdistance distance(const RPCdigit *, const RPCdigit *) const
Definition: CMApatterns.cxx:253
CMApatterns::CMApatterns
CMApatterns(int, const CMAparameters *, unsigned long int)
Definition: CMApatterns.cxx:18
CMAtrigger.h
CMApatterns::operator!=
bool operator!=(const CMApatterns &) const
Definition: CMApatterns.cxx:72
CMApatterns::search_for_highPt
void search_for_highPt(Lvl1RPCalgo, TrigSigns &) const
Definition: CMApatterns.cxx:333
CMApatterns::give_trigger
const CMAtrigger give_trigger(Lvl1RPCalgo) const
Definition: CMApatterns.cxx:289
CMApatterns::give_low_pt_matrix
Matrix * give_low_pt_matrix(uint NOBXS, uint BCZERO)
Definition: CMApatterns.cxx:954