Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:29:26

0001 #ifndef SimG4CMS_Muon_SimHitPrinter_H
0002 #define SimG4CMS_Muon_SimHitPrinter_H
0003 
0004 /** \class SimHitPrinter
0005  *
0006  * class to print sim hits for validation and debugging
0007  * 
0008  * \author Tommaso Boccali <Tommaso.Boccali@cern.ch>
0009  *         Arno Straesser <Arno.Straessner@cern.ch>
0010  *
0011  * Modification:
0012  *
0013  */
0014 
0015 #include <string>
0016 
0017 #include "DataFormats/GeometryVector/interface/GlobalPoint.h"
0018 #include "DataFormats/GeometryVector/interface/LocalPoint.h"
0019 
0020 #include <fstream>
0021 #include <atomic>
0022 
0023 class SimHitPrinter {
0024 public:
0025   SimHitPrinter(std::string);
0026   ~SimHitPrinter();
0027 
0028   void startNewSimHit(std::string);
0029   void startNewEvent(int);
0030 
0031   void printId(int) const;
0032   void printTrack(int) const;
0033   void printPabs(float) const;
0034   void printEloss(float) const;
0035   void printLocal(LocalPoint, LocalPoint) const;
0036   void printGlobal(GlobalPoint) const;
0037 
0038 private:
0039   static std::atomic<std::ofstream*> theFile;
0040 };
0041 
0042 #endif