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;
59 double d0 = track.d0(), dz = track.dz();
62 auto const & trajParams = track.extra()->trajParams();
63 assert(trajParams.size()==track.recHitsSize());
64 auto hb = track.recHitsBegin();
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);
T getParameter(std::string const &) const
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
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
edm::EDGetTokenT< reco::TrackCollection > tracksToken_
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
Geom::Phi< T > phi() const
SiPixelPhase1TrackClusters(const edm::ParameterSet &conf)
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
void analyze(const edm::Event &, const edm::EventSetup &)
Tan< T >::type tan(const T &t)
Abs< T >::type abs(const T &t)
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
ClusterRef cluster() const
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