CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
MuonAlignmentPreFilter Class Reference
Inheritance diagram for MuonAlignmentPreFilter:
edm::EDFilter edm::ProducerBase edm::EDConsumerBase edm::ProductRegistryHelper

Public Member Functions

 MuonAlignmentPreFilter (const edm::ParameterSet &)
 
 ~MuonAlignmentPreFilter () override
 
- Public Member Functions inherited from edm::EDFilter
 EDFilter ()
 
SerialTaskQueueglobalLuminosityBlocksQueue ()
 
SerialTaskQueueglobalRunsQueue ()
 
ModuleDescription const & moduleDescription () const
 
 ~EDFilter () 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
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
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)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void beginJob () override
 
void endJob () override
 
bool filter (edm::Event &, const edm::EventSetup &) override
 

Private Attributes

bool m_allowTIDTEC
 
double m_maxTrackEta
 
int m_minCSCHits
 
int m_minDTHits
 
int m_minTrackerHits
 
double m_minTrackEta
 
double m_minTrackP
 
double m_minTrackPt
 
edm::InputTag m_tracksTag
 

Additional Inherited Members

- Public Types inherited from edm::EDFilter
typedef EDFilter 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::EDFilter
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &)
 
static bool wantsGlobalLuminosityBlocks ()
 
static bool wantsGlobalRuns ()
 
static bool wantsStreamLuminosityBlocks ()
 
static bool wantsStreamRuns ()
 
- 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 ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
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)
 

Detailed Description

Description: pre-select events that are worth considering in muon alignment

$Id:$

Definition at line 31 of file MuonAlignmentPreFilter.cc.

Constructor & Destructor Documentation

MuonAlignmentPreFilter::MuonAlignmentPreFilter ( const edm::ParameterSet cfg)
explicit

Definition at line 56 of file MuonAlignmentPreFilter.cc.

57  : m_tracksTag(cfg.getParameter<edm::InputTag>("tracksTag"))
58  , m_minTrackPt(cfg.getParameter<double>("minTrackPt"))
59  , m_minTrackP(cfg.getParameter<double>("minTrackP"))
60  , m_allowTIDTEC(cfg.getParameter<bool>("allowTIDTEC"))
61  , m_minTrackerHits(cfg.getParameter<int>("minTrackerHits"))
62  , m_minDTHits(cfg.getParameter<int>("minDTHits"))
63  , m_minCSCHits(cfg.getParameter<int>("minCSCHits"))
64  , m_minTrackEta(cfg.getParameter<double>("minTrackEta"))
65  , m_maxTrackEta(cfg.getParameter<double>("maxTrackEta"))
66 {}
T getParameter(std::string const &) const
MuonAlignmentPreFilter::~MuonAlignmentPreFilter ( )
inlineoverride

Definition at line 35 of file MuonAlignmentPreFilter.cc.

35 {}

Member Function Documentation

void MuonAlignmentPreFilter::beginJob ( void  )
inlineoverrideprivatevirtual

Reimplemented from edm::EDFilter.

Definition at line 38 of file MuonAlignmentPreFilter.cc.

References filter().

38 {}
void MuonAlignmentPreFilter::endJob ( void  )
inlineoverrideprivatevirtual

Reimplemented from edm::EDFilter.

Definition at line 40 of file MuonAlignmentPreFilter.cc.

Referenced by o2olib.O2ORunMgr::executeJob().

