CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
L1TDTTF Class Reference

#include <L1TDTTF.h>

Inheritance diagram for L1TDTTF:
DQMEDAnalyzer edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns > edm::one::EDProducerBase edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 L1TDTTF (const edm::ParameterSet &ps)
 base services More...
 
 ~L1TDTTF () override
 
- Public Member Functions inherited from DQMEDAnalyzer
void accumulate (edm::Event const &ev, edm::EventSetup const &es) final
 
virtual void analyze (edm::Event const &, edm::EventSetup const &)
 
void beginLuminosityBlock (edm::LuminosityBlock const &lumi, edm::EventSetup const &setup) override
 
void beginRun (edm::Run const &run, edm::EventSetup const &setup) final
 
 DQMEDAnalyzer ()
 
 DQMEDAnalyzer (DQMEDAnalyzer const &)=delete
 
 DQMEDAnalyzer (DQMEDAnalyzer &&)=delete
 
void endLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &) override
 
void endLuminosityBlockProduce (edm::LuminosityBlock &lumi, edm::EventSetup const &setup) final
 
void endRun (edm::Run const &run, edm::EventSetup const &setup) override
 
void endRunProduce (edm::Run &run, edm::EventSetup const &setup) override
 
 ~DQMEDAnalyzer () override=default
 
- Public Member Functions inherited from edm::one::EDProducer< edm::Accumulator, edm::EndLuminosityBlockProducer, edm::EndRunProducer, edm::one::WatchLuminosityBlocks, edm::one::WatchRuns >
 EDProducer ()=default
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
bool hasAbilityToProduceInLumis () const final
 
bool hasAbilityToProduceInRuns () const final
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
- Public Member Functions inherited from edm::one::EDProducerBase
 EDProducerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDProducerBase () override
 
- Public Member Functions inherited from edm::ProducerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
std::vector< edm::ProductResolverIndex > const & indiciesForPutProducts (BranchType iBranchType) const
 
 ProducerBase ()
 
std::vector< edm::ProductResolverIndex > const & putTokenIndexToProductResolverIndex () const
 
void registerProducts (ProducerBase *, ProductRegistry *, ModuleDescription const &)
 
std::function< void(BranchDescription const &)> registrationCallback () const
 used by the fwk to register list of products More...
 
void resolvePutIndicies (BranchType iBranchType, ModuleToResolverIndicies const &iIndicies, std::string const &moduleLabel)
 
 ~ProducerBase () noexcept(false) override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
virtual ~EDConsumerBase () noexcept(false)
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c) override
 
void bookHistograms (DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
 
void dqmBeginRun (edm::Run const &, edm::EventSetup const &) override
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 

Private Member Functions

void bookEta (int wh, int &nbins, float &start, float &stop)
 
void fillMEs (std::vector< L1MuDTTrackCand > const *trackContainer, std::vector< L1MuRegionalCand > &gmtDttfCands)
 
void setQualLabel (MonitorElement *me, int axis)
 
void setWheelLabel (MonitorElement *me)
 

Private Attributes

MonitorElementdttf_bx [6][12]
 
MonitorElementdttf_bx_2ndTrack [6][12]
 
MonitorElementdttf_eta [6][12]
 
MonitorElementdttf_eta_fine_fraction [6][12]
 
MonitorElementdttf_eta_wheel_2ndTrack [6]
 
MonitorElementdttf_gmt_ghost
 
MonitorElementdttf_gmt_match
 
MonitorElementdttf_gmt_missed
 
MonitorElementdttf_nTracksPerEv [6][12]
 
MonitorElementdttf_nTracksPerEvent_integ
 
MonitorElementdttf_nTracksPerEvent_wheel [6]
 
MonitorElementdttf_phi [6][12]
 
MonitorElementdttf_phi_eta_coarse_wheel [6]
 
MonitorElementdttf_phi_eta_fine_wheel [6]
 
MonitorElementdttf_phi_eta_wheel_2ndTrack [6]
 
MonitorElementdttf_phi_wheel_2ndTrack [6]
 
MonitorElementdttf_pt [6][12]
 
MonitorElementdttf_pt_wheel_2ndTrack [6]
 
MonitorElementdttf_q [6][12]
 
MonitorElementdttf_q_wheel_2ndTrack [6]
 
MonitorElementdttf_qual [6][12]
 
MonitorElementdttf_quality_summary_wheel_2ndTrack [6]
 
MonitorElementdttf_quality_wheel_2ndTrack [6]
 
MonitorElementdttf_spare
 
edm::InputTag dttpgSource_
 
edm::InputTag gmtSource_
 
edm::EDGetTokenT< L1MuGMTReadoutCollectiongmtSourceToken_
 
std::string l1tsubsystemfolder_
 
edm::InputTag muonCollectionLabel_
 
edm::EDGetTokenT< reco::MuonCollectionmuonCollectionToken_
 
int nev_
 
int nev_dttf_
 
int nev_dttf_track2_
 
int numTracks [6][12]
 
bool online_
 
std::string outputFile_
 
edm::InputTag trackInputTag_
 
edm::EDGetTokenT< L1MuDTTrackContainertrackInputToken_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::one::EDProducerBase
typedef EDProducerBase ModuleType
 
- Public Types inherited from edm::ProducerBase
using ModuleToResolverIndicies = std::unordered_multimap< std::string, std::tuple< edm::TypeID const *, const char *, edm::ProductResolverIndex >>
 
typedef ProductRegistryHelper::TypeLabelList TypeLabelList
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from edm::one::EDProducerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Attributes inherited from DQMEDAnalyzer
edm::EDPutTokenT< DQMTokenlumiToken_
 
edm::EDPutTokenT< DQMTokenrunToken_
 

Detailed Description

Definition at line 31 of file L1TDTTF.h.

Constructor & Destructor Documentation

L1TDTTF::L1TDTTF ( const edm::ParameterSet ps)

base services

DT input output tracks GMT GlobalMuon try

Verbose?

Use ROOT Output?

Definition at line 197 of file L1TDTTF.cc.

References dttpgSource_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), gmtSourceToken_, edm::InputTag::label(), muonCollectionToken_, outputFile_, edm::InputTag::process(), AlCaHLTBitMon_QueryRunRegistry::string, trackInputTag_, trackInputToken_, and verbose_.

