#include <TrackClassMatch.h>
Classes | |
class | Input |
Public Types | |
typedef Input | first_argument_type |
typedef bool | result_type |
typedef TrackProbabilityCalibration::Entry | second_argument_type |
Public Member Functions | |
bool | operator() (const first_argument_type &input, const second_argument_type &category) const |
TrackClassMatch () |
filter to define the belonging of a track to a TrackClass
Definition at line 12 of file TrackClassMatch.h.
Definition at line 29 of file TrackClassMatch.h.
typedef bool TrackClassMatch::result_type |
Definition at line 31 of file TrackClassMatch.h.
Definition at line 30 of file TrackClassMatch.h.
TrackClassMatch::TrackClassMatch | ( | ) | [inline] |
Definition at line 16 of file TrackClassMatch.h.
{}
bool TrackClassMatch::operator() | ( | const first_argument_type & | input, |
const second_argument_type & | category | ||
) | const [inline] |
Definition at line 33 of file TrackClassMatch.h.
References TrackProbabilityCalibration::Entry::category, TrackProbabilityCategoryData::chiMax, TrackProbabilityCategoryData::chiMin, eta, reco::TrackBase::eta(), TrackProbabilityCategoryData::etaMax, TrackProbabilityCategoryData::etaMin, reco::TrackBase::hitPattern(), TrackProbabilityCategoryData::nHitsMax, TrackProbabilityCategoryData::nHitsMin, reco::TrackBase::normalizedChi2(), TrackProbabilityCategoryData::nPixelHitsMax, TrackProbabilityCategoryData::nPixelHitsMin, reco::TrackBase::numberOfValidHits(), reco::TrackBase::p(), AlCaHLTBitMon_ParallelJobs::p, TrackProbabilityCategoryData::pMax, TrackProbabilityCategoryData::pMin, query::result, TrackClassMatch::Input::track, and TrackProbabilityCategoryData::withFirstPixel.
{ const reco::Track & track = input.track; // const reco::Jet & jet = input.jet; // const reco::Vertex & pv = input.vertex; const TrackProbabilityCategoryData & d = category.category; //Track Data double p=track.p(); double eta=track.eta(); double nhit=track.numberOfValidHits(); double npix=track.hitPattern().numberOfValidPixelHits(); bool firstPixel=track.hitPattern().hasValidHitInFirstPixelBarrel(); double chi=track.normalizedChi2(); //Chi^2 cut if used bool chicut=(chi >= d.chiMin && chi < d.chiMax ); if(d.chiMin<=0.01 && d.chiMax<=0.01) chicut=true; //First Pixel Hit cut 1=there should be an hit in first layer, -1=there should not be an hit, 0 = I do not care bool fisrtPixelCut = ( (firstPixel && d.withFirstPixel == 1) || (!firstPixel && d.withFirstPixel == -1) || d.withFirstPixel == 0 ); //the AND of everything bool result=( p > d.pMin && p < d.pMax && fabs(eta) > d.etaMin && fabs(eta) < d.etaMax && nhit >= d.nHitsMin && nhit <= d.nHitsMax && npix >= d.nPixelHitsMin && npix <= d.nPixelHitsMax && chicut && fisrtPixelCut ); return result; }