CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > > edm::stream::EDAnalyzerBase edm::EDConsumerBase

Public Member Functions

 L1TDTTF (const edm::ParameterSet &ps)
 base services More...
 
virtual ~L1TDTTF ()
 
- Public Member Functions inherited from DQMEDAnalyzer
virtual void beginRun (edm::Run const &, edm::EventSetup const &) final
 
virtual void beginStream (edm::StreamID id) final
 
 DQMEDAnalyzer (void)
 
virtual void endLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
virtual void endRunSummary (edm::Run const &, edm::EventSetup const &, dqmDetails::NoCache *) const final
 
uint32_t streamId () const
 
- Public Member Functions inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
 EDAnalyzer ()=default
 
- Public Member Functions inherited from edm::stream::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
virtual ~EDAnalyzerBase ()
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
 EDConsumerBase ()
 
ProductHolderIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
 
std::vector
< ProductHolderIndexAndSkipBit >
const & 
itemsToGetFromEvent () const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesDependentUpon (std::string const &iProcessName, std::string const &iModuleLabel, bool iPrint, std::vector< char const * > &oModuleLabels) const
 
void modulesWhoseProductsAreConsumed (std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
bool registeredToConsume (ProductHolderIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void updateLookup (BranchType iBranchType, ProductHolderIndexHelper const &)
 
virtual ~EDConsumerBase ()
 

Protected Member Functions

void analyze (const edm::Event &e, const edm::EventSetup &c)
 
virtual void beginLuminosityBlock (edm::LuminosityBlock const &, edm::EventSetup const &)
 
virtual void bookHistograms (DQMStore::IBooker &i, edm::Run const &, edm::EventSetup const &) override
 
virtual void dqmBeginRun (edm::Run const &, edm::EventSetup const &)
 
- 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
< L1MuGMTReadoutCollection
gmtSourceToken_
 
std::string l1tsubsystemfolder_
 
edm::InputTag muonCollectionLabel_
 
edm::EDGetTokenT
< reco::MuonCollection
muonCollectionToken_
 
int nev_
 
int nev_dttf_
 
int nev_dttf_track2_
 
int numTracks [6][12]
 
bool online_
 
std::string outputFile_
 
edm::InputTag trackInputTag_
 
edm::EDGetTokenT
< L1MuDTTrackContainer
trackInputToken_
 
bool verbose_
 

Additional Inherited Members

- Public Types inherited from edm::stream::EDAnalyzer< edm::RunSummaryCache< dqmDetails::NoCache >, edm::LuminosityBlockSummaryCache< dqmDetails::NoCache > >
typedef CacheContexts< T...> CacheTypes
 
typedef CacheTypes::GlobalCache GlobalCache
 
typedef AbilityChecker< T...> HasAbility
 
typedef
CacheTypes::LuminosityBlockCache 
LuminosityBlockCache
 
typedef
LuminosityBlockContextT
< LuminosityBlockCache,
RunCache, GlobalCache
LuminosityBlockContext
 
typedef
CacheTypes::LuminosityBlockSummaryCache 
LuminosityBlockSummaryCache
 
typedef CacheTypes::RunCache RunCache
 
typedef RunContextT< RunCache,
GlobalCache
RunContext
 
typedef CacheTypes::RunSummaryCache RunSummaryCache
 
- Public Types inherited from edm::stream::EDAnalyzerBase
typedef EDAnalyzerAdaptorBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 
- Static Public Member Functions inherited from DQMEDAnalyzer
static std::shared_ptr
< dqmDetails::NoCache
globalBeginLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *)
 
static std::shared_ptr
< dqmDetails::NoCache
globalBeginRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *)
 
static void globalEndLuminosityBlockSummary (edm::LuminosityBlock const &, edm::EventSetup const &, LuminosityBlockContext const *, dqmDetails::NoCache *)
 
static void globalEndRunSummary (edm::Run const &, edm::EventSetup const &, RunContext const *, dqmDetails::NoCache *)
 
