CMS 3D CMS Logo

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

#include <OMTFinputMaker.h>

Public Member Functions

OMTFinput buildInputForProcessor (const L1MuDTChambPhContainer *dtPhDigis, const L1MuDTChambThContainer *dtThDigis, const CSCCorrelatedLCTDigiCollection *cscDigis, const RPCDigiCollection *rpcDigis, unsigned int iProcessor, l1t::tftype type=l1t::tftype::omtf_pos)
 Method translating trigger digis into input matrix with global phi coordinates. More...
 
int getFlag () const
 
void initialize (const edm::EventSetup &es, const OMTFConfiguration *)
 
 OMTFinputMaker ()
 
void setFlag (int aFlag)
 
 ~OMTFinputMaker ()
 

Private Member Functions

bool acceptDigi (uint32_t rawId, unsigned int iProcessor, l1t::tftype type)
 
unsigned int getInputNumber (unsigned int rawId, unsigned int iProcessor, l1t::tftype type)
 
OMTFinput processCSC (const CSCCorrelatedLCTDigiCollection *cscDigis, unsigned int iProcessor, l1t::tftype type)
 
OMTFinput processDT (const L1MuDTChambPhContainer *dtPhDigis, const L1MuDTChambThContainer *dtThDigis, unsigned int iProcessor, l1t::tftype type)
 
OMTFinput processRPC (const RPCDigiCollection *rpcDigis, unsigned int iProcessor, l1t::tftype type)
 

Private Attributes

int flag
 
AngleConverter myAngleConverter
 
const OMTFConfigurationmyOmtfConfig
 

Detailed Description

Definition at line 22 of file OMTFinputMaker.h.

Constructor & Destructor Documentation

OMTFinputMaker::OMTFinputMaker ( )

Definition at line 21 of file OMTFinputMaker.cc.

21 {}
OMTFinputMaker::~OMTFinputMaker ( )

Definition at line 33 of file OMTFinputMaker.cc.

33 { }

Member Function Documentation

bool OMTFinputMaker::acceptDigi ( uint32_t  rawId,
unsigned int  iProcessor,
l1t::tftype  type 
)
private

Check if digis are within a give processor input. Simply checks sectors range.

Clean up digis. Remove unconnected detectors

Select RPC chambers connected to OMTF

RPC RE1/2 temporarily not used (aId.region()==1 && aId.station()==1 && aId.ring()<2) ||

Definition at line 36 of file OMTFinputMaker.cc.

References l1t::bmtf, CSCDetId::chamber(), MuonSubdetId::CSC, omtf::DataWord64::csc, DetId::det(), MuonSubdetId::DT, dt, l1t::emtf_neg, l1t::emtf_pos, CSCDetId::endcap(), OMTFConfiguration::getBarrelMax(), OMTFConfiguration::getBarrelMin(), OMTFConfiguration::getEndcap10DegMax(), OMTFConfiguration::getEndcap10DegMin(), OMTFConfiguration::getEndcap20DegMax(), OMTFConfiguration::getEndcap20DegMin(), RPCDetId::layer(), DetId::Muon, myOmtfConfig, l1t::omtf_neg, l1t::omtf_pos, RPCDetId::region(), RPCDetId::ring(), CSCDetId::ring(), RPCDetId::roll(), MuonSubdetId::RPC, DTChamberId::sector(), RPCDetId::sector(), CSCDetId::station(), RPCDetId::station(), DetId::subdetId(), RPCDetId::subsector(), and DTChamberId::wheel().

Referenced by processCSC(), processDT(), and processRPC().

