CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
L1Analysis::L1AnalysisGT Class Reference

#include <L1AnalysisGT.h>

Public Member Functions

L1AnalysisGTDataFormatgetData ()
 
 L1AnalysisGT ()
 
void Reset ()
 
void Set (const L1GlobalTriggerReadoutRecord *gtrr)
 
void SetEvm (const L1GlobalTriggerEvmReadoutRecord *gtevmrr)
 
 ~L1AnalysisGT ()
 

Private Attributes

L1AnalysisGTDataFormat gt_
 

Detailed Description

Definition at line 17 of file L1AnalysisGT.h.

Constructor & Destructor Documentation

L1Analysis::L1AnalysisGT::L1AnalysisGT ( )

Definition at line 5 of file L1AnalysisGT.cc.

5 {}
L1Analysis::L1AnalysisGT::~L1AnalysisGT ( )

Definition at line 7 of file L1AnalysisGT.cc.

7 {}

Member Function Documentation

L1AnalysisGTDataFormat* L1Analysis::L1AnalysisGT::getData ( void  )
inline

Definition at line 25 of file L1AnalysisGT.h.

References gt_.

25 { return &gt_; }
L1AnalysisGTDataFormat gt_
Definition: L1AnalysisGT.h:28
void L1Analysis::L1AnalysisGT::Reset ( )
inline

Definition at line 24 of file L1AnalysisGT.h.

References gt_, and L1Analysis::L1AnalysisGTDataFormat::Reset().

void L1Analysis::L1AnalysisGT::Set ( const L1GlobalTriggerReadoutRecord gtrr)

get Global Trigger algo and technical triger bit statistics

Definition at line 34 of file L1AnalysisGT.cc.

References L1GtPsbWord::aData(), L1GtPsbWord::bData(), L1GlobalTriggerReadoutRecord::decisionWord(), L1GlobalTriggerReadoutRecord::gtFdlWord(), L1GlobalTriggerReadoutRecord::gtPsbWord(), and L1GlobalTriggerReadoutRecord::technicalTriggerWord().

