52 std::vector<bool> ontrack (clusterColl->data().size(),
false);
53 std::vector<float> corr_charge(clusterColl->data().size(), -1.0f);
55 for (
auto const &
track : *tracks) {
57 auto const & trajParams =
track.extra()->trajParams();
58 assert(trajParams.size()==
track.recHitsSize());
60 for(
unsigned int h=0;
h<
track.recHitsSize();
h++){
62 if (!
hit->isValid())
continue;
66 uint32_t subdetid = (
id.subdetId());
69 if (!pixhit)
continue;
73 if (clust.isNull())
continue;
74 ontrack[clust.key()] =
true;
78 auto const & ltp = trajParams[
h];
81 float clust_alpha = atan2(localDir.
z(), localDir.
x());
82 float clust_beta = atan2(localDir.
z(), localDir.
y());
83 double corrCharge = clust->charge()/1000. *
sqrt( 1.0 / ( 1.0/
pow(
tan(clust_alpha), 2 ) +
84 1.0/
pow(
tan(clust_beta ), 2 ) +
86 corr_charge[clust.key()] = (
float) corrCharge;
90 for (it = clusterColl->begin(); it != clusterColl->end(); ++it) {
91 auto id =
DetId(it->detId());
93 for(
auto subit = it->
begin(); subit != it->
end(); ++subit) {
96 float corrected_charge = corr_charge[
key];
99 histo[
CHARGE].fill(
double(corrected_charge),
id, &iEvent);
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
void analyze(const edm::Event &, const edm::EventSetup &)
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
SiPixelPhase1TrackClustersV(const edm::ParameterSet &conf)
#define DEFINE_FWK_MODULE(type)
Tan< T >::type tan(const T &t)
edm::EDGetTokenT< reco::TrackCollection > tracksToken_
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