38  {
39 
40  unsigned int aMin = myOmtfConfig->getBarrelMin()[iProcessor];
41  unsigned int aMax = myOmtfConfig->getBarrelMax()[iProcessor];
42  unsigned int aSector = 99;
43 
45  DetId detId(rawId);
46  if (detId.det() != DetId::Muon)
47  edm::LogError("Critical OMTFinputMaker") << "PROBLEM: hit in unknown Det, detID: "<<detId.det()<<std::endl;
48  switch (detId.subdetId()) {
49  case MuonSubdetId::RPC: {
50  RPCDetId aId(rawId);
51 
54  (aId.region()<0 ||
55  (aId.region()==0 && aId.ring()!=2) ||
56  (aId.region()==0 && aId.station()==4) ||
57  (aId.region()==0 && aId.station()==2 && aId.layer()==2 && aId.roll()==1) ||
58  (aId.region()==0 && aId.station()==3 && aId.roll()==1) ||
59  (aId.region()==1 && aId.station()==4) ||
61  (aId.region()==1 && aId.station()>0 && aId.ring()<3))
62  ) return false;
63 
65  (aId.region()>0 ||
66  (aId.region()==0 && aId.ring()!=-2) ||
67  (aId.region()==0 && aId.station()==4) ||
68  (aId.region()==0 && aId.station()==2 && aId.layer()==2 && aId.roll()==1) ||
69  (aId.region()==0 && aId.station()==3 && aId.roll()==1) ||
70  (aId.region()==-1 && aId.station()==4) ||
71  //RPC RE1/2 temporarily not used (aId.region()==1 && aId.station()==1 && aId.ring()<2) ||
72  (aId.region()==-1 && aId.station()>0 && aId.ring()<3))
73  ) return false;
74 
75  if(type==l1t::tftype::bmtf && aId.region()!=0) return false;
76 
78  (aId.region()<=0 ||
79  (aId.station()==1 && aId.ring()==3))) return false;
81  (aId.region()>=0 ||
82  (aId.station()==1 && aId.ring()==3))) return false;
84  if(aId.region()==0) aSector = aId.sector();
85  if(aId.region()!=0){
86  aSector = (aId.sector()-1)*6+aId.subsector();
87  aMin = myOmtfConfig->getEndcap10DegMin()[iProcessor];
88  aMax = myOmtfConfig->getEndcap10DegMax()[iProcessor];
89  }
90 
91  break;
92  }
93  case MuonSubdetId::DT: {
94  DTChamberId dt(rawId);
95 
96  if(type==l1t::tftype::omtf_pos && dt.wheel()!=2) return false;
97  if(type==l1t::tftype::omtf_neg && dt.wheel()!=-2) return false;
99 
100  aSector = dt.sector();
101  break;
102  }
103  case MuonSubdetId::CSC: {
104 
105  CSCDetId csc(rawId);
107  (csc.endcap()==2 || csc.ring()==1 || csc.station()==4)) return false;
109  (csc.endcap()==1 || csc.ring()==1 || csc.station()==4)) return false;
110 
112  (csc.endcap()==2 || (csc.station()==1 && csc.ring()==3))
113  ) return false;
115  (csc.endcap()==1 || (csc.station()==1 && csc.ring()==3))
116  ) return false;
117 
118  aSector = csc.chamber();
119  aMin = myOmtfConfig->getEndcap10DegMin()[iProcessor];
120  aMax = myOmtfConfig->getEndcap10DegMax()[iProcessor];
121 
123  csc.station()>1 && csc.ring()==1){
124  aMin = myOmtfConfig->getEndcap20DegMin()[iProcessor];
125  aMax = myOmtfConfig->getEndcap20DegMax()[iProcessor];
126  }
127  break;
128  }
129  }
130 
131  if(aMax>aMin && aSector>=aMin && aSector<=aMax) return true;
132  if(aMax<aMin && (aSector>=aMin || aSector<=aMax)) return true;
133 
134  return false;
135 }
type
Definition: HCALResponse.h:21
float dt
Definition: AMPTWrapper.h:126
const std::vector< unsigned int > & getBarrelMax() const
const std::vector< unsigned int > & getEndcap10DegMin() const
const OMTFConfiguration * myOmtfConfig
const std::vector< unsigned int > & getEndcap20DegMax() const
const std::vector< unsigned int > & getEndcap10DegMax() const
Definition: L1Track.h:19
Definition: DetId.h:18
const std::vector< unsigned int > & getBarrelMin() const
static constexpr int RPC
Definition: MuonSubdetId.h:14
const std::vector< unsigned int > & getEndcap20DegMin() const
static constexpr int DT
Definition: MuonSubdetId.h:12
static constexpr int CSC
Definition: MuonSubdetId.h:13
OMTFinput OMTFinputMaker::buildInputForProcessor ( const L1MuDTChambPhContainer dtPhDigis,
const L1MuDTChambThContainer dtThDigis,
const CSCCorrelatedLCTDigiCollection cscDigis,
const RPCDigiCollection rpcDigis,
unsigned int  iProcessor,
l1t::tftype  type = l1t::tftype::omtf_pos 
)

