CMS 3D CMS Logo

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

#include <L1TMuonBarrelKalmanStubProcessor.h>

Public Member Functions

 L1TMuonBarrelKalmanStubProcessor ()
 
 L1TMuonBarrelKalmanStubProcessor (const edm::ParameterSet &)
 
L1MuKBMTCombinedStubCollection makeStubs (const L1MuDTChambPhContainer *, const L1MuDTChambThContainer *)
 
 ~L1TMuonBarrelKalmanStubProcessor ()
 

Private Member Functions

L1MuKBMTCombinedStub buildStub (const L1MuDTChambPhDigi *, const L1MuDTChambThDigi *)
 
bool isGoodPhiStub (const L1MuDTChambPhDigi *)
 
std::pair< bool, bool > isGoodThetaStub (const L1MuDTChambThDigi *, uint pos1, uint pos2=0)
 

Private Attributes

std::vector< int > etaCoarseLUT_0
 
std::vector< int > etaCoarseLUT_minus_1
 
std::vector< int > etaCoarseLUT_minus_2
 
std::vector< int > etaCoarseLUT_plus_1
 
std::vector< int > etaCoarseLUT_plus_2
 
std::vector< int > etaLUT_0_1
 
std::vector< int > etaLUT_0_2
 
std::vector< int > etaLUT_0_3
 
std::vector< int > etaLUT_minus_1_1
 
std::vector< int > etaLUT_minus_1_2
 
std::vector< int > etaLUT_minus_1_3
 
std::vector< int > etaLUT_minus_2_1
 
std::vector< int > etaLUT_minus_2_2
 
std::vector< int > etaLUT_minus_2_3
 
std::vector< int > etaLUT_plus_1_1
 
std::vector< int > etaLUT_plus_1_2
 
std::vector< int > etaLUT_plus_1_3
 
std::vector< int > etaLUT_plus_2_1
 
std::vector< int > etaLUT_plus_2_2
 
std::vector< int > etaLUT_plus_2_3
 
int maxBX_
 
int minBX_
 
int minPhiQuality_
 
int minThetaQuality_
 
int verbose_
 

Detailed Description

Definition at line 16 of file L1TMuonBarrelKalmanStubProcessor.h.

Constructor & Destructor Documentation

L1TMuonBarrelKalmanStubProcessor::L1TMuonBarrelKalmanStubProcessor ( )
L1TMuonBarrelKalmanStubProcessor::L1TMuonBarrelKalmanStubProcessor ( const edm::ParameterSet iConfig)

Definition at line 19 of file L1TMuonBarrelKalmanStubProcessor.cc.

