00001 // -*- C++ -*- 00002 // 00003 // StandardSelectors.h is a part of ThePEG - Toolkit for HEP Event Generation 00004 // Copyright (C) 1999-2007 Leif Lonnblad 00005 // 00006 // ThePEG is licenced under version 2 of the GPL, see COPYING for details. 00007 // Please respect the MCnet academic guidelines, see GUIDELINES for details. 00008 // 00009 #ifndef ThePEG_StandardSelectors_H 00010 #define ThePEG_StandardSelectors_H 00011 00019 #include "SelectorBase.h" 00020 #include "ParticleTraits.h" 00021 00022 namespace ThePEG { 00023 00030 struct AllSelector: public SelectorBase { 00031 00036 static bool Check(const Particle &) { return true; } 00037 00042 static bool Intermediate() { return true; } 00043 00048 static bool FinalState() { return true; } 00049 00054 static bool AllSteps() { return true; } 00055 00060 static bool AllCollisions() { return true; } 00061 00062 }; 00063 00066 typedef ParticleSelector<AllSelector> SelectAll; 00067 00068 00076 struct FinalStateSelector: public SelectorBase { 00077 00082 static bool Intermediate() { return false; } 00083 00088 static bool AllSteps() { return false; } 00089 00090 }; 00091 00094 typedef ParticleSelector<FinalStateSelector> SelectFinalState; 00095 00103 struct IntermediateSelector: public SelectorBase { 00104 00109 static bool Check(const Particle &) { return true; } 00110 00115 static bool Intermediate() { return true; } 00116 00121 static bool FinalState() { return false; } 00122 00127 static bool AllSteps() { return true; } 00128 00133 static bool AllCollisions() { return true; } 00134 00135 }; 00136 00139 typedef ParticleSelector<IntermediateSelector> SelectIntermediates; 00140 00148 struct PrimaryCollisionSelector: public SelectorBase { 00149 00154 static bool Check(const Particle &) { return true; } 00155 00160 static bool Intermediate() { return true; } 00161 00166 static bool FinalState() { return true; } 00167 00172 static bool AllSteps() { return true; } 00173 00178 static bool AllCollisions() { return false; } 00179 00180 }; 00181 00184 typedef ParticleSelector<PrimaryCollisionSelector> SelectPrimaryCollision; 00185 00193 struct ChargedSelector: public SelectorBase { 00194 00199 static bool Check(const Particle & p) { 00200 return ParticleTraits<Particle>::iCharge(p); 00201 } 00202 00203 }; 00204 00207 typedef ParticleSelector<ChargedSelector> SelectCharged; 00208 00209 } 00210 00211 #endif /* ThePEG_StandardSelectors_H */