5 #include <Math/DistFunc.h>
83 std::string qualityStr = cfg.
getParameter<std::string>(
"qualityBit");
87 edm::LogError(
"MisConfiguration")<<
"vector of size less then 2";
91 if (cfg.
exists(
"qualityBit")) {
92 std::string qualityStr = cfg.
getParameter<std::string>(
"qualityBit");
93 if (qualityStr !=
"") {
100 "If you set 'keepAllTracks' to true, you must specify which qualityBit to set.\n";
102 "You can't set the quality bit " << cfg.
getParameter<std::string>(
"qualityBit") <<
" as it is 'undefQuality' or unknown.\n";
112 std::string alias( cfg.
getParameter<std::string>(
"@module_label" ) );
113 produces<reco::TrackCollection>().setBranchAlias( alias +
"Tracks");
115 produces<reco::TrackExtraCollection>().setBranchAlias( alias +
"TrackExtras");
116 produces<TrackingRecHitCollection>().setBranchAlias( alias +
"RecHits");
118 if (copyTrajectories_) {
119 produces< std::vector<Trajectory> >().setBranchAlias( alias +
"Trajectories");
120 produces< TrajTrackAssociationCollection >().setBranchAlias( alias +
"TrajectoryTrackAssociations");
131 using namespace reco;
142 vertexBeamSpot = *hBsp;
146 std::vector<Point> points;
147 std::vector<double> vterr, vzerr;
152 LogDebug(
"SelectVertex") << points.size() <<
" good pixel vertices";
171 for (TrackCollection::const_iterator it = hSrcTrack->begin(), ed = hSrcTrack->end(); it != ed; ++it, ++
current) {
172 const Track & trk = * it;
175 LogTrace(
"TrackSelection") <<
"ready to check track with pt="<< trk.
pt() ;
180 LogTrace(
"TrackSelection") <<
"track with pt="<< trk.
pt() <<
" NOT selected";
185 LogTrace(
"TrackSelection") <<
"track with pt="<< trk.
pt() <<
" selected";
189 if (!points.empty()) {
206 selHits_->push_back( (*hit)->clone() );
219 selTrajs_ = auto_ptr< vector<Trajectory> >(
new vector<Trajectory>());
222 for (
size_t i = 0,
n = hTraj->size();
i <
n; ++
i) {
225 if (match != hTTAss->end()) {
227 short oldKey =
static_cast<short>(trkRef.
key());
std::vector< double > chi2n_par_
T getParameter(std::string const &) const
std::vector< double > max_d0NoPV_
T getUntrackedParameter(std::string const &, T const &) const
std::vector< double > max_d0_
Impact parameter absolute cuts.
void selectVertices(unsigned int tsNum, const reco::VertexCollection &vtxs, std::vector< Point > &points, std::vector< double > &vterr, std::vector< double > &vzerr)
std::vector< std::vector< double > > dz_par1_
std::auto_ptr< reco::TrackExtraCollection > selTrackExtras_
std::vector< std::vector< double > > d0_par1_
std::vector< std::vector< double > > d0_par2_
reco::TrackRefProd rTracks_
std::vector< bool > applyAbsCutsIfNoPV_
std::vector< double > max_z0NoPV_
std::vector< Track > TrackCollection
collection of Tracks
bool exists(std::string const ¶meterName) const
checks if a parameter exists
std::auto_ptr< std::vector< Trajectory > > selTrajs_
bool innerOk() const
return true if the innermost hit is valid
std::vector< uint32_t > min_3Dlayers_
edm::Ref< TrackExtraCollection > TrackExtraRef
persistent reference to a TrackExtra
std::vector< int32_t > vtxNumber_
vertex cuts
const math::XYZPoint & outerPosition() const
position of the outermost hit
bool copyExtras_
copy only the tracks, not extras and rechits (for AOD)
std::vector< double > nSigmaZ_
edm::RefProd< std::vector< Trajectory > > rTrajectories_
double minEta_
eta restrictions
const math::XYZPoint & innerPosition() const
position of the innermost hit
double eta() const
pseudorapidity of momentum vector
std::vector< bool > keepAllTracks_
std::auto_ptr< TrajTrackAssociationCollection > selTTAss_
std::vector< std::vector< double > > res_par_
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::Ref< TrackingRecHitCollection > TrackingRecHitRef
persistent reference to a TrackingRecHit
CovarianceMatrix outerStateCovariance() const
outermost trajectory state curvilinear errors
double pt() const
track transverse momentum
std::vector< uint32_t > min_nhits_
reco::TrackExtraRefProd rTrackExtras_
unsigned int outerDetId() const
DetId of the detector on which surface the outermost state is located.
std::vector< reco::TrackRef > trackRefs_
std::vector< unsigned int > preFilter_
bool select(unsigned tsNum, const reco::BeamSpot &vertexBeamSpot, const reco::Track &tk, const std::vector< Point > &points, std::vector< double > &vterr, std::vector< double > &vzerr)
return class, or -1 if rejected
std::vector< double > max_relpterr_
trackingRecHit_iterator recHitsBegin() const
Iterator to first hit on the track.
edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > > TrajTrackAssociationCollection
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
std::vector< uint32_t > min_hits_bypass_
RefProd< PROD > getRefBeforePut()
edm::InputTag src_
source collection label
std::vector< TrackExtra > TrackExtraCollection
collection of TrackExtra objects
edm::OwnVector< TrackingRecHit > TrackingRecHitCollection
collection of TrackingRecHits
edm::RefToBase< TrajectorySeed > seedRef() const
static TrackQuality qualityByName(const std::string &name)
std::vector< double > chi2n_no1Dmod_par_
const math::XYZVector & outerMomentum() const
momentum vector at the outermost hit position
std::vector< StringCutObjectSelector< reco::Vertex > > vertexCut_
bool outerOk() const
return true if the outermost hit is valid
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
CovarianceMatrix innerStateCovariance() const
innermost trajectory state curvilinear errors
key_type key() const
Accessor for product key.
std::vector< TrackBase::TrackQuality > qualityToSet_
TrackingRecHitRefProd rHits_
std::vector< bool > setQualityBit_
do I have to set a quality bit?
std::vector< uint32_t > min_layers_
Cuts on numbers of layers with hits/3D hits/lost hits.
static std::string const emptyString("")
std::auto_ptr< reco::TrackCollection > selTracks_
storage
void produce(edm::Event &evt, const edm::EventSetup &es)
process one event
const math::XYZVector & innerMomentum() const
momentum vector at the innermost hit position
std::vector< double > max_z0_
const TrackResiduals & residuals() const
PropagationDirection seedDirection() const
direction of how the hits were sorted in the original seed
virtual ~AnalyticalTrackSelector()
destructor
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
std::vector< uint32_t > max_lostLayers_
std::vector< std::vector< double > > dz_par2_
std::auto_ptr< TrackingRecHitCollection > selHits_
unsigned int innerDetId() const
DetId of the detector on which surface the innermost state is located.
tuple size
Write out results.
std::vector< bool > applyAdaptedPVCuts_
bool copyTrajectories_
copy also trajectories and trajectory->track associations
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.