ATLAS Offline Software
Loading...
Searching...
No Matches
PADpatterns Class Reference

#include <PADpatterns.h>

Inheritance diagram for PADpatterns:
Collaboration diagram for PADpatterns:

Public Member Functions

 PADpatterns (int, int, unsigned long int)
 PADpatterns (const PADpatterns &)
PADpatterns operator= (const PADpatterns &)
bool operator== (const PADpatterns &) const
bool operator!= (const PADpatterns &) const
bool operator< (const PADpatterns &) const
void load_cma_patterns (CMApatterns *)
PADpatternsoperator<< (CMApatterns *)
int sector (void) const
int pad_id (void) const
unsigned long int debug (void) const
const CMAdata::PatternsListcma_patterns (void) const
Padgive_pad (const RpcCablingCondData *readCdo, int NOBXS, int BCZERO)
void Print (std::ostream &, bool) const
void set_number (int)
int number () const
void PrintElement (std::ostream &, std::string, bool) const
ObjectType tag () const
const std::string & name () const

Private Attributes

int m_sector
int m_pad_id
unsigned long int m_debug
CMAdata::PatternsList m_cma_patterns
std::unique_ptr< Padm_pad
int m_number {}
ObjectType m_tag
std::string m_name

Detailed Description

Definition at line 19 of file PADpatterns.h.

Constructor & Destructor Documentation

◆ PADpatterns() [1/2]

PADpatterns::PADpatterns ( int sector,
int pad,
unsigned long int debug )

Definition at line 13 of file PADpatterns.cxx.

13 :
14 RPCtrigDataObject(0,"PAD patterns"),m_sector(sector),m_pad_id(pad),
16{
17}
unsigned long int debug(void) const
Definition PADpatterns.h:50
int sector(void) const
Definition PADpatterns.h:48
unsigned long int m_debug
Definition PADpatterns.h:27
RPCtrigDataObject(int, const std::string &)

◆ PADpatterns() [2/2]

PADpatterns::PADpatterns ( const PADpatterns & PAD)

Definition at line 19 of file PADpatterns.cxx.

19 :
20 RPCtrigDataObject(PAD.number(),PAD.name())
21{
22 m_sector = PAD.sector();
23 m_pad_id = PAD.pad_id();
24 m_debug = PAD.debug();
26}
const std::string & name() const
Definition BaseObject.h:23
const CMAdata::PatternsList & cma_patterns(void) const
Definition PADpatterns.h:52
CMAdata::PatternsList m_cma_patterns
Definition PADpatterns.h:29
int pad_id(void) const
Definition PADpatterns.h:49

Member Function Documentation

◆ cma_patterns()

const CMAdata::PatternsList & PADpatterns::cma_patterns ( void ) const
inline

Definition at line 52 of file PADpatterns.h.

53 {return m_cma_patterns;}

◆ debug()

unsigned long int PADpatterns::debug ( void ) const
inline

Definition at line 50 of file PADpatterns.h.

50{return m_debug;}

◆ give_pad()

Pad * PADpatterns::give_pad ( const RpcCablingCondData * readCdo,
int NOBXS,
int BCZERO )

Definition at line 83 of file PADpatterns.cxx.

