6 #include <Math/DistFunc.h>
44 produces<edm::ValueMap<float> >(
"MVAVals");
84 cfg.
existsAs<int32_t>(
"max_minMissHitOutOrIn") ?
85 cfg.
getParameter<int32_t>(
"max_minMissHitOutOrIn") : 99);
87 cfg.
existsAs<
double>(
"max_lostHitFraction") ?
103 edm::LogError(
"MisConfiguration")<<
"vector of size less then 2";
107 if (cfg.
exists(
"qualityBit")) {
109 if (qualityStr !=
"") {
116 "If you set 'keepAllTracks' to true, you must specify which qualityBit to set.\n";
118 "You can't set the quality bit " << cfg.
getParameter<
std::string>(
"qualityBit") <<
" as it is 'undefQuality' or unknown.\n";
129 produces<reco::TrackCollection>().setBranchAlias( alias +
"Tracks");
131 produces<reco::TrackExtraCollection>().setBranchAlias( alias +
"TrackExtras");
132 produces<TrackingRecHitCollection>().setBranchAlias( alias +
"RecHits");
134 if (copyTrajectories_) {
135 produces< std::vector<Trajectory> >().setBranchAlias( alias +
"Trajectories");
136 produces< TrajTrackAssociationCollection >().setBranchAlias( alias +
"TrajectoryTrackAssociations");
147 using namespace reco;
158 vertexBeamSpot = *hBsp;
162 std::vector<Point> points;
163 std::vector<float> vterr, vzerr;
168 LogDebug(
"SelectVertex") << points.size() <<
" good pixel vertices";
189 for (TrackCollection::const_iterator it = hSrcTrack->begin(), ed = hSrcTrack->end(); it != ed; ++it, ++
current) {
190 const Track & trk = * it;
193 LogTrace(
"TrackSelection") <<
"ready to check track with pt="<< trk.
pt() ;
197 bool ok =
select(0,vertexBeamSpot, trk, points, vterr, vzerr,mvaVal);
200 LogTrace(
"TrackSelection") <<
"track with pt="<< trk.
pt() <<
" NOT selected";
205 LogTrace(
"TrackSelection") <<
"track with pt="<< trk.
pt() <<
" selected";
209 if (!points.empty()) {
226 selHits_->push_back( (*hit)->clone() );
239 selTrajs_ = auto_ptr< vector<Trajectory> >(
new vector<Trajectory>());
242 for (
size_t i = 0,
n = hTraj->size();
i <
n; ++
i) {
245 if (match != hTTAss->end()) {
247 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.
bool existsAs(std::string const ¶meterName, bool trackiness=true) const
checks if a parameter exists as a given type
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_
void produce(edm::Event &evt, const edm::EventSetup &es) override
process one event
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_
const math::XYZPoint & innerPosition() const
position of the innermost hit
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
void processMVA(edm::Event &evt, const edm::EventSetup &es)
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_
std::vector< double > max_eta_
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()
void selectVertices(unsigned int tsNum, const reco::VertexCollection &vtxs, std::vector< Point > &points, std::vector< float > &vterr, std::vector< float > &vzerr)
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.
bool select(unsigned tsNum, const reco::BeamSpot &vertexBeamSpot, const reco::Track &tk, const std::vector< Point > &points, std::vector< float > &vterr, std::vector< float > &vzerr, double mvaVal)
return class, or -1 if rejected
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
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< double > mvaVals_
std::vector< double > min_eta_
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.
std::vector< int32_t > max_minMissHitOutOrIn_
tuple size
Write out results.
std::vector< bool > applyAdaptedPVCuts_
std::vector< int32_t > max_lostHitFraction_
bool copyTrajectories_
copy also trajectories and trajectory->track associations
trackingRecHit_iterator recHitsEnd() const
Iterator to last hit on the track.