ProtoDUNEBeamSpill.cxx
Go to the documentation of this file.
1 ///////////////////////////////////////////////
2 //
3 // Class to store protoDUNE beam spill data
4 // extracted from IFBeam database
5 //
6 // Jake Calcutt (calcuttj@msu.edu) - July 2018
7 //
8 // ////////////////////////////////////////////
9 
10 
12 #include <algorithm>
13 #include <iterator>
14 
15 namespace beam
16 {
18  void ProtoDUNEBeamSpill::InitFBMs(std::vector<std::string> monitors){
19  nFBMs = monitors.size();
20  //std::cout << "Got " << nFBMs << " monitors and " << t0.size() << " good particles" << std::endl;
21  FBM dummyFBM;
22  /*
23  dummyFBM.ID = -1;
24  dummyFBM.fibers = {};
25  std::uninitialized_fill( std::begin(dummyFBM.fiberData), std::end(dummyFBM.fiberData), 0. );
26  std::uninitialized_fill( std::begin(dummyFBM.timeData), std::end(dummyFBM.timeData), 0. );
27  dummyFBM.timeStamp = 0.;
28  dummyFBM.decoded = false;
29  dummyFBM.active = std::vector<short>();
30  */
31 
32  std::vector<FBM> dummyVec;
33  for(size_t i = 0; i < t0.size(); ++i){
34  dummyVec.push_back(dummyFBM);
35  }
36  for(size_t i = 0; i < nFBMs; ++i){
37 // std::cout << "Initing " << monitors[i] << std::endl;
38  fiberMonitors[monitors[i]] = dummyVec;
39  }
40  }
42 }
code to link reconstructed objects back to the MC truth information
std::map< std::string, std::vector< FBM > > fiberMonitors
void InitFBMs(std::vector< std::string >)