-
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
Gem segment 76 #10485
Merged
davidlange6
merged 111 commits into
cms-sw:CMSSW_7_6_X
from
pietverwilligen:GEMSegment_76X_v1
Aug 26, 2015
Merged
Gem segment 76 #10485
Changes from all commits
Commits
Show all changes
111 commits
Select commit
Hold shift + click to select a range
eebe4a0
removed tracked when connecting to condition DB
pietverwilligen 6cf3897
ME0 segment in DataFormats
pietverwilligen 2625b70
ME0 segment in DataFormats
pietverwilligen d84cd3e
ME0 segment in DataFormats
pietverwilligen 951d9cb
ME0 segment in DataFormats
pietverwilligen e39bce5
ME0 segment in DataFormats
pietverwilligen f1dac80
make GEN-SIM-DIGI for all muon detectors in muon upgrade geometry
pietverwilligen eeed587
make RECHIT for all muon detectors in muon upgrade geometry
pietverwilligen 19594af
test RECHIT for all muon detectors in muon upgrade geometry
pietverwilligen f90f55c
test RECHIT for all muon detectors in muon upgrade geometry
pietverwilligen 12befb2
test RECHIT for all muon detectors in muon upgrade geometry
pietverwilligen 5a9a9a5
ME0 Segment
pietverwilligen 385b20b
booh
pietverwilligen 6e461b2
fix printouts ME0 segment
pietverwilligen 0f247eb
including comments made earlier for gemcsc segment
pietverwilligen cedcae1
adding roll mask when asking chamber id
pietverwilligen 256226d
use design GT
pietverwilligen 7a86683
deleted root file
pietverwilligen bc207ad
deleted root file
pietverwilligen 8429f3d
added buildfile for test programs
pietverwilligen 2d5436b
updated for use of std::unique_ptr
pietverwilligen 925e66a
make ME0Segments
pietverwilligen 0b3e10b
analyze ME0Segments
pietverwilligen aa4ab95
Merge pull request #14 from cms-sw/CMSSW_7_6_X
pietverwilligen b88bd5a
Delete junk.log
pietverwilligen ef3920e
Delete out_digi.root
pietverwilligen 09eeb4d
Delete out_local_reco.root
pietverwilligen 2a51474
Delete out_local_reco_me0segment.root
pietverwilligen f7936e7
Delete runAllGEMProducer_cfg.py
pietverwilligen 1093e42
Delete out_digi.root
pietverwilligen d1c2329
Delete out_local_reco.root
pietverwilligen f40a954
Delete __init__.py
pietverwilligen e658e30
Delete __init__.pyc
pietverwilligen 1013b0e
Delete me0Segments_cfi.pyc
pietverwilligen 643b9e5
Merged refs/pull/10485/head from repository cms-sw
pietverwilligen 819c84d
removed GEMRecHitAnalyzer library link
pietverwilligen 6fad77a
testME0DetId now following change in ME0DetId
pietverwilligen a099ac5
Merge pull request #15 from cms-sw/CMSSW_7_6_X
pietverwilligen 626efa7
removed splitlevel
pietverwilligen 72f4ace
removed commented out comment lines
pietverwilligen 24e6e8b
chambermask sets both layer and roll to zero
pietverwilligen 5cb78d7
removed commented out use statements
pietverwilligen 41b27a7
pass by const reference
pietverwilligen bb1435e
pass by const reference
pietverwilligen 84c91b0
pass by const reference
pietverwilligen aac9f46
pass by const reference
pietverwilligen e146b34
pass by const reference
pietverwilligen 036ed3e
add protection against dividing by zero
pietverwilligen 32e0245
99999 --> running_max
pietverwilligen fcf7a2a
add functionality to ask number of layers
pietverwilligen 4f69da3
removed magic number 5 = number of layers in ME0 chamber - 1
pietverwilligen 22bf0b1
removed magic number 5 = number of layers in ME0 chamber - 1
pietverwilligen 5d6ca20
use use reco::deltaPhi
pietverwilligen f043f50
precompute layer,phi,eta in separate loops
pietverwilligen 7c56855
use std::unique_ptr for instance of ME0SegFit class
pietverwilligen 0acc17d
use std::unique_ptr for instance of ME0SegFit class
pietverwilligen 6c2cd7b
use std::unique_ptr for instance of ME0SegFit class
pietverwilligen 2f5bc1e
pass arguments as const for function isGoodToMerge
pietverwilligen b940516
pass arguments as const for function isGoodToMerge
pietverwilligen 1842b8b
define class constant running_max as static constexpr float
pietverwilligen ceeb5d0
moved calculation of time to the segment algorithm
pietverwilligen 66ca7eb
moved calculation of time to the segment algorithm
pietverwilligen 085858d
moved calculation of time to the segment algorithm
pietverwilligen b33423c
moved calculation of time to the segment algorithm
pietverwilligen e49287a
minor modification of LogDebug msg
pietverwilligen 0088bfe
adding original version in 760pre2
pietverwilligen 3b27600
PR version now in 760pre2
pietverwilligen d029d9d
PR version now in 760pre2
pietverwilligen a180459
changed class version according to compilation error msg
pietverwilligen cecdebc
PR version now in 760pre2
pietverwilligen 05a9e2c
PR version now in 760pre2
pietverwilligen 042afdf
PR version now in 760pre2
pietverwilligen 29a67dc
PR version now in 760pre2
pietverwilligen a2d0983
PR version now in 760pre2
pietverwilligen 7df2a07
PR version now in 760pre2
pietverwilligen 9cd1c58
PR version now in 760pre2
pietverwilligen 4e60987
PR version now in 760pre2
pietverwilligen 8145720
PR version now in 760pre2
pietverwilligen 16e33f3
PR version now in 760pre2
pietverwilligen d53324f
PR version now in 760pre2
pietverwilligen 8c249ed
PR version now in 760pre2
pietverwilligen 87d869c
PR version now in 760pre2
pietverwilligen 0a0a2d5
PR version now in 760pre2
pietverwilligen 89b309b
PR version now in 760pre2
pietverwilligen 96a485c
PR version now in 760pre2
pietverwilligen 4e1e8a6
PR version now in 760pre2
pietverwilligen 4fa94df
protect against division by zero
pietverwilligen 32457be
hide stringstreams necessary for formatting output behind EDM_ML_DEBUG
pietverwilligen f8d44ca
cleaned up comments
pietverwilligen 2af4a05
keep valuable LogTrace msg
pietverwilligen fee2909
removed comments starting with $
pietverwilligen 26e87a0
removed comments starting with $
pietverwilligen c22418c
Merge pull request #16 from cms-sw/CMSSW_7_6_X
pietverwilligen c3e2342
removed comments starting with $
pietverwilligen a13d553
Merge pull request #17 from cms-sw/CMSSW_7_6_X
pietverwilligen ecb6864
Merged GEMSegment_76X_v2 from repository pietverwilligen
pietverwilligen 0682748
delete outdated test cfg file
pietverwilligen b4630b0
delete outdated test cfg file
pietverwilligen 65c88ac
delete outdated test cfg file
pietverwilligen 04577ec
delete outdated test cfg file
pietverwilligen 922ed57
migrate to consumes
pietverwilligen f721009
migrate to consumes
pietverwilligen 71a67a8
migrate to consumes
pietverwilligen 703765e
migrate to consumes
pietverwilligen 6be5174
remove empty methods and call ES for each event
pietverwilligen e1eaf62
use magneticfield_cff
pietverwilligen 97da324
conclude merge
pietverwilligen d79e469
Merge pull request #18 from cms-sw/CMSSW_7_6_X
pietverwilligen 8a5851d
update testME0DetId: max EtaPartition for now is 1
pietverwilligen 093e5c4
Merge branch 'GEMSegment_76X_v1' of https://github.com/pietverwillige…
pietverwilligen e0ad8cd
abs value of reco::deltaPhi since it returns values in [-pi,pi]
pietverwilligen 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,92 @@ | ||
#ifndef GEMRecHit_ME0Segment_h | ||
#define GEMRecHit_ME0Segment_h | ||
|
||
/** \class ME0Segment derived by the CSC segment | ||
* Describes a reconstructed track segment in the 6 layers of the ME0 system. | ||
* This is 4-dimensional since it has an origin (x,y) and a direction (x,y) | ||
* in the local coordinate system of the chamber. | ||
* | ||
* $Date: 2014/02/04 12:41:32 $ | ||
* \author Marcello Maggi | ||
*/ | ||
|
||
#include <DataFormats/TrackingRecHit/interface/RecSegment.h> | ||
#include <DataFormats/GEMRecHit/interface/ME0RecHitCollection.h> | ||
|
||
#include <iosfwd> | ||
|
||
class ME0DetId; | ||
|
||
class ME0Segment GCC11_FINAL : public RecSegment { | ||
|
||
public: | ||
|
||
/// Default constructor | ||
ME0Segment() : theChi2(0.){} | ||
|
||
/// Constructor | ||
ME0Segment(const std::vector<const ME0RecHit*>& proto_segment, LocalPoint origin, | ||
LocalVector direction, AlgebraicSymMatrix errors, double chi2); | ||
|
||
ME0Segment(const std::vector<const ME0RecHit*>& proto_segment, LocalPoint origin, | ||
LocalVector direction, AlgebraicSymMatrix errors, double chi2, double time, double timeErr); | ||
|
||
/// Destructor | ||
virtual ~ME0Segment(); | ||
|
||
//--- Base class interface | ||
ME0Segment* clone() const { return new ME0Segment(*this); } | ||
|
||
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() | ||
AlgebraicSymMatrix parametersError() const { return theCovMatrix; } | ||
|
||
/// The projection matrix relates the trajectory state parameters to the segment parameters(). | ||
virtual AlgebraicMatrix projectionMatrix() const; | ||
|
||
virtual std::vector<const TrackingRecHit*> recHits() const; | ||
|
||
virtual std::vector<TrackingRecHit*> recHits(); | ||
|
||
double chi2() const { return theChi2; }; | ||
|
||
virtual int dimension() const { return 4; } | ||
|
||
virtual int degreesOfFreedom() const { return 2*nRecHits() - 4;} | ||
|
||
//--- Extension of the interface | ||
|
||
const std::vector<ME0RecHit>& specificRecHits() const { return theME0RecHits; } | ||
|
||
int nRecHits() const { return theME0RecHits.size(); } | ||
|
||
ME0DetId me0DetId() const { return geographicalId(); } | ||
|
||
float time() const { return theTimeValue; } | ||
float timeErr() const { return theTimeUncrt; } | ||
|
||
void print() const; | ||
|
||
private: | ||
|
||
std::vector<ME0RecHit> theME0RecHits; | ||
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; // the Chi squared of the segment fit | ||
double theTimeValue; // the best time estimate of the segment | ||
double theTimeUncrt; // the uncertainty on the time estimation | ||
|
||
}; | ||
|
||
std::ostream& operator<<(std::ostream& os, const ME0Segment& seg); | ||
|
||
#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,24 @@ | ||
#ifndef DataFormats_ME0SegmentCollection_H | ||
#define DataFormats_ME0SegmentCollection_H | ||
|
||
/** \class ME0SegmentCollection | ||
* | ||
* The collection of ME0Segment's. See \ref CSCSegmentCollection.h for details from which is derived. | ||
* | ||
* $Date: 2014/02/04 10:08:15 $ | ||
* \author Marcello Maggi | ||
*/ | ||
|
||
#include <DataFormats/MuonDetId/interface/ME0DetId.h> | ||
#include <DataFormats/GEMRecHit/interface/ME0Segment.h> | ||
|
||
#include <DataFormats/Common/interface/RangeMap.h> | ||
#include <DataFormats/Common/interface/ClonePolicy.h> | ||
#include <DataFormats/Common/interface/OwnVector.h> | ||
|
||
typedef edm::RangeMap <ME0DetId, edm::OwnVector<ME0Segment> > ME0SegmentCollection; | ||
|
||
#include <DataFormats/Common/interface/Ref.h> | ||
typedef edm::Ref<ME0SegmentCollection> ME0SegmentRef; | ||
|
||
#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,127 @@ | ||
/** \file ME0egment.cc | ||
* | ||
* $Date: 2014/02/04 12:41:33 $ | ||
* \author Marcello Maggi | ||
*/ | ||
#include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
#include <DataFormats/GEMRecHit/interface/ME0Segment.h> | ||
#include <iostream> | ||
|
||
namespace { | ||
// define a Super Layer Id from the first layer of the first rechits, and put to first layer | ||
inline | ||
DetId buildDetId(ME0DetId id) { | ||
return ME0DetId(id.region(),1,id.chamber(),id.roll()); | ||
} | ||
} | ||
|
||
class ProjectionMatrixDiag { | ||
// Aider class to make the return of the projection Matrix thread-safe | ||
protected: | ||
AlgebraicMatrix theProjectionMatrix; | ||
public: | ||
ProjectionMatrixDiag() : theProjectionMatrix(4,5,0) { | ||
theProjectionMatrix[0][1] = 1; | ||
theProjectionMatrix[1][2] = 1; | ||
theProjectionMatrix[2][3] = 1; | ||
theProjectionMatrix[3][4] = 1; | ||
} | ||
const AlgebraicMatrix &getMatrix() const { | ||
return (theProjectionMatrix); | ||
} | ||
}; | ||
|
||
|
||
ME0Segment::ME0Segment(const std::vector<const ME0RecHit*>& proto_segment, LocalPoint origin, | ||
LocalVector direction, AlgebraicSymMatrix errors, double chi2) : | ||
RecSegment(buildDetId(proto_segment.front()->me0Id())), | ||
theOrigin(origin), | ||
theLocalDirection(direction), theCovMatrix(errors), theChi2(chi2){ | ||
theTimeValue = 0.0; | ||
theTimeUncrt = 0.0; | ||
for(unsigned int i=0; i<proto_segment.size(); ++i) | ||
theME0RecHits.push_back(*proto_segment[i]); | ||
} | ||
|
||
ME0Segment::ME0Segment(const std::vector<const ME0RecHit*>& proto_segment, LocalPoint origin, | ||
LocalVector direction, AlgebraicSymMatrix errors, double chi2, double time, double timeErr) : | ||
RecSegment(buildDetId(proto_segment.front()->me0Id())), | ||
theOrigin(origin), | ||
theLocalDirection(direction), theCovMatrix(errors), theChi2(chi2){ | ||
theTimeValue = time; | ||
theTimeUncrt = timeErr; | ||
|
||
for(unsigned int i=0; i<proto_segment.size(); ++i) | ||
theME0RecHits.push_back(*proto_segment[i]); | ||
} | ||
|
||
ME0Segment::~ME0Segment() {} | ||
|
||
std::vector<const TrackingRecHit*> ME0Segment::recHits() const{ | ||
std::vector<const TrackingRecHit*> pointersOfRecHits; | ||
for (std::vector<ME0RecHit>::const_iterator irh = theME0RecHits.begin(); irh!=theME0RecHits.end(); ++irh) { | ||
pointersOfRecHits.push_back(&(*irh)); | ||
} | ||
return pointersOfRecHits; | ||
} | ||
|
||
std::vector<TrackingRecHit*> ME0Segment::recHits() { | ||
|
||
std::vector<TrackingRecHit*> pointersOfRecHits; | ||
for (std::vector<ME0RecHit>::iterator irh = theME0RecHits.begin(); irh!=theME0RecHits.end(); ++irh) { | ||
pointersOfRecHits.push_back(&(*irh)); | ||
} | ||
return pointersOfRecHits; | ||
} | ||
|
||
LocalError ME0Segment::localPositionError() const { | ||
return LocalError(theCovMatrix[2][2], theCovMatrix[2][3], theCovMatrix[3][3]); | ||
} | ||
|
||
LocalError ME0Segment::localDirectionError() const { | ||
return LocalError(theCovMatrix[0][0], theCovMatrix[0][1], theCovMatrix[1][1]); | ||
} | ||
|
||
|
||
AlgebraicVector ME0Segment::parameters() const { | ||
// For consistency with DT and CSC and what we require for the TrackingRecHit interface, | ||
// the order of the parameters in the returned vector should be (dx/dz, dy/dz, x, z) | ||
|
||
AlgebraicVector result(4); | ||
|
||
if(theLocalDirection.z() != 0) | ||
{ | ||
result[0] = theLocalDirection.x()/theLocalDirection.z(); | ||
result[1] = theLocalDirection.y()/theLocalDirection.z(); | ||
} | ||
result[2] = theOrigin.x(); | ||
result[3] = theOrigin.y(); | ||
|
||
return result; | ||
} | ||
|
||
AlgebraicMatrix ME0Segment::projectionMatrix() const { | ||
static const ProjectionMatrixDiag theProjectionMatrix; | ||
return (theProjectionMatrix.getMatrix()); | ||
} | ||
|
||
// | ||
void ME0Segment::print() const { | ||
LogDebug("ME0Segment") << *this; | ||
|
||
} | ||
|
||
std::ostream& operator<<(std::ostream& os, const ME0Segment& seg) { | ||
os << "ME0Segment: local pos = " << seg.localPosition() << | ||
" posErr = (" << sqrt(seg.localPositionError().xx())<<","<<sqrt(seg.localPositionError().yy())<< | ||
"0,)\n"<< | ||
" dir = " << seg.localDirection() << | ||
" dirErr = (" << sqrt(seg.localDirectionError().xx())<<","<<sqrt(seg.localDirectionError().yy())<< | ||
"0,)\n"<< | ||
" chi2/ndf = " << ((seg.degreesOfFreedom() != 0.) ? seg.chi2()/double(seg.degreesOfFreedom()) :0 ) << | ||
" #rechits = " << seg.specificRecHits().size()<< | ||
" time = "<< seg.time() << " +/- " << seg.timeErr() << " ns "; | ||
|
||
return os; | ||
} | ||
|
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
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.
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.
the line with
$ [text] $
should be removed (the same comment applies to all such lines)