57 int aPhiMin,
int aPhiMax,
59 unsigned int aRefLayer):
63 range(std::pair<int,int>(aPhiMin,aPhiMax)){}
68 return iPhi>=
range.first &&
78 <<
" iInput: "<<aRefHitDef.
iInput
79 <<
" iRegion: "<<aRefHitDef.
iRegion
80 <<
" range: ("<<aRefHitDef.
range.first
81 <<
", "<<aRefHitDef.
range.second<<std::endl;
90 if (!theConfig.
exists(
"configXMLFile") )
return;
103 std::vector<int> aLayer1D(
nInputs,0);
107 aLayer2D.assign(
nLayers,aLayer1D);
140 nInputs = omtfParams->nInputs();
141 nLayers = omtfParams->nLayers();
154 std::vector<int> *connectedSectorsStartVec = omtfParams->connectedSectorsStart();
155 std::vector<int> *connectedSectorsEndVec = omtfParams->connectedSectorsEnd();
157 std::copy(connectedSectorsStartVec->begin(), connectedSectorsStartVec->begin()+6,
barrelMin.begin());
161 std::copy(connectedSectorsEndVec->begin(), connectedSectorsEndVec->begin()+6,
barrelMax.begin());
166 std::vector<L1TMuonOverlapParams::LayerMapNode> *layerMap = omtfParams->layerMap();
178 std::vector<L1TMuonOverlapParams::RefLayerMapNode> *refLayerMap = omtfParams->refLayerMap();
200 std::vector<std::vector<std::pair<int,int> > > aRefHit2D;
201 aRefHit2D.assign(OMTFConfiguration::nRefLayers,aRefHit1D);
210 std::vector<int> *phiStartMap = omtfParams->globalPhiStartMap();
211 std::vector<L1TMuonOverlapParams::RefHitNode> *refHitMap = omtfParams->refHitMap();
212 std::vector<L1TMuonOverlapParams::LayerInputNode> *layerInputMap = omtfParams->layerInputMap();
213 unsigned int tmpIndex = 0;
216 int iPhiStart = phiStartMap->at(iRefLayer+iProcessor*OMTFConfiguration::nRefLayers);
220 int iPhiMin = refHitMap->at(iRefHit+iProcessor*OMTFConfiguration::nRefHits).iPhiMin;
221 int iPhiMax = refHitMap->at(iRefHit+iProcessor*OMTFConfiguration::nRefHits).iPhiMax;
222 unsigned int iInput = refHitMap->at(iRefHit+iProcessor*OMTFConfiguration::nRefHits).iInput;
223 unsigned int iRegion = refHitMap->at(iRefHit+iProcessor*OMTFConfiguration::nRefHits).iRegion;
224 unsigned int iRefLayer = refHitMap->at(iRefHit+iProcessor*OMTFConfiguration::nRefHits).iRefLayer;
230 tmpIndex = iLayer+iLogicRegion*OMTFConfiguration::nLayers + iProcessor*OMTFConfiguration::nLogicRegions*
OMTFConfiguration::nLayers;
231 unsigned int iFirstInput = layerInputMap->at(tmpIndex).iFirstInput;
232 unsigned int nInputs = layerInputMap->at(tmpIndex).nInputs;
248 out<<
"nLayers: "<<aConfig.
nLayers
255 for(
unsigned int iProcessor = 0;iProcessor<aConfig.
nProcessors; ++iProcessor){
256 out<<
"Processor: "<<iProcessor;
257 for(
unsigned int iRefLayer=0;iRefLayer<aConfig.
nRefLayers;++iRefLayer){
276 return iPhiStart<=iPhi && iPhiStart+(int)coneSize>iPhi;
278 else if(iPhi>(
int)OMTFConfiguration::nPhiBins/2){
279 return iPhiStart<=iPhi;
281 else if(iPhi<(
int)OMTFConfiguration::nPhiBins/2){
289 unsigned int iRefLayer,
297 unsigned int iRegion = 0;
303 iPhiStart+=logicRegionSize;
312 unsigned int iRefLayer,
338 std::cout <<
"PROBLEM: hit in unknown Det, detID: "<<detId.
det()<<std::endl;
346 if(isBarrel) aLayer = aId.
station() <=2 ?
362 if(csc.
station()==4) aLayer = 5;
367 int hwNumber = aLayer+100*detId.
subdetId();
bool fitsRange(int iPhi) const
static unsigned int getRegionNumber(unsigned int iProcessor, unsigned int iRefLayer, int iPhi)
T getParameter(std::string const &) const
static unsigned int nLayers
OMTFConfiguration(const edm::ParameterSet &cfg)
static unsigned int nInputs
unsigned int hwNumber
short layer number used within OMTF emulator
static vector4D measurements4D
static std::vector< unsigned int > endcap20DegMax
static vector3D_A connections
void initCounterMatrices()
bool isBarrel(GeomDetEnumerators::SubDetector m)
static bool isInRegionRange(int iPhiStart, unsigned int coneSize, int iPhi)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
std::vector< vector2D_A > vector3D_A
static int globalPhiStart(unsigned int iProcessor)
unsigned int logicNumber
logic numer of the layer
static std::vector< unsigned int > endcap10DegMin
static std::vector< unsigned int > barrelMax
unsigned int iInput
Hit input number within a cone.
std::ostream & operator<<(std::ostream &out, const ALILine &li)
static unsigned int nProcessors
static unsigned int nLogicRegions
static vector4D measurements4Dref
static std::map< int, int > logicToLogic
std::vector< vector2D > vector3D
U second(std::pair< T, U > const &p)
static unsigned int nPdfAddrBits
std::vector< vector1D > vector2D
static std::vector< unsigned int > barrelMin
void configure(XMLConfigReader *aReader)
static unsigned int nTestRefHits
static unsigned int nHitsPerLayer
static std::vector< std::vector< int > > processorPhiVsRefLayer
std::vector< std::pair< unsigned int, unsigned int > > vector1D_A
Map of connections.
std::vector< int > vector1D
static unsigned int nPhiBins
RefHitDef(unsigned int aInput=15, int aPhiMin=5760, int aPhiMax=5760, unsigned int aRegion=99, unsigned int aRefLayer=99)
void readConfig(const std::string fName)
bool bendingLayer
Is this a bending layers?
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static std::vector< int > refToLogicNumber
static unsigned int nPhiBits
void setConfigFile(const std::string &fName)
static std::map< int, int > hwToLogicLayer
unsigned int refLayer
Reference layer number.
static unsigned int nRefLayers
std::pair< int, int > range
static unsigned int getRegionNumberFromMap(unsigned int iProcessor, unsigned int iRefLayer, int iPhi)
static std::map< int, int > logicToHwLayer
static unsigned int nRefHits
static std::set< int > bendingLayers
unsigned int iRefLayer
Reference layer logic number (0-7)
unsigned int logicNumber
Corresponding logical layer number.
unsigned int connectedToLayer
unsigned int iRegion
Region number assigned to this referecne hit.
static unsigned int nGoldenPatterns
std::vector< vector1D_A > vector2D_A
int station() const
Return the station number.
Detector det() const
get the detector field from this detid
static std::vector< unsigned int > endcap10DegMax
static std::vector< std::vector< std::vector< std::pair< int, int > > > > regionPhisVsRefLayerVsProcessor
static std::vector< unsigned int > endcap20DegMin
std::vector< vector3D > vector4D
static unsigned int nPdfValBits
static uint32_t getLayerNumber(uint32_t rawId)
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
static std::vector< std::vector< RefHitDef > > refHitsDefs