28 iEvent.getByToken(rpcDigiToken, rpcDigis);
31 iEvent.getByToken(rpcDigiSimLinkToken, theSimlinkDigis);
33 const auto &rpcGeom = iSetup.
getData(rpcGeomToken);
35 for (
const auto &&rpcdgIt : (*rpcDigis)) {
36 const RPCDetId &rpcId = rpcdgIt.first;
47 for (
const auto &
cl : cls) {
51 const int firststrip =
cl.firstStrip();
52 const int clustersize =
cl.clusterSize();
53 const int laststrip =
cl.lastStrip();
56 const float fstrip = (
roll->centreOfStrip(firststrip)).
x();
57 const float lstrip = (
roll->centreOfStrip(laststrip)).
x();
58 const float centreOfCluster = (fstrip + lstrip) / 2;
59 const double y =
cl.hasY() ?
cl.y() : 0;
61 if (
roll->id().region() != 0) {
63 const double angle = topo.stripAngle((firststrip + laststrip) / 2.);
73 int rechitstrip = firststrip;
75 if (clustersize > 2) {
77 if (clustersize % 2 == 0)
78 medium = 0.5 * (clustersize);
80 medium = 0.5 * (clustersize - 1);
81 rechitstrip += medium;
94 if ((global_phi > 15.) && (global_phi <= 16.3)) {
97 }
else if ((global_phi > 16.3) && (global_phi <= 53.)) {
100 }
else if ((global_phi > 53.) && (global_phi <= 75.)) {
105 else if ((global_phi > 75.) && (global_phi <= 76.3)) {
108 }
else if ((global_phi > 76.3) && (global_phi <= 113.)) {
111 }
else if ((global_phi > 113.) && (global_phi <= 135.)) {
117 else if ((global_phi > 135.) && (global_phi <= 136.3)) {
120 }
else if ((global_phi > 136.3) && (global_phi <= 173.)) {
123 }
else if ((global_phi > 173.) && (global_phi <= 180.)) {
128 else if ((global_phi < -165.) && (global_phi >= -180.)) {
133 else if ((global_phi > -165.) && (global_phi <= -163.7)) {
136 }
else if ((global_phi > -163.7) && (global_phi <= -127.)) {
139 }
else if ((global_phi > -127.) && (global_phi <= -105.)) {
144 else if ((global_phi > -105.) && (global_phi <= -103.7)) {
147 }
else if ((global_phi > -103.7) && (global_phi <= -67.)) {
150 }
else if ((global_phi > -67.) && (global_phi <= -45.)) {
155 else if ((global_phi > -45.) && (global_phi <= -43.7)) {
158 }
else if ((global_phi > -43.7) && (global_phi <= -7.)) {
161 }
else if ((global_phi > -7.) && (global_phi <= 15.)) {
166 double EMTFLink1 = 0.;
167 double EMTFLink2 = 0.;
168 std::vector<RecHitProcessor::CppfItem>::iterator cppf1;
169 std::vector<RecHitProcessor::CppfItem>::iterator cppf;
170 for (cppf1 = CppfVec1.begin(); cppf1 != CppfVec1.end(); cppf1++) {
172 if (((*cppf1).rawId ==
rawId) && ((*cppf1).strip == rechitstrip)) {
173 int old_strip = (*cppf1).strip;
177 if (cppf1 != CppfVec1.begin())
178 before = (*(cppf1 - 2)).
strip;
179 else if (cppf1 == CppfVec1.begin())
180 before = (*cppf1).strip;
181 if (cppf1 != CppfVec1.end())
182 after = (*(cppf1 + 2)).
strip;
183 else if (cppf1 == CppfVec1.end())
184 after = (*cppf1).strip;
187 if (clustersize == 2) {
188 if (firststrip == 1) {
191 else if (before > after)
193 }
else if (firststrip > 1) {
196 else if (before > after)
202 std::shared_ptr<l1t::CPPFDigi> MainVariables1(
new l1t::CPPFDigi(rpcId,
215 std::shared_ptr<l1t::CPPFDigi> MainVariables2(
new l1t::CPPFDigi(rpcId,
229 if ((EMTFsector1 > 0) && (EMTFsector2 == 0)) {
230 cppfDigis.push_back(*MainVariables1.get());
231 }
else if ((EMTFsector1 > 0) && (EMTFsector2 > 0)) {
232 cppfDigis.push_back(*MainVariables1.get());
233 cppfDigis.push_back(*MainVariables2.get());
234 }
else if ((EMTFsector1 == 0) && (EMTFsector2 == 0)) {
241 std::shared_ptr<l1t::CPPFDigi> MainVariables1(
new l1t::CPPFDigi(rpcId,
254 std::shared_ptr<l1t::CPPFDigi> MainVariables2(
new l1t::CPPFDigi(rpcId,
267 if ((EMTFsector1 > 0) && (EMTFsector2 == 0)) {
268 cppfDigis.push_back(*MainVariables1.get());
269 }
else if ((EMTFsector1 > 0) && (EMTFsector2 > 0)) {
270 cppfDigis.push_back(*MainVariables1.get());
271 cppfDigis.push_back(*MainVariables2.get());
272 }
else if ((EMTFsector1 == 0) && (EMTFsector2 == 0)) {
Point3DBase< Scalar, LocalTag > LocalPoint
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
Geom::Phi< T > phi() const
CPPFClusterContainer doAction(const RPCDigiCollection::Range &digiRange)
std::set< CPPFCluster > CPPFClusterContainer
Tan< T >::type tan(const T &t)
CPPFClusterContainer doAction(const RPCDetId &id, CPPFClusterContainer &initClusters, const CPPFRollMask &mask) const
constexpr uint32_t rawId() const
get the raw id
std::pair< const_iterator, const_iterator > Range
std::bitset< maskCPPFSIZE > CPPFRollMask
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.
double rad_to_deg(double rad)
T1 value() const
Explicit access to value in case implicit conversion not OK.
if(threadIdxLocalY==0 &&threadIdxLocalX==0)
Geom::Theta< T > theta() const
T angle(T x1, T y1, T z1, T x2, T y2, T z2)