19  :
20  minPhiQuality_(iConfig.getParameter<int>("minPhiQuality")),
21  minThetaQuality_(iConfig.getParameter<int>("minThetaQuality")),
22  minBX_(iConfig.getParameter<int>("minBX")),
23  maxBX_(iConfig.getParameter<int>("maxBX")),
24  etaLUT_minus_2_1(iConfig.getParameter<std::vector<int> >("etaLUT_minus_2_1")),
25  etaLUT_minus_2_2(iConfig.getParameter<std::vector<int> >("etaLUT_minus_2_2")),
26  etaLUT_minus_2_3(iConfig.getParameter<std::vector<int> >("etaLUT_minus_2_3")),
27  etaLUT_minus_1_1(iConfig.getParameter<std::vector<int> >("etaLUT_minus_1_1")),
28  etaLUT_minus_1_2(iConfig.getParameter<std::vector<int> >("etaLUT_minus_1_2")),
29  etaLUT_minus_1_3(iConfig.getParameter<std::vector<int> >("etaLUT_minus_1_3")),
30  etaLUT_0_1(iConfig.getParameter<std::vector<int> >("etaLUT_0_1")),
31  etaLUT_0_2(iConfig.getParameter<std::vector<int> >("etaLUT_0_2")),
32  etaLUT_0_3(iConfig.getParameter<std::vector<int> >("etaLUT_0_3")),
33  etaLUT_plus_1_1(iConfig.getParameter<std::vector<int> >("etaLUT_plus_1_1")),
34  etaLUT_plus_1_2(iConfig.getParameter<std::vector<int> >("etaLUT_plus_1_2")),
35  etaLUT_plus_1_3(iConfig.getParameter<std::vector<int> >("etaLUT_plus_1_3")),
36  etaLUT_plus_2_1(iConfig.getParameter<std::vector<int> >("etaLUT_plus_2_1")),
37  etaLUT_plus_2_2(iConfig.getParameter<std::vector<int> >("etaLUT_plus_2_2")),
38  etaLUT_plus_2_3(iConfig.getParameter<std::vector<int> >("etaLUT_plus_2_3")),
39  etaCoarseLUT_minus_2(iConfig.getParameter<std::vector<int> >("etaCoarseLUT_minus_2")),
40  etaCoarseLUT_minus_1(iConfig.getParameter<std::vector<int> >("etaCoarseLUT_minus_1")),
41  etaCoarseLUT_0(iConfig.getParameter<std::vector<int> >("etaCoarseLUT_0")),
42  etaCoarseLUT_plus_1(iConfig.getParameter<std::vector<int> >("etaCoarseLUT_plus_1")),
43  etaCoarseLUT_plus_2(iConfig.getParameter<std::vector<int> >("etaCoarseLUT_plus_2")),
44  verbose_(iConfig.getParameter<int>("verbose"))
45 {
46 
47 }
T getParameter(std::string const &) const
L1TMuonBarrelKalmanStubProcessor::~L1TMuonBarrelKalmanStubProcessor ( )

Definition at line 51 of file L1TMuonBarrelKalmanStubProcessor.cc.

51 {}

Member Function Documentation

L1MuKBMTCombinedStub L1TMuonBarrelKalmanStubProcessor::buildStub ( const L1MuDTChambPhDigi phiS,
const L1MuDTChambThDigi etaS 
)
private

Definition at line 75 of file L1TMuonBarrelKalmanStubProcessor.cc.

References L1MuDTChambPhDigi::bxNum(), L1MuDTChambPhDigi::code(), etaCoarseLUT_0, etaCoarseLUT_minus_1, etaCoarseLUT_minus_2, etaCoarseLUT_plus_1, etaCoarseLUT_plus_2, etaLUT_0_1, etaLUT_0_2, etaLUT_0_3, etaLUT_minus_1_1, etaLUT_minus_1_2, etaLUT_minus_1_3, etaLUT_minus_2_1, etaLUT_minus_2_2, etaLUT_minus_2_3, etaLUT_plus_1_1, etaLUT_plus_1_2, etaLUT_plus_1_3, etaLUT_plus_2_1, etaLUT_plus_2_2, etaLUT_plus_2_3, mps_fire::i, minThetaQuality_, AlCaHLTBitMon_ParallelJobs::p, phi, L1MuDTChambPhDigi::phi(), L1MuDTChambPhDigi::phiB(), L1MuDTChambThDigi::position(), jets_cff::quality, L1MuDTChambThDigi::quality(), L1MuDTChambPhDigi::scNum(), relativeConstraints::station, L1MuDTChambPhDigi::stNum(), GlobalPosition_Frontier_DevDB_cff::tag, L1MuDTChambPhDigi::Ts2Tag(), parallelization::uint(), makeMuonMisalignmentScenario::wheel, and L1MuDTChambPhDigi::whNum().

Referenced by makeStubs().

