58 JetVertexAssociation::JetVertexAssociation(
const edm::ParameterSet& iConfig): m_algo(iConfig),
65 produces<ResultCollection1>(
"Var");
66 produces<ResultCollection2>(
"JetType");
82 double SIGNAL_V_Z = 0.;
83 double SIGNAL_V_Z_ERROR = 0.;
86 VertexCollection::const_iterator vert = vertexes->begin ();
87 if(!vertexes->empty() ) {
88 for (; vert != vertexes->end (); vert++) {
90 SIGNAL_V_Z = vert->z();
93 for (; tr != vert->tracks_end(); tr++) pt += (*tr)->pt();
97 SIGNAL_V_Z = vert->z();
98 SIGNAL_V_Z_ERROR = vert->zError();
105 pair<double, bool>
result;
109 CaloJetCollection::const_iterator
jet = jets->begin ();
111 if(!jets->empty() ) {
112 for (; jet != jets->end (); jet++) {
113 result =
m_algo.
Main(*jet, tracks, SIGNAL_V_Z, SIGNAL_V_Z_ERROR);
114 result1->push_back(result.first);
115 result2->push_back(result.second);
std::pair< double, bool > Main(const reco::CaloJet &jet, edm::Handle< reco::TrackCollection > tracks, double SIGNAL_V_Z, double SIGNAL_V_Z_Error)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< reco::VertexCollection > vertex_token
edm::EDGetTokenT< reco::TrackCollection > track_token
std::vector< double > ResultCollection1
bool getByToken(EDGetToken token, Handle< PROD > &result) const
std::vector< Track > TrackCollection
collection of Tracks
std::vector< Vertex > VertexCollection
collection of Vertex objects
edm::EDGetTokenT< reco::CaloJetCollection > jet_token
std::vector< bool > ResultCollection2
std::vector< TrackBaseRef >::const_iterator trackRef_iterator
The iteratator for the vector<TrackRef>
void produce(edm::Event &e, const edm::EventSetup &c) override
std::vector< CaloJet > CaloJetCollection
collection of CaloJet objects