- Static Public Member Functions inherited from edm::stream::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 

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_, HLT_FULL_cff::InputTag, 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:61
edm::InputTag trackInputTag_
Definition: L1TDTTF.h:65
edm::InputTag muonCollectionLabel_
Definition: L1TDTTF.h:60
edm::InputTag gmtSource_
Definition: L1TDTTF.h:59
std::string outputFile_
Definition: L1TDTTF.h:64
edm::EDGetTokenT< L1MuGMTReadoutCollection > gmtSourceToken_
Definition: L1TDTTF.h:105
edm::InputTag dttpgSource_
Definition: L1TDTTF.h:58
edm::EDGetTokenT< L1MuDTTrackContainer > trackInputToken_
Definition: L1TDTTF.h:103
bool verbose_
Definition: L1TDTTF.h:63
edm::EDGetTokenT< reco::MuonCollection > muonCollectionToken_
Definition: L1TDTTF.h:104
std::string const & label() const
Definition: InputTag.h:36
std::string const & process() const
Definition: InputTag.h:40
bool online_
Definition: L1TDTTF.h:62
L1TDTTF::~L1TDTTF ( )
virtual

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 
)
protectedvirtual

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

Implements edm::stream::EDAnalyzerBase.

Definition at line 584 of file L1TDTTF.cc.

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