75  {
76  int wheel = phiS->whNum();
77  int sector = phiS->scNum();
78  int station = phiS->stNum();
79  int phi = phiS->phi();
80  int phiB = phiS->phiB();
81  bool tag = (phiS->Ts2Tag()==1);
82  int bx=phiS->bxNum();
83  int quality=phiS->code();
84 
85  //coarse eta
86  int coarseEta;
87 
88 
89  if (wheel==0) {
90  coarseEta = etaCoarseLUT_0[station-1];
91  }
92  else if (wheel==1) {
93  coarseEta = etaCoarseLUT_plus_1[station-1];
94 
95  }
96  else if (wheel==2) {
97  coarseEta = etaCoarseLUT_plus_2[station-1];
98 
99  }
100  else if (wheel==-1) {
101  coarseEta = etaCoarseLUT_minus_1[station-1];
102 
103  }
104  else {
105  coarseEta = etaCoarseLUT_minus_2[station-1];
106  }
107 
108 
109 
110  //Now full eta
111  int qeta1=-1;
112  int qeta2=-1;
113  int eta1=0;
114  int eta2=0;
115 
116 
117  if (etaS) {
118  std::vector<int> eposition;
119  std::vector<int> equality;
120  for (uint i=0;i<7;++i) {
121  if (etaS->position(i)==0 || etaS->quality(i)<minThetaQuality_)
122  continue;
123  int p=0;
124  if (wheel==0) {
125  if (station==1)
126  p=(etaLUT_0_1[i]);
127  if (station==2)
128  p=(etaLUT_0_2[i]);
129  if (station==3)
130  p=(etaLUT_0_3[i]);
131  if (!(sector==0 || sector==3 || sector==4 || sector==7 ||sector==8 ||sector==11))
132  p=-p;
133  }
134  if (wheel==1) {
135  if (station==1)
136  p=(etaLUT_plus_1_1[i]);
137  if (station==2)
138  p=(etaLUT_plus_1_2[i]);
139  if (station==3)
140  p=(etaLUT_plus_1_3[i]);
141  }
142 
143  if (wheel==2) {
144  if (station==1)
145  p=(etaLUT_plus_2_1[i]);
146  if (station==2)
147  p=(etaLUT_plus_2_2[i]);
148  if (station==3)
149  p=(etaLUT_plus_2_3[i]);
150  }
151  if (wheel==-1) {
152  if (station==1)
153  p=(etaLUT_minus_1_1[i]);
154  if (station==2)
155  p=(etaLUT_minus_1_2[i]);
156  if (station==3)
157  p=(etaLUT_minus_1_3[i]);
158  }
159 
160  if (wheel==-2) {
161  if (station==1)
162  p=(etaLUT_minus_2_1[i]);
163  if (station==2)
164  p=(etaLUT_minus_2_2[i]);
165  if (station==3)
166  p=(etaLUT_minus_2_3[i]);
167  }
168  eposition.push_back(p);
169  equality.push_back(etaS->quality(i));
170 
171  }
172 
173 
174  if (!eposition.empty()) {
175  eta1=eposition[0];
176  qeta1=equality[0];
177  }
178  if (eposition.size()>=2) {
179  eta2=eposition[1];
180  qeta2=equality[1];
181  }
182 
183  }
184 
185  L1MuKBMTCombinedStub stub(wheel,sector,station,phi,phiB,tag,
186  bx,quality,coarseEta,eta1,eta2,qeta1,qeta2);
187 
188  return stub;
189 
190 }
int quality(const int i) const
int position(const int i) const
def uint(string)
bool L1TMuonBarrelKalmanStubProcessor::isGoodPhiStub ( const L1MuDTChambPhDigi stub)
private

Definition at line 55 of file L1TMuonBarrelKalmanStubProcessor.cc.

References L1MuDTChambPhDigi::code(), and minPhiQuality_.

55  {
56  if (stub->code()<minPhiQuality_)
57  return false;
58  return true;
59 }
std::pair< bool, bool > L1TMuonBarrelKalmanStubProcessor::isGoodThetaStub ( const L1MuDTChambThDigi stub,
uint  pos1,
uint  pos2 = 0 
)
private

