6 jets_(cfg.getParameter<edm::InputTag>(
"jets")),
7 lightQ_(0), lightQBar_(0), b_(0), bBar_(0), lightP_(0), lightPBar_(0)
10 if( cfg.
exists(
"match") ) {
14 if( cfg.
exists(
"jetCorrectionLevel") ) {
17 produces<std::vector<std::pair<reco::CompositeCandidate, std::vector<int> > > >();
39 std::vector<std::vector<int> > matchVec;
43 matchVec = *matchHandle;
46 std::vector<int> dummyMatch;
47 for(
unsigned int i = 0;
i < 4; ++
i)
48 dummyMatch.push_back( -1 );
49 matchVec.push_back( dummyMatch );
53 std::auto_ptr<std::vector<std::pair<reco::CompositeCandidate, std::vector<int> > > >
55 std::auto_ptr<int> pKey(
new int);
58 unsigned int idMatch = 0;
59 typedef std::vector<std::vector<int> >::iterator MatchVecIterator;
60 for(MatchVecIterator
match = matchVec.begin();
match != matchVec.end(); ++
match) {
65 pOut->push_back( std::make_pair(
hypo(), *
match) );
104 addFourMomenta.
set( wBar );
107 addFourMomenta.
set( topBar );
112 addFourMomenta.
set( w );
115 addFourMomenta.
set( top );
120 addFourMomenta.
set( hyp );
132 <<
"Unconfigured jetCorrectionLevel. Please use an appropriate, non-empty string.\n";
135 if( !(quarkType==
"wQuarkMix" ||
136 quarkType==
"udsQuark" ||
137 quarkType==
"cQuark" ||
138 quarkType==
"bQuark") )
140 << quarkType <<
" is unknown as a quarkType for the jetCorrectionLevel.\n";
147 if( level==
"L5Flavor:" || level==
"L6UE:" || level==
"L7Parton:" ){
148 if(quarkType==
"wQuarkMix"){level+=
"wMix";}
149 if(quarkType==
"udsQuark" ){level+=
"uds";}
150 if(quarkType==
"cQuark" ){level+=
"charm";}
151 if(quarkType==
"bQuark" ){level+=
"bottom";}
167 std::string
step = correctionLevel.substr(0,correctionLevel.find(
":"));
168 std::string flavor = correctionLevel.substr(1+correctionLevel.find(
":"));
169 float corrFactor = 1.;
171 corrFactor = 0.75*ptr->jecFactor(step,
"uds") + 0.25*ptr->jecFactor(step,
"charm");
173 corrFactor = ptr->jecFactor(step, flavor);
T getParameter(std::string const &) const
int key() const
return key
void setCandidate(const edm::Handle< C > &handle, const int &idx, reco::ShallowClonePtrCandidate *&clone)
use one object in a collection to set a ShallowClonePtrCandidate
virtual void produce(edm::Event &, const edm::EventSetup &)
produce the event hypothesis as CompositeCandidate and Key
static const std::string LightPBar
bool exists(std::string const ¶meterName) const
checks if a parameter exists
std::string jetCorrectionLevel(const std::string &quarkType)
helper function to construct the proper correction level string for corresponding quarkType ...
static const std::string LightQ
reco::ShallowClonePtrCandidate * lightPBar_
edm::InputTag jets_
input label for all necessary collections
static const std::string Top
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
static const std::string LightP
reco::ShallowClonePtrCandidate * lightQBar_
static const std::string WMinus
reco::ShallowClonePtrCandidate * lightP_
static const std::string B
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
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void addDaughter(const Candidate &, const std::string &s="")
add a clone of the passed candidate as daughter
std::string jetCorrectionLevel_
static const std::string WPlus
static const std::string BBar
static const std::string TopBar
virtual void buildKey()=0
build the event hypothesis key
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
reco::ShallowClonePtrCandidate * bBar_
void resetCandidates()
reset candidate pointers before hypo build process
~TtFullHadHypothesis()
default destructor
reco::ShallowClonePtrCandidate * b_
TtFullHadHypothesis(const edm::ParameterSet &cfg)
default constructor
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
void set(reco::Candidate &c) const
set up a candidate
static const std::string LightQBar
reco::CompositeCandidate hypo()
return event hypothesis
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
reco::ShallowClonePtrCandidate * lightQ_