CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CSCTFDTReceiver Class Reference

#include <CSCTFDTReceiver.h>

Public Member Functions

 CSCTFDTReceiver ()
 
CSCTriggerContainer< csctf::TrackStubprocess (const L1MuDTChambPhContainer *)
 
 ~CSCTFDTReceiver ()
 

Private Attributes

CSCTriggerContainer< csctf::TrackStubdtstubs
 

Detailed Description

Definition at line 12 of file CSCTFDTReceiver.h.

Constructor & Destructor Documentation

CSCTFDTReceiver::CSCTFDTReceiver ( )
inline

Definition at line 16 of file CSCTFDTReceiver.h.

References CSCTriggerContainer< T >::clear(), and dtstubs.

16 { dtstubs.clear(); }
CSCTriggerContainer< csctf::TrackStub > dtstubs
CSCTFDTReceiver::~CSCTFDTReceiver ( )
inline

Definition at line 17 of file CSCTFDTReceiver.h.

References process().

17 {}

Member Function Documentation

CSCTriggerContainer< csctf::TrackStub > CSCTFDTReceiver::process ( const L1MuDTChambPhContainer dttrig)

shift all by one and take mod 8, since DT quality of 7 is a null stub

Definition at line 12 of file CSCTFDTReceiver.cc.

References L1MuDTChambPhContainer::chPhiSegm1(), L1MuDTChambPhContainer::chPhiSegm2(), CSCTriggerContainer< T >::clear(), L1MuDTChambPhDigi::code(), gather_cfg::cout, dtstubs, MillePedeFileConverter_cfg::e, L1MuDTTFConfig::getBxMaxGlobally(), L1MuDTTFConfig::getBxMinGlobally(), CSCBitWidths::kGlobalPhiDataBitWidth, CSCConstants::LCT_CENTRAL_BX, CSCTFDTReceiverLUT::lut, CSCDetId::maxEndcapId(), CSCTriggerNumbering::maxTriggerSectorId(), CSCDetId::minEndcapId(), CSCTriggerNumbering::minTriggerSectorId(), phi, L1MuDTChambPhDigi::phiB(), CSCTriggerContainer< T >::push_back(), alignCSCRings::s, and makeMuonMisalignmentScenario::wheel.

Referenced by ConfigBuilder.ConfigBuilder::addExtraStream(), ConfigBuilder.ConfigBuilder::completeInputCommand(), ConfigBuilder.ConfigBuilder::doNotInlineEventContent(), ConfigBuilder.ConfigBuilder.PrintAllModules::leave(), ConfigBuilder.ConfigBuilder::prepare(), ConfigBuilder.ConfigBuilder::prepare_ALCA(), ConfigBuilder.ConfigBuilder::prepare_DQM(), ConfigBuilder.ConfigBuilder::prepare_HLT(), ConfigBuilder.ConfigBuilder::prepare_LHE(), ConfigBuilder.ConfigBuilder::prepare_PATFILTER(), ConfigBuilder.ConfigBuilder::prepare_VALIDATION(), CSCTFTrackProducer::produce(), ConfigBuilder.ConfigBuilder::renameHLTprocessInSequence(), ConfigBuilder.ConfigBuilder::renameInputTagsInSequence(), ConfigBuilder.ConfigBuilder::scheduleSequence(), and ~CSCTFDTReceiver().

