CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Attributes | Friends
OMTFConfiguration Class Reference

#include <OMTFConfiguration.h>

Public Types

typedef std::vector< int > vector1D
 
typedef std::vector< std::pair< unsigned int, unsigned int > > vector1D_pair
 
typedef std::vector< vector1Dvector2D
 
typedef std::vector< vector1D_pairvector2D_pair
 
typedef std::vector< vector2Dvector3D
 
typedef std::vector< vector2D_pairvector3D_pair
 
typedef std::vector< vector3Dvector4D
 

Public Member Functions

void configure (const L1TMuonOverlapParams *omtfParams)
 
unsigned int fwVersion () const
 
const std::vector< unsigned int > & getBarrelMax () const
 
const std::vector< unsigned int > & getBarrelMin () const
 
const std::set< int > & getBendingLayers () const
 
const vector3D_pairgetConnections () const
 
const std::vector< unsigned int > & getEndcap10DegMax () const
 
const std::vector< unsigned int > & getEndcap10DegMin () const
 
const std::vector< unsigned int > & getEndcap20DegMax () const
 
const std::vector< unsigned int > & getEndcap20DegMin () const
 
const std::map< int, int > & getHwToLogicLayer () const
 
uint32_t getLayerNumber (uint32_t rawId) const
 
const std::map< int, int > & getLogicToHwLayer () const
 
const std::map< int, int > & getLogicToLogic () const
 
vector4DgetMeasurements4D ()
 
const vector4DgetMeasurements4D () const
 
vector4DgetMeasurements4Dref ()
 
const vector4DgetMeasurements4Dref () const
 
const std::vector< std::vector< int > > & getProcessorPhiVsRefLayer () const
 
const L1TMuonOverlapParamsgetRawParams () const
 
const std::vector< std::vector< RefHitDef > > & getRefHitsDefs () const
 
const std::vector< int > & getRefToLogicNumber () const
 
unsigned int getRegionNumberFromMap (unsigned int iInput, unsigned int iRefLayer, int iPhi) const
 
const std::vector< std::vector< std::vector< std::pair< int, int > > > > & getRegionPhisVsRefLayerVsInput () const
 
int globalPhiStart (unsigned int iProcessor) const
 
void initCounterMatrices ()
 
bool isInRegionRange (int iPhiStart, unsigned int coneSize, int iPhi) const
 
float minPdfVal () const
 
unsigned int nGoldenPatterns () const
 
unsigned int nHitsPerLayer () const
 
unsigned int nInputs () const
 
unsigned int nLayers () const
 
unsigned int nLogicRegions () const
 
unsigned int nPdfAddrBits () const
 
unsigned int nPdfValBits () const
 
unsigned int nPhiBins () const
 
unsigned int nPhiBits () const
 
unsigned int nProcessors () const
 
unsigned int nRefHits () const
 
unsigned int nRefLayers () const
 
unsigned int nTestRefHits () const
 
 OMTFConfiguration ()
 
unsigned int patternsVersion () const
 

Private Attributes

std::vector< unsigned int > barrelMax
 
std::vector< unsigned int > barrelMin
 
std::set< int > bendingLayers
 
vector3D_pair connections
 Map of connections. More...
 
std::vector< unsigned int > endcap10DegMax
 
std::vector< unsigned int > endcap10DegMin
 
std::vector< unsigned int > endcap20DegMax
 
std::vector< unsigned int > endcap20DegMin
 
std::map< int, int > hwToLogicLayer
 
std::map< int, int > logicToHwLayer
 
std::map< int, int > logicToLogic
 
vector4D measurements4D
 4D matrices used during creation of the connections tables. More...
 
vector4D measurements4Dref
 
std::vector< std::vector< int > > processorPhiVsRefLayer
 
L1TMuonOverlapParams rawParams
 
std::vector< std::vector< RefHitDef > > refHitsDefs
 
std::vector< int > refToLogicNumber
 
std::vector< std::vector< std::vector< std::pair< int, int > > > > regionPhisVsRefLayerVsInput
 

Friends

std::ostream & operator<< (std::ostream &out, const OMTFConfiguration &aConfig)
 

Detailed Description

Definition at line 49 of file OMTFConfiguration.h.

Member Typedef Documentation

