Definition at line 13 of file Stub.cc.
References funct::abs(), trackerDTC::Setup::baseBend(), trackerDTC::Setup::baseCol(), trackerDTC::Setup::basePhi(), trackerDTC::Setup::baseR(), trackerDTC::Setup::baseRow(), trackerDTC::Setup::baseZ(), trackerDTC::Setup::beamWindowZ(), bend_, trackerDTC::Setup::bendCut(), c, c_, trackerDTC::Setup::chosenRofPhi(), trackerDTC::Setup::chosenRofZ(), col_, trackerDTC::SensorModule::cos(), cot_, d_, digi(), trackerDTC::SensorModule::Disk2S, HLT_FULL_cff::distance, runTauDisplay::dr, trackerDTC::Setup::dtcBaseM(), trackerDTC::Setup::dtcBaseQoverPt(), trackerDTC::Setup::dtcNumMergedRows(), trackerDTC::Setup::dtcWidthRowLUT(), trackerDTC::SensorModule::encodedR(), trackerDTC::Setup::encodingBend(), spr::find(), hybrid_, trackerDTC::Setup::hybridBaseR(), trackerDTC::Setup::hybridChosenRofPhi(), trackerDTC::Setup::hybridMaxCot(), trackerDTC::Setup::hybridMinPt(), trackerDTC::Setup::invPtToDphi(), visualization-live-secondInstance_cfg::m, m_, SiStripPI::max, trackerDTC::Setup::maxZT(), min(), HLT_FULL_cff::minPt, trackerDTC::Setup::minPt(), trackerDTC::SensorModule::numColumns(), trackerDTC::Setup::numOverlappingRegions(), trackerDTC::SensorModule::numRows(), trackerDTC::SensorModule::offsetR(), trackerDTC::SensorModule::offsetZ(), trackerDTC::SensorModule::phi(), phi_, phiT_, trackerDTC::SensorModule::pitchCol(), trackerDTC::SensorModule::pitchRow(), funct::pow(), trackerDTC::SensorModule::psModule(), qOverPt_, trackerDTC::SensorModule::r(), r_, regions_, row_, rowLUT_, rowSub_, trackerDTC::SensorModule::sep(), trackerDTC::SensorModule::side(), trackerDTC::SensorModule::signBend(), trackerDTC::SensorModule::signCol(), trackerDTC::SensorModule::signRow(), trackerDTC::SensorModule::sin(), mathSSE::sqrt(), edm::swap(), trackerDTC::SensorModule::type(), valid_, trackerDTC::Setup::widthRow(), trackerDTC::SensorModule::windowSize(), PV2DBase< T, PVType, FrameType >::x(), PV2DBase< T, PVType, FrameType >::y(), trackerDTC::SensorModule::z(), and z_.
17 const MeasurementPoint& mp = ttStubRef->clusterRef(0)->findAverageLocalCoordinatesCentered();
22 col_ = (int)floor(
pow(-1, sm->signCol()) * (mp.
y() - sm->numColumns() / 2) /
setup.baseCol());
24 row_ = (int)floor(
pow(-1, sm->signRow()) * (mp.
x() - sm->numRows() / 2) /
setup.baseRow());
26 bend_ = (int)floor(
pow(-1, sm->signBend()) * (ttStubRef->bendBE()) /
setup.baseBend());
34 const double y = (
col_ + .5) *
setup.baseCol() * sm->pitchCol();
36 d_ = sm->r() + y * sm->sin();
40 const double x0 =
rowLUT_ *
setup.baseRow() *
setup.dtcNumMergedRows() * sm->pitchRow();
41 const double x1 = (
rowLUT_ + 1) *
setup.baseRow() *
setup.dtcNumMergedRows() * sm->pitchRow();
42 const double x = (
rowLUT_ + .5) *
setup.baseRow() *
setup.dtcNumMergedRows() * sm->pitchRow();
46 const double phi0 = sm->phi() + atan2(x0,
d_);
47 const double phi1 = sm->phi() + atan2(x1,
d_);
48 const double c = (phi0 + phi1) / 2.;
49 const double m = (phi1 - phi0) /
setup.dtcNumMergedRows();
62 const double zT =
setup.chosenRofZ() *
z_ /
r_;
64 const double dZT =
setup.beamWindowZ() *
abs(1. -
setup.chosenRofZ() /
r_);
65 double zTMin = zT - dZT;
66 double zTMax = zT + dZT;
67 if (zTMin >=
setup.maxZT() || zTMax < -
setup.maxZT())
79 static const double chosenRofPhi =
hybrid_ ?
setup.hybridChosenRofPhi() :
setup.chosenRofPhi();
83 const double dr = sm->sep() / (sm->cos() - sm->sin() *
z_ /
d_);
85 const double qOverPtOverBend = sm->pitchRow() / dr /
d_;
87 const double qOverPt =
bend_ *
setup.baseBend() * qOverPtOverBend;
89 const double dQoverPt =
setup.bendCut() * qOverPtOverBend;
91 const double maxQoverPt =
setup.invPtToDphi() / minPt -
setup.dtcBaseQoverPt() / 2.;
92 double qOverPtMin =
digi(qOverPt - dQoverPt,
setup.dtcBaseQoverPt());
93 double qOverPtMax =
digi(qOverPt + dQoverPt,
setup.dtcBaseQoverPt());
94 if (qOverPtMin >= maxQoverPt || qOverPtMax < -maxQoverPt)
98 qOverPtMin =
max(qOverPtMin, -maxQoverPt);
99 qOverPtMax =
min(qOverPtMax, maxQoverPt);
102 qOverPt_ = {qOverPtMin, qOverPtMax};
113 if (
phiT_.first < 0.)
115 if (
phiT_.second >= 0.)
123 r_ -= sm->offsetR() - chosenRofPhi;
128 r_ = sm->encodedR() + (sm->side() ? -
col_ : (
col_ + sm->numColumns() / 2));
129 r_ = (
r_ + 0.5) *
setup.hybridBaseR(sm->type());
133 const vector<double>& encodingBend =
setup.encodingBend(sm->windowSize(), sm->psModule());
134 const auto pos =
find(encodingBend.begin(), encodingBend.end(),
abs(ttStubRef->bendBE()));
135 const int uBend =
distance(encodingBend.begin(), pos);
136 bend_ =
pow(-1, signbit(bend_)) * uBend;
const edm::EventSetup & c
double digi(double value, double precision) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< int > regions_
void swap(Association< C > &lhs, Association< C > &rhs)
Abs< T >::type abs(const T &t)
std::pair< double, double > phiT_
std::pair< double, double > qOverPt_
T getParameter(std::string const &) const
std::pair< double, double > cot_
Power< A, B >::type pow(const A &a, const B &b)