Method translating trigger digis into input matrix with global phi coordinates.

Definition at line 371 of file OMTFinputMaker.cc.

References myOmtfConfig, processCSC(), processDT(), processRPC(), and mps_fire::result.

Referenced by OMTFPatternMaker::analyze(), and OMTFReconstruction::getProcessorCandidates().

376  {
378  result += processDT(dtPhDigis, dtThDigis, iProcessor, type);
379  result += processCSC(cscDigis, iProcessor, type);
380  result += processRPC(rpcDigis, iProcessor, type);
381  return result;
382 }
type
Definition: HCALResponse.h:21
OMTFinput processCSC(const CSCCorrelatedLCTDigiCollection *cscDigis, unsigned int iProcessor, l1t::tftype type)
OMTFinput processRPC(const RPCDigiCollection *rpcDigis, unsigned int iProcessor, l1t::tftype type)
const OMTFConfiguration * myOmtfConfig
OMTFinput processDT(const L1MuDTChambPhContainer *dtPhDigis, const L1MuDTChambThContainer *dtThDigis, unsigned int iProcessor, l1t::tftype type)
int OMTFinputMaker::getFlag ( ) const
inline

Definition at line 42 of file OMTFinputMaker.h.

References RemoveAddSevLevel::flag.

Referenced by OMTFReconstruction::getProcessorCandidates().

42 { return flag;}
unsigned int OMTFinputMaker::getInputNumber ( unsigned int  rawId,
unsigned int  iProcessor,
l1t::tftype  type 
)
private

Give input number for givedn processor, using the chamber sector number. Result is modulo allowed number of hits per chamber

on the 0-2pi border we need to add 1 30 deg sector to get the correct index

Set roll number by hand to keep common input number shift formula for all stations

Only one roll from station 3 is connected.

At the moment do not use RPC chambers splitting into rolls for bmtf part

on the 0-2pi border we need to add 4 10 deg sectors to get the correct index

on the 0-2pi border we need to add 1 30 deg sector to get the correct index

on the 0-2pi border we need to add 4 10deg sectors to get the correct index

Endcap region covers algo 10 deg sectors on the 0-2pi border we need to add 2 20deg sectors to get the correct index

Assume 2 hits per chamber

Chambers divided into two rolls have rolls number 1 and 3

Definition at line 138 of file OMTFinputMaker.cc.

References l1t::bmtf, CSCDetId::chamber(), MuonSubdetId::CSC, omtf::DataWord64::csc, DetId::det(), MuonSubdetId::DT, dt, l1t::emtf_neg, l1t::emtf_pos, OMTFConfiguration::getBarrelMin(), OMTFConfiguration::getEndcap10DegMin(), OMTFConfiguration::getEndcap20DegMin(), RPCDetId::layer(), DetId::Muon, myOmtfConfig, RPCDetId::region(), CSCDetId::ring(), RPCDetId::roll(), MuonSubdetId::RPC, omtf::DataWord64::rpc, DTChamberId::sector(), RPCDetId::sector(), CSCDetId::station(), RPCDetId::station(), DetId::subdetId(), and RPCDetId::subsector().

Referenced by processCSC(), processDT(), and processRPC().

140  {
141 
142  unsigned int iInput = 99;
143  unsigned int aSector = 99;
144  int aMin = myOmtfConfig->getBarrelMin()[iProcessor];
145  int iRoll = 1;
146  int nInputsPerSector = 2;
147 
148  DetId detId(rawId);
149  if (detId.det() != DetId::Muon) edm::LogError("Critical OMTFinputMaker") << "PROBLEM: hit in unknown Det, detID: "<<detId.det()<<std::endl;
150  switch (detId.subdetId()) {
151  case MuonSubdetId::RPC: {
152  RPCDetId rpc(rawId);
153  if(rpc.region()==0){
154  nInputsPerSector = 4;
155  aSector = rpc.sector();
158  if(iProcessor==5 && aSector<3) aMin = -1;
159  //Use division into rolls
160  iRoll = rpc.roll();
163  if(rpc.station()==2 && rpc.layer()==2 && rpc.roll()==2) iRoll = 1;
165  if(rpc.station()==3){
166  iRoll = 1;
167  nInputsPerSector = 2;
168  }
170  if(type==l1t::tftype::bmtf)iRoll = 1;
171  }
172  if(rpc.region()!=0){
173  aSector = (rpc.sector()-1)*6+rpc.subsector();
174  aMin = myOmtfConfig->getEndcap10DegMin()[iProcessor];
177  if(iProcessor==5 && aSector<5) aMin = -4;
178  }
179  break;
180  }
181  case MuonSubdetId::DT: {
182  DTChamberId dt(rawId);
183  aSector = dt.sector();
186  if(iProcessor==5 && aSector<3) aMin = -1;
187  break;
188  }
189  case MuonSubdetId::CSC: {
190  CSCDetId csc(rawId);
191  aSector = csc.chamber();
192  aMin = myOmtfConfig->getEndcap10DegMin()[iProcessor];
195  if(iProcessor==5 && aSector<5) aMin = -4;
200  csc.station()>1 && csc.ring()==1){
201  aMin = myOmtfConfig->getEndcap20DegMin()[iProcessor];
202  if(iProcessor==5 && aSector<3) aMin = -2;
203  }
204  break;
205  }
206  }
207 
209  iInput = (aSector - aMin)*nInputsPerSector;
211  iInput+=iRoll-1;
212 
213  return iInput;
214 }
type
Definition: HCALResponse.h:21
float dt
Definition: AMPTWrapper.h:126
const std::vector< unsigned int > & getEndcap10DegMin() const
const OMTFConfiguration * myOmtfConfig
Definition: L1Track.h:19
Definition: DetId.h:18
const std::vector< unsigned int > & getBarrelMin() const
static constexpr int RPC
Definition: MuonSubdetId.h:14
const std::vector< unsigned int > & getEndcap20DegMin() const
static constexpr int DT
Definition: MuonSubdetId.h:12
static constexpr int CSC
Definition: MuonSubdetId.h:13
void OMTFinputMaker::initialize ( const edm::EventSetup es,
const OMTFConfiguration omtfConfig 
)

Definition at line 24 of file OMTFinputMaker.cc.

References AngleConverter::checkAndUpdateGeometry(), myAngleConverter, myOmtfConfig, and OMTFConfiguration::nPhiBins().

Referenced by OMTFPatternMaker::analyze(), and OMTFReconstruction::beginRun().

24  {
25 
27 
28  myOmtfConfig = omtfConfig;
29 
30 }
unsigned int nPhiBins() const
const OMTFConfiguration * myOmtfConfig
AngleConverter myAngleConverter
void checkAndUpdateGeometry(const edm::EventSetup &, unsigned int)
Update the Geometry with current Event Setup.
OMTFinput OMTFinputMaker::processCSC ( const CSCCorrelatedLCTDigiCollection cscDigis,
unsigned int  iProcessor,
l1t::tftype  type 
)
private

Take the CSC digis, select chambers connected to given processor, convers logal angles to global scale. For CSC do NOT take the bending angle.

Check it the data fits into given processor input range

Check if LCT trigger primitive has the right BX.

Accept CSC digis only up to eta=1.26. The nominal OMTF range is up to 1.24, but cutting at 1.24 kill efficnency at the edge. 1.26 is one eta bin above nominal.

Definition at line 259 of file OMTFinputMaker.cc.

References funct::abs(), acceptDigi(), OMTFinput::addLayerHit(), relativeConstraints::chamber, AngleConverter::getGlobalEta(), OMTFConfiguration::getHwToLogicLayer(), getInputNumber(), OMTFConfiguration::getLayerNumber(), AngleConverter::getProcessorPhi(), CSCConstants::LCT_CENTRAL_BX, myAngleConverter, myOmtfConfig, and mps_fire::result.

Referenced by buildInputForProcessor().

