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
Deterministic Annealing Filter for track reconstruction #4205
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
1bc620f
New try to add DAF
ebrondol 76d49bc
Merged MyNewBranchDAF from repository ebrondol
rovere 9f10259
Running in release pre8
ebrondol 0079f68
Fix DAF problems
ebrondol 5ecc435
Delete cout
ebrondol 87f7af2
cleaning up
ebrondol ffeec43
cleaning up TrackingTools folder
ebrondol 460ad45
Delete TSiTrackerMultiRecHit from DPGAnalysis/SiStripTools
ebrondol 8ec8286
Delete TSiTrackerMultiRecHit from DPGAnalysis/SiStripTools (2)
ebrondol 62b28f1
Add MRHChi2 in TrackingComponentsRecord
ebrondol 7da9ea9
Fix MRHChi2 in TrackingComponentsRecord
ebrondol 6289824
Adding debug
ebrondol ffeafdd
adding cfg debug file
ebrondol 552edeb
Removing cout statements
ebrondol 68c5617
cleaning up - second part
ebrondol e316058
@slava77 comments
ebrondol e944563
fixed things (like getByToken and other comments)
ebrondol File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<use name="DataFormats/GeometryVector"/> | ||
<use name="DataFormats/Math"/> | ||
<use name="DataFormats/TrackerRecHit2D"/> | ||
<use name="FWCore/Framework"/> | ||
<use name="FWCore/MessageLogger"/> | ||
<use name="FWCore/Utilities"/> | ||
<use name="RecoTracker/MeasurementDet"/> | ||
<use name="RecoTracker/TkDetLayers"/> | ||
<use name="RecoTracker/TransientTrackingRecHit"/> | ||
<use name="TrackingTools/DetLayers"/> | ||
<use name="TrackingTools/GeomPropagators"/> | ||
<use name="TrackingTools/KalmanUpdators"/> | ||
<use name="TrackingTools/MeasurementDet"/> | ||
<use name="TrackingTools/PatternTools"/> | ||
<use name="TrackingTools/TrajectoryState"/> | ||
<use name="TrackingTools/TransientTrackingRecHit"/> | ||
<use name="TrackingTools/TrackFitters"/> | ||
<export> | ||
<lib name="1"/> | ||
</export> | ||
|
85 changes: 85 additions & 0 deletions
85
RecoTracker/SiTrackerMRHTools/interface/GenericProjectedRecHit2D.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,85 @@ | ||
#ifndef RECOTRACKER_TRANSIENTRACKINGRECHIT_GenericProjectedRecHit2D_H | ||
#define RECOTRACKER_TRANSIENTRACKINGRECHIT_GenericProjectedRecHit2D_H | ||
|
||
#include "TrackingTools/TransientTrackingRecHit/interface/TransientTrackingRecHit.h" | ||
#include "TrackingTools/TransientTrackingRecHit/interface/HelpertRecHit2DLocalPos.h" | ||
#include "TrackingTools/KalmanUpdators/interface/TrackingRecHitPropagator.h" | ||
|
||
class GenericProjectedRecHit2D : public TransientTrackingRecHit { | ||
public: | ||
|
||
GenericProjectedRecHit2D( const LocalPoint& pos, const LocalError& err, | ||
const GeomDet* det, const GeomDet* originaldet, | ||
const TransientTrackingRecHit::ConstRecHitPointer originalHit, | ||
const TrackingRecHitPropagator* propagator); | ||
|
||
virtual AlgebraicSymMatrix parametersError() const { | ||
return HelpertRecHit2DLocalPos().parError( localPositionError(), *det()); | ||
} | ||
|
||
//virtual ~GenericProjectedRecHit2D(){delete theOriginalTransientHit;} | ||
|
||
virtual AlgebraicVector parameters() const ; | ||
|
||
virtual LocalPoint localPosition() const {return theLp;} | ||
|
||
virtual LocalError localPositionError() const {return theLe;} | ||
|
||
virtual AlgebraicMatrix projectionMatrix() const {return theProjectionMatrix;} | ||
|
||
virtual DetId geographicalId() const {return det() ? det()->geographicalId() : DetId();} | ||
|
||
virtual int dimension() const {return theDimension;} | ||
|
||
//this hit lays on the original surface, NOT on the projection surface | ||
virtual const TrackingRecHit * hit() const { return theOriginalTransientHit->hit(); } | ||
|
||
virtual TrackingRecHit * cloneHit() const { return theOriginalTransientHit->cloneHit(); } | ||
|
||
virtual bool isValid() const{return true;} | ||
|
||
virtual std::vector<const TrackingRecHit*> recHits() const { | ||
//return theOriginalTransientHit->hit()->recHits(); | ||
return std::vector<const TrackingRecHit*>(); | ||
} | ||
|
||
virtual std::vector<TrackingRecHit*> recHits() { | ||
//should it do something different? | ||
return std::vector<TrackingRecHit*>(); | ||
} | ||
|
||
const TrackingRecHitPropagator* propagator() const {return thePropagator;} | ||
|
||
virtual bool canImproveWithTrack() const {return true;} | ||
|
||
const GeomDet* originalDet() const {return theOriginalDet;} | ||
|
||
static RecHitPointer build( const LocalPoint& pos, const LocalError& err, | ||
const GeomDet* det, const GeomDet* originaldet, | ||
const TransientTrackingRecHit::ConstRecHitPointer originalHit, | ||
const TrackingRecHitPropagator* propagator) { | ||
return RecHitPointer( new GenericProjectedRecHit2D( pos, err, det, originaldet, originalHit, propagator)); | ||
} | ||
|
||
RecHitPointer clone( const TrajectoryStateOnSurface& ts, const TransientTrackingRecHitBuilder*) const; | ||
|
||
private: | ||
|
||
const GeomDet* theOriginalDet; | ||
TransientTrackingRecHit::ConstRecHitPointer theOriginalTransientHit; | ||
LocalPoint theLp; | ||
LocalError theLe; | ||
AlgebraicMatrix theProjectionMatrix; | ||
const TrackingRecHitPropagator* thePropagator; | ||
//const TrackingRecHit* theOriginalHit; | ||
int theDimension; | ||
|
||
virtual GenericProjectedRecHit2D* clone() const { | ||
return new GenericProjectedRecHit2D(*this); | ||
} | ||
|
||
}; | ||
|
||
|
||
|
||
#endif |
56 changes: 56 additions & 0 deletions
56
RecoTracker/SiTrackerMRHTools/interface/GroupedDAFHitCollector.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,56 @@ | ||
/** \class GroupedDAFHitCollector | ||
* Returns a collection of SiTrackerMultiRecHits and InvalidRecHits given a Trajectory. | ||
* Builds a SiTrackerMultiRecHit for each detGroup | ||
* (i.e. a group of detectors mutually exclusive for the track's crossing point) | ||
* | ||
* \author tropiano, genta | ||
* \review in May 2014 by brondolin | ||
*/ | ||
|
||
#ifndef SiTrackerMRHTools_GroupedDAFHitCollector_h | ||
#define SiTrackerMRHTools_GroupedDAFHitCollector_h | ||
|
||
#include "TrackingTools/MeasurementDet/interface/LayerMeasurements.h" | ||
#include "RecoTracker/SiTrackerMRHTools/interface/MultiRecHitCollector.h" | ||
#include <vector> | ||
|
||
class Propagator; | ||
class MeasurementEstimator; | ||
class MeasurementTracker; | ||
class SiTrackerMultiRecHitUpdator; | ||
|
||
class GroupedDAFHitCollector :public MultiRecHitCollector { | ||
|
||
public: | ||
explicit GroupedDAFHitCollector(const MeasurementTracker* measurementTracker, | ||
const SiTrackerMultiRecHitUpdator* updator, | ||
const MeasurementEstimator* est, | ||
const Propagator* propagator, | ||
const Propagator* reversePropagator, bool debug): | ||
MultiRecHitCollector(measurementTracker), theUpdator(updator), | ||
theEstimator(est), thePropagator(propagator), theReversePropagator(reversePropagator), debug_(debug){} | ||
|
||
|
||
virtual ~GroupedDAFHitCollector(){} | ||
|
||
virtual std::vector<TrajectoryMeasurement> recHits(const Trajectory&, | ||
const MeasurementTrackerEvent *theMT) const; | ||
|
||
const SiTrackerMultiRecHitUpdator* getUpdator() const {return theUpdator;} | ||
const MeasurementEstimator* getEstimator() const {return theEstimator;} | ||
const Propagator* getPropagator() const {return thePropagator;} | ||
const Propagator* getReversePropagator() const {return theReversePropagator;} | ||
|
||
private: | ||
void buildMultiRecHits(const std::vector<TrajectoryMeasurementGroup>& measgroup, | ||
std::vector<TrajectoryMeasurement>& result) const; | ||
|
||
const SiTrackerMultiRecHitUpdator* theUpdator; | ||
const MeasurementEstimator* theEstimator; | ||
const Propagator* thePropagator; | ||
const Propagator* theReversePropagator; | ||
const bool debug_; | ||
}; | ||
|
||
|
||
#endif |
39 changes: 39 additions & 0 deletions
39
RecoTracker/SiTrackerMRHTools/interface/MeasurementByLayerGrouper.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,39 @@ | ||
#ifndef SiTrackerMRHTools_MeasurementByLayerGrouper_H | ||
#define SiTrackerMRHTools_MeasurementByLayerGrouper_H | ||
|
||
class DetLayer; | ||
class TrajectoryMeasurement; | ||
class GeometricSearchTracker; | ||
|
||
#include <vector> | ||
#include <map> | ||
|
||
//groups the TrajectoryMeasurements on a layer by layer basis | ||
|
||
class MeasurementByLayerGrouper { | ||
|
||
private: | ||
|
||
typedef TrajectoryMeasurement TM; | ||
const GeometricSearchTracker* theGeomSearch; | ||
|
||
const DetLayer* getDetLayer(const TM& tm) const; | ||
|
||
public: | ||
|
||
explicit MeasurementByLayerGrouper(const GeometricSearchTracker* search = 0):theGeomSearch(search){}; | ||
|
||
std::vector<std::pair<const DetLayer*, std::vector<TM> > > operator()(const std::vector<TM>&) const; | ||
|
||
|
||
//to be ported later if needed | ||
/* | ||
vector<TM> | ||
operator()(const vector<pair<const DetLayer*, vector<TM> > >&) const; | ||
|
||
vector<pair<const DetLayer*, map<int, vector<TrajectoryMeasurement> > > > | ||
operator()(const map<int, vector<TM> >&) const; | ||
*/ | ||
|
||
}; | ||
#endif |
26 changes: 26 additions & 0 deletions
26
RecoTracker/SiTrackerMRHTools/interface/MultiRecHitCollector.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,26 @@ | ||
#ifndef SiTrackerMRHTools_MultiRecHitCollector_h | ||
#define SiTrackerMRHTools_MultiRecHitCollector_h | ||
|
||
#include "RecoTracker/MeasurementDet/interface/MeasurementTracker.h" | ||
#include <vector> | ||
|
||
class Trajectory; | ||
class TrajectoryMeasurement; | ||
|
||
class MultiRecHitCollector { | ||
|
||
public: | ||
MultiRecHitCollector(const MeasurementTracker* meas): theMeasurementTracker(meas){} | ||
|
||
virtual std::vector<TrajectoryMeasurement> recHits(const Trajectory&, const MeasurementTrackerEvent *theMTE) const = 0; | ||
|
||
const MeasurementTracker* getMeasurementTracker() const {return theMeasurementTracker;} | ||
|
||
|
||
private: | ||
const MeasurementTracker* theMeasurementTracker; | ||
|
||
}; | ||
|
||
#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.
annealing_ should be initialized in the default constructor. Please add it at L19