9 verbose =
pset.getUntrackedParameter<
unsigned int>(
"verbose", 0);
14 scalesToken = esConsumes<L1MuTriggerScales, L1MuTriggerScalesRcd>();
15 file =
new TFile(
"qwe.root",
"RECREATE");
16 tree =
new TTree(
"dy",
"QWE");
24 tree->Branch(
"dpt1", &
dpt1,
"dpt1/I");
25 tree->Branch(
"dpt2", &
dpt2,
"dpt2/I");
26 tree->Branch(
"dpt3", &
dpt3,
"dpt3/I");
27 tree->Branch(
"dch1", &
dch1,
"dch1/I");
28 tree->Branch(
"dch2", &
dch2,
"dch2/I");
29 tree->Branch(
"dch3", &
dch3,
"dch3/I");
30 tree->Branch(
"dbx1", &
dbx1,
"dbx1/I");
31 tree->Branch(
"dbx2", &
dbx2,
"dbx2/I");
32 tree->Branch(
"dbx3", &
dbx3,
"dbx3/I");
50 tree->Branch(
"ept1", &
ept1,
"ept1/I");
51 tree->Branch(
"ept2", &
ept2,
"ept2/I");
52 tree->Branch(
"ept3", &
ept3,
"ept3/I");
53 tree->Branch(
"ech1", &
ech1,
"ech1/I");
54 tree->Branch(
"ech2", &
ech2,
"ech2/I");
55 tree->Branch(
"ech3", &
ech3,
"ech3/I");
56 tree->Branch(
"ebx1", &
ebx1,
"ebx1/I");
57 tree->Branch(
"ebx2", &
ebx2,
"ebx2/I");
58 tree->Branch(
"ebx3", &
ebx3,
"ebx3/I");
91 int station = (*csc).first.station() - 1;
92 int cscId = (*csc).first.triggerCscId() - 1;
93 int sector = (*csc).first.triggerSector() - 1 + ((*csc).first.endcap() == 1 ? 0 : 6);
95 int tbin = lct->getBX();
99 <<
" bx=" << tbin << std::endl;
108 std::vector<csctf::TrackStub> vstubs = dtStubs->get();
109 for (std::vector<csctf::TrackStub>::const_iterator stub = vstubs.begin(); stub != vstubs.end(); stub++) {
112 std::cout <<
" DT data: tbin=" << stub->BX() <<
" (CSC) sector=" << stub->sector()
113 <<
" (CSC) subsector=" << stub->subsector() <<
" station=" << stub->station()
114 <<
" endcap=" << stub->endcap() <<
" phi=" << stub->phiPacked() <<
" phiBend=" << stub->getBend()
115 <<
" quality=" << stub->getQuality() <<
" id=" << stub->getMPCLink() <<
" mb_bxn=" << stub->cscid()
120 edm::LogInfo(
"CSCTFAnalyzer") <<
" No valid CSCTriggerContainer<csctf::TrackStub> products found";
169 std::vector<csc::L1Track>
result;
171 for (L1CSCTrackCollection::const_iterator tmp_trk =
tracks->begin(); tmp_trk !=
tracks->end(); tmp_trk++) {
183 for (
int bx = -3;
bx <= 3; ++
bx) {
184 std::vector<csc::L1Track> tks = stripped_tracks.
get(
bx);
185 std::sort(tks.begin(), tks.end(), std::greater<csc::L1Track>());
188 for (std::vector<csc::L1Track>::iterator itr = tks.begin(); itr != tks.end(); itr++) {
190 itr->localPhi() + ((itr->sector() - 1) * 24) + 6;
193 itr->setPhiPacked(gbl_phi & 0xff);
194 unsigned eta_sign = (itr->endcap() == 1 ? 0 : 1);
196 itr->setEtaPacked(gbl_eta & 0x3f);
197 itr->setQualityPacked((itr->rank() >> 4) & 0x3);
198 itr->setPtPacked(itr->rank() & 0x1f);
204 for (L1CSCTrackCollection::const_iterator _trk =
tracks->begin(); _trk !=
tracks->end(); _trk++) {
241 std::cout <<
"Data: TRK in endcap=" <<
trk->endcap() <<
" sector=" <<
trk->sector() <<
" bx=" <<
trk->BX()
242 <<
" (rank=" <<
trk->rank() <<
" localPhi=" <<
trk->localPhi() <<
" etaPacked=" <<
trk->eta_packed()
243 <<
" me1D=" <<
trk->me1ID() <<
" me2D=" <<
trk->me2ID() <<
" me3D=" <<
trk->me3ID()
244 <<
" me4D=" <<
trk->me4ID() <<
" mb1D=" <<
trk->mb1ID() <<
" pTaddr=" << std::hex
245 <<
trk->ptLUTAddress() <<
std::dec <<
")" << std::endl;
253 for (L1CSCTrackCollection::const_iterator
trk =
tracks.product()->begin();
trk !=
tracks.product()->end();
trk++) {
259 ech1 =
trk->first.charge_packed();
266 ech2 =
trk->first.charge_packed();
273 ech3 =
trk->first.charge_packed();
280 std::cout <<
"Emulator: TRK in endcap=" <<
trk->first.endcap() <<
" sector=" <<
trk->first.sector()
281 <<
" bx=" <<
trk->first.BX() <<
" (rank=" <<
trk->first.rank()
282 <<
" localPhi=" <<
trk->first.localPhi() <<
" etaPacked=" <<
trk->first.eta_packed()
283 <<
" me1D=" <<
trk->first.me1ID() <<
" me2D=" <<
trk->first.me2ID() <<
" me3D=" <<
trk->first.me3ID()
284 <<
" me4D=" <<
trk->first.me4ID() <<
" mb1D=" <<
trk->first.mb1ID() <<
" pTaddr=" << std::hex
285 <<
trk->first.ptLUTAddress() <<
std::dec <<
")" << std::endl;
void analyze(edm::Event const &e, edm::EventSetup const &iSetup) override
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
std::vector< T > get() const
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed
unsigned outputLink() const
void push_back(const T &data)
void endJob(void) override
edm::InputTag lctProducer
const L1MuScale * getRegionalEtaScale(int isys) const
get the regioanl muon trigger eta scale, isys = 0(DT), 1(bRPC), 2(CSC), 3(fwdRPC) ...
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Log< level::Info, false > LogInfo
edm::ESGetToken< L1MuTriggerScales, L1MuTriggerScalesRcd > scalesToken
std::pair< const_iterator, const_iterator > Range
void setOutputLink(unsigned oPL)
std::vector< DigiType >::const_iterator const_iterator
const L1MuTriggerScales * ts
CSCTFanalyzer(edm::ParameterSet const &pset)
edm::InputTag emulTrackProducer
edm::InputTag dataTrackProducer