33{
34 PropertyMgr m_propMgr;
35 m_propMgr.declareProperty("FileName", m_fileName = "mrpc.root");
36 m_propMgr.declareProperty("RootFlag", m_rootFlag = false);
37 m_propMgr.declareProperty("E", m_V = 7000);
38 m_propMgr.declareProperty("Threshold", m_threshold = 5.5e+08);
39
40 m_propMgr.declareProperty("nstep", m_nstep = -1);
41 m_propMgr.declareProperty("E_weight", m_E_weight = -1);
42 m_propMgr.declareProperty("saturationFlag", m_saturationFlag = true);
43 m_propMgr.declareProperty("tdcRes_const", tdcRes_const = -1);
44 m_propMgr.declareProperty("adcRes_const", adcRes_const = -1);
45 m_propMgr.declareProperty("calTdcRes_charge_flag", m_calTdcRes_charge_flag=0);
46 m_propMgr.declareProperty("charge2Time_flag", m_charge2Time_flag=0);
47 m_propMgr.declareProperty("calAdcRes_charge_flag", m_calAdcRes_charge_flag=0);
48 cout<<"Property:"<<endl
49 <<" FileName= "<<m_fileName
50 <<" E= "<<m_V
51 <<" Threshold= "<<m_threshold
52 <<" nstep= "<<m_nstep
53 <<" E_weight= "<<m_E_weight
54 <<" saturationFlag= "<<m_saturationFlag
55 <<" tdcRes_const= "<<tdcRes_const
56 <<" adcRes_const= "<<adcRes_const
57 <<" calTdcRes_charge_flag= "<<m_calTdcRes_charge_flag
58 <<" charge2Time_flag= "<<m_charge2Time_flag
59 <<" calAdcRes_charge_flag= "<<m_calAdcRes_charge_flag
60 <<endl;
61
62
63 IJobOptionsSvc* jobSvc;
64 Gaudi::svcLocator()->service("JobOptionsSvc", jobSvc);
65 jobSvc->setMyProperties("BesTofDigitizerEcV4", &m_propMgr);
66
68
69 if(m_rootFlag)
70 {
71 m_file = new TFile(m_fileName.c_str(), "RECREATE");
72 m_tree = new TTree("mrpc", "mrpc");
73
74 m_tree->Branch("event", &m_event, "event/D");
75 m_tree->Branch("partId", &m_partId, "partId/D");
76 m_tree->Branch("module", &m_module, "module/D");
77 m_tree->Branch("time_leading_sphi", &m_time_leading_sphi, "time_leading_sphi/D");
78 m_tree->Branch("time_leading_xphi", &m_time_leading_xphi, "time_leading_xphi/D");
79 m_tree->Branch("time_trailing_sphi", &m_time_trailing_sphi, "time_trailing_sphi/D");
80 m_tree->Branch("time_trailing_xphi", &m_time_trailing_xphi, "time_trailing_xphi/D");
81 m_tree->Branch("tdcRes", &m_tdcRes, "tdcRes/D");
82 m_tree->Branch("tdcRes_charge", &m_tdcRes_charge, "tdcRes_charge/D");
83 m_tree->Branch("adc", &m_adc, "adc/D");
84 m_tree->Branch("adcRes", &m_adcRes, "adcRes/D");
85 m_tree->Branch("adcRes_charge", &m_adcRes_charge, "adcRes_charge/D");
86 m_tree->Branch("strip", &m_strip, "strip/D");
87 m_tree->Branch("trkIndex", &m_trkIndex, "trkIndex/D");
88 m_tree->Branch("tStart", &m_tStart, "tStart/D");
89 m_tree->Branch("tPropagate_sphi", &m_tPropagate_sphi, "tPropagate_sphi/D");
90 m_tree->Branch("tPropagate_xphi", &m_tPropagate_xphi, "tPropagate_xphi/D");
91 m_tree->Branch("tThreshold", &m_tThreshold, "tThreshold/D");
92 m_tree->Branch("charge", &m_charge, "charge/D");
93 m_tree->Branch("nhit", &m_nhit, "nhit/I");
94 m_tree->Branch("ions_hit", m_ions_hit, "ions_hit[nhit]/D");
95 m_tree->Branch("trkIndex_hit", m_trkIndex_hit, "trkIndex_hit[nhit]/D");
96 m_tree->Branch("pdgCode_hit", m_pdgCode_hit, "pdgCode_hit[nhit]/D");
97 m_tree->Branch("gap_hit", m_gap_hit, "gap_hit[nhit]/D");
98 m_tree->Branch("underStrip_hit", m_underStrip_hit, "underStrip_hit[nhit]/D");
99 m_tree->Branch("locx_hit", m_locx_hit, "locx_hit[nhit]/D");
100 m_tree->Branch("locy_hit", m_locy_hit, "locy_hit[nhit]/D");
101 m_tree->Branch("locz_hit", m_locz_hit, "locz_hit[nhit]/D");
102 m_tree->Branch("x_hit", m_x_hit, "x_hit[nhit]/D");
103 m_tree->Branch("y_hit", m_y_hit, "y_hit[nhit]/D");
104 m_tree->Branch("z_hit", m_z_hit, "z_hit[nhit]/D");
105 m_tree->Branch("px_hit", m_px_hit, "px_hit[nhit]/D");
106 m_tree->Branch("py_hit", m_py_hit, "py_hit[nhit]/D");
107 m_tree->Branch("pz_hit", m_pz_hit, "pz_hit[nhit]/D");
108 }
109}