60 int chamberid = detid.chamber() % 2;
64 int sign_time = (
time > 0) ? 1 : -1;
66 std::vector<int> rolls;
68 if (
std::find(rolls.begin(), rolls.end(), rechit.me0Id().roll()) == rolls.end())
69 rolls.push_back(rechit.me0Id().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 !!!";
80 if (rolls.size() == 2 and rolls[0] > rolls[1])
82 else if (rolls.size() == 2 and rolls[0] < rolls[1])
85 if (partition < 0 or partition >= 2 * totRolls) {
86 LogTrace(
"L1ME0Trigger") <<
" ME0 segment rolls size of all hits " << rolls.size() <<
" rolls[0] " << rolls[0]
87 <<
" rolls.back() " << rolls.back() <<
" and ME0 trigger roll is " <<
partition 88 <<
" max expected " << 2 * totRolls - 1 <<
"\n";
96 float strippitch = etapart->
localPitch(segment_lp);
98 int totstrip = etapart->
nstrips();
99 int istrip =
static_cast<int>(
strip);
100 int phiposition = istrip;
101 if (phiposition > totstrip)
102 LogTrace(
"L1ME0Trigger") <<
" ME0 segment strip number is " << phiposition <<
" larger than nstrip " << totstrip
104 float phi_resolution = 0.5;
105 int phiposition2 = (
static_cast<int>((
strip - phiposition) / phi_resolution) & 1);
106 phiposition = (phiposition << 1) | phiposition2;
109 float centreOfStrip = istrip + 0.25 + phiposition2 * 0.5;
112 float strippitch_rad = strippitch /
gp.perp();
114 int idphi =
static_cast<int>(fabs(dphi) / (strippitch_rad *
dphiresolution_));
115 const int max_idphi = 512;
116 if (idphi >= max_idphi) {
117 LogTrace(
"L1ME0Trigger") <<
" ME0 segment dphi " << dphi <<
" and int type: " << idphi
118 <<
" larger than max allowed: " << max_idphi <<
" !!! \n";
119 idphi = max_idphi - 1;
123 int bend = (dphi > 0.0) ? 0 : 1;
125 LogTrace(
"L1ME0Trigger") <<
" ME0trigger in conversion function:\n" 126 <<
"\t chamber(1-18) " << detid.chamber() <<
" chamber id " << chamberid <<
" \n" 127 <<
"\t rolls size of all hits " << rolls.size() <<
" rolls[0] " << rolls[0]
128 <<
" rolls.back() " << rolls.back() <<
" roll " <<
partition <<
" \n" 129 <<
"\t nRechits " << nrechits <<
" quality " <<
quality <<
" \n" 130 <<
"\t strip(float) " <<
strip <<
" (int) " << istrip <<
" phiposition " << phiposition
131 <<
" resolution (in term of strip) " << phi_resolution <<
" \n" 132 <<
"\t deltaphi(float) " << dphi <<
" (int) " << idphi <<
" resolution " 134 <<
"\t global point eta " <<
gp.eta() <<
" phi " <<
gp.phi() <<
" trigger digi eta " 135 << gp_digi.
eta() <<
" phi " << gp_digi.
phi() <<
" \n" 136 <<
"\t time (ns, float) " <<
time <<
" BX " <<
BX <<
" \n";
const ME0Layer * layer(ME0DetId id) const
Return the layer corresponding to the given id.
LocalPoint localPosition() const override
Geom::Phi< T > phi() const
ME0DetId me0DetId() const
const std::vector< ME0RecHit > & specificRecHits() const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
LocalPoint toLocal(const GlobalPoint &gp) const
const GeomDet * idToDet(DetId) const override
static const int ME0TriggerCentralBX
const ME0Chamber * chamber(ME0DetId id) const
Return a chamber given its id.
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
LocalPoint centreOfStrip(int strip) const
GlobalPoint toGlobal(const Local2DPoint &lp) const
Conversion to the global R.F. from the R.F. of the GeomDet.
int nEtaPartitions() const
Retunr numbers of eta partitions.
const Plane & surface() const
The nominal surface of the GeomDet.
float strip(const LocalPoint &lp) const
float localPitch(const LocalPoint &lp) const
LocalVector localDirection() const override
Local direction.
const ME0Geometry * me0_g
int nstrips() const
Return the chamber this roll belongs to.
static const unsigned int ME0KeyLayer
const ME0EtaPartition * etaPartition(ME0DetId id) const
Return the eta partition corresponding to the given id.