19 : muonTag_(iConfig.getParameter<
edm::
InputTag>(
"muonCandidates")),
20 trackTag_(iConfig.getParameter<
edm::
InputTag>(
"tracks")),
21 minMasses_(iConfig.getParameter<
std::
vector<double> >(
"MinMasses")),
22 maxMasses_(iConfig.getParameter<
std::
vector<double> >(
"MaxMasses")),
23 checkCharge_(iConfig.getParameter<
bool>(
"checkCharge")),
24 minTrackPt_(iConfig.getParameter<double>(
"MinTrackPt")),
25 minTrackP_(iConfig.getParameter<double>(
"MinTrackP")),
26 maxTrackEta_(iConfig.getParameter<double>(
"MaxTrackEta")) {
31 produces<reco::TrackCollection>();
43 edm::LogError(
"QuarkoniaTrackSelector") <<
"Inconsistency in definition of mass windows, " 44 <<
"no track will be selected";
50 stream <<
"instantiated with parameters\n" 53 stream <<
" mass windows =";
68 auto product = std::make_unique<reco::TrackCollection>();
91 stream <<
"\nInput muons: # / q / pt / p / eta\n";
92 for (
size_t im = 0; im < muonHandle->size(); ++im) {
94 stream <<
" " << im <<
" " <<
muon.charge() <<
" " <<
muon.pt() <<
" " <<
muon.p() <<
" " <<
muon.eta() <<
"\n";
96 stream <<
"Input tracks: # / q / pt / p / eta\n";
97 for (
size_t it = 0; it < trackHandle->size(); ++it) {
109 unsigned int nComb(0);
110 std::vector<size_t> selectedTrackIndices;
111 selectedTrackIndices.reserve(muonHandle->size());
115 for (
size_t im = 0; im < muonHandle->size(); ++im) {
117 int qMuon =
muon.charge();
120 for (
size_t it = 0; it < trackHandle->size(); ++it) {
130 double mass = (p4Muon + p4Track).
mass();
137 if (
find(selectedTrackIndices.begin(), selectedTrackIndices.end(), it) == selectedTrackIndices.end())
138 selectedTrackIndices.push_back(it);
149 for (
size_t i = 0;
i < selectedTrackIndices.size(); ++
i)
150 product->push_back((*trackHandle)[selectedTrackIndices[
i]]);
155 std::ostringstream
stream;
156 stream <<
"Total number of combinations = " << muonHandle->size() * trackHandle->size() <<
" , after charge " << nQ
157 <<
" , after mass " << nComb << std::endl;
158 stream <<
"Selected " << product->size() <<
" tracks with # / q / pt / eta\n";
159 for (
size_t i = 0;
i < product->size(); ++
i) {
edm::EDGetTokenT< reco::RecoChargedCandidateCollection > muonToken_
#define DEFINE_FWK_MODULE(type)
std::vector< double > minMasses_
lower mass limits
Log< level::Error, false > LogError
uint32_t T const *__restrict__ uint32_t const *__restrict__ int32_t int Histo::index_type cudaStream_t stream
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
std::vector< double > maxMasses_
upper mass limits
QuarkoniaTrackSelector(const edm::ParameterSet &)
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
edm::EDGetTokenT< reco::TrackCollection > trackToken_
double minTrackP_
track p cut
edm::InputTag trackTag_
tag for TrackCollection
math::XYZTLorentzVector LorentzVector
Lorentz vector.
double minTrackPt_
track pt cut
edm::InputTag muonTag_
tag for RecoChargedCandidateCollection
bool checkCharge_
check opposite charge?
double maxTrackEta_
track |eta| cut