typedef std::vector<int> OMTFConfiguration::vector1D

Definition at line 57 of file OMTFConfiguration.h.

typedef std::vector< std::pair<unsigned int, unsigned int> > OMTFConfiguration::vector1D_pair

Definition at line 53 of file OMTFConfiguration.h.

typedef std::vector<vector1D > OMTFConfiguration::vector2D

Definition at line 58 of file OMTFConfiguration.h.

Definition at line 54 of file OMTFConfiguration.h.

typedef std::vector<vector2D > OMTFConfiguration::vector3D

Definition at line 59 of file OMTFConfiguration.h.

Definition at line 55 of file OMTFConfiguration.h.

typedef std::vector<vector3D > OMTFConfiguration::vector4D

Definition at line 60 of file OMTFConfiguration.h.

Constructor & Destructor Documentation

OMTFConfiguration::OMTFConfiguration ( )
inline

Definition at line 62 of file OMTFConfiguration.h.

References highPtTrackIsolations_cff::coneSize.

62 {;};

Member Function Documentation

void OMTFConfiguration::configure ( const L1TMuonOverlapParams omtfParams)

Set chamber sectors connections to logic processros.

Set connections tables

connections tables for each processor each logic cone Vector of all layers

Vector of all logic cones

Vector of all processors

Starting phis of each region Vector of all regions in one processor

Vector of all reflayers

Vector of all inputs

Vector of all processros

Symetrize connections. Use th same connections for all processors

Definition at line 66 of file OMTFConfiguration.cc.

References L1TMuonOverlapParams::LayerMapNode::bendingLayer, L1TMuonOverlapParams::connectedSectorsEnd(), L1TMuonOverlapParams::connectedSectorsStart(), L1TMuonOverlapParams::LayerMapNode::connectedToLayer, popcon2dropbox::copy(), L1TMuonOverlapParams::globalPhiStartMap(), L1TMuonOverlapParams::LayerMapNode::hwNumber, RefHitDef::iInput, RefHitDef::iRefLayer, RefHitDef::iRegion, L1TMuonOverlapParams::layerInputMap(), L1TMuonOverlapParams::layerMap(), L1TMuonOverlapParams::LayerMapNode::logicNumber, L1TMuonOverlapParams::RefLayerMapNode::logicNumber, MuonTCMETValueMapProducer_cff::nLayers, ecaldqm::binning::nPhiBins, RefHitDef::RefHitDef(), L1TMuonOverlapParams::refHitMap(), L1TMuonOverlapParams::RefLayerMapNode::refLayer, and L1TMuonOverlapParams::refLayerMap().

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

