CMS 3D CMS Logo

Namespaces | Classes | Typedefs | Functions | Variables

lhef Namespace Reference

Namespaces

namespace  cc

Classes

class  BranchingRatios
class  CBInputStream
class  CommonBlocks
class  Hadronisation
class  HEPEUP
class  HEPRUP
class  JetClustering
class  JetInput
class  JetMatching
class  JetMatchingMadgraph
class  JetMatchingMLM
class  LHEEvent
class  LHEProxy
class  LHEReader
class  LHERunInfo
class  Matching
struct  MEMAEV
struct  MEMAIN
struct  PYPART
class  Pythia8Hadronisation
class  SimpleMatrix
class  STLInputStream
class  StorageInputStream
class  StorageWrap
class  ThePEGHadronisation
struct  UPPRIV
class  XMLDocument
class  XMLInputSourceWrapper
class  XMLSimpleStr
class  XMLUniStr

Typedefs

typedef XMLInputSourceWrapper
< CBInputStream
CBInputSource
typedef XMLInputSourceWrapper
< STLInputStream
STLInputSource
typedef XMLInputSourceWrapper
< StorageInputStream
StorageInputSource

Functions

static void attributesToDom (DOMElement *dom, const Attributes &attributes)
 DEFINE_LHE_HADRONISATION_PLUGIN (ThePEGHadronisation)
 DEFINE_LHE_HADRONISATION_PLUGIN (Pythia8Hadronisation)
static std::vector< std::string > domToLines (const DOMNode *node)
static void fillHeader (LHERunInfo::Header &header, const char *data, int len=-1)
static void fillLines (std::vector< std::string > &lines, const char *data, int len=-1)
static void fixSubTree (HepMC::GenVertex *vertex, HepMC::FourVector time, std::set< const HepMC::GenVertex * > &visited)
static int getStatus (const HepMC::GenParticle *p)
static void invalidateTree (JetInput::ParticleBitmap &invalid, const JetInput::ParticleVector &p, const HepMC::GenVertex *v)
static bool isContained (const std::vector< unsigned int > &list, int id)
afs cern ch work a aaltunda
public www CMSSW_6_2_5 src
GeneratorInterface
LHEInterface src LHEReader
static cc void 
logFileAction (char const *msg, std::string const &fileName)
void mgevnt_ (void)
void mginit_ (int *npara, Param *params, Param *values)
void mgveto_ (int *veto)
static unsigned int partIdx (const JetInput::ParticleVector &p, const HepMC::GenParticle *particle)
template<typename T >
static void pop (std::vector< T > &vec, unsigned int index)

Variables

struct lhef::MEMAEV memaev_
struct lhef::MEMAIN memain_
struct lhef::PYPART pypart_
struct lhef::UPPRIV uppriv_

Typedef Documentation

Definition at line 188 of file XMLUtils.h.

Definition at line 189 of file XMLUtils.h.

Definition at line 190 of file XMLUtils.h.


Function Documentation

static void lhef::attributesToDom ( DOMElement *  dom,
const Attributes &  attributes 
) [static]

Definition at line 140 of file LHEReader.cc.

References i, mergeVDriftHistosByStation::name, and relativeConstraints::value.

Referenced by lhef::LHEReader::XMLHandler::startElement().

{
        for(unsigned int i = 0; i < attributes.getLength(); i++) {
                const XMLCh *name = attributes.getQName(i);
                const XMLCh *value = attributes.getValue(i);

                dom->setAttribute(name, value);
        }
}

lhef::DEFINE_LHE_HADRONISATION_PLUGIN ( ThePEGHadronisation  )
lhef::DEFINE_LHE_HADRONISATION_PLUGIN ( Pythia8Hadronisation  )
static std::vector<std::string> lhef::domToLines ( const DOMNode *  node) [static]

Definition at line 371 of file LHERunInfo.cc.

References fillLines(), AlCaHLTBitMon_ParallelJobs::p, lumiQueryAPI::q, and query::result.

Referenced by lhef::LHERunInfo::findHeader().

{
        std::vector<std::string> result;
        DOMImplementation *impl =
                DOMImplementationRegistry::getDOMImplementation(
                                                        XMLUniStr("Core"));
        std::auto_ptr<DOMWriter> writer(
                static_cast<DOMImplementationLS*>(impl)->createDOMWriter());

        writer->setEncoding(XMLUniStr("UTF-8"));
        XMLSimpleStr buffer(writer->writeToString(*node));

        const char *p = std::strchr((const char*)buffer, '>') + 1;
        const char *q = std::strrchr(p, '<');
        fillLines(result, p, q - p);

        return result;
}
static void lhef::fillHeader ( LHERunInfo::Header &  header,
const char *  data,
int  len = -1 
) [static]

Definition at line 150 of file LHEReader.cc.

References data, end, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by lhef::LHEReader::XMLHandler::comment(), and lhef::LHEReader::XMLHandler::endElement().

{
        const char *end = len >= 0 ? (data + len) : 0;
        while(*data && (!end || data < end)) {
                std::size_t len = std::strcspn(data, "\r\n");
                if (end && data + len > end)
                        len = end - data;
                if (data[len] == '\r' && data[len + 1] == '\n')
                        len += 2;
                else if (data[len])
                        len++;
                header.addLine(std::string(data, len));
                data += len;
        }
}