261  {
262 
264  if(!cscDigis) return result;
265 
266  auto chamber = cscDigis->begin();
267  auto chend = cscDigis->end();
268  for( ; chamber != chend; ++chamber ) {
269 
270  unsigned int rawid = (*chamber).first;
272  if(!acceptDigi(rawid, iProcessor, type)) continue;
273  auto digi = (*chamber).second.first;
274  auto dend = (*chamber).second.second;
275  for( ; digi != dend; ++digi ) {
276 
278  if (abs(digi->getBX()- CSCConstants::LCT_CENTRAL_BX)>0) continue;
279 
280  unsigned int hwNumber = myOmtfConfig->getLayerNumber(rawid);
281  if(myOmtfConfig->getHwToLogicLayer().find(hwNumber)==myOmtfConfig->getHwToLogicLayer().end()) continue;
282 
283  unsigned int iLayer = myOmtfConfig->getHwToLogicLayer().at(hwNumber);
284  int iPhi = myAngleConverter.getProcessorPhi(iProcessor, type, CSCDetId(rawid), *digi);
285  int iEta = myAngleConverter.getGlobalEta(rawid, *digi);
289  //if(abs(iEta)>1.26/2.61*240) continue;
290  //if (abs(iEta) > 115) continue;
291  unsigned int iInput= getInputNumber(rawid, iProcessor, type);
292 // std::cout <<" ADDING CSC hit, proc: "<<iProcessor<<" iPhi : " << iPhi <<" iEta: "<< iEta << std::endl;
293  result.addLayerHit(iLayer,iInput,iPhi,iEta);
294  }
295  }
296  return result;
297 }
type
Definition: HCALResponse.h:21
const std::map< int, int > & getHwToLogicLayer() const
int getGlobalEta(unsigned int rawid, const L1MuDTChambPhDigi &aDigi, const L1MuDTChambThContainer *dtThDigis)
Convert local eta coordinate to global digital microGMT scale.
const OMTFConfiguration * myOmtfConfig
int getProcessorPhi(unsigned int iProcessor, l1t::tftype part, const L1MuDTChambPhDigi &digi) const
AngleConverter myAngleConverter
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool acceptDigi(uint32_t rawId, unsigned int iProcessor, l1t::tftype type)
uint32_t getLayerNumber(uint32_t rawId) const
unsigned int getInputNumber(unsigned int rawId, unsigned int iProcessor, l1t::tftype type)
OMTFinput OMTFinputMaker::processDT ( const L1MuDTChambPhContainer dtPhDigis,
const L1MuDTChambThContainer dtThDigis,
unsigned int  iProcessor,
l1t::tftype  type 
)
private

Take the DT digis, select chambers connected to given processor, convers logal angles to global scale. For DT take also the bending angle.

Check it the data fits into given processor input range

Check Trigger primitive quality Ts2Tag() == 0 - take only first track from DT Trigger Server BxCnt() == 0 - ?? code()>=3 - take only double layer hits, HH, HL and LL

Definition at line 217 of file OMTFinputMaker.cc.

References acceptDigi(), OMTFinput::addLayerHit(), L1MuDTChambPhContainer::getContainer(), AngleConverter::getGlobalEta(), OMTFConfiguration::getHwToLogicLayer(), getInputNumber(), OMTFConfiguration::getLayerNumber(), AngleConverter::getProcessorPhi(), myAngleConverter, myOmtfConfig, and mps_fire::result.

Referenced by buildInputForProcessor().

