/* This file is part of MAUS: http://micewww.pp.rl.ac.uk:8080/projects/maus
*
* MAUS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MAUS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MAUS. If not, see .
*
*/
/** @class MapCppTrackerVirtualsDigitization
* Digitize events by running Tracker electronics simulation.
*
*/
#ifndef _COMPONENTS_MAP_MAPCPPTRACKERVIRTUALSDIGITIZATION_H_
#define _COMPONENTS_MAP_MAPCPPTRACKERVIRTUALSDIGITIZATION_H_
// C headers
#include
#include
#include
// C++ headers
#include
#include
#include
#include "Config/MiceModule.hh"
#include "Interface/Squeak.hh"
#include "src/common_cpp/Recon/SciFi/SciFiGeometryHelper.hh"
#include "src/common_cpp/DataStructure/Data.hh"
#include "src/common_cpp/DataStructure/Hit.hh"
#include "src/common_cpp/DataStructure/MCEvent.hh"
#include "src/common_cpp/DataStructure/Spill.hh"
#include "src/common_cpp/DataStructure/ThreeVector.hh"
#include "src/common_cpp/Utils/CppErrorHandler.hh"
#include "src/common_cpp/Utils/Globals.hh"
#include "src/common_cpp/Globals/GlobalsManager.hh"
#include "src/common_cpp/JsonCppProcessors/SpillProcessor.hh"
#include "src/common_cpp/API/MapBase.hh"
#include "src/common_cpp/Recon/Kalman/MAUSSciFiMeasurements.hh"
namespace MAUS {
class MapCppTrackerVirtualsDigitization : public MapBase {
public:
/** Constructor - initialises pointers to NULL */
MapCppTrackerVirtualsDigitization();
/** Constructor - deletes any allocated memory */
~MapCppTrackerVirtualsDigitization();
private:
/** Sets up the worker
*
* \param argJsonConfigDocument a JSON document with
* the configuration.
*/
void _birth(const std::string& argJsonConfigDocument);
/** @brief Shutdowns the worker
*
* This takes no arguments and does nothing
*/
void _death();
/** @brief process MAUS Data object
*
* Receive a object with MC hits and return
* a object with digits
*/
void _process(MAUS::Data* data) const;
/** @brief builds digits
*/
void construct_digits(MAUS::VirtualHitArray* hits,
int spill_num,
int event_num,
MAUS::SciFiDigitPArray& digits) const;
/** @brief builds clusters
*/
void construct_clusters(MAUS::VirtualHitArray* hits,
int spill_num,
int event_num,
MAUS::SciFiClusterPArray& clusters) const;
/** @brief builds spacepoints
*/
void construct_spacepoints(MAUS::VirtualHitArray* hits,
int spill_num,
int event_num,
MAUS::SciFiSpacePointPArray& spoints) const;
/** @brief builds spacepoints
*/
void construct_perfect_spacepoints(int spill_num,
int event_num,
MAUS::SciFiSpacePointPArray& spoints) const;
/** @brief computes alpha from geomeery and virtual hit
*/
// int _compute_channel_number(VirtualHit* ahit, SciFiPlaneGeometry, int, int, int ) const;
double _compute_alpha(VirtualHit* vhit, SciFiPlaneGeometry& geom, int tracker_num ) const;
// Store Geometry Information
SciFiGeometryHelper _geometry_helper;
SciFiTrackerMap _geometry_map;
/// The ratio of deposited eV to NPE
double _default_npe;
/// Tolerance on assigning virtual planes to tracker planes
double _assignment_tolerance;
bool _make_digits;
bool _make_clusters;
bool _make_perfect_clusters;
bool _make_spacepoints;
bool _make_perfect_spacepoints;
int _spacepoint_plane_num;
SciFiHelicalMeasurements* _helix_measure;
};
} // ~namespace MAUS
#endif