198  : dttpgSource_( ps.getParameter< edm::InputTag >("dttpgSource") ),
199  gmtSource_( ps.getParameter< edm::InputTag >("gmtSource") ),
200  muonCollectionLabel_( ps.getParameter<edm::InputTag>("MuonCollection") ),
202  "L1T/L1TDTTF")),
203  online_( ps.getUntrackedParameter<bool>("online", true) ),
204  verbose_( ps.getUntrackedParameter<bool>("verbose", false) )
205 
206 {
207 
208  std::string trstring =
209  dttpgSource_.label() + ":DATA:" + dttpgSource_.process();
210  trackInputTag_ = edm::InputTag(trstring);
211 
213  if ( verbose_ ) edm::LogInfo("L1TDTTF: constructor") << "Verbose enabled";
214 
216  if ( ps.getUntrackedParameter<bool>("disableROOToutput", false) ) {
217 
218  outputFile_ = "";
219 
220  } else {
221 
222  outputFile_ = ps.getUntrackedParameter<std::string>("outputFile", "");
223  if ( ! outputFile_.empty() ) {
224  edm::LogInfo("L1TDTTF: constructor")
225  << "L1T Monitoring histograms will be saved to " << outputFile_;
226  }
227 
228  }
229 
230  //set Token(-s)
231  trackInputToken_ = consumes<L1MuDTTrackContainer>(trackInputTag_);
232  muonCollectionToken_ = consumes<reco::MuonCollection>(ps.getParameter<edm::InputTag>("MuonCollection"));
233  gmtSourceToken_ = consumes<L1MuGMTReadoutCollection>(ps.getParameter< edm::InputTag >("gmtSource"));
234 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
std::string l1tsubsystemfolder_
Definition: L1TDTTF.h:60
edm::InputTag trackInputTag_
Definition: L1TDTTF.h:64
edm::InputTag muonCollectionLabel_
Definition: L1TDTTF.h:59
edm::InputTag gmtSource_
Definition: L1TDTTF.h:58
std::string outputFile_
Definition: L1TDTTF.h:63
edm::EDGetTokenT< L1MuGMTReadoutCollection > gmtSourceToken_
Definition: L1TDTTF.h:104
edm::InputTag dttpgSource_
Definition: L1TDTTF.h:57
edm::EDGetTokenT< L1MuDTTrackContainer > trackInputToken_
Definition: L1TDTTF.h:102
bool verbose_
Definition: L1TDTTF.h:62
edm::EDGetTokenT< reco::MuonCollection > muonCollectionToken_
Definition: L1TDTTF.h:103
std::string const & label() const
Definition: InputTag.h:36
std::string const & process() const
Definition: InputTag.h:40
bool online_
Definition: L1TDTTF.h:61
L1TDTTF::~L1TDTTF ( )
override

Nothing to destroy

Definition at line 239 of file L1TDTTF.cc.

240 {
242 }

Member Function Documentation

void L1TDTTF::analyze ( const edm::Event e,
const edm::EventSetup c 
)
overrideprotected

counters

tracks handle

dttf counters

selection for offline

global muon selection plot

in case of problems accept all

in case of problems accept all

take only bx=0

in Gmt but not in DTTF

in phys values double phi= dttfCand->phiValue(); int sector = 1 + (phi + 15)/30; /// in phys values

Per event summaries

Definition at line 581 of file L1TDTTF.cc.

References accept(), dttf_gmt_ghost, dttf_nTracksPerEv, dttf_nTracksPerEvent_integ, dttf_nTracksPerEvent_wheel, dttf_spare, dttpgSource_, PVValHelper::eta, MonitorElement::Fill(), fillMEs(), L1MuDTTrackContainer::getContainer(), L1MuGMTReadoutCollection::getRecords(), gmtSource_, gmtSourceToken_, edm::HandleBase::isValid(), edm::InputTag::label(), muonCollectionLabel_, muonCollectionToken_, extraflags_cff::muons, nev_, nev_dttf_, nev_dttf_track2_, numTracks, online_, phi, edm::InputTag::process(), edm::Handle< T >::product(), alignCSCRings::s, trackInputToken_, verbose_, w, and makeMuonMisalignmentScenario::wheel.

583 {
584 
585 
586  if ( verbose_ )
587  edm::LogInfo("L1TDTTF::Analyze::start") << "#################### START";
588 
590  ++nev_;
591  memset( numTracks, 0, 72 * sizeof(int) );
592 
594  edm::Handle<L1MuDTTrackContainer > myL1MuDTTrackContainer;
595  try {
596  event.getByToken(trackInputToken_, myL1MuDTTrackContainer);
597  } catch (cms::Exception& iException) {
598  edm::LogError("L1TDTTF::analyze::DataNotFound")
599  << "can't getByToken L1MuDTTrackContainer with label "
600  << dttpgSource_.label() << ":DATA:" << dttpgSource_.process();
601  return;
602  }
603 
604  if ( !myL1MuDTTrackContainer.isValid() ) {
605  edm::LogError("L1TDTTF::analyze::DataNotFound")
606  << "can't find L1MuDTTrackContainer with label "
607  << dttpgSource_.label() << ":DATA:" << dttpgSource_.process();
608  return;
609  }
610 
611  L1MuDTTrackContainer::TrackContainer const * trackContainer =
612  myL1MuDTTrackContainer->getContainer();
613 
615  if ( !trackContainer->empty() ) {
616  ++nev_dttf_;
617  if( trackContainer->size() > 1 ) ++nev_dttf_track2_;
618  }
619 
623  bool accept = true;
624  if ( ! online_ ) {
625 
626  try {
627 
629  event.getByToken(muonCollectionToken_, muons);
630  accept = false;
631  if ( muons.isValid() ) {
632  for (reco::MuonCollection::const_iterator recoMu = muons->begin();
633  recoMu!=muons->end(); ++recoMu ) {
634  if ( fabs( recoMu->eta() ) < 1.4 ) {
635  if ( verbose_ ) {
636  edm::LogInfo("L1TDTTFClient::Analyze:GM") << "Found a global muon!";
637  }
638  accept = true;
639  break;
640  }
641 
642  }
643 
645  if ( ! accept ) {
646  dttf_spare->Fill( !trackContainer->empty() ? 1 : 0 );
647 
648  if ( verbose_ ) {
649  edm::LogInfo("L1TDTTFClient::Analyze:GM")
650  << "No global muons in this event!";
651  }
652 
653  } else {
654  dttf_spare->Fill( !trackContainer->empty() ? 2 : 3 );
655  }
656 
657  } else {
659  accept = true;
660  edm::LogWarning("L1TDTTFClient::Analyze:GM")
661  << "Invalid MuonCollection with label "
663  }
664 
665 
666  } catch (cms::Exception& iException) {
668  accept = true;
669  edm::LogError("DataNotFound") << "Unable to getByToken MuonCollection with label "
671  }
672 
673  }
674 
675 
677  std::vector<L1MuRegionalCand> gmtBx0DttfCandidates;
678 
679  try {
680 
682  event.getByToken(gmtSourceToken_, pCollection);
683 
684  if ( !pCollection.isValid() ) {
685  edm::LogError("DataNotFound") << "can't find L1MuGMTReadoutCollection with label "
686  << gmtSource_.label() ;
687  }
688 
689  // get GMT readout collection
690  L1MuGMTReadoutCollection const* gmtrc = pCollection.product();
691  std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
692 
693  std::vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
694 
695  for ( RRItr = gmt_records.begin(); RRItr != gmt_records.end(); ++RRItr ) {
696 
697  std::vector<L1MuRegionalCand> dttfCands = RRItr->getDTBXCands();
698  std::vector<L1MuRegionalCand>::iterator dttfCand;
699 
700  for( dttfCand = dttfCands.begin(); dttfCand != dttfCands.end();
701  ++dttfCand ) {
702 
703  if(dttfCand->empty()) continue;
705  if ( RRItr->getBxInEvent() ) continue;
706 
707  // dttf_gmt_ghost_phys->Fill( dttfCand->eta_packed(),
708  // dttfCand->phi_packed() );
709  gmtBx0DttfCandidates.push_back( *dttfCand );
710 
711  }
712  }
713 
714  } catch (cms::Exception& iException) {
715  edm::LogError("DataNotFound") << "Unable to getByToken L1MuGMTReadoutCollection with label "
716  << gmtSource_.label() ;
717  }
718 
719 
720  // fill MEs if all selections are passed
721  if ( accept ) fillMEs( trackContainer, gmtBx0DttfCandidates );
722 
724  std::vector<L1MuRegionalCand>::iterator dttfCand;
725  for( dttfCand = gmtBx0DttfCandidates.begin();
726  dttfCand != gmtBx0DttfCandidates.end(); ++dttfCand ) {
727  if( dttfCand->empty() ) continue;
728 
732  int phi= dttfCand->phi_packed();
733  int sector = 1 + (phi + 6)/12;
734  if (sector > 12 ) sector -= 12;
735  double eta = dttfCand->etaValue();
736 
737  int wheel = -3;
738  if ( eta < -0.74 ) {
739  wheel = -2;
740  } else if ( eta < -0.3 ) {
741  wheel = -1;
742 
743  } else if ( eta < 0.3 ) {
744  wheel = 0;
745 
746  } else if ( eta < 0.74 ) {
747  wheel = 1;
748  } else {
749  wheel = 2;
750  }
751 
752  dttf_gmt_ghost->Fill( wheel, sector );
753  // dttf_gmt_ghost_phys->Fill( dttfCand->eta_packed(),
754  // dttfCand->phi_packed() );
755  }
756 
757 
759  int numTracksInt = 0;
760 
761  for ( int w = 0; w < 6; ++w ) {
762 
763  int numTracks_wh = 0;
764  for ( int s = 0; s < 12; ++s ) {
765 
767 
768  numTracks_wh += numTracks[w][s];
769 
770  }
771 
772  numTracksInt += numTracks_wh;
773  dttf_nTracksPerEvent_wheel[w]->Fill( numTracks_wh );
774 
775  }
776 
777  dttf_nTracksPerEvent_integ->Fill( numTracksInt );
778 
779 
780 
781 }
const double w
Definition: UKUtility.cc:23
edm::InputTag muonCollectionLabel_
Definition: L1TDTTF.h:59
MonitorElement * dttf_nTracksPerEvent_wheel[6]
Definition: L1TDTTF.h:66
bool accept(const edm::Event &event, const edm::TriggerResults &triggerTable, const std::string &triggerPath)
Definition: TopDQMHelpers.h:30
void Fill(long long x)
MonitorElement * dttf_nTracksPerEvent_integ
Definition: L1TDTTF.h:87
edm::InputTag gmtSource_
Definition: L1TDTTF.h:58
edm::EDGetTokenT< L1MuGMTReadoutCollection > gmtSourceToken_
Definition: L1TDTTF.h:104
edm::InputTag dttpgSource_
Definition: L1TDTTF.h:57
std::vector< L1MuDTTrackCand > TrackContainer
edm::EDGetTokenT< L1MuDTTrackContainer > trackInputToken_
Definition: L1TDTTF.h:102
void fillMEs(std::vector< L1MuDTTrackCand > const *trackContainer, std::vector< L1MuRegionalCand > &gmtDttfCands)
Definition: L1TDTTF.cc:787
bool isValid() const
Definition: HandleBase.h:74
int nev_dttf_track2_
Definition: L1TDTTF.h:98
int numTracks[6][12]
Definition: L1TDTTF.h:99
T const * product() const
Definition: Handle.h:81
bool verbose_
Definition: L1TDTTF.h:62
MonitorElement * dttf_gmt_ghost
Definition: L1TDTTF.h:92
edm::EDGetTokenT< reco::MuonCollection > muonCollectionToken_
Definition: L1TDTTF.h:103
int nev_dttf_
Definition: L1TDTTF.h:97
std::string const & label() const
Definition: InputTag.h:36
std::string const & process() const
Definition: InputTag.h:40
bool online_
Definition: L1TDTTF.h:61
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
MonitorElement * dttf_nTracksPerEv[6][12]
Definition: L1TDTTF.h:77
MonitorElement * dttf_spare
Definition: L1TDTTF.h:88
int nev_
Definition: L1TDTTF.h:96
TrackContainer const * getContainer() const
void L1TDTTF::bookEta ( int  wh,
int &  nbins,
float &  start,
float &  stop 
)
private

Definition at line 1015 of file L1TDTTF.cc.

Referenced by bookHistograms().

1016 {
1017 
1018  switch ( wh ) {
1019  case 0 : start = 0; stop = 18; nbins = 18; break; // N2
1020  case 1 : start = 8; stop = 28; nbins = 20; break; // N1
1021  case 2 : start = 22; stop = 32; nbins = 10; break; // N0
1022  case 3 : start = 22; stop = 42; nbins = 20; break; // P0
1023  case 4 : start = 36; stop = 56; nbins = 20; break; // P1
1024  case 5 : start = 46; stop = 64; nbins = 18; break; // P2
1025  default : start = 0; stop = 0; nbins = 0; break; // BOH
1026  }
1027 
1028 }
Definition: start.py:1
void L1TDTTF::bookHistograms ( DQMStore::IBooker i,
edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

testing purposes

histo name

histo title

DTTF Output (6 wheels)


Per wheel summaries

number of tracks per event per wheel

phi vs etafine - for each wheel

phi vs etacoarse - for each wheel

Per wheel summaries : 2ND_TRACK_ONLY

DTTF Tracks Quality distribution

quality per wheel 2ND TRACK

phi vs eta - for each wheel 2ND TRACK

DTTF Tracks eta distribution (Packed values)

DTTF Tracks Phi distribution (Packed values)

DTTF Tracks p_{T} distribution (Packed values)

DTTF Tracks Charge distribution

Go in detailed subfolders

number of tracks per event folder

BX_SECTORS for each wheel

CHARGE folder

PT folder

PHI folder

QUALITY folder

ETA folder

ETA folder

integrated values: always packed

Only for online: occupancy summary - reset

Implements DQMEDAnalyzer.

Definition at line 251 of file L1TDTTF.cc.

References DQMStore::IBooker::book1D(), DQMStore::IBooker::book2D(), bookEta(), dttf_bx, dttf_bx_2ndTrack, dttf_eta, dttf_eta_fine_fraction, dttf_eta_wheel_2ndTrack, dttf_gmt_ghost, dttf_gmt_match, dttf_gmt_missed, dttf_nTracksPerEv, dttf_nTracksPerEvent_integ, dttf_nTracksPerEvent_wheel, dttf_phi, dttf_phi_eta_coarse_wheel, dttf_phi_eta_fine_wheel, dttf_phi_eta_wheel_2ndTrack, dttf_phi_wheel_2ndTrack, dttf_pt, dttf_pt_wheel_2ndTrack, dttf_q, dttf_q_wheel_2ndTrack, dttf_qual, dttf_quality_summary_wheel_2ndTrack, dttf_quality_wheel_2ndTrack, dttf_spare, MonitorElement::getTH2F(), l1tsubsystemfolder_, pileupCalc::nbins, nev_, nev_dttf_, nev_dttf_track2_, online_, MonitorElement::setAxisTitle(), MonitorElement::setBinLabel(), DQMStore::IBooker::setCurrentFolder(), setQualLabel(), setWheelLabel(), and AlCaHLTBitMon_QueryRunRegistry::string.

252 {
254  nev_ = 0;
255  nev_dttf_ = 0;
256  nev_dttf_track2_ = 0;
257 
258  // get hold of back-end interface
259 
260  std::string dttf_trk_folder = l1tsubsystemfolder_;
261 
262  char hname[100];
263  char htitle[100];
264 
266  float start = 0;
267  float stop = 0;
268  int nbins = 0;
270 
272  ibooker.setCurrentFolder(dttf_trk_folder);
273 
274  std::string wheelpath[6] = { "/02-WHEEL_N2",
275  "/03-WHEEL_N1",
276  "/04-WHEEL_N0",
277  "/05-WHEEL_P0",
278  "/06-WHEEL_P1",
279  "/07-WHEEL_P2" };
280 
281 
282  char c_whn[6][3] = { "N2", "N1", "N0", "P0", "P1", "P2" };
283  // char bxn [3][3] = { "N1", "0", "P1" };
284  // char bxn[3][25] = {"/BX_NONZERO_ONLY/BX_N1", "", "/BX_NONZERO_ONLY/BX_P1"};
285 
286  for ( int iwh = 0; iwh < 6; ++iwh ) {
287 
288  bookEta( iwh, nbins, start, stop );
289 
293  std::string dttf_trk_folder_wheel = dttf_trk_folder + wheelpath[iwh];
294  ibooker.setCurrentFolder(dttf_trk_folder_wheel);
295 
297  sprintf(hname, "dttf_01_nTracksPerEvent_wh%s", c_whn[iwh]);
298  sprintf(htitle, "Wheel %s - Number Tracks Per Event", c_whn[iwh]);
299  dttf_nTracksPerEvent_wheel[iwh] = ibooker.book1D(hname, htitle,
300  10, 0.5, 10.5);
301  dttf_nTracksPerEvent_wheel[iwh]->setAxisTitle("# tracks/event", 1);
302 
304  sprintf(hname, "dttf_07_phi_vs_etaFine_wh%s", c_whn[iwh]);
305  sprintf(htitle, "Wheel %s - #eta-#phi DTTF Tracks occupancy (fine #eta only, unpacked values)", c_whn[iwh]);
306  dttf_phi_eta_fine_wheel[iwh] = ibooker.book2D(hname, htitle,
307  nbins, start-0.5, stop-0.5,
308  144, -6, 138);
309  // 144, -0.5, 143.5);
310 
311  dttf_phi_eta_fine_wheel[iwh]->setAxisTitle("#eta", 1);
312  dttf_phi_eta_fine_wheel[iwh]->setAxisTitle("#phi", 2);
313 
315  sprintf(hname, "dttf_08_phi_vs_etaCoarse_wh%s", c_whn[iwh]);
316  sprintf(htitle, "Wheel %s - #eta-#phi DTTF Tracks occupancy (coarse #eta only, unpacked values)", c_whn[iwh]);
317  dttf_phi_eta_coarse_wheel[iwh] = ibooker.book2D(hname, htitle,
318  nbins, start-0.5, stop-0.5,
319  144, -6, 138);
320  // 144, -0.5, 143.5);
321  dttf_phi_eta_coarse_wheel[iwh]->setAxisTitle("#eta", 1);
322  dttf_phi_eta_coarse_wheel[iwh]->setAxisTitle("#phi", 2);
323 
326  std::string dttf_trk_folder_wheel_2ndtrack =
327  dttf_trk_folder_wheel + "/2ND_TRACK_ONLY";
328  ibooker.setCurrentFolder(dttf_trk_folder_wheel_2ndtrack);
329 
330 
332  sprintf(hname, "dttf_04_quality_wh%s_2ndTrack", c_whn[iwh]);
333  sprintf(htitle, "Wheel %s - 2nd Tracks Quality distribution", c_whn[iwh]);
334  dttf_quality_wheel_2ndTrack[iwh] = ibooker.book1D(hname, htitle, 7, 1, 8);
336 
338  sprintf(hname, "dttf_05_quality_summary_wh%s_2ndTrack", c_whn[iwh]);
339  sprintf(htitle, "Wheel %s - 2nd Tracks - Quality", c_whn[iwh]);
340  dttf_quality_summary_wheel_2ndTrack[iwh] = ibooker.book2D(hname, htitle,
341  12, 1, 13, 7, 1, 8 );
344  // dttf_quality_summary_wheel_2ndTrack[iwh]->setAxisTitle("Quality", 2);
345 
347  sprintf(hname, "dttf_06_phi_vs_eta_wh%s_2ndTrack", c_whn[iwh]);
348  sprintf(htitle, "Wheel %s - #eta-#phi Distribution of DTTF 2nd Tracks",
349  c_whn[iwh]);
350 
351  dttf_phi_eta_wheel_2ndTrack[iwh] = ibooker.book2D(hname, htitle,
352  nbins, start-0.5,stop-0.5,
353  144, -6, 138);
354  // 144, -0.5, 143.5);
355  dttf_phi_eta_wheel_2ndTrack[iwh]->setAxisTitle("#eta", 1);
356  dttf_phi_eta_wheel_2ndTrack[iwh]->setAxisTitle("#phi", 2);
357 
358 
359 
361  sprintf(hname, "dttf_07_eta_wh%s_2ndTrack", c_whn[iwh]);
362  sprintf(htitle, "Wheel %s - DTTF 2nd Tracks #eta distribution (Packed values)",
363  c_whn[iwh]);
364  dttf_eta_wheel_2ndTrack[iwh] = ibooker.book1D(hname, htitle, 64, -0.5, 63.5);
365  dttf_eta_wheel_2ndTrack[iwh]->setAxisTitle("#eta", 1);
366 
368  sprintf(hname, "dttf_08_phi_wh%s_2ndTrack", c_whn[iwh]);
369  sprintf(htitle, "Wheel %s - DTTF 2nd Tracks Phi distribution (Packed values)",
370  c_whn[iwh]);
371  dttf_phi_wheel_2ndTrack[iwh] = ibooker.book1D(hname, htitle, 144, -6, 138. );
372  dttf_phi_wheel_2ndTrack[iwh]->setAxisTitle("#phi", 1);
373 
375  sprintf(hname, "dttf_09_pt_wh%s_2ndTrack", c_whn[iwh]);
376  sprintf(htitle, "Wheel %s - DTTF 2nd Tracks p_{T} distribution (Packed values)",
377  c_whn[iwh]);
378  dttf_pt_wheel_2ndTrack[iwh] = ibooker.book1D(hname, htitle, 32, -0.5, 31.5);
379  dttf_pt_wheel_2ndTrack[iwh]->setAxisTitle("p_{T}", 1);
380 
382  sprintf(hname, "dttf_10_charge_wh%s_2ndTrack", c_whn[iwh]);
383  sprintf(htitle, "Wheel %s - DTTF 2nd Tracks Charge distribution", c_whn[iwh]);
384  dttf_q_wheel_2ndTrack[iwh] = ibooker.book1D(hname, htitle, 2, -0.5, 1.5);
385  dttf_q_wheel_2ndTrack[iwh]->setAxisTitle("Charge", 1);
386 
387 
388 
389 
393 
395  std::string dttf_trk_folder_nTracksPerEvent = dttf_trk_folder_wheel + "/TracksPerEvent";
396  ibooker.setCurrentFolder(dttf_trk_folder_nTracksPerEvent);
397 
398  for(int ise = 0; ise < 12; ++ise) {
399  sprintf(hname, "dttf_nTracksPerEvent_wh%s_se%d", c_whn[iwh], ise+1);
400  sprintf(htitle, "Wheel %s Sector %d - Number of Tracks Per Event",
401  c_whn[iwh], ise+1);
402  dttf_nTracksPerEv[iwh][ise] = ibooker.book1D(hname, htitle, 2, 0.5, 2.5);
403  dttf_nTracksPerEv[iwh][ise]->setAxisTitle("# tracks/event", 1);
404  }
405 
406 
408  std::string dttf_trk_folder_wh_bxsec_all =
409  dttf_trk_folder_wheel + "/BX_BySector";
410  ibooker.setCurrentFolder(dttf_trk_folder_wh_bxsec_all);
411 
412  for(int ise = 0; ise < 12; ++ise ) {
413  sprintf(hname, "dttf_bx_wh%s_se%d", c_whn[iwh], ise+1);
414  sprintf(htitle, "Wheel %s Sector %d - BX Distribution",
415  c_whn[iwh], ise+1);
416  dttf_bx[iwh][ise] = ibooker.book1D(hname, htitle, 3, -1.5, 1.5);
417  dttf_bx[iwh][ise]->setAxisTitle("BX", 1);
418  }
419 
420  std::string dttf_trk_folder_wh_bxsec_trk2 =
421  dttf_trk_folder_wheel + "/BX_BySector/2ND_TRACK_ONLY";
422  ibooker.setCurrentFolder(dttf_trk_folder_wh_bxsec_trk2);
423 
424  for(int ise = 0; ise < 12; ++ise ) {
425  sprintf(hname, "dttf_bx_2ndTrack_wh%s_se%d", c_whn[iwh], ise+1);
426  sprintf(htitle, "Wheel %s Sector %d - BX 2nd Tracks only",
427  c_whn[iwh], ise+1);
428  dttf_bx_2ndTrack[iwh][ise] = ibooker.book1D(hname, htitle, 3, -1.5, 1.5);
429  dttf_bx_2ndTrack[iwh][ise]->setAxisTitle("BX", 1);
430  }
431 
433  std::string dttf_trk_folder_charge = dttf_trk_folder_wheel + "/Charge";
434  ibooker.setCurrentFolder(dttf_trk_folder_charge);
435 
436  for(int ise = 0; ise < 12; ++ise) {
437  sprintf(hname, "dttf_charge_wh%s_se%d", c_whn[iwh], ise+1);
438  sprintf(htitle, "Wheel %s Sector %d - Packed Charge", c_whn[iwh], ise+1);
439  dttf_q[iwh][ise] = ibooker.book1D(hname, htitle, 2, -0.5, 1.5);
440  dttf_q[iwh][ise]->setAxisTitle("Charge", 1);
441  }
442 
444  std::string dttf_trk_folder_pt = dttf_trk_folder_wheel + "/PT";
445  ibooker.setCurrentFolder(dttf_trk_folder_pt);
446 
447  for(int ise = 0; ise < 12; ++ise ) {
448  sprintf(hname, "dttf_pt_wh%s_se%d", c_whn[iwh], ise+1);
449  sprintf(htitle, "Wheel %s Sector %d - Packed p_{T}",
450  c_whn[iwh], ise + 1 );
451  dttf_pt[iwh][ise]= ibooker.book1D(hname, htitle, 32, -0.5, 31.5);
452  dttf_pt[iwh][ise]->setAxisTitle("p_{T}", 1);
453  }
454 
456  std::string dttf_trk_folder_phi = dttf_trk_folder_wheel + "/Phi";
457  ibooker.setCurrentFolder(dttf_trk_folder_phi);
458 
459  for(int ise = 0; ise < 12; ++ise ) {
460  sprintf(hname, "dttf_phi_wh%s_se%d", c_whn[iwh], ise+1);
461  sprintf(htitle, "Wheel %s Sector %d - Packed Phi", c_whn[iwh], ise+1);
462  dttf_phi[iwh][ise] = ibooker.book1D(hname, htitle, 144, -6, 138);
463  dttf_phi[iwh][ise]->setAxisTitle("#phi", 1);
464  //dttf_phi[iwh][ise] = dbe_->book1D(title,title, 32,-16.5, 15.5);
465  }
466 
468  std::string dttf_trk_folder_quality = dttf_trk_folder_wheel + "/Quality";
469  ibooker.setCurrentFolder(dttf_trk_folder_quality);
470 
471  for(int ise = 0; ise < 12; ++ise){
472  sprintf(hname, "dttf_qual_wh%s_se%d", c_whn[iwh], ise+1);
473  sprintf(htitle, "Wheel %s Sector %d - Packed Quality",
474  c_whn[iwh], ise+1);
475  dttf_qual[iwh][ise] = ibooker.book1D(hname, htitle, 7, 1, 8);
476  dttf_qual[iwh][ise]->setAxisTitle("Quality", 1);
477  setQualLabel( dttf_qual[iwh][ise], 1 );
478  }
479 
481  std::string dttf_trk_folder_eta = dttf_trk_folder_wheel + "/Eta";
482  ibooker.setCurrentFolder(dttf_trk_folder_eta);
483 
484  for (int ise = 0; ise < 12; ++ise ) {
485 
486  sprintf(hname, "dttf_eta_wh%s_se%d", c_whn[iwh], ise+1);
487  sprintf(htitle, "Wheel %s Sector %d - Packed #eta",
488  c_whn[iwh], ise+1);
489  dttf_eta[iwh][ise] = ibooker.book1D(hname, htitle, 64, -0.5, 63.5);
490  dttf_eta[iwh][ise]->setAxisTitle("#eta", 1);
491 
492  }
493 
495  dttf_trk_folder_eta = dttf_trk_folder_wheel + "/EtaFineFraction";
496  ibooker.setCurrentFolder(dttf_trk_folder_eta);
497 
498  for (int ise = 0; ise < 12; ++ise ) {
499 
500  sprintf(hname, "dttf_etaFine_fraction_wh%s_se%d", c_whn[iwh], ise+1);
501  sprintf(htitle, "Wheel %s Sector %d - Eta Fine Fraction",
502  c_whn[iwh], ise+1);
503  dttf_eta_fine_fraction[iwh][ise] = ibooker.book1D(hname, htitle, 2, 0, 2);
504  dttf_eta_fine_fraction[iwh][ise]->setAxisTitle("#eta", 1);
505  dttf_eta_fine_fraction[iwh][ise]->setBinLabel(1, "fine", 1);
506  dttf_eta_fine_fraction[iwh][ise]->setBinLabel(2, "coarse", 1);
507  }
508 
509  }
510 
514  std::string dttf_trk_folder_inclusive = dttf_trk_folder + "/01-INCLUSIVE";
515  ibooker.setCurrentFolder(dttf_trk_folder_inclusive);
516 
517 
518  sprintf(hname, "dttf_01_nTracksPerEvent_integ");
519  sprintf(htitle, "Number of DTTF Tracks Per Event");
520  dttf_nTracksPerEvent_integ = ibooker.book1D(hname, htitle, 20, 0.5, 20.5);
521  dttf_nTracksPerEvent_integ->setAxisTitle("# tracks/event", 1);
522 
524  // sprintf(hname, "dttf_10_qual_eta_distr");
525  // sprintf(htitle, "DTTF Tracks Quality vs Eta Distribution");
526  // dttf_qual_eta_integ = dbe_->book2D(hname, htitle, 64, 0, 64, 7, 1, 8);
527  // setQualLabel( dttf_qual_eta_integ, 2);
528 
530  if ( online_ ) {
531  sprintf(hname, "dttf_04_tracks_occupancy_by_lumi");
532  sprintf(htitle, "DTTF Tracks in the last LumiSections");
533  dttf_spare = ibooker.book2D(hname, htitle, 6, 0, 6, 12, 1, 13);
535  dttf_spare->setAxisTitle("Sector", 2);
536  dttf_spare->getTH2F()->GetXaxis()->SetNdivisions(12);
537  } else {
538 
539  sprintf(hname, "dttf_04_global_muons_request");
540  sprintf(htitle, "Tracks compatible with a Global Muon in the Barrel");
541  dttf_spare = ibooker.book1D(hname, htitle, 4, -0.5, 3.5 );
542  dttf_spare->setBinLabel(1, "No tracks", 1);
543  dttf_spare->setBinLabel(2, "No tracks but GM", 1);
544  dttf_spare->setBinLabel(3, "Tracks wo GM", 1);
545  dttf_spare->setBinLabel(4, "Tracks w GM", 1);
546 
547  }
548 
549  std::string dttf_trk_folder_integrated_gmt =
550  dttf_trk_folder + "/08-GMT_MATCH";
551  ibooker.setCurrentFolder(dttf_trk_folder_integrated_gmt);
552 
553  sprintf(hname, "dttf_tracks_with_gmt_match");
554  sprintf(htitle, "DTTF Tracks With a Match in GMT");
555  dttf_gmt_match = ibooker.book2D(hname, htitle, 6, 0., 6., 12, 1., 13.);
557 
558  sprintf(hname, "dttf_tracks_without_gmt_match");
559  sprintf(htitle, "DTTF Tracks Without a Match in GMT");
560  dttf_gmt_missed = ibooker.book2D(hname, htitle, 6, 0., 6., 12, 1., 13.);
562 
563  sprintf(hname, "dttf_missing_tracks_in_gmt");
564  sprintf(htitle, "GMT Tracks Without a Corresponding Track in DTTF");
565  dttf_gmt_ghost = ibooker.book2D(hname, htitle, 5, -2, 3, 12, 1, 13.);
566 
567  dttf_gmt_ghost->setBinLabel(1, "N2", 1);
568  dttf_gmt_ghost->setBinLabel(2, "N1", 1);
569  dttf_gmt_ghost->setBinLabel(3, "N0/P0", 1);
570  dttf_gmt_ghost->setBinLabel(4, "P1", 1);
571  dttf_gmt_ghost->setBinLabel(5, "P2", 1);
572 
573 
574  // sprintf(hname, "dttf_eta_phi_missing_tracks_in_gmt");
575  // sprintf(htitle, "GMT Tracks Without a Corresponding Track in DTTF");
576  // dttf_gmt_ghost_phys = dbe_->book2D(hname, htitle, 64, 0., 64., 144, 0., 144. );
577 
578 }
Definition: start.py:1
std::string l1tsubsystemfolder_
Definition: L1TDTTF.h:60
MonitorElement * dttf_phi_eta_coarse_wheel[6]
Definition: L1TDTTF.h:70
void bookEta(int wh, int &nbins, float &start, float &stop)
Definition: L1TDTTF.cc:1015
MonitorElement * dttf_nTracksPerEvent_wheel[6]
Definition: L1TDTTF.h:66
MonitorElement * dttf_phi_eta_fine_wheel[6]
Definition: L1TDTTF.h:69
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
void setWheelLabel(MonitorElement *me)
Definition: L1TDTTF.cc:1001
MonitorElement * dttf_gmt_match
Definition: L1TDTTF.h:90
MonitorElement * dttf_phi_wheel_2ndTrack[6]
Definition: L1TDTTF.h:73
MonitorElement * dttf_nTracksPerEvent_integ
Definition: L1TDTTF.h:87
MonitorElement * dttf_pt_wheel_2ndTrack[6]
Definition: L1TDTTF.h:74
MonitorElement * dttf_eta_wheel_2ndTrack[6]
Definition: L1TDTTF.h:72
MonitorElement * dttf_qual[6][12]
Definition: L1TDTTF.h:80
MonitorElement * dttf_quality_wheel_2ndTrack[6]
Definition: L1TDTTF.h:67
MonitorElement * dttf_phi[6][12]
Definition: L1TDTTF.h:83
MonitorElement * dttf_gmt_missed
Definition: L1TDTTF.h:91
MonitorElement * dttf_quality_summary_wheel_2ndTrack[6]
Definition: L1TDTTF.h:68
MonitorElement * dttf_eta_fine_fraction[6][12]
Definition: L1TDTTF.h:81
TH2F * getTH2F() const
MonitorElement * dttf_bx[6][12]
Definition: L1TDTTF.h:78
int nev_dttf_track2_
Definition: L1TDTTF.h:98
MonitorElement * dttf_gmt_ghost
Definition: L1TDTTF.h:92
MonitorElement * dttf_bx_2ndTrack[6][12]
Definition: L1TDTTF.h:79
int nev_dttf_
Definition: L1TDTTF.h:97
MonitorElement * dttf_q_wheel_2ndTrack[6]
Definition: L1TDTTF.h:75
MonitorElement * dttf_eta[6][12]
Definition: L1TDTTF.h:82
bool online_
Definition: L1TDTTF.h:61
MonitorElement * dttf_nTracksPerEv[6][12]
Definition: L1TDTTF.h:77
MonitorElement * dttf_pt[6][12]
Definition: L1TDTTF.h:84
MonitorElement * dttf_phi_eta_wheel_2ndTrack[6]
Definition: L1TDTTF.h:71
MonitorElement * dttf_spare
Definition: L1TDTTF.h:88
int nev_
Definition: L1TDTTF.h:96
MonitorElement * dttf_q[6][12]
Definition: L1TDTTF.h:85
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void setQualLabel(MonitorElement *me, int axis)
Definition: L1TDTTF.cc:986
void L1TDTTF::dqmBeginRun ( edm::Run const &  ,
edm::EventSetup const &   
)
overrideprotectedvirtual

Reimplemented from DQMEDAnalyzer.

Definition at line 245 of file L1TDTTF.cc.

245  {
246  //empty
247 }
void L1TDTTF::fillMEs ( std::vector< L1MuDTTrackCand > const *  trackContainer,
std::vector< L1MuRegionalCand > &  gmtDttfCands 
)
private

Forget N0 with zero eta value for physical values

from 0 to 11

from 1 to 12

wh has possible values {-3,-2,-1,1,2,3}

make wh2 go from 0 to 5

useful conversions

calculate phi in physical coordinates: keep it int, set labels later

new attempt

Fill per sector bx WHEEL_s/dttf_bx_whs

Fill per sector 2nd bx

WHEEL_s/BX_SECTORS/TRACK_2_ONLY/dttf_bx_2ndTrack_whs_sed

COUNTERS global

Fill per sector phi: WHEEL_s/BX_d/dttf_phi_whs_sed

Fill per sector quality WHEEL_s/BX_d/dttf_qual_whs_sed

Fill per sector pt WHEEL_s/BX_d/dttf_pt_whs_sed

Fill per sector charge WHEEL_s/BX_d/dttf_q_whs_sed

Fill per sector eta WHEEL_s/BX_d/dttf_eta_whs_sed

WHEEL_s/dttf_phi_eta_whs

WHEEL_s/dttf_phi_eta_whs

Only for online: INCLUSIVE/dttf_occupancy_summary_r

second track summary

WHEEL_s/dttf_phi_integ

WHEEL_s/dttf_pt_integ

WHEEL_s/dttf_eta_integ

WHEEL_s/dttf_qual_integ

WHEEL_s/dttf_q_integ

WHEEL_s/dttf_quality_whs

WHEEL_s/dttf_phi_eta_whs

gmt phi_packed() goes from 0 to 143

calculate phi in physical coordinates: keep it int, set labels later

Definition at line 787 of file L1TDTTF.cc.

References dttf_bx, dttf_bx_2ndTrack, dttf_eta, dttf_eta_fine_fraction, dttf_eta_wheel_2ndTrack, dttf_gmt_match, dttf_gmt_missed, dttf_phi, dttf_phi_eta_coarse_wheel, dttf_phi_eta_fine_wheel, dttf_phi_eta_wheel_2ndTrack, dttf_phi_wheel_2ndTrack, dttf_pt, dttf_pt_wheel_2ndTrack, dttf_q, dttf_q_wheel_2ndTrack, dttf_qual, dttf_quality_summary_wheel_2ndTrack, dttf_quality_wheel_2ndTrack, dttf_spare, MonitorElement::Fill(), match(), numTracks, online_, HiIsolationCommonParameters_cff::track, and verbose_.

Referenced by analyze().

789 {
790 
791  L1MuDTTrackContainer::TrackContainer::const_iterator track
792  = trackContainer->begin();
793  L1MuDTTrackContainer::TrackContainer::const_iterator trackEnd
794  = trackContainer->end();
795 
796  for ( ; track != trackEnd; ++track ) {
797 
798  if ( verbose_ ) {
799  edm::LogInfo("L1TDTTF::Analyze") << "bx = " << track->bx();
800  edm::LogInfo("L1TDTTF::Analyze") << "quality (packed) = "
801  << track->quality_packed();
802  edm::LogInfo("L1TDTTF::Analyze") << "pt (packed) = "
803  << track->pt_packed()
804  << " , pt (GeV) = " << track->ptValue();
805  edm::LogInfo("L1TDTTF::Analyze") << "phi (packed) = "
806  << track->phi_packed()
807  << " , phi (rad) = " << track->phiValue();
808  edm::LogInfo("L1TDTTF::Analyze") << "charge (packed) = "
809  << track->charge_packed();
810  }
811 
812 
814  if ( ( track->whNum() == -1 ) && ! track->eta_packed() ) {
815  edm::LogInfo("L1TDTTF::Analyze") << "Skipping N0 with zero eta value";
816 
817  continue;
818  }
819 
820 
821  int bxindex = track->bx() + 1;
822  int se = track->scNum();
823  int sector = se + 1;
824  int whindex = track->whNum();
825 
826  whindex = ( whindex < 0 ) ? whindex + 3 : whindex + 2;
827 
828  if ( whindex < 0 || whindex > 5 ) {
829  edm::LogError("L1TDTTF::Analyze::WHEEL_ERROR") << track->whNum()
830  << "(" << whindex << ")";
831  continue;
832  }
833 
834  if ( se < 0 || se > 11 ) {
835  edm::LogError("L1TDTTF::Analyze::SECTOR_ERROR") << se;
836  continue;
837  }
838 
840 
842  // int phi_local = track->phi_packed();//range: 0 < phi_local < 31
843  // if ( phi_local > 15 ) phi_local -= 32; //range: -16 < phi_local < 15
844 
845  // int phi_global = phi_local + se * 12; //range: -16 < phi_global < 147
846  // if(phi_global < 0) phi_global += 144; //range: 0 < phi_global < 147
847  // if(phi_global > 143) phi_global -= 144; //range: 0 < phi_global < 143
848  // // float phi_phys = phi_global * 2.5 + 1.25;
849 
851  int phi_global = track->phi_packed();
852  phi_global = (phi_global > 15 ? phi_global - 32 : phi_global ) + se * 12;
853  if ( phi_global < -6 ) phi_global += 144; //range: 0 < phi_global < 147
854  if ( phi_global > 137 ) phi_global -= 144; //range: 0 < phi_global < 143
855 
856  // int eta_global = track->eta_packed();
857  // int eta_global = track->eta_packed() - 32;
858  // dttf_eta[bxindex][whindex][se]->Fill(eta_global);
859  // float eta_phys = eta_global / 2.4 ;
860 
864 
866  dttf_bx[whindex][se]->Fill(track->bx());
867 
869  if( track->TrkTag() == 1 ) {
870 
872  dttf_bx_2ndTrack[whindex][se]->Fill(track->bx());
873 
874  }
875 
879 
880 
881  if ( bxindex == 1 ) {
882 
884  ++numTracks[whindex][se];
885 
887  dttf_phi[whindex][se]->Fill(phi_global);
888 
890  dttf_qual[whindex][se]->Fill(track->quality_packed());
891 
893  dttf_pt[whindex][se]->Fill(track->pt_packed());
894 
896  dttf_q[whindex][se]->Fill(track->charge_packed());
897 
898 
900  dttf_eta[whindex][se]->Fill( track->eta_packed() );
901 
902  if( track->isFineHalo() ) {
903 
904  dttf_eta_fine_fraction[whindex][se]->Fill( 0 );
905 
907  dttf_phi_eta_fine_wheel[whindex]->Fill( track->eta_packed(), phi_global );
908 
909  } else {
910 
911  dttf_eta_fine_fraction[whindex][se]->Fill( 1 );
912 
914  dttf_phi_eta_coarse_wheel[whindex]->Fill( track->eta_packed(), phi_global );
915  }
916 
918  if ( online_ ) {
919  dttf_spare->Fill( whindex, sector );
920  }
921 
923  // dttf_qual_eta_integ->Fill(track->eta_packed(), track->quality_packed());
924 
926  if ( track->TrkTag() == 1 ) {
927 
929  dttf_phi_wheel_2ndTrack[whindex]->Fill(phi_global);
930 
932  dttf_pt_wheel_2ndTrack[whindex]->Fill(track->pt_packed());
933 
935  dttf_eta_wheel_2ndTrack[whindex]->Fill(track->eta_packed());
936 
938  dttf_quality_wheel_2ndTrack[whindex]->Fill(track->quality_packed());
939 
941  dttf_q_wheel_2ndTrack[whindex]->Fill(track->charge_packed());
942 
944  dttf_quality_summary_wheel_2ndTrack[whindex]->Fill( sector, track->quality_packed() );
945 
947  dttf_phi_eta_wheel_2ndTrack[whindex]->Fill( track->eta_packed(), phi_global );
948 
949  }
950 
952  bool match = false;
953  std::vector<L1MuRegionalCand>::iterator dttfCand;
955  unsigned int gmt_phi = ( phi_global < 0 ? phi_global + 144 : phi_global );
956 
957  for ( dttfCand = gmtDttfCands.begin(); dttfCand != gmtDttfCands.end();
958  ++dttfCand ) {
959 
961  if ( dttfCand->empty() ) continue;
962  if ( ( dttfCand->phi_packed() == gmt_phi ) &&
963  dttfCand->quality_packed() == track->quality_packed() ) {
964  match = true;
965  dttfCand->reset();
966  break;
967  }
968 
969 
970  }
971 
972  if ( match ) {
973  dttf_gmt_match->Fill( whindex, sector );
974  } else {
975  dttf_gmt_missed->Fill( whindex, sector );
976  }
977 
978  }
979 
980  }
981 
982 }
MonitorElement * dttf_phi_eta_coarse_wheel[6]
Definition: L1TDTTF.h:70
MonitorElement * dttf_phi_eta_fine_wheel[6]
Definition: L1TDTTF.h:69
MonitorElement * dttf_gmt_match
Definition: L1TDTTF.h:90
MonitorElement * dttf_phi_wheel_2ndTrack[6]
Definition: L1TDTTF.h:73
void Fill(long long x)
MonitorElement * dttf_pt_wheel_2ndTrack[6]
Definition: L1TDTTF.h:74
MonitorElement * dttf_eta_wheel_2ndTrack[6]
Definition: L1TDTTF.h:72
MonitorElement * dttf_qual[6][12]
Definition: L1TDTTF.h:80
MonitorElement * dttf_quality_wheel_2ndTrack[6]
Definition: L1TDTTF.h:67
MonitorElement * dttf_phi[6][12]
Definition: L1TDTTF.h:83
MonitorElement * dttf_gmt_missed
Definition: L1TDTTF.h:91
MonitorElement * dttf_quality_summary_wheel_2ndTrack[6]
Definition: L1TDTTF.h:68
MonitorElement * dttf_eta_fine_fraction[6][12]
Definition: L1TDTTF.h:81
MonitorElement * dttf_bx[6][12]
Definition: L1TDTTF.h:78
int numTracks[6][12]
Definition: L1TDTTF.h:99
bool verbose_
Definition: L1TDTTF.h:62
MonitorElement * dttf_bx_2ndTrack[6][12]
Definition: L1TDTTF.h:79
MonitorElement * dttf_q_wheel_2ndTrack[6]
Definition: L1TDTTF.h:75
MonitorElement * dttf_eta[6][12]
Definition: L1TDTTF.h:82
bool online_
Definition: L1TDTTF.h:61
MonitorElement * dttf_pt[6][12]
Definition: L1TDTTF.h:84
MonitorElement * dttf_phi_eta_wheel_2ndTrack[6]
Definition: L1TDTTF.h:71
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
MonitorElement * dttf_spare
Definition: L1TDTTF.h:88
MonitorElement * dttf_q[6][12]
Definition: L1TDTTF.h:85
void L1TDTTF::setQualLabel ( MonitorElement me,
int  axis 
)
private

Definition at line 986 of file L1TDTTF.cc.

References MonitorElement::setAxisTitle(), and MonitorElement::setBinLabel().

Referenced by bookHistograms().

987 {
988 
989  if( axis == 1 )
990  me->setAxisTitle("Quality", axis);
991  me->setBinLabel(1, "T34", axis);
992  me->setBinLabel(2, "T23/24", axis);
993  me->setBinLabel(3, "T12/13/14", axis);
994  me->setBinLabel(4, "T234", axis);
995  me->setBinLabel(5, "T134", axis);
996  me->setBinLabel(6, "T123/124", axis);
997  me->setBinLabel(7, "T1234", axis);
998 }
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void L1TDTTF::setWheelLabel ( MonitorElement me)
private

Definition at line 1001 of file L1TDTTF.cc.

References MonitorElement::setAxisTitle(), and MonitorElement::setBinLabel().

Referenced by bookHistograms().

1002 {
1003  me->setAxisTitle("Wheel", 1);
1004  me->setBinLabel(1, "N2", 1);
1005  me->setBinLabel(2, "N1", 1);
1006  me->setBinLabel(3, "N0", 1);
1007  me->setBinLabel(4, "P0", 1);
1008  me->setBinLabel(5, "P1", 1);
1009  me->setBinLabel(6, "P2", 1);
1010 }
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)

Member Data Documentation

MonitorElement* L1TDTTF::dttf_bx[6][12]
private

Definition at line 78 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_bx_2ndTrack[6][12]
private

Definition at line 79 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_eta[6][12]
private

Definition at line 82 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_eta_fine_fraction[6][12]
private

Definition at line 81 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_eta_wheel_2ndTrack[6]
private

Definition at line 72 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_gmt_ghost
private

Definition at line 92 of file L1TDTTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTF::dttf_gmt_match
private

Definition at line 90 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_gmt_missed
private

Definition at line 91 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_nTracksPerEv[6][12]
private

Definition at line 77 of file L1TDTTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTF::dttf_nTracksPerEvent_integ
private

Definition at line 87 of file L1TDTTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTF::dttf_nTracksPerEvent_wheel[6]
private

Definition at line 66 of file L1TDTTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTF::dttf_phi[6][12]
private

Definition at line 83 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_phi_eta_coarse_wheel[6]
private

Definition at line 70 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_phi_eta_fine_wheel[6]
private

Definition at line 69 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_phi_eta_wheel_2ndTrack[6]
private

Definition at line 71 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_phi_wheel_2ndTrack[6]
private

Definition at line 73 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_pt[6][12]
private

Definition at line 84 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_pt_wheel_2ndTrack[6]
private

Definition at line 74 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_q[6][12]
private

Definition at line 85 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_q_wheel_2ndTrack[6]
private

Definition at line 75 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_qual[6][12]
private

Definition at line 80 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_quality_summary_wheel_2ndTrack[6]
private

Definition at line 68 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_quality_wheel_2ndTrack[6]
private

Definition at line 67 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_spare
private

Definition at line 88 of file L1TDTTF.h.

Referenced by analyze(), bookHistograms(), and fillMEs().

edm::InputTag L1TDTTF::dttpgSource_
private

Definition at line 57 of file L1TDTTF.h.

Referenced by analyze(), and L1TDTTF().

edm::InputTag L1TDTTF::gmtSource_
private

Definition at line 58 of file L1TDTTF.h.

Referenced by analyze().

edm::EDGetTokenT<L1MuGMTReadoutCollection> L1TDTTF::gmtSourceToken_
private

Definition at line 104 of file L1TDTTF.h.

Referenced by analyze(), and L1TDTTF().

std::string L1TDTTF::l1tsubsystemfolder_
private

Definition at line 60 of file L1TDTTF.h.

Referenced by bookHistograms().

edm::InputTag L1TDTTF::muonCollectionLabel_
private

Definition at line 59 of file L1TDTTF.h.

Referenced by analyze().

edm::EDGetTokenT<reco::MuonCollection> L1TDTTF::muonCollectionToken_
private

Definition at line 103 of file L1TDTTF.h.

Referenced by analyze(), and L1TDTTF().

int L1TDTTF::nev_
private

Definition at line 96 of file L1TDTTF.h.

Referenced by analyze(), and bookHistograms().

int L1TDTTF::nev_dttf_
private

Definition at line 97 of file L1TDTTF.h.

Referenced by analyze(), and bookHistograms().

int L1TDTTF::nev_dttf_track2_
private

Definition at line 98 of file L1TDTTF.h.

Referenced by analyze(), and bookHistograms().

int L1TDTTF::numTracks[6][12]
private

Definition at line 99 of file L1TDTTF.h.

Referenced by analyze(), and fillMEs().

bool L1TDTTF::online_
private

Definition at line 61 of file L1TDTTF.h.

Referenced by analyze(), bookHistograms(), and fillMEs().

std::string L1TDTTF::outputFile_
private

Definition at line 63 of file L1TDTTF.h.

Referenced by L1TDTTF().

edm::InputTag L1TDTTF::trackInputTag_
private

Definition at line 64 of file L1TDTTF.h.

Referenced by L1TDTTF().

edm::EDGetTokenT<L1MuDTTrackContainer> L1TDTTF::trackInputToken_
private

Definition at line 102 of file L1TDTTF.h.

Referenced by analyze(), and L1TDTTF().

bool L1TDTTF::verbose_
private

Definition at line 62 of file L1TDTTF.h.

Referenced by analyze(), fillMEs(), and L1TDTTF().