|
|
Go to the documentation of this file.
14 if (
cfg.exists(
"match")) {
18 if (
cfg.exists(
"jetCorrectionLevel")) {
21 produces<std::vector<std::pair<reco::CompositeCandidate, std::vector<int> > > >();
46 std::vector<std::vector<int> > matchVec;
50 matchVec = *matchHandle;
52 std::vector<int> dummyMatch;
53 for (
unsigned int i = 0;
i < 4; ++
i)
54 dummyMatch.push_back(-1);
55 matchVec.push_back(dummyMatch);
59 std::unique_ptr<std::vector<std::pair<reco::CompositeCandidate, std::vector<int> > > > pOut(
61 std::unique_ptr<int> pKey(
new int);
64 unsigned int idMatch = 0;
65 typedef std::vector<std::vector<int> >::iterator MatchVecIterator;
66 for (MatchVecIterator
match = matchVec.begin();
match != matchVec.end(); ++
match) {
71 pOut->push_back(std::make_pair(
hypo(), *
match));
105 addFourMomenta.
set(wBar);
108 addFourMomenta.
set(topBar);
113 addFourMomenta.
set(
w);
116 addFourMomenta.
set(top);
121 addFourMomenta.
set(hyp);
131 <<
"Unconfigured jetCorrectionLevel. Please use an appropriate, non-empty string.\n";
134 if (!(quarkType ==
"wQuarkMix" || quarkType ==
"udsQuark" || quarkType ==
"cQuark" || quarkType ==
"bQuark"))
135 throw cms::Exception(
"Configuration") << quarkType <<
" is unknown as a quarkType for the jetCorrectionLevel.\n";
142 if (
level ==
"L5Flavor:" ||
level ==
"L6UE:" ||
level ==
"L7Parton:") {
143 if (quarkType ==
"wQuarkMix") {
146 if (quarkType ==
"udsQuark") {
149 if (quarkType ==
"cQuark") {
152 if (quarkType ==
"bQuark") {
169 std::string step = correctionLevel.substr(0, correctionLevel.find(
":"));
170 std::string flavor = correctionLevel.substr(1 + correctionLevel.find(
":"));
171 float corrFactor = 1.;
172 if (flavor ==
"wMix")
reco::ShallowClonePtrCandidate * lightP_
virtual void buildKey()=0
build the event hypothesis key
edm::EDGetTokenT< std::vector< pat::Jet > > jetsToken_
input label for all necessary collections
void setCandidate(const edm::Handle< C > &handle, const int &idx, reco::ShallowClonePtrCandidate *&clone)
use one object in a collection to set a ShallowClonePtrCandidate
static const std::string WMinus
virtual void buildHypo(edm::Event &event, const edm::Handle< std::vector< pat::Jet > > &jets, std::vector< int > &jetPartonAssociation, const unsigned int iComb)=0
build event hypothesis from the reco objects of a full-hadronic event
reco::ShallowClonePtrCandidate * bBar_
reco::ShallowClonePtrCandidate * lightPBar_
void produce(edm::Event &, const edm::EventSetup &) override
produce the event hypothesis as CompositeCandidate and Key
reco::ShallowClonePtrCandidate * b_
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
static const std::string LightQ
bool getByToken(EDGetToken token, Handle< PROD > &result) const
static const std::string Top
void addDaughter(const Candidate &, const std::string &s="")
add a clone of the passed candidate as daughter
TtFullHadHypothesis(const edm::ParameterSet &cfg)
default constructor
reco::CompositeCandidate hypo()
return event hypothesis
static const std::string LightP
static const std::string WPlus
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
const LorentzVector & p4() const final
four-momentum Lorentz vector
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
static const std::string BBar
int charge() const final
electric charge
~TtFullHadHypothesis() override
default destructor
const Point & vertex() const override
vertex position (overwritten by PF...)
int key() const
return key
static const std::string B
edm::EDGetTokenT< std::vector< std::vector< int > > > matchToken_
static const std::string TopBar
void set(reco::Candidate &c) const
set up a candidate
reco::ShallowClonePtrCandidate * lightQ_
void resetCandidates()
reset candidate pointers before hypo build process
std::string jetCorrectionLevel(const std::string &quarkType)
helper function to construct the proper correction level string for corresponding quarkType
static const std::string LightQBar
std::string jetCorrectionLevel_
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
static const std::string LightPBar
reco::ShallowClonePtrCandidate * lightQBar_