|
|
Go to the documentation of this file.
23 const float dummy = -9.;
67 pvNDOF_(iConfig.getParameter<
int>(
"pvNDOF")),
69 lxyCUT_(iConfig.getParameter<double>(
"lxyCUT")),
70 lxyWRTbsCUT_(iConfig.getParameter<double>(
"lxyWRTbsCUT")),
71 debug_(iConfig.getUntrackedParameter<
bool>(
"debug")) {
73 std::cout <<
"VertexCompositeCandidateCollectionSelector::VertexCompositeCandidateCollectionSelector" << std::endl;
75 produces<reco::VertexCompositeCandidateCollection>();
89 std::cout <<
"VertexCompositeCandidateCollectionSelector::produce" << std::endl;
92 auto result = std::make_unique<reco::VertexCompositeCandidateCollection>();
98 bs = &(*beamspotHandle);
104 pv = &pvHandle->front();
107 pv->tracksSize() == 0
115 int n = (v0Handle.
isValid() ? v0Handle->size() : -1);
119 auto const& v0s = *v0Handle.
product();
120 for (
auto const&
v0 : v0s) {
125 float abslxy = (
pv ==
nullptr ?
dummy : displacementFromPV2D.
perp());
126 float abslxyWRTbs = (
bs ==
nullptr ?
dummy : displacementFromBS2D.
perp());
133 << (abslxyWRTbs >=
lxyWRTbsCUT_ ?
"OK" :
"KO") << std::endl;
158 desc.add<
int>(
"pvNDOF");
159 desc.add<
double>(
"lxyCUT", 16.);
160 desc.add<
double>(
"lxyWRTbsCUT", 0.);
161 desc.addUntracked<
bool>(
"debug",
false);
162 descriptions.
add(
"VertexCompositeCandidateCollectionSelector",
desc);
void produce(edm::Event &, const edm::EventSetup &) override
T const * product() const
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
#define DEFINE_FWK_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Global3DPoint GlobalPoint
VertexCompositeCandidateCollectionSelector(const edm::ParameterSet &)
static PFTauRenderPlugin instance
std::vector< VertexCompositeCandidate > VertexCompositeCandidateCollection
collection of Candidate objects
edm::EDGetTokenT< reco::VertexCompositeCandidateCollection > v0Token_
std::vector< Vertex > VertexCollection
edm::EDGetTokenT< reco::BeamSpot > bsToken_
edm::EDGetTokenT< reco::VertexCollection > pvToken_