CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
CgemSimCheck.h
Go to the documentation of this file.
1/*
2 * =====================================================================================
3 * Filename: CgemSimCheck.hh
4 * Description: Read .rtraw and save it to a .txt
5 * Version: 1.0
6 * Created: 2014年02月10日 14时25分12秒
7 * Revision: none
8 * Compiler: gcc
9 * Author: [email protected]
10 * Organization:
11 * =====================================================================================
12 */
13
14#ifndef CGEMSIMCHECK
15#define CGEMSIMCHECK
16
17/* Header file: BOSS */
18#include "GaudiKernel/Algorithm.h"
20
21#include "MdcGeomSvc/IMdcGeomSvc.h"
22#include "MdcGeomSvc/MdcGeomSvc.h"
23#include "MdcGeomSvc/MdcGeoWire.h"
24#include "MdcGeomSvc/MdcGeoLayer.h"
25
27
28#include "GaudiKernel/NTuple.h"
29#include "GaudiKernel/INTupleSvc.h"
30
31/* Header file: C++ */
32#include <iostream>
33#include <fstream>
34#include <string>
35#include <vector>
36
37/* Header file: Geant4 */
38#include "G4VHit.hh"
39#include "G4THitsCollection.hh"
40#include "G4Allocator.hh"
41#include "G4ThreeVector.hh"
42class CgemSimCheck : public Algorithm
43{
44 public:
45 CgemSimCheck(const std::string& name, ISvcLocator* pSvcLocator);
47
48 StatusCode initialize();
49 StatusCode execute();
50 StatusCode finalize();
51 StatusCode beginRun();
52
53 private:
54 int m_F_McTruth;
55 fstream m_output_McTruth;
56
57 int m_F_Digi;
58 fstream m_output_Digi;
59
60 int m_F_McParticle;
61 fstream m_output_McParticle;
62
63 string m_postfix;
64
65 /* Digi */
66 NTuple::Tuple* m_tuple;
67 NTuple::Item<int> m_run;
68 NTuple::Item<int> m_evt;
69 NTuple::Item<int> m_nHit;
70 NTuple::Item<int> m_Xnstrip;
71 NTuple::Item<int> m_Vnstrip;
72 NTuple::Array<G4int> m_ID_track;
73 NTuple::Array<G4int> m_X_ID_strip;
74 NTuple::Array<G4int> m_V_ID_strip;
75 NTuple::Array<G4int> m_X_nhit;
76 NTuple::Array<G4int> m_V_nhit;
77 NTuple::Array<G4int> m_ID_layer;
78 NTuple::Array<G4int> m_ID_sheet;
79 NTuple::Array<G4double> m_ID_strip;
80 NTuple::Array<G4double> m_globle_time;
81 NTuple::Array<G4double> m_E_deposit;
82 NTuple::Array<G4double> m_E_X;
83 NTuple::Array<G4double> m_E_V;
84
85 /* MC */
86 NTuple::Tuple* mc_tuple;
87 NTuple::Item<int> m_mc_nHit;
88 NTuple::Array<int> m_mc_ID_track; /* ID of current track */
89 NTuple::Array<int> m_mc_ID_layer; /* ID of CgemLayer Hits belong to */
90 NTuple::Item<G4int> m_mc_pdg_code; /* PDG code of the track particle */
91 NTuple::Array<double> m_mc_global_time; /* Time since the current event began */
92 NTuple::Array<double> m_mc_E_deposit; /* Total energy deposited during the step */
93 NTuple::Array<G4double> m_mc_L_step; /* Step length */
94 NTuple::Array<double> m_mc_XYZ_pre_X; /* Position of Pre Point */
95 NTuple::Array<double> m_mc_XYZ_pre_Y; /* Position of Pre Point */
96 NTuple::Array<double> m_mc_XYZ_pre_Z; /* Position of Pre Point */
97 NTuple::Array<double> m_mc_XYZ_post_X; /* Position of Post Point */
98 NTuple::Array<double> m_mc_XYZ_post_Y; /* Position of Post Point */
99 NTuple::Array<double> m_mc_XYZ_post_Z; /* Position of Post Point */
100 NTuple::Array<double> m_mc_P_pre_X; /* Momentum of Pre Point */
101 NTuple::Array<double> m_mc_P_pre_Y; /* Momentum of Pre Point */
102 NTuple::Array<double> m_mc_P_pre_Z; /* Momentum of Pre Point */
103 NTuple::Array<double> m_mc_P_post_X; /* Momentum of Post Point */
104 NTuple::Array<double> m_mc_P_post_Y; /* Momentum of Post Point */
105 NTuple::Array<double> m_mc_P_post_Z; /* Momentum of Post Point */
106/*mcparticle*/
107 NTuple::Tuple* mcP_tuple;
108 NTuple::Item<int> Nparticle;
109 NTuple::Array<int> m_trkindex;
110 NTuple::Array<double> m_mcParticle_x;
111 NTuple::Array<double> m_mcParticle_y;
112 NTuple::Array<double> m_mcParticle_z;
113 NTuple::Array<double> m_mcParticle_px;
114 NTuple::Array<double> m_mcParticle_py;
115 NTuple::Array<double> m_mcParticle_pz;
116 NTuple::Array<double> m_mcParticle_E;
117 NTuple::Array<double> m_mcParticle_phi;
118 NTuple::Array<double> m_mcParticle_costheta;
119 NTuple::Array<double> m_mcParticle_theta;
120 NTuple::Array<double> m_mcParticle_pt;
121};
122
123
124#endif
CgemSimCheck(const std::string &name, ISvcLocator *pSvcLocator)
StatusCode initialize()
StatusCode execute()
StatusCode beginRun()
StatusCode finalize()