19 sprintf(temp,
"%d", i);
73 for (
int m = 0;
m < maxcombos;
m++) {
74 list = list + (
itoa(
m));
78 for (
int m = 0;
m < kcombos;
m++) {
79 seed = seed + (
itoa(
m));
82 std::map<int, std::string> aTemplateCombos;
83 aTemplateCombos.clear();
85 aTemplateCombos[0] =
seed;
88 int totalmatches = seed.size();
89 int totalIte = list.size();
91 for (
int ite = 0; ite < ((
int)totalIte); ite++) {
95 for (i = 0; i < (
int)totalmatches; i++) {
107 for (
int itemp = 0; itemp < (
int)newseed.size(); itemp++) {
109 newseed2 = newseed2 + (newseed[itemp]);
120 for (
int j = 0;
j < (
int)list.size();
j++) {
122 bool Isnewelement =
true;
125 for (
int k = 0;
k < (
int)newseed2.size();
k++) {
126 if (list[
j] == newseed2[
k])
127 Isnewelement =
false;
130 newelement = list[
j];
134 candseed = candseed + newelement;
136 bool IsnewCombo =
true;
137 for (
int ic = 0; ic < (
int)aTemplateCombos.size(); ++ic) {
139 for (
int ij = 0; ij < (
int)(aTemplateCombos[ic]).size(); ij++) {
140 for (
int ik = 0; ik < (
int)candseed.size(); ik++) {
141 if (candseed[ik] == aTemplateCombos[ic][ij])
145 if (nmatch == (
int)totalmatches)
150 aTemplateCombos[(
int)aTemplateCombos.size()] = candseed;
167 return aTemplateCombos;
174 std::map<int, std::string> aTemplateCombos;
175 aTemplateCombos.clear();
177 aTemplateCombos[0] =
"0123";
178 aTemplateCombos[1] =
"0132";
179 aTemplateCombos[2] =
"0213";
180 aTemplateCombos[3] =
"0231";
181 aTemplateCombos[4] =
"0312";
182 aTemplateCombos[5] =
"0321";
183 aTemplateCombos[6] =
"1203";
184 aTemplateCombos[7] =
"1230";
185 aTemplateCombos[8] =
"1302";
186 aTemplateCombos[9] =
"1320";
187 aTemplateCombos[10] =
"2301";
188 aTemplateCombos[11] =
"2310";
190 return aTemplateCombos;
197 std::map<Combo, int, minChi2> allCombos;
198 std::map<Combo, int, maxSumEt> allCombosSumEt;
200 std::map<int, std::string> aTemplateCombos;
201 aTemplateCombos.clear();
203 if (jets.size() == 4)
205 if (jets.size() == 5)
207 if (jets.size() == 6)
209 if (jets.size() == 7)
217 std::cout <<
"[JetCombinatorics] size of vector of jets = " << jets.size() << std::endl;
219 for (
size_t ic = 0; ic != aTemplateCombos.size(); ++ic) {
221 std::cout <<
"[JetCombinatorics] get 4 jets from the list, cluster # " << ic <<
"/" << aTemplateCombos.size() - 1
228 std::cout <<
"[JetCombinatorics] template of 4 jets = " << aTemplate << std::endl;
231 std::vector<TLorentzVector> the4jets;
232 std::vector<int> the4Ids;
233 std::vector<double> thebdisc;
234 std::vector<double> theFlvCorr;
237 for (
int ij = 0; ij < 4; ij++) {
241 int tmpi = atoi((aTemplate.substr(ij, 1)).c_str());
243 the4jets.push_back(jets[tmpi]);
244 the4Ids.push_back(tmpi);
246 thebdisc.push_back(bdiscriminators[tmpi]);
252 std::cout <<
"[JetCombinatorics] with these 4 jets, make 12 combinations: " << std::endl;
260 std::cout <<
"[JetCombinatorics] ==> combination: " << a4template <<
" is # " << itemplate <<
"/" 265 acombo.
SetWp(the4jets[atoi((a4template.substr(0, 1)).c_str())]);
266 acombo.
SetWq(the4jets[atoi((a4template.substr(1, 1)).c_str())]);
267 acombo.
SetHadb(the4jets[atoi((a4template.substr(2, 1)).c_str())]);
268 acombo.
SetLepb(the4jets[atoi((a4template.substr(3, 1)).c_str())]);
271 acombo.
SetIdWp(the4Ids[atoi((a4template.substr(0, 1)).c_str())]);
272 acombo.
SetIdWq(the4Ids[atoi((a4template.substr(1, 1)).c_str())]);
273 acombo.
SetIdHadb(the4Ids[atoi((a4template.substr(2, 1)).c_str())]);
274 acombo.
SetIdLepb(the4Ids[atoi((a4template.substr(3, 1)).c_str())]);
278 acombo.
SetFlvCorrWp(theFlvCorr[atoi((a4template.substr(0, 1)).c_str())]);
279 acombo.
SetFlvCorrWq(theFlvCorr[atoi((a4template.substr(1, 1)).c_str())]);
280 acombo.
SetFlvCorrHadb(theFlvCorr[atoi((a4template.substr(2, 1)).c_str())]);
281 acombo.
SetFlvCorrLepb(theFlvCorr[atoi((a4template.substr(3, 1)).c_str())]);
287 acombo.
SetWp_disc(thebdisc[atoi((a4template.substr(0, 1)).c_str())]);
288 acombo.
SetWq_disc(thebdisc[atoi((a4template.substr(1, 1)).c_str())]);
289 acombo.
SetHadb_disc(thebdisc[atoi((a4template.substr(2, 1)).c_str())]);
290 acombo.
SetLepb_disc(thebdisc[atoi((a4template.substr(3, 1)).c_str())]);
300 std::cout <<
"[JetCombinatorics] ==> combination done:" << std::endl;
305 TLorentzVector aHadWP4 = acombo.
GetHadW();
306 TLorentzVector aLepWP4 = acombo.
GetLepW();
307 TLorentzVector aLepTopP4 = acombo.
GetLepTop();
312 allCombos[acombo] =
n;
313 allCombosSumEt[acombo] =
n;
327 for (std::map<Combo, int, minChi2>::const_iterator ite =
allCombos_.begin(); ite !=
allCombos_.end(); ++ite) {
void UseMtopConstraint(bool option=true)
std::map< Combo, int, maxSumEt > allCombosSumEt_
void FourJetsCombinations(const std::vector< TLorentzVector > &jets, const std::vector< double > &bdiscriminators)
void SetLepb_disc(double disc)
std::map< int, std::string > Template7jCombos_
std::vector< TLorentzVector > cand1_
void SetbDiscPdf(const TString &filename)
std::map< int, std::string > Template5jCombos_
std::map< int, std::string > Combinatorics(int k, int max=6)
void ApplyFlavorCorrections(bool option=true)
void SetFlvCorrLepb(double corr)
std::vector< double > flavorCorrections_
void SetWp_disc(double disc)
void SetHadb_disc(double disc)
void SetFlvCorrWq(double corr)
std::map< int, std::string > NestedCombinatorics()
void SetLepb(const TLorentzVector &Lepb)
std::map< Combo, int, minChi2 > allCombos_
void SetWq(const TLorentzVector &Wq)
Combo GetCombination(int n=0)
void SetHadb(const TLorentzVector &Hadb)
void SetFlvCorrWp(double corr)
std::map< int, std::string > Template4jCombos_
Combo GetCombinationSumEt(int n=0)
std::map< int, std::string > Template6jCombos_
void SetWq_disc(double disc)
void SetFlvCorrHadb(double corr)
void SetLepW(const TLorentzVector &LepW)
TLorentzVector GetLepTop()
void Usebtagging(bool option=true)
void SetSigmas(int type=0)
void SetWp(const TLorentzVector &Wp)
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run