84{
85 if (!m_pad)
86 {
87 int subsystem = (m_sector<32)? 0 : 1;
88 int logic_sector = m_sector%32;
89
90 CMAdata::PatternsList::iterator cma = m_cma_patterns.begin();
91
92 // M.Corradi 26/2/2010 check if old cabling from cma data !
93 bool oldSimulation = false;
94 if (cma!=m_cma_patterns.end()) {
95 if ( (*cma)->cma_parameters().conf_type() != CMAparameters::Atlas){
96 oldSimulation = true;
97 }
98 }
99
100 m_pad = std::make_unique<Pad>(0,0,m_debug,subsystem,logic_sector,m_pad_id,1,oldSimulation, NOBXS);
101
102 //M.Corradi 8/1/2015 get Pad configuration Parameters
103 bool eta_and_phi{}, feet_on{};
104 unsigned short int cma_mask{}, feet_th0{}, feet_th1{}, feet_th2{};
105 auto canBeUShort = [](auto a){return std::in_range<unsigned short>(a);};
106 if (not canBeUShort(m_pad_id) or not canBeUShort(m_sector)){
107 throw std::out_of_range("PADpatterns::give_pad: m_pad_id or m_sector are not within the range of an unsigned short int");
108 }
109 const unsigned short shortPad = static_cast<unsigned short int>(m_pad_id);
110 const unsigned short shortSector = static_cast<unsigned short int>(m_sector);
111 if (readCdo->give_Pad_Parameters(shortSector,
112 shortPad,
113 feet_on,eta_and_phi,cma_mask,
114 feet_th0,feet_th1,feet_th2)){
115 m_pad->setFeetOn(feet_on);
116 m_pad->setFeetThresholds(0,feet_th0);
117 m_pad->setFeetThresholds(1,feet_th1);
118 m_pad->setFeetThresholds(2,feet_th2);
119 // m_pad->display(1);
120 // MASK AND eta_and_phi to be implemented
121
122 }else {
123 std::runtime_error("PADpatterns::give_pad: Could not retrieve Pad Parameters m_sector, m_pad_id = " +
124 std::to_string(m_sector) + ", " + std::to_string(m_pad_id));
125 }
126
127
128 while(cma != m_cma_patterns.end())
129 {
130 Matrix* low_pt_matrix = (*cma)->give_low_pt_matrix(NOBXS, BCZERO);
131 Matrix* high_pt_matrix = (*cma)->give_high_pt_matrix(NOBXS, BCZERO);
132
133 CMAidentity id = (*cma)->cma_parameters().id();
134 int matrix_view = (id.type() == Phi)? 1 : 0;
135 int matrix_id = id.Ixx_index();
136
137 for (int bunch=0;bunch< NOBXS;++bunch)
138 {
139 m_pad->load(0,matrix_view,matrix_id,bunch,
140 low_pt_matrix->getOutputThres(bunch),
141 low_pt_matrix->getOutputOverl(bunch));
142
143 m_pad->load(1,matrix_view,matrix_id,bunch,
144 high_pt_matrix->getOutputThres(bunch),
145 high_pt_matrix->getOutputOverl(bunch));
146 }
147 ++cma;
148 }
149
150 m_pad->execute();
151 }
152 return m_pad.get();
153}
static Double_t a
@ Phi
Definition RPCdef.h:8
ubit16 getOutputThres(ubit16 bunch) const
ubit16 getOutputOverl(ubit16 bunch) const
std::unique_ptr< Pad > m_pad
Definition PADpatterns.h:32
virtual bool give_Pad_Parameters(unsigned short int logic_sector, unsigned short int PADId, bool &feet, bool &eta_and_phi, unsigned short int &cma_mask, unsigned short int &feet_th0, unsigned short int &feet_th1, unsigned short int &feet_th2) const

◆ load_cma_patterns()

void PADpatterns::load_cma_patterns ( CMApatterns * patterns)

Definition at line 69 of file PADpatterns.cxx.

70{
71 m_cma_patterns.push_back(patterns);
72}
std::vector< std::string > patterns
Definition listroot.cxx:187

◆ name()

const std::string & BaseObject::name ( ) const
inlineinherited

Definition at line 23 of file BaseObject.h.

23{ return m_name; }
std::string m_name
Definition BaseObject.h:16

◆ number()

int RPCtrigDataObject::number ( ) const
inlineinherited

Definition at line 30 of file RPCtrigDataObject.h.

30{return m_number;}

◆ operator!=()

bool PADpatterns::operator!= ( const PADpatterns & patterns) const

Definition at line 52 of file PADpatterns.cxx.

53{
54 return !(*this == patterns);
55}

◆ operator<()

bool PADpatterns::operator< ( const PADpatterns & patterns) const

