OpenMS  2.4.0
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-2018.
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 #pragma once
36 
37 #include <OpenMS/KERNEL/Peak1D.h>
40 
41 #include <set>
42 
43 namespace OpenMS
44 {
57  class OPENMS_DLLAPI Precursor :
58  public CVTermList,
59  public Peak1D
60  {
61 
62 public:
63 
66  {
67  CID,
68  PSD,
69  PD,
70  SID,
71  BIRD,
72  ECD,
73  IMD,
74  SORI,
75  HCID,
76  LCID,
77  PHD,
78  ETD,
79  PQD,
80  SIZE_OF_ACTIVATIONMETHOD
81  };
82 
84  static const std::string NamesOfActivationMethod[SIZE_OF_ACTIVATIONMETHOD];
85  static const std::string NamesOfActivationMethodShort[SIZE_OF_ACTIVATIONMETHOD];
86 
88  Precursor();
90  Precursor(const Precursor & source);
92  ~Precursor() override;
93 
95  Precursor & operator=(const Precursor & source);
96 
98  bool operator==(const Precursor & rhs) const;
100  bool operator!=(const Precursor & rhs) const;
101 
103  const std::set<ActivationMethod> & getActivationMethods() const;
105  std::set<ActivationMethod> & getActivationMethods();
107  void setActivationMethods(const std::set<ActivationMethod> & activation_methods);
108 
110  double getActivationEnergy() const;
112  void setActivationEnergy(double activation_energy);
113 
124  double getIsolationWindowLowerOffset() const;
126  void setIsolationWindowLowerOffset(double bound);
127 
138  double getIsolationWindowUpperOffset() const;
140  void setIsolationWindowUpperOffset(double bound);
141 
149  double getDriftTime() const;
151  void setDriftTime(double drift_time);
152 
163  double getDriftTimeWindowLowerOffset() const;
165  void setDriftTimeWindowLowerOffset(double drift_time);
166 
177  double getDriftTimeWindowUpperOffset() const;
179  void setDriftTimeWindowUpperOffset(double drift_time);
180 
182  Int getCharge() const;
184  void setCharge(Int charge);
185 
187  std::vector<Int> & getPossibleChargeStates();
189  const std::vector<Int> & getPossibleChargeStates() const;
191  void setPossibleChargeStates(const std::vector<Int> & possible_charge_states);
192 
194  inline double getUnchargedMass() const
195  {
196  int c = charge_;
197  (c == 0) ? c = 2 : c = charge_;
198  return getMZ() * c - c * Constants::PROTON_MASS_U;
199  }
200 
201 protected:
202 
203  std::set<ActivationMethod> activation_methods_;
205  double window_low_;
206  double window_up_;
207  double drift_time_;
211  std::vector<Int> possible_charge_states_;
212  };
213 } // namespace OpenMS
214 
Plasma desorption.
Definition: Precursor.h:69
Precursor meta information.
Definition: Precursor.h:57
double activation_energy_
Definition: Precursor.h:204
Representation of controlled vocabulary term list.
Definition: CVTermList.h:52
std::vector< Int > possible_charge_states_
Definition: Precursor.h:211
High-energy collision-induced dissociation.
Definition: Precursor.h:75
double drift_window_up_
Definition: Precursor.h:209
bool operator==(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:806
double drift_time_
Definition: Precursor.h:207
const double c
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
Surface-induced dissociation.
Definition: Precursor.h:70
Blackbody infrared radiative dissociation.
Definition: Precursor.h:71
const double PROTON_MASS_U
Electron transfer dissociation.
Definition: Precursor.h:78
Collision-induced dissociation.
Definition: Precursor.h:67
Pulsed q dissociation.
Definition: Precursor.h:79
double drift_window_low_
Definition: Precursor.h:208
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:194
A 1-dimensional raw data point or peak.
Definition: Peak1D.h:54
Photodissociation.
Definition: Precursor.h:77
Low-energy collision-induced dissociation.
Definition: Precursor.h:76
Infrared multiphoton dissociation.
Definition: Precursor.h:73
bool operator!=(_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &)
Definition: KDTree.h:824
Int charge_
Definition: Precursor.h:210
Post-source decay.
Definition: Precursor.h:68
double window_low_
Definition: Precursor.h:205
ActivationMethod
Method of activation.
Definition: Precursor.h:65
Sustained off-resonance irradiation.
Definition: Precursor.h:74
double window_up_
Definition: Precursor.h:206
int Int
Signed integer type.
Definition: Types.h:102
std::set< ActivationMethod > activation_methods_
Definition: Precursor.h:203
Electron capture dissociation.
Definition: Precursor.h:72