34  {
35  for (int ibx = -1; ibx <= 1; ibx++) {
36  const L1GtPsbWord psb = gtrr->gtPsbWord(0xbb0d, ibx);
37  const L1GtPsbWord psb2 = gtrr->gtPsbWord(0xbb0e, ibx);
38 
39  // ------ ETT, ETM, HTT and HTM from PSB14:
40 
41  if (ibx == 0) {
42  int psb_ett = psb2.aData(4);
43  int ett_rank = psb_ett & 0xfff;
44  gt_.RankETT = ett_rank;
45  gt_.OvETT = (psb_ett >> 12) & 0x1;
46 
47  int psb_htt = psb2.bData(4);
48  int htt_rank = psb_htt & 0xfff;
49  gt_.RankHTT = htt_rank;
50  gt_.OvHTT = (psb_htt >> 12) & 0x1;
51 
52  int psb_etmis = psb2.aData(5);
53  int etmis_rank = psb_etmis & 0xfff;
54  int psb_etmis_phi = psb2.bData(5) & 0x7F;
55  gt_.RankETM = etmis_rank;
56  gt_.PhiETM = psb_etmis_phi;
57  gt_.OvETM = (psb_etmis >> 12) & 0x1;
58 
59  int psb_htmis = psb2.aData(3);
60  int htmis_rank = (psb_htmis >> 5) & 0x7f;
61  int htmis_phi = psb_htmis & 0x1F;
62  gt_.RankHTM = htmis_rank;
63  gt_.PhiHTM = htmis_phi;
64  gt_.OvHTM = (psb_htmis >> 12) & 0x1;
65  }
66 
67  // =---------------------------------------------
68 
69  std::vector<int> psbel;
70  psbel.push_back(psb.aData(4));
71  psbel.push_back(psb.aData(5));
72  psbel.push_back(psb.bData(4));
73  psbel.push_back(psb.bData(5));
74  std::vector<int>::const_iterator ipsbel;
75  for (ipsbel = psbel.begin(); ipsbel != psbel.end(); ipsbel++) {
76  float rank = (*ipsbel) & 0x3f;
77  if (rank > 0) {
78  gt_.Bxel.push_back(ibx);
79  gt_.Rankel.push_back(rank);
80  gt_.Phiel.push_back(((*ipsbel) >> 10) & 0x1f);
81  gt_.Etael.push_back((((*ipsbel >> 9) & 1) ? 10 - (((*ipsbel) >> 6) & 7) : (((*ipsbel) >> 6) & 7) + 11));
82  gt_.Isoel.push_back(false);
83  }
84  }
85  psbel.clear();
86  psbel.push_back(psb.aData(6));
87  psbel.push_back(psb.aData(7));
88  psbel.push_back(psb.bData(6));
89  psbel.push_back(psb.bData(7));
90  for (ipsbel = psbel.begin(); ipsbel != psbel.end(); ipsbel++) {
91  float rank = (*ipsbel) & 0x3f;
92  if (rank > 0) {
93  gt_.Bxel.push_back(ibx);
94  gt_.Rankel.push_back(rank);
95  gt_.Phiel.push_back(((*ipsbel) >> 10) & 0x1f);
96  gt_.Etael.push_back((((*ipsbel >> 9) & 1) ? 10 - (((*ipsbel) >> 6) & 7) : (((*ipsbel) >> 6) & 7) + 11));
97  gt_.Isoel.push_back(true);
98  }
99  }
100 
101  // central jets
102  std::vector<int> psbjet;
103  psbjet.push_back(psb.aData(2));
104  psbjet.push_back(psb.aData(3));
105  psbjet.push_back(psb.bData(2));
106  psbjet.push_back(psb.bData(3));
107  std::vector<int>::const_iterator ipsbjet;
108  for (ipsbjet = psbjet.begin(); ipsbjet != psbjet.end(); ipsbjet++) {
109  float rank = (*ipsbjet) & 0x3f;
110  if (rank > 0) {
111  gt_.Bxjet.push_back(ibx);
112  gt_.Rankjet.push_back(rank);
113  gt_.Phijet.push_back(((*ipsbjet) >> 10) & 0x1f);
114  gt_.Etajet.push_back((((*ipsbjet >> 9) & 1) ? 10 - (((*ipsbjet) >> 6) & 7) : (((*ipsbjet) >> 6) & 7) + 11));
115  gt_.Taujet.push_back(false);
116  gt_.Fwdjet.push_back(false);
117  }
118  }
119 
120  // tau jets
121  psbjet.clear();
122  psbjet.push_back(psb2.aData(6));
123  psbjet.push_back(psb2.aData(7));
124  psbjet.push_back(psb2.bData(6));
125  psbjet.push_back(psb2.bData(7));
126  for (ipsbjet = psbjet.begin(); ipsbjet != psbjet.end(); ipsbjet++) {
127  float rank = (*ipsbjet) & 0x3f;
128  if (rank > 0) {
129  gt_.Bxjet.push_back(ibx);
130  gt_.Rankjet.push_back(rank);
131  gt_.Phijet.push_back(((*ipsbjet) >> 10) & 0x1f);
132  gt_.Etajet.push_back((((*ipsbjet >> 9) & 1) ? 10 - (((*ipsbjet) >> 6) & 7) : (((*ipsbjet) >> 6) & 7) + 11));
133  gt_.Taujet.push_back(true);
134  gt_.Fwdjet.push_back(false);
135  }
136  }
137 
138  // forward jets
139  psbjet.clear();
140  psbjet.push_back(psb.aData(0));
141  psbjet.push_back(psb.aData(1));
142  psbjet.push_back(psb.bData(0));
143  psbjet.push_back(psb.bData(1));
144  for (ipsbjet = psbjet.begin(); ipsbjet != psbjet.end(); ipsbjet++) {
145  float rank = (*ipsbjet) & 0x3f;
146  if (rank > 0) {
147  gt_.Bxjet.push_back(ibx);
148  gt_.Rankjet.push_back(rank);
149  gt_.Phijet.push_back(((*ipsbjet) >> 10) & 0x1f);
150  gt_.Etajet.push_back((((*ipsbjet >> 9) & 1) ? 3 - (((*ipsbjet) >> 6) & 7) : (((*ipsbjet) >> 6) & 7) + 18));
151  gt_.Taujet.push_back(false);
152  gt_.Fwdjet.push_back(true);
153  }
154  }
155  }
156  gt_.Nele = gt_.Bxel.size();
157  gt_.Njet = gt_.Bxjet.size();
158 
159  L1GtFdlWord fdlWord = gtrr->gtFdlWord();
160 
162  gt_.tw1.resize(5, 0);
163  gt_.tw2.resize(5, 0);
164  gt_.tt.resize(5, 0);
165 
166  for (int iebx = 0; iebx < 5; iebx++) {
167  DecisionWord gtDecisionWord = gtrr->decisionWord(iebx - 2);
168 
169  int dbitNumber = 0;
170 
171  DecisionWord::const_iterator GTdbitItr;
172  for (GTdbitItr = gtDecisionWord.begin(); GTdbitItr != gtDecisionWord.end(); GTdbitItr++) {
173  if (*GTdbitItr) {
174  if (dbitNumber < 64) {
175  gt_.tw1[iebx] |= (1LL << dbitNumber);
176  } else {
177  gt_.tw2[iebx] |= (1LL << (dbitNumber - 64));
178  }
179  }
180  dbitNumber++;
181  }
182 
183  dbitNumber = 0;
184  TechnicalTriggerWord gtTTWord = gtrr->technicalTriggerWord(iebx - 2);
185  TechnicalTriggerWord::const_iterator GTtbitItr;
186  for (GTtbitItr = gtTTWord.begin(); GTtbitItr != gtTTWord.end(); GTtbitItr++) {
187  if (*GTtbitItr) {
188  gt_.tt[iebx] |= (1LL << dbitNumber);
189  }
190  dbitNumber++;
191  }
192  }
193 }
const cms_uint16_t bData(int iB) const
get/set B_DATA_CH_IB
Definition: L1GtPsbWord.cc:253
const TechnicalTriggerWord & technicalTriggerWord(int bxInEventValue) const
const cms_uint16_t aData(int iA) const
get/set A_DATA_CH_IA
Definition: L1GtPsbWord.cc:181
std::vector< bool > DecisionWord
typedefs
std::vector< bool > TechnicalTriggerWord
technical trigger bits (64 bits)
const L1GtPsbWord gtPsbWord(cms_uint16_t boardIdValue, int bxInEventValue) const
get / set PSB word (record) in the GT readout record
const DecisionWord & decisionWord(int bxInEventValue) const
const L1GtFdlWord gtFdlWord(int bxInEventValue) const
get / set FDL word (record) in the GT readout record
L1AnalysisGTDataFormat gt_
Definition: L1AnalysisGT.h:28
void L1Analysis::L1AnalysisGT::SetEvm ( const L1GlobalTriggerEvmReadoutRecord gtevmrr)

