Definition at line 33 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(), edm::HandleBase::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().
43 if ( !tracks.isValid() ) {
44 edm::LogWarning(
"SiPixelPhase1TrackClusters") <<
"track collection is not valid";
52 edm::LogWarning(
"SiPixelPhase1TrackClusters") <<
"pixel cluster collection is not valid";
60 std::vector<bool> ontrack (clusterColl->data().size(),
false);
61 std::vector<float> corr_charge(clusterColl->data().size(), -1.0f);
63 for (
auto const &
track : *tracks) {
65 bool isBpixtrack =
false, isFpixtrack =
false, crossesPixVol=
false;
71 auto const & trajParams =
track.extra()->trajParams();
72 assert(trajParams.size()==
track.recHitsSize());
74 for(
unsigned int h=0;
h<
track.recHitsSize();
h++){
76 if (!
hit->isValid())
continue;
80 uint32_t subdetid = (
id.subdetId());
85 if (!pixhit)
continue;
89 if (clust.isNull())
continue;
90 ontrack[clust.key()] =
true;
94 auto const & ltp = trajParams[
h];
97 float clust_alpha = atan2(localDir.
z(), localDir.
x());
98 float clust_beta = atan2(localDir.
z(), localDir.
y());
99 double corrCharge = clust->charge() *
sqrt( 1.0 / ( 1.0/
pow(
tan(clust_alpha), 2 ) +
100 1.0/
pow(
tan(clust_beta ), 2 ) +
102 corr_charge[clust.key()] = (
float) corrCharge;
107 if (isBpixtrack || isFpixtrack)
115 if (isBpixtrack || isFpixtrack)
123 for (it = clusterColl->begin(); it != clusterColl->end(); ++it) {
124 auto id =
DetId(it->detId());
127 const PixelTopology& topol = geomdetunit->specificTopology();
129 for(
auto subit = it->
begin(); subit != it->
end(); ++subit) {
132 bool is_ontrack = ontrack[
key];
133 float corrected_charge = corr_charge[
key];
137 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