Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add options to HLTMuonDimuonL3Filter #15770

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion HLTrigger/Muon/interface/HLTMuonDimuonL3Filter.h
Expand Up @@ -36,8 +36,9 @@ class HLTMuonDimuonL3Filter : public HLTFilter {
edm::EDGetTokenT<reco::RecoChargedCandidateCollection> candToken_; // token identifying product contains muons
edm::InputTag previousCandTag_; // input tag identifying product contains muons passing the previous level
edm::EDGetTokenT<trigger::TriggerFilterObjectWithRefs> previousCandToken_; // tokenidentifying product contains muons passing the previous level

bool previousCandIsL2_;
bool fast_Accept_; // flag to save time: stop processing after identification of the first valid pair
int min_N_; // minimum number of muons to fire the trigger
double max_Eta_; // Eta cut
int min_Nhits_; // threshold on number of hits on muon
double max_Dr_; // impact parameter cut
Expand Down
17 changes: 13 additions & 4 deletions HLTrigger/Muon/src/HLTMuonDimuonL3Filter.cc
Expand Up @@ -48,7 +48,9 @@ HLTMuonDimuonL3Filter::HLTMuonDimuonL3Filter(const edm::ParameterSet& iConfig) :
candToken_ (consumes<reco::RecoChargedCandidateCollection>(candTag_)),
previousCandTag_ (iConfig.getParameter<InputTag > ("PreviousCandTag")),
previousCandToken_ (consumes<trigger::TriggerFilterObjectWithRefs>(previousCandTag_)),
previousCandIsL2_(iConfig.getParameter<bool> ("PreviousCandIsL2")),
fast_Accept_ (iConfig.getParameter<bool> ("FastAccept")),
min_N_ (iConfig.getParameter<int> ("MinN")),
max_Eta_ (iConfig.getParameter<double> ("MaxEta")),
min_Nhits_ (iConfig.getParameter<int> ("MinNhits")),
max_Dr_ (iConfig.getParameter<double> ("MaxDr")),
Expand All @@ -75,6 +77,7 @@ HLTMuonDimuonL3Filter::HLTMuonDimuonL3Filter(const edm::ParameterSet& iConfig) :
<< " CandTag/MinN/MaxEta/MinNhits/MaxDr/MaxDz/MinPt1/MinPt2/MinInvMass/MaxInvMass/MinAcop/MaxAcop/MinPtBalance/MaxPtBalance/NSigmaPt/MaxDzMuMu/MaxRapidityPair : "
<< candTag_.encode()
<< " " << fast_Accept_
<< " " << min_N_
<< " " << max_Eta_
<< " " << min_Nhits_
<< " " << max_Dr_
Expand All @@ -101,7 +104,9 @@ HLTMuonDimuonL3Filter::fillDescriptions(edm::ConfigurationDescriptions& descript
desc.add<edm::InputTag>("CandTag",edm::InputTag("hltL3MuonCandidates"));
// desc.add<edm::InputTag>("PreviousCandTag",edm::InputTag("hltDiMuonL2PreFiltered0"));
desc.add<edm::InputTag>("PreviousCandTag",edm::InputTag(""));
desc.add<bool>("PreviousCandIsL2",true);
desc.add<bool>("FastAccept",false);
desc.add<int>("MinN",1);
desc.add<double>("MaxEta",2.5);
desc.add<int>("MinNhits",0);
desc.add<double>("MaxDr",2.0);
Expand Down Expand Up @@ -163,9 +168,13 @@ HLTMuonDimuonL3Filter::hltFilter(edm::Event& iEvent, const edm::EventSetup& iSet
unsigned int maxI = mucands->size();
for (unsigned int i=0;i!=maxI;i++){
TrackRef tk = (*mucands)[i].track();
edm::Ref<L3MuonTrajectorySeedCollection> l3seedRef = tk->seedRef().castTo<edm::Ref<L3MuonTrajectorySeedCollection> >();
TrackRef staTrack = l3seedRef->l2Track();
L2toL3s[staTrack].push_back(RecoChargedCandidateRef(mucands,i));
if (previousCandIsL2_) {
edm::Ref<L3MuonTrajectorySeedCollection> l3seedRef = tk->seedRef().castTo<edm::Ref<L3MuonTrajectorySeedCollection> >();
TrackRef staTrack = l3seedRef->l2Track();
L2toL3s[staTrack].push_back(RecoChargedCandidateRef(mucands,i));
} else {
L2toL3s[tk].push_back(RecoChargedCandidateRef(mucands,i));
}
}

Handle<TriggerFilterObjectWithRefs> previousLevelCands;
Expand Down Expand Up @@ -383,7 +392,7 @@ HLTMuonDimuonL3Filter::hltFilter(edm::Event& iEvent, const edm::EventSetup& iSet
}//loop on the first L2

// filter decision
const bool accept (n >= 1);
const bool accept (n >= min_N_);

LogDebug("HLTMuonDimuonL3Filter") << " >>>>> Result of HLTMuonDimuonL3Filter is "<< accept << ", number of muon pairs passing thresholds= " << n;

Expand Down