PhotosParticle.h
00001 #ifndef _PhotosParticle_h_included_
00002 #define _PhotosParticle_h_included_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include <vector>
00020 #include "Photos.h"
00021
00022 namespace Photospp
00023 {
00024
00025 class PhotosParticle
00026 {
00027 public:
00028
00029 static const int STABLE=1;
00030
00031
00032 static const int DECAYED=2;
00033
00034
00035 static const int HISTORY=3;
00036
00037
00038 static const int X_AXIS=1;
00039
00040
00041 static const int Y_AXIS=2;
00042
00043
00044 static const int Z_AXIS=3;
00045
00046
00047 static const int Z0 = 23;
00048
00049
00050 static const int HIGGS = 25;
00051
00052
00053 static const int HIGGS_H = 35;
00054
00055
00056 static const int HIGGS_A = 36;
00057
00058
00059 static const int HIGGS_PLUS = 37;
00060
00061
00062 static const int HIGGS_MINUS = -37;
00063
00064
00065 static const int W_PLUS = 24;
00066
00067
00068 static const int W_MINUS = -24;
00069
00070
00071 static const int GAMMA = 22;
00072
00073
00074 static const int TAU_PLUS = -15;
00075
00076
00077 static const int TAU_MINUS = 15;
00078
00079
00080 static const int TAU_NEUTRINO = 16;
00081
00082
00083 static const int TAU_ANTINEUTRINO = -16;
00084
00085
00086 static const int MUON_PLUS = -13;
00087
00088
00089 static const int MUON_MINUS = 13;
00090
00091
00092 static const int MUON_NEUTRINO = 14;
00093
00094
00095 static const int MUON_ANTINEUTRINO = -14;
00096
00097
00098 static const int POSITRON = -11;
00099
00100
00101 static const int ELECTRON = 11;
00102
00103
00104 static const int ELECTRON_NEUTRINO = 12;
00105
00106
00107 static const int ELECTRON_ANTINEUTRINO = -12;
00108
00109
00110 static const int UP = 2;
00111
00112
00113 static const int ANTIUP = -2;
00114
00115
00116 static const int DOWN = 1;
00117
00118
00119 static const int ANTIDOWN = -1;
00120
00121
00122 static const int OTHER = 0;
00123
00124 public:
00125 virtual ~PhotosParticle(){};
00126
00127
00128 bool hasDaughters();
00129
00130
00131
00132
00133 PhotosParticle * findLastSelf();
00134
00135
00136
00137 std::vector<PhotosParticle *> findProductionMothers();
00138
00139
00140 std::vector<PhotosParticle *> getDecayTree();
00141
00142
00143
00144 void boostToRestFrame(PhotosParticle * boost);
00145
00146
00147
00148 void boostDaughtersToRestFrame(PhotosParticle * boost);
00149
00150
00151
00152 void boostFromRestFrame(PhotosParticle * boost);
00153
00154
00155
00156 void boostDaughtersFromRestFrame(PhotosParticle * boost);
00157
00158
00159 void boostAlongZ(double pz, double e);
00160
00161
00162
00163 void rotate(int axis, double phi, int second_axis=Z_AXIS);
00164
00165
00166
00167 void rotateDaughters(int axis, double phi, int second_axis=Z_AXIS);
00168
00169
00170
00171
00172
00173
00174 double getRotationAngle(int axis, int second_axis=Z_AXIS);
00175
00176
00177 double getP();
00178
00179
00180 double getP(int axis);
00181
00182
00183 void setP(int axis, double p_component);
00184
00185
00186 virtual double getVirtuality();
00187
00188 public:
00189
00190
00191 virtual bool checkMomentumConservation()=0;
00192
00193
00194 virtual double getPx()=0;
00195
00196
00197 virtual double getPy()=0;
00198
00199
00200 virtual double getPz()=0;
00201
00202
00203 virtual double getE()=0;
00204
00205
00206 virtual double getMass() = 0;
00207
00208
00209 virtual void setPx( double px )=0;
00210
00211
00212 virtual void setPy( double py )=0;
00213
00214
00215 virtual void setPz( double pz )=0;
00216
00217
00218 virtual void setE( double e )=0;
00219
00220
00221 virtual void setMothers(std::vector<PhotosParticle*> mothers)=0;
00222
00223
00224 virtual void setDaughters(std::vector<PhotosParticle*> daughters)=0;
00225
00226
00227 virtual void addDaughter(PhotosParticle* daughter)=0;
00228
00229
00230 virtual std::vector<PhotosParticle*> getMothers()=0;
00231
00232
00233 virtual std::vector<PhotosParticle*> getDaughters()=0;
00234
00235
00236
00237 virtual std::vector<PhotosParticle*> getAllDecayProducts()=0;
00238
00239
00240 virtual void setPdgID(int pdg_id)=0;
00241
00242
00243 virtual void setMass(double mass)=0;
00244
00245
00246 virtual void setStatus(int status)=0;
00247
00248
00249 virtual int getPdgID()=0;
00250
00251
00252 virtual int getStatus()=0;
00253
00254
00255 virtual int getBarcode()=0;
00256
00257
00258
00259
00260
00261
00262
00263
00264 virtual PhotosParticle * createNewParticle(int pdg_id, int status,
00265 double mass, double px,
00266 double py, double pz,
00267 double e)=0;
00268
00269
00270
00271
00272 virtual void createHistoryEntry()=0;
00273
00274
00275
00276 virtual void createSelfDecayVertex(PhotosParticle *out)=0;
00277
00278
00279 virtual void print()=0;
00280 };
00281
00282 }
00283 #endif