|
|
Go to the documentation of this file.
19 #include "Math/VectorUtil.h"
24 : theConfig(
cfg), g4SimTrackSrc(
cfg.getParameter<
edm::
InputTag>(
"g4SimTrackSrc")) {
53 omtfParamsRcd.
get(omtfParamsHandle);
58 edm::LogError(
"L1TMuonOverlapTrackProducer") <<
"Could not retrieve parameters from Event Setup" << std::endl;
67 std::vector<int> generalParams = *omtfParamsMutable.
generalParams();
81 for (
auto itGP : theGPs)
97 for (
auto itGP : myGPmap) {
98 if (!itGP.second->hasCounts())
108 std::vector<int> generalParams = *omtfParamsMutable.
generalParams();
113 for (
auto itGP : myGPmap) {
134 unsigned int iProcessor = 0;
154 for (
auto itGP : myGPmap) {
167 fName =
"GPs_4x.xml";
179 unsigned int iPtMin = 9;
180 Key aKey =
Key(0, iPtMin, 1);
181 while (myGPmap.find(aKey) != myGPmap.end()) {
188 while (myGPmap.find(aKey) == myGPmap.end() && aKey.
thePtCode <= 401)
190 if (aKey.
thePtCode <= 401 && myGPmap.find(aKey) != myGPmap.end())
191 aGP2 = myGPmap.find(aKey)->second;
195 while (myGPmap.find(aKey) == myGPmap.end() && aKey.
thePtCode <= 401)
197 if (aKey.
thePtCode <= 401 && myGPmap.find(aKey) != myGPmap.end())
198 aGP3 = myGPmap.find(aKey)->second;
201 while (myGPmap.find(aKey) == myGPmap.end() && aKey.
thePtCode <= 401)
203 if (aKey.
thePtCode <= 401 && myGPmap.find(aKey) != myGPmap.end())
204 aGP4 = myGPmap.find(aKey)->second;
207 while (myGPmap.find(aKey) == myGPmap.end() && aKey.
thePtCode <= 401)
212 Key aTmpKey = aGP1->
key();
214 if (myGPmap.find(aTmpKey) != myGPmap.end())
215 aGP1 = myGPmap.find(aTmpKey)->second;
219 aTmpKey = aGP2->
key();
221 if (myGPmap.find(aTmpKey) != myGPmap.end())
222 aGP2 = myGPmap.find(aTmpKey)->second;
226 aTmpKey = aGP3->
key();
228 if (myGPmap.find(aTmpKey) != myGPmap.end())
229 aGP3 = myGPmap.find(aTmpKey)->second;
233 aTmpKey = aGP4->
key();
235 if (myGPmap.find(aTmpKey) != myGPmap.end())
236 aGP4 = myGPmap.find(aTmpKey)->second;
252 edm::LogError(
"OMTFPatternMaker") <<
"No SimMuon found in the event!";
278 for (
unsigned int iProcessor = 0; iProcessor < 6; ++iProcessor) {
301 for (std::vector<SimTrack>::const_iterator it = simTks->begin(); it < simTks->end(); it++) {
303 if (!(aTrack.
type() == 13 || aTrack.
type() == -13))
XMLConfigWriter * myWriter
omtfParams
OMTF ESProducer.
const math::XYZTLorentzVectorD & momentum() const
void fillCounts(unsigned int iProcessor, const OMTFinput &aInput, const SimTrack *aSimMuon)
void analyze(const edm::Event &, const edm::EventSetup &) override
T const * product() const
void printConnections(std::ostream &out, unsigned int iProcessor, unsigned int iCone)
void beginRun(edm::Run const &run, edm::EventSetup const &iSetup) override
vector4D & getMeasurements4D()
const L1TMuonOverlapParams * getRawParams() const
~OMTFPatternMaker() override
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
const std::map< Key, GoldenPattern * > & getPatterns() const
Return map of GoldenPatterns.
void setGeneralParams(const std::vector< int > ¶msVec)
OMTFinputMaker * myInputMaker
void initialiseXMLDocument(const std::string &docName)
const std::vector< int > * generalParams() const
General definitions.
edm::EDGetTokenT< edm::SimTrackContainer > inputTokenSimHit
#define DEFINE_FWK_MODULE(type)
edm::EDGetTokenT< L1MuDTChambThContainer > inputTokenDTTh
void finaliseXMLDocument(const std::string &fName)
unsigned int nPdfAddrBits
Original pdf width. read from configuration.
OMTFConfiguration * myOMTFConfig
OMTF objects.
edm::EDGetTokenT< RPCDigiCollection > inputTokenRPC
edm::ParameterSet theConfig
void configure(const L1TMuonOverlapParams *omtfParams)
edm::EDGetTokenT< L1MuDTChambPhContainer > inputTokenDTPh
int type() const
particle type (HEP PDT convension)
void makeConnetionsMap(unsigned int iProcessor, const OMTFinput &aInput)
void writeGPData(const GoldenPattern &aGP)
T getParameter(std::string const &) const
bool configure(const OMTFConfiguration *omtfParams, const L1TMuonOverlapParams *omtfPatterns)
Fill GP map with patterns from CondFormats object.
void reset()
Reset contents of all data vectors, keeping the vectors size.
const SimTrack * findSimMuon(const edm::Event &ev, const edm::EventSetup &es, const SimTrack *previous=nullptr)
edm::EDGetTokenT< CSCCorrelatedLCTDigiCollection > inputTokenCSC
void printPhiMap(std::ostream &out)
void writeConnectionsData(const std::vector< std::vector< OMTFConfiguration::vector2D > > &measurements4D)
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
OMTFPatternMaker(const edm::ParameterSet &cfg)
OMTFConfigMaker * myOMTFConfigMaker
static double ptFromIpt(const int ipt)
void averagePatterns(int charge)