23 std::vector<unsigned int> theV0keys;
30 for (
const auto& vcc : *vccHandle) {
31 for (
size_t i = 0;
i < vcc.numberOfDaughters(); ++
i) {
32 LogDebug(
"AlignmentTrackFromVertexCompositeCandidateSelector") <<
"daughter: " <<
i << std::endl;
35 if (chargedDaughter) {
36 LogDebug(
"AlignmentTrackFromVertexCompositeCandidateSelector") <<
"charged daughter: " <<
i << std::endl;
39 LogDebug(
"AlignmentTrackFromVertexCompositeCandidateSelector")
40 <<
"charged daughter has non-null trackref: " <<
i << std::endl;
41 theV0keys.push_back(trackRef.
key());
47 edm::LogError(
"AlignmentTrackFromVertexCompositeCandidateSelector")
48 <<
"Error >> Failed to get VertexCompositeCandidateCollection";
51 LogDebug(
"AlignmentTrackFromVertexCompositeCandidateSelector")
52 <<
"collection will have size: " << theV0keys.size() << std::endl;
57 for (reco::TrackCollection::const_iterator tk = tc->begin(); tk != tc->end(); ++tk, ++indx) {
59 if (
std::find(theV0keys.begin(), theV0keys.end(), trackRef.
key()) != theV0keys.end()) {
60 LogDebug(
"AlignmentTrackFromVertexSelector") <<
"track index: " << indx <<
"filling result vector" << std::endl;
66 LogDebug(
"AlignmentTrackFromVertexCompositeCandidateSelector")
67 <<
"collection will have size: " <<
result.size() << std::endl;
virtual const Candidate * daughter(size_type i) const =0
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
std::vector< VertexCompositeCandidate > VertexCompositeCandidateCollection
collection of Candidate objects
bool isNonnull() const
Checks for non-null.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Log< level::Error, false > LogError
Tracks select(const edm::Handle< reco::TrackCollection > &tc, const edm::Event &evt, const edm::EventSetup &setup) const
select tracks
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
key_type key() const
Accessor for product key.
~AlignmentTrackFromVertexCompositeCandidateSelector()
destructor
reco::TrackRef track() const override
reference to a track
AlignmentTrackFromVertexCompositeCandidateSelector(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC)
constructor
edm::Ref< TrackCollection > TrackRef
persistent reference to a Track
const edm::EDGetTokenT< reco::VertexCompositeCandidateCollection > vccToken_
std::vector< const reco::Track * > Tracks