66  {
67 
68 
69  rawParams = *omtfParams;
70 
72  barrelMin.resize(nProcessors());
73  endcap10DegMin.resize(nProcessors());
74  endcap20DegMin.resize(nProcessors());
75 
76  barrelMax.resize(nProcessors());
77  endcap10DegMax.resize(nProcessors());
78  endcap20DegMax.resize(nProcessors());
79 
80  const std::vector<int> *connectedSectorsStartVec = omtfParams->connectedSectorsStart();
81  const std::vector<int> *connectedSectorsEndVec = omtfParams->connectedSectorsEnd();
82 
83  std::copy(connectedSectorsStartVec->begin(), connectedSectorsStartVec->begin()+6, barrelMin.begin());
84  std::copy(connectedSectorsStartVec->begin()+6, connectedSectorsStartVec->begin()+12, endcap10DegMin.begin());
85  std::copy(connectedSectorsStartVec->begin()+12, connectedSectorsStartVec->end(), endcap20DegMin.begin());
86 
87  std::copy(connectedSectorsEndVec->begin(), connectedSectorsEndVec->begin()+6, barrelMax.begin());
88  std::copy(connectedSectorsEndVec->begin()+6, connectedSectorsEndVec->begin()+12, endcap10DegMax.begin());
89  std::copy(connectedSectorsEndVec->begin()+12, connectedSectorsEndVec->end(), endcap20DegMax.begin());
90 
92  const std::vector<L1TMuonOverlapParams::LayerMapNode> *layerMap = omtfParams->layerMap();
93 
94  for(unsigned int iLayer=0;iLayer<nLayers();++iLayer){
95  L1TMuonOverlapParams::LayerMapNode aNode = layerMap->at(iLayer);
96  hwToLogicLayer[aNode.hwNumber] = aNode.logicNumber;
97  logicToHwLayer[aNode.logicNumber] = aNode.hwNumber;
99  if(aNode.bendingLayer) bendingLayers.insert(aNode.logicNumber);
100  }
102  refToLogicNumber.resize(nRefLayers());
103 
104  const std::vector<L1TMuonOverlapParams::RefLayerMapNode> *refLayerMap = omtfParams->refLayerMap();
105  for(unsigned int iRefLayer=0;iRefLayer<nRefLayers();++iRefLayer){
106  L1TMuonOverlapParams::RefLayerMapNode aNode = refLayerMap->at(iRefLayer);
107  refToLogicNumber[aNode.refLayer] = aNode.logicNumber;
108  }
110  std::vector<int> vector1D(nRefLayers(),nPhiBins());
112 
115  vector1D_pair aLayer1D(nLayers());
117  vector2D_pair aLayer2D;
118  aLayer2D.assign(nLogicRegions(),aLayer1D);
120  connections.assign(nProcessors(),aLayer2D);
121 
124  std::vector<std::pair<int,int> > aRefHit1D(nLogicRegions(),std::pair<int,int>(9999,9999));
126  std::vector<std::vector<std::pair<int,int> > > aRefHit2D;
127  aRefHit2D.assign(nRefLayers(),aRefHit1D);
129  regionPhisVsRefLayerVsInput.assign(nInputs(),aRefHit2D);
130 
131  //Vector of ref hit definitions
132  std::vector<RefHitDef> aRefHitsDefs(nRefHits());
134  refHitsDefs.assign(nProcessors(),aRefHitsDefs);
135 
136  const std::vector<int> *phiStartMap = omtfParams->globalPhiStartMap();
137  const std::vector<L1TMuonOverlapParams::RefHitNode> *refHitMap = omtfParams->refHitMap();
138  const std::vector<L1TMuonOverlapParams::LayerInputNode> *layerInputMap = omtfParams->layerInputMap();
139  unsigned int tmpIndex = 0;
140  for(unsigned int iProcessor=0;iProcessor<nProcessors();++iProcessor){
141  for(unsigned int iRefLayer=0;iRefLayer<nRefLayers();++iRefLayer){
142  int iPhiStart = phiStartMap->at(iRefLayer+iProcessor*nRefLayers());
143  processorPhiVsRefLayer[iProcessor][iRefLayer] = iPhiStart;
144  }
145  for(unsigned int iRefHit=0;iRefHit<nRefHits();++iRefHit){
146  int iPhiMin = refHitMap->at(iRefHit+iProcessor*nRefHits()).iPhiMin;
147  int iPhiMax = refHitMap->at(iRefHit+iProcessor*nRefHits()).iPhiMax;
148  unsigned int iInput = refHitMap->at(iRefHit+iProcessor*nRefHits()).iInput;
149  unsigned int iRegion = refHitMap->at(iRefHit+iProcessor*nRefHits()).iRegion;
150  unsigned int iRefLayer = refHitMap->at(iRefHit+iProcessor*nRefHits()).iRefLayer;
151  regionPhisVsRefLayerVsInput[iInput][iRefLayer][iRegion] = std::pair<int,int>(iPhiMin,iPhiMax);
152  refHitsDefs[iProcessor][iRefHit] = RefHitDef(iInput,iPhiMin,iPhiMax,iRegion,iRefLayer);
153  }
154  for(unsigned int iLogicRegion=0;iLogicRegion<nLogicRegions();++iLogicRegion){
155  for(unsigned int iLayer=0;iLayer<nLayers();++iLayer){
156  tmpIndex = iLayer+iLogicRegion*nLayers() + iProcessor*nLogicRegions()*nLayers();
157  unsigned int iFirstInput = layerInputMap->at(tmpIndex).iFirstInput;
158  unsigned int nInputsInRegion = layerInputMap->at(tmpIndex).nInputs;
159  connections[iProcessor][iLogicRegion][iLayer] = std::pair<unsigned int, unsigned int>(iFirstInput,nInputsInRegion);
161  if(iProcessor!=0) connections[iProcessor][iLogicRegion][iLayer] = connections[0][iLogicRegion][iLayer];
162  }
163  }
164  }
165 
167 
168 }
std::vector< unsigned int > endcap20DegMax
std::vector< vector1D_pair > vector2D_pair
const std::vector< LayerMapNode > * layerMap() const
std::map< int, int > logicToLogic
std::vector< unsigned int > endcap10DegMin
std::vector< std::pair< unsigned int, unsigned int > > vector1D_pair
unsigned int nRefLayers() const
unsigned int nRefHits() const
def copy(args, dbName)
unsigned int hwNumber
short layer number used within OMTF emulator
const std::vector< int > * connectedSectorsEnd() const
unsigned int nLayers() const
unsigned int logicNumber
logic numer of the layer
unsigned int nPhiBins() const
unsigned int nProcessors() const
std::vector< std::vector< int > > processorPhiVsRefLayer
std::map< int, int > logicToHwLayer
std::vector< unsigned int > endcap20DegMin
std::vector< int > refToLogicNumber
std::vector< unsigned int > endcap10DegMax
const std::vector< LayerInputNode > * layerInputMap() const
std::vector< std::vector< RefHitDef > > refHitsDefs
vector3D_pair connections
Map of connections.
unsigned int nInputs() const
std::vector< int > vector1D
bool bendingLayer
Is this a bending layers?
std::vector< unsigned int > barrelMin
unsigned int refLayer
Reference layer number.
const std::vector< int > * globalPhiStartMap() const
std::set< int > bendingLayers
std::map< int, int > hwToLogicLayer
L1TMuonOverlapParams rawParams
unsigned int logicNumber
Corresponding logical layer number.
unsigned int nLogicRegions() const
const std::vector< RefLayerMapNode > * refLayerMap() const
std::vector< std::vector< std::vector< std::pair< int, int > > > > regionPhisVsRefLayerVsInput
const std::vector< int > * connectedSectorsStart() const
std::vector< unsigned int > barrelMax
const std::vector< RefHitNode > * refHitMap() const
unsigned int OMTFConfiguration::fwVersion ( ) const
inline

