/usr/include/ThePEG/Handlers/XComb.h is in libthepeg-dev 1.8.0-3build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 | // -*- C++ -*-
//
// XComb.h is a part of ThePEG - Toolkit for HEP Event Generation
// Copyright (C) 1999-2011 Leif Lonnblad
//
// ThePEG is licenced under version 2 of the GPL, see COPYING for details.
// Please respect the MCnet academic guidelines, see GUIDELINES for details.
//
#ifndef ThePEG_XComb_H
#define ThePEG_XComb_H
// This is the declaration of the XComb class.
#include "ThePEG/Config/ThePEG.h"
#include "ThePEG/PDF/PartonExtractor.fh"
#include "ThePEG/PDF/PartonBin.h"
#include "ThePEG/PDF/PartonBinInstance.h"
#include "ThePEG/Utilities/AnyReference.h"
#include "ThePEG/Utilities/VSelector.h"
#include "ThePEG/Utilities/ClassDescription.h"
#include "ThePEG/Utilities/Maths.h"
#include "ThePEG/EventRecord/Particle.h"
#include "ThePEG/Handlers/EventHandler.fh"
#include "ThePEG/Cuts/Cuts.fh"
namespace ThePEG {
/**
* The XComb class stores all information about the generation of a
* hard sub-proces for a given pair of incoming particles, a pair of
* extracted partons, total parton-parton energy squared and a
* PartonExtractor object.
*
* When an event is generated, the objects used in the generation can
* be assigned an XComb object for easy acces to the corresponding
* information. To facilitate this, the corresponding classes inherits
* from the LastXCombInfo class which provides the relefant access
* functions.
*
* @see PartonExtractor
* @see Cuts
* @see LastXCombInfo
*/
class XComb: public Base {
public:
/** @name Standard constructors and destructors. */
//@{
/**
* Standard constructor.
*/
XComb(Energy newMaxEnergy, const cPDPair & inc,
tEHPtr newEventHandler, tPExtrPtr newExtractor, tCascHdlPtr newCKKW,
const PBPair & newPartonBins, tCutsPtr newCuts);
/**
* Default constructor.
*/
XComb();
/**
* Destructor.
*/
virtual ~XComb();
//@}
/** @name Access the assigned objects used in the generation. */
//@{
/**
* Return a reference to the corresponding collision handler
*/
const EventHandler & eventHandler() const { return *theEventHandler; }
/**
* Return a pointer to the corresponding collision handler
*/
tEHPtr eventHandlerPtr() const { return theEventHandler; }
/**
* A pointer to the parton extractor.
*/
tPExtrPtr pExtractor() const { return thePartonExtractor; }
/**
* A pointer to the kinematical cuts.
*/
tCutsPtr cuts() const { return theCuts; }
/**
* Return a possibly null pointer to a CascadeHandler to be used for
* CKKW-reweighting.
*/
tCascHdlPtr CKKWHandler() const { return theCKKW; }
//@}
/** @name Access information about incoming particles and partons. */
//@{
/**
* The incoming particle types.
*/
const cPDPair & particles() const { return theParticles; }
/**
* The incoming parton types.
*/
const cPDPair & partons() const { return thePartons; }
/**
* Additional information about the incoming partons.
*/
const PBPair & partonBins() const { return thePartonBins; }
/**
* The maximum cm energy for this process.
*/
Energy maxEnergy() const { return theMaxEnergy; }
/**
* Returns true if this XComb does not correspond to a proper
* subprocess generation. I.e. if we are only generating a partial
* event and the incoming particles and partons are not used
* explicitly.
*/
bool empty() const { return !theEventHandler; }
//@}
/** @name Manipulate and acces information about the last selected
phase space point. */
//@{
/**
* Reset all saved data about last generated phasespace point;
*/
void clean();
/**
* Set information about currently generated partons.
*/
void setPartonBinInstances(PBIPair pbis, Energy2 scale);
/**
* Prepare this XComb for producing a sub-process.
*/
void prepare(const PPair &);
/**
* Return the pair of incoming particle instances.
*/
const PPair & lastParticles() const { return theLastParticles; }
/**
* Return the pair of incoming parton instances.
*/
const PPair & lastPartons() const { return theLastPartons; }
/**
* Set the pair of incoming parton instances.
*/
void lastPartons(PPair pp) { theLastPartons = pp; }
/**
* Return the SubProcess object corresponding to the last generated
* sub-process.
*/
tSubProPtr subProcess() const { return theSub; }
/**
* Set the SubProcess object corresponding to the last generated
* sub-process.
*/
void subProcess(tSubProPtr);
/**
* Additional information about the incoming partons.
*/
const PBIPair & partonBinInstances() const { return thePartonBinInstances; }
/**
* Additional information about the incoming partons.
*/
PBIPair & partonBinInstances() { return thePartonBinInstances; }
/**
* Return the corresponding parton bin instance for a given
* extracted parton.
*/
tPBIPtr partonBinInstance(tcPPtr) const;
/**
* The last generated total energy squared of the incoming particles.
*/
Energy2 lastS() const { return theLastS; }
/**
* Set the last generated total energy squared of the incoming
* particles.
*/
void lastS(Energy2 s) { theLastS = s; }
/**
* The last generated total energy squared of the incoming prtons.
*/
Energy2 lastSHat() const { return theLastSHat; }
/**
* Set the last generated total energy squared of the incoming
* prtons.
*/
void lastSHat(Energy2 sh) { theLastSHat = sh; }
/**
* lastSHat()/lastS().
*/
double lastTau() const { return lastSHat()/lastS(); }
/**
* The last generated rapidity of the hard scattering sub-system.
*/
double lastY() const { return theLastY; }
/**
* Set the last generated rapidity of the hard scattering sub-system.
*/
void lastY(double y) { theLastY = y; }
/**
* Log of one over the momentum fraction of the first incoming
* particle w.r.t. the maximum allowed energy.
*/
double lastP1() const { return theLastP1P2.first; }
/**
* Log of one over the momentum fraction of the second incoming
* particle w.r.t. the maximum allowed energy.
*/
double lastP2() const { return theLastP1P2.second; }
/**
* Set log of one over the momentum fraction of the incoming
* particles w.r.t. the maximum allowed energy.
*/
void lastP1P2(pair<double,double> pp) { theLastP1P2 = pp; }
/**
* Log of one over the first incoming parton momentum fraction
* w.r.t. the first incoming particle.
*/
double lastL1() const { return theLastL1L2.first; }
/**
* Log of one over the second incoming parton momentum fraction
* w.r.t. the second incoming particle.
*/
double lastL2() const { return theLastL1L2.second; }
/**
* Set log of one over the incoming parton momentum fractions
* w.r.t. the incoming particles.
*/
void lastL1L2(pair<double,double>);
/**
* The first incoming parton momentum fraction w.r.t. the
* first incoming particle.
*/
double lastX1() const { return theLastX1X2.first; }
/**
* The second incoming parton momentum fraction
* w.r.t. the second incoming particle.
*/
double lastX2() const { return theLastX1X2.second; }
/**
* Set the incoming parton momentum fractions w.r.t. the incoming
* particles.
*/
void lastX1X2(pair<double,double>);
/**
* Return 1-lastX1() to highest possible precision for
* x\f$\rightarrow\f$ 1.
*/
double lastE1() const { return theLastE1E2.first; }
/**
* Return 1-lastX2() to highest possible precision for
* x\f$\rightarrow\f$ 1.
*/
double lastE2() const { return theLastE1E2.second; }
/**
* Set one minus the incoming parton momentum fractions w.r.t. the
* incoming particles.
*/
void lastE1E2(pair<double,double>);
/**
* Get the last chosen scale of the hard scattering.
*/
Energy2 lastScale() const { return theLastScale; }
/**
* Set the last chosen scale of the hard scattering.
*/
void lastScale(Energy2 Q2) { theLastScale = Q2; }
/**
* Get the \f$\alpha_S\f$ used in the hard scattering. Is negative
* if no value has been set.
*/
double lastAlphaS() const { return theLastAlphaS; }
/**
* Set the \f$\alpha_S\f$ used in the hard scattering.
*/
void lastAlphaS(double a) { theLastAlphaS = a; }
/**
* Get the \f$\alpha_{EM}\f$ used in the hard scattering. Is negative
* if no value has been set.
*/
double lastAlphaEM() const { return theLastAlphaEM; }
/**
* Set the \f$\alpha_{EM}\f$ used in the hard scattering.
*/
void lastAlphaEM(double a) { theLastAlphaEM = a; }
//@}
public:
/**
* Check for meta information
*/
bool hasMeta(int id) const {
return theMeta.find(id) != theMeta.end();
}
/**
* Set meta information.
*/
template<class T>
void meta(int id, T& ref) {
theMeta[id] = AnyReference(ref);
}
/**
* Erase meta information.
*/
void eraseMeta(int id) {
theMeta.erase(id);
}
/**
* Retrieve meta information.
*/
template<class T>
T& meta(int id) const {
return theMeta.find(id)->second.cast<T>();
}
protected:
/**
* Set the local parton bin info objects for this XComb.
*/
void setPartonBinInfo();
/**
* Create PartonBinInstance objects for this XComb.
*/
void createPartonBinInstances();
public:
/** @name Functions used by the persistent I/O system. */
//@{
/**
* Function used to write out object persistently.
* @param os the persistent output stream written to.
*/
void persistentOutput(PersistentOStream & os) const;
/**
* Function used to read in object persistently.
* @param is the persistent input stream read from.
* @param version the version number of the object when written.
*/
void persistentInput(PersistentIStream & is, int version);
//@}
/**
* Standard Init function used to initialize the interface.
*/
static void Init();
protected:
/**
* Set the pair of incoming particle instances.
*/
void lastParticles(const PPair & p) { theLastParticles = p; }
/**
* Set information about currently generated partons.
*/
void resetPartonBinInstances(const PBIPair & newBins) { thePartonBinInstances = newBins; }
private:
/**
* The corresponding collision handler
*/
tEHPtr theEventHandler;
/**
* A pointer to the parton extractor.
*/
tPExtrPtr thePartonExtractor;
/**
* A pointer to a CascadeHandler to be used for CKKW-reweighting.
*/
tCascHdlPtr theCKKW;
/**
* A pointer to the kinematical cuts used.
*/
tCutsPtr theCuts;
/**
* The incoming particle types.
*/
cPDPair theParticles;
/**
* The incoming parton types.
*/
cPDPair thePartons;
/**
* Additional information about the incoming partons.
*/
PBPair thePartonBins;
/**
* Additional information about the origins of the incoming partons.
*/
PBPair theParticleBins;
/**
* Additional information about the incoming partons.
*/
PBIPair thePartonBinInstances;
/**
* The pair of incoming particle instances.
*/
PPair theLastParticles;
/**
* The pair of incoming parton instances.
*/
PPair theLastPartons;
/**
* The last generated total energy squared of the incoming particles.
*/
Energy2 theLastS;
/**
* The last generated total energy squared of the incoming prtons.
*/
Energy2 theLastSHat;
/**
* The last rapidity of the sub process, log(x1/x2)/2.
*/
double theLastY;
/**
* Log of one over the momentum fraction of the incoming particles.
*/
DPair theLastP1P2;
/**
* Log of one over the incoming partons momentum fraction wrt. the
* incoming particles.
*/
DPair theLastL1L2;
/**
* The incoming partons momentum fraction wrt. the incoming
* particles.
*/
DPair theLastX1X2;
/**
* 1-lastX1() and 1-lastX2() to highest possible precision for
* x\f$\rightarrow\f$ 1.
*/
DPair theLastE1E2;
/**
* The last chosen scale of the hard scattering.
*/
Energy2 theLastScale;
/**
* The \f$\alpha_S\f$ used in the hard scattering.
*/
double theLastAlphaS;
/**
* The \f$\alpha_{EM}\f$ used in the hard scattering.
*/
double theLastAlphaEM;
/**
* The maximum cm energy for this process.
*/
Energy theMaxEnergy;
/**
* Information saved by the matrix element in the calculation of the
* cross section to be used later when selecting diagrams and colour
* flow.
*/
DVector theMEInfo;
/**
* The SubProcess object corresponding to the last generated
* sub-process.
*/
SubProPtr theSub;
/**
* The meta information
*/
map<int,AnyReference> theMeta;
private:
/**
* Describe a concrete class with persistent data.
*/
static ClassDescription<XComb> initXComb;
/**
* Private and non-existent assignment operator.
*/
XComb & operator=(const XComb &);
};
/** @cond TRAITSPECIALIZATIONS */
/**
* This template specialization informs ThePEG about the base class of
* XComb.
*/
template <>
struct BaseClassTrait<XComb,1>: public ClassTraitsType {
/** Typedef of the base class of XComb. */
typedef Base NthBase;
};
/**
* This template specialization informs ThePEG about the name of the
* XComb class.
*/
template <>
struct ClassTraits<XComb>:
public ClassTraitsBase<XComb> {
/** Return the class name. */
static string className() { return "ThePEG::XComb"; }
};
/** @endcond */
}
#endif /* ThePEG_XComb_H */
|