CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Typedefs | Functions | Variables
lhef Namespace Reference

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)
 
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 184 of file XMLUtils.h.

Definition at line 185 of file XMLUtils.h.

Definition at line 186 of file XMLUtils.h.

Function Documentation

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

Definition at line 108 of file LHEReader.cc.

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

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

109 {
110  for(unsigned int i = 0; i < attributes.getLength(); i++) {
111  const XMLCh *name = attributes.getQName(i);
112  const XMLCh *value = attributes.getValue(i);
113 
114  dom->setAttribute(name, value);
115  }
116 }
int i
Definition: DBlmapReader.cc:9
list attributes
Definition: asciidump.py:415
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(), L1TEmulatorMonitor_cff::p, lumiQueryAPI::q, and query::result.

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

372 {
373  std::vector<std::string> result;
374  DOMImplementation *impl =
375  DOMImplementationRegistry::getDOMImplementation(
376  XMLUniStr("Core"));
377  std::auto_ptr<DOMWriter> writer(
378  static_cast<DOMImplementationLS*>(impl)->createDOMWriter());
379 
380  writer->setEncoding(XMLUniStr("UTF-8"));
381  XMLSimpleStr buffer(writer->writeToString(*node));
382 
383  const char *p = std::strchr((const char*)buffer, '>') + 1;
384  const char *q = std::strrchr(p, '<');
385  fillLines(result, p, q - p);
386 
387  return result;
388 }
tuple node
Definition: Node.py:50
tuple result
Definition: query.py:137
static void fillLines(std::vector< std::string > &lines, const char *data, int len=-1)
Definition: LHERunInfo.cc:354
static void lhef::fillHeader ( LHERunInfo::Header &  header,
const char *  data,
int  len = -1 
)
static

Definition at line 118 of file LHEReader.cc.

References LHERunInfoProduct::Header::addLine(), runTheMatrix::data, and end.

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

120 {
121  const char *end = len >= 0 ? (data + len) : 0;
122  while(*data && (!end || data < end)) {
123  std::size_t len = std::strcspn(data, "\r\n");
124  if (end && data + len > end)
125  len = end - data;
126  if (data[len] == '\r' && data[len + 1] == '\n')
127  len += 2;
128  else if (data[len])
129  len++;
130  header.addLine(std::string(data, len));
131  data += len;
132  }
133 }
#define end
Definition: vmac.h:38
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 runTheMatrix::data, and end.

Referenced by domToLines().

356 {
357  const char *end = len >= 0 ? (data + len) : 0;
358  while(*data && (!end || data < end)) {
359  std::size_t len = std::strcspn(data, "\r\n");
360  if (end && data + len > end)
361  len = end - data;
362  if (data[len] == '\r' && data[len + 1] == '\n')
363  len += 2;
364  else if (data[len])
365  len++;
366  lines.push_back(std::string(data, len));
367  data += len;
368  }
369 }
#define end
Definition: vmac.h:38
static void lhef::fixSubTree ( HepMC::GenVertex *  vertex,
HepMC::FourVector  time,
std::set< const HepMC::GenVertex * > &  visited 
)
static

Definition at line 479 of file LHEEvent.cc.

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

482 {
483  HepMC::FourVector curTime = vertex->position();
484  bool needsFixup = curTime.t() < time.t();
485 
486  if (!visited.insert(vertex).second && !needsFixup)
487  return;
488 
489  if (needsFixup)
490  vertex->set_position(time);
491  else
492  time = curTime;
493 
494  for(HepMC::GenVertex::particles_out_const_iterator iter =
495  vertex->particles_out_const_begin();
496  iter != vertex->particles_out_const_end(); ++iter) {
497  HepMC::GenVertex *endVertex = (*iter)->end_vertex();
498  if (endVertex)
499  fixSubTree(endVertex, time, visited);
500  }
501 }
static void fixSubTree(HepMC::GenVertex *vertex, HepMC::FourVector time, std::set< const HepMC::GenVertex * > &visited)
Definition: LHEEvent.cc:479
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(), and SherpaHadronizer::finalizeEvent().

182 {
183  int status = p->status();
184  if (status > 0)
185  return status;
186  else if (status > -30 && status < 0)
187  return 3;
188  else
189  return 2;
190 }
tuple status
Definition: ntuplemaker.py:245
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 partIdx().

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

146 {
147  if (!v)
148  return;
149 
150  for(HepMC::GenVertex::particles_out_const_iterator iter =
151  v->particles_out_const_begin();
152  iter != v->particles_out_const_end(); ++iter) {
153  unsigned int idx = partIdx(p, *iter);
154 
155  if (invalid[idx])
156  continue;
157 
158  invalid[idx] = true;
159 
160  const HepMC::GenVertex *v = (*iter)->end_vertex();
161  invalidateTree(invalid, p, v);
162  }
163 }
static void invalidateTree(InputGenJetsParticleSelector::ParticleBitmap &invalid, const InputGenJetsParticleSelector::ParticleVector &p, const reco::GenParticle *particle)
static unsigned int partIdx(const InputGenJetsParticleSelector::ParticleVector &p, const reco::GenParticle *particle)
mathSSE::Vec4< T > v
static bool lhef::isContained ( const std::vector< unsigned int > &  list,
int  id 
)
inlinestatic

Definition at line 89 of file JetInput.cc.

References pos.

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

90 {
91  unsigned int absId = (unsigned int)(id > 0 ? id : -id);
92  std::vector<unsigned int>::const_iterator pos =
93  std::lower_bound(list.begin(), list.end(), absId);
94  return pos != list.end() && *pos == absId;
95 }
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
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().

132 {
133  JetInput::ParticleVector::const_iterator pos =
134  std::lower_bound(p.begin(), p.end(), particle);
135  if (pos == p.end() || *pos != particle)
136  throw cms::Exception("CorruptedData")
137  << "HepMC::GenEvent corrupted: Unlisted particles"
138  " in decay tree." << std::endl;
139 
140  return pos - p.begin();
141 }
template<typename T >
static void lhef::pop ( std::vector< T > &  vec,
unsigned int  index 
)
inlinestatic

Definition at line 141 of file LHEEvent.cc.

References findQualityFiles::size.

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

142 {
143  unsigned int size = vec.size() - 1;
144  std::memmove(&vec[index], &vec[index + 1], (size - index) * sizeof(T));
145 }
long double T
tuple size
Write out results.

Variable Documentation

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