13 {
14  dtstubs.clear();
15  if( !dttrig ) return dtstubs;
16 
17  //Need a better way to get these values since this
18  // violates CMSSW coding policy
19  const int dt_minBX = L1MuDTTFConfig::getBxMinGlobally();
20  const int dt_maxBX = L1MuDTTFConfig::getBxMaxGlobally();
21 
22  const int dt_toffs = 0;// changed since DT tpg now centers around zero //abs(dt_maxBX - dt_minBX);
23 
24  // consider all BX
25  for(int bx = dt_minBX + dt_toffs; bx <= dt_maxBX + dt_toffs; ++bx)
26  for(int e = CSCDetId::minEndcapId(); e <= CSCDetId::maxEndcapId(); ++e)
28  {
29  int wheel = (e == 1) ? 2 : -2;
30  int sector = 2*s - 1;
31  int csc_bx = bx + CSCConstants::LCT_CENTRAL_BX;//Delay DT stubs by the central LCT bx.
32 
33  // combine two 30 degree DT sectors into a 60 degree CSC
34  // sector.
35  for(int is = sector; is <= sector+1; ++is)
36  {
37  int iss = (is == 12) ? 0 : is;
38  const L1MuDTChambPhDigi* dtts[2];
39 
40  for(int stub = 0; stub < 2; ++stub)
41  {
42  dtts[stub] = (stub == 0) ? dttrig->chPhiSegm1(wheel,1,iss,bx) :
43  dttrig->chPhiSegm2(wheel,1,iss,bx);
44  if(dtts[stub])
45  {
46 
47  // --------------------------------------------------------------
48  // IKF: this code has been reformulated ...
49  // --------------------------------------------------------------
50  // // Convert stubs to CSC format (signed -> unsigned)
51  // // phi was 12 bits (signed) for pi radians = 57.3 deg
52  // // relative to center of 30 degree DT sector
53  // double tmp = static_cast<const double> (dtts[stub]->phi()) /
54  // DTConfigTraco::RESOLPSIR * 180./M_PI + 15.;
55  // int phi = static_cast<int> (tmp/62. * (1<<(CSCBitWidths::kGlobalPhiDataBitWidth)));
56  // --------------------------------------------------------------
57  // IKF ...and is now this line, actually works a tiny bit better.
58  // --------------------------------------------------------------
59  // float tmp = dtts[stub] -> phi() * 1.0;
60  //
61  // tmp *= 90.0;
62  // tmp /= 31.0;
63  // // tmp /= M_PI;
64  // tmp /= 3.1416;
65  // tmp += 1057.0;
66  //
67  // int phi = static_cast<int> (tmp);
68 
69  // --------------------------------------------------------------
70  // IKF ...and is now this line, actually works a tiny bit better.
71  // --------------------------------------------------------------
72  int phi = dtts[stub] -> phi();
73 
74  if (phi < 0) phi += 4096;
75 
76  if (phi > 4096)
77  { std::cout << "AAAAAAAAAAGH TOO BIG PHI:" << phi << std::endl;
78  continue;
79  }
80  if (phi < 0){
81  std::cout << "AAAAAAAAH NEG PHI" << phi << std::endl;
82  continue;
83  }
84 
86 
87  // --------------------------------------------------------------
88 
89  // DT chambers may lie outside CSC sector boundary
90  // Eventually we need to extend CSC phi definition
91  // --------------------------------------------------------------
92  // IKF: this is a protection, physically can't happen in data (bus too narrow) -
93  // - what really happens in data?
94  // --------------------------------------------------------------
95 
96  phi = (phi>0) ? phi : 0;
97  phi = (phi<(1<<(CSCBitWidths::kGlobalPhiDataBitWidth))) ? phi :
99 
100 
101  // change phib from 10 bits to 5
102  int phib = ((dtts[stub]->phiB() & 0x3FF) >> 5) & 0x1F;// 0x3FF=1023, 0x1F=31
103  int qual = dtts[stub]->code();
104  // barrel allows quality=0!
106  qual = (qual + 1)%8;
107 
108  CSCCorrelatedLCTDigi dtinfo(stub+1,1, qual, 0, stub, 0, phib, csc_bx+stub, 1+(is+1)%2);
109  DTChamberId dtid(wheel,1,iss+1);
110  csctf::TrackStub tsCSC(dtinfo,dtid, phi, 0);
111 
112  dtstubs.push_back(tsCSC);
113  }
114  }
115  }
116  }
117 
118  return dtstubs;
119 }
static int minEndcapId()
Definition: CSCDetId.h:236
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const
L1MuDTChambPhDigi const * chPhiSegm2(int wheel, int stat, int sect, int bx) const
static int maxTriggerSectorId()
static const unsigned short int lut[4096]
static int minTriggerSectorId()
void push_back(const T &data)
CSCTriggerContainer< csctf::TrackStub > dtstubs
static int getBxMaxGlobally()
static int maxEndcapId()
Definition: CSCDetId.h:237
static int getBxMinGlobally()

Member Data Documentation

CSCTriggerContainer<csctf::TrackStub> CSCTFDTReceiver::dtstubs
private

Definition at line 24 of file CSCTFDTReceiver.h.

Referenced by CSCTFDTReceiver(), and process().