39 #include "TLorentzVector.h" 60 template <
typename T,
typename... Args>
82 iConfig.getParameter<
edm::
InputTag>(
"vertexCompositeCandidates"))) {
86 template <
typename T,
typename... Args>
99 std::vector<const reco::Track*> myTracks;
104 if (vccHandle->empty())
110 myTracks.emplace_back(&
track);
114 if (myTracks.size() != 2)
117 for (
const auto&
v0 : v0s) {
121 for (
size_t i = 0;
i <
v0.numberOfDaughters(); ++
i) {
125 if (chargedDaughter) {
136 const auto& tplus = myTracks[0]->charge() > 0 ? myTracks[0] : myTracks[1];
137 const auto& tminus = myTracks[0]->charge() < 0 ? myTracks[0] : myTracks[1];
139 TLorentzVector p4_tplus(tplus->px(), tplus->py(), tplus->pz(),
sqrt((tplus->p() * tplus->p()) +
piMass2));
140 TLorentzVector p4_tminus(tminus->px(), tminus->py(), tminus->pz(),
sqrt((tminus->p() * tminus->p()) +
piMass2));
142 const auto& V0p4 = p4_tplus + p4_tminus;
143 float track_invMass = V0p4.M();
148 h_diTrackMass = book<TH1F>(
"diTrackMass",
"V0 mass from tracks in Event", 100, 0.400, 0.600);
149 h_V0Mass = book<TH1F>(
"V0kMass",
"Reconstructed V0 mass in Event", 100, 0.400, 0.600);
static const std::string kSharedResource
void addWithDefaultLabel(ParameterSetDescription const &psetDescription)
std::vector< VertexCompositeCandidate > VertexCompositeCandidateCollection
collection of Candidate objects
T const * product() const
std::vector< Track > TrackCollection
collection of Tracks
bool isNonnull() const
Checks for non-null.
const edm::EDGetTokenT< TrackCollection > tracksToken_
void analyze(const edm::Event &, const edm::EventSetup &) override
edm::Service< TFileService > fs_
const edm::EDGetTokenT< reco::VertexCompositeCandidateCollection > vccToken_
T * book(const Args &... args) const
reco::TrackRef track() const override
reference to a track
#define DEFINE_FWK_MODULE(type)
~TkAlV0sAnalyzer() override=default
static constexpr double piMass2
TkAlV0sAnalyzer(const edm::ParameterSet &)
T * make(const Args &...args) const
make new ROOT object
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)