|
|
|||
File indexing completed on 2026-08-06 09:38:21
0001 // -*- C++ -*- 0002 // 0003 // StandardSelectors.h is a part of ThePEG - Toolkit for HEP Event Generation 0004 // Copyright (C) 1999-2019 Leif Lonnblad 0005 // 0006 // ThePEG is licenced under version 3 of the GPL, see COPYING for details. 0007 // Please respect the MCnet academic guidelines, see GUIDELINES for details. 0008 // 0009 #ifndef ThePEG_StandardSelectors_H 0010 #define ThePEG_StandardSelectors_H 0011 0012 /** 0013 * @file StandardSelectors.h This file contains declarations of 0014 * standard selector classes. The classes contain only static 0015 * functions and are assumed to be used as template arguments to the 0016 * ParticleSelector class. 0017 */ 0018 0019 #include "SelectorBase.h" 0020 #include "ParticleTraits.h" 0021 0022 namespace ThePEG { 0023 0024 /** 0025 * The AllSelector class is used to extract all particles from an event. 0026 * 0027 * @see SelectorBase 0028 * @see ParticleSelector 0029 */ 0030 struct AllSelector: public SelectorBase { 0031 0032 /** 0033 * Static method corresponding to the virtual check() 0034 * method. Returns true. 0035 */ 0036 static bool Check(const Particle &) { return true; } 0037 0038 /** 0039 * Static method corresponding to the virtual intermediate() 0040 * method. Returns true. 0041 */ 0042 static bool Intermediate() { return true; } 0043 0044 /** 0045 * Static method corresponding to the virtual finalState() 0046 * method. Returns true. 0047 */ 0048 static bool FinalState() { return true; } 0049 0050 /** 0051 * Static method corresponding to the virtual allSteps() 0052 * method. Returns true. 0053 */ 0054 static bool AllSteps() { return true; } 0055 0056 /** 0057 * Static method corresponding to the virtual allCollisions() 0058 * method. Returns true. 0059 */ 0060 static bool AllCollisions() { return true; } 0061 0062 }; 0063 0064 /** Typedef to declare a selector used to extract all particles from an 0065 * event. */ 0066 typedef ParticleSelector<AllSelector> SelectAll; 0067 0068 0069 /** 0070 * The FinalStateSelector class is used to extract all final state particles 0071 * from an event. 0072 * 0073 * @see SelectorBase 0074 * @see ParticleSelector 0075 */ 0076 struct FinalStateSelector: public SelectorBase { 0077 0078 /** 0079 * Static method corresponding to the virtual intermediate() 0080 * method. Returns false. 0081 */ 0082 static bool Intermediate() { return false; } 0083 0084 /** 0085 * Static method corresponding to the virtual allSteps() 0086 * method. Returns false. 0087 */ 0088 static bool AllSteps() { return false; } 0089 0090 }; 0091 0092 /** Typedef to declare a selector used to extract all final state 0093 * particles from an event. */ 0094 typedef ParticleSelector<FinalStateSelector> SelectFinalState; 0095 0096 /** 0097 * The IntermediateSelector class is used to extract only intermediate 0098 * particles from an event. 0099 * 0100 * @see SelectorBase 0101 * @see ParticleSelector 0102 */ 0103 struct IntermediateSelector: public SelectorBase { 0104 0105 /** 0106 * Static method corresponding to the virtual check() 0107 * method. Returns true. 0108 */ 0109 static bool Check(const Particle &) { return true; } 0110 0111 /** 0112 * Static method corresponding to the virtual intermediate() 0113 * method. Returns true. 0114 */ 0115 static bool Intermediate() { return true; } 0116 0117 /** 0118 * Static method corresponding to the virtual finalState() 0119 * method. Returns false. 0120 */ 0121 static bool FinalState() { return false; } 0122 0123 /** 0124 * Static method corresponding to the virtual allSteps() 0125 * method. Returns true. 0126 */ 0127 static bool AllSteps() { return true; } 0128 0129 /** 0130 * Static method corresponding to the virtual allCollisions() 0131 * method. Returns true. 0132 */ 0133 static bool AllCollisions() { return true; } 0134 0135 }; 0136 0137 /** Typedef to declare a selector used to extract all intermediate 0138 * particles from an event. */ 0139 typedef ParticleSelector<IntermediateSelector> SelectIntermediates; 0140 0141 /** 0142 * The PrimaryCollisionSelector class is used to extract all particles 0143 * from the primary Collision of an event. 0144 * 0145 * @see SelectorBase 0146 * @see ParticleSelector 0147 */ 0148 struct PrimaryCollisionSelector: public SelectorBase { 0149 0150 /** 0151 * Static method corresponding to the virtual check() 0152 * method. Returns true. 0153 */ 0154 static bool Check(const Particle &) { return true; } 0155 0156 /** 0157 * Static method corresponding to the virtual intermediate() 0158 * method. Returns true. 0159 */ 0160 static bool Intermediate() { return true; } 0161 0162 /** 0163 * Static method corresponding to the virtual finalState() 0164 * method. Returns true. 0165 */ 0166 static bool FinalState() { return true; } 0167 0168 /** 0169 * Static method corresponding to the virtual allSteps() 0170 * method. Returns true. 0171 */ 0172 static bool AllSteps() { return true; } 0173 0174 /** 0175 * Static method corresponding to the virtual allCollisions() 0176 * method. Returns false. 0177 */ 0178 static bool AllCollisions() { return false; } 0179 0180 }; 0181 0182 /** Typedef to declare a selector used to extract all particles from 0183 * the primary Collision of an event. */ 0184 typedef ParticleSelector<PrimaryCollisionSelector> SelectPrimaryCollision; 0185 0186 /** 0187 * The ChargedSelector class is used to extract all charged particles 0188 * from an event. 0189 * 0190 * @see SelectorBase 0191 * @see ParticleSelector 0192 */ 0193 struct ChargedSelector: public SelectorBase { 0194 0195 /** 0196 * Static method corresponding to the virtual check() 0197 * method. Returns true if the given particle is charged.. 0198 */ 0199 static bool Check(const Particle & p) { 0200 return ParticleTraits<Particle>::iCharge(p); 0201 } 0202 0203 }; 0204 0205 /** Typedef to declare a selector used to extract all charged 0206 * particles from an event. */ 0207 typedef ParticleSelector<ChargedSelector> SelectCharged; 0208 0209 } 0210 0211 #endif /* ThePEG_StandardSelectors_H */
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|