1142 int nParton =
typeIdx[0].size();
1147 infoPtr->errorMsg(
"Warning in JetMatchingMadgraph:matchPartonsToJets"
1148 "Light: the SlowJet algorithm failed on setup");
1151 double localQcutSq =
qCutSq;
1155 if(
slowJet->dNext() > localQcutSq )
break;
1159 int nJets =
slowJet->sizeJet();
1160 int nClus =
slowJet->sizeAll();
1166 int nCLjets = nClus - nJets;
1171 if ( nCLjets < nRequested )
return LESS_JETS;
1175 if ( nCLjets > nRequested )
return MORE_JETS;
1181 if (
doFxFx && nRequested < nJetMax && nCLjets > nRequested )
1189 infoPtr->errorMsg(
"Warning in JetMatchingMadgraph:matchPartonsToJets"
1190 "Light: the SlowJet algorithm failed on setup");
1198 if(
slowJet->dNext() > localQcutSq )
break;
1211 if (
clFact >= 0. && nParton > 0 ) {
1212 vector<double> partonPt;
1213 for (
int i = 0;
i < nParton; ++
i)
1215 sort( partonPt.begin(), partonPt.end());
1216 localQcutSq =
max(
qCutSq, partonPt[0]);
1225 tempEvent.init(
"(tempEvent)", particleDataPtr);
1227 double pTminEstimate = -1.;
1231 for (
int i = nJets;
i < nClus; ++
i) {
1235 pTminEstimate =
max( pTminEstimate,
slowJet->pT(
i));
1236 if(nPass == nRequested)
break;
1239 int tempSize = tempEvent.size();
1241 vector<bool> jetAssigned;
1242 jetAssigned.assign( tempSize,
false);
1246 vector< vector<bool> > partonMatchesJet;
1247 for (
int i=0;
i < nParton; ++
i )
1248 partonMatchesJet.push_back( vector<bool>(tempEvent.size(),
false) );
1263 while (
doFxFx && iNow < tempSize ) {
1267 tempEventJet.init(
"(tempEventJet)", particleDataPtr);
1268 for (
int i=0;
i < nParton; ++
i ) {
1275 tempEventJet.clear();
1276 tempEventJet.append(
ID_GLUON, 98, 0, 0, 0, 0, 0, 0,
1277 tempEvent[iNow].px(), tempEvent[iNow].py(),
1278 tempEvent[iNow].pz(), tempEvent[iNow].
e() );
1281 tempEventJet.append(
ID_GLUON, 99, 0, 0, 0, 0, 0, 0,
1282 pIn.px(), pIn.py(), pIn.pz(), pIn.e() );
1285 if ( !
slowJet->setup(tempEventJet) ) {
1286 infoPtr->errorMsg(
"Warning in JetMatchingMadgraph:matchPartonsToJets"
1287 "Light: the SlowJet algorithm failed on setup");
1293 if (
slowJet->iNext() == tempEventJet.size() - 1
1295 jetAssigned[iNow] =
true;
1296 partonMatchesJet[
i][iNow] =
true;
1316 while (!
doFxFx && iNow < nParton ) {
1318 tempEventJet.init(
"(tempEventJet)", particleDataPtr);
1319 for (
int i = 0;
i < tempSize; ++
i) {
1320 if (jetAssigned[
i])
continue;
1321 Vec4 pIn = tempEvent[
i].p();
1323 tempEventJet.append(
ID_GLUON, 98, 0, 0, 0, 0, 0, 0,
1324 pIn.px(), pIn.py(), pIn.pz(), pIn.e() );
1329 tempEventJet.append(
ID_GLUON, 99, 0, 0, 0, 0, 0, 0,
1330 pIn.px(), pIn.py(), pIn.pz(), pIn.e() );
1331 if ( !
slowJet->setup(tempEventJet) ) {
1332 infoPtr->errorMsg(
"Warning in JetMatchingMadgraph:matchPartonsToJets"
1333 "Light: the SlowJet algorithm failed on setup");
1338 if (
slowJet->iNext() == tempEventJet.size() - 1
1341 for (
int i = 0; i != tempSize; ++
i) {
1342 if (jetAssigned[i])
continue;
1345 if (iKnt ==
slowJet->jNext() ) jetAssigned[i] =
true;
1356 if (nParton > 0 && pTminEstimate > 0)
eTpTlightMin = pTminEstimate;
Pythia8::Event eventProcess
Pythia8::Event workEventJet
Pythia8::SlowJet * slowJet
const T & max(const T &a, const T &b)
vector< int > origTypeIdx[3]
static const bool MATCHINGDEBUG
tuple size
Write out results.