297 if (!myL1MuDTChambPhContainer.
isValid()) {
298 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuDTChambPhContainer with label " 308 if (!myL1MuDTChambThContainer.
isValid()) {
309 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuDTChambThContainer with label " 311 edm::LogInfo(
"DataNotFound") <<
"if this fails try to add DATA to the process name." ;
318 int ndttpgphtrack = 0;
319 int ndttpgthtrack = 0;
320 int NumberOfSegmentsPhi[3]={0,0,0};
322 for( L1MuDTChambPhContainer::Phi_Container::const_iterator
323 DTPhDigiItr = myPhContainer->begin() ;
324 DTPhDigiItr != myPhContainer->end() ;
327 int bx = DTPhDigiItr->bxNum() - DTPhDigiItr->Ts2Tag();
329 NumberOfSegmentsPhi[0]++;
331 NumberOfSegmentsPhi[1]++;
333 NumberOfSegmentsPhi[2]++;
337 for(
int k=0;
k<3;
k++){
340 int bxCounterDttfPhi=0;
341 for (
int k=0;
k<3;
k++){
342 if (NumberOfSegmentsPhi[
k]>0)
349 if(bxCounterDttfPhi==0){
351 }
else if(bxCounterDttfPhi==1){
352 for(
int k=0;
k<3;
k++){
353 if(NumberOfSegmentsPhi[
k]>0)
356 }
else if(bxCounterDttfPhi==2){
357 for(
int k=0;
k<3;
k++){
358 if(NumberOfSegmentsPhi[
k]==0)
361 }
else if(bxCounterDttfPhi==3){
372 for( L1MuDTChambPhContainer::Phi_Container::const_iterator
373 DTPhDigiItr = myPhContainer->begin() ;
374 DTPhDigiItr != myPhContainer->end() ;
380 int bxindex = DTPhDigiItr->bxNum() - DTPhDigiItr->Ts2Tag() + 1;
385 cout <<
"DTTPG phi wheel number " << DTPhDigiItr->whNum() << endl;
390 cout <<
"DTTPG phi station number " << DTPhDigiItr->stNum() << endl;
395 cout <<
"DTTPG phi sector number " << DTPhDigiItr->scNum() << endl;
400 cout <<
"DTTPG phi quality " << DTPhDigiItr->code() << endl;
405 cout <<
"DTTPG phi ts2tag " << DTPhDigiItr->Ts2Tag() << endl;
407 int ypos = DTPhDigiItr->scNum();
408 int xpos = DTPhDigiItr->stNum()+4*(DTPhDigiItr->whNum()+2);
410 if (DTPhDigiItr->Ts2Tag())
413 if (DTPhDigiItr->code()>3)
416 if (bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]==
nullptr ||
417 bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]->
code()<DTPhDigiItr->code())
419 bestPhQualMap[DTPhDigiItr->whNum()+2][ DTPhDigiItr->scNum()][DTPhDigiItr->stNum()-1]=&(*DTPhDigiItr);
424 for (
int iwh=0; iwh<5; iwh++){
425 for (
int isec=0; isec<12; isec++){
426 for (
int ist=0; ist<4; ist++){
427 if (bestPhQualMap[iwh][isec][ist]){
428 int xpos = iwh*4+ist+1;
430 if(bestPhQualMap[iwh][isec][ist]->code()>3)
438 int bestThQualMap[5][12][3];
439 memset(bestThQualMap,0,180*
sizeof(
int));
441 for( L1MuDTChambThContainer::The_Container::const_iterator
442 DTThDigiItr = myThContainer->begin() ;
443 DTThDigiItr != myThContainer->end() ;
448 int bxindex = DTThDigiItr->bxNum() + 1;
453 cout <<
"DTTPG theta wheel number " << DTThDigiItr->whNum() << endl;
458 cout <<
"DTTPG theta station number " << DTThDigiItr->stNum() << endl;
463 cout <<
"DTTPG theta sector number " << DTThDigiItr->scNum() << endl;
468 cout <<
"DTTPG theta bx number " << DTThDigiItr->bxNum() << endl;
470 int thcode[7]= {0,0,0,0,0,0,0};
471 for (
int j = 0; j < 7; j++)
476 cout <<
"DTTPG theta position " << DTThDigiItr->position(j) << endl;
478 thcode[j]=DTThDigiItr->code(j);
482 cout <<
"DTTPG theta quality " << DTThDigiItr->code(j) << endl;
486 int ypos = DTThDigiItr->scNum();
487 int xpos = DTThDigiItr->stNum()+4*(DTThDigiItr->whNum()+2);
492 if (thcode[
pos]>bestqual)
493 bestqual=thcode[
pos];
498 if (bestThQualMap[DTThDigiItr->whNum()+2][ DTThDigiItr->scNum()][DTThDigiItr->stNum()-1] < bestqual)
500 bestThQualMap[DTThDigiItr->whNum()+2][ DTThDigiItr->scNum()][DTThDigiItr->stNum()-1]=bestqual;
504 for (
int iwh=0; iwh<5; iwh++){
505 for (
int isec=0; isec<12; isec++){
506 for (
int ist=0; ist<3; ist++){
507 if (bestThQualMap[iwh][isec][ist]){
508 int xpos = iwh*4+ist+1;
510 if(bestThQualMap[iwh][isec][ist]==2)
521 cout <<
"DTTPG phi ntrack " << ndttpgphtrack << endl;
525 cout <<
"DTTPG theta ntrack " << ndttpgthtrack << endl;
531 if (!myL1MuDTTrackContainer.
isValid()) {
532 edm::LogInfo(
"DataNotFound") <<
"can't find L1MuDTTrackContainer with label " 541 int NumberOfSegmentsOut[3]={0,0,0};
542 for ( L1MuDTTrackContainer::TrackContainer::const_iterator
i 543 = t->begin();
i != t->end(); ++
i ) {
545 NumberOfSegmentsOut[0]++;
547 NumberOfSegmentsOut[1]++;
549 NumberOfSegmentsOut[2]++;
554 for(
int k=0;
k<3;
k++){
560 int bxCounterDttfOut=0;
561 for (
int k=0;
k<3;
k++){
562 if (NumberOfSegmentsOut[
k]>0)
567 if(bxCounterDttfOut==0){
569 }
else if(bxCounterDttfOut==1){
570 for(
int k=0;
k<3;
k++){
571 if(NumberOfSegmentsOut[
k]>0)
574 }
else if(bxCounterDttfOut==2){
575 for(
int k=0;
k<3;
k++){
576 if(NumberOfSegmentsOut[
k]==0)
579 }
else if(bxCounterDttfOut==3){
592 for ( L1MuDTTrackContainer::TrackContainer::const_iterator
i 593 = t->begin();
i != t->end(); ++
i ) {
597 std::cout <<
"quality (packed) = " <<
i->quality_packed()
599 std::cout <<
"pt (packed) = " <<
i->pt_packed()
601 std::cout <<
"phi (packed) = " <<
i->phi_packed()
603 std::cout <<
"charge (packed) = " <<
i->charge_packed()
608 int bxindex =
i->bx() + 1;
The_Container const * getContainer() const
MonitorElement * dttpgthbestmaph
MonitorElement * dttf_p_phi[3]
MonitorElement * dttpgphmap
MonitorElement * dttpgphbestmapcorr
MonitorElement * dttpgphmapcorr
MonitorElement * dttpgphbx[8]
bool getByToken(EDGetToken token, Handle< PROD > &result) const
edm::EDGetTokenT< L1MuDTChambThContainer > dttpgSourceThContainer_token_
MonitorElement * dttpgththeta[3]
MonitorElement * dttpgphwheel[3]
MonitorElement * dttpgthbestmap
MonitorElement * dttpgphbxcomp
edm::EDGetTokenT< L1MuDTTrackContainer > trToken_
MonitorElement * dttpgthmaph
MonitorElement * dttpgthsector[3]
MonitorElement * dttpgthmapbx[3]
MonitorElement * dttpgthwheel[3]
MonitorElement * dttpgthmap
std::vector< L1MuDTTrackCand > TrackContainer
MonitorElement * dttf_p_qual[3]
MonitorElement * dttpgthbx[3]
MonitorElement * dttpgthquality[3]
std::vector< L1MuDTChambPhDigi > Phi_Container
MonitorElement * dttf_p_pt[3]
std::vector< L1MuDTChambThDigi > The_Container
MonitorElement * dttpgphbestmap
MonitorElement * dttpgthntrack
edm::InputTag dttpgSource_
MonitorElement * dttpgphts2tag[3]
MonitorElement * dttpgphntrack
Phi_Container const * getContainer() const
edm::EDGetTokenT< L1MuDTChambPhContainer > dttpgSourcePhContainer_token_
MonitorElement * dttf_p_q[3]
MonitorElement * dttpgphmapbx[3]
MonitorElement * dttpgthstation[3]
MonitorElement * dttpgphsector[3]
TrackContainer const * getContainer() const
MonitorElement * dttpgphquality[3]
MonitorElement * dttpgphmap2nd
MonitorElement * dttpgphstation[3]