18 #include "Math/VectorUtil.h" 24 g4SimTrackSrc(cfg.getParameter<
edm::InputTag>(
"g4SimTrackSrc")){
56 omtfParamsRcd.
get(omtfParamsHandle);
61 edm::LogError(
"L1TMuonOverlapTrackProducer") <<
"Could not retrieve parameters from Event Setup" << std::endl;
70 std::vector<int> generalParams = *omtfParamsMutable.
generalParams();
83 for(
auto itGP: theGPs) itGP.second->reset();
100 for(
auto itGP: myGPmap){
101 if(!itGP.second->hasCounts())
continue;
110 std::vector<int> generalParams = *omtfParamsMutable.
generalParams();
115 for(
auto itGP: myGPmap){
118 if(iPt>31) iPt = 200*2+1;
121 if(itGP.first.thePtCode==iPt &&
134 unsigned int iProcessor = 0;
155 for(
auto itGP: myGPmap){
168 fName =
"GPs_4x.xml";
181 unsigned int iPtMin = 9;
182 Key aKey =
Key(0, iPtMin, 1);
183 while(myGPmap.find(aKey)!=myGPmap.end()){
192 if(aKey.
thePtCode<=401 && myGPmap.find(aKey)!=myGPmap.end()) aGP2 = myGPmap.find(aKey)->second;
197 if(aKey.
thePtCode<=401 && myGPmap.find(aKey)!=myGPmap.end()) aGP3 = myGPmap.find(aKey)->second;
201 if(aKey.
thePtCode<=401 && myGPmap.find(aKey)!=myGPmap.end()) aGP4 = myGPmap.find(aKey)->second;
208 Key aTmpKey = aGP1->
key();
210 if(myGPmap.find(aTmpKey)!=myGPmap.end()) aGP1 = myGPmap.find(aTmpKey)->second;
213 aTmpKey = aGP2->
key();
215 if(myGPmap.find(aTmpKey)!=myGPmap.end()) aGP2 = myGPmap.find(aTmpKey)->second;
218 aTmpKey = aGP3->
key();
220 if(myGPmap.find(aTmpKey)!=myGPmap.end()) aGP3 = myGPmap.find(aTmpKey)->second;
223 aTmpKey = aGP4->
key();
225 if(myGPmap.find(aTmpKey)!=myGPmap.end()) aGP4 = myGPmap.find(aTmpKey)->second;
240 edm::LogError(
"OMTFPatternMaker")<<
"No SimMuon found in the event!";
264 for(
unsigned int iProcessor=0;iProcessor<6;++iProcessor){
290 for (std::vector<SimTrack>::const_iterator it=simTks->begin(); it< simTks->end(); it++) {
292 if ( !(aTrack.
type() == 13 || aTrack.
type() == -13) )
continue;
294 if ( !result || aTrack.
momentum().pt() > result->
momentum().pt()) result = &aTrack;
void writeConnectionsData(const std::vector< std::vector< OMTFConfiguration::vector2D > > &measurements4D)
T getParameter(std::string const &) const
edm::EDGetTokenT< edm::SimTrackContainer > inputTokenSimHit
void fillCounts(unsigned int iProcessor, const OMTFinput &aInput, const SimTrack *aSimMuon)
void averagePatterns(int charge)
bool configure(const OMTFConfiguration *omtfParams, const L1TMuonOverlapParams *omtfPatterns)
Fill GP map with patterns from CondFormats object.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
OMTFConfiguration * myOMTFConfig
OMTF objects.
void initialiseXMLDocument(const std::string &docName)
void makeConnetionsMap(unsigned int iProcessor, const OMTFinput &aInput)
OMTFPatternMaker(const edm::ParameterSet &cfg)
edm::EDGetTokenT< L1MuDTChambPhContainer > inputTokenDTPh
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
OMTFConfigMaker * myOMTFConfigMaker
#define DEFINE_FWK_MODULE(type)
const std::vector< int > * generalParams() const
General definitions.
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > inputTokenCSC
void printConnections(std::ostream &out, unsigned int iProcessor, unsigned int iCone)
void setGeneralParams(const std::vector< int > ¶msVec)
const L1TMuonOverlapParams * getRawParams() const
const SimTrack * findSimMuon(const edm::Event &ev, const edm::EventSetup &es, const SimTrack *previous=0)
void beginRun(edm::Run const &run, edm::EventSetup const &iSetup) override
XMLConfigWriter * myWriter
static double ptFromIpt(const int ipt)
void configure(const L1TMuonOverlapParams *omtfParams)
void reset()
Reset contents of all data vectors, keeping the vectors size.
int nPdfAddrBits() const
Access to specific general settings.
T const * product() const
void analyze(const edm::Event &, const edm::EventSetup &) override
void printPhiMap(std::ostream &out)
int type() const
particle type (HEP PDT convension)
const math::XYZTLorentzVectorD & momentum() const
void finaliseXMLDocument(const std::string &fName)
~OMTFPatternMaker() override
edm::EDGetTokenT< RPCDigiCollection > inputTokenRPC
unsigned int nPdfAddrBits
Original pdf width. read from configuration.
const std::map< Key, GoldenPattern * > & getPatterns() const
Return map of GoldenPatterns.
void writeGPData(const GoldenPattern &aGP)
edm::EDGetTokenT< L1MuDTChambThContainer > inputTokenDTTh
OMTFinputMaker * myInputMaker
edm::ParameterSet theConfig
vector4D & getMeasurements4D()