static void lhef::fillLines ( std::vector< std::string > &  lines,
const char *  data,
int  len = -1 
) [static]

Definition at line 354 of file LHERunInfo.cc.

References data, end, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by domToLines().

{
        const char *end = len >= 0 ? (data + len) : 0;
        while(*data && (!end || data < end)) {
                std::size_t len = std::strcspn(data, "\r\n");
                if (end && data + len > end)
                        len = end - data;
                if (data[len] == '\r' && data[len + 1] == '\n')
                        len += 2;
                else if (data[len])
                        len++;
                lines.push_back(std::string(data, len));
                data += len;
        }
}
static void lhef::fixSubTree ( HepMC::GenVertex *  vertex,
HepMC::FourVector  time,
std::set< const HepMC::GenVertex * > &  visited 
) [static]

Definition at line 487 of file LHEEvent.cc.

Referenced by lhef::LHEEvent::fixHepMCEventTimeOrdering().

{
        HepMC::FourVector curTime = vertex->position();
        bool needsFixup = curTime.t() < time.t();

        if (!visited.insert(vertex).second && !needsFixup)
                return;

        if (needsFixup)
                vertex->set_position(time);
        else
                time = curTime;

        for(HepMC::GenVertex::particles_out_const_iterator iter =
                                        vertex->particles_out_const_begin();
            iter != vertex->particles_out_const_end(); ++iter) {
                HepMC::GenVertex *endVertex = (*iter)->end_vertex();
                if (endVertex)
                        fixSubTree(endVertex, time, visited);
        }
}
static int lhef::getStatus ( const HepMC::GenParticle *  p) [static]

Definition at line 181 of file Pythia8Hadronisation.cc.

References ntuplemaker::status.

Referenced by lhef::Pythia8Hadronisation::doHadronisation(), DataCertificationJetMET::endRun(), SherpaHadronizer::finalizeEvent(), SiPixelHistoPlotter::makePlot(), and SiPixelInformationExtractor::sendTkUpdatedStatus().

{
        int status = p->status();
        if (status > 0)
                return status;
        else if (status > -30 && status < 0)
                return 3;
        else
                return 2;
}
static void lhef::invalidateTree ( JetInput::ParticleBitmap &  invalid,
const JetInput::ParticleVector &  p,
const HepMC::GenVertex *  v 
) [static]

Definition at line 143 of file JetInput.cc.

References customizeTrackingMonitorSeedNumber::idx, and partIdx().

Referenced by lhef::JetInput::operator()().

{
        if (!v)
                return;

        for(HepMC::GenVertex::particles_out_const_iterator iter =
                                        v->particles_out_const_begin();
            iter != v->particles_out_const_end(); ++iter) {
                unsigned int idx = partIdx(p, *iter);

                if (invalid[idx])
                        continue;

                invalid[idx] = true;

                const HepMC::GenVertex *v = (*iter)->end_vertex();
                invalidateTree(invalid, p, v);
        }
}
static bool lhef::isContained ( const std::vector< unsigned int > &  list,
int  id 
) [inline, static]

Definition at line 89 of file JetInput.cc.

References pos.

Referenced by TopDecaySubset::checkWBosons(), lhef::JetInput::isExcludedFromResonances(), lhef::JetInput::isIgnored(), and lhef::JetInput::isResonance().

{
        unsigned int absId = (unsigned int)(id > 0 ? id : -id);
        std::vector<unsigned int>::const_iterator pos =
                        std::lower_bound(list.begin(), list.end(), absId);
        return pos != list.end() && *pos == absId;
}
afs cern ch work a aaltunda public www CMSSW_6_2_5 src GeneratorInterface LHEInterface src LHEReader static cc void lhef::logFileAction ( char const *  msg,
std::string const &  fileName 
) [static]

Definition at line 35 of file LHEReader.cc.

Referenced by lhef::LHEReader::next().

void lhef::mgevnt_ ( void  )
void lhef::mginit_ ( int *  npara,
Param *  params,
Param *  values 
)
void lhef::mgveto_ ( int *  veto)
static unsigned int lhef::partIdx ( const JetInput::ParticleVector &  p,
const HepMC::GenParticle *  particle 
) [static]

Definition at line 130 of file JetInput.cc.

References pos.

Referenced by lhef::JetInput::fromHardProcess(), lhef::JetInput::fromResonance(), lhef::JetInput::fromSignalVertex(), invalidateTree(), and lhef::JetInput::testPartonChildren().

{
        JetInput::ParticleVector::const_iterator pos =
                        std::lower_bound(p.begin(), p.end(), particle);
        if (pos == p.end() || *pos != particle)
                throw cms::Exception("CorruptedData")
                        << "HepMC::GenEvent corrupted: Unlisted particles"
                           " in decay tree." << std::endl;

        return pos - p.begin();
}
template<typename T >
static void lhef::pop ( std::vector< T > &  vec,
unsigned int  index 
) [inline, static]

Definition at line 149 of file LHEEvent.cc.

References findQualityFiles::size.

Referenced by lhef::LHEEvent::removeParticle().

{
        unsigned int size = vec.size() - 1;
        std::memmove(&vec[index], &vec[index + 1], (size - index) * sizeof(T));
}

Variable Documentation