24 : applyBasicCuts_(
cfg.getParameter<
bool>(
"applyBasicCuts")),
25 applyNHighestPt_(
cfg.getParameter<
bool>(
"applyNHighestPt")),
26 applyMultiplicityFilter_(
cfg.getParameter<
bool>(
"applyMultiplicityFilter")),
27 seedOnlyFromAbove_(
cfg.getParameter<
int>(
"seedOnlyFrom")),
28 applyIsolation_(
cfg.getParameter<
bool>(
"applyIsolationCut")),
29 chargeCheck_(
cfg.getParameter<
bool>(
"applyChargeCheck")),
30 nHighestPt_(
cfg.getParameter<
int>(
"nHighestPt")),
31 minMultiplicity_(
cfg.getParameter<
int>(
"minMultiplicity")),
32 maxMultiplicity_(
cfg.getParameter<
int>(
"maxMultiplicity")),
33 multiplicityOnInput_(
cfg.getParameter<
bool>(
"multiplicityOnInput")),
34 ptMin_(
cfg.getParameter<double>(
"ptMin")),
35 ptMax_(
cfg.getParameter<double>(
"ptMax")),
36 etaMin_(
cfg.getParameter<double>(
"etaMin")),
37 etaMax_(
cfg.getParameter<double>(
"etaMax")),
38 phiMin_(
cfg.getParameter<double>(
"phiMin")),
39 phiMax_(
cfg.getParameter<double>(
"phiMax")),
40 nHitMin_(
cfg.getParameter<double>(
"nHitMin")),
41 nHitMax_(
cfg.getParameter<double>(
"nHitMax")),
42 chi2nMax_(
cfg.getParameter<double>(
"chi2nMax")),
43 minHitChargeStrip_(
cfg.getParameter<double>(
"minHitChargeStrip")),
44 minHitIsolation_(
cfg.getParameter<double>(
"minHitIsolation")),
46 matchedrecHitsTag_(
cfg.getParameter<
edm::
InputTag>(
"matchedrecHits")),
47 nHitMin2D_(
cfg.getParameter<unsigned
int>(
"nHitMin2D")),
60 <<
"applying basic track cuts ..." 75 <<
"only retain tracks isolated at least by " <<
minHitIsolation_ <<
" cm from other rechits";
79 <<
"only retain hits with at least " <<
minHitChargeStrip_ <<
" ADC counts of total cluster charge";
127 float pt = trackp->
pt();
128 float eta = trackp->
eta();
129 float phi = trackp->
phi();
151 int nhitinTIB = 0, nhitinTOB = 0, nhitinTID = 0;
152 int nhitinTEC = 0, nhitinBPIX = 0, nhitinFPIX = 0;
153 unsigned int nHit2D = 0;
154 unsigned int thishit = 0;
158 int type =
hit->geographicalId().subdetId();
178 <<
"@SUB=CalibrationTrackSelector::detailedHitsCheck" 179 <<
"DetId.det() != DetId::Tracker (=" <<
DetId::Tracker <<
"), but " <<
detId.det() <<
".";
199 if (nHit2D < nHitMin2D_ && this->
isHit2D(*
hit))
213 if (
hit.dimension() < 2) {
221 if (dynamic_cast<const SiStripRecHit2D *>(&
hit))
223 else if (dynamic_cast<const SiStripMatchedRecHit2D *>(&
hit))
225 else if (dynamic_cast<const ProjectedSiStripRecHit2D *>(&
hit))
228 edm::LogError(
"UnknownType") <<
"@SUB=CalibrationTrackSelector::isHit2D" 229 <<
"Tracker hit not in pixel and neither SiStripRecHit2D nor " 230 <<
"SiStripMatchedRecHit2D nor ProjectedSiStripRecHit2D.";
235 edm::LogWarning(
"DetectorMismatch") <<
"@SUB=CalibrationTrackSelector::isHit2D" 236 <<
"Hit not in tracker with 'official' dimension >=2.";
255 for (
size_t ia = 0; ia < amplitudesmono.size(); ++ia) {
256 charge1 += amplitudesmono[ia];
261 for (
size_t ia = 0; ia < amplitudesstereo.size(); ++ia) {
262 charge2 += amplitudesstereo[ia];
269 for (
size_t ia = 0; ia < amplitudes.size(); ++ia) {
270 charge1 += amplitudes[ia];
274 }
else if (unmatchedhit) {
278 for (
size_t ia = 0; ia < amplitudes.size(); ++ia) {
279 charge1 += amplitudes[ia];
303 for (istripSt = stripcollSt.
data().begin(); istripSt != stripcollSt.
data().end(); ++istripSt) {
314 for (istripStm = stripcollStm.
data().begin(); istripStm != stripcollStm.
data().end(); ++istripStm) {
336 for (Tracks::const_iterator
it = sortedTracks.begin();
it != sortedTracks.end(); ++
it) {
static constexpr auto TEC
Tracks select(const Tracks &tracks, const edm::Event &evt) const
select tracks
const bool multiplicityOnInput_
const edm::EDGetTokenT< SiStripRecHit2DCollection > rphirecHitsToken_
unsigned short numberOfValidHits() const
number of valid hits found
data_type const * data(size_t cell) const
const double minHitChargeStrip_
const bool applyIsolation_
auto const * begin() const
Log< level::Error, false > LogError
const int minMultiplicity_
bool detailedHitsCheck(const reco::Track *track, const edm::Event &evt) const
checking hit requirements beyond simple number of valid hits
Tracks theNHighestPtTracks(const Tracks &tracks) const
filter the n highest pt tracks
ClusterRef cluster() const
bool isHit2D(const TrackingRecHit &hit) const
bool isOkCharge(const TrackingRecHit *therechit) const
double pt() const
track transverse momentum
auto recHits() const
Access to reconstructed hits on the track.
const bool applyMultiplicityFilter_
SiStripCluster const & monoCluster() const
SiStripCluster const & amplitudes() const
double phi() const
azimuthal angle of momentum vector
~CalibrationTrackSelector()
destructor
static constexpr auto TOB
bool isIsolated(const TrackingRecHit *therechit, const edm::Event &evt) const
const double minHitIsolation_
const edm::EDGetTokenT< SiStripMatchedRecHit2DCollection > matchedrecHitsToken_
const int maxMultiplicity_
Log< level::Info, false > LogInfo
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
double eta() const
pseudorapidity of momentum vector
static constexpr auto TIB
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
DetId geographicalId() const
constexpr uint32_t rawId() const
get the raw id
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
const unsigned int nHitMin2D_
SiStripCluster const & stereoCluster() const
std::vector< const reco::Track * > Tracks
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
Tracks basicCuts(const Tracks &tracks, const edm::Event &evt) const
apply basic cuts on pt,eta,phi,nhit
SiStripRecHit2D originalHit() const
LocalPoint localPosition() const override
CalibrationTrackSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
constructor
const bool applyBasicCuts_
const int seedOnlyFromAbove_
Log< level::Warning, false > LogWarning
virtual LocalPoint localPosition() const =0
static constexpr auto TID
const bool applyNHighestPt_