Definition at line 92 of file OMTFConfiguration.h.

92 {return (rawParams.fwVersion()>>16) & 0xFFFF;};
unsigned fwVersion() const
L1TMuonOverlapParams rawParams
const std::vector<unsigned int>& OMTFConfiguration::getBarrelMax ( ) const
inline

Definition at line 119 of file OMTFConfiguration.h.

Referenced by OMTFinputMaker::acceptDigi().

119 {return barrelMax;}
std::vector< unsigned int > barrelMax
const std::vector<unsigned int>& OMTFConfiguration::getBarrelMin ( ) const
inline

Definition at line 118 of file OMTFConfiguration.h.

Referenced by OMTFinputMaker::acceptDigi(), and OMTFinputMaker::getInputNumber().

118 {return barrelMin;}
std::vector< unsigned int > barrelMin
const std::set<int>& OMTFConfiguration::getBendingLayers ( ) const
inline
const vector3D_pair& OMTFConfiguration::getConnections ( ) const
inline

Definition at line 129 of file OMTFConfiguration.h.

Referenced by OMTFProcessor::restrictInput().

129 {return connections;};
vector3D_pair connections
Map of connections.
const std::vector<unsigned int>& OMTFConfiguration::getEndcap10DegMax ( ) const
inline

Definition at line 121 of file OMTFConfiguration.h.

Referenced by OMTFinputMaker::acceptDigi().

121 {return endcap10DegMax;}
std::vector< unsigned int > endcap10DegMax
const std::vector<unsigned int>& OMTFConfiguration::getEndcap10DegMin ( ) const
inline

Definition at line 120 of file OMTFConfiguration.h.

Referenced by OMTFinputMaker::acceptDigi(), and OMTFinputMaker::getInputNumber().

120 {return endcap10DegMin;}
std::vector< unsigned int > endcap10DegMin
const std::vector<unsigned int>& OMTFConfiguration::getEndcap20DegMax ( ) const
inline

Definition at line 123 of file OMTFConfiguration.h.

Referenced by OMTFinputMaker::acceptDigi().

