~jan.greis/maus/analysis-code

« back to all changes in this revision

Viewing changes to src/map/MapCppTrackerPRSeed/MapCppTrackerPRSeed.hh

  • Committer: Adam Dobbs
  • Date: 2017-02-16 23:32:23 UTC
  • mfrom: (659.2.56 release-candidate)
  • Revision ID: phuccj@gmail.com-20170216233223-ivr1m1ln588kvi51
Tags: MAUS-v2.8, MAUS-v2.8.0
MAUS-v2.8.0

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 MapCppTrackerRecon 
 
19
 *  Digitize events by running Tracker electronics simulation.
 
20
 *
 
21
 */
 
22
 
 
23
#ifndef _SRC_MAP_MAPCPPTrackerPRSeed_H_
 
24
#define _SRC_MAP_MAPCPPTrackerPRSeed_H_
 
25
 
 
26
// C headers
 
27
#include <assert.h>
 
28
#include <json/json.h>
 
29
#include <CLHEP/Units/PhysicalConstants.h>
 
30
 
 
31
// C++ headers
 
32
#include <cmath>
 
33
#include <iostream>
 
34
#include <string>
 
35
#include <sstream>
 
36
#include <vector>
 
37
 
 
38
// Other headers
 
39
#include "Utils/Squeak.hh"
 
40
#include "Config/MiceModule.hh"
 
41
#include "src/common_cpp/Utils/CppErrorHandler.hh"
 
42
#include "src/common_cpp/Utils/JsonWrapper.hh"
 
43
 
 
44
#include "src/common_cpp/DataStructure/Spill.hh"
 
45
#include "src/common_cpp/DataStructure/SciFiEvent.hh"
 
46
#include "src/common_cpp/DataStructure/SciFiHelicalPRTrack.hh"
 
47
#include "src/common_cpp/DataStructure/SciFiStraightPRTrack.hh"
 
48
#include "src/common_cpp/Recon/SciFi/RealDataDigitization.hh"
 
49
#include "src/common_cpp/DataStructure/SciFiDigit.hh"
 
50
 
 
51
#include "src/common_cpp/API/MapBase.hh"
 
52
 
 
53
namespace MAUS {
 
54
 
 
55
class MapCppTrackerPRSeed : public MapBase<Data> {
 
56
 public:
 
57
  MapCppTrackerPRSeed();
 
58
 
 
59
  ~MapCppTrackerPRSeed();
 
60
 
 
61
 private:
 
62
  /** Sets up the worker
 
63
   *
 
64
   *  \param argJsonConfigDocument a JSON document with
 
65
   *         the configuration.
 
66
   */
 
67
  void _birth(const std::string& argJsonConfigDocument);
 
68
 
 
69
  /** Shutdowns the worker
 
70
   *
 
71
   *  This takes no arguments and does nothing
 
72
   */
 
73
  void _death();
 
74
 
 
75
  /** process MAUS spill object
 
76
   *
 
77
   *  Receive a document with MC hits and return
 
78
   *  a document with digits
 
79
   * \param document a MAUS data object for a MICE spill
 
80
   */
 
81
  void _process(Data* document) const;
 
82
 
 
83
 private:
 
84
 
 
85
  SciFiSeed* _make_helical_seed(SciFiHelicalPRTrack* h) const;
 
86
  SciFiSeed* _make_straight_seed(SciFiStraightPRTrack* s) const;
 
87
 
 
88
  /// This will contain the configuration
 
89
  Json::Value _configJSON;
 
90
  /// This will contain the root value after parsing
 
91
  Spill* _spill_cpp;
 
92
  ///  JsonCpp setup
 
93
  Json::Reader reader;
 
94
  ///  Cut value for npe.
 
95
};
 
96
#endif
 
97
 
 
98
} // ~namespace MAUS