~chris-rogers/maus/emr_mc_digitization

« back to all changes in this revision

Viewing changes to src/common_cpp/Recon/SciFi/SciFiLookup.hh

  • Committer: Chris Rogers
  • Date: 2014-04-16 11:48:45 UTC
  • mfrom: (707 merge)
  • mto: This revision was merged to the branch mainline in revision 711.
  • Revision ID: chris.rogers@stfc.ac.uk-20140416114845-h3u3q7pdcxkxvovs
Update to trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of MAUS: http://micewww.pp.rl.ac.uk:8080/projects/maus
 
2
 *
 
3
 * MAUS is free software: you can redistribute it and/or modify
 
4
 * it under the terms of the GNU General Public License as published by
 
5
 * the Free Software Foundation, either version 3 of the License, or
 
6
 * (at your option) any later version.
 
7
 *
 
8
 * MAUS is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with MAUS.  If not, see <http://www.gnu.org/licenses/>.
 
15
 *
 
16
 */
 
17
 
 
18
/** @class SciFiLookup
 
19
 * Class used to link between SciFiDigits and the MC hits used to make them
 
20
 */
 
21
 
 
22
#ifndef SCIFILOOKUP_HH
 
23
#define SCIFILOOKUP_HH
 
24
 
 
25
// C++ headers
 
26
#include <vector>
 
27
#include <map>
 
28
#include "stdint.h"
 
29
 
 
30
// MAUS headers
 
31
#include "src/common_cpp/DataStructure/MCEvent.hh"
 
32
#include "src/common_cpp/DataStructure/Hit.hh"
 
33
#include "src/common_cpp/DataStructure/SciFiNoiseHit.hh"
 
34
#include "src/common_cpp/DataStructure/SciFiDigit.hh"
 
35
 
 
36
namespace MAUS {
 
37
 
 
38
class SciFiLookup {
 
39
  public:
 
40
    /** @brief Default constructor */
 
41
    SciFiLookup();
 
42
 
 
43
    /** @brief Default destructor, does nothing */
 
44
    ~SciFiLookup();
 
45
 
 
46
    /** @brief Create the maps between digits and hits */
 
47
    bool make_hits_map(MCEvent* evt);
 
48
 
 
49
    /** @brief Create the maps between digits and noise hits */
 
50
    bool make_noise_map(MCEvent* evt);
 
51
 
 
52
    /** @brief Return a vector of SciFiHits used to make a SciFiDigit */
 
53
    bool get_hits(const SciFiDigit* dig, std::vector<SciFiHit*> &hits);
 
54
 
 
55
    /** @brief Return a vector of SciFiNoiseHits used to make a SciFiDigit */
 
56
    bool get_noise(const SciFiDigit* dig, std::vector<SciFiNoiseHit*> &noise);
 
57
 
 
58
    /** @brief Return a vector of SciFiNoiseHits used to make a SciFiDigit */
 
59
    uint64_t get_digit_id(const SciFiDigit* digit);
 
60
 
 
61
    /** @brief Return the digit to hits map */
 
62
    std::map<uint64_t, std::vector<SciFiHit*> > get_hits_map() { return _hits_map; }
 
63
 
 
64
    /** @brief Return the digit to noise hits map */
 
65
    std::map<uint64_t, std::vector<SciFiNoiseHit*> > get_noise_map() { return _noise_map; }
 
66
 
 
67
  private:
 
68
    std::map<uint64_t, std::vector<SciFiHit*> > _hits_map;
 
69
    std::map<uint64_t, std::vector<SciFiNoiseHit*> > _noise_map;
 
70
};
 
71
 
 
72
} // ~namespace MAUS
 
73
 
 
74
#endif