29 iEvent.
getByToken(rpcDigiSimLinkToken, theSimlinkDigis);
34 for (
const auto &&rpcdgIt : (*rpcDigis)) {
35 const RPCDetId &rpcId = rpcdgIt.first;
46 for (
const auto &
cl : cls) {
48 int rawId = rpcId.
rawId();
50 const int firststrip =
cl.firstStrip();
51 const int clustersize =
cl.clusterSize();
52 const int laststrip =
cl.lastStrip();
53 const RPCRoll *roll = rpcGeom->roll(rpcId);
57 const float centreOfCluster = (fstrip + lstrip) / 2;
58 const double y =
cl.hasY() ?
cl.y() : 0;
62 const double angle = topo.stripAngle((firststrip + laststrip) / 2.);
63 const double x = centreOfCluster - y *
std::tan(angle);
72 int rechitstrip = firststrip;
74 if (clustersize > 2) {
76 if (clustersize % 2 == 0)
77 medium = 0.5 * (clustersize);
79 medium = 0.5 * (clustersize - 1);
80 rechitstrip += medium;
82 if (clustersize > MaxClusterSize)
93 if ((global_phi > 15.) && (global_phi <= 16.3)) {
96 }
else if ((global_phi > 16.3) && (global_phi <= 53.)) {
99 }
else if ((global_phi > 53.) && (global_phi <= 75.)) {
104 else if ((global_phi > 75.) && (global_phi <= 76.3)) {
107 }
else if ((global_phi > 76.3) && (global_phi <= 113.)) {
110 }
else if ((global_phi > 113.) && (global_phi <= 135.)) {
116 else if ((global_phi > 135.) && (global_phi <= 136.3)) {
119 }
else if ((global_phi > 136.3) && (global_phi <= 173.)) {
122 }
else if ((global_phi > 173.) && (global_phi <= 180.)) {
127 else if ((global_phi < -165.) && (global_phi >= -180.)) {
132 else if ((global_phi > -165.) && (global_phi <= -163.7)) {
135 }
else if ((global_phi > -163.7) && (global_phi <= -127.)) {
138 }
else if ((global_phi > -127.) && (global_phi <= -105.)) {
143 else if ((global_phi > -105.) && (global_phi <= -103.7)) {
146 }
else if ((global_phi > -103.7) && (global_phi <= -67.)) {
149 }
else if ((global_phi > -67.) && (global_phi <= -45.)) {
154 else if ((global_phi > -45.) && (global_phi <= -43.7)) {
157 }
else if ((global_phi > -43.7) && (global_phi <= -7.)) {
160 }
else if ((global_phi > -7.) && (global_phi <= 15.)) {
165 double EMTFLink1 = 0.;
166 double EMTFLink2 = 0.;
167 std::vector<RecHitProcessor::CppfItem>::iterator cppf1;
168 std::vector<RecHitProcessor::CppfItem>::iterator cppf;
169 for (cppf1 = CppfVec1.begin(); cppf1 != CppfVec1.end(); cppf1++) {
171 if (((*cppf1).rawId == rawId) && ((*cppf1).strip == rechitstrip)) {
172 int old_strip = (*cppf1).strip;
176 if (cppf1 != CppfVec1.begin())
177 before = (*(cppf1 - 2)).
strip;
178 else if (cppf1 == CppfVec1.begin())
179 before = (*cppf1).strip;
180 if (cppf1 != CppfVec1.end())
181 after = (*(cppf1 + 2)).
strip;
182 else if (cppf1 == CppfVec1.end())
183 after = (*cppf1).strip;
186 if (clustersize == 2) {
187 if (firststrip == 1) {
190 else if (before > after)
192 }
else if (firststrip > 1) {
195 else if (before > after)
201 std::shared_ptr<l1t::CPPFDigi> MainVariables1(
new l1t::CPPFDigi(rpcId,
214 std::shared_ptr<l1t::CPPFDigi> MainVariables2(
new l1t::CPPFDigi(rpcId,
228 if ((EMTFsector1 > 0) && (EMTFsector2 == 0)) {
229 cppfDigis.push_back(*MainVariables1.get());
230 }
else if ((EMTFsector1 > 0) && (EMTFsector2 > 0)) {
231 cppfDigis.push_back(*MainVariables1.get());
232 cppfDigis.push_back(*MainVariables2.get());
233 }
else if ((EMTFsector1 == 0) && (EMTFsector2 == 0)) {
240 std::shared_ptr<l1t::CPPFDigi> MainVariables1(
new l1t::CPPFDigi(rpcId,
253 std::shared_ptr<l1t::CPPFDigi> MainVariables2(
new l1t::CPPFDigi(rpcId,
266 if ((EMTFsector1 > 0) && (EMTFsector2 == 0)) {
267 cppfDigis.push_back(*MainVariables1.get());
268 }
else if ((EMTFsector1 > 0) && (EMTFsector2 > 0)) {
269 cppfDigis.push_back(*MainVariables1.get());
270 cppfDigis.push_back(*MainVariables2.get());
271 }
else if ((EMTFsector1 == 0) && (EMTFsector2 == 0)) {
LocalPoint centreOfStrip(int strip) const
Point3DBase< Scalar, LocalTag > LocalPoint
const bool isValid(const Frame &aFrame, const FrameQuality &aQuality, const uint16_t aExpectedPos)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Geom::Phi< T > phi() const
constexpr uint32_t rawId() const
get the raw id
T1 value() const
Explicit access to value in case implicit conversion not OK.
const Plane & surface() const
The nominal surface of the GeomDet.
CPPFClusterContainer doAction(const RPCDigiCollection::Range &digiRange)
const uint16_t range(const Frame &aFrame)
Geom::Theta< T > theta() const
std::set< CPPFCluster > CPPFClusterContainer
if(conf_.getParameter< bool >("UseStripCablingDB"))
Tan< T >::type tan(const T &t)
std::pair< const_iterator, const_iterator > Range
std::bitset< maskCPPFSIZE > CPPFRollMask
const Topology & topology() const override
double rad_to_deg(double rad)
CPPFClusterContainer doAction(const RPCDetId &id, CPPFClusterContainer &initClusters, const CPPFRollMask &mask) const
T angle(T x1, T y1, T z1, T x2, T y2, T z2)
int region() const
Region id: 0 for Barrel, +/-1 For +/- Endcap.