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();
98 std::cout<<
"LCT in station="<<(station+1)<<
" sector="<<(sector+1)<<
" cscId="<<(cscId+1)<<
" bx="<<tbin<<std::endl;
107 std::vector<csctf::TrackStub> vstubs = dtStubs->get();
108 for(std::vector<csctf::TrackStub>::const_iterator stub=vstubs.begin(); stub!=vstubs.end(); stub++){
111 std::cout<<
" DT data: tbin="<<stub->BX()<<
" (CSC) sector="<<stub->sector()<<
" (CSC) subsector="<<stub->subsector()<<
" station="<<stub->station()<<
" endcap="<<stub->endcap()
112 <<
" phi="<<stub->phiPacked()<<
" phiBend="<<stub->getBend()<<
" quality="<<stub->getQuality()<<
" id="<<stub->getMPCLink()<<
" mb_bxn="<<stub->cscid()<<std::endl;
115 }
else edm::LogInfo(
"CSCTFAnalyzer")<<
" No valid CSCTriggerContainer<csctf::TrackStub> products found";
135 std::vector<csc::L1Track>
result;
137 for(L1CSCTrackCollection::const_iterator tmp_trk=tracks->begin(); tmp_trk!=tracks->end(); tmp_trk++){
149 for(
int bx = -3; bx <= 3; ++bx){
150 std::vector<csc::L1Track> tks = stripped_tracks.
get(bx);
151 std::sort(tks.begin(),tks.end(),std::greater<csc::L1Track>());
152 if(tks.size() > 4) tks.resize(4);
153 for(std::vector<csc::L1Track>::iterator itr=tks.begin(); itr!=tks.end(); itr++){
154 unsigned gbl_phi = itr->localPhi() + ((itr->sector() - 1)*24) + 6;
155 if(gbl_phi > 143) gbl_phi -= 143;
156 itr->setPhiPacked(gbl_phi & 0xff);
157 unsigned eta_sign = (itr->endcap() == 1 ? 0 : 1);
159 itr->setEtaPacked(gbl_eta & 0x3f);
160 itr->setQualityPacked((itr->rank()>>4) & 0x3);
161 itr->setPtPacked(itr->rank() & 0x1f);
162 if(!itr->empty()) result.push_back(*itr);
166 for(L1CSCTrackCollection::const_iterator _trk=tracks->begin(); _trk!=tracks->end(); _trk++){
const csc::L1Track *trk = &(_trk->first);
202 <<
" (rank="<<trk->
rank()
205 <<
" me1D="<<trk->
me1ID()
206 <<
" me2D="<<trk->
me2ID()
207 <<
" me3D="<<trk->
me3ID()
208 <<
" me4D="<<trk->
me4ID()
209 <<
" mb1D="<<trk->
mb1ID()
219 for(L1CSCTrackCollection::const_iterator trk=tracks.
product()->begin(); trk!=tracks.
product()->end(); trk++){
222 ephi1 = trk->first.localPhi();
223 eeta1 = trk->first.eta_packed();
224 ept1 = trk->first.pt_packed();
225 ech1 = trk->first.charge_packed();
226 ebx1 = trk->first.BX();
229 ephi2 = trk->first.localPhi();
230 eeta2 = trk->first.eta_packed();
231 ept2 = trk->first.pt_packed();
232 ech2 = trk->first.charge_packed();
233 ebx2 = trk->first.BX();
236 ephi3 = trk->first.localPhi();
237 eeta3 = trk->first.eta_packed();
238 ept3 = trk->first.pt_packed();
239 ech3 = trk->first.charge_packed();
240 ebx3 = trk->first.BX();
245 std::cout<<
"Emulator: TRK in endcap="<<trk->first.endcap()<<
" sector="<<trk->first.sector()<<
" bx="<<trk->first.BX()
246 <<
" (rank="<<trk->first.rank()
247 <<
" localPhi="<<trk->first.localPhi()
248 <<
" etaPacked="<<trk->first.eta_packed()
249 <<
" me1D="<<trk->first.me1ID()
250 <<
" me2D="<<trk->first.me2ID()
251 <<
" me3D="<<trk->first.me3ID()
252 <<
" me4D="<<trk->first.me4ID()
253 <<
" mb1D="<<trk->first.mb1ID()
254 <<
" pTaddr="<<std::hex<<trk->first.ptLUTAddress()<<
std::dec
unsigned mode(void) const
T getUntrackedParameter(std::string const &, T const &) const
std::vector< T > get() const
unsigned charge_packed() const
return charge packed as in hardware (0=pos, 1=neg)
virtual float getCenter(unsigned packed) const =0
get the center of bin represented by packed
void push_back(const T &data)
edm::InputTag lctProducer
virtual void endJob(void)
const L1MuScale * getPhiScale() const
get the phi scale
unsigned ptLUTAddress() const
unsigned eta_packed() const
return eta packed as in hardware
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
unsigned localPhi() const
unsigned outputLink() const
T const * product() const
void setOutputLink(unsigned oPL)
std::vector< CSCCorrelatedLCTDigi >::const_iterator const_iterator
const L1MuScale * getRegionalEtaScale(int isys) const
get the regioanl muon trigger eta scale, isys = 0(DT), 1(bRPC), 2(CSC), 3(fwdRPC) ...
const L1MuTriggerScales * ts
virtual float getLowEdge(unsigned packed) const =0
get the low edge of bin represented by packed
CSCTFanalyzer(edm::ParameterSet const &pset)
edm::InputTag emulTrackProducer
std::pair< const_iterator, const_iterator > Range
unsigned pt_packed() const
return pt packed as in hardware
T const * product() const
edm::InputTag dataTrackProducer
unsigned phi_packed() const
return phi packed as in hardware
virtual void analyze(edm::Event const &e, edm::EventSetup const &iSetup)