00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 inline void MyParticle::init(const TLorentzVector tlv,
00016 Int_t matchingflag,
00017 double charge,
00018 int index,
00019 std::string type,
00020 int vertex_index
00021 ) {
00022 m_tlv = tlv;
00023 m_matchingflag = matchingflag;
00024 m_charge = charge;
00025 m_index = index;
00026 m_type = type;
00027 m_vertex_index = vertex_index;
00028 return;
00029
00030 }
00031
00032
00033
00034
00035
00036
00037
00038 inline TLorentzVector MyParticle::tlv(void) const {
00039
00040 return m_tlv;
00041
00042 }
00043
00044
00045
00046
00047
00048
00049
00050 inline void MyParticle::set_tlv(const TLorentzVector & p) {
00051
00052 m_tlv = p;
00053 return;
00054
00055 }
00056
00057
00058
00059
00060
00061
00062
00063 inline Int_t MyParticle::matchingflag(void) const {
00064
00065 return m_matchingflag;
00066
00067 }
00068
00069
00070
00071
00072
00073
00074
00075 inline double MyParticle::charge(void) const {
00076
00077 return m_charge;
00078
00079 }
00080
00081
00082
00083
00084
00085
00086
00087 inline std::string MyParticle::type(void) const {
00088
00089 return m_type;
00090
00091 }
00092
00093
00094
00095
00096
00097
00098
00099 inline int MyParticle::index(void) const {
00100
00101 return m_index;
00102
00103 }
00104
00105
00106
00107
00108
00109
00110
00111 inline int MyParticle::pdgId(void) const {
00112
00113 return m_pdgId;
00114
00115 }
00116
00117
00118
00119
00120
00121
00122
00123 inline int MyParticle::vertexIndex(void) const {
00124
00125 return m_vertex_index;
00126
00127 }
00128
00129
00130
00131
00132
00133
00134 inline void MyParticle::setVertexIndex(const int & vertex_index) {
00135
00136 m_vertex_index = vertex_index;
00137 return;
00138
00139 }
00140
00141
00142
00143
00144
00145
00146
00147 inline void MyParticle::set_matchingflag(const Int_t & flag) {
00148
00149 m_matchingflag = flag;
00150 return;
00151
00152 }
00153
00154
00155
00156
00157
00158
00159
00160 inline void MyParticle::Print(std::string option) {
00161
00162 std::cout << " - Type (Index, PdgId, Charge): "
00163 << Form(TString(this->type()) + " (%i, %i, %.0f)",
00164 this->index(), this->pdgId(), this->charge() ) << std::endl
00165 << " Pt, Eta, Phi, E, M: "
00166 << Form("%.2f, %.2f, %.2f, %.2f, %.2f",
00167 this->tlv().Pt(),
00168 this->tlv().Eta(),
00169 this->tlv().Phi(),
00170 this->tlv().E(),
00171 this->tlv().M())
00172 << std::endl;
00173
00174 this->PrintParticle(option);
00175
00176 if(option=="v"){
00177 std::cout << " Px, Py, Pz: "
00178 << Form("%.2f, %.2f, %.2f",
00179 this->tlv().Px(),
00180 this->tlv().Py(),
00181 this->tlv().Pz())
00182 << std::endl;
00183 std::cout << " matching flag: "
00184 << this->matchingflag() << std::endl;
00185 std::cout << " vertex index: "
00186 << this->vertexIndex() << std::endl;
00187 }
00188
00189 return;
00190
00191 }
00192
00193
00194
00195
00196
00197
00198
00199 inline void MyParticle::PrintParticle(std::string option) {
00200
00201 return;
00202 }