Definition at line 9 of file L1AnalysisGT.cc.

References L1GtfeExtWord::beamMode(), L1GtfeExtWord::beamMomentum(), L1GtfeExtWord::bstMasterStatus(), L1GtfeExtWord::gpsTime(), L1GlobalTriggerEvmReadoutRecord::gtfeWord(), L1GtfeExtWord::lhcFillNumber(), L1GtfeExtWord::particleTypeBeam1(), L1GtfeExtWord::particleTypeBeam2(), L1TcsWord::partTrigNr(), L1GlobalTriggerEvmReadoutRecord::tcsWord(), L1GtfeExtWord::totalIntensityBeam1(), L1GtfeExtWord::totalIntensityBeam2(), and L1GtfeExtWord::turnCountNumber().

9  {
10  L1TcsWord tcsw = gtevmrr->tcsWord();
11 
12  //bx = tcsw.bxNr();
13  //lumi = tcsw.luminositySegmentNr();
14  //runn = tcsw.partRunNr();
15  //eventn = tcsw.partTrigNr();
16  //orbitn = tcsw.orbitNr();
17  gt_.partrig_tcs = tcsw.partTrigNr();
18  L1GtfeExtWord myGtfeExtWord = gtevmrr->gtfeWord();
19  uint64_t gpsTime = myGtfeExtWord.gpsTime();
20 
21  gt_.gpsTimelo = gpsTime & 0xffffffff;
22  gt_.gpsTimehi = (gpsTime >> 32) & 0xffffffff;
23  gt_.bstMasterStatus = 0xffff & (myGtfeExtWord.bstMasterStatus());
24  gt_.bstturnCountNumber = myGtfeExtWord.turnCountNumber();
25  gt_.bstlhcFillNumber = myGtfeExtWord.lhcFillNumber();
26  gt_.bstbeamMode = 0xffff & (myGtfeExtWord.beamMode());
27  gt_.bstparticleTypeBeam1 = 0xffff & (myGtfeExtWord.particleTypeBeam1());
28  gt_.bstparticleTypeBeam2 = 0xffff & (myGtfeExtWord.particleTypeBeam2());
29  gt_.bstbeamMomentum = 0xffff & (myGtfeExtWord.beamMomentum());
32 }
const L1GtfeExtWord gtfeWord() const
get / set GTFE word (record) in the GT readout record
const L1TcsWord tcsWord() const
get / set TCS word (record) in the GT readout record
const cms_uint64_t gpsTime() const
LHC-BOB-ES-0001 (EDMS 638899)
const cms_uint16_t bstMasterStatus() const
const cms_uint32_t partTrigNr() const
get/set total number of L1A sent since start of the run to this DAQ partition
Definition: L1TcsWord.h:161
const cms_uint16_t beamMomentum() const
const cms_uint32_t totalIntensityBeam2() const
const cms_uint32_t totalIntensityBeam1() const
unsigned long long uint64_t
Definition: Time.h:13
const cms_uint32_t lhcFillNumber() const
L1AnalysisGTDataFormat gt_
Definition: L1AnalysisGT.h:28
const cms_uint16_t particleTypeBeam2() const
const cms_uint32_t turnCountNumber() const
const cms_uint16_t beamMode() const
const cms_uint16_t particleTypeBeam1() const

Member Data Documentation

L1AnalysisGTDataFormat L1Analysis::L1AnalysisGT::gt_
private

Definition at line 28 of file L1AnalysisGT.h.

Referenced by getData(), and Reset().