123 {return endcap20DegMax;}
std::vector< unsigned int > endcap20DegMax
const std::vector<unsigned int>& OMTFConfiguration::getEndcap20DegMin ( ) const
inline

Definition at line 122 of file OMTFConfiguration.h.

Referenced by OMTFinputMaker::acceptDigi(), and OMTFinputMaker::getInputNumber().

122 {return endcap20DegMin;}
std::vector< unsigned int > endcap20DegMin
const std::map<int,int>& OMTFConfiguration::getHwToLogicLayer ( ) const
inline

Definition at line 112 of file OMTFConfiguration.h.

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

112 {return hwToLogicLayer;}
std::map< int, int > hwToLogicLayer
uint32_t OMTFConfiguration::getLayerNumber ( uint32_t  rawId) const

Return layer number encoding subsystem, and station number in a simple formula: aLayer+100*detId.subdetId() where aLayer is a layer number counting from vertex

Definition at line 236 of file OMTFConfiguration.cc.

References gather_cfg::cout, MuonSubdetId::CSC, omtf::DataWord64::csc, DetId::det(), MuonSubdetId::DT, dt, gedGsfElectrons_cfi::isBarrel, RPCDetId::layer(), DetId::Muon, RPCDetId::region(), CSCDetId::ring(), MuonSubdetId::RPC, DTChamberId::station(), CSCDetId::station(), RPCDetId::station(), and DetId::subdetId().

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

236  {
237 
238  uint32_t aLayer = 0;
239 
240  DetId detId(rawId);
241  if (detId.det() != DetId::Muon){
242  std::cout << "PROBLEM: hit in unknown Det, detID: "<<detId.det()<<std::endl;
243  return rawId;
244  }
245 
246  switch (detId.subdetId()) {
247  case MuonSubdetId::RPC: {
248  RPCDetId aId(rawId);
249  bool isBarrel = (aId.region()==0);
250  if(isBarrel) aLayer = aId.station() <=2 ?
251  2*( aId.station()-1)+ aId.layer()
252  : aId.station()+2;
253  else aLayer = aId.station();
254  aLayer+= 10*(!isBarrel);
255  break;
256  }
257  case MuonSubdetId::DT: {
258  DTChamberId dt(rawId);
259  aLayer = dt.station();
260  break;
261  }
262  case MuonSubdetId::CSC: {
263  CSCDetId csc(rawId);
264  aLayer = csc.station();
265  if(csc.ring()==2 && csc.station()==1) aLayer = 1811;//1811 = 2011 - 200, as we want to get 2011 for this chamber.
266  if(csc.station()==4) aLayer = 4;
267  break;
268  }
269  }
270 
271  int hwNumber = aLayer+100*detId.subdetId();
272 
273  return hwNumber;
274 }
float dt
Definition: AMPTWrapper.h:126
static const int CSC
Definition: MuonSubdetId.h:13
Definition: L1Track.h:19
Definition: DetId.h:18
static const int RPC
Definition: MuonSubdetId.h:14
static const int DT
Definition: MuonSubdetId.h:12
const std::map<int,int>& OMTFConfiguration::getLogicToHwLayer ( ) const
inline

Definition at line 113 of file OMTFConfiguration.h.

113 {return logicToHwLayer;}
std::map< int, int > logicToHwLayer
const std::map<int,int>& OMTFConfiguration::getLogicToLogic ( ) const
inline

Definition at line 114 of file OMTFConfiguration.h.

Referenced by OMTFResult::finalise().

114 {return logicToLogic;}
std::map< int, int > logicToLogic
vector4D& OMTFConfiguration::getMeasurements4D ( )
inline

Definition at line 131 of file OMTFConfiguration.h.

Referenced by OMTFPatternMaker::endJob(), OMTFConfigMaker::fillInputRange(), and XMLConfigWriter::writeConnectionsData().

131 {return measurements4D;}
vector4D measurements4D
4D matrices used during creation of the connections tables.
const vector4D& OMTFConfiguration::getMeasurements4D ( ) const
inline

Definition at line 134 of file OMTFConfiguration.h.

134 {return measurements4D;}
vector4D measurements4D
4D matrices used during creation of the connections tables.
vector4D& OMTFConfiguration::getMeasurements4Dref ( )
inline
const vector4D& OMTFConfiguration::getMeasurements4Dref ( ) const
inline

