Page MenuHomeHEPForge

No OneTemporary

diff --git a/MatrixElement/FxFx/FxFxFileReader.cc b/MatrixElement/FxFx/FxFxFileReader.cc
--- a/MatrixElement/FxFx/FxFxFileReader.cc
+++ b/MatrixElement/FxFx/FxFxFileReader.cc
@@ -1,914 +1,929 @@
// -*- C++ -*-
//
// FxFxFileReader.cc is a part of ThePEG - Toolkit for HEP Event Generation
// Copyright (C) 1999-2019 Leif Lonnblad
//
// ThePEG is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the FxFxFileReader class.
//
#include "FxFxFileReader.h"
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Utilities/Throw.h"
#include "ThePEG/PDT/DecayMode.h"
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
#include <sstream>
#include <iostream>
using namespace ThePEG;
FxFxFileReader::
FxFxFileReader(const FxFxFileReader & x)
: FxFxReader(x), neve(x.neve), ieve(0),
LHFVersion(x.LHFVersion), outsideBlock(x.outsideBlock),
headerBlock(x.headerBlock), initComments(x.initComments),
initAttributes(x.initAttributes), eventComments(x.eventComments),
eventAttributes(x.eventAttributes),
theFileName(x.theFileName), theQNumbers(x.theQNumbers),
theIncludeFxFxTags(x.theIncludeFxFxTags),
theIncludeCentral(x.theIncludeCentral),
theDecayer(x.theDecayer) {}
FxFxFileReader::~FxFxFileReader() {}
IBPtr FxFxFileReader::clone() const {
return new_ptr(*this);
}
IBPtr FxFxFileReader::fullclone() const {
return new_ptr(*this);
}
bool FxFxFileReader::preInitialize() const {
return true;
}
void FxFxFileReader::doinit() {
FxFxReader::doinit();
// are we using QNUMBERS
if(!theQNumbers) return;
// parse the header block and create
// any new particles needed in QNUMBERS blocks
string block = headerBlock;
string line = "";
bool readingSLHA = false;
int (*pf)(int) = tolower;
unsigned int newNumber(0);
do {
line = StringUtils::car(block,"\r\n");
block = StringUtils::cdr(block,"\r\n");
if(line[0]=='#') continue;
// are we reading the SLHA block
if(readingSLHA) {
// reached the end of slha block ?
if(line.find("</slha") != string::npos) {
readingSLHA = false;
break;
}
// remove trailing comment from line
vector<string> split = StringUtils::split(line,"#");
// check for a qnumbers block
transform(split[0].begin(), split[0].end(), split[0].begin(), pf);
// if not contine
if(split[0].find("block qnumbers")==string::npos)
continue;
// get name from comment
string name;
if(split.size()>=2) {
name = StringUtils::stripws(split[1]);
}
else {
++newNumber;
ostringstream tname;
tname << "NP" << newNumber;
name = tname.str();
}
// extract the PDG code
split = StringUtils::split(split[0]," ");
istringstream is(split[2]);
long PDGCode(0);
is >> PDGCode;
// get the charge, spin, colour and whether an antiparticle
int charge(0),spin(0),colour(0),anti(0);
for(unsigned int ix=0;ix<4;++ix) {
line = StringUtils::car(block,"\r\n");
block = StringUtils::cdr(block,"\r\n");
int dummy[2];
istringstream is(line);
is >> dummy[0] >> dummy[1];
switch (dummy[0]) {
case 1:
charge = dummy[1];
break;
case 2:
spin = dummy[1];
break;
case 3:
colour = dummy[1];
break;
case 4:
anti = dummy[1];
break;
default:
assert(false);
}
}
// check if particles already exist
PDPair newParticle;
newParticle.first = getParticleData(PDGCode);
if(newParticle.first) Throw<SetupException>()
<< "Particle with PDG code " << PDGCode
<< " whose creation was requested in a QNUMBERS Block"
<< " already exists. Retaining the original particle"
<< Exception::warning;
if(anti) {
newParticle.second = getParticleData(-PDGCode);
if(newParticle.second) Throw<SetupException>()
<< "Anti-particle with PDG code " << -PDGCode
<< " whose creation was requested in a QNUMBERS Block"
<< " already exists. Retaining the original particle"
<< Exception::warning;
if(( newParticle.first && !newParticle.second ) ||
( newParticle.second && !newParticle.first ) )
Throw<SetupException>()
<< "Either particle or anti-particle with PDG code " << PDGCode
<< " whose creation was requested in a QNUMBERS Block"
<< " already exists, but not both the particle and antiparticle. "
<< " Something dodgy here stopping"
<< Exception::runerror;
}
// already exists continue
if(newParticle.first) continue;
// create the particles
// particle with no anti particle
if( anti == 0 ) {
// construct the name
if(name=="") {
ostringstream temp;
temp << PDGCode;
name = temp.str();
}
// create the ParticleData object
newParticle.first = ParticleData::Create(PDGCode,name);
}
// particle anti-particle pair
else {
// construct the names
string nameAnti;
if(name=="") {
ostringstream temp;
temp << PDGCode;
name = temp.str();
ostringstream temp2;
temp << -PDGCode;
nameAnti = temp2.str();
}
else {
nameAnti=name;
for(string::iterator it=nameAnti.begin();it!=nameAnti.end();++it) {
if(*it=='+') nameAnti.replace(it,it+1,"-");
else if(*it=='-') nameAnti.replace(it,it+1,"+");
}
if(nameAnti==name) nameAnti += "bar";
}
// create the ParticleData objects
newParticle = ParticleData::Create(PDGCode,name,nameAnti);
}
// set the particle properties
if(colour==1) colour = 0;
newParticle.first->iColour(PDT::Colour(colour));
newParticle.first->iSpin (PDT::Spin (spin ));
newParticle.first->iCharge(PDT::Charge(charge));
// register it
generator()->preinitRegister(newParticle.first,
"/Herwig/Particles/"+newParticle.first->PDGName());
// set the antiparticle properties
if(newParticle.second) {
if(colour==3||colour==6) colour *= -1;
charge = -charge;
newParticle.second->iColour(PDT::Colour(colour));
newParticle.second->iSpin (PDT::Spin (spin ));
newParticle.second->iCharge(PDT::Charge(charge));
// register it
generator()->preinitRegister(newParticle.second,
"/Herwig/Particles/"+newParticle.second->PDGName());
}
}
// start of SLHA block ?
else if(line.find("<slha") != string::npos) {
readingSLHA = true;
}
}
while(line!="");
// now set any masses/decay modes
block = headerBlock;
line="";
readingSLHA=false;
bool ok=true;
do {
line = StringUtils::car(block,"\r\n");
block = StringUtils::cdr(block,"\r\n");
// are we reading the SLHA block
if(readingSLHA) {
// reached the end?
if(line.find("</slha") == 0 ) {
readingSLHA = false;
break;
}
// make lower case
transform(line.begin(),line.end(),line.begin(), pf);
// found the mass block ?
if(line.find("block mass")!=string::npos) {
// read it
line = StringUtils::car(block,"\r\n");
// check not at end
while(line[0] != 'D' && line[0] != 'B' &&
line[0] != 'd' && line[0] != 'b' &&
line != "") {
// skip comment lines
if(line[0] == '#') {
block = StringUtils::cdr(block,"\r\n");
line = StringUtils::car(block,"\r\n");
continue;
}
// get the mass and PGD code
istringstream temp(line);
long id;
double mass;
temp >> id >> mass;
// skip resetting masses on SM particles
// as it can cause problems later on in event generation
if(abs(id)<=6 || (abs(id)>=11 && abs(id)<=16) ||
abs(id)==23 || abs(id)==24) {
// Throw<SetupException>() << "Standard model mass for PID "
// << id
// << " will not be changed."
// << Exception::warning;
block = StringUtils::cdr(block,"\r\n");
line = StringUtils::car(block,"\r\n");
continue;
}
// magnitude of mass for susy models
mass = abs(mass);
// set the mass
tPDPtr particle = getParticleData(id);
if(!particle) throw SetupException()
<< "FxFxFileReader::doinit() - Particle with PDG code not"
<< id << " not found." << Exception::runerror;
const InterfaceBase * ifb = BaseRepository::FindInterface(particle,
"NominalMass");
ostringstream os;
os << mass;
ifb->exec(*particle, "set", os.str());
// read the next line
block = StringUtils::cdr(block,"\r\n");
line = StringUtils::car(block,"\r\n");
};
}
// found a decay block
else if(line.find("decay") == 0) {
// get PGD code and width
istringstream iss(line);
string dummy;
long parent(0);
Energy width(ZERO);
iss >> dummy >> parent >> iunit(width, GeV);
// get the ParticleData object
PDPtr inpart = getParticleData(parent);
if(!inpart) {
throw SetupException()
<< "FxFxFileReader::doinit() - A ParticleData object with the PDG code "
<< parent << " does not exist. " << Exception::runerror;
return;
}
if ( abs(inpart->id()) == 6 ||
abs(inpart->id()) == 15 ||
abs(inpart->id()) == 23 ||
abs(inpart->id()) == 24 ||
abs(inpart->id()) == 25 ) {
Throw<SetupException>() << "\n"
"************************************************************************\n"
"* Your LHE file changes the width of " << inpart->PDGName() << ".\n"
"* This can cause serious problems in the event generation!\n"
"************************************************************************\n"
"\n" << Exception::warning;
}
else if (inpart->width() > ZERO && width <= ZERO) {
Throw<SetupException>() << "\n"
"************************************************************************\n"
"* Your LHE file zeroes the non-zero width of " << inpart->PDGName() << ".\n"
"* If " << inpart->PDGName() << " is a decaying SM particle,\n"
"* this can cause serious problems in the event generation!\n"
"************************************************************************\n"
"\n" << Exception::warning;
}
// set the width
inpart->width(width);
if( width > ZERO ) {
inpart->cTau(hbarc/width);
inpart->widthCut(5.*width);
inpart->stable(false);
}
// construct prefix for DecayModes
string prefix(inpart->name() + "->"), tag(prefix),line("");
unsigned int nmode(0);
// read any decay modes
line = StringUtils::car(block,"\r\n");
while(line[0] != 'D' && line[0] != 'B' &&
line[0] != 'd' && line[0] != 'b' &&
line[0] != '<' && line != "") {
// skip comments
if(line[0] == '#') {
block = StringUtils::cdr(block,"\r\n");
line = StringUtils::car(block,"\r\n");
continue;
}
// read decay mode and construct the tag
istringstream is(line);
double brat(0.);
unsigned int nda(0),npr(0);
is >> brat >> nda;
while( true ) {
long t;
is >> t;
if( is.fail() ) break;
if( t == abs(parent) )
throw SetupException()
<< "An error occurred while read a decay of the "
<< inpart->PDGName() << ". One of its products has the same PDG code "
<< "as the parent particle in FxFxFileReader::doinit()."
<< " Please check the Les Houches file.\n"
<< Exception::runerror;
tcPDPtr p = getParticleData(t);
if( !p )
throw SetupException()
<< "FxFxFileReader::doinit() -"
<< " An unknown PDG code has been encounterd "
<< "while reading a decay mode. ID: " << t
<< Exception::runerror;
++npr;
tag += p->name() + ",";
}
if( npr != nda )
throw SetupException()
<< "FxFxFileReader::doinit() - While reading a decay of the "
<< inpart->PDGName() << " from an SLHA file, an inconsistency "
<< "between the number of decay products and the value in "
<< "the 'NDA' column was found. Please check if the spectrum "
<< "file is correct.\n"
<< Exception::warning;
// create the DecayMode
if( npr > 1 ) {
if( nmode==0 ) {
generator()->preinitInterface(inpart, "VariableRatio" , "set","false");
if(inpart->massGenerator()) {
ok = false;
Throw<SetupException>()
<< inpart->PDGName() << " already has a WidthGenerator set"
<< " this is incompatible with using QNUMBERS "
<< "Use\n"
<< "set " << inpart->fullName() << ":Width_generator NULL\n"
<< "to fix this." << Exception::warning;
}
unsigned int ntemp=0;
for(DecaySet::const_iterator dit = inpart->decayModes().begin();
dit != inpart->decayModes().end(); ++dit ) {
if((**dit).on()) ++ntemp;
}
if(ntemp!=0) {
ok = false;
Throw<SetupException>()
<< inpart->PDGName() << " already has DecayModes"
<< " this is incompatible with using QNUMBERS "
<< "Use\n"
<< "do " << inpart->fullName() << ":SelectDecayModes none\n"
<< " to fix this." << Exception::warning;
}
}
inpart->stable(false);
tag.replace(tag.size() - 1, 1, ";");
DMPtr dm = generator()->findDecayMode(tag);
if(!theDecayer) Throw<SetupException>()
<< "FxFxFileReader::doinit() Decayer must be set using the "
<< "FxFxFileReader:Decayer"
<< " must be set to allow the creation of new"
<< " decay modes."
<< Exception::runerror;
if(!dm) {
dm = generator()->preinitCreateDecayMode(tag);
if(!dm)
Throw<SetupException>()
<< "FxFxFileReader::doinit() - Needed to create "
<< "new decaymode but one could not be created for the tag "
<< tag << Exception::warning;
}
generator()->preinitInterface(dm, "Decayer", "set",
theDecayer->fullName());
ostringstream br;
br << setprecision(13) << brat;
generator()->preinitInterface(dm, "BranchingRatio", "set", br.str());
generator()->preinitInterface(dm, "Active", "set", "Yes");
if(dm->CC()) {
generator()->preinitInterface(dm->CC(), "BranchingRatio", "set", br.str());
generator()->preinitInterface(dm->CC(), "Active", "set", "Yes");
}
++nmode;
}
tag=prefix;
// read the next line
block = StringUtils::cdr(block,"\r\n");
line = StringUtils::car(block,"\r\n");
};
if(nmode>0) {
inpart->update();
if(inpart->CC())
inpart->CC()->update();
}
}
}
// start of SLHA block ?
else if(line.find("<slha") != string::npos) {
readingSLHA = true;
}
}
while(line!="");
if(!ok)
throw SetupException() << "Problem reading QNUMBERS blocks in FxFxFileReader::doinit()"
<< Exception::runerror;
}
void FxFxFileReader::initialize(FxFxEventHandler & eh) {
FxFxReader::initialize(eh);
if ( LHFVersion.empty() )
Throw<FxFxFileError>()
<< "The file associated with '" << name() << "' does not contain a "
<< "proper formatted Les Houches event file. The events may not be "
<< "properly sampled." << Exception::warning;
}
//vector<string> FxFxFileReader::optWeightNamesFunc() { return optionalWeightsNames; }
vector<string> FxFxFileReader::optWeightsNamesFunc() { return optionalWeightsNames; }
void FxFxFileReader::open() {
if ( filename().empty() )
throw FxFxFileError()
<< "No Les Houches file name. "
<< "Use 'set " << name() << ":FileName'."
<< Exception::runerror;
cfile.open(filename());
if ( !cfile )
throw FxFxFileError()
<< "The FxFxFileReader '" << name() << "' could not open the "
<< "event file called '" << theFileName << "'."
<< Exception::runerror;
cfile.readline();
if ( !cfile.find("<LesHouchesEvents") ) return;
map<string,string> attributes =
StringUtils::xmlAttributes("LesHouchesEvents", cfile.getline());
LHFVersion = attributes["version"];
//cout << LHFVersion << endl;
if ( LHFVersion.empty() ) return;
bool readingHeader = false;
bool readingInit = false;
headerBlock = "";
// char (cwgtinfo_weights_info[250][15]);
string hs;
// int cwgtinfo_nn(0);
// Loop over all lines until we hit the </init> tag.
bool readingInitWeights = false, readingInitWeights_sc = false;
string weightinfo;
while ( cfile.readline() ) {
// found the init block for multiple weights
if(cfile.find("<initrwgt")) { /*cout << "reading weights" << endl;*/ readingInitWeights = true; }
// found end of init block for multiple weights: end the while loop
if(cfile.find("</initrwgt")) { readingInitWeights = false; readingInitWeights_sc = false; continue;}
// found the end of init block
if(cfile.find("</init")) { readingInit = false; break; }
/* read the weight information block
* optionalWeightNames will contain information about the weights
* this will be appended to the weight information
*/
if(readingInitWeights) {
string scalename = "";
if(cfile.find("<weightgroup")) {
/* we found a weight group
* start reading the information
* within it
*/
readingInitWeights_sc = true;
weightinfo = cfile.getline();
/* to make it shorter, erase some stuff
*/
string str_weightgroup = "<weightgroup";
string str_arrow = ">";
string str_newline = "\n";
erase_substr(weightinfo, str_weightgroup);
erase_substr(weightinfo, str_arrow);
erase_substr(weightinfo, str_newline);
}
/* if we are reading a new weightgroup, go on
* until we find the end of it
*/
if(readingInitWeights_sc && !cfile.find("</weightgroup") && !cfile.find("<weightgroup")) {
hs = cfile.getline();
+ //cout << "hs=" << hs << endl;
+ //cout << "weightinfo= " << weightinfo << endl;
+ //fix for potential new lines:
+ if(!cfile.find("<weight") and !cfile.find("</weightgroup")) {
+ weightinfo = weightinfo + hs;
+ //cout << "weightinfo fixed= " << weightinfo << endl;
+ continue;
+ }
istringstream isc(hs);
int ws = 0;
/* get the name that will be used to identify the scale
*/
do {
string sub; isc >> sub;
if(ws==1) { string str_arrow = ">"; erase_substr(sub, str_arrow); scalename = sub; }
++ws;
} while (isc);
/* now get the relevant information
* e.g. scales or PDF sets used
*/
string startDEL = ">"; //starting delimiter
string stopDEL = "</weight>"; //end delimiter
unsigned firstLim = hs.find(startDEL); //find start of delimiter
// unsigned lastLim = hs.find(stopDEL); //find end of delimitr
string scinfo = hs.substr(firstLim); //define the information for the scale
-
erase_substr(scinfo,stopDEL);
erase_substr(scinfo,startDEL);
scinfo = StringUtils::stripws(scinfo);
+ //cout << "scinfo = " << scinfo << endl;
/* fill in the map
* indicating the information to be appended to each scale
* i.e. scinfo for each scalname
*/
scalemap[scalename] = scinfo.c_str();
string str_id = "id=";
string str_prime = "'";
erase_substr(scalename, str_id);
erase_substr(scalename, str_prime);
optionalWeightsNames.push_back(scalename);
}
}
if ( cfile.find("<header") ) {
- // We have hit the header block, so we should dump this and all
// following lines to headerBlock until we hit the end of it.
readingHeader = true;
headerBlock = cfile.getline() + "\n";
}
if ( (cfile.find("<init ") && !cfile.find("<initrwgt")) || cfile.find("<init>") ) {
//cout << "found init block" << endl;
// We have hit the init block, so we should expect to find the
// standard information in the following. But first check for
// attributes.
initAttributes = StringUtils::xmlAttributes("init", cfile.getline());
readingInit = true;
cfile.readline();
if ( !( cfile >> heprup.IDBMUP.first >> heprup.IDBMUP.second
>> heprup.EBMUP.first >> heprup.EBMUP.second
>> heprup.PDFGUP.first >> heprup.PDFGUP.second
>> heprup.PDFSUP.first >> heprup.PDFSUP.second
>> heprup.IDWTUP >> heprup.NPRUP ) ) {
heprup.NPRUP = -42;
LHFVersion = "";
return;
}
heprup.resize();
for ( int i = 0; i < heprup.NPRUP; ++i ) {
cfile.readline();
if ( !( cfile >> heprup.XSECUP[i] >> heprup.XERRUP[i]
>> heprup.XMAXUP[i] >> heprup.LPRUP[i] ) ) {
heprup.NPRUP = -42;
LHFVersion = "";
return;
}
}
}
if ( cfile.find("</header") ) {
readingHeader = false;
headerBlock += cfile.getline() + "\n";
}
if ( readingHeader ) {
/* We are in the process of reading the header block. Dump the
line to headerBlock.*/
headerBlock += cfile.getline() + "\n";
}
if ( readingInit ) {
// Here we found a comment line. Dump it to initComments.
initComments += cfile.getline() + "\n";
}
}
string central = "central";
if (theIncludeCentral) optionalWeightsNames.push_back(central);
// cout << "reading init finished" << endl;
if ( !cfile ) {
heprup.NPRUP = -42;
LHFVersion = "";
return;
}
}
bool FxFxFileReader::doReadEvent() {
if ( !cfile ) return false;
if ( LHFVersion.empty() ) return false;
if ( heprup.NPRUP < 0 ) return false;
eventComments = "";
outsideBlock = "";
hepeup.NUP = 0;
hepeup.XPDWUP.first = hepeup.XPDWUP.second = 0.0;
optionalWeights.clear();
optionalWeightsTemp.clear();
// Keep reading lines until we hit the next event or the end of
// the event block. Save any inbetween lines. Exit if we didn't
// find an event.
while ( cfile.readline() && !cfile.find("<event") )
outsideBlock += cfile.getline() + "\n";
// We found an event. First scan for attributes.
eventAttributes = StringUtils::xmlAttributes("event", cfile.getline());
/* information necessary for FxFx merging:
* the npLO and npNLO tags
*/
istringstream ievat(cfile.getline());
int we(0), npLO(-10), npNLO(-10);
do {
string sub; ievat >> sub;
if(we==2) { npLO = atoi(sub.c_str()); }
if(we==5) { npNLO = atoi(sub.c_str()); }
++we;
} while (ievat);
optionalnpLO = npLO;
optionalnpNLO = npNLO;
std::stringstream npstringstream;
npstringstream << "np " << npLO << " " << npNLO;
std::string npstrings = npstringstream.str();
/* the FxFx merging information
* becomes part of the optionalWeights, labelled -999
* for future reference
*/
if(theIncludeFxFxTags) optionalWeights[npstrings.c_str()] = -999;
string ecomstring = "ecom";
optionalWeights[ecomstring.c_str()] = heprup.EBMUP.first+heprup.EBMUP.second;
if ( !cfile.readline() ) return false;
// The first line determines how many subsequent particle lines we
// have.
if ( !( cfile >> hepeup.NUP >> hepeup.IDPRUP >> hepeup.XWGTUP
>> hepeup.SCALUP >> hepeup.AQEDUP >> hepeup.AQCDUP ) )
return false;
hepeup.resize();
// Read all particle lines.
for ( int i = 0; i < hepeup.NUP; ++i ) {
if ( !cfile.readline() ) return false;
if ( !( cfile >> hepeup.IDUP[i] >> hepeup.ISTUP[i]
>> hepeup.MOTHUP[i].first >> hepeup.MOTHUP[i].second
>> hepeup.ICOLUP[i].first >> hepeup.ICOLUP[i].second
>> hepeup.PUP[i][0] >> hepeup.PUP[i][1] >> hepeup.PUP[i][2]
>> hepeup.PUP[i][3] >> hepeup.PUP[i][4]
>> hepeup.VTIMUP[i] >> hepeup.SPINUP[i] ) )
return false;
if(std::isnan(hepeup.PUP[i][0])||std::isnan(hepeup.PUP[i][1])||
std::isnan(hepeup.PUP[i][2])||std::isnan(hepeup.PUP[i][3])||
std::isnan(hepeup.PUP[i][4]))
throw Exception()
<< "nan's as momenta in Les Houches file "
<< Exception::eventerror;
if(hepeup.MOTHUP[i].first -1==i ||
hepeup.MOTHUP[i].second-1==i) {
throw Exception()
<< "Particle has itself as a mother in Les Houches "
<< "file, this is not allowed\n"
<< Exception::eventerror;
}
}
// Now read any additional comments and named weights.
// read until the end of rwgt is found
bool readingWeights = false, readingaMCFast = false, readingMG5ClusInfo = false;
while ( cfile.readline() && !cfile.find("</event>")) {
if(cfile.find("</applgrid")) { readingaMCFast=false; } //aMCFast weights end
if(cfile.find("</rwgt")) { readingWeights=false; } //optional weights end
if(cfile.find("</clustering")) { readingMG5ClusInfo=false; } // mg5 mclustering scale info end
/* reading of optional weights
*/
if(readingWeights) {
if(!cfile.find("<wgt")) { continue; }
istringstream iss(cfile.getline());
int wi = 0;
double weightValue(0);
string weightName = "";
// we need to put the actual weight value into a double
do {
string sub; iss >> sub;
if(wi==1) { string str_arrow = ">" ; erase_substr(sub, str_arrow); weightName = sub; }
if(wi==2) weightValue = atof(sub.c_str());
++wi;
} while (iss);
// store the optional weights found in the temporary map
+ //cout << "weightName, weightValue= " << weightName << ", " << weightValue << endl;
optionalWeightsTemp[weightName] = weightValue;
}
/* reading of aMCFast weights
*/
if(readingaMCFast) {
std::stringstream amcfstringstream;
amcfstringstream << "aMCFast " << cfile.getline();
std::string amcfstrings = amcfstringstream.str();
string str_newline = "\n";
erase_substr(amcfstrings,str_newline);
optionalWeights[amcfstrings.c_str()] = -111; //for the aMCFast we give them a weight -111 for future identification
}
/* read additional MG5 Clustering information
* used in LO merging
*/
if(readingMG5ClusInfo) {
string hs = cfile.getline();
string startDEL = "<clus scale="; //starting delimiter
string stopDEL = "</clus>"; //end delimiter
unsigned firstLim = hs.find(startDEL); //find start of delimiter
// unsigned lastLim = hs.find(stopDEL); //find end of delimitr
string mg5clusinfo = hs.substr(firstLim); //define the information for the scale
erase_substr(mg5clusinfo,stopDEL);
erase_substr(mg5clusinfo,startDEL);
string str_arrow = ">";
erase_substr(mg5clusinfo,str_arrow);
string str_quotation = "\"";
erase_substr(mg5clusinfo,str_quotation);
string str_newline= "\n";
erase_substr(mg5clusinfo,str_newline);
optionalWeights[mg5clusinfo.c_str()] = -222; //for the mg5 scale info weights we give them a weight -222 for future identification
}
//store MG5 clustering information
if(cfile.find("<scales")) {
string hs = cfile.getline();
string startDEL = "<scales"; //starting delimiter
string stopDEL = "</scales>"; //end delimiter
unsigned firstLim = hs.find(startDEL); //find start of delimiter
// unsigned lastLim = hs.find(stopDEL); //find end of delimitr
string mg5scinfo = hs.substr(firstLim); //define the information for the scale
erase_substr(mg5scinfo,stopDEL);
erase_substr(mg5scinfo,startDEL);
string str_arrow = ">";
erase_substr(mg5scinfo,str_arrow);
string str_newline= "\n";
erase_substr(mg5scinfo,str_newline);
optionalWeights[mg5scinfo.c_str()] = -333; //for the mg5 scale info weights we give them a weight -333 for future identification
}
//determine start of aMCFast weights
if(cfile.find("<applgrid")) { readingaMCFast = true;}
//determine start of optional weights
if(cfile.find("<rwgt")) { readingWeights = true; }
//determine start of MG5 clustering scale information
if(cfile.find("<clustering")) { readingMG5ClusInfo = true;}
}
// loop over the optional weights and add the extra information as found in the init
for (map<string,double>::const_iterator it=optionalWeightsTemp.begin(); it!=optionalWeightsTemp.end(); ++it){
+ string itfirst = it->first;
+ erase_substr(itfirst, "'");
+ erase_substr(itfirst, "\"");
for (map<string,string>::const_iterator it2=scalemap.begin(); it2!=scalemap.end(); ++it2){
//find the scale id in the scale information and add this information
- if(it->first==it2->first) {
+ string it2first = it2->first;
+ erase_substr(it2first, "'");
+ erase_substr(it2first, "\"");
+ //cout << "itfirst, it2first = " << itfirst << "\t" << it2first << endl;
+ if(itfirst==it2first) {
string info = it2->second;
string str_newline = "\n";
erase_substr(info, str_newline);
//set the optional weights
optionalWeights[info] = it->second;
}
}
}
/* additionally, we set the "central" scale
* this is actually the default event weight
*/
string central = "central";
if (theIncludeCentral) optionalWeights[central] = hepeup.XWGTUP;
if ( !cfile ) return false;
return true;
}
void FxFxFileReader::close() {
cfile.close();
}
void FxFxFileReader::persistentOutput(PersistentOStream & os) const {
os << neve << LHFVersion << outsideBlock << headerBlock << initComments
<< initAttributes << eventComments << eventAttributes << theFileName
<< theQNumbers << theIncludeFxFxTags << theIncludeCentral << theDecayer;
}
void FxFxFileReader::persistentInput(PersistentIStream & is, int) {
is >> neve >> LHFVersion >> outsideBlock >> headerBlock >> initComments
>> initAttributes >> eventComments >> eventAttributes >> theFileName
>> theQNumbers >> theIncludeFxFxTags >> theIncludeCentral >> theDecayer;
ieve = 0;
}
ClassDescription<FxFxFileReader>
FxFxFileReader::initFxFxFileReader;
// Definition of the static class description member.
void FxFxFileReader::Init() {
static ClassDocumentation<FxFxFileReader> documentation
("ThePEG::FxFxFileReader is an base class to be used for objects "
"which reads event files from matrix element generators. This class is "
"able to read plain event files conforming to the Les Houches Event File "
"accord.");
static Parameter<FxFxFileReader,string> interfaceFileName
("FileName",
"The name of a file containing events conforming to the Les Houches "
"protocol to be read into ThePEG. A file name ending in "
"<code>.gz</code> will be read from a pipe which uses "
"<code>zcat</code>. If a file name ends in <code>|</code> the "
"preceeding string is interpreted as a command, the output of which "
"will be read through a pipe.",
&FxFxFileReader::theFileName, "", false, false);
interfaceFileName.fileType();
interfaceFileName.rank(11);
static Switch<FxFxFileReader,bool> interfaceQNumbers
("QNumbers",
"Whether or not to read search for and read a QNUMBERS"
" block in the header of the file.",
&FxFxFileReader::theQNumbers, false, false, false);
static SwitchOption interfaceQNumbersYes
(interfaceQNumbers,
"Yes",
"Use QNUMBERS",
true);
static SwitchOption interfaceQNumbersNo
(interfaceQNumbers,
"No",
"Don't use QNUMBERS",
false);
static Switch<FxFxFileReader,bool> interfaceIncludeFxFxTags
("IncludeFxFxTags",
"Include FxFx tags",
&FxFxFileReader::theIncludeFxFxTags, true, true, false);
static SwitchOption interfaceIncludeFxFxTagsYes
(interfaceIncludeFxFxTags,
"Yes",
"Use the FxFx tags",
true);
static SwitchOption interfaceIncludeFxFxTagsNo
(interfaceIncludeFxFxTags,
"No",
"Don't use the FxFx tags",
false);
static Switch<FxFxFileReader,bool> interfaceIncludeCentral
("IncludeCentral",
"Include definition of central weight",
&FxFxFileReader::theIncludeCentral, false, true, false);
static SwitchOption interfaceIncludeCentralYes
(interfaceIncludeCentral,
"Yes",
"include definition of central weight",
true);
static SwitchOption interfaceIncludeCentralNo
(interfaceIncludeCentral,
"No",
"Don't include definition of central weight",
false);
static Reference<FxFxFileReader,Decayer> interfaceDecayer
("Decayer",
"Decayer to use for any decays read from the QNUMBERS Blocks",
&FxFxFileReader::theDecayer, false, false, true, true, false);
}
void FxFxFileReader::erase_substr(std::string& subject, const std::string& search) {
size_t pos = 0;
while((pos = subject.find(search, pos)) != std::string::npos) {
subject.erase( pos, search.length() );
}
}
diff --git a/Models/Feynrules/python/ufo2herwig b/Models/Feynrules/python/ufo2herwig
old mode 100755
new mode 100644
--- a/Models/Feynrules/python/ufo2herwig
+++ b/Models/Feynrules/python/ufo2herwig
@@ -1,474 +1,475 @@
#! /usr/bin/env python
from __future__ import division
from __future__ import print_function
import os, sys, pprint, argparse, re,copy
from string import Template
# add path to the ufo conversion modules
modulepath = os.path.join("@PKGLIBDIR@",'python')
sys.path.append(modulepath)
from ufo2peg import *
# set up the option parser for command line input
parser = argparse.ArgumentParser(
description='Create Herwig model files from Feynrules UFO input.'
)
parser.add_argument(
'ufodir',
metavar='UFO_directory',
help='the UFO model directory'
)
parser.add_argument(
'-v', '--verbose',
action="store_true",
help="print verbose output"
)
parser.add_argument(
'-n','--name',
default="FRModel",
help="set custom nametag for the model"
)
parser.add_argument(
'--ignore-skipped',
action="store_true",
help="ignore skipped vertices and produce output anyway"
)
parser.add_argument(
'--split-model',
action="store_true",
help="Split the model file into pieces to improve compilation for models with many parameters"
)
parser.add_argument(
'--no-generic-loop-vertices',
action="store_true",
help="Don't include the automatically generated generic loop vertices for h->gg and h->gamma gamma"
)
parser.add_argument(
'--include-generic',
action="store_true",
help="Include support for generic spin structures"
)
parser.add_argument(
'--use-Herwig-Higgs',
action="store_true",
help="Use the internal Herwig SM modeling and vertices for Higgs interactions, there may be sign issues but some UFO models have very minimal Higgs interactions"
)
parser.add_argument(
'--use-generic-for-tensors',
action="store_true",
help="Use the generic machinery for all tensor vertices (debugging only)"
)
parser.add_argument(
'--forbidden-particle-name',
action="append",
default=["eta","phi"],
help="Add particle names not allowed as names in UFO models to avoid conflicts with"+\
"Herwig internal particles, names will have _UFO appended"
)
parser.add_argument(
'--convert',
action="store_true",
default=False,
help="Convert the UFO model for python2 to python3 before loading it."
)
# get the arguments
args = parser.parse_args()
# convert model to python 3 if needed
if(args.convert) :
+ prepForConversion(args.ufodir)
convertToPython3(args.ufodir)
# import the model
try :
import importlib,importlib.util
try :
path,mod = os.path.split(os.path.abspath(args.ufodir))
spec = importlib.util.spec_from_file_location(mod,os.path.join(os.path.abspath(args.ufodir),"__init__.py"))
FR = spec.loader.load_module()
except :
print ("Could not load the UFO python module.\n",
"This is usually because you are using python3 and the UFO model is in python2.\n",
"The --convert option can be used to try and convert it, but there is no guarantee.\n",
"As this modifies the model you should make sure you have a backup copy.\n")
quit()
except :
print ("Newer python import did not work, reverting to python 2 imp module")
import imp
path,mod = os.path.split(os.path.abspath(args.ufodir))
FR = imp.load_module(mod,*imp.find_module(mod,[path]))
##################################################
##################################################
# get the Model name from the arguments
modelname = args.name
libname = modelname + '.so'
# define arrays and variables
#allplist = ""
parmdecls = []
parmgetters = []
parmconstr = []
doinit = []
paramstoreplace_ = []
paramstoreplace_expressions_ = []
# get external parameters for printing
parmsubs = dict( [ (p.name, p.value)
for p in FR.all_parameters
if p.nature == 'external' ] )
# evaluate python cmath
def evaluate(x):
import cmath
return eval(x,
{'cmath':cmath,
'complexconjugate':FR.function_library.complexconjugate,
'im':FR.function_library.im,
're':FR.function_library.re},
parmsubs)
## get internal params into arrays
internal = ( p for p in FR.all_parameters
if p.nature == 'internal' )
#paramstoreplaceEW_ = []
#paramstoreplaceEW_expressions_ = []
# calculate internal parameters
for p in internal:
parmsubs.update( { p.name : evaluate(p.value) } )
# if 'aS' in p.value and p.name != 'aS':
# paramstoreplace_.append(p.name)
# paramstoreplace_expressions_.append(p.value)
# if 'aEWM1' in p.value and p.name != 'aEWM1':
# paramstoreplaceEW_.append(p.name)
# paramstoreplaceEW_expressions_.append(p.value)
parmvalues=copy.copy(parmsubs)
# more arrays used for substitution in templates
paramsforstream = []
parmmodelconstr = []
# loop over parameters and fill in template stuff according to internal/external and complex/real
# WARNING: Complex external parameter input not tested!
if args.verbose:
print ('verbose mode on: printing all parameters')
print ('-'*60)
paramsstuff = ('name', 'expression', 'default value', 'nature')
pprint.pprint(paramsstuff)
interfacedecl_T = """\
static Parameter<{modelname}, {type}> interface{pname}
("{pname}",
"The interface for parameter {pname}",
&{modelname}::{pname}_, {value}, 0, 0,
false, false, Interface::nolimits);
"""
# sort out the couplings
couplingDefns = { "QED" : 99, "QCD" : 99 }
try :
for coupling in FR.all_orders:
name = coupling.name.upper()
couplingDefns[name]= coupling.expansion_order
except:
for coupling in FR.all_couplings:
for name,value in coupling.order.items():
if(name not in couplingDefns) :
couplingDefns[name]=99
# sort out the particles
massnames = {}
widthnames = {}
for particle in FR.all_particles:
# skip ghosts and goldstones
if(isGhost(particle) or isGoldstone(particle)) :
continue
if particle.mass != 'ZERO' and particle.mass.name != 'ZERO':
if(particle.mass in massnames) :
if(abs(particle.pdg_code) not in massnames[particle.mass]) :
massnames[particle.mass].append(abs(particle.pdg_code))
else :
massnames[particle.mass] = [abs(particle.pdg_code)]
if particle.width != 'ZERO' and particle.width.name != 'ZERO':
if(particle.width in widthnames) :
if(abs(particle.pdg_code) not in widthnames[particle.width]) :
widthnames[particle.width].append(abs(particle.pdg_code))
else :
widthnames[particle.width] = [abs(particle.pdg_code)]
interfaceDecls = []
modelparameters = {}
for p in FR.all_parameters:
value = parmsubs[p.name]
if p.type == 'real':
assert( value.imag < 1.0e-16 )
value = value.real
if p.nature == 'external':
if p not in massnames and p not in widthnames:
interfaceDecls.append(
interfacedecl_T.format(modelname=modelname,
pname=p.name,
value=value,
type=typemap(p.type))
)
else:
interfaceDecls.append('\n// no interface for %s. Use particle definition instead.\n' % p.name)
if hasattr(p,'lhablock'):
lhalabel = '{lhablock}_{lhacode}'.format( lhablock=p.lhablock.upper(), lhacode='_'.join(map(str,p.lhacode)) )
if p not in massnames and p not in widthnames:
parmmodelconstr.append('set %s:%s ${%s}' % (modelname, p.name, lhalabel))
else:
parmmodelconstr.append('# %s is taken from the particle setup' % p.name)
modelparameters[lhalabel] = value
parmsubs[p.name] = lhalabel
else:
if p not in massnames and p not in widthnames:
parmmodelconstr.append('set %s:%s %s' % (modelname, p.name, value))
else:
parmmodelconstr.append('# %s is taken from the particle setup' % p.name)
parmsubs[p.name] = value
if p not in massnames and p not in widthnames:
parmconstr.append('%s_(%s)' % (p.name, value))
else:
parmconstr.append('%s_()' % p.name)
else :
parmconstr.append('%s_()' % p.name)
parmsubs[p.name] = value
elif p.type == 'complex':
value = complex(value)
if p.nature == 'external':
parmconstr.append('%s_(%s,%s)' % (p.name, value.real, value.imag))
else :
parmconstr.append('%s_(%s,%s)' % (p.name, 0.,0.))
parmsubs[p.name] = value
else:
raise Exception('Unknown data type "%s".' % p.type)
parmdecls.append(' %s %s_;' % (typemap(p.type), p.name))
parmgetters.append(' %s %s() const { return %s_; }' % (typemap(p.type),p.name, p.name))
paramsforstream.append('%s_' % p.name)
expression, symbols = 'return %s_' % p.name, None
if p.nature != 'external':
expression, symbols = py2cpp(p.value)
text = add_brackets(expression, symbols)
text=text.replace('()()','()')
doinit.append(' %s_ = %s;' % (p.name, text) )
if(p.type == 'complex') :
doinit.append(' if(std::isnan(%s_.real()) || std::isnan(%s_.imag()) || std::isinf(%s_.real()) || std::isinf(%s_.imag())) {throw InitException() << "Calculated parameter %s is nan or inf in Feynrules model. Check your input parameters.";}' % (p.name,p.name,p.name,p.name,p.name) )
else :
doinit.append(' if(std::isnan(%s_) || std::isinf(%s_)) {throw InitException() << "Calculated parameter %s is nan or inf in Feynrules model. Check your input parameters.";}' % (p.name,p.name,p.name) )
if p in massnames:
for idCode in massnames[p] :
doinit.append(' resetMass(%s,%s_ * GeV);' % (idCode, p.name) )
if p in widthnames:
for idCode in widthnames[p] :
doinit.append(' getParticleData(%s)->width(%s_ * GeV);' % (idCode, p.name) )
doinit.append(' getParticleData(%s)->cTau (%s_ == 0.0 ? Length() : hbarc/(%s_*GeV));' % (idCode, p.name, p.name) )
doinit.append(' getParticleData(%s)->widthCut(10. * %s_ * GeV);' % (idCode, p.name) )
elif p.nature == 'external':
if p in massnames:
for idCode in massnames[p] :
doinit.append(' %s_ = getParticleData(%s)->mass() / GeV;' % (p.name, idCode) )
if p in widthnames:
for idCode in widthnames[p] :
doinit.append(' %s_ = getParticleData(%s)->width() / GeV;' % (p.name, idCode) )
if args.verbose:
pprint.pprint((p.name,p.value, value, p.nature))
pcwriter = ParamCardWriter(FR.all_parameters)
paramcard_output = '\n'.join(pcwriter.output)
### special treatment
# if p.name == 'aS':
# expression = '0.25 * sqr(strongCoupling(q2)) / Constants::pi'
# elif p.name == 'aEWM1':
# expression = '4.0 * Constants::pi / sqr(electroMagneticCoupling(q2))'
# elif p.name == 'Gf':
# expression = 'generator()->standardModel()->fermiConstant() * GeV2'
paramconstructor=': '
for ncount in range(0,len(parmconstr)) :
paramconstructor += parmconstr[ncount]
if(ncount != len(parmconstr) -1) :
paramconstructor += ','
if(ncount%5 == 0 ) :
paramconstructor += "\n"
paramout=""
paramin =""
for ncount in range(0,len(paramsforstream)) :
if(ncount !=0 ) :
paramout += "<< " + paramsforstream[ncount]
paramin += ">> " + paramsforstream[ncount]
else :
paramout += paramsforstream[ncount]
paramin += paramsforstream[ncount]
if(ncount%5 == 0 ) :
paramout += "\n"
paramin += "\n"
parmtextsubs = { 'parmgetters' : '\n'.join(parmgetters),
'parmdecls' : '\n'.join(parmdecls),
'parmconstr' : paramconstructor,
'getters' : '',
'decls' : '',
'addVertex' : '',
'doinit' : '\n'.join(doinit),
'ostream' : paramout,
'istream' : paramin ,
'refs' : '',
'parmextinter': ''.join(interfaceDecls),
'ModelName': modelname,
'calcfunctions': '',
'param_card_data': paramcard_output
}
##################################################
##################################################
##################################################
# set up the conversion of the vertices
vertexConverter = VertexConverter(FR,parmvalues,couplingDefns)
vertexConverter.readArgs(args)
# convert the vertices
vertexConverter.convert()
cdefs=""
couplingOrders=""
ncount=2
for name,value in couplingDefns.items() :
if(name=="QED") :
couplingOrders+=" setCouplings(\"%s\",make_pair(%s,%s));\n" %(name,1,value)
elif (name=="QCD") :
couplingOrders+=" setCouplings(\"%s\",make_pair(%s,%s));\n" %(name,2,value)
else :
ncount+=1
cdefs +=" const T %s = %s;\n" % (name,ncount)
couplingOrders+=" setCouplings(\"%s\",make_pair(%s,%s));\n" % (name,ncount,value)
# coupling definitions
couplingTemplate= """\
namespace ThePEG {{
namespace Helicity {{
namespace CouplingType {{
typedef unsigned T;
/**
* Enums for couplings
*/
{coup}
}}
}}
}}
"""
if(cdefs!="") :
cdefs = couplingTemplate.format(coup=cdefs)
parmtextsubs['couplings'] = cdefs
parmtextsubs['couplingOrders'] = couplingOrders
# particles
plist, names = thepeg_particles(FR,parmsubs,modelname,modelparameters,args.forbidden_particle_name,args.use_Herwig_Higgs)
particlelist = [
"# insert HPConstructor:Outgoing 0 /Herwig/{n}/Particles/{p}".format(n=modelname,p=p)
for p in names
]
# make the first one active to have something runnable in the example .in file
particlelist[0] = particlelist[0][2:]
particlelist = '\n'.join(particlelist)
modelfilesubs = { 'plist' : plist,
'vlist' : vertexConverter.get_vertices(libname),
'setcouplings': '\n'.join(parmmodelconstr),
'ModelName': modelname
}
# write the files from templates according to the above subs
if vertexConverter.should_print():
MODEL_HWIN = getTemplate('LHC-FR.in')
if(not args.split_model) :
MODEL_CC = [getTemplate('Model.cc')]
else :
MODEL_EXTRA_CC=getTemplate('Model6.cc')
extra_names=[]
extra_calcs=[]
parmtextsubs['doinit']=""
for i in range(0,len(doinit)) :
if( i%20 == 0 ) :
function_name = "initCalc" +str(int(i/20))
parmtextsubs['doinit'] += function_name +"();\n"
parmtextsubs['calcfunctions'] += "void " + function_name + "();\n"
extra_names.append(function_name)
extra_calcs.append("")
extra_calcs[-1] += doinit[i] + "\n"
for i in range(0,len(extra_names)) :
ccname = '%s_extra_%s.cc' % (modelname,i)
writeFile( ccname, MODEL_EXTRA_CC.substitute({'ModelName' : modelname,
'functionName' : extra_names[i],
'functionCalcs' : extra_calcs[i] }) )
MODEL_CC = [getTemplate('Model1.cc'),getTemplate('Model2.cc'),getTemplate('Model3.cc'),
getTemplate('Model4.cc'),getTemplate('Model5.cc')]
MODEL_H = getTemplate('Model.h')
print ('LENGTH',len(MODEL_CC))
MODELINFILE = getTemplate('FR.model')
writeFile( 'LHC-%s.in' % modelname,
MODEL_HWIN.substitute({ 'ModelName' : modelname,
'Particles' : particlelist })
)
modeltemplate = Template( MODELINFILE.substitute(modelfilesubs) )
writeFile( '%s.h' % modelname, MODEL_H.substitute(parmtextsubs) )
for i in range(0,len(MODEL_CC)) :
if(len(MODEL_CC)==1) :
ccname = '%s.cc' % modelname
else :
ccname = '%s.cc' % (modelname + str(i))
writeFile( ccname, MODEL_CC[i].substitute(parmtextsubs) )
writeFile( modelname +'.template', modeltemplate.template )
writeFile( modelname +'.model', modeltemplate.substitute( modelparameters ) )
# copy the Makefile-FR to current directory,
# replace with the modelname for compilation
with open(os.path.join(modulepath,'Makefile-FR'),'r') as orig:
with open('Makefile','w') as dest:
dest.write(orig.read().replace("FeynrulesModel.so", libname))
print('finished generating model:\t', modelname)
print('model directory:\t\t', args.ufodir)
print('generated:\t\t\t', len(FR.all_vertices), 'vertices')
print('='*60)
print('library:\t\t\t', libname)
print('input file:\t\t\t', 'LHC-' + modelname +'.in')
print('model file:\t\t\t', modelname +'.model')
print('='*60)
print("""\
To complete the installation, compile by typing "make".
An example input file is provided as LHC-FRModel.in,
you'll need to change the required particles in there.
""")
print('DONE!')
print('='*60)
diff --git a/Models/Feynrules/python/ufo2peg/__init__.py b/Models/Feynrules/python/ufo2peg/__init__.py
--- a/Models/Feynrules/python/ufo2peg/__init__.py
+++ b/Models/Feynrules/python/ufo2peg/__init__.py
@@ -1,9 +1,10 @@
from .particles import thepeg_particles
+from .helpers import prepForConversion
from .helpers import convertToPython3
from .helpers import CheckUnique, getTemplate, writeFile, def_from_model
from .helpers import add_brackets, typemap,isGhost,isGoldstone
from .converter import py2cpp
from .write_paramcard import ParamCardWriter
from .vertices import VertexConverter
diff --git a/Models/Feynrules/python/ufo2peg/helpers.py b/Models/Feynrules/python/ufo2peg/helpers.py
--- a/Models/Feynrules/python/ufo2peg/helpers.py
+++ b/Models/Feynrules/python/ufo2peg/helpers.py
@@ -1,312 +1,338 @@
from __future__ import print_function
from string import Template
from os import path
import sys,cmath,glob
import re
"""
Helper functions for the Herwig Feynrules converter
"""
class CheckUnique:
"""Uniqueness checker.
-
+
An object of this class remembers the value it was called with first.
Any subsequent call to it will only succeed if the same value is passed again.
For example,
>>> f = CheckUnique()
>>> f(5)
>>> f(5)
>>> f(4)
Traceback (most recent call last):
...
AssertionError
"""
def __init__(self):
self.val = None
def __call__(self,val):
"""Store value on first call, then compare."""
if self.val is None:
self.val = val
else:
assert( val == self.val )
def is_number(s):
"""Check if a value is a number."""
try:
float(s)
except ValueError:
return False
return True
def getTemplate(name):
"""Create a python string template from a file."""
templatename = '{name}.template'.format(name=name)
# assumes the template files sit next to this script
moduledir = path.dirname(path.abspath(__file__))
templatepath = path.join(moduledir,templatename)
with open(templatepath, 'r') as f:
templateText = f.read()
return Template( templateText )
def writeFile(filename, text):
"""Write text to a filename."""
with open(filename,'w') as f:
f.write(text)
def coupling_orders(vertex, coupling, defns):
# if more than one take QCD over QED and then lowest order in QED
if type(coupling) is list:
print('not sure this happens')
quit()
qed = 0
qcd = 0
for coup in coupling :
qed1 = coup.order.get('QED',0)
qcd1 = coup.order.get('QCD',0)
if qcd1 != 0:
if qcd == 0 or (qcd1 != 0 and qcd1 < qcd):
qcd=qcd1
qed=qed1
else:
if qed == 0 or (qed1 != 0 and qed1 < qed):
qed=qed1
else:
output={}
for ctype in defns :
output[ctype]=coupling.order.get(ctype,0)
return output
def def_from_model(FR,s):
"""Return a C++ line that defines parameter s as coming from the model file."""
if("hw_kine" in s) :return ""
stype = typemap(getattr(FR.parameters,s).type)
return '{t} {s} = model_->{s}();'.format(t=stype,s=s)
_typemap = {'complex':'Complex',
'real':'double'}
def typemap(s):
return _typemap[s]
def add_brackets(expr, syms):
result = expr
for s in syms:
pattern = r'({symb})(\W|$)'.format(symb=s)
result = re.sub(pattern, r'\1()\2', result)
return result
def banner():
return """\
===============================================================================================================
-______ ______ _ __ _ _ _
-| ___| | ___ \ | | / /| | | | (_) _ _
-| |_ ___ _ _ _ __ | |_/ /_ _ | | ___ ___ / / | |_| | ___ _ __ __ __ _ __ _ _| |_ _| |_
+______ ______ _ __ _ _ _
+| ___| | ___ \ | | / /| | | | (_) _ _
+| |_ ___ _ _ _ __ | |_/ /_ _ | | ___ ___ / / | |_| | ___ _ __ __ __ _ __ _ _| |_ _| |_
| _|/ _ \| | | || \_ \ | /| | | || | / _ \/ __| / / | _ | / _ \| \__|\ \ /\ / /| | / _` ||_ _||_ _|
-| | | __/| |_| || | | || |\ \| |_| || || __/\__ \ / / | | | || __/| | \ V V / | || (_| | |_| |_|
-\_| \___| \__, ||_| |_|\_| \_|\__,_||_| \___||___//_/ \_| |_/ \___||_| \_/\_/ |_| \__, |
- __/ | __/ |
- |___/ |___/
+| | | __/| |_| || | | || |\ \| |_| || || __/\__ \ / / | | | || __/| | \ V V / | || (_| | |_| |_|
+\_| \___| \__, ||_| |_|\_| \_|\__,_||_| \___||___//_/ \_| |_/ \___||_| \_/\_/ |_| \__, |
+ __/ | __/ |
+ |___/ |___/
===============================================================================================================
generating model/vertex/.model/.in files
please be patient!
===============================================================================================================
"""
#################### ??? #######################
# function that replaces alphaS (aS)-dependent variables
# with their explicit form which also contains strongCoupling
def aStoStrongCoup(stringin, paramstoreplace, paramstoreplace_expressions):
#print stringin
for xx in range(0,len(paramstoreplace)):
#print paramstoreplace[xx], paramstoreplace_expressions[xx]
stringout = stringin.replace(paramstoreplace[xx], '(' + PyMathToThePEGMath(paramstoreplace_expressions[xx],allparams) + ')')
stringout = stringout.replace('aS', '(sqr(strongCoupling(q2))/(4.0*Constants::pi))')
#print 'resulting string', stringout
return stringout
# function that replaces alphaEW (aEW)-dependent variables
# with their explicit form which also contains weakCoupling
def aEWtoWeakCoup(stringin, paramstoreplace, paramstoreplace_expressions):
#print stringin
for xx in range(0,len(paramstoreplace)):
#print paramstoreplace[xx], paramstoreplace_expressions[xx]
stringout = stringin.replace(paramstoreplace[xx], '(' + PyMathToThePEGMath(paramstoreplace_expressions[xx],allparams) + ')')
stringout = stringout.replace('aEWM1', '(1/(sqr(electroMagneticCoupling(q2))/(4.0*Constants::pi)))')
#print 'resulting string', stringout
return stringout
if __name__ == "__main__":
import doctest
doctest.testmod()
if False:
-
+
# Check if the Vertex is self-conjugate or not
pdgcode = [0,0,0,0]
notsmvertex = False
vhasw = 0
vhasz = 0
vhasf = 0
vhasg = 0
vhash = 0
vhasp = 0
# print 'printing particles in vertex'
for i in range(len(v.particles)):
# print v.particles[i].pdg_code
pdgcode[i] = v.particles[i].pdg_code
if pdgcode[i] == 23:
vhasz += 1
if pdgcode[i] == 22:
vhasp += 1
if pdgcode[i] == 25:
vhash += 1
if pdgcode[i] == 21:
vhasg += 1
if pdgcode[i] == 24:
vhasw += 1
if abs(pdgcode[i]) < 7 or (abs(pdgcode[i]) > 10 and abs(pdgcode[i]) < 17):
vhasf += 1
if pdgcode[i] not in SMPARTICLES:
notsmvertex = True
-
-# treat replacement of SM vertices with BSM vertices?
+
+# treat replacement of SM vertices with BSM vertices?
if notsmvertex == False:
if( (vhasf == 2 and vhasz == 1) or (vhasf == 2 and vhasw == 1) or (vhasf == 2 and vhash == 1) or (vhasf == 2 and vhasg == 1) or (vhasf == 2 and vhasp == 0) or (vhasg == 3) or (vhasg == 4) or (vhasw == 2 and vhash == 1) or (vhasw == 3) or (vhasw == 4) or (vhash == 1 and vhasg == 2) or (vhash == 1 and vhasp == 2)):
#print 'VERTEX INCLUDED IN STANDARD MODEL!'
v.include = 0
notincluded += 1
#continue
-
-
+
+
selfconjugate = 0
for j in range(len(pdgcode)):
for k in range(len(pdgcode)):
if j != k and j != 0 and abs(pdgcode[j]) == abs(pdgcode[k]):
selfconjugate = 1
#print 'self-conjugate vertex'
# print pdgcode[j]
# if the Vertex is not self-conjugate, then add the conjugate vertex
# automatically
scfac = [1,1,1,1]
if selfconjugate == 0:
#first find the self-conjugate particles
for u in range(len(v.particles)):
if v.particles[u].selfconjugate == 0:
scfac[u] = -1
# print 'particle ', v.particles[u].pdg_code, ' found not to be self-conjugate'
-
+
if selfconjugate == 0:
plistarray[1] += str(scfac[1] * v.particles[1].pdg_code) + ',' + str(scfac[0] * v.particles[0].pdg_code) + ',' + str(scfac[2] * v.particles[2].pdg_code)
- if len(v.particles) is 4:
+ if len(v.particles) == 4:
plistarray[1] += ',' + str(scfac[3] * v.particles[3].pdg_code)
#print 'Conjugate vertex:', plistarray[1]
class SkipThisVertex(Exception):
pass
def extractAntiSymmetricIndices(instring,funct) :
terms = instring.strip(funct).strip(")").split(",")
sign=1.
for iy in range(0,len(terms)) :
for ix in range(-1,-len(terms)+iy,-1) :
swap = False
if(len(terms[ix])==1 and len(terms[ix-1])==1) :
swap = int(terms[ix])<int(terms[ix-1])
elif(len(terms[ix])==2 and len(terms[ix-1])==2) :
swap = int(terms[ix][1])<int(terms[ix-1][1])
elif(len(terms[ix])==1 and len(terms[ix-1])==2) :
swap = True
if(swap) :
sign *=-1.
terms[ix],terms[ix-1] = terms[ix-1],terms[ix]
return (terms,sign)
def isGoldstone(p) :
"""check if particle is a Goldstone"""
def gstest(name):
try:
return getattr(p,name)
except AttributeError:
return False
# names of goldstone bosons
gsnames = ['goldstone','goldstoneboson','GoldstoneBoson']
if any(map(gstest, gsnames)):
return True
return False
def isGhost(p) :
"""Check if particle is a ghost"""
try:
getattr(p,'GhostNumber')
except AttributeError:
return False
return p.GhostNumber != 0
-
+
def convertToPython3(ufodir) :
# find all the python files
fNames=glob.glob(path.abspath(ufodir)+"/*.py")
mNames=[]
for i in range(0,len(fNames)) :
mNames.append(path.split(fNames[i])[-1].replace(".py",""))
# convert them
for fName in fNames :
convertFileToPython3(fName,mNames)
+def copy(path1, path2):
+ path1 = format_path(path1)
+ path2 = format_path(path2)
+ shutil.copy(path1, path2)
+
+def prepForConversion(ufodir) :
+ import os
+ path=os.path.abspath(ufodir)
+ if not os.path.isdir(path):
+ raise Exception( 'path to the UFO directory seems to be wrong!')
+ model_dir = path
+ text = open(os.path.join(model_dir, 'object_library.py')).read()
+ text = text.replace('.iteritems()', '.items()')
+ text = re.sub('raise (\w+)\s*,\s*["\']([^"]+)["\']','raise \g<1>("\g<2>")', text)
+ text = open(os.path.join(model_dir, 'object_library.py'),'w').write(text)
+ text = open(os.path.join(model_dir, '__init__.py')).read()
+ mod = False
+ to_check = ['object_library', 'function_library']
+ for lib in to_check:
+ if 'import %s' % lib in text:
+ continue
+ mod = True
+ text = "import %s \n" % lib + text
+ if mod:
+ open(os.path.join(model_dir, '__init__.py'),'w').write(text)
+
def convertFileToPython3(fName,names) :
output=""
inFile=open(fName)
line=inFile.readline()
isInit = "__init__.py" in fName
tNames=[]
for val in names : tNames.append(val)
while line :
# iteritems -> items
line=line.replace("iteritems","items")
- # fix imports
+ # fix imports
if("import" in line) :
for val in names :
if("import %s" %val in line) :
line=line.replace("import %s" %val,
"from . import %s" %val)
if(val in tNames) : tNames.remove(val)
if("from %s" %val in line) :
line=line.replace("from %s" %val,
"from .%s" %val)
# add brackets to print statements
if("print" in line) :
if line.strip()[0:5] == "print" :
line=line.strip("\n").replace("print","print(")+")\n"
output += line
line=inFile.readline()
inFile.close()
if(isInit) :
if "__init__" in tNames : tNames.remove("__init__")
temp=""
for val in tNames :
temp+= "from . import %s\n" % val
output = temp+output
with open(fName,'w') as dest:
dest.write(output)
diff --git a/Shower/Dipole/Merging/MergingFactory.cc b/Shower/Dipole/Merging/MergingFactory.cc
--- a/Shower/Dipole/Merging/MergingFactory.cc
+++ b/Shower/Dipole/Merging/MergingFactory.cc
@@ -1,680 +1,679 @@
// -*- C++ -*-
//
// MergeboxFactory.cc is a part of Herwig - A multi-purpose Monte Carlo event generator
// Copyright (C) 2002-2019 The Herwig Collaboration
//
// Herwig is licenced under version 3 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
//
// This is the implementation of the non-inlined, non-templated member
// functions of the MergeboxFactory class.
//
#include "MergingFactory.h"
#include "Node.h"
#include "ThePEG/Repository/Repository.h"
#include "ThePEG/Utilities/ColourOutput.h"
using namespace Herwig;
using std::ostream_iterator;
IBPtr MergingFactory::clone() const {
return new_ptr(*this);
}
IBPtr MergingFactory::fullclone() const {
return new_ptr(*this);
}
void MergingFactory::doinit(){
MatchboxFactory::doinit();
if (subProcessGroups()) {
throw InitException() << "There are no subprocess groups in merging!";
}
}
void MergingFactory::productionMode() {
if(M()<0)
for ( vector<Ptr<MatchboxAmplitude>::ptr>::iterator amp
= amplitudes().begin(); amp != amplitudes().end(); ++amp ) {
Repository::clog() << "One-loop contributions from '"
<< (**amp).name()
<< "' are not required and will be disabled.\n"
<< flush;
(**amp).disableOneLoop();
}
MatchboxFactory::productionMode();
}
void MergingFactory::fillMEsMap() {
olpProcesses().clear();
assert( getProcesses().size() == 1 );
processMap[0] = getProcesses()[0];
if ( MH()->M() >= 0 )
setHighestVirt(processMap[0].size()+MH()->M());
MH()->N0(processMap[0].size());
for ( int i = 1 ; i <= MH()->N() ; ++i ) {
processMap[i] = processMap[i - 1];
processMap[i].push_back("j");
}
for ( int i = 0 ; i <= MH()->N() ; ++i ) {
const bool below_maxNLO = i < MH()->M() + 1;
vector<MatchboxMEBasePtr> ames
= makeMEs(processMap[i], orderInAlphaS() + i, below_maxNLO );
copy(ames.begin(), ames.end(), back_inserter(pureMEsMap()[i]));
}
}
#include "Herwig/MatrixElement/Matchbox/Base/DipoleRepository.h"
void MergingFactory::prepare_BV(int i) {
// check if we have virtual contributions
bool haveVirtuals = true;
for ( auto born : pureMEsMap()[i]) {
prepareME(born);
if ( born->isOLPTree() ) {
int id = orderOLPProcess(born->subProcess(),
born->matchboxAmplitude(),
ProcessType::treeME2);
born->olpProcess(ProcessType::treeME2,id);
id = orderOLPProcess(born->subProcess(),
born->matchboxAmplitude(),
ProcessType::colourCorrelatedME2);
born->olpProcess(ProcessType::colourCorrelatedME2,id);
bool haveGluon = false;
for ( const auto & p : born->subProcess().legs )
if ( p->id() == 21 ) {
haveGluon = true;
break;
}
if ( haveGluon ) {
id = orderOLPProcess(born->subProcess(),
born->matchboxAmplitude(),
ProcessType::spinColourCorrelatedME2);
born->olpProcess(ProcessType::spinColourCorrelatedME2,id);
}
}
if ( born->isOLPLoop() && i <= MH()->M() ) {
int id = orderOLPProcess(born->subProcess(),
born->matchboxAmplitude(),
ProcessType::oneLoopInterference);
born->olpProcess(ProcessType::oneLoopInterference,id);
if ( !born->onlyOneLoop() && born->needsOLPCorrelators() ) {
id = orderOLPProcess(born->subProcess(),
born->matchboxAmplitude(),
ProcessType::colourCorrelatedME2);
born->olpProcess(ProcessType::colourCorrelatedME2,id);
}
}
haveVirtuals &= born->haveOneLoop();
}
// check for consistent conventions on virtuals, if we are to include MH()->M()
if (!(i > MH()->M()||haveVirtuals))
throw InitException()
<< MH()->M()
<< " NLO corrections requested,\n"
<< "but no virtual contributions are found.";
}
void MergingFactory::prepare_R(int i) {
for ( auto real : pureMEsMap()[i])
prepareME(real);
}
#include "Herwig/MatrixElement/Matchbox/Base/DipoleRepository.h"
void MergingFactory::getVirtuals(MatchboxMEBasePtr nlo, bool clone){
const auto & partons = nlo->diagrams().front()->partons();
for ( auto I : DipoleRepository::insertionIOperators(dipoleSet()) )
if ( I->apply(partons) ){
auto myI = I;
if ( clone ) myI = I->cloneMe();
nlo->virtuals().push_back(myI);
}
for ( auto PK : DipoleRepository::insertionPKOperators(dipoleSet()) )
if ( PK->apply(partons) ){
auto myPK = PK;
if ( clone ) myPK = PK->cloneMe();
nlo->virtuals().push_back(myPK);
}
}
void MergingFactory::pushB(MatchboxMEBasePtr born, int i) {
MatchboxMEBasePtr bornme = born->cloneMe();
bornme->maxMultCKKW(1);
bornme->minMultCKKW(0);
string pname = fullName() + "/" + bornme->name() + ".Born";
if ( !(generator()->preinitRegister(bornme, pname)) )
throw InitException()
<< "Born ME "<< pname << " already existing.";
NodePtr clusternode = new_ptr(Node(bornme, 0, MH()));
clusternode->deepHead(clusternode);
MH()->firstNodeMap(bornme,clusternode);
bornme->merger(MH());
vector<NodePtr> current = {{clusternode}};
vector<NodePtr> children;
unsigned int k = 1;
while ( ! thePureMEsMap[i - k].empty() ) {
for ( auto tmp : current ){//j
tmp->birth(thePureMEsMap[i - k]);
for ( auto tmpchild : tmp->children() ) {//m
children.push_back(tmpchild);
}
}
current = children;
children.clear();
++k;
}
if ( MH()->N() > i )
bornme->needsCorrelations();
else
bornme->needsNoCorrelations();
bornme->cloneDependencies();
MEs().push_back(bornme);
}
void MergingFactory::pushV(MatchboxMEBasePtr born, int i) {
MatchboxMEBasePtr nlo = born->cloneMe();
string pname = fullName() + "/" + nlo->name() + ".Virtual";
if ( !(generator()->preinitRegister(nlo, pname)) )
throw InitException()
<< "Virtual ME "<< pname << " already existing.";
////////////////////////////////////NLO///////////////////////////
nlo->virtuals().clear();
getVirtuals(nlo , false);
if ( nlo->virtuals().empty() )
throw InitException()
<< "No insertion operators have been found for "
<< born->name() << ".\n";
nlo->doOneLoopNoBorn();
////////////////////////////////////NLO///////////////////////////
NodePtr clusternode = new_ptr(Node(nlo, 0,MH()));
clusternode->deepHead(clusternode);
clusternode->virtualContribution(true);
MH()->firstNodeMap(nlo,clusternode);
nlo->merger(MH());
vector<NodePtr> current = {{clusternode}};
vector<NodePtr> children;
unsigned int k = 1;
while ( ! thePureMEsMap[i - k].empty() ) {
for ( auto tmp : current ){
tmp->birth(thePureMEsMap[i - k]);
for ( auto tmpchild : tmp->children())
children.push_back(tmpchild);
}
current = children;
children.clear();
++k;
}
if ( nlo->isOLPLoop() ) {
int id = orderOLPProcess(nlo->subProcess(),
born->matchboxAmplitude(),
ProcessType::oneLoopInterference);
nlo->olpProcess(ProcessType::oneLoopInterference,id);
if ( !nlo->onlyOneLoop() && nlo->needsOLPCorrelators() ) {
id = orderOLPProcess(nlo->subProcess(),
born->matchboxAmplitude(),
ProcessType::colourCorrelatedME2);
nlo->olpProcess(ProcessType::colourCorrelatedME2,id);
}
}
nlo->needsCorrelations();
nlo->cloneDependencies();
MEs().push_back(nlo);
}
void MergingFactory::pushR(MatchboxMEBasePtr born, int i) {
MatchboxMEBasePtr bornme = born->cloneMe();
string pname = fullName() + "/" + bornme->name() + ".Real";
if ( !(generator()->preinitRegister(bornme, pname)) )
throw InitException()
<< "Subtracted ME " << pname << " already existing.";
NodePtr clusternode = new_ptr(Node(bornme, 1, MH()));
clusternode->deepHead(clusternode);
clusternode->subtractedReal(true);
MH()->firstNodeMap(bornme,clusternode);
bornme->merger(MH());
vector<NodePtr> current = {{clusternode}};
vector<NodePtr> children;
unsigned int k = 1;
while ( ! thePureMEsMap[i - k].empty() ) {
for ( auto tmp : current ){
tmp->birth(thePureMEsMap[i - k]);
for ( auto tmpchild : tmp->children())
children.push_back(tmpchild);
}
current = children;
children.clear();
++k;
}
if(clusternode->children().empty()){
// This is a finite real contribution.
// This process is included in the LO merging.
return;
}
if ( MH()->N() > i ) bornme->needsCorrelations();
else bornme->needsNoCorrelations();
bornme->cloneDependencies(pname);
MEs().push_back(bornme);
}
// MergingFactory should never order OLPs here,
// they're done elsewhere.
void MergingFactory::orderOLPs() {}
#include "ThePEG/Utilities/StringUtils.h"
vector<string> MergingFactory::parseProcess(string in) {
vector<string> process = StringUtils::split(in);
if ( process.size() < 3 )
throw Exception()
<< "MatchboxFactory: Invalid process."<< Exception::runerror;
for ( string & p : process) {
p = StringUtils::stripws(p);
}
theN = 0;
bool prodprocess = true;
vector<string> result;
for ( const string & p : process ) {
if ( p == "->" )
continue;
if (p=="[") {
prodprocess = false;
} else if (p=="]") {
prodprocess = false;
// TODO what if there's stuff after the bracket?
assert( p == process.back() );
break;
} else if (p=="[j") {
prodprocess = false;
++theN;
} else if (p=="j" && !prodprocess) {
++theN;
prodprocess = false;
} else if (p=="j]") {
++theN;
prodprocess = false;
// TODO what if there's stuff after the bracket?
assert( p == process.back() );
break;
} else if ( prodprocess ) {
result.push_back(p);
} else {
throw InitException()
<< "Unknown particle class \"" << p << '"'
<< " in the process definition merging bracket.\n"
<< "Only jets (\"j\") are supported at the moment.";
}
}
return result;
}
#include "Herwig/Utilities/Progress.h"
void MergingFactory::setup() {
useMe();
DipoleShowerHandlerPtr dsh=dynamic_ptr_cast<DipoleShowerHandlerPtr>(this->CKKWHandler());
if(! dsh )throw InitException() << "The showerhandler for the MergingFactory must be the DipoleShower. ";
dsh->setMerger(MH());
MH()->setFactory(this);
MH()->setDipoleShower(dsh);
if(!ransetup){
generator()->log() <<"\nStarting merging setup.\n\n";
olpProcesses().clear();
externalAmplitudes().clear();
// We set the couplings in the ME to be fixed
// and reweight in the history weight for this.
setFixedCouplings(true);
setFixedQEDCouplings(true);
// rebind the particle data objects, can't use rebind() function
for ( auto & g : particleGroups()) {
for ( auto & p : g.second) {
p = getParticleData(p->id());
}
}
const PDVector& partons = particleGroups()["j"];
unsigned int nl = 0;
for ( const auto p : partons ) {
const Energy mass = p->hardProcessMass();
const long pid = p->id();
if ( abs(pid) < 7 && mass == ZERO )
++nl;
if ( pid > 0 && pid < 7 && mass == ZERO )
nLightJetVec( pid );
if ( pid > 0 && pid < 7 && mass != ZERO )
nHeavyJetVec( pid );
}
nLight(nl/2);
const PDVector& partonsInP = particleGroups()["p"];
for ( const auto pip : partonsInP )
if ( pip->id() > 0 && pip->id() < 7 && pip->hardProcessMass() == ZERO )
nLightProtonVec( pip->id() );
// fill the amplitudes
if ( !amplitudes().empty() ) fillMEsMap();
// Use the colour basis of the first element of amplitudes
// to set the large N colour basis for the MergingHelper
assert(!amplitudes().empty() );
- if ( !amplitudes()[0]->colourBasis() )
- throw Exception() << "MergingFactory::setup(): Expecting a colour basis object."
- << Exception::runerror;
- auto largeNBasis =
- amplitudes()[0]->colourBasis()->cloneMe();
- largeNBasis->clear();
- largeNBasis->doLargeN();
- MH()->largeNBasis(largeNBasis);
+ if ( amplitudes()[0]->colourBasis() ) {
+ auto largeNBasis =
+ amplitudes()[0]->colourBasis()->cloneMe();
+ largeNBasis->clear();
+ largeNBasis->doLargeN();
+ MH()->largeNBasis(largeNBasis);
+ }
// prepare the Born and virtual matrix elements
for ( int i = 0 ; i <= max(0, MH()->N()) ; ++i ) prepare_BV(i);
// prepare the real emission matrix elements
for ( int i = 0 ; i <= MH()->N() ; ++i ) prepare_R(i);
if (MH()->N()<=MH()->M()) {
throw InitException() << "Merging: The number of NLOs need to be"
<< "\nsmaller than the number of LO processes.\n";
}
// Order the external Amplitudes.
orderOLPs();
// start creating matrix elements
MEs().clear();
// count the subprocesses
size_t numb = 0;
size_t numv = 0;
size_t numr = 0;
for (int i = 0; i <= max(0, MH()->N()) ; ++i ) {
for ( auto born : thePureMEsMap[i] ) {
if (bornContributions()
) {
numb++;
}
}
}
for (int i = 0 ; i <=max(0, MH()->N()); ++i )
for ( auto virt : thePureMEsMap[i] )
if ( virtualContributions() && i <= MH()->M()) {
numv++;
}
for (int i = 1; i <= max(0, MH()->N()) ; ++i )
for ( auto real : thePureMEsMap[i] )
if (realContributions() && i <= MH()->M() + 1 ){
numr++;
}
if(int(numb+numv+numr) < theChunk){
throw InitException() << "You try to chunk (Chunk="<<theChunk<<") the number of "<<
"subprocesses ("<<int(numb+numv+numr)<<") into more parts than there are subprocesses.";
}
if(theChunk<theChunkPart)
throw InitException() <<" The ChunkPart is larger than the Chunk.";
if(theChunk > 0 && theChunkPart == 0 )
throw InitException() <<" Set the ChunkPart ( = "<<theChunkPart<<" ) to i in [1,..,N] with N=Chunk.";
if ( theChunkPart != 0 )
generator()->log() << ANSI::yellow
<< "\n\nWarning: \nYou split up the runs into theChunks. This is no standard feature."
<< "\nYou are now responsible to make sure to run all theChunk parts."
<< "\nThis setup run is for: " << theChunkPart << "/" << theChunk<<"\n\n ";
generator()->log() << ANSI::red << "Preparing Merging: ";
generator()->log() << ANSI::green << numb << " x Born " << ANSI::red;
if (MH()->M()>-1) {
generator()->log() << ANSI::yellow << numv << " x Virtual ";
generator()->log() << ANSI::blue << numr << " x Real " << ANSI::red << flush;
}
int countchunk=0;
progress_display progressBar{ numb+numv+numr, generator()->log() };
// insert the born contributions to ME vector
for (int i = 0; i <= max(0, MH()->N()) ; ++i )
for ( auto born : thePureMEsMap[i])
if (bornContributions() ){
countchunk++; // theChunkPart is in [1,...,theChunk]
if ( theChunk == 0 || theChunkPart == countchunk ) pushB( born , i );
if ( countchunk == theChunk ) countchunk=0;
generator()->log() << ANSI::green;
++progressBar;
generator()->log() << ANSI::reset;
}
// insert the virtual contributions to ME vector
for (int i = 0 ; i <=max(0, MH()->N()); ++i )
for ( auto virt : thePureMEsMap[i])
if ( virtualContributions() && i <= MH()->M()){
countchunk++;// theChunkPart is in [1,...,theChunk]
if ( theChunk == 0 || theChunkPart == countchunk ) pushV(virt, i);
if ( countchunk == theChunk ) countchunk=0;
generator()->log() << ANSI::yellow;
++progressBar;
}
// insert the real contributions to ME vector
for (int i = 1; i <= max(0, MH()->N()) ; ++i )
for ( auto real : thePureMEsMap[i] )
if (realContributions()&& i <= MH()->M() + 1 ){
countchunk++;// theChunkPart is in [1,...,theChunk]
if ( theChunk == 0 || theChunkPart == countchunk ) pushR(real, i);
if ( countchunk == theChunk ) countchunk=0;
generator()->log() << ANSI::blue;
++progressBar;
}
generator()->log() << ANSI::reset;
if ( !externalAmplitudes().empty() ) {
generator()->log() << "Initializing external amplitudes." << endl;
progress_display progressBar{ externalAmplitudes().size(), generator()->log() };
for ( const auto ext : externalAmplitudes() ) {
if ( ! ext->initializeExternal() ) {
throw InitException()
<< "error: failed to initialize amplitude '" << ext->name() << "'\n";
}
++progressBar;
}
generator()->log()
<< "---------------------------------------------------" << endl;
}
if ( !olpProcesses().empty() ) {
generator()->log() << "Initializing one-loop provider(s)." << endl;
map<Ptr<MatchboxAmplitude>::tptr, map<pair<Process, int>, int> > olps;
for (const auto oit : olpProcesses()) {
olps[oit.first] = oit.second;
}
progress_display progressBar{ olps.size(), generator()->log() };
for ( const auto olpit : olps ) {
if ( !olpit.first->startOLP(olpit.second) ) {
throw InitException() << "error: failed to start OLP for amplitude '" << olpit.first->name() << "'\n";
}
++progressBar;
}
generator()->log()
<< "---------------------------------------------------\n" << flush;
}
generator()->log() <<"\nGenerated "<<MEs().size()<<" Subprocesses.\n"<<flush;
generator()->log()
<< "---------------------------------------------------\n" << flush;
generator()->log() <<"\n\n" << ANSI::red
<<"Note: Due to the unitarization of the higher "
<<"\nmultiplicities, the individual cross sections "
<<"\ngiven in the integration and run step are not"
<<"\nmeaningful without merging." << ANSI::reset << endl;
ransetup=true;
}
}
#include "ThePEG/Persistency/PersistentOStream.h"
#include "ThePEG/Persistency/PersistentIStream.h"
void MergingFactory::persistentOutput(PersistentOStream & os) const {
os
<< theonlymulti
<< ransetup
<< processMap << theMergingHelper <<theM<<theN<<theNonQCDCuts<<theChunk<<theChunkPart;
}
void MergingFactory::persistentInput(PersistentIStream & is, int) {
is
>> theonlymulti
>> ransetup
>> processMap >> theMergingHelper >>theM>>theN>>theNonQCDCuts>>theChunk>>theChunkPart;
}
#include "ThePEG/Interface/ClassDocumentation.h"
#include "ThePEG/Utilities/DescribeClass.h"
#include "ThePEG/Interface/Reference.h"
#include "ThePEG/Interface/RefVector.h"
#include "ThePEG/Interface/Switch.h"
#include "ThePEG/Interface/Parameter.h"
#include "ThePEG/Interface/Command.h"
void MergingFactory::Init() {
static Parameter<MergingFactory, int> interfaceonlymulti("onlymulti",
"Calculate only the ME with k additional partons.",
&MergingFactory::theonlymulti, -1, -1, 0,
false, false, Interface::lowerlim);
static Switch<MergingFactory, bool> interface_Unitarized("Unitarized",
"Unitarize the cross section (default is unitarised. NLO merging must be unitarised).",
&MergingFactory::unitarized, true, false, false);
static SwitchOption interface_UnitarizedYes(interface_Unitarized, "Yes",
"Switch on the unitarized cross section.", true);
static SwitchOption interface_UnitarizedNo(interface_Unitarized, "No",
"Switch off the unitarized cross section.", false);
static Reference<MergingFactory,Merger> interfaceMergingHelper("MergingHelper",
"Pointer to the Merging Helper.",
&MergingFactory::theMergingHelper, false, false, true, true, false);
static Parameter<MergingFactory, int> interfaceaddNLOLegs("NLOProcesses",
"Set the number of virtual corrections to consider. 0 is default for no virtual correction.",
&MergingFactory::theM, 0, 0, 0, false, false, Interface::lowerlim);
static Reference<MergingFactory, Cuts > interfaceNonQcdCuts("NonQCDCuts",
"Cut on non-QCD modified observables. Be carefull!",
&MergingFactory::theNonQCDCuts, false, false, true, true, false);
static Parameter<MergingFactory, int> interfacetheChunk("Chunk",
"Cut the number of subprocesses into n theChunks.",
&MergingFactory::theChunk, -1, -1, 0,
false, false, Interface::lowerlim);
static Parameter<MergingFactory, int> interfacetheChunkPart("ChunkPart",
"If theChunk is larger then 0, set this parameter to the n'th part. Make sure to add the ChunksParts afterwards.",
&MergingFactory::theChunkPart, -1, -1, 0,
false, false, Interface::lowerlim);
}
// *** Attention *** The following static variable is needed for the type
// description system in ThePEG. Please check that the template arguments
// are correct (the class and its base class), and that the constructor
// arguments are correct (the class name and the name of the dynamically
// loadable library where the class implementation can be found).
DescribeClass<MergingFactory, Herwig::MatchboxFactory>
describeHerwigMergingFactory("Herwig::MergingFactory", "HwDipoleShower.so");
diff --git a/Shower/Dipole/Merging/Node.cc b/Shower/Dipole/Merging/Node.cc
--- a/Shower/Dipole/Merging/Node.cc
+++ b/Shower/Dipole/Merging/Node.cc
@@ -1,457 +1,458 @@
// -*- C++ -*-
//
// This is the implementation of the non-inlined, non-templated member
// functions of the Node class.
//
#include "Node.h"
#include "MergingFactory.h"
#include "Merger.h"
using namespace Herwig;
Node::Node(MatchboxMEBasePtr nodeME, int cutstage, MergerPtr mh)
:Interfaced(),
thenodeMEPtr(nodeME),
thedipol(),
theparent(),
theCutStage(cutstage),
theSubtractedReal(false),
theVirtualContribution(false),
theMergingHelper(mh)
{
nodeME->maxMultCKKW(1);
nodeME->minMultCKKW(0);
}
Node::Node(NodePtr deephead,
NodePtr head,
SubtractionDipolePtr dipol,
MatchboxMEBasePtr nodeME,
int cutstage)
:Interfaced(), thenodeMEPtr(nodeME),
thedipol(dipol),
theparent(head),
theDeepHead(deephead),
theCutStage(cutstage),
theSubtractedReal(false),
theVirtualContribution(false),
theMergingHelper() //The subnodes have no merging helper
{
}
Node::~Node() { }
SubtractionDipolePtr Node::dipole() const {
return thedipol;
}
/** returns the matrix element pointer */
const MatchboxMEBasePtr Node::nodeME() const {
return thenodeMEPtr;
}
/** access the matrix element pointer */
MatchboxMEBasePtr Node::nodeME() {
return thenodeMEPtr;
}
pair<PVector , PVector> Node::getInOut( ){
PVector in;
const auto me= nodeME();
const auto pd=me->mePartonData();
for( auto i : {0 , 1} )
in.push_back(pd[i]->produceParticle( me->lastMEMomenta()[i] ) );
PVector out;
for ( size_t i = 2;i< pd.size();i++ ){
PPtr p = pd[i]->produceParticle( me->lastMEMomenta()[i] );
out.push_back( p );
}
return { in , out };
}
int Node::legsize() const {return nodeME()->legsize();}
NodePtr Node::randomChild() {
return thechildren[UseRandom::irnd(thechildren.size())];
}
bool Node::allAbove(Energy pt) {
for (NodePtr child : thechildren)
if ( child->pT() < pt )
return false;
return true;
}
Energy Node::maxChildPt(){
Energy maxi=-1*GeV;
for (NodePtr child : thechildren)maxi=max(child->pT(),maxi);
return maxi;
}
bool Node::isInHistoryOf(NodePtr other) {
while (other->parent()) {
if (other == this)
return true;
other = other->parent();
}
return false;
}
void Node::flushCaches() {
if (didflush) return;
didflush=true;
for ( auto const & ch: thechildren) {
ch->xcomb()->clean();
ch->nodeME()->flushCaches();
ch->flushCaches();
}
}
void Node::setKinematics() {
for (auto const & ch: thechildren) {
ch->dipole()->setXComb(ch->xcomb());
ch->dipole()->setKinematics();
ch->nodeME()->setKinematics();
ch->setKinematics();
}
}
void Node::clearKinematics() {
for (auto const & ch: thechildren) {
ch->dipole()->setXComb(ch->xcomb());
ch->nodeME()->clearKinematics();
ch->dipole()->clearKinematics();
ch->clearKinematics();
}
}
bool Node::generateKinematics(const double *r, bool directCut) {
didflush=false;
// If there are no children to the child process we are done.
if(children().empty()) return true;
assert(parent());
if ( ! directCut && pT() < deepHead()->MH()->mergePt()) {
// Real emission:
// If there are children to the child process,
// we now require that all subsequent children
// with pt < merging scale are in their ME region.
// Since the possible children of the real emission
// contribution are now in their ME region,
// it is clear that a second clustering is possible
// -- modulo phase space restrictions.
// Therefore the real emission contribution
// are unitarised and the cross section is
// hardly modified.
auto inOutPair = getInOut();
NodePtr rc = randomChild();
rc->dipole()->setXComb(rc->xcomb());
if(!rc->dipole()->generateKinematics(r))assert(false);
// If not in ME -> return false
if(!deepHead()->MH()->matrixElementRegion( inOutPair.first ,
inOutPair.second ,
rc->pT() ,
deepHead()->MH()->mergePt() ) )return false;
}
for (auto & ch : children() ) {
ch->dipole()->setXComb(ch->xcomb());
if ( !ch->dipole()->generateKinematics(r) ) { assert(false); }
ch->generateKinematics( r, true);
}
return true;
}
bool Node::firstgenerateKinematics(const double *r, bool directCut) {
didflush=false;
// This is called form the merging helper for the first node. So:
assert(!parent());
assert(xcomb());
if(MH()->treefactory()->nonQCDCuts()){
tcPDVector outdata(xcomb()->mePartonData().begin()+2,
xcomb()->mePartonData().end());
vector<LorentzMomentum> outmomenta(xcomb()->meMomenta().begin()+2,
xcomb()->meMomenta().end());
if ( !MH()->treefactory()->nonQCDCuts()->passCuts(outdata,outmomenta,
xcomb()->mePartonData()[0],
xcomb()->mePartonData()[1]) )
return false;
}
///// This should not be needed!!!
///// ( Warning inMerger::matrixElementRegion gets triggered.)
flushCaches();
//Set here the new merge Pt for the next phase space point.( Smearing!!!)
MH()->smearMergePt();
// If there are no children to this node, we are done here:
if (children().empty())
return true;
// directCut is for born and for virtual contributions.
// if directCut is true, then cut on the first ME region.
// call recursiv generate kinematics for subsequent nodes.
if ( directCut ){
auto inOutPair = getInOut();
NodePtr rc = randomChild();
rc->dipole()->setXComb(rc->xcomb());
if ( !rc->dipole()->generateKinematics(r) ) { return false; }
rc->nodeME()->setXComb(rc->xcomb());
if(!MH()->matrixElementRegion( inOutPair.first ,
inOutPair.second ,
rc->pT() ,
MH()->mergePt() ) ){
return false;
}
}
for (auto const & ch: thechildren) {
ch->dipole()->setXComb(ch->xcomb());
if ( !ch->dipole()->generateKinematics(r) ) { cout<<"\nCould not generate dipole kinematics";;return false; }
if( ! ch->generateKinematics(r,directCut) )return false;
}
return true;
}
StdXCombPtr Node::xcomb() const {
assert(thexcomb);
return thexcomb;
}
StdXCombPtr Node::xcomb(){
if(thexcomb)return thexcomb;
assert(parent());
thexcomb=dipole()->makeBornXComb(parent()->xcomb());
xcomb()->head(parent()->xcomb());
dipole()->setXComb(thexcomb);
return thexcomb;
}
void Node::setXComb(tStdXCombPtr xc) {
assert ( !parent() );
thexcomb=xc;
assert(thexcomb->lastParticles().first);
}
#include "Herwig/MatrixElement/Matchbox/Base/DipoleRepository.h"
void Node::birth(const vector<MatchboxMEBasePtr> & vec) {
// produce the children
vector<SubtractionDipolePtr> dipoles =
nodeME()->getDipoles(DipoleRepository::dipoles(
nodeME()->factory()->dipoleSet()), vec, true);
for ( auto const & dip : dipoles ) {
dip->doSubtraction();
NodePtr node = new_ptr(Node(theDeepHead,
this,
dip,
dip->underlyingBornME(),
theDeepHead->cutStage()));
thechildren.push_back(node);
}
}
vector<NodePtr> Node::getNextOrderedNodes(bool normal, double hardScaleFactor) const {
vector<NodePtr> temp = children();
vector<NodePtr> res;
for (NodePtr const & child : children()) {
if(deepHead()->MH()->mergePt()>child->pT()) {
res.clear();
return res;
}
}
for (NodePtr const & child: children()) {
if (parent()&& normal) {
if ( child->pT() < pT() ) {
continue;
}
}
if ( child->children().size() != 0 ) {
for (NodePtr itChild: child->children()) {
if( itChild->pT() > child->pT()&&child->inShowerPS(itChild->pT()) ) {
res.push_back(child);
break;
}
}
}
else {
const auto sc=child->nodeME()->factory()->scaleChoice();
sc->setXComb(child->xcomb());
if ( sqr(hardScaleFactor)*
sc->renormalizationScale() >= sqr(child->pT()) &&
child->inShowerPS(hardScaleFactor*sqrt(sc->renormalizationScale()))) {
res.push_back(child);
}
}
}
return res;
}
bool Node::inShowerPS(Energy hardpT)const {
// Here we decide if the current phase space
// point can be reached from the underlying Node.
// Full phase space available -> Tilde Kinematic is always fine.
if(deepHead()->MH()->openZBoundaries()==1)
return true;
double z_ = dipole()->lastZ();
// restrict according to hard scale
if(deepHead()->MH()->openZBoundaries()==0){
pair<double, double> zbounds =
dipole()->tildeKinematics()->zBounds(pT(), hardpT);
return (zbounds.first<z_&&z_<zbounds.second);
}
assert(false);
return false;
}
NodePtr Node::getHistory(bool normal, double hardScaleFactor) {
NodePtr res = this;
vector<NodePtr> temp = getNextOrderedNodes(normal, hardScaleFactor);
Energy minpt = Constants::MaxEnergy;
Selector<NodePtr> subprosel;
while (temp.size() != 0) {
minpt = Constants::MaxEnergy;
subprosel.clear();
for (NodePtr const & child : temp) {
- assert(deepHead()->MH()->largeNBasis());
+ // colour basis is not strictly needed for evaluating the colour correlator
+ //assert(deepHead()->MH()->largeNBasis());
if( child->dipole()->underlyingBornME()->largeNColourCorrelatedME2(
{child->dipole()->bornEmitter(),
child->dipole()->bornSpectator()},
deepHead()->MH()->largeNBasis()) != 0.
) {
double weight = 1.;
if ( deepHead()->MH()->chooseHistory() == 0 )
weight = abs(child->dipole()->dSigHatDR()/nanobarn);
else if ( deepHead()->MH()->chooseHistory() == 1 )
weight = abs(child->dipole()->dSigHatDR()/child->nodeME()->dSigHatDRB());
else if ( deepHead()->MH()->chooseHistory() == 2 )
weight = 1.;
else if ( deepHead()->MH()->chooseHistory() == 3 )
weight = 1_GeV/child->pT();
else
assert(false);
if(weight != 0.) {
subprosel.insert(weight , child);
minpt = min(minpt, child->pT());
}
}
}
if (subprosel.empty())
return res;
res = subprosel.select(UseRandom::rnd());
temp = res->getNextOrderedNodes(true, hardScaleFactor);
}
return res;
}
pair<CrossSection, CrossSection> Node::calcDipandPS(Energy scale)const {
return dipole()->dipandPs(sqr(scale), deepHead()->MH()->largeNBasis());
}
CrossSection Node::calcPs(Energy scale)const {
return dipole()->ps(sqr(scale), deepHead()->MH()->largeNBasis());
}
CrossSection Node::calcDip(Energy scale)const {
return dipole()->dip(sqr(scale));
}
IBPtr Node::clone() const {
return new_ptr(*this);
}
IBPtr Node::fullclone() const {
return new_ptr(*this);
}
#include "ThePEG/Persistency/PersistentOStream.h"
void Node::persistentOutput(PersistentOStream & os) const {
os <<
thexcomb<<
thenodeMEPtr<<
thedipol<<
thechildren<<
theparent<<
theProjector<<
theDeepHead<<
theCutStage<<
ounit(theRunningPt, GeV)<<
theSubtractedReal<<
theVirtualContribution<<
theMergingHelper;
}
#include "ThePEG/Persistency/PersistentIStream.h"
void Node::persistentInput(PersistentIStream & is, int) {
is >>
thexcomb>>
thenodeMEPtr>>
thedipol>>
thechildren>>
theparent>>
theProjector>>
theDeepHead>>
theCutStage>>
iunit(theRunningPt, GeV)>>
theSubtractedReal>>
theVirtualContribution>>
theMergingHelper;
}
// *** Attention *** The following static variable is needed for the type
// description system in ThePEG. Please check that the template arguments
// are correct (the class and its base class), and that the constructor
// arguments are correct (the class name and the name of the dynamically
// loadable library where the class implementation can be found).
#include "ThePEG/Utilities/DescribeClass.h"
DescribeClass<Node, Interfaced>
describeHerwigNode("Herwig::Node", "HwDipoleShower.so");
void Node::Init() {
static ClassDocumentation<Node>
documentation("There is no documentation for the Node class");
}
diff --git a/Tests/Rivet/LHC/LHC-13-Top-L.in b/Tests/Rivet/LHC/LHC-13-Top-L.in
--- a/Tests/Rivet/LHC/LHC-13-Top-L.in
+++ b/Tests/Rivet/LHC/LHC-13-Top-L.in
@@ -1,8 +1,9 @@
# -*- ThePEG-repository -*-
##################################################
# select the analyses
##################################################
# ATLAS top
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2016_I1468168
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2017_I1495243
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2018_I1705857
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2019_I1759875
\ No newline at end of file
diff --git a/Tests/Rivet/LHC/LHC-13-Top-SL.in b/Tests/Rivet/LHC/LHC-13-Top-SL.in
--- a/Tests/Rivet/LHC/LHC-13-Top-SL.in
+++ b/Tests/Rivet/LHC/LHC-13-Top-SL.in
@@ -1,13 +1,14 @@
# -*- ThePEG-repository -*-
##################################################
# select the analyses
##################################################
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2016_I1491950
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2017_I1614149
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2018_I1662081
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2018_I1663958
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2018_I1656578
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2018_I1690148
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2018_I1705857
insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2019_I1724098
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2019_I1764472
\ No newline at end of file
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 CMS_2019_I1764472
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2019_I1750330
diff --git a/Tests/Rivet/LHC/LHC-13-VBF-ZZ.in b/Tests/Rivet/LHC/LHC-13-VBF-ZZ.in
--- a/Tests/Rivet/LHC/LHC-13-VBF-ZZ.in
+++ b/Tests/Rivet/LHC/LHC-13-VBF-ZZ.in
@@ -1,8 +1,8 @@
# -*- ThePEG-repository -*-
##################################################
# select the analyses
##################################################
# ATLAS gg -> H -> ZZ
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1310835
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2020_I1790439
do /Herwig/Particles/h0:SelectDecayModes h0->Z0,Z0;
diff --git a/Tests/Rivet/LHC/LHC-8-WH-ZZ.in b/Tests/Rivet/LHC/LHC-13-WH-ZZ.in
copy from Tests/Rivet/LHC/LHC-8-WH-ZZ.in
copy to Tests/Rivet/LHC/LHC-13-WH-ZZ.in
--- a/Tests/Rivet/LHC/LHC-8-WH-ZZ.in
+++ b/Tests/Rivet/LHC/LHC-13-WH-ZZ.in
@@ -1,8 +1,8 @@
# -*- ThePEG-repository -*-
##################################################
# select the analyses
##################################################
# ATLAS gg -> H -> ZZ
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1310835
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2020_I1790439
do /Herwig/Particles/h0:SelectDecayModes h0->Z0,Z0;
diff --git a/Tests/Rivet/LHC/LHC-13-ZH-ZZ.in b/Tests/Rivet/LHC/LHC-13-ZH-ZZ.in
--- a/Tests/Rivet/LHC/LHC-13-ZH-ZZ.in
+++ b/Tests/Rivet/LHC/LHC-13-ZH-ZZ.in
@@ -1,8 +1,8 @@
# -*- ThePEG-repository -*-
##################################################
# select the analyses
##################################################
# ATLAS gg -> H -> ZZ
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1310835
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2020_I1790439
do /Herwig/Particles/h0:SelectDecayModes h0->Z0,Z0;
diff --git a/Tests/Rivet/LHC/LHC-8-ggH-ZZ.in b/Tests/Rivet/LHC/LHC-13-ggH-ZZ.in
copy from Tests/Rivet/LHC/LHC-8-ggH-ZZ.in
copy to Tests/Rivet/LHC/LHC-13-ggH-ZZ.in
--- a/Tests/Rivet/LHC/LHC-8-ggH-ZZ.in
+++ b/Tests/Rivet/LHC/LHC-13-ggH-ZZ.in
@@ -1,8 +1,8 @@
# -*- ThePEG-repository -*-
##################################################
# select the analyses
##################################################
# ATLAS gg -> H -> ZZ
-insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2014_I1310835
+insert /Herwig/Analysis/RivetAnalysis:Analyses 0 ATLAS_2020_I1790439
-do /Herwig/Particles/h0:SelectDecayModes h0->Z0,Z0;
+#do /Herwig/Particles/h0:SelectDecayModes h0->Z0,Z0;
diff --git a/Tests/python/merge-LHC-Jets b/Tests/python/merge-LHC-Jets
--- a/Tests/python/merge-LHC-Jets
+++ b/Tests/python/merge-LHC-Jets
@@ -1,1706 +1,1711 @@
#! /usr/bin/env python
from __future__ import print_function
import logging, sys, math
if sys.version_info[:3] < (2,4,0):
print ("rivet scripts require Python version >= 2.4.0... exiting")
sys.exit(1)
import os, yoda
# #############################################
def rescale(path,scale) :
if(path not in outhistos) : return
outhistos[path].scaleW(scale)
def fillAbove(scale,desthisto, sourcehistosbyptmin) :
pthigh= 1e100
ptlow =-1e100
for pt, h in sorted(sourcehistosbyptmin.items(),reverse=True):
ptlow=pt
if(type(desthisto)==yoda.core.Scatter2D) :
for i in range(0,h.numPoints()) :
xMin = h.points()[i].x()-h.points()[i].xErrs().minus
if( xMin*scale >= ptlow and
xMin*scale < pthigh ) :
desthisto.addPoint(h.points()[i])
elif(type(desthisto)==yoda.core.Profile1D) :
for i in range(0,h.numBins()) :
if(h.bins()[i].xMin()*scale >= ptlow and
h.bins()[i].xMin()*scale < pthigh ) :
desthisto.bins()[i] += h.bins()[i]
elif(type(desthisto)==yoda.core.Histo1D) :
for i in range(0,h.numBins()) :
if(h.bins()[i].xMin()*scale >= ptlow and
h.bins()[i].xMin()*scale < pthigh ) :
desthisto.bins()[i] += h.bins()[i]
elif(type(desthisto)==yoda.core.Counter) :
desthisto += h
else :
logging.error("Can't merge %s, unknown type" % desthisto.path())
sys.exit(1)
pthigh=pt
def mergeByPt(hpath, sqrts, scale=1.) :
global inhistos_pt
global outhistos
try:
fillAbove(scale,outhistos[hpath], inhistos_pt[hpath][float(sqrts)])
except:
pass
def mergeByMass(hpath, sqrts, scale=1.):
global inhistos_mass
global outhistos
try:
fillAbove(scale,outhistos[hpath], inhistos_mass[hpath][float(sqrts)])
except:
pass
def useOnePt(hpath, sqrts, ptmin):
global inhistos_pt
global outhistos
try:
## Find best pT_min match
ptmins = inhistos_pt[hpath][float(sqrts)].keys()
closest_ptmin = None
for ptm in ptmins:
if closest_ptmin is None or \
abs(ptm-float(ptmin)) < abs(closest_ptmin-float(ptmin)):
closest_ptmin = ptm
if closest_ptmin != float(ptmin):
logging.warning("Inexact match for requested pTmin=%s: " % ptmin + \
"using pTmin=%e instead" % closest_ptmin)
outhistos[hpath] = inhistos_pt[hpath][float(sqrts)][closest_ptmin]
except:
pass
def useOneMass(hpath, sqrts, ptmin):
global inhistos_pt
global outhistos
try:
## Find best pT_min match
ptmins = inhistos_mass[hpath][float(sqrts)].keys()
closest_ptmin = None
for ptm in ptmins:
if closest_ptmin is None or \
abs(ptm-float(ptmin)) < abs(closest_ptmin-float(ptmin)):
closest_ptmin = ptm
if closest_ptmin != float(ptmin):
logging.warning("Inexact match for requested mass=%s: " % ptmin + \
"using mass=%e instead" % closest_ptmin)
outhistos[hpath] = inhistos_mass[hpath][float(sqrts)][closest_ptmin]
except:
pass
# #######################################
if __name__ == "__main__":
import logging
from optparse import OptionParser, OptionGroup
parser = OptionParser(usage="%prog name")
verbgroup = OptionGroup(parser, "Verbosity control")
parser.add_option("--with-ue",
action='store_true' ,
dest="ue",
default=True,
help="Include UE analyses")
parser.add_option("--without-ue",
action='store_false',
dest="ue",
default=True,
help="Don\'t include UE analyses")
verbgroup.add_option("-v", "--verbose", action="store_const", const=logging.DEBUG, dest="LOGLEVEL",
default=logging.INFO, help="print debug (very verbose) messages")
verbgroup.add_option("-q", "--quiet", action="store_const", const=logging.WARNING, dest="LOGLEVEL",
default=logging.INFO, help="be very quiet")
parser.add_option_group(verbgroup)
(opts, args) = parser.parse_args()
logging.basicConfig(level=opts.LOGLEVEL, format="%(message)s")
(opts, args) = parser.parse_args()
## Check args
if len(args) < 1:
logging.error("Must specify at least the name of the files")
sys.exit(1)
yodafiles=["-7-Bottom-0.yoda","-7-Bottom-1.yoda","-7-Bottom-2.yoda",
"-7-Bottom-3.yoda","-7-Bottom-4.yoda","-7-Bottom-5.yoda","-7-Bottom-6.yoda",
"-7-Charm-1.yoda","-7-Charm-2.yoda",
"-7-Charm-3.yoda","-7-Charm-4.yoda","-7-Charm-5.yoda",
"-7-Top-SL.yoda","-7-Top-L.yoda",
"-8-Top-SL.yoda","-8-Top-L.yoda","-8-Top-All.yoda",
"-13-Top-L.yoda","-13-Top-SL.yoda","-13-Top-All.yoda"]
for i in range(1,11) :
for j in [7,8,13] :
yodafiles.append("-%1.1i-Jets-%1.1i.yoda" % (j,i))
for i in range(1,4) :
yodafiles.append("-2760-Jets-%1.1i.yoda" % i)
if(opts.ue) :
yodafiles += ["-7-Jets-0.yoda" ,"-8-Jets-0.yoda" ,
"-900-UE.yoda" ,"-2360-UE.yoda" ,
"-2760-UE.yoda" ,"-7-UE.yoda" ,
"-900-UE-Long.yoda" ,"-8-UE.yoda" ,
"-7-UE-Long.yoda","-13-UE.yoda","-13-UE-Long.yoda",
"-7-UE-Cent.yoda","-13-UE-Cent.yoda"]
## Get histos
inhistos_pt = {}
inhistos_mass = {}
outhistos={}
weights = {}
for f in yodafiles:
file='Rivet-'+args[0]+f
ptmin=0.
sqrts=7000
# CMS energy
if(file.find("-900-")>0) :
sqrts=900
elif(file.find("-2360-")>0) :
sqrts=2360
elif(file.find("-2760-")>0) :
sqrts=2760
elif(file.find("-7-")>=0) :
sqrts=7000
elif(file.find("-8-")>=0) :
sqrts=8000
elif(file.find("-13-")>0) :
sqrts=13000
# pT min
if(file.find("UE")>0) :
ptmin=0.
elif(file.find("Jets-0")>0) :
ptmin=4.
elif(file.find("Jets-10")>0) :
ptmin=1900.
elif(file.find("Jets-1")>0) :
if( not opts.ue) :
ptmin = 10.
else :
ptmin = 20.
elif(file.find("Jets-2")>0) :
ptmin=40.
elif(file.find("Jets-3")>0) :
ptmin=80.
elif(file.find("Jets-4")>0) :
ptmin=110.
elif(file.find("Jets-5")>0) :
ptmin=210.
elif(file.find("Jets-6")>0) :
ptmin=260.
elif(file.find("Jets-7")>0) :
ptmin=400.
elif(file.find("Jets-8")>0) :
ptmin=600.
elif(file.find("Jets-9")>0) :
ptmin=900.
elif(file.find("Bottom-0")>0) :
ptmin=0.
elif(file.find("Bottom-1")>0 or file.find("Charm-1")>0) :
ptmin=10.
elif(file.find("Bottom-2")>0 or file.find("Charm-2")>0) :
ptmin=20.
elif(file.find("Bottom-3")>0 or file.find("Charm-3")>0) :
ptmin=30.
elif(file.find("Bottom-4")>0 or file.find("Charm-4")>0) :
ptmin=70.
elif(file.find("Bottom-5")>0 or file.find("Charm-5")>0) :
ptmin=100.
elif(file.find("Bottom-6")>0 or file.find("Charm-6")>0) :
ptmin=130.
elif(file.find("Top-SL.yoda")>0 or file.find("Top-L.yoda")>0 or \
file.find("Top-All.yoda")>0):
ptmin=0.
if not os.access(file, os.R_OK):
logging.error("%s can not be read" % file)
continue
try:
aos = yoda.read(file)
except:
logging.error("%s can not be parsed as YODA" % file)
continue
## Get histos from this YODA file
for aopath, ao in aos.items() :
if("RAW" in aopath) :continue
if(aopath.find("S8924791")>0 or aopath.find("S8971293")>0 or
aopath.find("S8817804")>0 or aopath.find("I1082936")>0 or
aopath.find("S8994773")>0 or aopath.find("S8918562")>0 or
aopath.find("S8624100")>0 or aopath.find("S8625980")>0 or
aopath.find("S8894728")>0 or aopath.find("S8957746")>0 or
aopath.find("S9126244")>0 or aopath.find("S9120041")>0 or
aopath.find("S8950903")>0 or aopath.find("S9086218")>0 or
aopath.find("S9088458")>0 or aopath.find("I919017" )>0 or
aopath.find("I926145" )>0 or aopath.find("S8941262")>0 or
aopath.find("S8973270")>0 or aopath.find("I1118269")>0 or
aopath.find("I1188891")>0 or aopath.find("I1082009")>0 or
aopath.find("I1087342")>0 or aopath.find("S9035664")>0 or
aopath.find("I1125575")>0 or aopath.find("I1094564")>0 or
aopath.find("I930220" )>0 or aopath.find("I1224539")>0 or
aopath.find("I1273574")>0 or aopath.find("I1261026")>0 or
aopath.find("I1307243")>0 or aopath.find("I1325553")>0 or
aopath.find("I1298810")>0 or aopath.find("I1298811")>0 or
aopath.find("I1208923")>0 or aopath.find("I1305624")>0 or
aopath.find("I1419070")>0 or aopath.find("I1394679")>0 or
aopath.find("I929691" )>0 or aopath.find("I1393758")>0 or
aopath.find("I1459051")>0 or aopath.find("I1487277")>0 or
aopath.find("I1421646")>0 or aopath.find("I1111014")>0 or
aopath.find("I1605749")>0 or aopath.find("I1682495")>0 or
aopath.find("I1609253")>0 or aopath.find("1385107" )>0 or
aopath.find("I1486238")>0 or aopath.find("1634970" )>0 or
aopath.find("I1604271")>0 or aopath.find("I1598460")>0 or
aopath.find("I1643640" )>0 or
aopath.find("1724098" )>0 or aopath.find("I1719955")>0 or
aopath.find("ATLAS_2016_CONF_2016_092")>0 or
aopath.find("CMS_2012_PAS_QCD_11_010")>0) :
if("1419070" in aopath and ("forward" in aopath or "central" in aopath )) :
continue
if aopath not in inhistos_pt:
inhistos_pt[aopath] = {}
tmpE = inhistos_pt[aopath]
if sqrts not in tmpE:
tmpE[sqrts] = {}
if ptmin not in tmpE[sqrts]:
tmpE[sqrts][ptmin] = ao
else:
tmpE[sqrts][ptmin] += ao
#raise Exception("A set with ptmin = %s already exists" % ( ptmin))
else :
if("1509919" in aopath and "Ctr_cut" in aopath) :
continue
elif "I1393758" in aopath and ("d02" in aopath or "d04" in aopath or
"d06" in aopath or "d08" in aopath or
"d10" in aopath or "d12" in aopath) :
continue
elif "1387176" in aopath and "y02" in aopath:
continue
elif "1454211" in aopath and "cutflow" in aopath :
continue
elif("ATLAS_2016_I1468168" in aopath) :
newPath=aopath.replace("Passed_events","d02-x01-y01")
outhistos[newPath] = ao
ao.setPath(newPath)
elif(aopath.find("I1243871")>0) :
if(aopath.find("x01")>0 and file.find("-7-Top-L.yoda")>0 ) :
outhistos[aopath] = ao
elif(aopath.find("x02")>0 and file.find("-7-Top-SL.yoda")>0 ) :
outhistos[aopath] = ao
elif(aopath.find("1467230")>0 or aopath.find("1419652")>0) :
if(aopath.find("y01")>0 and file.find("Long")>0 ) :
outhistos[aopath] = ao
elif(aopath.find("y02")>0 and file.find("Long")<0 ) :
outhistos[aopath] = ao
elif("CMS_2017_I1471287" in aopath) :
if("CMS_2017_I1471287/d" in aopath) :
outhistos[aopath] = ao
elif("ATLAS_2018_I1705857" in aopath ) :
ihist = int(aopath.split("/d")[1].split("-")[0])
if "-SL" in file :
if ihist in [9,10,11,12,19,20,21,22,23,24,25,26,33,34,35,36,37,38,45,46,47,48,49,50] :
outhistos[aopath] = ao
elif "-L" in file :
if ihist in [3,4,5,6,7,8,13,14,15,16,17,18,27,28,29,30,31,32,39,40,41,42,43,44] :
outhistos[aopath] = ao
if ihist in [1,2] :
if aopath not in outhistos :
outhistos[aopath] = ao
else :
title=""
path=""
if hasattr(ao, 'title'):
title=ao.title()
if hasattr(ao, 'path'):
path=ao.path()
temp = yoda.core.Histo1D(path,title)
for i in range(0,ao.numBins()) :
temp.addBin(ao.bins()[i].xMin(),ao.bins()[i].xMax())
if("-SL" in file) :
temp.bins()[0] += outhistos[aopath].bins()[0]
temp.bins()[1] += outhistos[aopath].bins()[1]
temp.bins()[2] += ao.bins()[2]
temp.bins()[3] += ao.bins()[3]
temp.bins()[2] += ao.bins()[2]
temp.bins()[3] += ao.bins()[3]
else :
temp.bins()[0] += ao.bins()[0]
temp.bins()[1] += ao.bins()[1]
temp.bins()[2] += outhistos[aopath].bins()[2]
temp.bins()[3] += outhistos[aopath].bins()[3]
temp.bins()[2] += outhistos[aopath].bins()[2]
temp.bins()[3] += outhistos[aopath].bins()[3]
outhistos[aopath] = temp
else :
outhistos[aopath] = ao
yodafiles=["-7-Bottom-7.yoda","-7-Bottom-8.yoda","-7-Bottom-9.yoda"]
for i in range(1,8) :
yodafiles.append("-7-DiJets-%1.1i-A.yoda" % i)
yodafiles.append("-7-DiJets-%1.1i-B.yoda" % i)
yodafiles.append("-7-DiJets-%1.1i-C.yoda" % i)
for i in range(1,12) :
yodafiles.append("-13-DiJets-%1.1i-A.yoda" % i)
# for i in range(6,12) :
# yodafiles.append("-13-DiJets-%1.1i-B.yoda" % i)
for f in yodafiles:
file='Rivet-'+args[0]+f
if "-7-Jets" in file or "-7-DiJets" in file or "-7-Bottom" in file :
sqrts = 7000
elif "-13-Jets" in file or "-13-DiJets" in file :
sqrts = 13000
if(file.find("-DiJets-2")>0) :
mass=250
elif(file.find("-DiJets-3")>0) :
mass=500
elif(file.find("-DiJets-4")>0) :
mass=800
elif(file.find("-DiJets-5")>0) :
mass=1000
elif(file.find("-DiJets-6")>0) :
mass=1600
elif(file.find("-DiJets-7")>0) :
mass=2200
elif(file.find("-DiJets-8")>0) :
mass=2800
elif(file.find("-DiJets-9")>0) :
mass=3900
elif(file.find("-DiJets-10")>0) :
mass=4900
elif(file.find("-DiJets-11")>0) :
mass=5900
elif(file.find("-DiJets-1")>0) :
mass=100
elif(file.find("-Bottom-7")>0) :
mass=110
elif(file.find("-Bottom-8")>0) :
mass=370
elif(file.find("-Bottom-9")>0) :
mass=550
elif(file.find("-Jets-1")>0) :
mass=0
if not os.access(file, os.R_OK):
logging.error("%s can not be read" % file)
continue
try:
aos = yoda.read(file)
except:
logging.error("%s can not be parsed as YODA" % file)
continue
## Get histos from this YODA file
for aopath, ao in aos.items() :
if("RAW" in aopath) :continue
if(aopath.find("8817804")>0 or aopath.find("8968497")>0 or
aopath.find("1082936")>0 or aopath.find("I930220")>0 or
aopath.find("1261026")>0 or aopath.find("1090423")>0 or
aopath.find("1268975")>0 or aopath.find("1519995") >0 or
aopath.find("1663452") >0 or
aopath.find("1634970" )>0 or
aopath.find("CMS_2013_I1208923")>0) :
if aopath not in inhistos_mass:
inhistos_mass[aopath] = {}
tmpE = inhistos_mass[aopath]
if sqrts not in tmpE:
tmpE[sqrts] = {}
tmpP = tmpE[sqrts]
if mass not in tmpP:
tmpP[mass] = ao
else:
print (aopath)
print (sqrts,mass,file)
raise Exception("A set with mass = %s already exists" % ( mass))
## Make empty output histos if needed
for hpath,hsets in inhistos_pt.items():
if( hpath.find("8924791")>0 or
hpath.find("8971293")>0 or
hpath.find("8817804")>0 or
hpath.find("8968497")>0 or
(hpath.find("9120041")>0 and (hpath.find("d01")>0 or hpath.find("d02")>0)) or
hpath.find("9126244")>0 or
hpath.find("926145") >0 or
hpath.find("9086218")>0 or
hpath.find("1082936")>0 or
hpath.find("8941262")>0 or
hpath.find("1118269")>0 or
hpath.find("1087342")>0 or
hpath.find("1188891")>0 or
hpath.find("919017")>0 or
hpath.find("9035664")>0 or
hpath.find("1125575")>0 or
hpath.find("1094564")>0 or
hpath.find("I930220")>0 or
hpath.find("S9088458")>0 or
hpath.find("I1273574")>0 or
hpath.find("I1261026")>0 or
hpath.find("I1090423")>0 or
hpath.find("QCD_11_010")>0 or
hpath.find("1298811" )>0 or
hpath.find("I1325553" )>0 or
hpath.find("I1298810" )>0 or
hpath.find("1307243" )>0 or
hpath.find("I1419070")>0 or
hpath.find("I1394679")>0 or
hpath.find("I1487277")>0 or
hpath.find("I1604271")>0 or
hpath.find("I1598460")>0 or
hpath.find("CMS_2013_I1208923")>0 or
hpath.find("1393758")>0 or
hpath.find("ATLAS_2016_CONF_2016_092")>0 or
hpath.find("1111014")>0 or hpath.find("1385107")>0 or hpath.find("I1486238") or
hpath.find("1459051")>0 or hpath.find("1634970")>0) :
title=""
path=""
histo = list(list(hsets.values())[0].values())[0]
if hasattr(histo, 'title'):
title=histo.title()
if hasattr(histo, 'path'):
path=histo.path()
if(type(histo)==yoda.core.Counter) :
outhistos[hpath] = yoda.core.Counter(path,title)
elif(type(histo)==yoda.core.Scatter2D) :
outhistos[hpath] = yoda.core.Scatter2D(path,title)
elif(type(histo)==yoda.core.Profile1D) :
outhistos[hpath] = yoda.core.Profile1D(path,title)
for i in range(0,histo.numBins()) :
outhistos[hpath].addBin(histo.bins()[i].xMin(),
histo.bins()[i].xMax())
elif(type(histo)==yoda.core.Histo1D) :
outhistos[hpath] = yoda.core.Histo1D(path,title)
for i in range(0,histo.numBins()) :
outhistos[hpath].addBin(histo.bins()[i].xMin(),
histo.bins()[i].xMax())
else :
logging.error("Histogram %s is of unknown type" % hpath)
sys.exit(1)
## Make empty output histos if needed
for hpath,hsets in inhistos_mass.items():
if(hpath.find("1268975")>0 or
hpath.find("1634970")>0) :
title=""
path=""
histo = list(list(hsets.values())[0].values())[0]
if hasattr(histo, 'title'):
title=histo.title()
if hasattr(histo, 'path'):
path=histo.path()
if(type(histo)==yoda.core.Counter) :
outhistos[hpath] = yoda.core.Counter(path,title)
elif(type(histo)==yoda.core.Scatter2D) :
outhistos[hpath] = yoda.core.Scatter2D(path,title)
elif(type(histo)==yoda.core.Profile1D) :
outhistos[hpath] = yoda.core.Profile1D(path,title)
for i in range(0,histo.numBins()) :
outhistos[hpath].addBin(histo.bins()[i].xMin(),
histo.bins()[i].xMax())
elif(type(histo)==yoda.core.Histo1D) :
outhistos[hpath] = yoda.core.Histo1D(path,title)
for i in range(0,histo.numBins()) :
outhistos[hpath].addBin(histo.bins()[i].xMin(),
histo.bins()[i].xMax())
else :
logging.error("Histogram %s is of unknown type" % hpath)
sys.exit(1)
logging.info("Processing CMS_2011_S8957746")
useOnePt("/CMS_2011_S8957746/d01-x01-y01", "7000", "80" )
useOnePt("/CMS_2011_S8957746/d02-x01-y01", "7000", "80" )
useOnePt("/CMS_2011_S8957746/d03-x01-y01", "7000", "110" )
useOnePt("/CMS_2011_S8957746/d04-x01-y01", "7000", "110" )
useOnePt("/CMS_2011_S8957746/d05-x01-y01", "7000", "210" )
useOnePt("/CMS_2011_S8957746/d06-x01-y01", "7000", "210" )
logging.info("Processing ATLAS_2010_S8894728")
useOnePt("/ATLAS_2010_S8894728/d01-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d01-x01-y02", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d01-x01-y03", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d02-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d02-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d02-x01-y03", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d03-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d03-x01-y02", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d03-x01-y03", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d04-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d04-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d04-x01-y03", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d05-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d06-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d07-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d08-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d09-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d09-x01-y02", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d09-x01-y03", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d10-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d10-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d10-x01-y03", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d11-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d11-x01-y02", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d11-x01-y03", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d12-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d12-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d12-x01-y03", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d13-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d13-x01-y02", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d13-x01-y03", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d13-x01-y04", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d14-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d14-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d14-x01-y03", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d14-x01-y04", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d15-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d15-x01-y02", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d15-x01-y03", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d15-x01-y04", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d16-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d16-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d16-x01-y03", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d16-x01-y04", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d17-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d17-x01-y02", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d17-x01-y03", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d18-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d18-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d18-x01-y03", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d19-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d19-x01-y02", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d19-x01-y03", "900", "0" )
useOnePt("/ATLAS_2010_S8894728/d20-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d20-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d20-x01-y03", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d21-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8894728/d22-x01-y01", "7000", "0" )
logging.info("Processing ATLAS_2011_S8994773")
useOnePt("/ATLAS_2011_S8994773/d01-x01-y01", "900", "0" )
useOnePt("/ATLAS_2011_S8994773/d02-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2011_S8994773/d03-x01-y01", "900", "0" )
useOnePt("/ATLAS_2011_S8994773/d04-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2011_S8994773/d13-x01-y01", "900", "0" )
useOnePt("/ATLAS_2011_S8994773/d13-x01-y02", "900", "0" )
useOnePt("/ATLAS_2011_S8994773/d13-x01-y03", "900", "0" )
useOnePt("/ATLAS_2011_S8994773/d14-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2011_S8994773/d14-x01-y02", "7000", "0" )
useOnePt("/ATLAS_2011_S8994773/d14-x01-y03", "7000", "0" )
logging.info("Processing ALICE_2010_S8624100")
useOnePt("/ALICE_2010_S8624100/d11-x01-y01", "900", "0" )
useOnePt("/ALICE_2010_S8624100/d12-x01-y01", "900", "0" )
useOnePt("/ALICE_2010_S8624100/d13-x01-y01", "900", "0" )
useOnePt("/ALICE_2010_S8624100/d17-x01-y01","2360", "0" )
useOnePt("/ALICE_2010_S8624100/d18-x01-y01","2360", "0" )
useOnePt("/ALICE_2010_S8624100/d19-x01-y01","2360", "0" )
logging.info("Processing ALICE_2010_S8625980")
useOnePt("/ALICE_2010_S8625980/d03-x01-y01", "7000", "0" )
useOnePt("/ALICE_2010_S8625980/d04-x01-y01", "900", "0" )
useOnePt("/ALICE_2010_S8625980/d05-x01-y01", "2360", "0" )
useOnePt("/ALICE_2010_S8625980/d06-x01-y01", "7000", "0" )
logging.info("Processing ATLAS_2010_S8918562")
useOnePt("/ATLAS_2010_S8918562/d01-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d02-x01-y01", "2360", "0" )
useOnePt("/ATLAS_2010_S8918562/d03-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d04-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d05-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d06-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d07-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d08-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d09-x01-y01", "2360", "0" )
useOnePt("/ATLAS_2010_S8918562/d10-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d11-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d12-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d13-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d14-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d15-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d16-x01-y01", "2360", "0" )
useOnePt("/ATLAS_2010_S8918562/d17-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d18-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d19-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d20-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d21-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d22-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d23-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d24-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d25-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d26-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d27-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d28-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d29-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d30-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d31-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d32-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d33-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d34-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d35-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d36-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d37-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2010_S8918562/d38-x01-y01", "900", "0" )
useOnePt("/ATLAS_2010_S8918562/d39-x01-y01", "7000", "0" )
logging.info("Processing ATLAS_2011_S8971293")
useOnePt("/ATLAS_2011_S8971293/d01-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8971293/d01-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8971293/d01-x01-y03", "7000", "210" )
useOnePt("/ATLAS_2011_S8971293/d01-x01-y04", "7000", "260" )
useOnePt("/ATLAS_2011_S8971293/d01-x01-y05", "7000", "260" )
useOnePt("/ATLAS_2011_S8971293/d01-x01-y06", "7000", "400" )
useOnePt("/ATLAS_2011_S8971293/d01-x01-y07", "7000", "400" )
useOnePt("/ATLAS_2011_S8971293/d01-x01-y08", "7000", "600" )
useOnePt("/ATLAS_2011_S8971293/d01-x01-y09", "7000", "600" )
logging.info("Processing ATLAS_2011_S8924791")
if( not opts.ue) :
useOnePt("/ATLAS_2011_S8924791/d01-x01-y01", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x01-y02", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x02-y01", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x02-y02", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x03-y01", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x03-y02", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x04-y01", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x04-y02", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x05-y01", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x05-y02", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x06-y01", "7000", "10" )
useOnePt("/ATLAS_2011_S8924791/d01-x06-y02", "7000", "10" )
else :
useOnePt("/ATLAS_2011_S8924791/d01-x01-y01", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x01-y02", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x02-y01", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x02-y02", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x03-y01", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x03-y02", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x04-y01", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x04-y02", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x05-y01", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x05-y02", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x06-y01", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d01-x06-y02", "7000", "20" )
useOnePt("/ATLAS_2011_S8924791/d02-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x02-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x02-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x03-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x03-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x04-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x04-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x05-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x05-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x06-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d02-x06-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x02-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x02-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x03-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x03-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x04-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x04-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x05-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x05-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x06-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d03-x06-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S8924791/d04-x01-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x01-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x02-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x02-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x03-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x03-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x04-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x04-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x05-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x05-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x06-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d04-x06-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S8924791/d05-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x02-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x02-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x03-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x03-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x04-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x04-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x05-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x05-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x06-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d05-x06-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x02-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x02-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x03-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x03-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x04-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x04-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x05-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x05-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x06-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d06-x06-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S8924791/d07-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x02-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x02-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x03-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x03-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x04-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x04-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x05-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x05-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x06-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d07-x06-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S8924791/d08-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x01-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x02-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x02-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x03-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x03-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x04-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x04-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x05-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x05-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x06-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d08-x06-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x01-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x02-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x02-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x03-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x03-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x04-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x04-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x05-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x05-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x06-y01", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d09-x06-y02", "7000", "260" )
useOnePt("/ATLAS_2011_S8924791/d10-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x01-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x02-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x02-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x03-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x03-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x04-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x04-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x05-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x05-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x06-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d10-x06-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x01-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x02-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x02-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x03-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x03-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x04-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x04-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x05-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x05-y02", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x06-y01", "7000", "400" )
useOnePt("/ATLAS_2011_S8924791/d11-x06-y02", "7000", "400" )
logging.info("Processing ATLAS_2010_S8817804")
mergeByPt("/ATLAS_2010_S8817804/d01-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d02-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d03-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d04-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d05-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d06-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d07-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d08-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d09-x01-y01", "7000")
mergeByPt("/ATLAS_2010_S8817804/d10-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d11-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d12-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d13-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d14-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d15-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d16-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d17-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d18-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d19-x01-y01", "7000")
mergeByMass("/ATLAS_2010_S8817804/d20-x01-y01", "7000")
useOneMass("/ATLAS_2010_S8817804/d21-x01-y01", "7000", "250" )
useOneMass("/ATLAS_2010_S8817804/d22-x01-y01", "7000", "250" )
useOneMass("/ATLAS_2010_S8817804/d23-x01-y01", "7000", "650" )
useOneMass("/ATLAS_2010_S8817804/d24-x01-y01", "7000", "250" )
useOneMass("/ATLAS_2010_S8817804/d25-x01-y01", "7000", "250" )
useOneMass("/ATLAS_2010_S8817804/d26-x01-y01", "7000", "650" )
logging.info("Processing ATLAS_2011_I930220")
mergeByPt("/ATLAS_2011_I930220/d01-x01-y01", "7000" )
mergeByPt("/ATLAS_2011_I930220/d02-x01-y01", "7000" )
mergeByPt("/ATLAS_2011_I930220/d03-x01-y01", "7000" )
mergeByPt("/ATLAS_2011_I930220/d04-x01-y01", "7000" )
mergeByPt("/ATLAS_2011_I930220/d05-x01-y01", "7000" )
mergeByPt("/ATLAS_2011_I930220/d06-x01-y01", "7000" )
mergeByMass("/ATLAS_2011_I930220/d07-x01-y01", "7000")
useOneMass("/ATLAS_2011_I930220/d08-x01-y01", "7000", "110" )
useOneMass("/ATLAS_2011_I930220/d09-x01-y01", "7000", "110" )
useOneMass("/ATLAS_2011_I930220/d10-x01-y01", "7000", "370" )
logging.info("Processing ATLAS_2012_I1082936")
mergeByPt("/ATLAS_2012_I1082936/d01-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1082936/d01-x01-y02", "7000")
mergeByPt("/ATLAS_2012_I1082936/d01-x01-y03", "7000")
mergeByPt("/ATLAS_2012_I1082936/d01-x01-y04", "7000")
mergeByPt("/ATLAS_2012_I1082936/d01-x01-y05", "7000")
mergeByPt("/ATLAS_2012_I1082936/d01-x01-y06", "7000")
mergeByPt("/ATLAS_2012_I1082936/d01-x01-y07", "7000")
mergeByPt("/ATLAS_2012_I1082936/d02-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1082936/d02-x01-y02", "7000")
mergeByPt("/ATLAS_2012_I1082936/d02-x01-y03", "7000")
mergeByPt("/ATLAS_2012_I1082936/d02-x01-y04", "7000")
mergeByPt("/ATLAS_2012_I1082936/d02-x01-y05", "7000")
mergeByPt("/ATLAS_2012_I1082936/d02-x01-y06", "7000")
mergeByPt("/ATLAS_2012_I1082936/d02-x01-y07", "7000")
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y01", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y02", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y03", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y04", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y05", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y06", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y07", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y08", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d03-x01-y09", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y01", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y02", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y03", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y04", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y05", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y06", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y07", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y08", "7000", 1000.)
mergeByMass("/ATLAS_2012_I1082936/d04-x01-y09", "7000", 1000.)
logging.info("Processing CMS_2011_S8968497")
useOneMass("/CMS_2011_S8968497/d01-x01-y01", "7000", "1700" )
useOneMass("/CMS_2011_S8968497/d02-x01-y01", "7000", "1700" )
useOneMass("/CMS_2011_S8968497/d03-x01-y01", "7000", "1100" )
useOneMass("/CMS_2011_S8968497/d04-x01-y01", "7000", "1100" )
useOneMass("/CMS_2011_S8968497/d05-x01-y01", "7000", "650" )
useOneMass("/CMS_2011_S8968497/d06-x01-y01", "7000", "650" )
useOneMass("/CMS_2011_S8968497/d07-x01-y01", "7000", "250" )
useOneMass("/CMS_2011_S8968497/d08-x01-y01", "7000", "250" )
useOneMass("/CMS_2011_S8968497/d09-x01-y01", "7000", "250" )
logging.info("Processing ATLAS_2011_S9126244")
mergeByPt("/ATLAS_2011_S9126244/d01-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d01-x01-y02", "7000")
mergeByPt("/ATLAS_2011_S9126244/d02-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d02-x01-y02", "7000")
mergeByPt("/ATLAS_2011_S9126244/d03-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d03-x01-y02", "7000")
mergeByPt("/ATLAS_2011_S9126244/d04-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d04-x01-y02", "7000")
mergeByPt("/ATLAS_2011_S9126244/d05-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d05-x01-y02", "7000")
useOnePt("/ATLAS_2011_S9126244/d06-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d06-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d07-x01-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S9126244/d07-x01-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S9126244/d08-x01-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S9126244/d08-x01-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S9126244/d09-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d09-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d10-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d10-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d11-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d11-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d12-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d12-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d13-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d13-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d14-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d14-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d15-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d15-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d16-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d16-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d17-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d17-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d18-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d18-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d19-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d20-x01-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S9126244/d21-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d22-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d23-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d24-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d25-x01-y01", "7000", "210" )
mergeByPt("/ATLAS_2011_S9126244/d26-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d26-x01-y02", "7000")
mergeByPt("/ATLAS_2011_S9126244/d27-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d27-x01-y02", "7000")
mergeByPt("/ATLAS_2011_S9126244/d28-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d28-x01-y02", "7000")
mergeByPt("/ATLAS_2011_S9126244/d29-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9126244/d29-x01-y02", "7000")
useOnePt("/ATLAS_2011_S9126244/d30-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d31-x01-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S9126244/d32-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d33-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d34-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d35-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d36-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d37-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d37-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2011_S9126244/d38-x01-y01", "7000", "80" )
useOnePt("/ATLAS_2011_S9126244/d38-x01-y02", "7000", "80" )
useOnePt("/ATLAS_2011_S9126244/d39-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d39-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d40-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d40-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d41-x01-y01", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d41-x01-y02", "7000", "110" )
useOnePt("/ATLAS_2011_S9126244/d42-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d42-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d43-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2011_S9126244/d43-x01-y02", "7000", "210" )
# CMS_2011_S9120041 UE analysis
logging.info("Processing CMS_2011_S9120041")
mergeByPt("/CMS_2011_S9120041/d01-x01-y01", "7000")
mergeByPt("/CMS_2011_S9120041/d02-x01-y01", "7000")
if(opts.ue) :
useOnePt("/CMS_2011_S9120041/d03-x01-y01", "900", "0" )
useOnePt("/CMS_2011_S9120041/d04-x01-y01", "900", "0" )
useOnePt("/CMS_2011_S9120041/d05-x01-y01", "7000", "0" )
useOnePt("/CMS_2011_S9120041/d06-x01-y01", "7000", "0" )
useOnePt("/CMS_2011_S9120041/d07-x01-y01", "7000", "0" )
useOnePt("/CMS_2011_S9120041/d11-x01-y01", "900", "0" )
useOnePt("/CMS_2011_S9120041/d12-x01-y01", "900", "0" )
useOnePt("/CMS_2011_S9120041/d13-x01-y01", "900", "0" )
useOnePt("/CMS_2011_S9120041/d08-x01-y01", "7000", "20" )
useOnePt("/CMS_2011_S9120041/d09-x01-y01", "7000", "20" )
useOnePt("/CMS_2011_S9120041/d10-x01-y01", "7000", "20" )
else :
useOnePt("/CMS_2011_S9120041/d08-x01-y01", "7000", "10" )
useOnePt("/CMS_2011_S9120041/d09-x01-y01", "7000", "10" )
useOnePt("/CMS_2011_S9120041/d10-x01-y01", "7000", "10" )
# CMS dijet decorrelation
logging.info("Processing CMS_2011_S8950903")
useOnePt("/CMS_2011_S8950903/d01-x01-y01", "7000", "80" )
useOnePt("/CMS_2011_S8950903/d02-x01-y01", "7000", "110" )
useOnePt("/CMS_2011_S8950903/d03-x01-y01", "7000", "110" )
useOnePt("/CMS_2011_S8950903/d04-x01-y01", "7000", "210" )
useOnePt("/CMS_2011_S8950903/d05-x01-y01", "7000", "260" )
# CMS jet cross section
logging.info("Processing CMS_2011_S9086218")
mergeByPt("/CMS_2011_S9086218/d01-x01-y01", "7000")
mergeByPt("/CMS_2011_S9086218/d02-x01-y01", "7000")
mergeByPt("/CMS_2011_S9086218/d03-x01-y01", "7000")
mergeByPt("/CMS_2011_S9086218/d04-x01-y01", "7000")
mergeByPt("/CMS_2011_S9086218/d05-x01-y01", "7000")
mergeByPt("/CMS_2011_S9086218/d06-x01-y01", "7000")
# CMS 2/3 jet cross section ratio
logging.info("Processing CMS_2011_S9086218")
mergeByPt("/CMS_2011_S9088458/d01-x01-y01", "7000",500.)
# ATLAS track jet
logging.info("Processing ATLAS_2011_I919017")
for d in range(1,3) :
for y in range(1,5) :
mergeByPt("/ATLAS_2011_I919017/d0%s-x01-y0%s" % (d,y), "7000")
if( opts.ue) :
for x in range(2,6) :
for y in ["01","02","06","07","11","12","16","17","21","22"] :
useOnePt("/ATLAS_2011_I919017/d0%s-x0%s-y%s" % (d,x,y), "7000", "0" )
for y in ["03","04","08","09","13","14","18","19","23","24"] :
useOnePt("/ATLAS_2011_I919017/d0%s-x0%s-y%s" % (d,x,y), "7000", "4" )
for y in range(5,30,5) :
useOnePt("/ATLAS_2011_I919017/d0%s-x%02d-y%02d" % (d,x,y) , "7000", "20" )
else :
for x in range(2,6) :
for y in range(5,30,5) :
useOnePt("/ATLAS_2011_I919017/d0%s-x%02d-y%02d" % (d,x,y) , "7000", "10" )
logging.info("Processing ATLAS_2011_I926145")
mergeByPt("/ATLAS_2011_I926145/d01-x01-y01", "7000",1.5)
mergeByPt("/ATLAS_2011_I926145/d02-x01-y01", "7000",1.5)
mergeByPt("/ATLAS_2011_I926145/d03-x01-y01", "7000",1.5)
logging.info("Processing CMS_2011_S8941262")
useOnePt("/CMS_2011_S8941262/d01-x01-y01", "7000", "10" )
useOnePt("/CMS_2011_S8941262/d03-x01-y01", "7000", "10" )
mergeByPt("/CMS_2011_S8941262/d02-x01-y01", "7000",1.5)
logging.info("Processing CMS_2011_S8973270")
useOnePt("/CMS_2011_S8973270/d01-x01-y01", "7000", "70" )
useOnePt("/CMS_2011_S8973270/d02-x01-y01", "7000", "100" )
useOnePt("/CMS_2011_S8973270/d03-x01-y01", "7000", "130" )
useOnePt("/CMS_2011_S8973270/d04-x01-y01", "7000", "70" )
useOnePt("/CMS_2011_S8973270/d05-x01-y01", "7000", "100" )
useOnePt("/CMS_2011_S8973270/d06-x01-y01", "7000", "130" )
logging.info("Processing ATLAS_2012_I1082009")
useOnePt("/ATLAS_2012_I1082009/d08-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2012_I1082009/d09-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2012_I1082009/d10-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2012_I1082009/d11-x01-y01", "7000", "80" )
useOnePt("/ATLAS_2012_I1082009/d12-x01-y01", "7000", "80" )
useOnePt("/ATLAS_2012_I1082009/d13-x01-y01", "7000", "40" )
logging.info("Processing ATLAS_2012_I1118269")
mergeByPt("/ATLAS_2012_I1118269/d01-x01-y01", "7000")
useOnePt("/ATLAS_2012_I1118269/d02-x01-y01", "7000", "10" )
logging.info("Processing ATLAS_2012_I1188891")
mergeByPt("/ATLAS_2012_I1188891/d01-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1188891/d02-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1188891/d03-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1188891/d04-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1188891/d05-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1188891/d06-x01-y01", "7000")
logging.info("Processing CMS_2012_I1087342")
mergeByPt("/CMS_2012_I1087342/d01-x01-y01", "7000")
mergeByPt("/CMS_2012_I1087342/d02-x01-y01", "7000")
mergeByPt("/CMS_2012_I1087342/d03-x01-y01", "7000")
logging.info("Processing CMS_2012_PAS_QCD_11_010")
mergeByPt("/CMS_2012_PAS_QCD_11_010/d01-x01-y01", "7000")
mergeByPt("/CMS_2012_PAS_QCD_11_010/d02-x01-y01", "7000")
mergeByPt("/CMS_2012_PAS_QCD_11_010/d03-x01-y01", "7000")
mergeByPt("/CMS_2012_PAS_QCD_11_010/d04-x01-y01", "7000")
logging.info("Processing ATLAS_2011_S9035664")
mergeByPt("/ATLAS_2011_S9035664/d11-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d12-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d13-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d14-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d15-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d16-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d17-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d18-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d20-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d21-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d22-x01-y01", "7000")
mergeByPt("/ATLAS_2011_S9035664/d23-x01-y01", "7000")
logging.info("Processing ATLAS_2012_I1125575")
mergeByPt("/ATLAS_2012_I1125575/d01-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x01-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x02-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x02-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x03-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x03-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x04-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x04-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x05-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d01-x05-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x01-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x02-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x02-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x03-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x03-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x04-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x04-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x05-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d02-x05-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x01-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x01-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x02-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x02-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x03-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x03-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x04-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x04-y02", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x05-y01", "7000")
mergeByPt("/ATLAS_2012_I1125575/d03-x05-y02", "7000")
for d in range(4,7) :
for x in range(1,6) :
if(opts.ue) :
for y in range(1,9) :
useOnePt("/ATLAS_2012_I1125575/d0%s-x0%s-y0%s" % (d,x,y), "7000", "0" )
for y in ["09","10","11","12","13","14","15","16"] :
useOnePt("/ATLAS_2012_I1125575/d0%s-x0%s-y%s" % (d,x,y), "7000", "0" )
for y in range(17,19) :
useOnePt("/ATLAS_2012_I1125575/d0%s-x0%s-y%s" % (d,x,y), "7000", "20" )
else :
for y in range(17,19) :
useOnePt("/ATLAS_2012_I1125575/d0%s-x0%s-y%s" % (d,x,y), "7000", "10" )
for y in range(19,21) :
useOnePt("/ATLAS_2012_I1125575/d0%s-x0%s-y%s" % (d,x,y), "7000", "40" )
# ATLAS_2012_I1094564
useOnePt("/ATLAS_2012_I1094564/d01-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d02-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d03-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d04-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d05-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d06-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d07-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d08-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d09-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d10-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d11-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d12-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d13-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d14-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d15-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d16-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d17-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d18-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d19-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d20-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d21-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d22-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d23-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d24-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d25-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d26-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d27-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d28-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d29-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d30-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d31-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d32-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d33-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2012_I1094564/d34-x01-y01", "7000", "260" )
useOnePt("/ATLAS_2012_I1094564/d35-x01-y01", "7000", "400" )
useOnePt("/ATLAS_2012_I1094564/d36-x01-y01", "7000", "400" )
logging.info("Processing CMS_2013_I1224539_DIJET")
useOnePt("/CMS_2013_I1224539_DIJET/d01-x01-y01", "7000", "210" )
useOnePt("/CMS_2013_I1224539_DIJET/d02-x01-y01", "7000", "260" )
useOnePt("/CMS_2013_I1224539_DIJET/d03-x01-y01", "7000", "400" )
useOnePt("/CMS_2013_I1224539_DIJET/d04-x01-y01", "7000", "400" )
useOnePt("/CMS_2013_I1224539_DIJET/d05-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d06-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d07-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d08-x01-y01", "7000", "210" )
useOnePt("/CMS_2013_I1224539_DIJET/d09-x01-y01", "7000", "260" )
useOnePt("/CMS_2013_I1224539_DIJET/d10-x01-y01", "7000", "400" )
useOnePt("/CMS_2013_I1224539_DIJET/d11-x01-y01", "7000", "400" )
useOnePt("/CMS_2013_I1224539_DIJET/d12-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d13-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d14-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d15-x01-y01", "7000", "210" )
useOnePt("/CMS_2013_I1224539_DIJET/d16-x01-y01", "7000", "260" )
useOnePt("/CMS_2013_I1224539_DIJET/d17-x01-y01", "7000", "400" )
useOnePt("/CMS_2013_I1224539_DIJET/d18-x01-y01", "7000", "400" )
useOnePt("/CMS_2013_I1224539_DIJET/d19-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d20-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d21-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d22-x01-y01", "7000", "210" )
useOnePt("/CMS_2013_I1224539_DIJET/d23-x01-y01", "7000", "260" )
useOnePt("/CMS_2013_I1224539_DIJET/d24-x01-y01", "7000", "400" )
useOnePt("/CMS_2013_I1224539_DIJET/d25-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d26-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d27-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1224539_DIJET/d28-x01-y01", "7000", "600" )
useOnePt("/CMS_2013_I1273574/d01-x01-y01", "7000", "80" )
mergeByPt("/CMS_2013_I1273574/d02-x01-y01", "7000",1.)
useOnePt("/CMS_2013_I1273574/d03-x01-y01", "7000", "80" )
useOnePt("/CMS_2013_I1273574/d04-x01-y01", "7000", "80" )
useOnePt("/CMS_2013_I1273574/d05-x01-y01", "7000", "80" )
useOnePt("/CMS_2013_I1273574/d06-x01-y01", "7000", "80" )
mergeByPt("/CMS_2013_I1273574/d07-x01-y01", "7000",1.)
useOnePt("/CMS_2013_I1273574/d08-x01-y01", "7000", "80" )
mergeByPt("/CMS_2013_I1273574/d09-x01-y01", "7000",1.)
useOnePt("/CMS_2013_I1273574/d10-x01-y01", "7000", "80" )
mergeByPt("/CMS_2013_I1273574/d11-x01-y01", "7000",1.)
useOnePt("/CMS_2013_I1261026/d01-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d02-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d03-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d04-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d05-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d06-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d07-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d08-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d09-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d10-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d11-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d12-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d13-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d14-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d15-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d16-x01-y01", "7000", "0" )
useOnePt("/CMS_2013_I1261026/d17-x01-y01", "7000", "0" )
logging.info("Processing CMS_2012_I1090423")
useOneMass("/CMS_2012_I1090423/d01-x01-y01", "7000", "2900" )
useOneMass("/CMS_2012_I1090423/d02-x01-y01", "7000", "2300" )
useOneMass("/CMS_2012_I1090423/d03-x01-y01", "7000", "1700" )
useOneMass("/CMS_2012_I1090423/d04-x01-y01", "7000", "1100" )
useOneMass("/CMS_2012_I1090423/d05-x01-y01", "7000", "1100" )
useOneMass("/CMS_2012_I1090423/d06-x01-y01", "7000", "650" )
useOneMass("/CMS_2012_I1090423/d07-x01-y01", "7000", "650" )
useOneMass("/CMS_2012_I1090423/d08-x01-y01", "7000", "250" )
useOneMass("/CMS_2012_I1090423/d09-x01-y01", "7000", "250" )
logging.info("Processing ATLAS_2014_I1298811")
mergeByPt("/ATLAS_2014_I1298811/d01-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d01-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d02-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d02-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d03-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d03-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d04-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d04-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d05-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d05-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d06-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d06-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d07-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d07-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d08-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d08-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d09-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d09-x01-y02", "7000")
mergeByPt("/ATLAS_2014_I1298811/d10-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1298811/d10-x01-y02", "7000")
useOnePt("/ATLAS_2014_I1298811/d11-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2014_I1298811/d12-x01-y01", "7000", "0" )
useOnePt("/ATLAS_2014_I1298811/d13-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d13-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d14-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d14-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d15-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d15-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d25-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d25-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d26-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d26-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d27-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d27-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d16-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d16-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d17-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d17-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d18-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d18-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d28-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d28-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d29-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d29-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d30-x01-y01", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d30-x01-y02", "7000", "4" )
useOnePt("/ATLAS_2014_I1298811/d19-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d19-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d20-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d20-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d21-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d21-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d31-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d31-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d32-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d32-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d33-x01-y01", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d33-x01-y02", "7000", "40" )
useOnePt("/ATLAS_2014_I1298811/d22-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d22-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d23-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d23-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d24-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d24-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d34-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d34-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d35-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d35-x01-y02", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d36-x01-y01", "7000", "210" )
useOnePt("/ATLAS_2014_I1298811/d36-x01-y02", "7000", "210" )
logging.info("Processing ATLAS_2014_I1268975")
mergeByMass("/ATLAS_2014_I1268975/d01-x01-y01", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d01-x01-y02", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d01-x01-y03", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d01-x01-y04", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d01-x01-y05", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d01-x01-y06", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d02-x01-y01", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d02-x01-y02", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d02-x01-y03", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d02-x01-y04", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d02-x01-y05", "7000", 1000.)
mergeByMass("/ATLAS_2014_I1268975/d02-x01-y06", "7000", 1000.)
logging.info("Processing ATLAS_2014_I1307243")
useOnePt( "/ATLAS_2014_I1307243/d01-x01-y01", "7000", "80" )
mergeByPt("/ATLAS_2014_I1307243/d02-x01-y01", "7000")
useOnePt( "/ATLAS_2014_I1307243/d03-x01-y01", "7000", "80" )
mergeByPt("/ATLAS_2014_I1307243/d04-x01-y01", "7000")
useOnePt( "/ATLAS_2014_I1307243/d05-x01-y01", "7000", "80" )
mergeByPt("/ATLAS_2014_I1307243/d06-x01-y01", "7000")
useOnePt( "/ATLAS_2014_I1307243/d07-x01-y01", "7000", "80" )
mergeByPt("/ATLAS_2014_I1307243/d08-x01-y01", "7000")
useOnePt( "/ATLAS_2014_I1307243/d09-x01-y01", "7000", "80" )
mergeByPt("/ATLAS_2014_I1307243/d10-x01-y01", "7000")
useOnePt( "/ATLAS_2014_I1307243/d11-x01-y01", "7000", "80" )
mergeByPt("/ATLAS_2014_I1307243/d12-x01-y01", "7000")
useOnePt( "/ATLAS_2014_I1307243/d13-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d14-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d15-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d16-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d17-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d18-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d19-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d20-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d21-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d22-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d23-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d24-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d25-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d26-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d27-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d28-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d29-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d30-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d31-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d32-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d33-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d34-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d35-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d36-x01-y01", "7000", "80" )
useOnePt( "/ATLAS_2014_I1307243/d37-x01-y01", "7000", "80" )
mergeByPt("/ATLAS_2014_I1307243/d38-x01-y01", "7000")
useOnePt( "/ATLAS_2014_I1307243/d39-x01-y01", "7000", "80" )
mergeByPt("/ATLAS_2014_I1307243/d40-x01-y01", "7000")
logging.info("Processing ATLAS_2014_I1325553")
mergeByPt("/ATLAS_2014_I1325553/d01-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1325553/d02-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1325553/d03-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1325553/d04-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1325553/d05-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1325553/d06-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1325553/d07-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1325553/d08-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1325553/d09-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1325553/d10-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1325553/d11-x01-y01", "7000")
mergeByPt("/ATLAS_2014_I1325553/d12-x01-y01", "7000")
logging.info("Processing ATLAS_2016_I1419070")
for i in range(1,13) :
if(i<10) :
mergeByPt("/ATLAS_2016_I1419070/d0%s-x01-y01" % i, "8000")
else :
mergeByPt("/ATLAS_2016_I1419070/d%s-x01-y01" % i, "8000")
# remake differences and sums
for ihist in range(1,4) :
if not ("/ATLAS_2016_I1419070/d0%s-x01-y01" % ihist) in outhistos :
continue
h1 = outhistos["/ATLAS_2016_I1419070/d0%s-x01-y01" % ihist ]
h2 = outhistos["/ATLAS_2016_I1419070/d0%s-x01-y01" % (ihist+3)]
sstring = "/ATLAS_2016_I1419070/d%s-x01-y01" % (9+ihist)
dstring = "/ATLAS_2016_I1419070/d0%s-x01-y01" % (6+ihist)
hdiff = yoda.Scatter2D(dstring,dstring)
hsum = yoda.Scatter2D(sstring,sstring)
outhistos[dstring]= hdiff
outhistos[sstring]= hsum
for nbin in range(0,h2.numBins()) :
bsum = h1.bins()[nbin]+h2.bins()[nbin]
try:
ydiff = h2.bins()[nbin].mean()-h1.bins()[nbin].mean()
except:
ydiff = 0
try:
ysum = bsum.mean()
bstderr = bsum.stdErr()
except:
ysum = 0
bstderr = 0
try:
yerr = math.sqrt(h1.bins()[nbin].stdErr()**2+h2.bins()[nbin].stdErr()**2)
except:
yerr = 0
x = h1.bins()[nbin].xMid()
xerr = 0.5*h1.bins()[nbin].xWidth()
hdiff.addPoint(x,ydiff,xerr,yerr)
hsum.addPoint(x,ysum ,xerr,bstderr)
logging.info("Processing ATLAS_2015_I1394679")
for i in range(1,5) :
mergeByPt("/ATLAS_2015_I1394679/d0%s-x01-y01" % i, "8000")
for i in range(5,11) :
if(i<10) :
useOnePt( "/ATLAS_2015_I1394679/d0%s-x01-y01" % i, "8000", "110" )
else :
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % i, "8000", "110" )
for i in range(0,4) :
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % (11+4*i), "8000", "110" )
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % (12+4*i), "8000", "260" )
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % (13+4*i), "8000", "600" )
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % (14+4*i), "8000", "900" )
for i in range(0,5) :
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % (27+4*i), "8000", "110" )
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % (28+4*i), "8000", "260" )
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % (29+4*i), "8000", "400" )
useOnePt( "/ATLAS_2015_I1394679/d%s-x01-y01" % (30+4*i), "8000", "400" )
logging.info("Processing CMS_2013_I1208923")
for i in range(1,6) :
mergeByPt ("/CMS_2013_I1208923/d01-x01-y0%s" % i, "7000")
mergeByMass("/CMS_2013_I1208923/d02-x01-y0%s" % i, "7000", 1.)
logging.info("Processing CMS_2014_I1298810")
for i in range(1,19) :
if(i<10) :
mergeByPt("/CMS_2014_I1298810/d0"+str(i)+"-x01-y01", "7000")
else :
mergeByPt("/CMS_2014_I1298810/d"+str(i)+"-x01-y01", "7000")
logging.info("Processing CMS_2014_I1305624")
for x in range(1,6) :
useOnePt( "/CMS_2014_I1305624/d01-x%02d-y01" % x, "7000", "110" )
useOnePt( "/CMS_2014_I1305624/d01-x%02d-y02" % x, "7000", "110" )
useOnePt( "/CMS_2014_I1305624/d01-x%02d-y03" % x, "7000", "260" )
useOnePt( "/CMS_2014_I1305624/d01-x%02d-y04" % x, "7000", "260" )
useOnePt( "/CMS_2014_I1305624/d01-x%02d-y05" % x, "7000", "400" )
logging.info("Processing ATLAS_2011_I929691")
for x in range(0,3) :
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 1), "7000", "20" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 2), "7000", "40" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 3), "7000", "40" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 4), "7000", "80" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 5), "7000", "110" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 6), "7000", "110" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 7), "7000", "210" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 8), "7000", "260" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+ 9), "7000", "260" )
useOnePt( "/ATLAS_2011_I929691/d%02d-x01-y01" % (10*x+10), "7000", "400" )
logging.info("Processing ATLAS_2015_I1393758")
for i in range(1,13) :
mergeByPt("/ATLAS_2015_I1393758/d%02d-x01-y01" % i, "8000")
logging.info("Processing CMS_2016_I1459051")
for i in range(1,15) :
mergeByPt("/CMS_2016_I1459051/d%02d-x01-y01" % i, "13000")
logging.info("Processing ATLAS_2016_CONF_2016_092")
for i in range(1,7) :
mergeByPt("/ATLAS_2016_CONF_2016_092/d%02d-x01-y01" % i, "13000")
logging.info("Processing ATLAS_2017_I1609253")
useOnePt( "/ATLAS_2017_I1609253/d01-x01-y01", "8000", "260" )
useOnePt( "/ATLAS_2017_I1609253/d02-x01-y01", "8000", "260" )
useOnePt( "/ATLAS_2017_I1609253/d03-x01-y01", "8000", "260" )
useOnePt( "/ATLAS_2017_I1609253/d04-x01-y01", "8000", "260" )
useOnePt( "/ATLAS_2017_I1609253/d05-x01-y01", "8000", "400" )
useOnePt( "/ATLAS_2017_I1609253/d06-x01-y01", "8000", "400" )
useOnePt( "/ATLAS_2017_I1609253/d07-x01-y01", "8000", "400" )
useOnePt( "/ATLAS_2017_I1609253/d08-x01-y01", "8000", "400" )
useOnePt( "/ATLAS_2017_I1609253/d09-x01-y01", "8000", "400" )
useOnePt( "/ATLAS_2017_I1609253/d10-x01-y01", "8000", "400" )
useOnePt( "/ATLAS_2017_I1609253/d11-x01-y01", "8000", "600" )
useOnePt( "/ATLAS_2017_I1609253/d12-x01-y01", "8000", "600" )
logging.info("Processing CMS_2016_I1487277")
mergeByPt("/CMS_2016_I1487277/d01-x01-y01", "8000")
mergeByPt("/CMS_2016_I1487277/d02-x01-y01", "8000")
mergeByPt("/CMS_2016_I1487277/d03-x01-y01", "8000")
mergeByPt("/CMS_2016_I1487277/d04-x01-y01", "8000")
mergeByPt("/CMS_2016_I1487277/d05-x01-y01", "8000")
mergeByPt("/CMS_2016_I1487277/d06-x01-y01", "8000")
mergeByPt("/CMS_2016_I1487277/d07-x01-y01", "8000")
logging.info("Processing CMS_2016_I1421646")
useOnePt( "/CMS_2016_I1421646/d01-x01-y01", "8000", "210" )
useOnePt( "/CMS_2016_I1421646/d02-x01-y01", "8000", "260" )
useOnePt( "/CMS_2016_I1421646/d03-x01-y01", "8000", "400" )
useOnePt( "/CMS_2016_I1421646/d04-x01-y01", "8000", "400" )
useOnePt( "/CMS_2016_I1421646/d05-x01-y01", "8000", "600" )
useOnePt( "/CMS_2016_I1421646/d06-x01-y01", "8000", "900" )
useOnePt( "/CMS_2016_I1421646/d07-x01-y01", "8000", "900" )
logging.info("Processing CMS_2017_I1605749")
for i in [1,2,3,4,5,6,7,8,9,10,13,16] :
useOnePt("/CMS_2017_I1605749/d%02d-x01-y01" % i, "8000", "400" )
for i in [11,14,17]:
useOnePt("/CMS_2017_I1605749/d%02d-x01-y01" % i, "8000", "600" )
for i in [12,15,18]:
useOnePt("/CMS_2017_I1605749/d%02d-x01-y01" % i, "8000", "900" )
def CMS_2012_I1111014_name(i,j) :
if(i+j<100) :
return "/CMS_2012_I1111014/d%02d-x01-y01" % (i+j)
else :
return "/CMS_2012_I1111014/d%03d-x01-y01" % (i+j)
logging.info("Processing CMS_2012_I1111014")
for j in [0,22,44,66,87,106]:
for i in [1,2,3] :
useOnePt(CMS_2012_I1111014_name(i,j), "7000", "20" )
for i in [4,5,6,7]:
useOnePt(CMS_2012_I1111014_name(i,j), "7000", "40" )
for i in [8,9,10]:
useOnePt(CMS_2012_I1111014_name(i,j), "7000", "80" )
for i in [11,12,13,14,15,16]:
useOnePt(CMS_2012_I1111014_name(i,j), "7000", "110" )
for i in [17,18]:
useOnePt(CMS_2012_I1111014_name(i,j), "7000", "210" )
useOnePt(CMS_2012_I1111014_name(19,j), "7000", "260" )
if(j<87) :
for i in [20,21]:
useOnePt(CMS_2012_I1111014_name(i,j), "7000", "400" )
if(j<66) :
useOnePt(CMS_2012_I1111014_name(22,j), "7000", "600" )
for i in [126,127,128] :
for j in [1,2] :
mergeByPt("/CMS_2012_I1111014/d%03d-x01-y%02d" % (i,j), "7000")
logging.info("Processing CMS_2018_I1682495")
for i in [0,1,2,3] :
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 1), "13000", "110" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 2), "13000", "260" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 3), "13000", "260" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 4), "13000", "400" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 5), "13000", "400" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 6), "13000", "600" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 7), "13000", "600" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 8), "13000", "900" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+ 9), "13000", "900" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+10), "13000", "900" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+11), "13000", "900" )
useOnePt("/CMS_2018_I1682495/d%02d-x01-y01" % (12*i+12), "13000", "900" )
logging.info("Processing CMS_2015_I1385107")
for i in range(1,9) :
mergeByPt("/CMS_2015_I1385107/d%02d-x01-y01" % i, "2760")
logging.info("Processing CMS_2018_I1663452")
useOneMass("/CMS_2018_I1663452/d01-x01-y01", "13000", "5900" )
useOneMass("/CMS_2018_I1663452/d02-x01-y01", "13000", "4900" )
useOneMass("/CMS_2018_I1663452/d03-x01-y01", "13000", "3900" )
useOneMass("/CMS_2018_I1663452/d04-x01-y01", "13000", "3900" )
useOneMass("/CMS_2018_I1663452/d05-x01-y01", "13000", "2800" )
useOneMass("/CMS_2018_I1663452/d06-x01-y01", "13000", "2800" )
useOneMass("/CMS_2018_I1663452/d07-x01-y01", "13000", "2200" )
logging.info("Processing CMS_2017_I1519995")
useOneMass("/CMS_2017_I1519995/d01-x01-y01", "13000", "3900" )
useOneMass("/CMS_2017_I1519995/d02-x01-y01", "13000", "3900" )
useOneMass("/CMS_2017_I1519995/d03-x01-y01", "13000", "2800" )
useOneMass("/CMS_2017_I1519995/d04-x01-y01", "13000", "2800" )
useOneMass("/CMS_2017_I1519995/d05-x01-y01", "13000", "2200" )
useOneMass("/CMS_2017_I1519995/d06-x01-y01", "13000", "1600" )
logging.info("Processing CMS_2016_I1486238")
for i in [1,5,9,10,12,13,14,16,17] :
useOnePt("/CMS_2016_I1486238/d%02d-x01-y01" % i, "7000", "20" )
mergeByPt("/CMS_2016_I1486238/d11-x01-y01", "7000")
mergeByPt("/CMS_2016_I1486238/d15-x01-y01", "7000")
logging.info("Processing ATLAS_2018_I1634970")
for i in range(1,7) :
mergeByPt("/ATLAS_2018_I1634970/d%02d-x01-y01"%i, "13000")
for i in range(7,13) :
mergeByMass("/ATLAS_2018_I1634970/d%02d-x01-y01"%i, "13000", 1.)
logging.info("Processing ATLAS_2017_I1604271")
for i in range(1,13) :
mergeByPt("/ATLAS_2017_I1604271/d%02d-x01-y01" % i, "8000")
logging.info("Processing CMS_2017_I1598460")
for i in range(1,7) :
mergeByPt("/CMS_2017_I1598460/d%02d-x01-y01" % i, "8000")
logging.info("Processing ATLAS_2019_I1724098")
for i in range(1,45) :
if(i<=6 or (i>=23 and i<=28)) :
useOnePt("/ATLAS_2019_I1724098/d%02d-x01-y01" % i, "13000", "400")
else :
useOnePt("/ATLAS_2019_I1724098/d%02d-x01-y01" % i, "13000", "0")
logging.info("Processing CMS_2018_I1643640")
for i in range(0,5) :
if i == 0 : ioff = 0
else : ioff = 8*i+1
useOnePt("/CMS_2018_I1643640/d%02d-x01-y01"%(ioff+1), "13000", "110")
useOnePt("/CMS_2018_I1643640/d%02d-x01-y01"%(ioff+2), "13000", "260")
useOnePt("/CMS_2018_I1643640/d%02d-x01-y01"%(ioff+3), "13000", "400")
useOnePt("/CMS_2018_I1643640/d%02d-x01-y01"%(ioff+4), "13000", "400")
useOnePt("/CMS_2018_I1643640/d%02d-x01-y01"%(ioff+5), "13000", "600")
useOnePt("/CMS_2018_I1643640/d%02d-x01-y01"%(ioff+6), "13000", "600")
useOnePt("/CMS_2018_I1643640/d%02d-x01-y01"%(ioff+7), "13000", "600")
useOnePt("/CMS_2018_I1643640/d%02d-x01-y01"%(ioff+8), "13000", "900")
if(i==0) :
useOnePt("/CMS_2018_I1643640/d%02d-x01-y01"%(ioff+9), "13000", "900")
logging.info("Processing CMS_2019_I1719955")
for i in range(0,2) :
useOnePt("/CMS_2019_I1719955/d%02d-x01-y01"%(9*i+1), "13000", "110")
useOnePt("/CMS_2019_I1719955/d%02d-x01-y01"%(9*i+2), "13000", "260")
useOnePt("/CMS_2019_I1719955/d%02d-x01-y01"%(9*i+3), "13000", "400")
useOnePt("/CMS_2019_I1719955/d%02d-x01-y01"%(9*i+4), "13000", "400")
useOnePt("/CMS_2019_I1719955/d%02d-x01-y01"%(9*i+5), "13000", "600")
useOnePt("/CMS_2019_I1719955/d%02d-x01-y01"%(9*i+6), "13000", "600")
useOnePt("/CMS_2019_I1719955/d%02d-x01-y01"%(9*i+7), "13000", "600")
useOnePt("/CMS_2019_I1719955/d%02d-x01-y01"%(9*i+8), "13000", "900")
useOnePt("/CMS_2019_I1719955/d%02d-x01-y01"%(9*i+9), "13000", "900")
# rescaling for semi-leptonic top decays (we only simulate 1 charge combination)
for i in range(96,116,2) :
rescale("/ATLAS_2018_I1656578/d%s-x01-y01" % i,2.)
for i in range(15,29,2) :
rescale("/ATLAS_2017_I1614149/d%s-x01-y01" % i,2.)
for i in range(1,23,2) :
rescale("/ATLAS_2015_I1404878/d%02d-x01-y01" % i,2.)
rescale("/ATLAS_2015_I1397637/d01-x01-y01",2.)
for i in range(1,22,1) :
rescale("/ATLAS_2015_I1345452/d%02d-x01-y01" % i,2.)
for i in range(1,10,1) :
rescale("/ATLAS_2014_I1304688/d%02d-x01-y01" % i,2.)
for i in range(1,82) :
rescale("/CMS_2018_I1663958/d%02d-x01-y01" % i,2.)
for i in range(169,173,1) :
rescale("/CMS_2018_I1663958/d%02d-x01-y01" % i,2.)
for i in range(8,15) :
rescale("/CMS_2018_I1662081/d%02d-x01-y01" % i,2.)
for i in range(1,41) :
rescale("/CMS_2016_I1491950/d%02d-x02-y01" % i,2.)
for i in range(1,13) :
rescale("/CMS_2016_I1454211/d%02d-x01-y01" % i,2.)
rescale("/CMS_2017_I1518399/d01-x01-y01",2.)
+for i in [4,8,12,16,20,24,28,32,36,40,44,48,52,75,76,77,78,79] :
+ rescale("/ATLAS_2019_I1750330/d%02d-x01-y01" % i,2.)
+for i in [115,116,117,118,119,155,156,157,158,159,189,190,191,192,212,213,214,235,236,237,238,263,264,265,266,291,292,293,294,319,320,321,322,347,348,349,350,375,376,377,378,403,404,405,406,426,427,428,449,450,451,452,477,478,479,480,505,506,507,508,843,847,851,855,859,863,867,871,875,879,883,887,899,900,901,913,914,923,924,933,934,943,944,957,958,959,975,976,977,993,994,995,1007,1008,1021,1022,1023,] :
+ rescale("/ATLAS_2019_I1750330/d%s-x01-y01" % i,2.)
+
# Choose output file
name = args[0]+"-Jets.yoda"
yoda.writeYODA(outhistos,name)
sys.exit(0)

File Metadata

Mime Type
text/x-diff
Expires
Sun, Feb 23, 2:01 PM (2 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4486432
Default Alt Text
(185 KB)

Event Timeline