40 {}
bool MuonAlignmentPreFilter::filter ( edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivate

Definition at line 70 of file MuonAlignmentPreFilter.cc.

References MuonSubdetId::CSC, DEFINE_FWK_MODULE, MuonSubdetId::DT, reco::TrackBase::eta(), edm::Event::getByLabel(), m_allowTIDTEC, m_maxTrackEta, m_minCSCHits, m_minDTHits, m_minTrackerHits, m_minTrackEta, m_minTrackP, m_minTrackPt, m_tracksTag, DetId::Muon, reco::TrackBase::p(), reco::TrackBase::pt(), reco::Track::recHits(), StripSubdetector::TEC, StripSubdetector::TID, HiIsolationCommonParameters_cff::track, pfDisplacedTrackerVertex_cfi::trackColl, and DetId::Tracker.

Referenced by beginJob(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::filter(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::find(), Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::setDataAccessor(), and Vispa.Plugins.Browser.BrowserTabController.BrowserTabController::switchCenterView().

71 {
73  iEvent.getByLabel(m_tracksTag, trackColl);
74 
75  // check if there's at least one interesting track:
76 
77  for (reco::TrackCollection::const_iterator it = trackColl->begin(); it != trackColl->end(); it++)
78  {
79  int tracker_numHits = 0;
80  bool contains_TIDTEC = false;
81  int dt_numHits = 0;
82  int csc_numHits = 0;
83 
84  const reco::Track* track = &(*it);
85 
86  if (track->pt() < m_minTrackPt || track->p() < m_minTrackP) continue;
87  if (track->eta() < m_minTrackEta || track->eta() > m_maxTrackEta ) continue;
88 
89  for(auto const& hit : track->recHits())
90  {
91  DetId id = hit->geographicalId();
92  if (id.det() == DetId::Tracker)
93  {
94  tracker_numHits++;
95  if (id.subdetId() == StripSubdetector::TID || id.subdetId() == StripSubdetector::TEC) contains_TIDTEC = true;
96  }
97 
98  if ( id.det() == DetId::Muon && id.subdetId() == MuonSubdetId::DT ) dt_numHits++;
99  if ( id.det() == DetId::Muon && id.subdetId() == MuonSubdetId::CSC ) csc_numHits++;
100  }
101 
102  if (( m_allowTIDTEC || !contains_TIDTEC ) &&
103  m_minTrackerHits <= tracker_numHits &&
104  ( m_minDTHits <= dt_numHits || m_minCSCHits <= csc_numHits ) ) return true;
105  }
106  return false;
107 }
double p() const
momentum vector magnitude
Definition: TrackBase.h:654
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:690
double pt() const
track transverse momentum
Definition: TrackBase.h:660
auto recHits() const
Access to reconstructed hits on the track.
Definition: Track.h:106
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:480
Definition: DetId.h:18
static constexpr int DT
Definition: MuonSubdetId.h:12
static constexpr int CSC
Definition: MuonSubdetId.h:13

Member Data Documentation

bool MuonAlignmentPreFilter::m_allowTIDTEC
private

Definition at line 47 of file MuonAlignmentPreFilter.cc.

Referenced by filter().

double MuonAlignmentPreFilter::m_maxTrackEta
private

Definition at line 52 of file MuonAlignmentPreFilter.cc.

Referenced by filter().

int MuonAlignmentPreFilter::m_minCSCHits
private

Definition at line 50 of file MuonAlignmentPreFilter.cc.

Referenced by filter().

int MuonAlignmentPreFilter::m_minDTHits
private

Definition at line 49 of file MuonAlignmentPreFilter.cc.

Referenced by filter().

int MuonAlignmentPreFilter::m_minTrackerHits
private

Definition at line 48 of file MuonAlignmentPreFilter.cc.

Referenced by filter().

double MuonAlignmentPreFilter::m_minTrackEta
private

Definition at line 51 of file MuonAlignmentPreFilter.cc.

Referenced by filter().

double MuonAlignmentPreFilter::m_minTrackP
private

Definition at line 46 of file MuonAlignmentPreFilter.cc.

Referenced by filter().

double MuonAlignmentPreFilter::m_minTrackPt
private

Definition at line 45 of file MuonAlignmentPreFilter.cc.

Referenced by filter().

edm::InputTag MuonAlignmentPreFilter::m_tracksTag
private

Definition at line 44 of file MuonAlignmentPreFilter.cc.

Referenced by filter().