14 csctf_.trSize = csctfTrks->size();
18 for (L1CSCTrackCollection::const_iterator
trk = csctfTrks->begin();
trk < csctfTrks->end();
trk++) {
23 csctf_.trEndcap.push_back(
trk->first.endcap() == 2 ?
trk->first.endcap() - 3 :
trk->first.endcap());
25 csctf_.trSector.push_back(6 * (
trk->first.endcap() - 1) +
trk->first.sector());
26 csctf_.trBx.push_back(
trk->first.BX());
28 csctf_.trME1ID.push_back(
trk->first.me1ID());
29 csctf_.trME2ID.push_back(
trk->first.me2ID());
30 csctf_.trME3ID.push_back(
trk->first.me3ID());
31 csctf_.trME4ID.push_back(
trk->first.me4ID());
32 csctf_.trMB1ID.push_back(
trk->first.mb1ID());
34 csctf_.trME1TBin.push_back(
trk->first.me1Tbin());
35 csctf_.trME2TBin.push_back(
trk->first.me2Tbin());
36 csctf_.trME3TBin.push_back(
trk->first.me3Tbin());
37 csctf_.trME4TBin.push_back(
trk->first.me4Tbin());
38 csctf_.trMB1TBin.push_back(
trk->first.mb1Tbin());
41 csctf_.trOutputLink.push_back(
trk->first.outputLink());
44 ptadd thePtAddress(
trk->first.ptLUTAddress());
46 csctf_.trPhiSign.push_back(thePtAddress.delta_phi_sign);
47 csctf_.trPhi12.push_back(thePtAddress.delta_phi_12);
48 csctf_.trPhi23.push_back(thePtAddress.delta_phi_23);
49 csctf_.trMode.push_back(thePtAddress.track_mode);
50 csctf_.trForR.push_back(thePtAddress.track_fr);
51 csctf_.trCharge.push_back(
trk->first.chargeValue());
55 ptdat thePtData = ptLUTs_->
Pt(thePtAddress);
58 if (thePtAddress.track_fr) {
59 csctf_.trPtBit.push_back(thePtData.front_rank & 0x1f);
60 csctf_.trQuality.push_back((thePtData.front_rank >> 5) & 0x3);
61 csctf_.trChargeValid.push_back(thePtData.charge_valid_front);
63 csctf_.trPtBit.push_back(thePtData.rear_rank & 0x1f);
64 csctf_.trQuality.push_back((thePtData.rear_rank >> 5) & 0x3);
65 csctf_.trChargeValid.push_back(thePtData.charge_valid_rear);
72 csctf_.trEtaBit.push_back(
trk->first.eta_packed());
73 csctf_.trPhiBit.push_back(
trk->first.localPhi());
82 csctf_.trPhi_02PI.push_back(
83 fmod(csctf_.trPhi[nTrk - 1] + ((
trk->first.sector() - 1) *
TMath::Pi() / 3) +
96 lctOfTrks != lctsOfTracks.end();
103 lctTrk++, lctTrkId++) {
104 csctf_.trLctEndcap[nTrk - 1][LctTrkId_] = (*lctOfTrks).first.zendcap();
105 if ((*lctOfTrks).first.zendcap() > 0)
106 csctf_.trLctSector[nTrk - 1][LctTrkId_] = (*lctOfTrks).first.triggerSector();
108 csctf_.trLctSector[nTrk - 1][LctTrkId_] = 6 + (*lctOfTrks).first.triggerSector();
109 csctf_.trLctSubSector[nTrk - 1][LctTrkId_] =
112 csctf_.trLctBx[nTrk - 1][LctTrkId_] = lctTrk->getBX();
113 csctf_.trLctBx0[nTrk - 1][LctTrkId_] = lctTrk->getBX0();
115 csctf_.trLctStation[nTrk - 1][LctTrkId_] = (*lctOfTrks).first.station();
116 csctf_.trLctRing[nTrk - 1][LctTrkId_] = (*lctOfTrks).first.ring();
117 csctf_.trLctChamber[nTrk - 1][LctTrkId_] = (*lctOfTrks).first.chamber();
118 csctf_.trLctTriggerCSCID[nTrk - 1][LctTrkId_] = (*lctOfTrks).first.triggerCscId();
119 csctf_.trLctFpga[nTrk - 1][LctTrkId_] =
120 (csctf_.trLctSubSector[nTrk - 1][LctTrkId_] ? csctf_.trLctSubSector[nTrk - 1][LctTrkId_]
121 : (*lctOfTrks).first.station() + 1);
124 if (csctf_.trLctSector[nTrk - 1][LctTrkId_] < 1 || csctf_.trLctSector[nTrk - 1][LctTrkId_] > 12 ||
125 csctf_.trLctStation[nTrk - 1][LctTrkId_] < 1 || csctf_.trLctStation[nTrk - 1][LctTrkId_] > 4 ||
126 csctf_.trLctTriggerCSCID[nTrk - 1][LctTrkId_] < 1 || csctf_.trLctTriggerCSCID[nTrk - 1][LctTrkId_] > 9 ||
127 lctTrkId < 0 || lctTrkId > 1) {
128 edm::LogInfo(
"L1NtupleProducer") <<
" TRACK ERROR: CSC digi are out of range: ";
134 int endcap = (*lctOfTrks).first.zendcap();
138 int StationLctTrk = (*lctOfTrks).first.station();
139 int CscIdLctTrk = (*lctOfTrks).first.triggerCscId();
142 int FPGALctTrk = (SubSectorLctTrk ? SubSectorLctTrk - 1 : StationLctTrk);
148 csctf_.trLctstripNum[nTrk - 1][LctTrkId_] = lctTrk->getStrip();
150 lctTrk->getStrip(), lctTrk->getPattern(), lctTrk->getQuality(), lctTrk->getBend());
152 csctf_.trLctlocalPhi[nTrk - 1][LctTrkId_] = lclPhi.phi_local;
155 csctf_.trLctQuality[nTrk - 1][LctTrkId_] = lctTrk->getQuality();
159 bzero(&lclPhi,
sizeof(lclPhi));
160 csctf_.trLctlocalPhi[nTrk - 1][LctTrkId_] = -999;
163 csctf_.trLctQuality[nTrk - 1][LctTrkId_] = -999;
178 csctf_.trLctwireGroup[nTrk - 1][LctTrkId_] = lctTrk->getKeyWG();
179 gblPhi = srLUTs_[FPGALctTrk][
endcap]->
globalPhiME(lclPhi.phi_local, lctTrk->getKeyWG(), CscIdLctTrk);
181 csctf_.trLctglobalPhi[nTrk - 1][LctTrkId_] = gblPhi.global_phi;
184 bzero(&gblPhi,
sizeof(gblPhi));
185 csctf_.trLctglobalPhi[nTrk - 1][LctTrkId_] = -999;
193 lclPhi.phi_bend_local, lclPhi.phi_local, lctTrk->getKeyWG(), CscIdLctTrk);
194 csctf_.trLctglobalEta[nTrk - 1][LctTrkId_] = gblEta.global_eta;
195 csctf_.trLctCLCT_pattern[nTrk - 1][LctTrkId_] = gblEta.global_bend;
197 bzero(&gblEta,
sizeof(gblEta));
198 csctf_.trLctglobalEta[nTrk - 1][LctTrkId_] = -999;
199 csctf_.trLctCLCT_pattern[nTrk - 1][LctTrkId_] = -999;
207 csctf_.trNumLCTs.push_back(LctTrkId_);
222 corrLct != corrlcts.
product()->end();
231 csctf_.lctEndcap.push_back((*corrLct).first.zendcap());
232 if ((*corrLct).first.zendcap() > 0)
233 csctf_.lctSector.push_back((*corrLct).first.triggerSector());
235 csctf_.lctSector.push_back(6 + (*corrLct).first.triggerSector());
238 csctf_.lctBx.push_back(lct->getBX());
239 csctf_.lctBx0.push_back(lct->getBX0());
241 csctf_.lctStation.push_back((*corrLct).first.station());
242 csctf_.lctRing.push_back((*corrLct).first.ring());
243 csctf_.lctChamber.push_back((*corrLct).first.chamber());
244 csctf_.lctTriggerCSCID.push_back((*corrLct).first.triggerCscId());
245 csctf_.lctFpga.push_back(
246 (csctf_.lctSubSector.back() ? csctf_.lctSubSector.back() : (*corrLct).first.station() + 1));
249 if (csctf_.lctSector.back() < 1 || csctf_.lctSector.back() > 12 || csctf_.lctStation.back() < 1 ||
250 csctf_.lctStation.back() > 4 || csctf_.lctTriggerCSCID.back() < 1 || csctf_.lctTriggerCSCID.back() > 9 ||
251 lctId < 0 || lctId > 1) {
252 edm::LogInfo(
"L1NtupleProducer") <<
" LCT ERROR: CSC digi are out of range: ";
258 int endcap = (*corrLct).first.zendcap();
262 int StationLct = (*corrLct).first.station();
263 int CscIdLct = (*corrLct).first.triggerCscId();
266 int FPGALct = (SubSectorLct ? SubSectorLct - 1 : StationLct);
286 csctf_.lctstripNum.push_back(lct->getStrip());
288 srLUTs_[FPGALct][
endcap]->
localPhi(lct->getStrip(), lct->getPattern(), lct->getQuality(), lct->getBend());
290 csctf_.lctlocalPhi.push_back(lclPhi.phi_local);
293 csctf_.lctQuality.push_back(lct->getQuality());
298 bzero(&lclPhi,
sizeof(lclPhi));
299 csctf_.lctlocalPhi.push_back(-999);
302 csctf_.lctQuality.push_back(-999);
309 csctf_.lctwireGroup.push_back(lct->getKeyWG());
315 gblPhi = srLUTs_[FPGALct][
endcap]->
globalPhiME(lclPhi.phi_local, lct->getKeyWG(), CscIdLct);
316 csctf_.lctglobalPhi.push_back(gblPhi.global_phi);
319 bzero(&gblPhi,
sizeof(gblPhi));
320 csctf_.lctglobalPhi.push_back(-999);
328 srLUTs_[FPGALct][
endcap]->
globalEtaME(lclPhi.phi_bend_local, lclPhi.phi_local, lct->getKeyWG(), CscIdLct);
330 csctf_.lctglobalEta.push_back(gblEta.global_eta);
331 csctf_.lctCLCT_pattern.push_back(gblEta.global_bend);
333 bzero(&gblEta,
sizeof(gblEta));
334 csctf_.lctglobalEta.push_back(-999);
335 csctf_.lctCLCT_pattern.push_back(-999);
341 csctf_.lctSize = nLCT;
346 for (std::vector<L1CSCSPStatusDigi>::const_iterator
stat =
status->second.begin();
stat !=
status->second.end();
349 if (
stat->VPs() != 0) {
350 csctf_.stSPslot.push_back(
stat->slot());
351 csctf_.stL1A_BXN.push_back(
stat->BXN());
352 csctf_.stTrkCounter.push_back((const_cast<L1CSCSPStatusDigi*>(&(*
stat)))->track_counter());
353 csctf_.stOrbCounter.push_back((const_cast<L1CSCSPStatusDigi*>(&(*
stat)))->orbit_counter());
366 std::vector<csctf::TrackStub> vstubs = dtStubs->get();
368 for (std::vector<csctf::TrackStub>::const_iterator stub = vstubs.begin(); stub != vstubs.end(); stub++) {
369 csctf_.dtBXN.push_back(stub->BX());
370 csctf_.dtFLAG.push_back(stub->getStrip());
371 csctf_.dtCAL.push_back(stub->getKeyWG());
373 csctf_.dtSector.push_back(6 * (stub->endcap() - 1) + stub->sector());
374 csctf_.dtSubSector.push_back(stub->subsector());
376 csctf_.dtBX0.push_back(stub->getBX0());
377 csctf_.dtPhiBend.push_back(stub->getBend());
378 csctf_.dtPhiPacked.push_back(stub->phiPacked());
379 csctf_.dtQuality.push_back(stub->getQuality());
382 csctf_.dtSize = vstubs.size();
void SetStatus(const edm::Handle< L1CSCStatusDigiCollection > status)
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
T const * product() const
const L1MuScale * getPhiScale() const
get the phi scale
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed
const L1MuScale * getPtScale() const
get the Pt scale
const L1MuScale * getRegionalEtaScale(int isys) const
get the regioanl muon trigger eta scale, isys = 0(DT), 1(bRPC), 2(CSC), 3(fwdRPC) ...
void SetTracks(const edm::Handle< L1CSCTrackCollection > csctfTrks, const L1MuTriggerScales *ts, const L1MuTriggerPtScale *tpts, CSCSectorReceiverLUT *srLUTs_[5][2], CSCTFPtLUT *ptLUTs_)
Log< level::Info, false > LogInfo
class global_phi_data gblphidat
std::pair< const_iterator, const_iterator > Range
class local_phi_address lclphiadd
std::vector< DigiType >::const_iterator const_iterator
class local_phi_data lclphidat
Data Types.
static int triggerSubSectorFromLabels(int station, int chamber)
gblphidat globalPhiME(int phi_local, int wire_group, int cscid, const bool gangedME1a=false) const
lclphidat localPhi(int strip, int pattern, int quality, int lr, const bool gangedME1a=false) const
Geometry Lookup Tables.
void SetLCTs(const edm::Handle< CSCCorrelatedLCTDigiCollection > corrlcts, CSCSectorReceiverLUT *srLUTs_[5][2])
gbletadat globalEtaME(int phi_bend, int phi_local, int wire_group, int cscid, const bool gangedME1a=false) const
ptdat Pt(const ptadd &) const
void SetDTStubs(const edm::Handle< CSCTriggerContainer< csctf::TrackStub > > dtStubs)
class global_eta_data gbletadat