CMS 3D CMS Logo

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

#include <DualByL2TSG.h>

Inheritance diagram for DualByL2TSG:
SeparatingTSG CompositeTSG TrackerSeedGenerator

Public Member Functions

 DualByL2TSG (const edm::ParameterSet &pset, edm::ConsumesCollector &iC)
 
unsigned int selectTSG (const TrackCand &, const TrackingRegion &) override
 decide the TSG depending on the existence of a L3 track seeded from the L2. Return value is 0 or 1. More...
 
- Public Member Functions inherited from SeparatingTSG
 SeparatingTSG (const edm::ParameterSet &pset, edm::ConsumesCollector &IC)
 
void trackerSeeds (const TrackCand &, const TrackingRegion &, const TrackerTopology *, BTSeedCollection &) override
 provides the seeds from the TSGs: must be overloaded More...
 
 ~SeparatingTSG () override
 
- Public Member Functions inherited from CompositeTSG
 CompositeTSG (const edm::ParameterSet &pset, edm::ConsumesCollector &IC)
 
void init (const MuonServiceProxy *service) override
 initialized the TSGs More...
 
void setEvent (const edm::Event &event) override
 set the event to the TSGs More...
 
 ~CompositeTSG () override
 
- Public Member Functions inherited from TrackerSeedGenerator
const edm::EventgetEvent () const
 
 TrackerSeedGenerator ()
 
virtual ~TrackerSeedGenerator ()
 destructor More...
 

Private Attributes

edm::Handle< reco::TrackCollectionl3muonH
 
edm::EDGetTokenT< reco::TrackCollectionl3muonToken
 
std::string theCategory
 
edm::InputTag theL3CollectionLabelA
 

Additional Inherited Members

- Public Types inherited from CompositeTSG
typedef std::vector< TrajectorySeedBTSeedCollection
 
typedef std::pair< const Trajectory *, reco::TrackRefTrackCand
 
- Public Types inherited from TrackerSeedGenerator
typedef std::vector< TrajectorySeedBTSeedCollection
 
typedef std::pair< const Trajectory *, reco::TrackRefTrackCand
 
- Protected Member Functions inherited from CompositeTSG
unsigned int nTSGs ()
 
- Protected Attributes inherited from CompositeTSG
std::string theCategory
 
std::vector< std::string > theNames
 
const MuonServiceProxytheProxyService
 
std::vector< std::unique_ptr< TrackerSeedGenerator > > theTSGs
 
- Protected Attributes inherited from TrackerSeedGenerator
const edm::EventtheEvent
 
const MuonServiceProxytheProxyService
 

Detailed Description

Description: SeparatingTSG (TrackerSeedGenerator) which makes a check to see if a previous seed lead to a L3 track

Author
Jean-Roch vlimant, Adam Everett

Definition at line 18 of file DualByL2TSG.h.

Constructor & Destructor Documentation

◆ DualByL2TSG()

DualByL2TSG::DualByL2TSG ( const edm::ParameterSet pset,
edm::ConsumesCollector iC 
)

Definition at line 12 of file DualByL2TSG.cc.

12  : SeparatingTSG(pset, iC) {
13  theCategory = "DualByL2TSG";
14  theL3CollectionLabelA = pset.getParameter<edm::InputTag>("L3TkCollectionA");
15  if (nTSGs() != 2) {
16  edm::LogError(theCategory) << "not two seed generators provided";
17  }
18 
20 }

References edm::ConsumesCollector::consumes(), l3muonToken, CompositeTSG::nTSGs(), muonDTDigis_cfi::pset, theCategory, and theL3CollectionLabelA.

Member Function Documentation

◆ selectTSG()

unsigned int DualByL2TSG::selectTSG ( const TrackCand muonTrackCand,
const TrackingRegion region 
)
overridevirtual

decide the TSG depending on the existence of a L3 track seeded from the L2. Return value is 0 or 1.

Implements SeparatingTSG.

Definition at line 22 of file DualByL2TSG.cc.

