PhotosHEPEVTParticle.h
00001 #ifndef _PhotosHEPEVTParticle_h_included_
00002 #define _PhotosHEPEVTParticle_h_included_
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include <iostream>
00019 #include <vector>
00020 #include <cmath>
00021 #include <cstdio>
00022
00023 #include "Photos.h"
00024 #include "PhotosParticle.h"
00025 #include "PhotosHEPEVTEvent.h"
00026
00027 namespace Photospp
00028 {
00029
00030 class PhotosHEPEVTEvent;
00031
00032 class PhotosHEPEVTParticle: public PhotosParticle {
00033
00034 public:
00035
00036 ~PhotosHEPEVTParticle();
00037
00038
00039 PhotosHEPEVTParticle(int pdgid, int status, double px, double py, double pz, double e, double m, int ms, int me, int ds, int de);
00040
00041
00042 void addDaughter(PhotosParticle* daughter);
00043
00044
00045 void setMothers(std::vector<PhotosParticle*> mothers);
00046
00047
00048 void setDaughters(std::vector<PhotosParticle*> daughters);
00049
00050
00051 std::vector<PhotosParticle*> getMothers();
00052
00053
00054 std::vector<PhotosParticle*> getDaughters();
00055
00056
00057
00058 std::vector<PhotosParticle*> getAllDecayProducts();
00059
00060
00061 bool checkMomentumConservation();
00062
00063
00064
00065
00066
00067
00068
00069
00070 PhotosHEPEVTParticle * createNewParticle(int pdg_id, int status, double mass,
00071 double px, double py,
00072 double pz, double e);
00073
00074
00075 void createHistoryEntry();
00076
00077
00078
00079 void createSelfDecayVertex(PhotosParticle *out);
00080
00081
00082 bool isDaughterOf(PhotosHEPEVTParticle *p);
00083
00084
00085 bool isMotherOf (PhotosHEPEVTParticle *p);
00086
00087
00088 void print();
00089
00090
00091 void setPdgID(int pdg_id);
00092
00093
00094 void setStatus(int statu);
00095
00096
00097 void setMass(double mass);
00098
00099
00100 int getPdgID();
00101
00102
00103 int getStatus();
00104
00105
00106 double getMass();
00107
00108
00109 double getPx();
00110
00111
00112 double getPy();
00113
00114
00115 double getPz();
00116
00117
00118 double getE();
00119
00120
00121 void setPx( double px );
00122
00123
00124 void setPy( double py );
00125
00126
00127 void setPz( double pz );
00128
00129
00130 void setE( double e );
00131
00132
00133 int getBarcode();
00134
00135
00136 void setBarcode(int barcode);
00137
00138
00139 void setEvent(PhotosHEPEVTEvent *event);
00140
00141
00142 int getFirstMotherIndex();
00143
00144
00145 int getSecondMotherIndex();
00146
00147
00148 int getDaughterRangeStart();
00149
00150
00151 int getDaughterRangeEnd();
00152
00153 private:
00154
00155
00156 void setDaughterRangeStart(int i) { m_daughter_start=i; }
00157
00158
00159 void setDaughterRangeEnd(int i) { m_daughter_end =i; }
00160
00161
00162 PhotosHEPEVTEvent *m_event;
00163
00164
00165 int m_barcode;
00166
00167
00168 int m_first_mother, m_second_mother;
00169
00170
00171 int m_daughter_start, m_daughter_end;
00172
00173
00174 int m_pdgid;
00175
00176
00177 int m_status;
00178
00179
00180 double m_px, m_py, m_pz, m_e;
00181
00182
00183 double m_generated_mass;
00184
00185
00186
00187 vector<PhotosHEPEVTParticle*> cache;
00188 };
00189
00190 }
00191 #endif
00192