61 int chamberid =
detid.superChamberId() % 2;
66 std::vector<int> rolls;
68 if (
std::find(rolls.begin(), rolls.end(), rechit.gemId().roll()) == rolls.end())
69 rolls.push_back(rechit.gemId().roll());
71 if (rolls.size() > 2
or rolls.empty())
72 LogTrace(
"L1ME0Trigger") <<
" ME0 segment is crossing " << rolls.size() <<
" roll !!! \n";
77 LogTrace(
"L1ME0Trigger") <<
" ME0 segment has wrong roll number " << rolls[0] <<
" which should be >= 1 \n !!!";
81 if (rolls.size() == 2 and rolls[0] > rolls[1])
83 else if (rolls.size() == 2 and rolls[0] < rolls[1])
86 if (partition < 0 or partition >= 2 * totRolls) {
87 LogTrace(
"L1ME0Trigger") <<
" ME0 segment rolls size of all hits " << rolls.size() <<
" rolls[0] " << rolls[0]
88 <<
" rolls.back() " << rolls.back() <<
" and ME0 trigger roll is " <<
partition 89 <<
" max expected " << 2 * totRolls - 1 <<
"\n";
97 float strippitch = etapart->
localPitch(segment_lp);
99 int totstrip = etapart->
nstrips();
100 int istrip =
static_cast<int>(
strip);
101 int phiposition = istrip;
102 if (phiposition > totstrip)
103 LogTrace(
"L1ME0Trigger") <<
" ME0 segment strip number is " << phiposition <<
" larger than nstrip " << totstrip
106 int phiposition2 = (
static_cast<int>((
strip - phiposition) / phi_resolution) & 1);
107 phiposition = (phiposition << 1) | phiposition2;
110 float centreOfStrip = istrip + 0.25 + phiposition2 * 0.5;
113 float strippitch_rad = strippitch /
gp.perp();
115 int idphi =
static_cast<int>(fabs(dphi) / (strippitch_rad *
dphiresolution_));
116 const int max_idphi = 512;
117 if (idphi >= max_idphi) {
118 LogTrace(
"L1ME0Trigger") <<
" ME0 segment dphi " << dphi <<
" and int type: " << idphi
119 <<
" larger than max allowed: " << max_idphi <<
" !!! \n";
120 idphi = max_idphi - 1;
125 int bend = (dphi > 0.0) ? 0 : 1;
127 LogTrace(
"L1ME0Trigger") <<
" ME0trigger in conversion function:\n" 128 <<
"\t chamber(1-18) " <<
detid.chamber() <<
" chamber id " << chamberid <<
" \n" 129 <<
"\t rolls size of all hits " << rolls.size() <<
" rolls[0] " << rolls[0]
130 <<
" rolls.back() " << rolls.back() <<
" roll " <<
partition <<
" \n" 131 <<
"\t nRechits " << nrechits <<
" quality " <<
quality <<
" \n" 132 <<
"\t strip(float) " <<
strip <<
" (int) " << istrip <<
" phiposition " << phiposition
133 <<
" resolution (in term of strip) " << phi_resolution <<
" \n" 134 <<
"\t deltaphi(float) " << dphi <<
" (int) " << idphi <<
" resolution " 136 <<
"\t global point eta " <<
gp.eta() <<
" phi " <<
gp.phi() <<
" trigger digi eta " 137 << gp_digi.
eta() <<
" phi " << gp_digi.
phi() <<
" \n"
LocalPoint localPosition() const override
const GEMEtaPartition * etaPartition(GEMDetId id) const
Return the eta partition corresponding to the given id.
LocalVector localDirection() const override
Local direction.
Geom::Phi< T > phi() const
const GeomDet * idToDet(DetId) const override
int nEtaPartitions() const
Retunr numbers of eta partitions.
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
LocalPoint toLocal(const GlobalPoint &gp) const
static const int ME0TriggerCentralBX
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventID const &, edm::Timestamp const & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
const std::vector< GEMRecHit > & specificRecHits() const
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
const GEMGeometry * me0_g
const Plane & surface() const
The nominal surface of the GeomDet.
GEMDetId gemDetId() const
static const unsigned int ME0KeyLayer
const GEMSuperChamber * superChamber(GEMDetId id) const