18 #include "Math/VectorUtil.h" 23 : theConfig(cfg), g4SimTrackSrc(cfg.getParameter<
edm::
InputTag>(
"g4SimTrackSrc")) {
51 omtfParamsRcd.
get(omtfParamsHandle);
56 edm::LogError(
"L1TMuonOverlapTrackProducer") <<
"Could not retrieve parameters from Event Setup" << std::endl;
65 std::vector<int> generalParams = *omtfParamsMutable.
generalParams();
79 for (
auto itGP : theGPs)
95 for (
auto itGP : myGPmap) {
96 if (!itGP.second->hasCounts())
106 std::vector<int> generalParams = *omtfParamsMutable.
generalParams();
111 for (
auto itGP : myGPmap) {
132 unsigned int iProcessor = 0;
152 for (
auto itGP : myGPmap) {
165 fName =
"GPs_4x.xml";
177 unsigned int iPtMin = 9;
178 Key aKey =
Key(0, iPtMin, 1);
179 while (myGPmap.find(aKey) != myGPmap.end()) {
186 while (myGPmap.find(aKey) == myGPmap.end() && aKey.
thePtCode <= 401)
188 if (aKey.
thePtCode <= 401 && myGPmap.find(aKey) != myGPmap.end())
189 aGP2 = myGPmap.find(aKey)->second;
193 while (myGPmap.find(aKey) == myGPmap.end() && aKey.
thePtCode <= 401)
195 if (aKey.
thePtCode <= 401 && myGPmap.find(aKey) != myGPmap.end())
196 aGP3 = myGPmap.find(aKey)->second;
199 while (myGPmap.find(aKey) == myGPmap.end() && aKey.
thePtCode <= 401)
201 if (aKey.
thePtCode <= 401 && myGPmap.find(aKey) != myGPmap.end())
202 aGP4 = myGPmap.find(aKey)->second;
205 while (myGPmap.find(aKey) == myGPmap.end() && aKey.
thePtCode <= 401)
210 Key aTmpKey = aGP1->
key();
212 if (myGPmap.find(aTmpKey) != myGPmap.end())
213 aGP1 = myGPmap.find(aTmpKey)->second;
217 aTmpKey = aGP2->
key();
219 if (myGPmap.find(aTmpKey) != myGPmap.end())
220 aGP2 = myGPmap.find(aTmpKey)->second;
224 aTmpKey = aGP3->
key();
226 if (myGPmap.find(aTmpKey) != myGPmap.end())
227 aGP3 = myGPmap.find(aTmpKey)->second;
231 aTmpKey = aGP4->
key();
233 if (myGPmap.find(aTmpKey) != myGPmap.end())
234 aGP4 = myGPmap.find(aTmpKey)->second;
250 edm::LogError(
"OMTFPatternMaker") <<
"No SimMuon found in the event!";
276 for (
unsigned int iProcessor = 0; iProcessor < 6; ++iProcessor) {
299 for (std::vector<SimTrack>::const_iterator it = simTks->begin(); it < simTks->end(); it++) {
301 if (!(aTrack.
type() == 13 || aTrack.
type() == -13))
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.
omtfParams
OMTF ESProducer.
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()