CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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)
 
unsigned int selectTSG (const TrackCand &, const TrackingRegion &)
 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)
 
void trackerSeeds (const TrackCand &, const TrackingRegion &, BTSeedCollection &)
 provides the seeds from the TSGs: must be overloaded More...
 
virtual ~SeparatingTSG ()
 
- Public Member Functions inherited from CompositeTSG
 CompositeTSG (const edm::ParameterSet &pset)
 
void init (const MuonServiceProxy *service)
 initialized the TSGs More...
 
void setEvent (const edm::Event &event)
 set the event to the TSGs More...
 
virtual ~CompositeTSG ()
 
- Public Member Functions inherited from TrackerSeedGenerator
const edm::EventgetEvent () const
 
 TrackerSeedGenerator ()
 
virtual ~TrackerSeedGenerator ()
 destructor More...
 

Private Attributes

edm::Handle
< reco::TrackCollection
l3muonH
 
std::string theCategory
 
edm::InputTag theL3CollectionLabelA
 

Additional Inherited Members

- Public Types inherited from CompositeTSG
typedef std::vector
< TrajectorySeed
BTSeedCollection
 
typedef std::pair< const
Trajectory *, reco::TrackRef
TrackCand
 
- Public Types inherited from TrackerSeedGenerator
typedef std::vector
< TrajectorySeed
BTSeedCollection
 
typedef std::pair< const
Trajectory *, reco::TrackRef
TrackCand
 
- 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
< 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 17 of file DualByL2TSG.h.

Constructor & Destructor Documentation

DualByL2TSG::DualByL2TSG ( const edm::ParameterSet pset)

Definition at line 12 of file DualByL2TSG.cc.

References edm::ParameterSet::getParameter(), CompositeTSG::nTSGs(), theCategory, and theL3CollectionLabelA.

12  : SeparatingTSG(pset){ theCategory ="DualByL2TSG";
13  theL3CollectionLabelA = pset.getParameter<edm::InputTag>("L3TkCollectionA");
14  if (nTSGs()!=2)
15  {edm::LogError(theCategory)<<"not two seed generators provided";}
16 }
T getParameter(std::string const &) const
SeparatingTSG(const edm::ParameterSet &pset)
Definition: SeparatingTSG.cc:4
std::string theCategory
Definition: DualByL2TSG.h:25
unsigned int nTSGs()
Definition: CompositeTSG.h:38
edm::InputTag theL3CollectionLabelA
Definition: DualByL2TSG.h:26

Member Function Documentation

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

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 18 of file DualByL2TSG.cc.

References edm::HandleBase::failedToGet(), edm::Event::getByLabel(), TrackerSeedGenerator::getEvent(), i, l3muonH, LogDebug, findQualityFiles::maxI, theCategory, and theL3CollectionLabelA.

19 {
20  LogDebug(theCategory)<<"|eta|=|"<<muonTrackCand.second->eta()<<"|";
21 
22  bool re_do_this_L2 = true;
23  //LogDebug("TrackerSeedGenerator")<<theEvent;
24  //getEvent();
25 
26  //retrieve L3 track collection
29  if(l3muonH.failedToGet()) return 0;
30 
31  unsigned int maxI = l3muonH->size();
32 
33  LogDebug(theCategory) << "TheCollectionA size " << maxI;
34 
35  // Loop through all tracks, if the track was seeded from this L2, then skip
36  for (unsigned int i=0;i!=maxI;++i){
37  reco::TrackRef tk(l3muonH,i);
39  reco::TrackRef staTrack = l3seedRef->l2Track();
40 
41  if(staTrack == (muonTrackCand.second) ) re_do_this_L2 = false;
42  //LogDebug(theCategory) << "The DualByL2TSG selectTSG loop " << re_do_this_L2 << " staCand " << muonTrackCand.second->eta() << " " << muonTrackCand.second->pt() << " alreadyMadeRefToL3 " << staTrack->eta() << " " << staTrack->pt();
43  }
44 
45  LogDebug(theCategory) << "The DualByL2TSG to use " << re_do_this_L2 ;
46 
47  return re_do_this_L2 ? 1 : 0;
48 }
#define LogDebug(id)
int i
Definition: DBlmapReader.cc:9
edm::Handle< reco::TrackCollection > l3muonH
Definition: DualByL2TSG.h:27
const edm::Event * getEvent() const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:356
bool failedToGet() const
Definition: HandleBase.h:80
std::string theCategory
Definition: DualByL2TSG.h:25
edm::InputTag theL3CollectionLabelA
Definition: DualByL2TSG.h:26

Member Data Documentation

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

Definition at line 27 of file DualByL2TSG.h.

Referenced by selectTSG().

std::string DualByL2TSG::theCategory
private

Definition at line 25 of file DualByL2TSG.h.

Referenced by DualByL2TSG(), and selectTSG().

edm::InputTag DualByL2TSG::theL3CollectionLabelA
private

Definition at line 26 of file DualByL2TSG.h.

Referenced by DualByL2TSG(), and selectTSG().