22  {
23  LogDebug(theCategory) << "|eta|=|" << muonTrackCand.second->eta() << "|";
24 
25  bool re_do_this_L2 = true;
26  //LogDebug("TrackerSeedGenerator")<<theEvent;
27  //getEvent();
28 
29  //retrieve L3 track collection
32  if (l3muonH.failedToGet())
33  return 0;
34 
35  unsigned int maxI = l3muonH->size();
36 
37  LogDebug(theCategory) << "TheCollectionA size " << maxI;
38 
39  // Loop through all tracks, if the track was seeded from this L2, then skip
40  for (unsigned int i = 0; i != maxI; ++i) {
43  tk->seedRef().castTo<edm::Ref<L3MuonTrajectorySeedCollection> >();
44  reco::TrackRef staTrack = l3seedRef->l2Track();
45 
46  if (staTrack == (muonTrackCand.second))
47  re_do_this_L2 = false;
48  //LogDebug(theCategory) << "The DualByL2TSG selectTSG loop " << re_do_this_L2 << " staCand " << muonTrackCand.second->eta() << " " << muonTrackCand.second->pt() << " alreadyMadeRefToL3 " << staTrack->eta() << " " << staTrack->pt();
49  }
50 
51  LogDebug(theCategory) << "The DualByL2TSG to use " << re_do_this_L2;
52 
53  return re_do_this_L2 ? 1 : 0;
54 }

References edm::HandleBase::failedToGet(), edm::Event::getByToken(), TrackerSeedGenerator::getEvent(), mps_fire::i, l3muonH, l3muonToken, LogDebug, findQualityFiles::maxI, and theCategory.

Member Data Documentation

◆ l3muonH

edm::Handle<reco::TrackCollection> DualByL2TSG::l3muonH
private

Definition at line 28 of file DualByL2TSG.h.

Referenced by selectTSG().

◆ l3muonToken

edm::EDGetTokenT<reco::TrackCollection> DualByL2TSG::l3muonToken
private

Definition at line 29 of file DualByL2TSG.h.

Referenced by DualByL2TSG(), and selectTSG().

◆ theCategory

std::string DualByL2TSG::theCategory
private

Definition at line 26 of file DualByL2TSG.h.

Referenced by DualByL2TSG(), and selectTSG().

◆ theL3CollectionLabelA

edm::InputTag DualByL2TSG::theL3CollectionLabelA
private

Definition at line 27 of file DualByL2TSG.h.

Referenced by DualByL2TSG().

mps_fire.i
i
Definition: mps_fire.py:428
findQualityFiles.maxI
int maxI
Definition: findQualityFiles.py:182
edm::Handle< reco::TrackCollection >
edm::Ref< TrackCollection >
DualByL2TSG::l3muonH
edm::Handle< reco::TrackCollection > l3muonH
Definition: DualByL2TSG.h:28
edm::ConsumesCollector::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: ConsumesCollector.h:55
edm::Event::getByToken
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:539
TrackerSeedGenerator::getEvent
const edm::Event * getEvent() const
Definition: TrackerSeedGenerator.h:41
edm::HandleBase::failedToGet
bool failedToGet() const
Definition: HandleBase.h:72
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
DualByL2TSG::theCategory
std::string theCategory
Definition: DualByL2TSG.h:26
edm::LogError
Log< level::Error, false > LogError
Definition: MessageLogger.h:123
DualByL2TSG::theL3CollectionLabelA
edm::InputTag theL3CollectionLabelA
Definition: DualByL2TSG.h:27
CompositeTSG::nTSGs
unsigned int nTSGs()
Definition: CompositeTSG.h:38
DualByL2TSG::l3muonToken
edm::EDGetTokenT< reco::TrackCollection > l3muonToken
Definition: DualByL2TSG.h:29
SeparatingTSG::SeparatingTSG
SeparatingTSG(const edm::ParameterSet &pset, edm::ConsumesCollector &IC)
Definition: SeparatingTSG.cc:5
edm::InputTag
Definition: InputTag.h:15
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27