221 {
222 
224  if(!dtPhDigis) return result;
225 
226  for (const auto digiIt: *dtPhDigis->getContainer()) {
227 
228  DTChamberId detid(digiIt.whNum(),digiIt.stNum(),digiIt.scNum()+1);
229 
231  if(!acceptDigi(detid.rawId(), iProcessor, type)) continue;
232 
237  // FIXME (MK): at least Ts2Tag selection is not correct! Check it
238 // if (digiIt.bxNum()!= 0 || digiIt.BxCnt()!= 0 || digiIt.Ts2Tag()!= 0 || digiIt.code()<4) continue;
239  if (digiIt.bxNum()!= 0) continue;
240  if (digiIt.code() != 4 && digiIt.code() != 5 && digiIt.code() != 6) continue;
241 
242  unsigned int hwNumber = myOmtfConfig->getLayerNumber(detid.rawId());
243  if(myOmtfConfig->getHwToLogicLayer().find(hwNumber)==myOmtfConfig->getHwToLogicLayer().end()) continue;
244 
245  auto iter = myOmtfConfig->getHwToLogicLayer().find(hwNumber);
246  unsigned int iLayer = iter->second;
247  int iPhi = myAngleConverter.getProcessorPhi(iProcessor, type, digiIt);
248  int iEta = myAngleConverter.getGlobalEta(detid.rawId(), digiIt, dtThDigis);
249  unsigned int iInput= getInputNumber(detid.rawId(), iProcessor, type);
250  result.addLayerHit(iLayer,iInput,iPhi,iEta);
251  result.addLayerHit(iLayer+1,iInput,digiIt.phiB(),iEta);
252  }
253 
254  return result;
255 
256 }
type
Definition: HCALResponse.h:21
const std::map< int, int > & getHwToLogicLayer() const
int getGlobalEta(unsigned int rawid, const L1MuDTChambPhDigi &aDigi, const L1MuDTChambThContainer *dtThDigis)
Convert local eta coordinate to global digital microGMT scale.
const OMTFConfiguration * myOmtfConfig
int getProcessorPhi(unsigned int iProcessor, l1t::tftype part, const L1MuDTChambPhDigi &digi) const
AngleConverter myAngleConverter
bool acceptDigi(uint32_t rawId, unsigned int iProcessor, l1t::tftype type)
uint32_t getLayerNumber(uint32_t rawId) const
unsigned int getInputNumber(unsigned int rawId, unsigned int iProcessor, l1t::tftype type)
Phi_Container const * getContainer() const
OMTFinput OMTFinputMaker::processRPC ( const RPCDigiCollection rpcDigis,
unsigned int  iProcessor,
l1t::tftype  type 
)
private

Decluster nearby hits in single chamber, by taking average cluster position, expressed in half RPC strip: pos = (cluster_begin + cluster_end)

Find clusters of consecutive fired strips. Have to copy the digis in chamber to sort them (not optimal). NOTE: when copying I select only digis with bx==0 //FIXME: find a better place/way to filtering digi against quality/BX etc.

Definition at line 303 of file OMTFinputMaker.cc.

References funct::abs(), acceptDigi(), OMTFinput::addLayerHit(), fastPrimaryVertexProducer_cfi::clusters, AngleConverter::getGlobalEta(), OMTFConfiguration::getHwToLogicLayer(), getInputNumber(), OMTFConfiguration::getLayerNumber(), AngleConverter::getProcessorPhi(), myAngleConverter, myOmtfConfig, DetId::rawId(), mps_fire::result, rpcPrimitiveCmp(), and str.

Referenced by buildInputForProcessor().