Definition at line 135 of file OMTFConfiguration.h.

References edm::operator<<(), and MillePedeFileConverter_cfg::out.

135 {return measurements4Dref;}
const std::vector<std::vector<int> >& OMTFConfiguration::getProcessorPhiVsRefLayer ( ) const
inline

Definition at line 125 of file OMTFConfiguration.h.

Referenced by XMLConfigWriter::writeConnectionsData().

125 {return processorPhiVsRefLayer;}
std::vector< std::vector< int > > processorPhiVsRefLayer
const L1TMuonOverlapParams* OMTFConfiguration::getRawParams ( ) const
inline

Definition at line 95 of file OMTFConfiguration.h.

Referenced by OMTFPatternMaker::endJob().

95 {return &rawParams;};
L1TMuonOverlapParams rawParams
const std::vector<std::vector<RefHitDef> >& OMTFConfiguration::getRefHitsDefs ( ) const
inline

Definition at line 127 of file OMTFConfiguration.h.

Referenced by OMTFProcessor::fillCounts(), OMTFinput::getRefHits(), and OMTFProcessor::processInput().

127 {return refHitsDefs;}
std::vector< std::vector< RefHitDef > > refHitsDefs
const std::vector<int>& OMTFConfiguration::getRefToLogicNumber ( ) const
inline
unsigned int OMTFConfiguration::getRegionNumberFromMap ( unsigned int  iInput,
unsigned int  iRefLayer,
int  iPhi 
) const

Find logic region number using first input number and then local phi value. The input and phi ranges are taken from DB.

Definition at line 214 of file OMTFConfiguration.cc.

References plotBeamSpotDB::first, RefHitDef::iRegion, and edm::second().

Referenced by OMTFConfigMaker::fillPhiMaps(), and OMTFConfigMaker::makeConnetionsMap().

216  {
217 
218  for(unsigned int iRegion=0;iRegion<nLogicRegions();++iRegion){
219  if(iPhi>=regionPhisVsRefLayerVsInput[iInput][iRefLayer][iRegion].first &&
220  iPhi<=regionPhisVsRefLayerVsInput[iInput][iRefLayer][iRegion].second)
221  return iRegion;
222  }
223 
224  return 99;
225 }
U second(std::pair< T, U > const &p)
unsigned int nLogicRegions() const
std::vector< std::vector< std::vector< std::pair< int, int > > > > regionPhisVsRefLayerVsInput
const std::vector<std::vector<std::vector<std::pair<int,int> > > >& OMTFConfiguration::getRegionPhisVsRefLayerVsInput ( ) const
inline

Definition at line 126 of file OMTFConfiguration.h.

std::vector< std::vector< std::vector< std::pair< int, int > > > > regionPhisVsRefLayerVsInput
int OMTFConfiguration::globalPhiStart ( unsigned int  iProcessor) const

Return global phi for beggining of given processor Uses minim phi over all reference layers.

Definition at line 228 of file OMTFConfiguration.cc.

References begin, and end.

Referenced by XMLConfigWriter::writeConnectionsData().

228  {
229 
230  return *std::min_element(processorPhiVsRefLayer[iProcessor].begin(),
231  processorPhiVsRefLayer[iProcessor].end());
232 
233 }
std::vector< std::vector< int > > processorPhiVsRefLayer
#define end
Definition: vmac.h:39
#define begin
Definition: vmac.h:32
void OMTFConfiguration::initCounterMatrices ( )

Vector of all inputs

Vector of all layers

Vector of all logic cones

Vector of all processors

Definition at line 47 of file OMTFConfiguration.cc.

References MuonTCMETValueMapProducer_cff::nLayers.

47  {
48 
50  std::vector<int> aLayer1D(nInputs(),0);
51 
53  vector2D aLayer2D;
54  aLayer2D.assign(nLayers(),aLayer1D);
55 
57  vector3D aLayer3D;
58  aLayer3D.assign(nLogicRegions(),aLayer2D);
59 
61  measurements4D.assign(nProcessors(),aLayer3D);
62  measurements4Dref.assign(nProcessors(),aLayer3D);
63 }
unsigned int nLayers() const
unsigned int nProcessors() const
vector4D measurements4D
4D matrices used during creation of the connections tables.
std::vector< vector2D > vector3D
std::vector< vector1D > vector2D
unsigned int nInputs() const
unsigned int nLogicRegions() const
bool OMTFConfiguration::isInRegionRange ( int  iPhiStart,
unsigned int  coneSize,
int  iPhi 
) const