Definition at line 58 of file PADpatterns.cxx.

60{
61 if(m_sector < patterns.sector())
62 {
63 if (m_pad_id < patterns.pad_id() ) return true;
64 }
65 return false;
66}

◆ operator<<()

PADpatterns & PADpatterns::operator<< ( CMApatterns * patterns)

Definition at line 75 of file PADpatterns.cxx.

77{
79 return *this;
80}
void load_cma_patterns(CMApatterns *)

◆ operator=()

PADpatterns PADpatterns::operator= ( const PADpatterns & PAD)

Definition at line 29 of file PADpatterns.cxx.

30{
31 static_cast<RPCtrigDataObject&>(*this) =
32 static_cast<const RPCtrigDataObject&>(PAD);
33 m_sector = PAD.sector();
34 m_pad_id = PAD.pad_id();
35 m_debug = PAD.debug();
36 m_cma_patterns.clear();
38 return *this;
39}

◆ operator==()

bool PADpatterns::operator== ( const PADpatterns & patterns) const

Definition at line 42 of file PADpatterns.cxx.

43{
44 if(m_sector == patterns.sector())
45 {
46 if (m_pad_id == patterns.pad_id() ) return true;
47 }
48 return false;
49}

◆ pad_id()

int PADpatterns::pad_id ( void ) const
inline

Definition at line 49 of file PADpatterns.h.

49{return m_pad_id;}

◆ Print()

void PADpatterns::Print ( std::ostream & stream,
bool detail ) const
virtual

Reimplemented from BaseObject.

Definition at line 156 of file PADpatterns.cxx.

157{
158 stream << name() << " (Id = " << m_pad_id << ") in sector logic "
159 << m_sector << std::endl;
160 stream << "It contains n. " << m_cma_patterns.size()
161 << " CMAs";
162
163 if(detail)
164 {
165 stream << " :" << std::endl;
166 CMAdata::PatternsList::const_iterator cma = m_cma_patterns.begin();
167 while (cma != m_cma_patterns.end())
168 {
169 (*cma)->Print(stream,false);
170 ++cma;
171 }
172 }
173 else stream << "." << std::endl;
174}

◆ PrintElement()

void RPCtrigDataObject::PrintElement ( std::ostream & ,
std::string ,
bool  ) const
inlineinherited

Definition at line 32 of file RPCtrigDataObject.h.

32{}

◆ sector()

int PADpatterns::sector ( void ) const
inline

Definition at line 48 of file PADpatterns.h.

48{return m_sector;}

◆ set_number()

void RPCtrigDataObject::set_number ( int number)
inherited

Definition at line 29 of file RPCtrigDataObject.cxx.

30{
32}

◆ tag()

ObjectType BaseObject::tag ( ) const
inlineinherited

Definition at line 22 of file BaseObject.h.

22{ return m_tag; }
ObjectType m_tag
Definition BaseObject.h:15

Member Data Documentation

◆ m_cma_patterns

CMAdata::PatternsList PADpatterns::m_cma_patterns
private

Definition at line 29 of file PADpatterns.h.

◆ m_debug

unsigned long int PADpatterns::m_debug
private

Definition at line 27 of file PADpatterns.h.

◆ m_name

std::string BaseObject::m_name
privateinherited

Definition at line 16 of file BaseObject.h.

◆ m_number

int RPCtrigDataObject::m_number {}
privateinherited

Definition at line 18 of file RPCtrigDataObject.h.

18{};

◆ m_pad

std::unique_ptr<Pad> PADpatterns::m_pad
private

Definition at line 32 of file PADpatterns.h.

◆ m_pad_id

int PADpatterns::m_pad_id
private

Definition at line 26 of file PADpatterns.h.

◆ m_sector

int PADpatterns::m_sector
private

Definition at line 25 of file PADpatterns.h.

◆ m_tag

ObjectType BaseObject::m_tag
privateinherited

Definition at line 15 of file BaseObject.h.


The documentation for this class was generated from the following files: