Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 #ifndef OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_CENTROIDPEAK_H
00047 #define OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_CENTROIDPEAK_H
00048
00049 #include <OpenMS/CONCEPT/Types.h>
00050
00051 #include <ostream>
00052 #include <cmath>
00053 #include <vector>
00054
00055 namespace OpenMS
00056 {
00057
00058 class OPENMS_DLLAPI CentroidPeak
00059 {
00060 public:
00061
00062
00063
00064 CentroidPeak();
00065 CentroidPeak(double, double);
00066 CentroidPeak(double, double, double);
00067 CentroidPeak(const CentroidPeak &);
00068
00069 CentroidPeak(const CentroidPeak *);
00070
00071 CentroidPeak & operator=(const CentroidPeak &);
00072
00073 bool operator<(const CentroidPeak &);
00074
00075 virtual ~CentroidPeak();
00076
00077
00078 double getMass();
00079 double getIntensity();
00080 int getIsotopIdx();
00081 double getSignalToNoise();
00082 double getFittedIntensity();
00083 double getOrgIntensity();
00084 std::string getExtraPeakInfo();
00085 double getRetentionTime();
00086
00087 void setMass(double pMass);
00088 void setIntensity(double pIntensity);
00089 void setIsotopIdx(double pIsotopIdx);
00090 void setSignalToNoise(double in);
00091 void setFittedIntensity(double pFittedIntensity);
00092 void setOrgIntensity(double pOrgIntensity);
00093 void setExtraPeakInfo(std::string in);
00094 void setRetentionTime(double in);
00095
00096 void show_info();
00097 void subtractIntensity(double);
00098
00099 protected:
00100
00101 int isotopIdx_;
00102 double mass_;
00103 double intensity_;
00104 double fittedIntensity_;
00105 double orgIntensity_;
00106 double tr_;
00107 double signalToNoise_;
00108 std::string extraPeakInfo_;
00109 };
00110
00111
00112 class DeconvPeak :
00113 public CentroidPeak
00114 {
00115 public:
00116
00117 DeconvPeak();
00118 DeconvPeak(double, double, int, int, double, double);
00119 DeconvPeak(const DeconvPeak &);
00120 DeconvPeak(const DeconvPeak *);
00121
00122 DeconvPeak & operator=(const DeconvPeak &);
00123
00124 virtual ~DeconvPeak();
00125
00126
00127 void show_info();
00128
00129
00130 int getCharge();
00131 int getNrIsotopes();
00132 double getC13MassError();
00133 double getScore();
00134 std::vector<CentroidPeak> getIsotopicPeaks();
00135
00136 void setCharge(int pCharge);
00137 void setNrIsotopes(int pNrIsotopes);
00138 void setC13MassError(double pC13MassError);
00139 void setScore(double pScore);
00140 void setIsotopicPeaks(std::vector<CentroidPeak> pIsotopicPeaks);
00141
00142 protected:
00143
00144 int charge_;
00145 int nrIsotopes_;
00146 double c13MassError_;
00147 double score_;
00148 std::vector<CentroidPeak> isotopicPeaks_;
00149 };
00150
00151
00152 std::ostream & operator<<(std::ostream &, CentroidPeak &);
00153 std::ostream & operator<<(std::ostream &, DeconvPeak &);
00154
00155
00156
00157 inline double CentroidPeak::getMass()
00158 {
00159 return mass_;
00160 }
00161
00162 inline double CentroidPeak::getIntensity()
00163 {
00164 return intensity_;
00165 }
00166
00167 inline int CentroidPeak::getIsotopIdx()
00168 {
00169 return isotopIdx_;
00170 }
00171
00172 inline double CentroidPeak::getSignalToNoise()
00173 {
00174 return signalToNoise_;
00175 }
00176
00177 inline double CentroidPeak::getFittedIntensity()
00178 {
00179 return fittedIntensity_;
00180 }
00181
00182 inline double CentroidPeak::getOrgIntensity()
00183 {
00184 return orgIntensity_;
00185 }
00186
00187 inline std::string CentroidPeak::getExtraPeakInfo()
00188 {
00189 return extraPeakInfo_;
00190 }
00191
00192 inline double CentroidPeak::getRetentionTime()
00193 {
00194 return tr_;
00195 }
00196
00197 inline void CentroidPeak::setMass(double pMass)
00198 {
00199 mass_ = pMass;
00200 }
00201
00202 inline void CentroidPeak::setIntensity(double pIntensity)
00203 {
00204 intensity_ = pIntensity;
00205 }
00206
00207 inline void CentroidPeak::setIsotopIdx(double pIsotopIdx)
00208 {
00209 isotopIdx_ = (int) pIsotopIdx;
00210 }
00211
00212 inline void CentroidPeak::setSignalToNoise(double in)
00213 {
00214 signalToNoise_ = in;
00215 }
00216
00217 inline void CentroidPeak::setFittedIntensity(double pFittedIntensity)
00218 {
00219 fittedIntensity_ = pFittedIntensity;
00220 }
00221
00222 inline void CentroidPeak::setOrgIntensity(double pOrgIntensity)
00223 {
00224 orgIntensity_ = pOrgIntensity;
00225 }
00226
00227 inline void CentroidPeak::setExtraPeakInfo(std::string in)
00228 {
00229 extraPeakInfo_ = in;
00230 }
00231
00232 inline void CentroidPeak::setRetentionTime(double in)
00233 {
00234 tr_ = in;
00235 }
00236
00237
00238
00239 inline int DeconvPeak::getCharge()
00240 {
00241 return charge_;
00242 }
00243
00244 inline int DeconvPeak::getNrIsotopes()
00245 {
00246 return nrIsotopes_;
00247 }
00248
00249 inline double DeconvPeak::getC13MassError()
00250 {
00251 return c13MassError_;
00252 }
00253
00254 inline double DeconvPeak::getScore()
00255 {
00256 return score_;
00257 }
00258
00259 inline std::vector<CentroidPeak> DeconvPeak::getIsotopicPeaks()
00260 {
00261 return isotopicPeaks_;
00262 }
00263
00264 inline void DeconvPeak::setCharge(int pCharge)
00265 {
00266 charge_ = pCharge;
00267 }
00268
00269 inline void DeconvPeak::setC13MassError(double pC13MassError)
00270 {
00271 c13MassError_ = pC13MassError;
00272 }
00273
00274 inline void DeconvPeak::setNrIsotopes(int pNrIsotopes)
00275 {
00276 nrIsotopes_ = pNrIsotopes;
00277 }
00278
00279 inline void DeconvPeak::setScore(double pScore)
00280 {
00281 score_ = pScore;
00282 }
00283
00284 inline void DeconvPeak::setIsotopicPeaks(std::vector<CentroidPeak> pIsotopicPeaks)
00285 {
00286 isotopicPeaks_ = pIsotopicPeaks;
00287 }
00288
00289 }
00290
00291 #endif // OPENMS_TRANSFORMATIONS_FEATUREFINDER_SUPERHIRN_CENTROIDPEAK_H