Definition at line 32 of file SiPixelPhase1TrackClusters.cc.
References funct::abs(), edmNew::DetSetVector< T >::begin(), SiPixelCluster::charge(), SiPixelRecHit::cluster(), clustersToken_, allConversions_cfi::d0, DEFINE_FWK_MODULE, allConversions_cfi::dz, edmNew::DetSetVector< T >::end(), objects.autophobj::float, edm::EventSetup::get(), edm::Event::getByToken(), h, hcalSimParameters_cfi::hb, HistogramManagerHolder::histo, hcalTTPDigis_cfi::id, TrackerGeometry::idToDet(), iEvent, edm::ESHandleBase::isValid(), crabWrapper::key, Topology::localPosition(), PV3DBase< T, PVType, FrameType >::mag(), edmNew::makeRefTo(), NTRACKS, NTRACKS_VOLUME, OFFTRACK_CHARGE, OFFTRACK_NCLUSTERS, OFFTRACK_POSITION_B, OFFTRACK_POSITION_F, OFFTRACK_SIZE, ONTRACK_CHARGE, ONTRACK_NCLUSTERS, ONTRACK_POSITION_B, ONTRACK_POSITION_F, ONTRACK_SIZE, PV3DBase< T, PVType, FrameType >::phi(), PixelSubdetector::PixelBarrel, PixelSubdetector::PixelEndcap, funct::pow(), SiPixelCluster::size(), mathSSE::sqrt(), funct::tan(), HiIsolationCommonParameters_cff::track, mixOne_simraw_on_sim_cfi::tracker, l1t::tracks, tracksToken_, PV3DBase< T, PVType, FrameType >::x(), SiPixelCluster::x(), PV3DBase< T, PVType, FrameType >::y(), SiPixelCluster::y(), and PV3DBase< T, PVType, FrameType >::z().
51 std::vector<bool> ontrack (clusterColl->data().size(),
false);
52 std::vector<float> corr_charge(clusterColl->data().size(), -1.0f);
54 for (
auto const &
track : *tracks) {
56 bool isBpixtrack =
false, isFpixtrack =
false, crossesPixVol=
false;
62 auto const & trajParams =
track.extra()->trajParams();
63 assert(trajParams.size()==
track.recHitsSize());
65 for(
unsigned int h=0;
h<
track.recHitsSize();
h++){
67 if (!
hit->isValid())
continue;
71 uint32_t subdetid = (
id.subdetId());
76 if (!pixhit)
continue;
80 if (clust.isNull())
continue;
81 ontrack[clust.key()] =
true;
85 auto const & ltp = trajParams[
h];
88 float clust_alpha = atan2(localDir.
z(), localDir.
x());
89 float clust_beta = atan2(localDir.
z(), localDir.
y());
90 double corrCharge = clust->charge() *
sqrt( 1.0 / ( 1.0/
pow(
tan(clust_alpha), 2 ) +
91 1.0/
pow(
tan(clust_beta ), 2 ) +
93 corr_charge[clust.key()] = (
float) corrCharge;
98 if (isBpixtrack || isFpixtrack)
106 if (isBpixtrack || isFpixtrack)
114 for (it = clusterColl->begin(); it != clusterColl->end(); ++it) {
115 auto id =
DetId(it->detId());
118 const PixelTopology& topol = geomdetunit->specificTopology();
120 for(
auto subit = it->
begin(); subit != it->
end(); ++subit) {
123 bool is_ontrack = ontrack[
key];
124 float corrected_charge = corr_charge[
key];
128 GlobalPoint clustgp = geomdetunit->surface().toGlobal(clustlp);
edm::Ref< typename HandleT::element_type, typename HandleT::element_type::value_type::value_type > makeRefTo(const HandleT &iHandle, typename HandleT::element_type::value_type::const_iterator itIter)
boost::transform_iterator< IterHelp, const_IdIter > const_iterator
const_iterator end(bool update=false) const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
edm::EDGetTokenT< reco::TrackCollection > tracksToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Geom::Phi< T > phi() const
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
ClusterRef cluster() const
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
std::vector< HistogramManager > histo
Pixel cluster – collection of neighboring pixels above threshold.
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > clustersToken_
Power< A, B >::type pow(const A &a, const B &b)
const_iterator begin(bool update=false) const
const TrackerGeomDet * idToDet(DetId) const