1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#ifndef TtEventPartons_h
#define TtEventPartons_h
#include "DataFormats/HepMCCandidate/interface/GenParticle.h"
#include <vector>
/**
\class TtEventPartons TtEventPartons.h "AnalysisDataFormats/TopObjects/interface/TtEventPartons.h"
\brief Common base class for TtFullLepEvtPartons, TtFullHadEvtPartons and TtSemiLepEvtPartons
*/
namespace reco {
class Candidate;
}
class TtGenEvent;
class TtEventPartons {
public:
/// default constructor
TtEventPartons() = default;
/// default destructor
virtual ~TtEventPartons() = default;
/// return vector of partons in the order defined in the corresponding enum
/// (method implemented in the derived classes)
virtual std::vector<const reco::Candidate*> vec(const TtGenEvent& genEvt) const = 0;
/// insert dummy index -3 for all partons that were chosen to be ignored
void expand(std::vector<int>& vec) const;
protected:
/// return pointer to an empty reco::Candidate
reco::Candidate* dummyCandidatePtr() const {
return new reco::GenParticle(0, reco::Particle::LorentzVector(), reco::Particle::Point(), 0, 0, false);
};
/// erase partons from vector if they where chosen to be ignored
void prune(std::vector<const reco::Candidate*>& vec) const;
/// flag partons that were chosen not to be used
std::vector<bool> ignorePartons_;
};
#endif
|