Check if given referecne hit is in phi range for some logic cone. Care is needed arounf +Pi and +2Pi points

Definition at line 194 of file OMTFConfiguration.cc.

References createfilelist::int, and ecaldqm::binning::nPhiBins.

196  {
197 
198  if(iPhi<0) iPhi+=nPhiBins();
199  if(iPhiStart<0) iPhiStart+=nPhiBins();
200 
201  if(iPhiStart+(int)coneSize<(int)nPhiBins()){
202  return iPhiStart<=iPhi && iPhiStart+(int)coneSize>iPhi;
203  }
204  else if(iPhi>(int)nPhiBins()/2){
205  return iPhiStart<=iPhi;
206  }
207  else if(iPhi<(int)nPhiBins()/2){
208  return iPhi<iPhiStart+(int)coneSize-(int)nPhiBins();
209  }
210  return false;
211 }
unsigned int nPhiBins() const
return(e1-e2)*(e1-e2)+dp *dp
float OMTFConfiguration::minPdfVal ( ) const
inline

Definition at line 97 of file OMTFConfiguration.h.

Referenced by GoldenPattern::normalise().

97 {return 0.001;};
unsigned int OMTFConfiguration::nGoldenPatterns ( ) const
inline

Definition at line 110 of file OMTFConfiguration.h.

Referenced by OMTFProcessor::configure().

110 {return rawParams.nGoldenPatterns();};
L1TMuonOverlapParams rawParams
unsigned int OMTFConfiguration::nHitsPerLayer ( ) const
inline

Definition at line 99 of file OMTFConfiguration.h.

Referenced by operator<<().

99 {return rawParams.nHitsPerLayer();};
L1TMuonOverlapParams rawParams
unsigned int OMTFConfiguration::nInputs ( ) const
inline

Definition at line 109 of file OMTFConfiguration.h.

Referenced by OMTFConfigMaker::fillPhiMaps(), and OMTFConfigMaker::printConnections().

109 {return rawParams.nInputs();};
L1TMuonOverlapParams rawParams
unsigned int OMTFConfiguration::nLayers ( ) const
inline
unsigned int OMTFConfiguration::nLogicRegions ( ) const
inline
unsigned int OMTFConfiguration::nPdfAddrBits ( ) const
inline
unsigned int OMTFConfiguration::nPdfValBits ( ) const
inline

Definition at line 103 of file OMTFConfiguration.h.

Referenced by GoldenPattern::normalise(), and operator<<().

103 {return rawParams.nPdfValBits();};
L1TMuonOverlapParams rawParams
unsigned int OMTFConfiguration::nPhiBins ( ) const
inline
unsigned int OMTFConfiguration::nPhiBits ( ) const
inline

Definition at line 101 of file OMTFConfiguration.h.

Referenced by OMTFinput::shiftMyPhi(), and XMLConfigWriter::writeConnectionsData().

101 {return rawParams.nPhiBits();};
L1TMuonOverlapParams rawParams
unsigned int OMTFConfiguration::nProcessors ( ) const
inline

Definition at line 107 of file OMTFConfiguration.h.

Referenced by operator<<(), and OMTFReconstruction::reconstruct().

107 {return rawParams.nProcessors();};
L1TMuonOverlapParams rawParams
unsigned int OMTFConfiguration::nRefHits ( ) const
inline
unsigned int OMTFConfiguration::nRefLayers ( ) const
inline
unsigned int OMTFConfiguration::nTestRefHits ( ) const
inline
unsigned int OMTFConfiguration::patternsVersion ( ) const
inline

Definition at line 93 of file OMTFConfiguration.h.

Referenced by XMLConfigWriter::initialiseXMLDocument().

93 {return rawParams.fwVersion() & 0xFFFF;};
unsigned fwVersion() const
L1TMuonOverlapParams rawParams

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  out,
const OMTFConfiguration aConfig 
)
friend

Definition at line 171 of file OMTFConfiguration.cc.

