17 #include "Math/VectorUtil.h" 53 edm::LogError(
"L1TMuonOverlapTrackProducer") <<
"Could not retrieve parameters from Event Setup" << std::endl;
62 std::vector<int> generalParams = *omtfParamsMutable.
generalParams();
76 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) {
297 for (std::vector<SimTrack>::const_iterator it = simTks->begin(); it < simTks->end(); it++) {
299 if (!(aTrack.
type() == 13 || aTrack.
type() == -13))
void fillCounts(unsigned int iProcessor, const OMTFinput &aInput, const SimTrack *aSimMuon)
void writeConnectionsData(const std::vector< std::vector< OMTFConfiguration::vector2D > > &measurements4D)
edm::EDGetTokenT< edm::SimTrackContainer > inputTokenSimHit
const std::vector< int > * generalParams() const
General definitions.
T getParameter(std::string const &) const
OMTFConfiguration * myOMTFConfig
OMTF objects.
void initialiseXMLDocument(const std::string &docName)
T const * product() const
void endRun(edm::Run const &, edm::EventSetup const &) override
void makeConnetionsMap(unsigned int iProcessor, const OMTFinput &aInput)
OMTFPatternMaker(const edm::ParameterSet &cfg)
edm::EDGetTokenT< L1MuDTChambPhContainer > inputTokenDTPh
void averagePatterns(int charge)
Log< level::Error, false > LogError
const std::map< Key, GoldenPattern * > & getPatterns() const
Return map of GoldenPatterns.
const math::XYZTLorentzVectorD & momentum() const
int type() const
particle type (HEP PDT convension)
OMTFConfigMaker * myOMTFConfigMaker
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)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
#define DEFINE_FWK_MODULE(type)
bool getData(T &iHolder) const
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.
void analyze(const edm::Event &, const edm::EventSetup &) override
void printPhiMap(std::ostream &out)
bool configure(const OMTFConfiguration *omtfParams, const L1TMuonOverlapParams *omtfPatterns)
Fill GP map with patterns from CondFormats object.
void finaliseXMLDocument(const std::string &fName)
~OMTFPatternMaker() override
edm::ESGetToken< L1TMuonOverlapParams, L1TMuonOverlapParamsRcd > esTokenParams_
edm::EDGetTokenT< RPCDigiCollection > inputTokenRPC
unsigned int nPdfAddrBits
Original pdf width. read from configuration.
const SimTrack * findSimMuon(const edm::Event &ev, const SimTrack *previous=nullptr)
void writeGPData(const GoldenPattern &aGP)
edm::EDGetTokenT< L1MuDTChambThContainer > inputTokenDTTh
OMTFinputMaker * myInputMaker
edm::ParameterSet theConfig
vector4D & getMeasurements4D()
const L1TMuonOverlapParams * getRawParams() const