586 {
587 
588 
589  if ( verbose_ )
590  edm::LogInfo("L1TDTTF::Analyze::start") << "#################### START";
591 
593  ++nev_;
594  memset( numTracks, 0, 72 * sizeof(int) );
595 
597  edm::Handle<L1MuDTTrackContainer > myL1MuDTTrackContainer;
598  try {
599  event.getByToken(trackInputToken_, myL1MuDTTrackContainer);
600  } catch (cms::Exception& iException) {
601  edm::LogError("L1TDTTF::analyze::DataNotFound")
602  << "can't getByToken L1MuDTTrackContainer with label "
603  << dttpgSource_.label() << ":DATA:" << dttpgSource_.process();
604  return;
605  }
606 
607  if ( !myL1MuDTTrackContainer.isValid() ) {
608  edm::LogError("L1TDTTF::analyze::DataNotFound")
609  << "can't find L1MuDTTrackContainer with label "
610  << dttpgSource_.label() << ":DATA:" << dttpgSource_.process();
611  return;
612  }
613 
614  L1MuDTTrackContainer::TrackContainer const * trackContainer =
615  myL1MuDTTrackContainer->getContainer();
616 
618  if ( trackContainer->size() > 0 ) {
619  ++nev_dttf_;
620  if( trackContainer->size() > 1 ) ++nev_dttf_track2_;
621  }
622 
626  bool accept = true;
627  if ( ! online_ ) {
628 
629  try {
630 
632  event.getByToken(muonCollectionToken_, muons);
633  accept = false;
634  if ( muons.isValid() ) {
635  for (reco::MuonCollection::const_iterator recoMu = muons->begin();
636  recoMu!=muons->end(); ++recoMu ) {
637  if ( fabs( recoMu->eta() ) < 1.4 ) {
638  if ( verbose_ ) {
639  edm::LogInfo("L1TDTTFClient::Analyze:GM") << "Found a global muon!";
640  }
641  accept = true;
642  break;
643  }
644 
645  }
646 
648  if ( ! accept ) {
649  dttf_spare->Fill( trackContainer->size() ? 1 : 0 );
650 
651  if ( verbose_ ) {
652  edm::LogInfo("L1TDTTFClient::Analyze:GM")
653  << "No global muons in this event!";
654  }
655 
656  } else {
657  dttf_spare->Fill( trackContainer->size() ? 2 : 3 );
658  }
659 
660  } else {
662  accept = true;
663  edm::LogWarning("L1TDTTFClient::Analyze:GM")
664  << "Invalid MuonCollection with label "
666  }
667 
668 
669  } catch (cms::Exception& iException) {
671  accept = true;
672  edm::LogError("DataNotFound") << "Unable to getByToken MuonCollection with label "
674  }
675 
676  }
677 
678 
680  std::vector<L1MuRegionalCand> gmtBx0DttfCandidates;
681 
682  try {
683 
685  event.getByToken(gmtSourceToken_, pCollection);
686 
687  if ( !pCollection.isValid() ) {
688  edm::LogError("DataNotFound") << "can't find L1MuGMTReadoutCollection with label "
689  << gmtSource_.label() ;
690  }
691 
692  // get GMT readout collection
693  L1MuGMTReadoutCollection const* gmtrc = pCollection.product();
694  std::vector<L1MuGMTReadoutRecord> gmt_records = gmtrc->getRecords();
695 
696  std::vector<L1MuGMTReadoutRecord>::const_iterator RRItr;
697 
698  for ( RRItr = gmt_records.begin(); RRItr != gmt_records.end(); ++RRItr ) {
699 
700  std::vector<L1MuRegionalCand> dttfCands = RRItr->getDTBXCands();
701  std::vector<L1MuRegionalCand>::iterator dttfCand;
702 
703  for( dttfCand = dttfCands.begin(); dttfCand != dttfCands.end();
704  ++dttfCand ) {
705 
706  if(dttfCand->empty()) continue;
708  if ( RRItr->getBxInEvent() ) continue;
709 
710  // dttf_gmt_ghost_phys->Fill( dttfCand->eta_packed(),
711  // dttfCand->phi_packed() );
712  gmtBx0DttfCandidates.push_back( *dttfCand );
713 
714  }
715  }
716 
717  } catch (cms::Exception& iException) {
718  edm::LogError("DataNotFound") << "Unable to getByToken L1MuGMTReadoutCollection with label "
719  << gmtSource_.label() ;
720  }
721 
722 
723  // fill MEs if all selections are passed
724  if ( accept ) fillMEs( trackContainer, gmtBx0DttfCandidates );
725 
727  std::vector<L1MuRegionalCand>::iterator dttfCand;
728  for( dttfCand = gmtBx0DttfCandidates.begin();
729  dttfCand != gmtBx0DttfCandidates.end(); ++dttfCand ) {
730  if( dttfCand->empty() ) continue;
731 
735  int phi= dttfCand->phi_packed();
736  int sector = 1 + (phi + 6)/12;
737  if (sector > 12 ) sector -= 12;
738  double eta = dttfCand->etaValue();
739 
740  int wheel = -3;
741  if ( eta < -0.74 ) {
742  wheel = -2;
743  } else if ( eta < -0.3 ) {
744  wheel = -1;
745 
746  } else if ( eta < 0.3 ) {
747  wheel = 0;
748 
749  } else if ( eta < 0.74 ) {
750  wheel = 1;
751  } else {
752  wheel = 2;
753  }
754 
755  dttf_gmt_ghost->Fill( wheel, sector );
756  // dttf_gmt_ghost_phys->Fill( dttfCand->eta_packed(),
757  // dttfCand->phi_packed() );
758  }
759 
760 
762  int numTracksInt = 0;
763 
764  for ( int w = 0; w < 6; ++w ) {
765 
766  int numTracks_wh = 0;
767  for ( int s = 0; s < 12; ++s ) {
768 
770 
771  numTracks_wh += numTracks[w][s];
772 
773  }
774 
775  numTracksInt += numTracks_wh;
776  dttf_nTracksPerEvent_wheel[w]->Fill( numTracks_wh );
777 
778  }
779 
780  dttf_nTracksPerEvent_integ->Fill( numTracksInt );
781 
782 
783 
784 }
const double w
Definition: UKUtility.cc:23
edm::InputTag muonCollectionLabel_
Definition: L1TDTTF.h:60
MonitorElement * dttf_nTracksPerEvent_wheel[6]
Definition: L1TDTTF.h:67
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:88
edm::InputTag gmtSource_
Definition: L1TDTTF.h:59
edm::EDGetTokenT< L1MuGMTReadoutCollection > gmtSourceToken_
Definition: L1TDTTF.h:105
edm::InputTag dttpgSource_
Definition: L1TDTTF.h:58
std::vector< L1MuDTTrackCand > TrackContainer
edm::EDGetTokenT< L1MuDTTrackContainer > trackInputToken_
Definition: L1TDTTF.h:103
void fillMEs(std::vector< L1MuDTTrackCand > const *trackContainer, std::vector< L1MuRegionalCand > &gmtDttfCands)
Definition: L1TDTTF.cc:790
bool isValid() const
Definition: HandleBase.h:75
int nev_dttf_track2_
Definition: L1TDTTF.h:99
int numTracks[6][12]
Definition: L1TDTTF.h:100
T const * product() const
Definition: Handle.h:81
bool verbose_
Definition: L1TDTTF.h:63
MonitorElement * dttf_gmt_ghost
Definition: L1TDTTF.h:93
edm::EDGetTokenT< reco::MuonCollection > muonCollectionToken_
Definition: L1TDTTF.h:104
int nev_dttf_
Definition: L1TDTTF.h:98
std::string const & label() const
Definition: InputTag.h:36
std::string const & process() const
Definition: InputTag.h:40
tuple muons
Definition: patZpeak.py:38
bool online_
Definition: L1TDTTF.h:62
std::vector< L1MuGMTReadoutRecord > const & getRecords() const
MonitorElement * dttf_nTracksPerEv[6][12]
Definition: L1TDTTF.h:78
MonitorElement * dttf_spare
Definition: L1TDTTF.h:89
int nev_
Definition: L1TDTTF.h:97
void L1TDTTF::beginLuminosityBlock ( edm::LuminosityBlock const &  l,
edm::EventSetup const &  c 
)
protectedvirtual

