CMS 3D CMS Logo

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 19 of file L1AnalysisGT.h.

Constructor & Destructor Documentation

L1Analysis::L1AnalysisGT::L1AnalysisGT ( )

Definition at line 6 of file L1AnalysisGT.cc.

7 {
8 }
L1Analysis::L1AnalysisGT::~L1AnalysisGT ( )

Definition at line 10 of file L1AnalysisGT.cc.

11 {
12 }

Member Function Documentation

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

Definition at line 28 of file L1AnalysisGT.h.

References gt_.

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

Definition at line 27 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 41 of file L1AnalysisGT.cc.

References L1GtPsbWord::aData(), L1GtPsbWord::bData(), L1Analysis::L1AnalysisGTDataFormat::Bxel, L1Analysis::L1AnalysisGTDataFormat::Bxjet, L1GlobalTriggerReadoutRecord::decisionWord(), L1Analysis::L1AnalysisGTDataFormat::Etael, L1Analysis::L1AnalysisGTDataFormat::Etajet, L1Analysis::L1AnalysisGTDataFormat::Fwdjet, gt_, L1GlobalTriggerReadoutRecord::gtFdlWord(), L1GlobalTriggerReadoutRecord::gtPsbWord(), L1Analysis::L1AnalysisGTDataFormat::Isoel, L1Analysis::L1AnalysisGTDataFormat::Nele, L1Analysis::L1AnalysisGTDataFormat::Njet, L1Analysis::L1AnalysisGTDataFormat::OvETM, L1Analysis::L1AnalysisGTDataFormat::OvETT, L1Analysis::L1AnalysisGTDataFormat::OvHTM, L1Analysis::L1AnalysisGTDataFormat::OvHTT, L1Analysis::L1AnalysisGTDataFormat::Phiel, L1Analysis::L1AnalysisGTDataFormat::PhiETM, L1Analysis::L1AnalysisGTDataFormat::PhiHTM, L1Analysis::L1AnalysisGTDataFormat::Phijet, L1Analysis::L1AnalysisGTDataFormat::Rankel, L1Analysis::L1AnalysisGTDataFormat::RankETM, L1Analysis::L1AnalysisGTDataFormat::RankETT, L1Analysis::L1AnalysisGTDataFormat::RankHTM, L1Analysis::L1AnalysisGTDataFormat::RankHTT, L1Analysis::L1AnalysisGTDataFormat::Rankjet, L1Analysis::L1AnalysisGTDataFormat::Taujet, L1GlobalTriggerReadoutRecord::technicalTriggerWord(), L1Analysis::L1AnalysisGTDataFormat::tt, L1Analysis::L1AnalysisGTDataFormat::tw1, and L1Analysis::L1AnalysisGTDataFormat::tw2.

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

Definition at line 15 of file L1AnalysisGT.cc.

References L1GtfeExtWord::beamMode(), L1GtfeExtWord::beamMomentum(), L1Analysis::L1AnalysisGTDataFormat::bstbeamMode, L1Analysis::L1AnalysisGTDataFormat::bstbeamMomentum, L1Analysis::L1AnalysisGTDataFormat::bstlhcFillNumber, L1Analysis::L1AnalysisGTDataFormat::bstMasterStatus, L1GtfeExtWord::bstMasterStatus(), L1Analysis::L1AnalysisGTDataFormat::bstparticleTypeBeam1, L1Analysis::L1AnalysisGTDataFormat::bstparticleTypeBeam2, L1Analysis::L1AnalysisGTDataFormat::bsttotalIntensityBeam1, L1Analysis::L1AnalysisGTDataFormat::bsttotalIntensityBeam2, L1Analysis::L1AnalysisGTDataFormat::bstturnCountNumber, L1GtfeExtWord::gpsTime(), L1Analysis::L1AnalysisGTDataFormat::gpsTimehi, L1Analysis::L1AnalysisGTDataFormat::gpsTimelo, gt_, L1GlobalTriggerEvmReadoutRecord::gtfeWord(), L1GtfeExtWord::lhcFillNumber(), L1GtfeExtWord::particleTypeBeam1(), L1GtfeExtWord::particleTypeBeam2(), L1Analysis::L1AnalysisGTDataFormat::partrig_tcs, L1TcsWord::partTrigNr(), L1GlobalTriggerEvmReadoutRecord::tcsWord(), L1GtfeExtWord::totalIntensityBeam1(), L1GtfeExtWord::totalIntensityBeam2(), and L1GtfeExtWord::turnCountNumber().

16 {
17  L1TcsWord tcsw = gtevmrr->tcsWord();
18 
19  //bx = tcsw.bxNr();
20  //lumi = tcsw.luminositySegmentNr();
21  //runn = tcsw.partRunNr();
22  //eventn = tcsw.partTrigNr();
23  //orbitn = tcsw.orbitNr();
24  gt_.partrig_tcs = tcsw.partTrigNr();
25  L1GtfeExtWord myGtfeExtWord = gtevmrr->gtfeWord();
26  uint64_t gpsTime = myGtfeExtWord.gpsTime();
27 
28  gt_.gpsTimelo = gpsTime&0xffffffff;
29  gt_.gpsTimehi = (gpsTime>>32)&0xffffffff;
30  gt_.bstMasterStatus = 0xffff & (myGtfeExtWord.bstMasterStatus());
31  gt_.bstturnCountNumber = myGtfeExtWord.turnCountNumber();
32  gt_.bstlhcFillNumber = myGtfeExtWord.lhcFillNumber();
33  gt_.bstbeamMode = 0xffff & (myGtfeExtWord.beamMode());
34  gt_.bstparticleTypeBeam1 = 0xffff & (myGtfeExtWord.particleTypeBeam1());
35  gt_.bstparticleTypeBeam2 = 0xffff & (myGtfeExtWord.particleTypeBeam2());
36  gt_.bstbeamMomentum = 0xffff & (myGtfeExtWord.beamMomentum());
39 }
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:226
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:15
const cms_uint32_t lhcFillNumber() const
L1AnalysisGTDataFormat gt_
Definition: L1AnalysisGT.h:31
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 31 of file L1AnalysisGT.h.

Referenced by getData(), Reset(), Set(), and SetEvm().