-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 75615 b: "refs/heads/CMSSW_7_1_X" c: bf8e032 h: "refs/heads/CMSSW_7_1_X" i: 75613: 528e057 75611: 1dc7ae7 75607: fc6c3e0 75599: cdf6eb4 75583: 1175526 v: v3
- Loading branch information
Adam Everett
committed
Oct 16, 2009
1 parent
98ed705
commit b70ab59
Showing
6 changed files
with
100 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
--- | ||
refs/heads/gh-pages: 09c786f70121f131b3715aaf3464996502bbeb7e | ||
"refs/heads/CMSSW_7_1_X": 2dd3b9f54b4df8be2e894274c5ef6aca86f24d27 | ||
"refs/heads/CMSSW_7_1_X": bf8e0325add4b80dc5f604e7a6fa5b9cea513d91 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
trunk/RecoMuon/TrackerSeedGenerator/plugins/DualByL2TSG.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#include "RecoMuon/TrackerSeedGenerator/plugins/DualByL2TSG.h" | ||
#include "FWCore/MessageLogger/interface/MessageLogger.h" | ||
#include "FWCore/Framework/interface/Event.h" | ||
#include "DataFormats/Common/interface/Handle.h" | ||
|
||
#include "DataFormats/TrackReco/interface/Track.h" | ||
#include "DataFormats/TrackReco/interface/TrackFwd.h" | ||
#include "DataFormats/MuonSeed/interface/L3MuonTrajectorySeed.h" | ||
#include "DataFormats/MuonSeed/interface/L3MuonTrajectorySeedCollection.h" | ||
#include "RecoMuon/TrackerSeedGenerator/interface/TrackerSeedGenerator.h" | ||
|
||
DualByL2TSG::DualByL2TSG(const edm::ParameterSet &pset) : SeparatingTSG(pset){ theCategory ="DualByL2TSG"; | ||
theL3CollectionLabelA = pset.getParameter<edm::InputTag>("L3TkCollectionA"); | ||
if (nTSGs()!=2) | ||
{edm::LogError(theCategory)<<"not two seed generators provided";} | ||
} | ||
|
||
uint DualByL2TSG::selectTSG(const TrackCand & muonTrackCand, const TrackingRegion& region) | ||
{ | ||
LogDebug(theCategory)<<"|eta|=|"<<muonTrackCand.second->eta()<<"|"; | ||
|
||
bool re_do_this_L2 = true; | ||
//LogDebug("TrackerSeedGenerator")<<theEvent; | ||
//getEvent(); | ||
|
||
//retrieve L3 track collection | ||
edm::Handle<reco::TrackCollection> l3muonH; | ||
getEvent()->getByLabel(theL3CollectionLabelA ,l3muonH); | ||
if(l3muonH.failedToGet()) return 0; | ||
|
||
uint maxI = l3muonH->size(); | ||
|
||
LogDebug(theCategory) << "TheCollectionA size " << maxI; | ||
|
||
// Loop through all tracks, if the track was seeded from this L2, then skip | ||
for (uint i=0;i!=maxI;++i){ | ||
reco::TrackRef tk(l3muonH,i); | ||
edm::Ref<L3MuonTrajectorySeedCollection> l3seedRef = tk->seedRef().castTo<edm::Ref<L3MuonTrajectorySeedCollection> >(); | ||
reco::TrackRef staTrack = l3seedRef->l2Track(); | ||
|
||
if(staTrack == (muonTrackCand.second) ) re_do_this_L2 = false; | ||
//LogDebug(theCategory) << "The DualByL2TSG selectTSG loop " << re_do_this_L2 << " staCand " << muonTrackCand.second->eta() << " " << muonTrackCand.second->pt() << " alreadyMadeRefToL3 " << staTrack->eta() << " " << staTrack->pt(); | ||
} | ||
|
||
LogDebug(theCategory) << "The DualByL2TSG to use " << re_do_this_L2 ; | ||
|
||
return re_do_this_L2 ? 1 : 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
#ifndef RecoMuon_TrackerSeedGenerator_DualByL2TSG_H | ||
#define RecoMuon_TrackerSeedGenerator_DualByL2TSG_H | ||
|
||
/** \class DualByL2TSG | ||
* Description: | ||
* SeparatingTSG (TrackerSeedGenerator) which makes a check to see if a previous seed lead to a L3 track | ||
* | ||
* \author Jean-Roch vlimant, Adam Everett | ||
*/ | ||
|
||
#include "RecoMuon/TrackerSeedGenerator/plugins/SeparatingTSG.h" | ||
#include "DataFormats/Common/interface/Handle.h" | ||
#include "DataFormats/TrackReco/interface/Track.h" | ||
#include "DataFormats/TrackReco/interface/TrackFwd.h" | ||
|
||
class DualByL2TSG : public SeparatingTSG{ | ||
public: | ||
DualByL2TSG(const edm::ParameterSet &pset); | ||
|
||
/// decide the TSG depending on the existence of a L3 track seeded from the L2. Return value is 0 or 1. | ||
uint selectTSG(const TrackCand&, const TrackingRegion&); | ||
|
||
private: | ||
std::string theCategory; | ||
edm::InputTag theL3CollectionLabelA; | ||
edm::Handle<reco::TrackCollection> l3muonH; | ||
const edm::Event *theEvent; | ||
}; | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters