Falaise  4.0.1
SuperNEMO Software Toolkit
event_display.h
Go to the documentation of this file.
1 // -*- mode: c++ ; -*-
2 /** \file falaise/TrackerPreClustering/event_display.h
3  * Author(s) : Francois Mauger <mauger@lpccaen.in2p3.fr>
4  * Creation date: 2012-03-30
5  * Last modified: 2014-02-07
6  *
7  * Copyright 2012-2014 F. Mauger
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 3 of the License, or (at
12  * your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful, but
15  * WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor,
22  * Boston, MA 02110-1301, USA.
23  *
24  * Description:
25  *
26  * Randomization of fake GG hits.
27  *
28  */
29 
30 #ifndef FALAISE_TRACKERPRECLUSTERING_EVENT_DISPLAY_H
31 #define FALAISE_TRACKERPRECLUSTERING_EVENT_DISPLAY_H 1
32 
33 // Standard library:
34 #include <iostream>
35 #include <vector>
36 
37 // This project:
39 
41 
42 /// \brief Toy display for Geiger hits in a simplified SuperNEMO like geometry
44  public:
45  /// \brief Mode
46  enum mode_type { prompt = 0x1, delayed = 0x2 };
47 
48  /// Set the dimension of the cell
49  void set_cell_size(double cell_size_);
50 
51  /// Set the number of layers
52  void set_nb_layers(unsigned int nb_layers_);
53 
54  /// Set the number of rows
55  void set_nb_rows(unsigned int nb_rows_);
56 
57  /// Default constructor
58  event_display();
59 
60  /// Display Geiger hits
61  template <typename Hit>
62  void display_gg_hits(std::ostream &out_, const std::vector<const Hit *> &hits_,
63  uint32_t mode_ = prompt | delayed) const;
64 
65  /// Display clusters of Geiger hits
66  template <class Hit>
67  void display_cluster(std::ostream &out_, const std::vector<const Hit *> &hits_,
68  uint32_t mode_ = prompt | delayed) const;
69 
70  /// Plot Geiger hit
71  void plot_gg_hit(std::ostream &out_, int id_, double r_, double er_, double x_, double y_,
72  double z_, double ez_, double delayed_time_) const;
73 
74  /// Plot clustered object
75  void plot_clustered_item(std::ostream &out_, int id_, double x_, double y_, double z_, double ez_,
76  double delayed_time_) const;
77 
78  /// Display event
79  void display_event();
80 
81  private:
82  unsigned int _nb_layers_; /// Number of layers
83  unsigned int _nb_rows_; /// Number of rows
84  double _cell_size_; /// Cell size
85 };
86 
87 } // end of namespace TrackerPreClustering
88 
89 #include "falaise/TrackerPreClustering/event_display.tpp"
90 
91 #endif // FALAISE_TRACKERPRECLUSTERING_EVENT_DISPLAY_H
92 
93 /*
94 ** Local Variables: --
95 ** mode: c++ --
96 ** c-file-style: "gnu" --
97 ** tab-width: 2 --
98 ** End: --
99 */
Toy display for Geiger hits in a simplified SuperNEMO like geometry.
Definition: event_display.h:43
void set_nb_rows(unsigned int nb_rows_)
Set the number of rows.
void plot_gg_hit(std::ostream &out_, int id_, double r_, double er_, double x_, double y_, double z_, double ez_, double delayed_time_) const
Plot Geiger hit.
void set_nb_layers(unsigned int nb_layers_)
Set the number of layers.
void set_cell_size(double cell_size_)
Set the dimension of the cell.
void display_gg_hits(std::ostream &out_, const std::vector< const Hit * > &hits_, uint32_t mode_=prompt|delayed) const
Display Geiger hits.
void plot_clustered_item(std::ostream &out_, int id_, double x_, double y_, double z_, double ez_, double delayed_time_) const
Plot clustered object.
void display_cluster(std::ostream &out_, const std::vector< const Hit * > &hits_, uint32_t mode_=prompt|delayed) const
Display clusters of Geiger hits.
Definition: event_display.h:46
mode_type
Mode.
Definition: event_display.h:46
event_display()
Default constructor.
void display_event()
Display event.
Definition: event_display.h:40
Definition: event_display.h:46