14 int clusCharge=accumulate( cluster->amplitudes().begin(), cluster->amplitudes().end(), uint16_t(0));
15 return (clusCharge>chargeCut);
18 bool Chi2ChargeMeasurementEstimator::checkCharge(
const TrackingRecHit& aRecHit,
19 int subdet,
float chargeCut)
const
21 auto const &
hit = aRecHit.
hit();
24 const SiStripMatchedRecHit2D *matchHit =
static_cast<const SiStripMatchedRecHit2D *
>(
hit);
25 if likely(matchHit!=0)
return (checkClusterCharge(matchHit->monoClusterRef().cluster_strip(), chargeCut)
26 &&checkClusterCharge(matchHit->stereoClusterRef().cluster_strip(), chargeCut));
28 const std::type_info &
type =
typeid(aRecHit);
29 throw cms::Exception(
"Unknown RecHit Type") <<
"checkCharge/SiStripMatchedRecHit2D: Wrong recHit type: " << type.name();
34 if (!clus.isPixel())
return checkClusterCharge(clus.cluster_strip(), chargeCut);
35 else return (clus.cluster_pixel()->charge()>chargeCut);
41 float Chi2ChargeMeasurementEstimator::sensorThickness (
const DetId&
detid)
const
50 }
else if (detid.
subdetId()==1)
return 0.0285;
55 std::pair<bool,double>
62 if ( !estimateResult.first || (!(cutOnStripCharge_||cutOnPixelCharge_)) ||
67 if((detid.
det()==1) && (((subdet>2)&&cutOnStripCharge_) || ((subdet<3)&&cutOnPixelCharge_))) {
71 float chargeCut = (float) minGoodCharge(subdet) * sensorThickness(detid)*(
sqrt(1. + theDxdz*theDxdz + theDydz*theDydz));
73 if (!checkCharge(aRecHit, subdet, chargeCut))
return HitReturnType(
false,0.);
74 else return estimateResult;
77 return estimateResult;
const LocalTrajectoryParameters & localParameters() const
int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
unsigned int getRTTI() const
Detector identifier class for the strip tracker.
virtual TrackingRecHit const * hit() const
virtual OmniClusterRef const & firstClusterRef() const =0
return(e1-e2)*(e1-e2)+dp *dp
GlobalVector globalMomentum() const
virtual std::pair< bool, double > estimate(const TrajectoryStateOnSurface &, const TrackingRecHit &) const
DetId geographicalId() const
ModuleGeometry moduleGeometry() const
Detector det() const
get the detector field from this detid