25 produces<l1t::RegionalMuonCandBxCollection >(
"OMTF");
33 edm::LogError(
"L1TMuonOverlapTrackProducer")<<
"omtf configuration not found in cfg.py";
93 for(
auto itGP: myGPmap){
94 if(itGP.second->key().thePtCode==6)
std::cout<<*itGP.second<<std::endl;
96 if(itGP.second->key().thePtCode>5)
myWriter->
writeGPData(*itGP.second,*dummy, *dummy, *dummy);
110 fName =
"GPs_4x.xml";
123 unsigned int iPtMin = 6;
124 Key aKey =
Key(1, iPtMin,-1);
125 while(myGPmap.find(aKey)!=myGPmap.end()){
133 if(aKey.
thePtCode<=31 && myGPmap.find(aKey)!=myGPmap.end()) aGP2 = myGPmap.find(aKey)->second;
137 if(aKey.
thePtCode<=31 && myGPmap.find(aKey)!=myGPmap.end()) aGP3 = myGPmap.find(aKey)->second;
140 if(aKey.
thePtCode<=31 && myGPmap.find(aKey)!=myGPmap.end()) aGP4 = myGPmap.find(aKey)->second;
146 Key aTmpKey = aGP1->
key();
148 if(myGPmap.find(aTmpKey)!=myGPmap.end()) aGP1 = myGPmap.find(aTmpKey)->second;
151 aTmpKey = aGP2->
key();
153 if(myGPmap.find(aTmpKey)!=myGPmap.end()) aGP2 = myGPmap.find(aTmpKey)->second;
156 aTmpKey = aGP3->
key();
158 if(myGPmap.find(aTmpKey)!=myGPmap.end()) aGP3 = myGPmap.find(aTmpKey)->second;
161 aTmpKey = aGP4->
key();
163 if(myGPmap.find(aTmpKey)!=myGPmap.end()) aGP4 = myGPmap.find(aTmpKey)->second;
179 omtfParamsRcd.
get(omtfParamsHandle);
183 edm::LogError(
"L1TMuonOverlapTrackProducer") <<
"Could not retrieve parameters from Event Setup" << std::endl;
194 std::ostringstream myStr;
219 for(
unsigned int iProcessor=0;iProcessor<6;++iProcessor){
246 const std::vector<OMTFProcessor::resultsMap> & myResultsNeg =
myOMTF->
processInput(iProcessor,myShiftedInputNeg);
249 const std::vector<OMTFProcessor::resultsMap> & myResultsPos =
myOMTF->
processInput(iProcessor,myShiftedInputPos);
267 itKey.first,itKey.second);
275 myStr<<
" Number of candidates: "<<myCands->size(bx);
278 iEvent.
put(myCands,
"OMTF");
283 std::auto_ptr<l1t::RegionalMuonCandBxCollection > & myCands,
294 for(
unsigned int iCand=0; iCand<myOTFCandidates.
size(bx); ++iCand){
297 int phiValue = (cand.
hwPhi()+procOffset+lowScaleEnd);
304 if(cand.
hwPt()) myCands->push_back(bx, cand);
T getParameter(std::string const &) const
EventNumber_t event() const
void averagePatterns(int charge)
void setHwPhi(int bits)
Set compressed relative phi as transmitted by hardware LSB = 2*pi/576 (8 bits)
unsigned size(int bx) const
void writeCandidateData(xercesc::DOMElement *aTopElement, unsigned int iRefHit, const InternalObj &aCand)
virtual void produce(edm::Event &, const edm::EventSetup &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void initialiseXMLDocument(const std::string &docName)
bool exists(std::string const ¶meterName) const
checks if a parameter exists
xercesc::DOMElement * writeEventData(xercesc::DOMElement *aTopElement, unsigned int iProcessor, const OMTFinput &aInput)
OMTFinputMaker * myInputMaker
static int globalPhiStart(unsigned int iProcessor)
edm::EDGetTokenT< L1MuDTChambPhContainer > inputTokenDTPh
edm::ParameterSet theConfig
bool configure(XMLConfigReader *aReader)
Fill GP map with patterns from XML file.
bool dumpDetailedResultToXML
void processCandidates(unsigned int iProcessor, int bx, std::auto_ptr< l1t::RegionalMuonCandBxCollection > &myCands, l1t::RegionalMuonCandBxCollection &myOTFCandidates, l1t::tftype mtfType)
std::shared_ptr< L1TMuonOverlapParams > omtfParams
void setTFIdentifiers(int processor, tftype trackFinder)
Set the processor ID, track-finder type. From these two, the link is set.
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
void writeResultsData(xercesc::DOMElement *aTopElement, unsigned int iRegion, const Key &aKey, const OMTFResult &aResult)
void configure(XMLConfigReader *aReader)
static unsigned int nTestRefHits
xercesc::DOMElement * aTopElement
void get(HolderT &iHolder) const
static unsigned int nPhiBins
const int hwPhi() const
Get compressed local phi (returned int * 2*pi/576 = local phi in rad)
static unsigned int nPhiBits
OMTFConfiguration * myOMTFConfig
OMTF objects.
edm::EDGetTokenT< RPCDigiCollection > inputTokenRPC
void reset()
Reset contents of all data vectors, keeping the vectors size.
T const * product() const
InternalObj sortRefHitResults(const OMTFProcessor::resultsMap &aResultsMap, int charge=0)
~L1TMuonOverlapTrackProducer()
XMLConfigWriter * myWriter
void sortProcessor(const std::vector< OMTFProcessor::resultsMap > &procResults, l1t::RegionalMuonCandBxCollection &sortedCands, int bx, int charge=0)
Sort all processor results.
virtual void beginRun(edm::Run const &run, edm::EventSetup const &iSetup)
edm::EDGetTokenT< L1MuDTChambThContainer > inputTokenDTTh
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > inputTokenCSC
const int hwPt() const
Get compressed pT (returned int * 0.5 = pT (GeV))
const std::vector< OMTFProcessor::resultsMap > & processInput(unsigned int iProcessor, const OMTFinput &aInput)
void finaliseXMLDocument(const std::string &fName)
OMTFinput shiftInput(unsigned int iProcessor, const OMTFinput &aInput)
xercesc::DOMElement * writeEventHeader(unsigned int eventId, unsigned int mixedEventId=0)
const std::map< Key, GoldenPattern * > & getPatterns() const
Return map of GoldenPatterns.
Power< A, B >::type pow(const A &a, const B &b)
void writeGPData(const GoldenPattern &aGP)
L1TMuonOverlapTrackProducer(const edm::ParameterSet &)
const T & at(int bx, unsigned i) const