forked from bortigno/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cms-sw#181 from konec/omtfdev_mk3
New quality definition, and code refactorin
- Loading branch information
Showing
17 changed files
with
692 additions
and
383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
#ifndef AlgoMuon_H | ||
#define AlgoMuon_H | ||
|
||
#include <ostream> | ||
|
||
class AlgoMuon{ | ||
|
||
public: | ||
|
||
// AlgoMuon() : pt(-1.), eta(99.), phi(9999.), disc(-999), bx(0), q(-1), charge(99), refLayer(-1), hits(0) {} // the old one version | ||
AlgoMuon() : m_disc(-999), m_phi(9999), m_eta(99), m_refLayer(-1), m_hits(0), m_q(-1), m_bx(0), m_pt(-1), m_charge(99) {} | ||
AlgoMuon(int disc=-999, int phi=9999, int eta=99, int refLayer=-1, | ||
int hits=0, int q=-1, int bx=0, int pt=-1, int charge=99): | ||
m_disc(disc), m_phi(phi), m_eta(eta), m_refLayer(refLayer), | ||
m_hits(hits), m_q(q), m_bx(bx), m_pt(pt), m_charge(charge) {} | ||
|
||
int getDisc() const { return m_disc; } | ||
int getPhi() const { return m_phi; } | ||
int getEta() const { return m_eta; } | ||
int getRefLayer() const { return m_refLayer; } | ||
int getHits() const { return m_hits; } | ||
int getQ() const { return m_q; } | ||
int getBx() const { return m_bx; } | ||
int getPt() const { return m_pt; } | ||
int getCharge() const { return m_charge; } | ||
int getPhiRHit() const { return m_phiRHit; } | ||
|
||
void setDisc(int disc) { m_disc = disc; } | ||
void setPhi(int phi) { m_phi = phi; } | ||
void setEta(int eta) { m_eta = eta; } | ||
void setRefLayer(int refLayer) { m_refLayer = refLayer; } | ||
void setHits(int hits) { m_hits = hits; } | ||
void setQ(int q) { m_q = q; } | ||
void setBx(int bx) { m_bx = bx; } | ||
void setPt(int pt) { m_pt = pt; } | ||
void setCharge(int charge) { m_charge = charge; } | ||
void setPhiRHit(int phiRHit) { m_phiRHit = phiRHit; } | ||
|
||
bool isValid() const; | ||
|
||
bool operator< (const AlgoMuon & o) const; | ||
|
||
friend std::ostream & operator<< (std::ostream &out, const AlgoMuon &o); | ||
|
||
private: | ||
|
||
int m_disc; | ||
int m_phi; | ||
int m_eta; | ||
int m_refLayer; | ||
int m_hits; | ||
int m_q; | ||
int m_bx; | ||
int m_pt; | ||
int m_charge; | ||
int m_phiRHit; | ||
// to add | ||
// int m_pdf; | ||
|
||
}; | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef OMTF_GhostBuster_H | ||
#define OMTF_GhostBuster_H | ||
|
||
#include <vector> | ||
#include <ostream> | ||
|
||
#include <map> | ||
#include <set> | ||
|
||
#include <memory> | ||
|
||
#include "L1Trigger/L1TMuonOverlap/interface/AlgoMuon.h" | ||
|
||
class OMTFGhostBuster { | ||
|
||
public: | ||
|
||
void select(std::vector<AlgoMuon> & refHitCands, int charge=0); | ||
|
||
}; | ||
#endif |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#ifndef OMTFReconstruction_H | ||
#define OMTFReconstruction_H | ||
|
||
#include "xercesc/util/XercesDefs.hpp" | ||
|
||
#include "DataFormats/L1TMuon/interface/RegionalMuonCand.h" | ||
#include "DataFormats/L1TMuon/interface/RegionalMuonCandFwd.h" | ||
|
||
#include "FWCore/Framework/interface/Frameworkfwd.h" | ||
#include "FWCore/Framework/interface/Event.h" | ||
#include "FWCore/Framework/interface/EventSetup.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
#include "FWCore/Framework/interface/EDProducer.h" | ||
|
||
#include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambPhContainer.h" | ||
#include "DataFormats/L1DTTrackFinder/interface/L1MuDTChambThContainer.h" | ||
#include "DataFormats/CSCDigi/interface/CSCCorrelatedLCTDigiCollection.h" | ||
#include "DataFormats/RPCDigi/interface/RPCDigiCollection.h" | ||
|
||
#include "L1Trigger/L1TMuonOverlap/interface/OMTFinputMaker.h" | ||
#include "L1Trigger/L1TMuonOverlap/interface/OMTFSorter.h" | ||
#include "L1Trigger/L1TMuonOverlap/interface/GhostBuster.h" | ||
|
||
class L1TMuonOverlapParams; | ||
class OMTFProcessor; | ||
class OMTFConfiguration; | ||
class OMTFConfigMaker; | ||
class XMLConfigWriter; | ||
|
||
namespace XERCES_CPP_NAMESPACE{ | ||
class DOMElement; | ||
class DOMDocument; | ||
class DOMImplementation; | ||
} | ||
|
||
class OMTFReconstruction { | ||
public: | ||
OMTFReconstruction(); | ||
|
||
OMTFReconstruction(const edm::ParameterSet&); | ||
|
||
~OMTFReconstruction(); | ||
|
||
void beginJob(); | ||
|
||
void endJob(); | ||
|
||
void beginRun(edm::Run const& run, edm::EventSetup const& iSetup); | ||
|
||
std::auto_ptr<l1t::RegionalMuonCandBxCollection > reconstruct(const edm::Event&, const edm::EventSetup&); | ||
|
||
private: | ||
|
||
edm::ParameterSet m_Config; | ||
|
||
edm::Handle<L1MuDTChambPhContainer> dtPhDigis; | ||
edm::Handle<L1MuDTChambThContainer> dtThDigis; | ||
edm::Handle<CSCCorrelatedLCTDigiCollection> cscDigis; | ||
edm::Handle<RPCDigiCollection> rpcDigis; | ||
|
||
void loadAndFilterDigis(const edm::Event&); | ||
|
||
void getProcessorCandidates(unsigned int iProcessor, l1t::tftype mtfType, int bx, | ||
l1t::RegionalMuonCandBxCollection & myCandidates); | ||
|
||
void writeResultToXML(unsigned int iProcessor, const OMTFinput &myInput, | ||
const std::vector<OMTFProcessor::resultsMap> & myResults); | ||
|
||
|
||
bool dumpResultToXML, dumpDetailedResultToXML; | ||
|
||
///OMTF objects | ||
OMTFConfiguration *m_OMTFConfig; | ||
OMTFinputMaker m_InputMaker; | ||
OMTFSorter m_Sorter; | ||
OMTFGhostBuster m_GhostBuster; | ||
OMTFProcessor *m_OMTF; | ||
/// | ||
xercesc::DOMElement *aTopElement; | ||
OMTFConfigMaker *m_OMTFConfigMaker; | ||
XMLConfigWriter *m_Writer; | ||
|
||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.