libpappsomspp
Library for mass spectrometry
Loading...
Searching...
No Matches
precursor.h
Go to the documentation of this file.
1/**
2 * \file pappsomspp/masschroq/precursor.h
3 * \date 04/11/2024
4 * \author Olivier Langella
5 * \brief MS1 precursor information
6 */
7
8/*******************************************************************************
9 * Copyright (c) 2024 Olivier Langella
10 *<Olivier.Langella@universite-paris-saclay.fr>.
11 *
12 * This file is part of MassChroQ.
13 *
14 * MassChroQ is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation, either version 3 of the License, or
17 * (at your option) any later version.
18 *
19 * MassChroQ is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with MassChroQ. If not, see <http://www.gnu.org/licenses/>.
26 *
27 ******************************************************************************/
28
29#pragma once
30
31#include <memory>
33
34namespace pappso::masschroq
35{
36
37class Precursor;
38
39typedef std::shared_ptr<Precursor> PrecursorSp;
40
41/**
42 * \class Precursor
43 * \brief A Precursor object represents the parent/precursor of the MS level 2
44 * scan with number _scan_num in the mzxml file.
45
46 * In mzxml files, MS scans of level 2 have each a precursor object
47 * representing their MS level 1 parent/precursor. A Precursor object has :
48 * - a spectrum index
49 * - a retention time value
50 * - an intensity value
51 * - an mz value
52 * - Xic coordinates
53 */
54
56{
57 public:
58 /**
59 * Default constructor
60 */
61 Precursor(std::size_t spectrum_index,
62 double mz,
63 double intensity,
64 pappso::XicCoordSPtr xic_coord);
65
66 /**
67 * Destructor
68 */
69 virtual ~Precursor();
70 double getIntensity() const;
71
72 std::size_t getSpectrumIndex() const;
73
75
76 private:
77 ///< MS level 2 scan number whome this Precursor is parent
78 std::size_t m_spectrumIndex;
79 /// intensity of this precursor
81 /// selected m/z of this precursor
82 double m_mz;
83 /// Xic coordinates
85};
86} // namespace pappso::masschroq
A Precursor object represents the parent/precursor of the MS level 2 scan with number _scan_num in th...
Definition precursor.h:56
pappso::XicCoordSPtr msp_xicCoord
Xic coordinates.
Definition precursor.h:84
std::size_t getSpectrumIndex() const
Definition precursor.cpp:66
double m_mz
selected m/z of this precursor
Definition precursor.h:82
const pappso::XicCoordSPtr & getXicCoordSPtr() const
Definition precursor.cpp:72
Precursor(std::size_t spectrum_index, double mz, double intensity, pappso::XicCoordSPtr xic_coord)
Definition precursor.cpp:33
double m_intensity
intensity of this precursor
Definition precursor.h:80
std::size_t m_spectrumIndex
< MS level 2 scan number whome this Precursor is parent
Definition precursor.h:78
std::shared_ptr< Precursor > PrecursorSp
Definition precursor.h:39
std::shared_ptr< XicCoord > XicCoordSPtr
Definition xiccoord.h:44