File indexing completed on 2024-04-06 12:05:23
0001 #ifndef DATAFORMAT_NUCLEARINTERACTION_
0002 #define DATAFORMAT_NUCLEARINTERACTION_
0003
0004 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0005 #include "DataFormats/TrackReco/interface/Track.h"
0006 #include "DataFormats/TrajectorySeed/interface/TrajectorySeedCollection.h"
0007 #include "DataFormats/VertexReco/interface/Vertex.h"
0008
0009 namespace reco {
0010
0011 class NuclearInteraction {
0012 public:
0013 typedef edm::RefVector<TrajectorySeedCollection> TrajectorySeedRefVector;
0014 typedef edm::Ref<TrajectorySeedCollection> TrajectorySeedRef;
0015 typedef reco::Vertex::trackRef_iterator trackRef_iterator;
0016 typedef TrajectorySeedRefVector::iterator seedRef_iterator;
0017
0018 NuclearInteraction() {}
0019
0020 NuclearInteraction(const TrajectorySeedRefVector& tseeds, const reco::Vertex& vtx, double lkh) {
0021 seeds_ = tseeds;
0022 vertex_ = vtx;
0023 likelihood_ = lkh;
0024 }
0025
0026
0027 const edm::RefToBase<reco::Track>& primaryTrack() const { return *(vertex_.tracks_begin()); }
0028
0029
0030 int secondaryTracksSize() const { return vertex_.tracksSize() - 1; }
0031
0032
0033 trackRef_iterator secondaryTracks_begin() const { return vertex_.tracks_begin() + 1; }
0034
0035
0036 trackRef_iterator secondaryTracks_end() const { return vertex_.tracks_end(); }
0037
0038
0039 int seedsSize() const { return seeds_.size(); }
0040
0041
0042 const TrajectorySeedRefVector& seeds() { return seeds_; }
0043
0044
0045 seedRef_iterator seeds_begin() const { return seeds_.begin(); }
0046
0047
0048 seedRef_iterator seeds_end() const { return seeds_.end(); }
0049
0050
0051 const reco::Vertex& vertex() const { return vertex_; }
0052
0053
0054 double likelihood() const { return likelihood_; }
0055
0056 private:
0057
0058
0059
0060
0061 TrajectorySeedRefVector seeds_;
0062
0063
0064 reco::Vertex vertex_;
0065
0066
0067 double likelihood_;
0068 };
0069 }
0070 #endif