|
|
Go to the documentation of this file.
26 : applyBasicCuts_(
cfg.getParameter<
bool>(
"applyBasicCuts")),
27 applyNHighestPt_(
cfg.getParameter<
bool>(
"applyNHighestPt")),
28 applyMultiplicityFilter_(
cfg.getParameter<
bool>(
"applyMultiplicityFilter")),
29 seedOnlyFromAbove_(
cfg.getParameter<
int>(
"seedOnlyFrom")),
30 applyIsolation_(
cfg.getParameter<
bool>(
"applyIsolationCut")),
31 chargeCheck_(
cfg.getParameter<
bool>(
"applyChargeCheck")),
32 nHighestPt_(
cfg.getParameter<
int>(
"nHighestPt")),
33 minMultiplicity_(
cfg.getParameter<
int>(
"minMultiplicity")),
34 maxMultiplicity_(
cfg.getParameter<
int>(
"maxMultiplicity")),
35 multiplicityOnInput_(
cfg.getParameter<
bool>(
"multiplicityOnInput")),
36 ptMin_(
cfg.getParameter<double>(
"ptMin")),
37 ptMax_(
cfg.getParameter<double>(
"ptMax")),
38 etaMin_(
cfg.getParameter<double>(
"etaMin")),
39 etaMax_(
cfg.getParameter<double>(
"etaMax")),
40 phiMin_(
cfg.getParameter<double>(
"phiMin")),
41 phiMax_(
cfg.getParameter<double>(
"phiMax")),
42 nHitMin_(
cfg.getParameter<double>(
"nHitMin")),
43 nHitMax_(
cfg.getParameter<double>(
"nHitMax")),
44 chi2nMax_(
cfg.getParameter<double>(
"chi2nMax")),
45 minHitChargeStrip_(
cfg.getParameter<double>(
"minHitChargeStrip")),
46 minHitIsolation_(
cfg.getParameter<double>(
"minHitIsolation")),
48 matchedrecHitsTag_(
cfg.getParameter<
edm::
InputTag>(
"matchedrecHits")),
49 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";
128 for (Tracks::const_iterator it =
tracks.begin(); it !=
tracks.end(); ++it) {
130 float pt = trackp->
pt();
131 float eta = trackp->
eta();
132 float phi = trackp->
phi();
157 int nhitinTIB = 0, nhitinTOB = 0, nhitinTID = 0;
158 int nhitinTEC = 0, nhitinBPIX = 0, nhitinFPIX = 0;
159 unsigned int nHit2D = 0;
160 unsigned int thishit = 0;
164 int type =
hit->geographicalId().subdetId();
181 const DetId detId(
hit->geographicalId());
184 <<
"@SUB=CalibrationTrackSelector::detailedHitsCheck"
185 <<
"DetId.det() != DetId::Tracker (=" <<
DetId::Tracker <<
"), but " << detId.det() <<
".";
199 else if (
kBPIX == detId.subdetId())
201 else if (
kFPIX == detId.subdetId())
205 if (nHit2D < nHitMin2D_ && this->
isHit2D(*
hit))
219 if (
hit.dimension() < 2) {
222 const DetId detId(
hit.geographicalId());
224 if (detId.subdetId() ==
kBPIX || detId.subdetId() ==
kFPIX) {
227 if (dynamic_cast<const SiStripRecHit2D *>(&
hit))
229 else if (dynamic_cast<const SiStripMatchedRecHit2D *>(&
hit))
231 else if (dynamic_cast<const ProjectedSiStripRecHit2D *>(&
hit))
234 edm::LogError(
"UnkownType") <<
"@SUB=CalibrationTrackSelector::isHit2D"
235 <<
"Tracker hit not in pixel and neither SiStripRecHit2D nor "
236 <<
"SiStripMatchedRecHit2D nor ProjectedSiStripRecHit2D.";
241 edm::LogWarning(
"DetectorMismatch") <<
"@SUB=CalibrationTrackSelector::isHit2D"
242 <<
"Hit not in tracker with 'official' dimension >=2.";
261 for (
size_t ia = 0; ia < amplitudesmono.size(); ++ia) {
262 charge1 += amplitudesmono[ia];
267 for (
size_t ia = 0; ia < amplitudesstereo.size(); ++ia) {
268 charge2 += amplitudesstereo[ia];
277 for (
size_t ia = 0; ia < amplitudes.size(); ++ia) {
278 charge1 += amplitudes[ia];
283 }
else if (unmatchedhit) {
287 for (
size_t ia = 0; ia < amplitudes.size(); ++ia) {
288 charge1 += amplitudes[ia];
317 for (istripSt = stripcollSt.
data().begin(); istripSt != stripcollSt.
data().end(); ++istripSt) {
329 for (istripStm = stripcollStm.
data().begin(); istripStm != stripcollStm.
data().end(); ++istripStm) {
348 std::sort(sortedTracks.begin(), sortedTracks.end(),
ptComparator);
352 for (Tracks::const_iterator it = sortedTracks.begin(); it != sortedTracks.end(); ++it) {
const edm::InputTag matchedrecHitsTag_
const bool applyIsolation_
uint8_t const * begin() const
ClusterRef cluster() const
Tracks basicCuts(const Tracks &tracks, const edm::Event &evt) const
apply basic cuts on pt,eta,phi,nhit
SiStripCluster const & stereoCluster() const
CalibrationTrackSelector(const edm::ParameterSet &cfg)
constructor
const bool applyMultiplicityFilter_
const int seedOnlyFromAbove_
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const edm::InputTag rphirecHitsTag_
bool isIsolated(const TrackingRecHit *therechit, const edm::Event &evt) const
Log< level::Info, false > LogInfo
virtual LocalPoint localPosition() const =0
unsigned short numberOfValidHits() const
number of valid hits found
bool detailedHitsCheck(const reco::Track *track, const edm::Event &evt) const
checking hit requirements beyond simple number of valid hits
Log< level::Warning, false > LogWarning
Tracks theNHighestPtTracks(const Tracks &tracks) const
filter the n highest pt tracks
DetId geographicalId() const
const bool applyNHighestPt_
double pt() const
track transverse momentum
const unsigned int nHitMin2D_
bool isHit2D(const TrackingRecHit &hit) const
SiStripRecHit2D originalHit() const
auto recHits() const
Access to reconstructed hits on the track.
static constexpr auto TIB
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
double phi() const
azimuthal angle of momentum vector
uint8_t const * end() const
const bool applyBasicCuts_
double eta() const
pseudorapidity of momentum vector
std::vector< const reco::Track * > Tracks
double normalizedChi2() const
chi-squared divided by n.d.o.f. (or chi-squared * 1e6 if n.d.o.f. is zero)
Log< level::Error, false > LogError
SiStripCluster const & amplitudes() const
bool isOkCharge(const TrackingRecHit *therechit) const
const int maxMultiplicity_
const double minHitIsolation_
Tracks select(const Tracks &tracks, const edm::Event &evt) const
select tracks
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
constexpr uint32_t rawId() const
get the raw id
LocalPoint localPosition() const override
static constexpr auto TEC
data_type const * data(size_t cell) const
SiStripCluster const & monoCluster() const
static constexpr auto TOB
const double minHitChargeStrip_
const bool multiplicityOnInput_
~CalibrationTrackSelector()
destructor
const int minMultiplicity_
static constexpr auto TID