-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Me0 muons in 76 x commitv2 #11398
Merged
davidlange6
merged 46 commits into
cms-sw:CMSSW_7_6_X
from
dnash86:ME0Muons-In-76X_commitv2
Oct 7, 2015
Merged
Me0 muons in 76 x commitv2 #11398
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
ef4e58a
MyCmsDriverCommands/runGEMRecHitProducer_cfg.py
pietverwilligen f2eb007
adding nocalo digitization
pietverwilligen 548b01b
reintroducing me0customs, for now without global me0muon
pietverwilligen 610274c
updated version
pietverwilligen 1b3a539
updated version
pietverwilligen f1c8191
ME0Segment now in GEMSegment not in GEMRecHit
pietverwilligen 8e95d4a
updated version
pietverwilligen 2357392
update
pietverwilligen 5ff5f39
split GEM-SIM-DIGI step
pietverwilligen 04bbf71
split GEM-SIM-DIGI step
pietverwilligen d2d0d4a
customization for digitization of TRK + MUO detectors
pietverwilligen a233202
GEN-SIM-DIGI step for TRK+MUO detectors, not working because of Oscar…
pietverwilligen 9c349aa
GEN-SIM step for TRK+MUO detectors, working
pietverwilligen 0471433
Muon + Tracker Local reco for TRK+MUO detectors, working
pietverwilligen e77a08c
DIGI step for TRK+MUO detectors, working
pietverwilligen f4d631e
add more LogTrace
pietverwilligen 1d6fad1
hide call to calorimeter geometry behind parameters
pietverwilligen e674270
hide call to calorimeter geometry behind parameters
pietverwilligen 3795824
able to run iterTracking step :-)
pietverwilligen aee308f
now also vertexing is working
pietverwilligen a8a4caf
commented out Run-II config and restored Run-I config
pietverwilligen 3d72027
Include ME0MuonTrackCollProducer
dnash86 64aa890
DataFormats for EmulatedME0Segment and ME0Muon
dnash86 681731b
ME0Muon code
dnash86 6aea60b
Working runRecoLocalMuon_cfg for ME0Muon prod
dnash86 b3162a4
Name change
dnash86 39f402f
Name change
dnash86 f800de0
Remove non ME0 changes
dnash86 6aba8b0
Cleanup
dnash86 87779df
Cleanup
dnash86 e2365f5
Cleanup
dnash86 84d9d43
Cleanup
dnash86 f42b1b1
Cleanup
dnash86 2b8e3c3
Cleanup
dnash86 92c813a
Cleanup
dnash86 cc1fcc2
Restore RecoAlgos
dnash86 75fab0e
Fix previous erroneous attempt to fix merge conflict
dnash86 fae4e99
Comments on CommonTools/RecoAlgos
dnash86 760c04e
Comments on DataFormats/MuonReco
dnash86 ac4a80d
Comments on RecoMuon/MuonIdentification
dnash86 b528467
Comments on SLHCUpgradeSimulations/Configuration
dnash86 3525f39
Comments on SimMuon/GEMDigitizer
dnash86 5583b5a
Final updates, remove straggling header refs, etc.
dnash86 a8e82d1
Remove a few commented out lines
dnash86 55922b1
git commit RecoMuon/MuonIdentification/plugins/ME0SegmentMatcher.cc
dnash86 1c3e42f
Second iteration of comments
dnash86 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,95 @@ | ||
|
||
#include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
#include "DataFormats/TrackReco/interface/TrackFwd.h" | ||
#include "DataFormats/TrackReco/interface/Track.h" | ||
#include "DataFormats/MuonDetId/interface/CSCDetId.h" | ||
#include "DataFormats/MuonDetId/interface/DTChamberId.h" | ||
#include "DataFormats/MuonDetId/interface/MuonSubdetId.h" | ||
#include "DataFormats/VertexReco/interface/Vertex.h" | ||
#include "DataFormats/VertexReco/interface/VertexFwd.h" | ||
#include "DataFormats/MuonReco/interface/Muon.h" | ||
#include "DataFormats/TrackReco/interface/Track.h" | ||
#include "DataFormats/TrackReco/interface/TrackFwd.h" | ||
#include "RecoMuon/MuonIdentification/plugins/ME0MuonSelector.cc" | ||
#include "FWCore/Framework/interface/ESHandle.h" | ||
|
||
#include <sstream> | ||
|
||
#include <memory> | ||
#include "FWCore/Framework/interface/stream/EDProducer.h" | ||
#include "FWCore/Framework/interface/Event.h" | ||
#include "FWCore/ParameterSet/interface/ParameterSet.h" | ||
#include "DataFormats/MuonReco/interface/MuonFwd.h" | ||
#include "DataFormats/MuonReco/interface/ME0Muon.h" | ||
#include "DataFormats/MuonReco/interface/ME0MuonCollection.h" | ||
#include "DataFormats/CSCRecHit/interface/CSCSegmentCollection.h" | ||
#include "DataFormats/DTRecHit/interface/DTRecSegment4DCollection.h" | ||
#include "DataFormats/HepMCCandidate/interface/GenParticle.h" | ||
|
||
class ME0MuonTrackCollProducer : public edm::stream::EDProducer<> { | ||
public: | ||
explicit ME0MuonTrackCollProducer(const edm::ParameterSet&); | ||
//std::vector<double> findSimVtx(edm::Event& iEvent); | ||
~ME0MuonTrackCollProducer(); | ||
|
||
private: | ||
virtual void produce(edm::Event&, const edm::EventSetup&) override; | ||
edm::Handle <std::vector<reco::ME0Muon> > OurMuons; | ||
//edm::Handle<reco::ME0MuonCollection> muonCollectionH; | ||
edm::InputTag OurMuonsTag; | ||
std::vector<std::string> selectionTags; | ||
const edm::ParameterSet parset_; | ||
edm::EDGetTokenT<ME0MuonCollection> OurMuonsToken_; | ||
}; | ||
|
||
|
||
#include "FWCore/PluginManager/interface/ModuleDef.h" | ||
#include "FWCore/Framework/interface/MakerMacros.h" | ||
|
||
DEFINE_FWK_MODULE(ME0MuonTrackCollProducer); | ||
|
||
|
||
ME0MuonTrackCollProducer::ME0MuonTrackCollProducer(const edm::ParameterSet& parset) : | ||
OurMuonsTag(parset.getParameter<edm::InputTag>("me0MuonTag")), | ||
selectionTags(parset.getParameter< std::vector<std::string> >("selectionTags")), | ||
parset_(parset) | ||
{ | ||
produces<reco::TrackCollection>(); | ||
OurMuonsToken_ = consumes<ME0MuonCollection>(OurMuonsTag); | ||
} | ||
|
||
ME0MuonTrackCollProducer::~ME0MuonTrackCollProducer() { | ||
} | ||
|
||
void ME0MuonTrackCollProducer::produce(edm::Event& iEvent, const edm::EventSetup& iSetup) | ||
{ | ||
using namespace reco; | ||
using namespace edm; | ||
Handle <ME0MuonCollection> OurMuons; | ||
iEvent.getByToken(OurMuonsToken_,OurMuons); | ||
|
||
|
||
std::auto_ptr<reco::TrackCollection> selectedTracks(new reco::TrackCollection); | ||
|
||
reco::TrackRefProd rTracks = iEvent.getRefBeforePut<reco::TrackCollection>(); | ||
|
||
|
||
|
||
for(std::vector<reco::ME0Muon>::const_iterator thismuon = OurMuons->begin(); | ||
thismuon != OurMuons->end(); ++thismuon) { | ||
|
||
if (!muon::isGoodMuon(*thismuon, muon::Tight)) continue; | ||
reco::TrackRef trackref; | ||
|
||
if (thismuon->innerTrack().isNonnull()) trackref = thismuon->innerTrack(); | ||
|
||
const reco::Track* trk = &(*trackref); | ||
// pointer to old track: | ||
//reco::Track* newTrk = new reco::Track(*trk); | ||
|
||
selectedTracks->push_back( *trk ); | ||
//selectedTrackExtras->push_back( *newExtra ); | ||
} | ||
iEvent.put(selectedTracks); | ||
|
||
} |
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,12 @@ | ||
import FWCore.ParameterSet.Config as cms | ||
|
||
|
||
#----------ME0Muon Collection Production for association by chi2 | ||
me0muon = cms.EDProducer("ME0MuonTrackCollProducer", | ||
me0MuonTag = cms.InputTag("me0SegmentMatching"), | ||
selectionTags = cms.vstring('All'), | ||
) | ||
#-------------------- | ||
me0muonColl_seq = cms.Sequence( | ||
me0muon | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#ifndef DataFormats_MuonReco_EmulatedME0Segment_h | ||
#define DataFormats_MuonReco_EmulatedME0Segment_h | ||
|
||
/** \class EmulatedME0Segment | ||
* Describes a simulated track segment in a z-plane modeling an ME0 chamber. | ||
* It is modeled after CSCSegment, so it is a 4-dimensional object ( origin (x,y) , direction (x,y) ) | ||
* Formally it must be defined as a LocalPoint and LocalError but we actually use the global coordinate system. | ||
* | ||
* | ||
* \author David Nash | ||
*/ | ||
|
||
#include <DataFormats/TrackingRecHit/interface/RecSegment.h> | ||
|
||
#include <iosfwd> | ||
|
||
class EmulatedME0Segment : public RecSegment { | ||
|
||
public: | ||
|
||
/// Default constructor | ||
EmulatedME0Segment() : theOrigin(0,0,0), theLocalDirection(0,0,0), theCovMatrix(4,0),theChi2(0.) {} | ||
|
||
/// Constructor | ||
EmulatedME0Segment(const LocalPoint& origin, const LocalVector& direction, const AlgebraicSymMatrix& errors, const double chi2); | ||
|
||
/// Destructor | ||
virtual ~EmulatedME0Segment(); | ||
|
||
//--- Base class interface | ||
EmulatedME0Segment* clone() const { return new EmulatedME0Segment(*this); } | ||
|
||
virtual LocalPoint localPosition() const { return theOrigin; } | ||
LocalError localPositionError() const ; | ||
|
||
LocalVector localDirection() const { return theLocalDirection; } | ||
LocalError localDirectionError() const ; | ||
|
||
/// Parameters of the segment, for the track fit in the order (dx/dz, dy/dz, x, y ) | ||
AlgebraicVector parameters() const; | ||
|
||
/// Covariance matrix of parameters() | ||
virtual AlgebraicSymMatrix parametersError() const { return theCovMatrix; } | ||
|
||
/// The projection matrix relates the trajectory state parameters to the segment parameters(). | ||
AlgebraicMatrix projectionMatrix() const; | ||
|
||
virtual std::vector<const TrackingRecHit*> recHits() const {return std::vector<const TrackingRecHit*> (); } | ||
|
||
virtual std::vector<TrackingRecHit*> recHits() {return std::vector<TrackingRecHit*>();} | ||
|
||
virtual double chi2() const { return theChi2; } | ||
|
||
virtual int dimension() const { return 4; } | ||
|
||
virtual int degreesOfFreedom() const { return -1;} //Maybe change later? | ||
|
||
//--- Extension of the interface | ||
|
||
int nRecHits() const { return 0;} //theME0RecHits.size(); } | ||
|
||
void print() const; | ||
|
||
private: | ||
|
||
//std::vector<ME0RecHit2D> theME0RecHits; | ||
// CAVEAT: these "Local" paramaters will in fact be filled by global coordinates | ||
LocalPoint theOrigin; // in chamber frame - the GeomDet local coordinate system | ||
LocalVector theLocalDirection; // in chamber frame - the GeomDet local coordinate system | ||
AlgebraicSymMatrix theCovMatrix; // the covariance matrix | ||
double theChi2; | ||
}; | ||
|
||
std::ostream& operator<<(std::ostream& os, const EmulatedME0Segment& seg); | ||
|
||
#endif // ME0RecHit_EmulatedME0Segment_h |
23 changes: 23 additions & 0 deletions
23
DataFormats/MuonReco/interface/EmulatedME0SegmentCollection.h
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,23 @@ | ||
|
||
#ifndef DataFormats_EmulatedME0SegmentCollection_H | ||
#define DataFormats_EmulatedME0SegmentCollection_H | ||
|
||
/** \class EmulatedME0SegmentCollection | ||
* | ||
* The collection of EmulatedME0Segment's. See \ref EmulatedME0SegmentCollection.h for details. | ||
* | ||
* \author Matteo Sani | ||
*/ | ||
|
||
#include <DataFormats/MuonReco/interface/EmulatedME0Segment.h> | ||
#include <DataFormats/Common/interface/Ref.h> | ||
|
||
/// collection of EmulatedME0Segments | ||
typedef std::vector<EmulatedME0Segment> EmulatedME0SegmentCollection; | ||
|
||
/// persistent reference to a EmulatedME0Segment | ||
typedef edm::Ref<EmulatedME0SegmentCollection> EmulatedME0SegmentRef; | ||
|
||
#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,87 @@ | ||
#ifndef MuonReco_ME0Muon_h | ||
#define MuonReco_ME0Muon_h | ||
/** \class reco::ME0Muon ME0Muon.h DataFormats/MuonReco/interface/ME0Muon.h | ||
* | ||
* \author David Nash NEU | ||
* | ||
* | ||
*/ | ||
#include "DataFormats/TrackReco/interface/TrackFwd.h" | ||
#include "DataFormats/TrackReco/interface/Track.h" | ||
#include "DataFormats/GeometryVector/interface/GlobalPoint.h" | ||
#include "DataFormats/GeometryVector/interface/GlobalVector.h" | ||
#include "DataFormats/Math/interface/AlgebraicROOTObjects.h" | ||
|
||
#include <DataFormats/GEMRecHit/interface/ME0SegmentCollection.h> | ||
|
||
#include "DataFormats/RecoCandidate/interface/RecoCandidate.h" | ||
|
||
namespace reco { | ||
|
||
class ME0Muon : public RecoCandidate{ | ||
public: | ||
ME0Muon(); | ||
//ME0Muon( const TrackRef & t, const ME0Segment & s) { innerTrack_ = t; me0Segment_ = s;} | ||
ME0Muon( const TrackRef & t, const ME0Segment & s, const int v, const double c) { innerTrack_ = t; me0Segment_ = s; me0segid_=v; trackCharge_ = c;} | ||
virtual ~ME0Muon(){} | ||
|
||
/// reference to Track reconstructed in the tracker only | ||
TrackRef innerTrack() const { return innerTrack_; } | ||
virtual TrackRef track() const { return innerTrack(); } | ||
/// set reference to Track | ||
void setInnerTrack( const TrackRef & t ) { innerTrack_ = t; } | ||
void setTrack( const TrackRef & t ) { setInnerTrack(t); } | ||
/// set reference to our new ME0Segment type | ||
void setME0Segment( const ME0Segment & s ) { me0Segment_ = s; } | ||
|
||
const ME0Segment& me0segment() const { return me0Segment_; } | ||
|
||
//Added for testing | ||
void setme0segid( const int v){me0segid_=v;} | ||
int me0segid() const {return me0segid_;} | ||
|
||
|
||
const GlobalPoint& globalTrackPosAtSurface() const { return globalTrackPosAtSurface_; } | ||
const GlobalVector& globalTrackMomAtSurface() const { return globalTrackMomAtSurface_; } | ||
const LocalPoint& localTrackPosAtSurface() const { return localTrackPosAtSurface_; } | ||
const LocalVector& localTrackMomAtSurface() const { return localTrackMomAtSurface_; } | ||
|
||
int trackCharge() const { return trackCharge_; } | ||
const AlgebraicSymMatrix66& globalTrackCov() const { return globalTrackCov_; } | ||
const AlgebraicSymMatrix55& localTrackCov() const { return localTrackCov_; } | ||
|
||
void setGlobalTrackPosAtSurface(const GlobalPoint& globalTrackPosAtSurface) { globalTrackPosAtSurface_ = globalTrackPosAtSurface; } | ||
void setGlobalTrackMomAtSurface(const GlobalVector& globalTrackMomAtSurface) { globalTrackMomAtSurface_ = globalTrackMomAtSurface; } | ||
void setLocalTrackPosAtSurface(const LocalPoint& localTrackPosAtSurface) { localTrackPosAtSurface_ = localTrackPosAtSurface; } | ||
void setLocalTrackMomAtSurface(const LocalVector& localTrackMomAtSurface) { localTrackMomAtSurface_ = localTrackMomAtSurface; } | ||
void setTrackCharge(const int& trackCharge) { trackCharge_ = trackCharge; } | ||
void setGlobalTrackCov(const AlgebraicSymMatrix66& trackCov) { globalTrackCov_ = trackCov; } | ||
void setLocalTrackCov(const AlgebraicSymMatrix55& trackCov) { localTrackCov_ = trackCov; } | ||
|
||
private: | ||
/// check overlap with another candidate | ||
virtual bool overlap( const Candidate & ) const; | ||
|
||
/// reference to Track reconstructed in the tracker only | ||
TrackRef innerTrack_; | ||
ME0Segment me0Segment_; | ||
int me0segid_; | ||
|
||
GlobalPoint globalTrackPosAtSurface_; | ||
GlobalVector globalTrackMomAtSurface_; | ||
|
||
LocalPoint localTrackPosAtSurface_; | ||
LocalVector localTrackMomAtSurface_; | ||
int trackCharge_; | ||
AlgebraicSymMatrix66 globalTrackCov_; | ||
AlgebraicSymMatrix55 localTrackCov_; | ||
|
||
//double xpull_,ypull_,xdiff_,ydiff_,phidirdiff_; | ||
}; | ||
|
||
} | ||
|
||
|
||
#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,22 @@ | ||
#ifndef DataFormats_ME0MuonCollection_H | ||
#define DataFormats_ME0MuonCollection_H | ||
|
||
/** \class ME0MuonCollection | ||
* | ||
* The collection of ME0Muon's. See \ref ME0MuonCollection.h for details. | ||
* | ||
* $Date: 2010/03/12 13:08:15 $ | ||
* \author David Nash | ||
*/ | ||
|
||
#include "DataFormats/MuonReco/interface/ME0Muon.h" | ||
#include "DataFormats/Common/interface/Ref.h" | ||
|
||
/// collection of ME0Muons | ||
typedef std::vector<reco::ME0Muon> ME0MuonCollection; | ||
|
||
/// persistent reference to a ME0Muon | ||
typedef edm::Ref<ME0MuonCollection> ME0MuonRef; | ||
|
||
|
||
#endif |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move the contents of ME0MuonTrackCollProducer.h here in the .cc file and the contents of the SealModule.cc file as well.
These extra two files are not really needed.