22 int aPhiMin,
int aPhiMax,
24 unsigned int aRefLayer):
28 range(std::pair<int,int>(aPhiMin,aPhiMax)){}
33 return iPhi>=
range.first &&
43 <<
" iInput: "<<aRefHitDef.
iInput
44 <<
" iRegion: "<<aRefHitDef.
iRegion
45 <<
" range: ("<<aRefHitDef.
range.first
46 <<
", "<<aRefHitDef.
range.second<<std::endl;
56 if (!theConfig.
exists(
"configXMLFile") )
return;
69 std::vector<int> aLayer1D(
nInputs,0);
73 aLayer2D.assign(
nLayers,aLayer1D);
124 std::copy(connectedSectorsStartVec->begin(), connectedSectorsStartVec->begin()+6,
barrelMin.begin());
128 std::copy(connectedSectorsEndVec->begin(), connectedSectorsEndVec->begin()+6,
barrelMax.begin());
133 const std::vector<L1TMuonOverlapParams::LayerMapNode> *layerMap = omtfParams->
layerMap();
135 for(
unsigned int iLayer=0;iLayer<
nLayers;++iLayer){
145 const std::vector<L1TMuonOverlapParams::RefLayerMapNode> *refLayerMap = omtfParams->
refLayerMap();
146 for(
unsigned int iRefLayer=0;iRefLayer<
nRefLayers;++iRefLayer){
165 std::vector<std::pair<int,int> > aRefHit1D(
nLogicRegions,std::pair<int,int>(9999,9999));
167 std::vector<std::vector<std::pair<int,int> > > aRefHit2D;
168 aRefHit2D.assign(nRefLayers,aRefHit1D);
173 std::vector<RefHitDef> aRefHitsDefs(
nRefHits);
178 const std::vector<L1TMuonOverlapParams::RefHitNode> *refHitMap = omtfParams->
refHitMap();
179 const std::vector<L1TMuonOverlapParams::LayerInputNode> *layerInputMap = omtfParams->
layerInputMap();
180 unsigned int tmpIndex = 0;
181 for(
unsigned int iProcessor=0;iProcessor<
nProcessors;++iProcessor){
182 for(
unsigned int iRefLayer=0;iRefLayer<
nRefLayers;++iRefLayer){
183 int iPhiStart = phiStartMap->at(iRefLayer+iProcessor*nRefLayers);
186 for(
unsigned int iRefHit=0;iRefHit<
nRefHits;++iRefHit){
187 int iPhiMin = refHitMap->at(iRefHit+iProcessor*nRefHits).iPhiMin;
188 int iPhiMax = refHitMap->at(iRefHit+iProcessor*nRefHits).iPhiMax;
189 unsigned int iInput = refHitMap->at(iRefHit+iProcessor*nRefHits).iInput;
190 unsigned int iRegion = refHitMap->at(iRefHit+iProcessor*nRefHits).iRegion;
191 unsigned int iRefLayer = refHitMap->at(iRefHit+iProcessor*nRefHits).iRefLayer;
195 for(
unsigned int iLogicRegion=0;iLogicRegion<
nLogicRegions;++iLogicRegion){
196 for(
unsigned int iLayer=0;iLayer<
nLayers;++iLayer){
197 tmpIndex = iLayer+iLogicRegion*nLayers + iProcessor*nLogicRegions*
nLayers;
198 unsigned int iFirstInput = layerInputMap->at(tmpIndex).iFirstInput;
199 unsigned int nInputs = layerInputMap->at(tmpIndex).nInputs;
200 connections[iProcessor][iLogicRegion][iLayer] = std::pair<unsigned int, unsigned int>(iFirstInput,
nInputs);
215 out<<
"nLayers: "<<aConfig.
nLayers
222 for(
unsigned int iProcessor = 0;iProcessor<aConfig.
nProcessors; ++iProcessor){
223 out<<
"Processor: "<<iProcessor;
224 for(
unsigned int iRefLayer=0;iRefLayer<aConfig.
nRefLayers;++iRefLayer){
240 if(iPhiStart<0) iPhiStart+=
nPhiBins;
242 if(iPhiStart+(
int)coneSize<(
int)
nPhiBins){
243 return iPhiStart<=iPhi && iPhiStart+(int)coneSize>iPhi;
245 else if(iPhi>(
int)nPhiBins/2){
246 return iPhiStart<=iPhi;
248 else if(iPhi<(
int)nPhiBins/2){
249 return iPhi<iPhiStart+(int)coneSize-(
int)
nPhiBins;
256 unsigned int iRefLayer,
283 std::cout <<
"PROBLEM: hit in unknown Det, detID: "<<detId.
det()<<std::endl;
291 if(isBarrel) aLayer = aId.
station() <=2 ?
306 if(csc.
ring()==2 && csc.
station()==1) aLayer = 1811;
307 if(csc.
station()==4) aLayer = 4;
312 int hwNumber = aLayer+100*detId.
subdetId();
bool fitsRange(int iPhi) const
std::vector< unsigned int > endcap20DegMax
T getParameter(std::string const &) const
const std::vector< LayerMapNode > * layerMap() const
std::map< int, int > logicToLogic
std::vector< unsigned int > endcap10DegMin
int nGoldenPatterns() const
OMTFConfiguration(const edm::ParameterSet &cfg)
unsigned int hwNumber
short layer number used within OMTF emulator
const std::vector< int > * connectedSectorsEnd() const
unsigned fwVersion() const
void initCounterMatrices()
bool isBarrel(GeomDetEnumerators::SubDetector m)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
bool isInRegionRange(int iPhiStart, unsigned int coneSize, int iPhi) const
static OMTFConfiguration * latest_instance_
unsigned int logicNumber
logic numer of the layer
std::vector< std::vector< int > > processorPhiVsRefLayer
unsigned int iInput
Hit input number within a cone.
std::ostream & operator<<(std::ostream &out, const ALILine &li)
unsigned int nLogicRegions
std::map< int, int > logicToHwLayer
std::vector< vector2D > vector3D
std::vector< unsigned int > endcap20DegMin
std::vector< int > refToLogicNumber
std::vector< unsigned int > endcap10DegMax
U second(std::pair< T, U > const &p)
const std::vector< LayerInputNode > * layerInputMap() const
int nHitsPerLayer() const
unsigned int nPdfAddrBits
vector4D measurements4Dref
unsigned int getRegionNumberFromMap(unsigned int iInput, unsigned int iRefLayer, int iPhi) const
std::vector< vector1D > vector2D
void configure(XMLConfigReader *aReader)
unsigned int nTestRefHits
tuple omtfParams
OMTF ESProducer.
unsigned int nHitsPerLayer
std::vector< std::vector< RefHitDef > > refHitsDefs
std::vector< std::pair< unsigned int, unsigned int > > vector1D_A
Map of connections.
std::vector< int > vector1D
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) ...
void setConfigFile(const std::string &fName)
int nPdfAddrBits() const
Access to specific general settings.
std::vector< unsigned int > barrelMin
uint32_t getLayerNumber(uint32_t rawId) const
unsigned int refLayer
Reference layer number.
const std::vector< int > * globalPhiStartMap() const
std::pair< int, int > range
int globalPhiStart(unsigned int iProcessor) const
std::set< int > bendingLayers
std::map< int, int > hwToLogicLayer
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.
int nLogicRegions() const
unsigned int nGoldenPatterns
std::vector< vector1D_A > vector2D_A
const std::vector< RefLayerMapNode > * refLayerMap() const
int station() const
Return the station number.
std::vector< std::vector< std::vector< std::pair< int, int > > > > regionPhisVsRefLayerVsInput
Detector det() const
get the detector field from this detid
const std::vector< int > * connectedSectorsStart() const
std::vector< unsigned int > barrelMax
const std::vector< RefHitNode > * refHitMap() const
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.