Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Precursor.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2017.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Mathias Walzer $
32 // $Authors: Marc Sturm, Mathias Walzer $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_METADATA_PRECURSOR_H
36 #define OPENMS_METADATA_PRECURSOR_H
37 
38 #include <OpenMS/KERNEL/Peak1D.h>
41 
42 #include <set>
43 
44 namespace OpenMS
45 {
58  class OPENMS_DLLAPI Precursor :
59  public CVTermList,
60  public Peak1D
61  {
62 
63 public:
64 
67  {
68  CID,
69  PSD,
70  PD,
71  SID,
72  BIRD,
73  ECD,
74  IMD,
75  SORI,
76  HCID,
77  LCID,
78  PHD,
79  ETD,
80  PQD,
81  SIZE_OF_ACTIVATIONMETHOD
82  };
83 
85  static const std::string NamesOfActivationMethod[SIZE_OF_ACTIVATIONMETHOD];
86  static const std::string NamesOfActivationMethodShort[SIZE_OF_ACTIVATIONMETHOD];
87 
89  Precursor();
91  Precursor(const Precursor & source);
93  virtual ~Precursor();
94 
96  Precursor & operator=(const Precursor & source);
97 
99  bool operator==(const Precursor & rhs) const;
101  bool operator!=(const Precursor & rhs) const;
102 
104  const std::set<ActivationMethod> & getActivationMethods() const;
106  std::set<ActivationMethod> & getActivationMethods();
108  void setActivationMethods(const std::set<ActivationMethod> & activation_methods);
109 
111  double getActivationEnergy() const;
113  void setActivationEnergy(double activation_energy);
114 
124  double getIsolationWindowLowerOffset() const;
126  void setIsolationWindowLowerOffset(double bound);
127 
137  double getIsolationWindowUpperOffset() const;
139  void setIsolationWindowUpperOffset(double bound);
140 
148  double getDriftTime() const;
150  void setDriftTime(double drift_time);
151 
153  Int getCharge() const;
155  void setCharge(Int charge);
156 
158  std::vector<Int> & getPossibleChargeStates();
160  const std::vector<Int> & getPossibleChargeStates() const;
162  void setPossibleChargeStates(const std::vector<Int> & possible_charge_states);
163 
165  inline double getUnchargedMass() const
166  {
167  int c = charge_;
168  (c == 0) ? c = 2 : c = charge_;
169  return getMZ() * c - c * Constants::PROTON_MASS_U;
170  }
171 
172 protected:
173 
174  std::set<ActivationMethod> activation_methods_;
176  double window_low_;
177  double window_up_;
178  double drift_time_;
180  std::vector<Int> possible_charge_states_;
181  };
182 } // namespace OpenMS
183 
184 #endif // OPENMS_METADATA_PRECURSOR_H
Plasma desorption.
Definition: Precursor.h:70
Precursor meta information.
Definition: Precursor.h:58
double activation_energy_
Definition: Precursor.h:175
Representation of controlled vocabulary term list.
Definition: CVTermList.h:53
std::vector< Int > possible_charge_states_
Definition: Precursor.h:180
High-energy collision-induced dissociation.
Definition: Precursor.h:76
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
double drift_time_
Definition: Precursor.h:178
const double c
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Surface-induced dissociation.
Definition: Precursor.h:71
Blackbody infrared radiative dissociation.
Definition: Precursor.h:72
const double PROTON_MASS_U
Electron transfer dissociation.
Definition: Precursor.h:79
Collision-induced dissociation.
Definition: Precursor.h:68
Pulsed q dissociation.
Definition: Precursor.h:80
double getUnchargedMass() const
Returns the uncharged mass of the precursor, if charge is unknown, i.e. 0 best guess is its doubly ch...
Definition: Precursor.h:165
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:55
Photodissociation.
Definition: Precursor.h:78
Low-energy collision-induced dissociation.
Definition: Precursor.h:77
Infrared multiphoton dissociation.
Definition: Precursor.h:74
bool operator!=(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:824
Int charge_
Definition: Precursor.h:179
Post-source decay.
Definition: Precursor.h:69
double window_low_
Definition: Precursor.h:176
ActivationMethod
Method of activation.
Definition: Precursor.h:66
Sustained off-resonance irradiation.
Definition: Precursor.h:75
double window_up_
Definition: Precursor.h:177
int Int
Signed integer type.
Definition: Types.h:103
std::set< ActivationMethod > activation_methods_
Definition: Precursor.h:174
Electron capture dissociation.
Definition: Precursor.h:73

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:22:03 using doxygen 1.8.13