Definition at line 61 of file L1TMuonBarrelKalmanStubProcessor.cc.

References minThetaQuality_, and L1MuDTChambThDigi::quality().

61  {
62 
63  bool seg1=true;
64  bool seg2=true;
65 
66  if (stub->quality(pos1)<minThetaQuality_)
67  seg1=false;
68  if (stub->quality(pos2)<minThetaQuality_)
69  seg2=false;
70  return std::make_pair(seg1,seg2);
71 }
int quality(const int i) const
L1MuKBMTCombinedStubCollection L1TMuonBarrelKalmanStubProcessor::makeStubs ( const L1MuDTChambPhContainer phiContainer,
const L1MuDTChambThContainer etaContainer 
)

Definition at line 198 of file L1TMuonBarrelKalmanStubProcessor.cc.

References funct::abs(), buildStub(), L1MuDTChambPhDigi::bxNum(), L1MuDTChambPhContainer::chPhiSegm1(), L1MuDTChambPhContainer::chPhiSegm2(), L1MuDTChambThContainer::chThetaSegm(), L1MuDTChambPhDigi::code(), PVValHelper::eta, maxBX_, minBX_, minPhiQuality_, MillePedeFileConverter_cfg::out, L1MuDTChambPhDigi::phi(), L1MuDTChambPhDigi::phiB(), L1MuDTChambPhDigi::scNum(), relativeConstraints::station, L1MuDTChambPhDigi::stNum(), L1MuDTChambPhDigi::Ts2Tag(), parallelization::uint(), verbose_, makeMuonMisalignmentScenario::wheel, and L1MuDTChambPhDigi::whNum().

198  {
199 
200 
201  //get the masks from th standard BMTF setup!
202  // const L1TMuonBarrelParamsRcd& bmtfParamsRcd = setup.get<L1TMuonBarrelParamsRcd>();
203  // bmtfParamsRcd.get(bmtfParamsHandle);
204  // const L1TMuonBarrelParams& bmtfParams = *bmtfParamsHandle.product();
205  // masks_ = bmtfParams.l1mudttfmasks;
206 
207 
208 
210  for (int bx=minBX_;bx<=maxBX_;bx++) {
211  for (int wheel=-2;wheel<=2;wheel++) {
212  for (uint sector=0;sector<12;sector++) {
213  for (uint station=0;station<5;station++) {
214  const L1MuDTChambPhDigi* high = phiContainer->chPhiSegm1(wheel,station,sector,bx);
215  const L1MuDTChambPhDigi* low = phiContainer->chPhiSegm2(wheel,station,sector,bx);
216  const L1MuDTChambThDigi* eta = etaContainer->chThetaSegm(wheel,station,sector,bx);
217 
218  //Temporary mask
219  if (station==1 && abs(wheel)==2)
220  continue;
221 
222  if (high && high->code()>=minPhiQuality_) {
223  out.push_back(buildStub(high,eta));
224  if (verbose_==1) {
225  printf("Original Stub phi: bx=%d wheel=%d sector=%d station=%d tag=%d phi=%d phiB=%d quality=%d\n",high->bxNum(),high->whNum(),high->scNum(),high->stNum(),high->Ts2Tag(),high->phi(),high->phiB(),high->code());
226  printf("New Stub phi: bx=%d wheel=%d sector=%d station=%d tag=%d phi=%d phiB=%d quality=%d coarse=%d eta1=%d,eta2=%d,qeta1=%d,qeta2=%d\n",out[out.size()-1].bxNum(),out[out.size()-1].whNum(),out[out.size()-1].scNum(),out[out.size()-1].stNum(),out[out.size()-1].tag(),out[out.size()-1].phi(),out[out.size()-1].phiB(),out[out.size()-1].quality(),out[out.size()-1].coarseEta(),out[out.size()-1].eta1(),out[out.size()-1].eta2(),out[out.size()-1].qeta1(),out[out.size()-1].qeta2());
227  }
228  }
229  if (low&&low->code()>=minPhiQuality_) {
230  out.push_back(buildStub(low,eta));
231  if (verbose_==1) {
232  printf("Original Stub phi: bx=%d wheel=%d sector=%d station=%d tag=%d phi=%d phiB=%d quality=%d\n",low->bxNum(),low->whNum(),low->scNum(),low->stNum(),low->Ts2Tag(),low->phi(),low->phiB(),low->code());
233  printf("New Stub phi: bx=%d wheel=%d sector=%d station=%d tag=%d phi=%d phiB=%d quality=%d coarse=%d eta1=%d,eta2=%d,qeta1=%d,qeta2=%d\n",out[out.size()-1].bxNum(),out[out.size()-1].whNum(),out[out.size()-1].scNum(),out[out.size()-1].stNum(),out[out.size()-1].tag(),out[out.size()-1].phi(),out[out.size()-1].phiB(),out[out.size()-1].quality(),out[out.size()-1].coarseEta(),out[out.size()-1].eta1(),out[out.size()-1].eta2(),out[out.size()-1].qeta1(),out[out.size()-1].qeta2());
234  }
235  }
236  }
237  }
238  }
239  }
240  return out;
241 }
L1MuDTChambPhDigi const * chPhiSegm1(int wheel, int stat, int sect, int bx) const
L1MuDTChambPhDigi const * chPhiSegm2(int wheel, int stat, int sect, int bx) const
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
L1MuKBMTCombinedStub buildStub(const L1MuDTChambPhDigi *, const L1MuDTChambThDigi *)
def uint(string)
L1MuDTChambThDigi const * chThetaSegm(int wheel, int stat, int sect, int bx) const
std::vector< L1MuKBMTCombinedStub > L1MuKBMTCombinedStubCollection