Reimplemented from edm::stream::EDAnalyzerBase.

Definition at line 249 of file L1TDTTF.cc.

249  {
250  //empty
251 }
void L1TDTTF::bookEta ( int  wh,
int &  nbins,
float &  start,
float &  stop 
)
private

Definition at line 1018 of file L1TDTTF.cc.

Referenced by bookHistograms().

1019 {
1020 
1021  switch ( wh ) {
1022  case 0 : start = 0; stop = 18; nbins = 18; break; // N2
1023  case 1 : start = 8; stop = 28; nbins = 20; break; // N1
1024  case 2 : start = 22; stop = 32; nbins = 10; break; // N0
1025  case 3 : start = 22; stop = 42; nbins = 20; break; // P0
1026  case 4 : start = 36; stop = 56; nbins = 20; break; // P1
1027  case 5 : start = 46; stop = 64; nbins = 18; break; // P2
1028  default : start = 0; stop = 0; nbins = 0; break; // BOH
1029  }
1030 
1031 }
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
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 254 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(), dqm_diff::start, and AlCaHLTBitMon_QueryRunRegistry::string.

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

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 790 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_, and verbose_.

Referenced by analyze().

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

Definition at line 989 of file L1TDTTF.cc.

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

Referenced by bookHistograms().

990 {
991 
992  if( axis == 1 )
993  me->setAxisTitle("Quality", axis);
994  me->setBinLabel(1, "T34", axis);
995  me->setBinLabel(2, "T23/24", axis);
996  me->setBinLabel(3, "T12/13/14", axis);
997  me->setBinLabel(4, "T234", axis);
998  me->setBinLabel(5, "T134", axis);
999  me->setBinLabel(6, "T123/124", axis);
1000  me->setBinLabel(7, "T1234", axis);
1001 }
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 1004 of file L1TDTTF.cc.

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

Referenced by bookHistograms().

