Definition at line 56 of file ME0TriggerPseudoBuilder.cc.
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 !!!";
79 int partition = (rolls[0] - 1) << 1;
80 if (rolls.size() == 2 and rolls[0] > rolls[1])
81 partition = partition - 1;
82 else if (rolls.size() == 2 and rolls[0] < rolls[1])
83 partition = partition + 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";
References cms::cuda::assert(), L1TStage2uGTEmulatorClient_cff::BX, ME0EtaPartition::centreOfStrip(), ME0Geometry::chamber(), relativeConstraints::chamber, dphiresolution_, PV3DBase< T, PVType, FrameType >::eta(), ME0Layer::etaPartition(), spr::find(), runTauDisplay::gp, ME0Geometry::idToDet(), info_, ME0Chamber::layer(), ME0Segment::localDirection(), ME0EtaPartition::localPitch(), ME0Segment::localPosition(), LogTrace, me0_g, ME0Segment::me0DetId(), ME0KeyLayer, ME0TriggerCentralBX, ME0Layer::nEtaPartitions(), ME0Segment::nRecHits(), ME0EtaPartition::nstrips(), or, PV3DBase< T, PVType, FrameType >::phi(), quality, mps_fire::result, ME0Segment::specificRecHits(), digitizers_cfi::strip, ME0EtaPartition::strip(), GeomDet::surface(), protons_cff::time, ME0Segment::time(), GeomDet::toGlobal(), and GloballyPositioned< T >::toLocal().
Referenced by build().