Member Data Documentation

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaCoarseLUT_0
private

Definition at line 53 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaCoarseLUT_minus_1
private

Definition at line 52 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaCoarseLUT_minus_2
private

Definition at line 51 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaCoarseLUT_plus_1
private

Definition at line 54 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaCoarseLUT_plus_2
private

Definition at line 55 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaLUT_0_1
private

Definition at line 42 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaLUT_0_2
private

Definition at line 43 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaLUT_0_3
private

Definition at line 44 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaLUT_minus_1_1
private

Definition at line 39 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaLUT_minus_1_2
private

Definition at line 40 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaLUT_minus_1_3
private

Definition at line 41 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaLUT_minus_2_1
private

Definition at line 36 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaLUT_minus_2_2
private

Definition at line 37 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaLUT_minus_2_3
private

Definition at line 38 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaLUT_plus_1_1
private

Definition at line 45 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaLUT_plus_1_2
private

Definition at line 46 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaLUT_plus_1_3
private

Definition at line 47 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaLUT_plus_2_1
private

Definition at line 48 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaLUT_plus_2_2
private

Definition at line 49 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

std::vector<int> L1TMuonBarrelKalmanStubProcessor::etaLUT_plus_2_3
private

Definition at line 50 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub().

int L1TMuonBarrelKalmanStubProcessor::maxBX_
private

Definition at line 34 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by makeStubs().

int L1TMuonBarrelKalmanStubProcessor::minBX_
private

Definition at line 33 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by makeStubs().

int L1TMuonBarrelKalmanStubProcessor::minPhiQuality_
private

Definition at line 31 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by isGoodPhiStub(), and makeStubs().

int L1TMuonBarrelKalmanStubProcessor::minThetaQuality_
private

Definition at line 32 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by buildStub(), and isGoodThetaStub().

int L1TMuonBarrelKalmanStubProcessor::verbose_
private

Definition at line 57 of file L1TMuonBarrelKalmanStubProcessor.h.

Referenced by makeStubs().