1005 {
1006  me->setAxisTitle("Wheel", 1);
1007  me->setBinLabel(1, "N2", 1);
1008  me->setBinLabel(2, "N1", 1);
1009  me->setBinLabel(3, "N0", 1);
1010  me->setBinLabel(4, "P0", 1);
1011  me->setBinLabel(5, "P1", 1);
1012  me->setBinLabel(6, "P2", 1);
1013 }
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 79 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

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

Definition at line 80 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

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

Definition at line 83 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

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

Definition at line 82 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_eta_wheel_2ndTrack[6]
private

Definition at line 73 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_gmt_ghost
private

Definition at line 93 of file L1TDTTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTF::dttf_gmt_match
private

Definition at line 91 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_gmt_missed
private

Definition at line 92 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

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

Definition at line 78 of file L1TDTTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTF::dttf_nTracksPerEvent_integ
private

Definition at line 88 of file L1TDTTF.h.

Referenced by analyze(), and bookHistograms().

MonitorElement* L1TDTTF::dttf_nTracksPerEvent_wheel[6]
private

Definition at line 67 of file L1TDTTF.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 84 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_phi_eta_coarse_wheel[6]
private

Definition at line 71 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_phi_eta_fine_wheel[6]
private

Definition at line 70 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_phi_eta_wheel_2ndTrack[6]
private

Definition at line 72 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_phi_wheel_2ndTrack[6]
private

Definition at line 74 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

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

Definition at line 85 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_pt_wheel_2ndTrack[6]
private

Definition at line 75 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

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

Definition at line 86 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_q_wheel_2ndTrack[6]
private

Definition at line 76 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

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

Definition at line 81 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_quality_summary_wheel_2ndTrack[6]
private

Definition at line 69 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_quality_wheel_2ndTrack[6]
private

Definition at line 68 of file L1TDTTF.h.

Referenced by bookHistograms(), and fillMEs().

MonitorElement* L1TDTTF::dttf_spare
private

Definition at line 89 of file L1TDTTF.h.

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

edm::InputTag L1TDTTF::dttpgSource_
private

Definition at line 58 of file L1TDTTF.h.

Referenced by analyze(), and L1TDTTF().

edm::InputTag L1TDTTF::gmtSource_
private

Definition at line 59 of file L1TDTTF.h.

Referenced by analyze().

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

Definition at line 105 of file L1TDTTF.h.

Referenced by analyze(), and L1TDTTF().

std::string L1TDTTF::l1tsubsystemfolder_
private

Definition at line 61 of file L1TDTTF.h.

Referenced by bookHistograms().

edm::InputTag L1TDTTF::muonCollectionLabel_
private

Definition at line 60 of file L1TDTTF.h.

Referenced by analyze().

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

Definition at line 104 of file L1TDTTF.h.

Referenced by analyze(), and L1TDTTF().

int L1TDTTF::nev_
private

Definition at line 97 of file L1TDTTF.h.

Referenced by analyze(), and bookHistograms().

int L1TDTTF::nev_dttf_
private

Definition at line 98 of file L1TDTTF.h.

Referenced by analyze(), and bookHistograms().

int L1TDTTF::nev_dttf_track2_
private

Definition at line 99 of file L1TDTTF.h.

Referenced by analyze(), and bookHistograms().

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

Definition at line 100 of file L1TDTTF.h.

Referenced by analyze(), and fillMEs().

bool L1TDTTF::online_
private

Definition at line 62 of file L1TDTTF.h.

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

std::string L1TDTTF::outputFile_
private

Definition at line 64 of file L1TDTTF.h.

Referenced by L1TDTTF().

edm::InputTag L1TDTTF::trackInputTag_
private

Definition at line 65 of file L1TDTTF.h.

Referenced by L1TDTTF().

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

Definition at line 103 of file L1TDTTF.h.

Referenced by analyze(), and L1TDTTF().

bool L1TDTTF::verbose_
private

Definition at line 63 of file L1TDTTF.h.

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