171  {
172 
173 
174  out<<"nLayers(): "<<aConfig.nLayers()
175  <<" nHitsPerLayer(): "<<aConfig.nHitsPerLayer()
176  <<" nRefLayers(): "<<aConfig.nRefLayers()
177  <<" nPdfAddrBits: "<<aConfig.nPdfAddrBits()
178  <<" nPdfValBits: "<<aConfig.nPdfValBits()
179  <<std::endl;
180 
181  for(unsigned int iProcessor = 0;iProcessor<aConfig.nProcessors(); ++iProcessor){
182  out<<"Processor: "<<iProcessor;
183  for(unsigned int iRefLayer=0;iRefLayer<aConfig.nRefLayers();++iRefLayer){
184  out<<" "<<aConfig.processorPhiVsRefLayer[iProcessor][iRefLayer];
185  }
186  out<<std::endl;
187  }
188 
189  return out;
190 
191 }
unsigned int nRefLayers() const
unsigned int nLayers() const
unsigned int nProcessors() const
std::vector< std::vector< int > > processorPhiVsRefLayer
unsigned int nPdfAddrBits() const
unsigned int nHitsPerLayer() const
unsigned int nPdfValBits() const

Member Data Documentation

std::vector<unsigned int> OMTFConfiguration::barrelMax
private

Definition at line 153 of file OMTFConfiguration.h.

std::vector<unsigned int> OMTFConfiguration::barrelMin
private

Starting and final sectors connected to processors. Index: processor number

Definition at line 152 of file OMTFConfiguration.h.

std::set<int> OMTFConfiguration::bendingLayers
private

Definition at line 146 of file OMTFConfiguration.h.

vector3D_pair OMTFConfiguration::connections
private

Map of connections.

Definition at line 181 of file OMTFConfiguration.h.

std::vector<unsigned int> OMTFConfiguration::endcap10DegMax
private

Definition at line 155 of file OMTFConfiguration.h.

std::vector<unsigned int> OMTFConfiguration::endcap10DegMin
private

Definition at line 154 of file OMTFConfiguration.h.

std::vector<unsigned int> OMTFConfiguration::endcap20DegMax
private

Definition at line 157 of file OMTFConfiguration.h.

std::vector<unsigned int> OMTFConfiguration::endcap20DegMin
private

Definition at line 156 of file OMTFConfiguration.h.

std::map<int,int> OMTFConfiguration::hwToLogicLayer
private

Definition at line 143 of file OMTFConfiguration.h.

std::map<int,int> OMTFConfiguration::logicToHwLayer
private

Definition at line 144 of file OMTFConfiguration.h.

std::map<int,int> OMTFConfiguration::logicToLogic
private

Definition at line 145 of file OMTFConfiguration.h.

vector4D OMTFConfiguration::measurements4D
private

4D matrices used during creation of the connections tables.

Definition at line 184 of file OMTFConfiguration.h.

vector4D OMTFConfiguration::measurements4Dref
private

Definition at line 185 of file OMTFConfiguration.h.

std::vector<std::vector<int> > OMTFConfiguration::processorPhiVsRefLayer
private

Starting iPhi for each processor and each referecne layer Global phi scale is used First index: processor number Second index: referecne layer number

Definition at line 163 of file OMTFConfiguration.h.

Referenced by operator<<().

L1TMuonOverlapParams OMTFConfiguration::rawParams
private

Definition at line 141 of file OMTFConfiguration.h.

std::vector<std::vector<RefHitDef> > OMTFConfiguration::refHitsDefs
private

Vector with definitions of reference hits Vector has fixed size of nRefHits Order of elements defines priority order First index: processor number (0-5) Second index: ref hit number (0-127)

Definition at line 178 of file OMTFConfiguration.h.

std::vector<int> OMTFConfiguration::refToLogicNumber
private

Definition at line 147 of file OMTFConfiguration.h.

std::vector<std::vector<std::vector<std::pair<int,int> > > > OMTFConfiguration::regionPhisVsRefLayerVsInput
private

Begin and end local phi for each logis region First index: input number Second index: reference layer number Third index: region pair.first: starting phi of region (inclusive) pair.second: ending phi of region (inclusive)

Definition at line 171 of file OMTFConfiguration.h.