ATLAS Offline Software
decodeSL.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 namespace TriggerRPC{
8 
9 //****************************************************************************//
10 unsigned short int moreThan2(unsigned long int slword) {
11 //
12 // returns 1 if the rae more than 2 candidates in a sector
13 // returns 0 otherwise
14 //
15  unsigned short int field=0x1;
16  unsigned short int posit=0;
17  return ((slword&((unsigned short int) field<<posit))>>posit);
18 }
19 //****************************************************************************//
20 unsigned short int ROI1(unsigned long int slword) {
21 //
22 // returns the ROI identifier of the highest pT ROI
23 //
24  unsigned short int field=0x1f;
25  unsigned short int posit=1;
26  return ((slword&((unsigned short int) field<<posit))>>posit);
27 }
28 //****************************************************************************//
29 unsigned short int OVL1(unsigned long int slword) {
30 //
31 // returns the Overlap Flag of the highest pT ROI
32 //
33  unsigned short int field=0x3;
34  unsigned short int posit=8;
35  return ((slword&((unsigned short int) field<<posit))>>posit);
36 }
37 //****************************************************************************//
38 unsigned short int ROI2(unsigned long int slword) {
39 //
40 // returns the ROI identifier of the second highest pT ROI
41 //
42  unsigned short int field=0x1f;
43  unsigned short int posit=10;
44  return ((slword&((unsigned short int) field<<posit))>>posit);
45 }
46 //****************************************************************************//
47 unsigned short int OVL2(unsigned long int slword) {
48 //
49 // returns the Overlap Flag of the second highest pT ROI
50 //
51  unsigned short int field=0x3;
52  unsigned short int posit=17;
53  return ((slword&((unsigned short int) field<<posit))>>posit);
54 }
55 //****************************************************************************//
56 unsigned short int PT1(unsigned long int slword) {
57 //
58 // returns the highest pt code
59 //
60  unsigned short int field=0x7;
61  unsigned short int posit=19;
62  unsigned short int ptcode=((slword&((unsigned short int) field<<posit))>>posit);
63  if(!ptcode) {
64  return 0;
65  } else {
66  if(ptcode==7) ptcode=0;
67  }
68  return ptcode;
69 }
70 //****************************************************************************//
71 unsigned short int PT2(unsigned long int slword) {
72 //
73 // returns the second highest pt code
74 //
75  unsigned short int field=0x7;
76  unsigned short int posit=22;
77  unsigned short int ptcode=((slword&((unsigned short int) field<<posit))>>posit);
78  if(!ptcode) {
79  return 0;
80  } else {
81  if(ptcode==7) ptcode=0;
82  }
83  return ptcode;
84 }
85 //****************************************************************************//
86 unsigned short moreThan1_1(unsigned long int slword) {
87 //
88 // returns 1 if the are more than 1 candidates in ROI1
89 // returns 0 otherwise
90 //
91  unsigned short int field=0x1;
92  unsigned short int posit=25;
93  return ((slword&((unsigned short int) field<<posit))>>posit);
94 }
95 //****************************************************************************//
96 unsigned short moreThan1_2(unsigned long int slword) {
97 //
98 // returns 1 if the are more than 1 candidates in ROI2
99 // returns 0 otherwise
100 //
101  unsigned short int field=0x1;
102  unsigned short int posit=26;
103  return ((slword&((unsigned short int) field<<posit))>>posit);
104 }
105 //****************************************************************************//
106 unsigned short BunchXID(unsigned long int slword) {
107 //
108 // returns the Bunch Crossing identifier of this trigger
109 //
110  unsigned short int field=0x7;
111  unsigned short int posit=27;
112  return ((slword&((unsigned short int) field<<posit))>>posit);
113 }
114 
115 
116 }
TriggerRPC::BunchXID
unsigned short BunchXID(unsigned long int slword)
Definition: decodeSL.cxx:106
TriggerRPC::ROI1
unsigned short int ROI1(unsigned long int slword)
Definition: decodeSL.cxx:20
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
TriggerRPC::moreThan1_2
unsigned short moreThan1_2(unsigned long int slword)
Definition: decodeSL.cxx:96
TriggerRPC::OVL2
unsigned short int OVL2(unsigned long int slword)
Definition: decodeSL.cxx:47
ReadOfcFromCool.field
field
Definition: ReadOfcFromCool.py:48
TriggerRPC::ROI2
unsigned short int ROI2(unsigned long int slword)
Definition: decodeSL.cxx:38
TriggerRPC::PT2
unsigned short int PT2(unsigned long int slword)
Definition: decodeSL.cxx:71
TriggerRPC::PT1
unsigned short int PT1(unsigned long int slword)
Definition: decodeSL.cxx:56
decodeSL.h
TriggerRPC::moreThan2
unsigned short int moreThan2(unsigned long int slword)
Definition: decodeSL.cxx:10
TriggerRPC
Definition: decodeSL.cxx:7
TriggerRPC::moreThan1_1
unsigned short moreThan1_1(unsigned long int slword)
Definition: decodeSL.cxx:86
TriggerRPC::OVL1
unsigned short int OVL1(unsigned long int slword)
Definition: decodeSL.cxx:29