767 {
768
769 m_xstripSheet.clear();
770 m_xstripID.clear();
771 m_vstripSheet.clear();
772 m_vstripID.clear();
773 m_xstripQ.clear();
774 m_vstripQ.clear();
775 m_xstripT_Branch.clear();
776 m_vstripT_Branch.clear();
777 m_xstripQ_Branch.clear();
778 m_vstripQ_Branch.clear();
779 m_xTfirst.clear();
780 m_vTfirst.clear();
781
782 int m000_nXstrips;
783 int m000_nVstrips;
784 std::vector<int> m000_xstripSheet;
785 std::vector<int> m000_xstripID;
786 std::vector<int> m000_vstripSheet;
787 std::vector<int> m000_vstripID;
788 std::vector<double> m000_xstripQ;
789 std::vector<double> m000_vstripQ;
790 std::vector<double> m000_xstripT_Branch;
791 std::vector<double> m000_vstripT_Branch;
792 std::vector<double> m000_xstripQ_Branch;
793 std::vector<double> m000_vstripQ_Branch;
794
795 m000_xstripSheet.clear();
796 m000_xstripID.clear();
797 m000_vstripSheet.clear();
798 m000_vstripID.clear();
799 m000_xstripQ.clear();
800 m000_vstripQ.clear();
801 m000_xstripT_Branch.clear();
802 m000_vstripT_Branch.clear();
803 m000_xstripQ_Branch.clear();
804 m000_vstripQ_Branch.clear();
805
810
811 Vint Save_Sheetx, Save_Sheetv;
812 Vint Save_FinalstripIDx, Save_FinalstripIDv;
813 Vint Save_Gridx, Save_Gridv;
814 Vint Save_IDx, Save_IDv;
815 Vint Save_Tx, Save_Tv;
816 Save_Tx.clear();
817 Save_Tv.clear();
818 Save_IDx.clear();
819 Save_IDv.clear();
820 Save_Gridx.clear();
821 Save_Gridv.clear();
822 Save_Sheetx.clear();
823 Save_Sheetv.clear();
824 Save_FinalstripIDx.clear();
825 Save_FinalstripIDv.clear();
826 for(int i=0; i<2; i++){
827 for(int k=0; k<2; k++){
828 m_mapQ[i][k].clear();
829
830 }
831 }
832
833
834
835 for(int i=0; i<nElectrons; i++){
836
837 double phi_electron = atan2(y[i], x[i]);
838 double z_electron = z[i];
839 if(inMicroSectorGap(phi_electron,layer)) {
840
841 continue;
842 }
843 G4ThreeVector pos(x[i], y[i], z[i]);
844 for(int j=0; j<NSheet; j++)
845 {
847 if(CgemReadoutPlane->
OnThePlane(phi_electron,z_electron))
848 {
849 int xID;
851 int vID;
853
854
855
856
857
858 int grid_x = 1;
859 int grid_v = 1;
860
861
862
863
864 double L_XPitch = CgemReadoutPlane->
getXPitch();
865 double L_VPitch = CgemReadoutPlane->
getVPitch();
866 grid_v = floor(distX/L_XPitch*5.+2.5);
867 grid_x = floor(distV/L_VPitch*5.+2.5);
868
869
870
871
872 if(xID>=0 && vID>=0) {
873 map<int, double>::iterator itx = m_mapQ[j][0].find(xID);
874 map<int, double>::iterator itv = m_mapQ[j][1].find(vID);
875 if(RatioX[layer][grid_x][grid_v][2]!=0){
876 if(itx==m_mapQ[j][0].end())
877 {
878 m_mapQ[j][0][xID]=RatioX[layer][grid_x][grid_v][2];
879 Save_Gridx.push_back(grid_x*100+grid_v*10+2);
880 Save_IDx.push_back(j*10000+xID);
881 Save_Tx.push_back(
t[i]);
882
883 }
884 else {
885 double Q = (itx->second) + RatioX[layer][grid_x][grid_v][2];
886 m_mapQ[j][0][xID]=Q;
887 Save_Gridx.push_back(grid_x*100+grid_v*10+2);
888 Save_IDx.push_back(j*10000+xID);
889 Save_Tx.push_back(
t[i]);
890
891 }
892 vector<int>::iterator result_Sheetx = find(Save_Sheetx.begin(), Save_Sheetx.end(), j*10000+xID);
893 if(result_Sheetx==Save_Sheetx.end()){
894 Save_Sheetx.push_back(j*10000+xID);
895 }
896 }
897 if(RatioV[layer][grid_x][grid_v][1]!=0){
898 if(itv==m_mapQ[j][1].end())
899 {
900 m_mapQ[j][1][vID]=RatioV[layer][grid_x][grid_v][1];
901 Save_Gridv.push_back(grid_x*100+grid_v*10+1);
902 Save_IDv.push_back(j*10000+vID);
903 Save_Tv.push_back(
t[i]);
904 }
905 else {
906 double Q = (itv->second) + RatioV[layer][grid_x][grid_v][1];
907 m_mapQ[j][1][vID]=Q;
908 Save_Gridv.push_back(grid_x*100+grid_v*10+1);
909 Save_IDv.push_back(j*10000+vID);
910 Save_Tv.push_back(
t[i]);
911 }
912 vector<int>::iterator result_Sheetv = find(Save_Sheetv.begin(), Save_Sheetv.end(), j*10000+vID);
913 if(result_Sheetv==Save_Sheetv.end()){
914 Save_Sheetv.push_back(j*10000+vID);
915 }
916 }
917 }
918
919 if((xID>=0 && vID>=0) && (xID+1)<CgemReadoutPlane->
getNXstrips()) {
920 map<int, double>::iterator itx = m_mapQ[j][0].find(xID+1);
921 if(RatioX[layer][grid_x][grid_v][3]!=0){
922 if(itx==m_mapQ[j][0].end())
923 {
924 m_mapQ[j][0][xID+1]=RatioX[layer][grid_x][grid_v][3];
925 Save_Gridx.push_back(grid_x*100+grid_v*10+3);
926 Save_IDx.push_back(j*10000+xID+1);
927 Save_Tx.push_back(
t[i]);
928
929 }
930 else {
931 double Q = (itx->second) + RatioX[layer][grid_x][grid_v][3];
932 m_mapQ[j][0][xID+1]=Q;
933 Save_Gridx.push_back(grid_x*100+grid_v*10+3);
934 Save_IDx.push_back(j*10000+xID+1);
935 Save_Tx.push_back(
t[i]);
936 }
937
938 vector<int>::iterator result_Sheetx = find(Save_Sheetx.begin(), Save_Sheetx.end(), j*10000+xID+1);
939 if(result_Sheetx==Save_Sheetx.end()){
940 Save_Sheetx.push_back(j*10000+xID+1);
941 }
942 }
943 }
944
945 if((xID>=0 && vID>=0) && (vID+1)<CgemReadoutPlane->
getNVstrips()) {
946 map<int, double>::iterator itv = m_mapQ[j][1].find(vID+1);
947 if(RatioV[layer][grid_x][grid_v][2]!=0){
948 if(itv==m_mapQ[j][1].end())
949 {
950 m_mapQ[j][1][vID+1]=RatioV[layer][grid_x][grid_v][2];
951 Save_Gridv.push_back(grid_x*100+grid_v*10+2);
952 Save_IDv.push_back(j*10000+vID+1);
953 Save_Tv.push_back(
t[i]);
954 }
955 else {
956 double Q = (itv->second) + RatioV[layer][grid_x][grid_v][2];
957 m_mapQ[j][1][vID+1]=Q;
958 Save_Gridv.push_back(grid_x*100+grid_v*10+2);
959 Save_IDv.push_back(j*10000+vID+1);
960 Save_Tv.push_back(
t[i]);
961 }
962
963 vector<int>::iterator result_Sheetv = find(Save_Sheetv.begin(), Save_Sheetv.end(), j*10000+vID+1);
964 if(result_Sheetv==Save_Sheetv.end()){
965 Save_Sheetv.push_back(j*10000+vID+1);
966 }
967 }
968 }
969
970 if((xID>=0 && vID>=0) && (xID-2)>=0) {
971 map<int, double>::iterator itx = m_mapQ[j][0].find(xID-2);
972 if(RatioX[layer][grid_x][grid_v][0]!=0){
973 if(itx==m_mapQ[j][0].end())
974 {
975 m_mapQ[j][0][xID-2]=RatioX[layer][grid_x][grid_v][0];
976 Save_Gridx.push_back(grid_x*100+grid_v*10+0);
977 Save_IDx.push_back(j*10000+xID-2);
978 Save_Tx.push_back(
t[i]);
979
980 }
981 else {
982 double Q = (itx->second) + RatioX[layer][grid_x][grid_v][0];
983 m_mapQ[j][0][xID-2]=Q;
984 Save_Gridx.push_back(grid_x*100+grid_v*10+0);
985 Save_IDx.push_back(j*10000+xID-2);
986 Save_Tx.push_back(
t[i]);
987 }
988
989 vector<int>::iterator result_Sheetx = find(Save_Sheetx.begin(), Save_Sheetx.end(), j*10000+xID-2);
990 if(result_Sheetx==Save_Sheetx.end()){
991 Save_Sheetx.push_back(j*10000+xID-2);
992 }
993 }
994 }
995
996 if((xID>=0 && vID>=0) && (xID-1)>=0) {
997 map<int, double>::iterator itx = m_mapQ[j][0].find(xID-1);
998 if(RatioX[layer][grid_x][grid_v][1]!=0){
999 if(itx==m_mapQ[j][0].end())
1000 {
1001 m_mapQ[j][0][xID-1]=RatioX[layer][grid_x][grid_v][1];
1002 Save_Gridx.push_back(grid_x*100+grid_v*10+1);
1003 Save_IDx.push_back(j*10000+xID-1);
1004 Save_Tx.push_back(
t[i]);
1005 }
1006 else {
1007 double Q = (itx->second) + RatioX[layer][grid_x][grid_v][1];
1008 m_mapQ[j][0][xID-1]=Q;
1009 Save_Gridx.push_back(grid_x*100+grid_v*10+1);
1010 Save_IDx.push_back(j*10000+xID-1);
1011 Save_Tx.push_back(
t[i]);
1012 }
1013
1014 vector<int>::iterator result_Sheetx = find(Save_Sheetx.begin(), Save_Sheetx.end(), j*10000+xID-1);
1015 if(result_Sheetx==Save_Sheetx.end()){
1016 Save_Sheetx.push_back(j*10000+xID-1);
1017 }
1018 }
1019 }
1020
1021 if((xID>=0 && vID>=0) && (vID-1)>=0) {
1022 map<int, double>::iterator itv = m_mapQ[j][1].find(vID-1);
1023 if(RatioV[layer][grid_x][grid_v][0]!=0){
1024 if(itv==m_mapQ[j][1].end())
1025 {
1026 m_mapQ[j][1][vID-1]=RatioV[layer][grid_x][grid_v][0];
1027 Save_Gridv.push_back(grid_x*100+grid_v*10+0);
1028 Save_IDv.push_back(j*10000+vID-1);
1029 Save_Tv.push_back(
t[i]);
1030 }
1031 else {
1032 double Q = (itv->second) + RatioV[layer][grid_x][grid_v][0];
1033 m_mapQ[j][1][vID-1]=Q;
1034 Save_Gridv.push_back(grid_x*100+grid_v*10+0);
1035 Save_IDv.push_back(j*10000+vID-1);
1036 Save_Tv.push_back(
t[i]);
1037 }
1038
1039 vector<int>::iterator result_Sheetv = find(Save_Sheetv.begin(), Save_Sheetv.end(), j*10000+vID-1);
1040 if(result_Sheetv==Save_Sheetv.end()){
1041 Save_Sheetv.push_back(j*10000+vID-1);
1042 }
1043 }
1044 }
1045 }
1046 }
1047 }
1048
1049
1050
1051
1052
1053
1054
1055 double Q_threshold = 1.5e-15/1.602176565e-19;
1056 double Q_saturation= 45.e-15/1.602176565e-19;
1057 double Q_resolution= 0.256e-15/1.602176565e-19;
1058 double T_threshold = 12;
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104 m000_nXstrips = m_mapQ[0][0].size() + m_mapQ[1][0].size();
1105 m000_nVstrips = m_mapQ[0][1].size() + m_mapQ[1][1].size();
1106
1107
1108
1109
1110 for(int i=0; i<Save_Sheetx.size(); i++){
1111 int sheetx_id = Save_Sheetx[i]/10000;
1112 int stripx_id = Save_Sheetx[i]%10000;
1113
1114 Save_FinalstripIDx.push_back(Save_Sheetx[i]);
1115
1116 m000_xstripSheet.push_back(sheetx_id);
1117 m000_xstripID.push_back(stripx_id);
1118 m000_xstripQ.push_back(m_mapQ[sheetx_id][0][stripx_id]);
1119
1120 }
1121
1122 for(int i=0; i<Save_Sheetv.size(); i++){
1123 int sheetv_id = Save_Sheetv[i]/10000;
1124 int stripv_id = Save_Sheetv[i]%10000;
1125
1126 Save_FinalstripIDv.push_back(Save_Sheetv[i]);
1127 m000_vstripSheet.push_back(sheetv_id);
1128 m000_vstripID.push_back(stripv_id);
1129 m000_vstripQ.push_back(m_mapQ[sheetv_id][1][stripv_id]);
1130
1131 }
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237 double Tmin;
1238 std::vector<double> xTfirst;
1239 std::vector<double> vTfirst;
1240
1241 for(int h=0; h<Save_FinalstripIDx.size(); h++){
1242 std::map<int,std::vector<int> > electron_hit_tmp;
1243 const int _low = 0;
1244 const int _up = 1000;
1245 const int _nbins = 2000;
1246 double binsize = (double)(_up-_low)/_nbins;
1247 int sheetx_id = Save_FinalstripIDx[h]/10000;
1248 int stripx_id = Save_FinalstripIDx[h]%10000;
1249 double histX_bin_Content[_nbins];
1250 for(int i=0; i<_nbins; i++){
1251 histX_bin_Content[i] = 0;
1252 }
1253
1254 Tmin = 999999;
1255 if (isDeadStrip(layer,sheetx_id,0,stripx_id)) {
1256 xTfirst.push_back(Tmin);
1257 double T_th = -99.;
1258 m000_xstripT_Branch.push_back(T_th);
1259 double Qin = -99.;
1260 m000_xstripQ_Branch.push_back(Qin);
1261 continue;
1262 };
1263
1264 for(int i=0; i<Save_Gridx.size(); i++){
1265
1266
1267
1268 int z_IDx = Save_IDx[i];
1269 int start_bin = Save_Tx[i]/binsize;
1270
1271
1272 if(z_IDx == Save_FinalstripIDx[h]){
1273 if(Save_Tx[i]<Tmin) Tmin = Save_Tx[i];
1274 if (start_bin<_nbins and start_bin>=0)electron_hit_tmp[Save_Gridx[i]].push_back(start_bin);
1275
1276
1277
1278
1279
1280
1281 }
1282
1283 }
1284
1285 for (std::map<int, std::vector<int> >::iterator it = electron_hit_tmp.begin();
1286 it != electron_hit_tmp.end(); it++) {
1287 std::vector<int> &hitlist = it->second;
1288 const int &Save_Grid = it->first;
1289
1290 if (hitlist.size() < electrons_select_method_threhold) {
1291 conv1PerGrid_legacy(Save_Grid, histX_bin_Content, hitlist, layer, 0);
1292 } else {
1293 conv1PerGrid_fft(Save_Grid, histX_bin_Content, hitlist, layer, 0);
1294 }
1295 }
1296
1297 xTfirst.push_back(Tmin);
1298 TH1F sig_current("current","",_nbins,_low,_up);
1299 for(int i=0;i<_nbins;i++){
1300 sig_current.SetBinContent(i+1,histX_bin_Content[i]);
1301 }
1302
1303
1305
1306
1307 int flg_xT = 0;
1308 double T_th = 0.;
1309 T_threshold = T_thr_V[layer][sheetx_id][0][stripx_id];
1310
1311
1312 for(
int init=1;
init<_nbins;
init++){
1313 if(flg_xT==0 && fabs(h_signalT.GetBinContent(init+1))>=fabs(T_threshold)){
1314 T_th = _low+binsize*(
init-1)+fabs(T_threshold-h_signalT.GetBinContent(init))*binsize/fabs(h_signalT.GetBinContent(init+1)-h_signalT.GetBinContent(init))+gRandom->Gaus(0,2);
1315 m000_xstripT_Branch.push_back(T_th);
1316 flg_xT=1;
1317 }
1318 }
1319 if(flg_xT==0) {
1320 T_th = -99.;
1321 m000_xstripT_Branch.push_back(T_th);
1322 }
1323 double V_sampling = 0.;
1324 double Qin = 0.;
1325 double Efine = 0.;
1326
1327
1328 if(T_th>0){
1329
1331 double T_sample = T_th+sample_delay;
1332 int sample_bin = T_sample/binsize;
1333 double sample_bin_ = T_sample/binsize;
1334 V_sampling = h_signalE.GetBinContent(sample_bin)+(h_signalE.GetBinContent(sample_bin+1)-h_signalE.GetBinContent(sample_bin))*double(sample_bin_-sample_bin);
1335 int over_th = 0;
1336
1337
1338
1339
1340
1341
1342
1343 if(h_signalE.GetMaximum()>E_thr_V[layer][sheetx_id][0][stripx_id]) over_th=1;
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362 if(over_th==1) {
1363 Qin = V_sampling*VQ_slope + VQ_const+gRandom->Gaus(0,m_QinGausSigma[0]);
1364 if(m_saturation&&Qin>Qsaturation[layer][sheetx_id][0][stripx_id])
1365 {
1366 Qin = Qsaturation[layer][sheetx_id][0][stripx_id];
1367 }
1368 }
1369 else Qin = -99;
1370 }
1371 else{
1372 V_sampling = -99.;
1373 Qin = -99.;
1374
1375 }
1376
1377 m000_xstripQ_Branch.push_back(Qin);
1378
1379
1380
1381
1382
1383
1384
1385
1386 }
1387
1388
1389 for(int h=0; h<Save_FinalstripIDv.size(); h++){
1390 std::map<int,std::vector<int> > electron_hit_tmp;
1391 const int _low = 0;
1392 const int _up = 1000;
1393 const int _nbins = 2000;
1394 double binsize = (double)(_up-_low)/_nbins;
1395 int sheetv_id = Save_FinalstripIDv[h]/10000;
1396 int stripv_id = Save_FinalstripIDv[h]%10000;
1397 double histV_bin_Content[_nbins];
1398 for(int i=0; i<_nbins; i++){
1399 histV_bin_Content[i] = 0;
1400 }
1401
1402 Tmin = 999999;
1403 if (isDeadStrip(layer,sheetv_id,1,stripv_id)) {
1404 vTfirst.push_back(Tmin);
1405 double T_th = -99.;
1406 m000_vstripT_Branch.push_back(T_th);
1407 double Qin = -99.;
1408 m000_vstripQ_Branch.push_back(Qin);
1409 continue;
1410 };
1411
1412 for(int i=0; i<Save_Gridv.size(); i++){
1413
1414
1415
1416 int z_IDv = Save_IDv[i];
1417 int start_bin = Save_Tv[i]/binsize;
1418
1419
1420 if(z_IDv == Save_FinalstripIDv[h]){
1421 if(Save_Tv[i]<Tmin) Tmin = Save_Tv[i];
1422 if (start_bin<_nbins and start_bin>=0)
1423 electron_hit_tmp[Save_Gridv[i]].push_back(start_bin);
1424
1425
1426
1427
1428
1429 }
1430 }
1431
1432
1433 for (std::map<int,std::vector<int> >::iterator it=electron_hit_tmp.begin();
1434 it !=electron_hit_tmp.end(); it++){
1435 std::vector<int> & hitlist=it->second;
1436 const int & Save_Grid=it->first;
1437
1438 if ( hitlist.size()< electrons_select_method_threhold){
1439 conv1PerGrid_legacy(Save_Grid,histV_bin_Content,hitlist,layer,1);
1440 }
1441 else{
1442 conv1PerGrid_fft(Save_Grid,histV_bin_Content,hitlist,layer,1);
1443 }
1444 }
1445
1446
1447
1448 vTfirst.push_back(Tmin);
1449 TH1F sig_current("current","",_nbins,_low,_up);
1450 for(int i=0;i<_nbins;i++){
1451 sig_current.SetBinContent(i+1,histV_bin_Content[i]);
1452 }
1453
1454
1456
1457 int flg_vT = 0;
1458 double T_th = 0.;
1459 T_threshold = T_thr_V[layer][sheetv_id][1][stripv_id];
1460
1461
1462 for(
int init=1;
init<_nbins;
init++){
1463 if(flg_vT==0 && fabs(h_signalT.GetBinContent(init+1))>=fabs(T_threshold)){
1464 T_th = _low+binsize*(
init-1)+fabs(T_threshold-h_signalT.GetBinContent(init))*binsize/fabs(h_signalT.GetBinContent(init+1)-h_signalT.GetBinContent(init))+gRandom->Gaus(0,2);
1465 m000_vstripT_Branch.push_back(T_th);
1466 flg_vT=1;
1467 }
1468 }
1469 if(flg_vT==0) {
1470 T_th = -99.;
1471 m000_vstripT_Branch.push_back(T_th);
1472 }
1473 double V_sampling = 0.;
1474 double Qin = 0.;
1475 double Efine = 0.;
1476 if(T_th>0){
1477
1479 double T_sample = T_th+sample_delay;
1480 int sample_bin = T_sample/binsize;
1481 double sample_bin_ = T_sample/binsize;
1482 V_sampling = h_signalE.GetBinContent(sample_bin)+(h_signalE.GetBinContent(sample_bin+1)-h_signalE.GetBinContent(sample_bin))*double(sample_bin_-sample_bin);
1483 int over_th = 0;
1484
1485
1486
1487
1488
1489
1490 if(h_signalE.GetMaximum()>E_thr_V[layer][sheetv_id][1][stripv_id]) over_th=1;
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509 if(over_th==1) {
1510 Qin = V_sampling*VQ_slope + VQ_const+gRandom->Gaus(0,m_QinGausSigma[1]);
1511 if(m_saturation&&Qin>Qsaturation[layer][sheetv_id][1][stripv_id])
1512 Qin = Qsaturation[layer][sheetv_id][1][stripv_id];
1513 }
1514 else Qin = -99;
1515 }
1516 else{
1517 V_sampling = -99.;
1518 Qin = -99.;
1519
1520 }
1521
1522 m000_vstripQ_Branch.push_back(Qin);
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532 }
1533
1534
1535
1536
1537 double q_to_fC_factor = 1.602176565e-4;
1538
1539
1540
1541 if(storeFlag){
1542 m_nXstrips = 0;
1543 for(int i=0; i<m000_nXstrips; i++){
1544 m_xstripSheet.push_back(m000_xstripSheet[i]);
1545 m_xstripID.push_back(m000_xstripID[i]);
1546 m_xstripQ.push_back(m000_xstripQ[i]*q_to_fC_factor);
1547 m_xstripT_Branch.push_back(m000_xstripT_Branch[i]);
1548 m_xstripQ_Branch.push_back(m000_xstripQ_Branch[i]);
1549 m_xTfirst.push_back(xTfirst[i]);
1550 m_nXstrips++;
1551 }
1552 m_nVstrips = 0;
1553
1554 for(int i=0; i<m000_nVstrips; i++){
1555 m_vstripSheet.push_back(m000_vstripSheet[i]);
1556 m_vstripID.push_back(m000_vstripID[i]);
1557 m_vstripQ.push_back(m000_vstripQ[i]*q_to_fC_factor);
1558 m_vstripT_Branch.push_back(m000_vstripT_Branch[i]);
1559 m_vstripQ_Branch.push_back(m000_vstripQ_Branch[i]);
1560 m_vTfirst.push_back(vTfirst[i]);
1561 m_nVstrips++;
1562 }
1563 }
1564 else{
1565 m_nXstrips = 0;
1566 for(int i=0; i<m000_nXstrips; i++){
1567 if(m000_xstripQ_Branch[i]>=0){
1568 m_xstripSheet.push_back(m000_xstripSheet[i]);
1569 m_xstripID.push_back(m000_xstripID[i]);
1570 m_xstripQ.push_back(m000_xstripQ[i]*q_to_fC_factor);
1571 m_xstripT_Branch.push_back(m000_xstripT_Branch[i]);
1572 m_xstripQ_Branch.push_back(m000_xstripQ_Branch[i]);
1573 m_xTfirst.push_back(xTfirst[i]);
1574 m_nXstrips++;
1575
1576 }
1577 }
1578 m_nVstrips = 0;
1579
1580 for(int i=0; i<m000_nVstrips; i++){
1581 if(m000_vstripQ_Branch[i]>=0){
1582 m_vstripSheet.push_back(m000_vstripSheet[i]);
1583 m_vstripID.push_back(m000_vstripID[i]);
1584 m_vstripQ.push_back(m000_vstripQ[i]*q_to_fC_factor);
1585 m_vstripT_Branch.push_back(m000_vstripT_Branch[i]);
1586 m_vstripQ_Branch.push_back(m000_vstripQ_Branch[i]);
1587 m_vTfirst.push_back(vTfirst[i]);
1588 m_nVstrips++;
1589
1590 }
1591 }
1592 }
1593
1594
1595
1596}
TH1D Convolution_Ebranch_fft(const double *Input_Curr_plot_001)
return convolve of Input_Curr_plot_001 and T_Branch2, a function; tries to mimic Convolution_Ebranch ...
TH1D Convolution_Tbranch_fft(const double *Input_Curr_plot_001)
return convolve of Input_Curr_plot_001 and T_Branch2, a function; tries to mimic Convolution_Tbranch ...
int getNumberOfSheet() const
double getDist2ClosestXStripCenter(double phi, int &id)
bool OnThePlane(double phi, double z) const
double getDist2ClosestVStripCenter(G4ThreeVector pos, int &id)
virtual CgemGeoReadoutPlane * getReadoutPlane(int iLayer, int iSheet) const =0
virtual CgemGeoLayer * getCgemLayer(int i) const =0