57 produces<std::vector<TtHadEvtSolution> >();
80 bool jetsFound =
false;
84 if (jets->size() >= 6) jetsFound =
true;
89 std::vector<TtHadEvtSolution> * evtsols =
new std::vector<TtHadEvtSolution>();
91 for (
unsigned int p=0;
p<3;
p++) {
92 for (
unsigned int q=
p+1;
q<4;
q++) {
93 for (
unsigned int j=
q+1;
j<5;
j++) {
94 for (
unsigned int k=
j+1;
k<6;
k++) {
95 for (
unsigned int bh=0; bh!=jets->size(); bh++) {
96 if(!(bh==
p || bh==
q || bh==
j || bh==
k)) {
97 for (
unsigned int bbarh=0; bbarh!=jets->size(); bbarh++) {
98 if (!(bbarh==
p || bbarh==
q || bbarh==
j || bbarh==
k) && !(bbarh==bh)) {
102 std::vector<TtHadEvtSolution> asol;
106 asol[0].setHadp(jets,
p);
107 asol[0].setHadq(jets,
q);
108 asol[0].setHadj(jets,
j);
109 asol[0].setHadk(jets,
k);
110 asol[0].setHadb(jets, bh);
111 asol[0].setHadbbar(jets, bbarh);
115 asol[1].setHadp(jets,
p);
116 asol[1].setHadq(jets,
j);
117 asol[1].setHadj(jets,
q);
118 asol[1].setHadk(jets,
k);
119 asol[1].setHadb(jets, bh);
120 asol[1].setHadbbar(jets, bbarh);
124 asol[2].setHadp(jets,
p);
125 asol[2].setHadq(jets,
k);
126 asol[2].setHadj(jets,
j);
127 asol[2].setHadk(jets,
q);
128 asol[2].setHadb(jets, bh);
129 asol[2].setHadbbar(jets, bbarh);
132 for(
unsigned int i=0;
i!=asol.size();
i++){
138 std::cout<<
"Fitting needed to decide on best solution, enable fitting!"<<std::endl;
142 for(
unsigned int i=0;
i!=asol.size();
i++){
143 (*myLRSignalSelObservables)(asol[
i]);
148 for(
unsigned int i=0;
i!=asol.size();
i++){
149 (*myLRSignalSelCalc)(asol[
i]);
154 for(
unsigned int i=0;
i!=asol.size();
i++){
155 (*myLRJetCombObservables)(asol[
i]);
160 for(
unsigned int i=0;
i!=asol.size();
i++){
161 (*myLRJetCombCalc)(asol[
i]);
168 for(
unsigned int i=0;
i!=asol.size();
i++){
169 evtsols->push_back(asol[
i]);
182 int simpleBestJetComb = (*mySimpleBestJetComb)(*evtsols);
184 for(
size_t s=0;
s<evtsols->size();
s++){
185 (*evtsols)[
s].setSimpleBestJetComb(simpleBestJetComb);
188 int bestSolution = -999;
189 int bestSolutionChangeW1Q = -999;
190 int bestSolutionChangeW2Q = -999;
193 std::vector<const reco::Candidate*> quarks;
200 quarks.push_back( &genp );
201 quarks.push_back( &genq );
202 quarks.push_back( &genb );
203 quarks.push_back( &genj );
204 quarks.push_back( &genk );
205 quarks.push_back( &genbbar );
206 std::vector<const reco::Candidate*>
jets;
207 for(
size_t s=0;
s<evtsols->size();
s++) {
215 jets.push_back( &jetp );
216 jets.push_back( &jetq );
217 jets.push_back( &jetbh );
218 jets.push_back( &jetj );
219 jets.push_back( &jetk );
220 jets.push_back( &jetbbar );
222 (*evtsols)[
s].setGenEvt(genEvt);
237 bestSolutionChangeW2Q = 0;
240 bestSolutionChangeW1Q = 0;
244 bestSolutionChangeW1Q = 1;
249 bestSolutionChangeW2Q = 1;
252 bestSolutionChangeW1Q = 1;
256 bestSolutionChangeW1Q = 0;
261 bestSolutionChangeW2Q = 0;
264 bestSolutionChangeW1Q = 0;
267 bestSolutionChangeW1Q = 1;
272 for(
size_t s=0;
s<evtsols->size();
s++) {
273 (*evtsols)[
s].setMCBestJetComb(bestSolution);
274 (*evtsols)[
s].setMCChangeW1Q(bestSolutionChangeW1Q);
275 (*evtsols)[
s].setMCChangeW2Q(bestSolutionChangeW2Q);
282 std::auto_ptr<std::vector<TtHadEvtSolution> > pOut(evtsols);
285 std::cout<<
"No calibrated solutions built, because only "<<jets->size()<<
" were present";
287 std::auto_ptr<std::vector<TtHadEvtSolution> > pOut(evtsols);
T getParameter(std::string const &) const
TtHadLRSignalSelObservables * myLRSignalSelObservables
TtHadSimpleBestJetComb * mySimpleBestJetComb
TtFullHadKinFitter * myKinFitter
std::vector< int > lrJetCombObs_
TtHadEvtSolution addKinFitInfo(TtHadEvtSolution *asol)
add kin fit information to the old event solution (in for legacy reasons)
std::string lrSignalSelFile_
Steering class for the overall hadronic top likelihood.
std::string lrJetCombFile_
TtHadLRJetCombCalc * myLRJetCombCalc
std::vector< unsigned int > constraints_
Class to calculate the jet combination LR value and purity from a root-file with fit functions...
Based on the TtSemiSimpleBestJetComb.by: Jan Heyninck version: TtSemiSimpleBestJetComb.cc,v 1.2 2007/06/09 01:17:40 lowette Exp.
~TtHadEvtSolutionMaker()
destructor
TtHadEvtSolutionMaker(const edm::ParameterSet &iConfig)
constructor
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
TtHadLRJetCombObservables * myLRJetCombObservables
tuple genp
produce generated paricles in acceptance #
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
int getMatchForParton(const unsigned int part, const unsigned int comb=0)
virtual void produce(edm::Event &iEvent, const edm::EventSetup &iSetup)
void setJetParametrisation(int jp)
TtHadLRSignalSelCalc * myLRSignalSelCalc
double getSumDistances(const unsigned int comb=0)
double getDistanceForParton(const unsigned int part, const unsigned int comb=0)
std::vector< int > lrSignalSelObs_