CoordinateTransformationTest_module.cc
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file CoordinateTransformationTest_module.cc
3 /// \brief unit tests for the CoordinateTransformation service
4 /// \author brebel@fnal.gov
5 ////////////////////////////////////////////////////////////////////////
6 // ROOT includes
7 #include "TH1D.h"
8 #include "TH2D.h"
9 #include "TVector3.h"
10 #include "TNtuple.h"
11 #include "TGeoManager.h"
12 
13 // NOvA includes
14 #include "NovaDAQConventions/DAQConventions.h"
15 
16 // Framework includes
24 #include "fhiclcpp/ParameterSet.h"
27 
28 #include <string>
29 #include <cmath>
30 #include <vector>
31 
32 namespace geo {
34  public:
37 
38  void analyze(art::Event const& evt);
39 
40  private:
41 
42  bool printCoordinateTransformations(uint32_t detector_id, uint32_t beam_type);
43  };
44 
45  //......................................................................
47  : EDAnalyzer(pset)
48  {
49  }
50 
51  //......................................................................
53  {
54  }
55 
56  //......................................................................
58  {
59 
60 
61  std::cout<<"Coordinate transformations\n";
62  uint32_t detector_id = novadaq::cnv::kNEARDET;
63  uint32_t beam_type = BEAMTYPE_NUMI;
64  std::cout<<"Beam type = BEAMTYPE_NUMI, Detector = NEAR:\n";
65  printCoordinateTransformations(detector_id,beam_type);
66 
67 
68  detector_id = novadaq::cnv::kFARDET;
69  std::cout<<"Beam type = BEAMTYPE_NUMI, Detector = FAR:\n";
70  printCoordinateTransformations(detector_id,beam_type);
71 
72  detector_id = novadaq::cnv::kNDOS;
73  std::cout<<"Beam type = BEAMTYPE_NUMI, Detector = NDOS:\n";
74  printCoordinateTransformations(detector_id,beam_type);
75 
76  return;
77  }
78 
80 
81  CoordinateTransformation coordinate_transformation(detector_id, beam_type);
82 
83  return coordinate_transformation.print();
84 
85  }
86 
88 
89 }//end namespace
beam_type
Definition: Constants.h:41
DEFINE_ART_MODULE(TestTMapFile)
Far Detector at Ash River, MN.
Prototype Near Detector on the surface at FNAL.
int evt
Near Detector in the NuMI cavern.
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:100
OStream cout
Definition: OStream.cxx:6
bool printCoordinateTransformations(uint32_t detector_id, uint32_t beam_type)
CoordinateTransformationTest(fhicl::ParameterSet const &pset)
Helper for AttenCurve.
Definition: Path.h:10