305  {
306 
308  if(!rpcDigis) return result;
309  std::stringstream str;
310 
311 // std::cout <<" RPC HITS, processor : " << iProcessor << std::endl;
312 
313  const RPCDigiCollection & rpcDigiCollection = *rpcDigis;
314  for (auto rollDigis : rpcDigiCollection) {
315  RPCDetId roll = rollDigis.first;
316  unsigned int rawid = roll.rawId();
317  int nClusters = 0;
318  if(!acceptDigi(rawid, iProcessor, type)) continue;
322 // for (auto tdigi = rollDigis.second.first; tdigi != rollDigis.second.second; tdigi++) { std::cout << "RPC DIGIS: " << roll.rawId()<< " "<<roll<<" digi: " << tdigi->strip() <<" bx: " << tdigi->bx() << std::endl; }
323  std::vector<RPCDigi> digisCopy;
324  std::copy_if(rollDigis.second.first, rollDigis.second.second, std::back_inserter(digisCopy), [](const RPCDigi & aDigi){return (aDigi.bx()==0);});
325  std::sort(digisCopy.begin(),digisCopy.end(),rpcPrimitiveCmp);
326  typedef std::pair<unsigned int, unsigned int> Cluster;
327  std::vector<Cluster> clusters;
328  for(auto & digi: digisCopy) {
329  if(clusters.empty()) clusters.push_back(Cluster(digi.strip(),digi.strip()));
330  else if (digi.strip() - clusters.back().second == 1) clusters.back().second = digi.strip();
331  else if (digi.strip() - clusters.back().second > 1) clusters.push_back(Cluster(digi.strip(),digi.strip()));
332  }
333 
334  for (auto & cluster: clusters) {
335 // int iPhiHalfStrip1 = myAngleConverter.getProcessorPhi(iProcessor, type, roll, cluster.first);
336 // int iPhiHalfStrip2 = myAngleConverter.getProcessorPhi(iProcessor, type, roll, cluster.second);
337  int iPhi = myAngleConverter.getProcessorPhi(iProcessor, type, roll, cluster.first, cluster.second);
338  int cSize = abs(int(cluster.first)-int(cluster.second))+1;
339 // std::cout << " HStrip_1: " << iPhiHalfStrip1 <<" HStrip_2: "<<iPhiHalfStrip2<<" iPhi: " << iPhi << " cluster: ["<< cluster.first << ", "<< cluster.second <<"]"<< std::endl;
340  if (cSize>3) continue;
341  int iEta = myAngleConverter.getGlobalEta(rawid, cluster.first);
342  unsigned int hwNumber = myOmtfConfig->getLayerNumber(rawid);
343  unsigned int iLayer = myOmtfConfig->getHwToLogicLayer().at(hwNumber);
344  unsigned int iInput= getInputNumber(rawid, iProcessor, type);
345 // std::cout <<"ADDING HIT: iLayer = " << iLayer << " iInput: " << iInput << " iPhi: " << iPhi << std::endl;
346  if (iLayer==17 && (iInput==0 || iInput==1)) continue; // FIXME (MK) there is no RPC link for that input, because it is taken by DAQ link
347  bool outres =
348  result.addLayerHit(iLayer,iInput,iPhi,iEta);
349 // if (cSize>2) flag |= 2;
350 // if (!outres) flag |= 1;
351  nClusters++;
352 
353  str <<" RPC halfDigi "
354  <<" begin: "<<cluster.first<<" end: "<<cluster.second
355  <<" iPhi: "<<iPhi
356  <<" iEta: "<<iEta
357  <<" hwNumber: "<<hwNumber
358  <<" iInput: "<<iInput
359  <<" iLayer: "<<iLayer
360  <<" out: " << outres
361  <<std::endl;
362  }
363 // if (nClusters > 2) flag=1;
364  }
365 
366  edm::LogInfo("OMTFInputMaker")<<str.str();
367  return result;
368 }
type
Definition: HCALResponse.h:21
const std::map< int, int > & getHwToLogicLayer() const
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:47
int getGlobalEta(unsigned int rawid, const L1MuDTChambPhDigi &aDigi, const L1MuDTChambThContainer *dtThDigis)
Convert local eta coordinate to global digital microGMT scale.
const OMTFConfiguration * myOmtfConfig
int getProcessorPhi(unsigned int iProcessor, l1t::tftype part, const L1MuDTChambPhDigi &digi) const
AngleConverter myAngleConverter
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
bool acceptDigi(uint32_t rawId, unsigned int iProcessor, l1t::tftype type)
uint32_t getLayerNumber(uint32_t rawId) const
unsigned int getInputNumber(unsigned int rawId, unsigned int iProcessor, l1t::tftype type)
bool rpcPrimitiveCmp(const RPCDigi &a, const RPCDigi &b)
#define str(s)
void OMTFinputMaker::setFlag ( int  aFlag)
inline

Definition at line 41 of file OMTFinputMaker.h.

References RemoveAddSevLevel::flag.

Referenced by OMTFReconstruction::getProcessorCandidates().

41 {flag = aFlag; }

Member Data Documentation

int OMTFinputMaker::flag
private

Definition at line 85 of file OMTFinputMaker.h.

AngleConverter OMTFinputMaker::myAngleConverter
private

Definition at line 81 of file OMTFinputMaker.h.

Referenced by initialize(), processCSC(), processDT(), and processRPC().

const OMTFConfiguration* OMTFinputMaker::myOmtfConfig
private