37 srcTag_ (iConfig.getParameter<
edm::
InputTag>(
"Src")),
39 previousCandTag_(iConfig.getParameter<
edm::
InputTag>(
"PreviousCandTag")),
41 maxEta_ (iConfig.getParameter<double>(
"MaxEta")),
42 minPt_ (iConfig.getParameter<double>(
"MinPt")),
43 minPtTriplet_ (iConfig.getParameter<double>(
"MinPtTriplet")),
44 minInvMass_ (iConfig.getParameter<double>(
"MinInvMass")),
45 maxInvMass_ (iConfig.getParameter<double>(
"MaxInvMass")),
46 chargeOpt_ (iConfig.getParameter<
int>(
"ChargeOpt"))
48 produces<VertexCollection>();
59 desc.
add<
double>(
"MaxEta",2.5);
60 desc.
add<
double>(
"MinPt",0.0);
61 desc.
add<
double>(
"MinPtTriplet",0.0);
62 desc.
add<
double>(
"MinInvMass",1.0);
63 desc.
add<
double>(
"MaxInvMass",20.0);
64 desc.
add<
int>(
"ChargeOpt",-1);
65 descriptions.
add(
"hltDisplacedmumumuVtxProducer", desc);
84 double const MuMass = 0.106;
85 double const MuMass2 = MuMass*MuMass;
102 RecoChargedCandidateCollection::const_iterator cand1;
103 RecoChargedCandidateCollection::const_iterator cand2;
104 RecoChargedCandidateCollection::const_iterator cand3;
110 vector<RecoChargedCandidateRef> vPrevCands;
113 for (cand1=mucands->begin(); cand1!=mucands->end(); cand1++) {
115 LogDebug(
"HLTDisplacedMumumuFilter") <<
" 1st muon in loop: q*pt= " << cand1->charge()*cand1->pt() <<
", eta= " << cand1->eta() <<
", hits= " << tk1->numberOfValidHits();
121 if (fabs(cand1->eta())>
maxEta_)
continue;
122 if (cand1->pt() <
minPt_)
continue;
124 cand2 = cand1; cand2++;
125 for (; cand2!=mucands->end(); cand2++) {
129 LogDebug(
"HLTMuonDimuonFilter") <<
" 2nd muon in loop: q*pt= " << cand2->charge()*cand2->pt() <<
", eta= " << cand2->eta() <<
", hits= " << tk2->numberOfValidHits() <<
", d0= " << tk2->d0();
134 if (fabs(cand2->eta())>
maxEta_)
continue;
135 if (cand2->pt() <
minPt_)
continue;
137 cand3 = cand2; cand3++;
138 for (; cand3!=mucands->end(); cand3++) {
142 LogDebug(
"HLTMuonDimuonFilter") <<
" 3rd muon in loop: q*pt= " << cand3->charge()*cand3->pt() <<
", eta= " << cand3->eta() <<
", hits= " << tk3->numberOfValidHits() <<
", d0= " << tk3->d0();
147 if (fabs(cand3->eta())>
maxEta_)
continue;
148 if (cand3->pt() <
minPt_)
continue;
152 if (fabs (cand1->charge() + cand2->charge() + cand3->charge()) !=
chargeOpt_)
continue;
156 e1 =
sqrt(cand1->momentum().Mag2()+MuMass2);
157 e2 =
sqrt(cand2->momentum().Mag2()+MuMass2);
158 e3 =
sqrt(cand3->momentum().Mag2()+MuMass2);
167 double invmass =
abs(p.mass());
168 LogDebug(
"HLTDisplacedMumumuFilter") <<
" ... 1-2 invmass= " << invmass;
174 vector<TransientTrack> t_tks;
178 t_tks.push_back(ttkp1);
179 t_tks.push_back(ttkp2);
180 t_tks.push_back(ttkp3);
183 if (t_tks.size()!=3)
continue;
193 vertexCollection->push_back(vertex);
204 for (
auto &
i : refVect) {
edm::EDGetTokenT< reco::RecoChargedCandidateCollection > srcToken_
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
HLTDisplacedmumumuVtxProducer(const edm::ParameterSet &)
bool getByToken(EDGetToken token, Handle< PROD > &result) const
virtual CachingVertex< 5 > vertex(const std::vector< reco::TransientTrack > &tracks) const
std::vector< Vertex > VertexCollection
collection of Vertex objects
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > previousCandToken_
~HLTDisplacedmumumuVtxProducer()
Abs< T >::type abs(const T &t)
bool checkPreviousCand(const reco::TrackRef &trackref, std::vector< reco::RecoChargedCandidateRef > &ref2)
T const * get() const
Returns C++ pointer to the item.
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< RecoChargedCandidate > RecoChargedCandidateCollection
collectin of RecoChargedCandidate objects
void add(std::string const &label, ParameterSetDescription const &psetDescription)
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
virtual void produce(edm::Event &, const edm::EventSetup &)
math::PtEtaPhiELorentzVectorF LorentzVector