Belle II Software development
TRGECLModule.cc
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#define TRGECL_SHORT_NAMES
10
11#include <framework/core/ModuleParamList.templateDetails.h>
12#include <framework/core/ModuleParamList.h>
13#include <framework/database/DBObjPtr.h>
14
15#include "trg/ecl/TrgEclMaster.h"
16//trg package headers
17#include "trg/trg/Debug.h"
18#include "trg/ecl/modules/trgecl/TRGECLModule.h"
19#include "trg/ecl/dbobjects/TRGECLETMPara.h"
20#include "trg/ecl/dbobjects/TRGECLETMParameters.h"
21
22#include <iostream>
23#include <map>
24
25using namespace std;
26
27namespace Belle2 {
32 //
33 //
35 REG_MODULE(TRGECL);
36 //
37 //
38 //
39 string
41 {
42 return string("TRGECLModule 1.00");
43 }
44 //
45 //
46 //
48 Module::Module()
49 {
50
51 string desc = "TRGECLModule(" + version() + ")";
52 setDescription(desc);
54
55 addParam("DebugLevel",
57 "TRGECL debug level",
59 addParam("Clustering",
61 "TRGECL Clustering method 0 : use only ICN, 1 : ICN + Energy(Default)",
63 addParam("ClusterLimit",
65 "The Limit number of cluster (Default:6)",
67 addParam("EventTiming",
69 "TRGECL EventTiming method 0 : Belle I, 1 : Energetic TC (default), 2 : Energy Weighted timing",
71 addParam("NofTopTC",
73 "TRGECL # of considered TC in energy weighted Timing method(Only work for EvenTiming Method 2)",
75 addParam("TimeWindow",
77 "TRGECL Trigger decision Time Window",
79 addParam("OverlapWindow",
81 "TRGECL Trigger decision Time Window",
83 addParam("EventSelect",
85 "TRGECL Select one trigger window for logic study",
87 addParam("ConditionDB",
89 "Flag to use Condition Database (0:=not use, 1:=use (default))",
91 //-----------------------------------------------
92 addParam("ADCtoEnergy",
94 "set conversion factor of ADC to Energy (GeV) : ",
96 addParam("TotalEnergyCut",
98 "set total energy cut(lowe, hie, lumie) in lab (GeV) : ",
100 addParam("Bhabha2DThresholdFWD",
102 "set energy threshold(14 regions) of 2D Bhabha veto for FWD side in Lab. (GeV) : ",
104 addParam("Bhabha2DThresholdBWD",
106 "set energy threshold(14 regions) of 2D Bhabha veto for BWD side in Lab. (GeV) : ",
108 addParam("Bhabha3DVetoThreshold",
110 "set energy threshold(low, high) of 3D Bhabha veto in CMS (GeV) : ",
112 addParam("Bhabha3DVetoAngle",
114 "set angle cut (phi diff L, H, and theta sum L, H) of 3D Bhabha veto in CMS(degree) : ",
116 addParam("Bhabha3DSelectionThreshold",
118 "set energy threshold(low, high) of 3D Bhabha selection in CMS (GeV) : ",
120 addParam("Bhabha3DSelectionAngle",
122 "set angle cut (phi diff L, H, and theta sum L, H) of 3D Bhabha selection in CMS(degree) : ",
124 addParam("Bhabha3DSelectionPreScale",
126 "set prescale (FW, BR, BW for Bhabha selection : ",
128 addParam("mumuThreshold",
130 "set cluster energy cut for mumu in CMS (GeV) : ",
132 addParam("mumuAngle",
134 "set angle cut (phi diff L, H, and theta sum L, H) of mumu in CMS(degree) : ",
136
137 addParam("lmlCLELabCut",
139 "set lml cluster energy thresholds(high, middle, low) in Lab in GeV : ",
141 addParam("lmlCLECMSCut",
143 "set lml cluster energy thresholds(high, middle, low) in CMS in GeV : ",
145 addParam("lml00NCLforMinE",
147 "set lml00 the number of cluster for minimum energy cluster : ",
149 addParam("lml12NCLforMinE",
151 "set lml12 the number of cluster for minimum energy cluster : ",
153 addParam("lml13ThetaIdSelection",
155 "set lml13 theta ID selection : ",
157
158 addParam("ECLBurstThreshold",
160 "set ECL Burst Threshold in lab in GeV : ",
162 addParam("EventTimingQualityThreshold",
164 "set EventTimingQualityThreshold (low energy(GeV) and high energy(GeV))",
166
167 addParam("3DBhabhaVetoInTrackThetaRegion",
169 "set 3DBhabhaVetoInTrackThetaRegion (low TCID and high TCID)",
171
172 addParam("Taub2bAngleCut",
174 "set Taub2bAngleCut(dphi low and high, theta sum low and high(degree)",
176 addParam("Taub2bEtotCut",
178 "set Taub2b total energy cut in TC ThetaID 1-17(GeV)",
180 addParam("Taub2bCLELabCut",
182 "set Taub2b cluster energy cut in Lab (GeV) : ",
184
185 addParam("hie12BhabhaVetoAngle",
187 "set Angle Cut of Bhbaha Additional veto for hie (dphi low and high, theta sum low and high(degree)",
189
190 addParam("Taub2b2AngleCut",
192 "set Taub2b2AngleCut(dphi low and high, theta sum low and high(degree))",
194 addParam("Taub2b2EtotCut",
196 "set Taub2b2 total energy cut in TC ThetaID 1-17(GeV)",
198 addParam("Taub2b2CLELabCut",
200 "set Taub2b2 cluster energy Cut(high, low) (GeV) : ",
202
203 addParam("Taub2b3AngleCut",
205 "set Taub2b3AngleCut(dphi low and high, theta sum low and high in cms (degree))",
207 addParam("Taub2b3EtotCut",
209 "set Taub2b3 total energy cut in lab in ThetaID 1-17(GeV)",
211 addParam("Taub2b3CLEb2bLabCut",
213 "set Taub2b3 cluster energy Cut in lab for one of b2b clusters (GeV) : ",
215 addParam("Taub2b3CLELabCut",
217 "set Taub2b3 cluster energy Cut(low, high) in lab for all clusters (GeV) : ",
219
220 //-------------------------------------
221 m_TotalEnergy.clear();
225 m_3DBhabhaVetoAngle.clear();
229 m_mumuAngle.clear();
230 m_lmlCLELabCut.clear();
231 m_lmlCLECMSCut.clear();
235 m_taub2bAngleCut.clear();
236 m_taub2b2AngleCut.clear();
237 m_taub2b2CLELabCut.clear();
238 m_taub2b3AngleCut.clear();
239 m_taub2b3CLELabCut.clear();
240 // lowe, hie, lume in Lab in GeV
241 m_TotalEnergy = {0.5, 1.0, 3.0};
242 // 2D Bhabha E cut in Lab in GeV (forward and backward sides)
243 m_2DBhabhaThresholdFWD = {4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 4.0, 3.0, 3.5};
244 m_2DBhabhaThresholdBWD = {2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 3.0, 3.0};
245 // 3D Bhabha
246 m_3DBhabhaVetoThreshold = {3.0, 4.5}; // GeV
247 m_3DBhabhaVetoAngle = {160, 200, 165, 190}; // degree
248 // 3D Bhabha selection
249 m_3DBhabhaSelectionThreshold = {2.5, 4.0}; // GeV
250 m_3DBhabhaSelectionAngle = {140, 220, 160, 200}; // degree
251 m_3DBhabhaSelectionPreScale = {1, 1, 1}; // pre-scale(no unit)
252 // mumu
253 m_mumuThreshold = 2.0; // GeV
254 m_mumuAngle = {160, 200, 165, 190}; // degree
255 // lml
256 m_lmlCLELabCut = {0.5, 0.3, 0.25}; // in GeV
257 m_lmlCLECMSCut = {2.0, 1.0, 0.5}; // in GeV
261 //
262 m_ECLBurstThreshold = 20.0; // GeV
263 //
264 m_EventTimingQualityThreshold = {1.0, 20}; // GeV
265 //
267 // taub2b
268 m_taub2bAngleCut = {110, 250, 130, 230}; // degree
269 m_taub2bEtotCut = 7.0; // GeV
270 m_taub2bCLELabCut = 1.9; // GeV
271 //
272 m_hie12BhabhaVetoAngle = {150, 210, 160, 200}; // degree
273 // taub2b2
274 m_taub2b2AngleCut = {120, 240, 140, 220}; // degree
275 m_taub2b2EtotCut = 7.0; // GeV
276 m_taub2b2CLELabCut = {3.0, 0.162}; // GeV
277 // taub2b3
278 m_taub2b3AngleCut = {120, 240, 140, 220}; // degree
279 m_taub2b3EtotCut = 7.0; // GeV
280 m_taub2b3CLEb2bLabCut = 0.14; // GeV
281 m_taub2b3CLELabCut = {0.12, 4.50}; // GeV
282 //
283 m_hie4LowCLELabCut = 0.5; // GeV
284
285 if (TRGDebug::level()) {
286 std::cout << "TRGECLModule ... created" << std::endl;
287 }
288 }
289 //
290 //
291 //
293 {
294 if (TRGDebug::level()) {
295 std::cout << "TRGECLModule ... destructed " << std::endl;
296
297 }
298 }
299 //
300 //
301 //
302 void
304 {
305
307
308 if (TRGDebug::level()) {
309 std::cout << "TRGECLModule::initialize ... options" << std::endl;
310 std::cout << TRGDebug::tab(4) << "debug level = " << TRGDebug::level()
311 << std::endl;
312 }
313 //
314 //
315 //
316 m_nRun = 0 ;
317 m_nEvent = 0 ;
318 m_hitNum = 0;
319 m_hitTCNum = 0;
320
321 m_TRGECLHit.registerInDataStore();
322 m_TRGECLTrg.registerInDataStore();
323 m_TRGECLCluster.registerInDataStore();
324
325 etm = new TrgEclMaster();
326
327 }
328 //
329 //
330 //
331 void
333 {
334
335 if (m_ConditionDB) {
336
338 DBObjPtr<TRGECLETMParameters> m_ETMParameters;
339
340 const auto& dbParmap = m_ETMParameters->getparMap();
341
342 B2DEBUG(100, "[TRGECLModule] valid N(par) in ETMParameters = "
343 << m_ETMParameters->getnpar());
344 B2DEBUG(100, "[TRGECLModule] all N(par) in ETMParameters = "
345 << dbParmap.size());
346
347 m_ADCtoEnergy = getDBparmap(dbParmap, "adc2energy", 0);
348 m_TotalEnergy = {
349 getDBparmap(dbParmap, "lowe", 100),
350 getDBparmap(dbParmap, "hie", 100),
351 getDBparmap(dbParmap, "lume", 100)
352 };
354 getDBparmap(dbParmap, "bha2d_fw01", 100),
355 getDBparmap(dbParmap, "bha2d_fw02", 100),
356 getDBparmap(dbParmap, "bha2d_fw03", 100),
357 getDBparmap(dbParmap, "bha2d_fw04", 100),
358 getDBparmap(dbParmap, "bha2d_fw05", 100),
359 getDBparmap(dbParmap, "bha2d_fw06", 100),
360 getDBparmap(dbParmap, "bha2d_fw07", 100),
361 getDBparmap(dbParmap, "bha2d_fw08", 100),
362 getDBparmap(dbParmap, "bha2d_fw09", 100),
363 getDBparmap(dbParmap, "bha2d_fw10", 100),
364 getDBparmap(dbParmap, "bha2d_fw11", 100),
365 getDBparmap(dbParmap, "bha2d_fw12", 100),
366 getDBparmap(dbParmap, "bha2d_fw13", 100),
367 getDBparmap(dbParmap, "bha2d_fw14", 100)
368 };
370 getDBparmap(dbParmap, "bha2d_bw01", 100),
371 getDBparmap(dbParmap, "bha2d_bw02", 100),
372 getDBparmap(dbParmap, "bha2d_bw03", 100),
373 getDBparmap(dbParmap, "bha2d_bw04", 100),
374 getDBparmap(dbParmap, "bha2d_bw05", 100),
375 getDBparmap(dbParmap, "bha2d_bw06", 100),
376 getDBparmap(dbParmap, "bha2d_bw07", 100),
377 getDBparmap(dbParmap, "bha2d_bw08", 100),
378 getDBparmap(dbParmap, "bha2d_bw09", 100),
379 getDBparmap(dbParmap, "bha2d_bw10", 100),
380 getDBparmap(dbParmap, "bha2d_bw11", 100),
381 getDBparmap(dbParmap, "bha2d_bw12", 100),
382 getDBparmap(dbParmap, "bha2d_bw13", 100),
383 getDBparmap(dbParmap, "bha2d_bw14", 100)
384 };
386 getDBparmap(dbParmap, "bha3dveto_e_l", 100),
387 getDBparmap(dbParmap, "bha3dveto_e_h", 100)
388 };
390 (int) getDBparmap(dbParmap, "bha3dveto_phi_d_l", 0),
391 (int) getDBparmap(dbParmap, "bha3dveto_phi_d_h", 0),
392 (int) getDBparmap(dbParmap, "bha3dveto_theta_s_l", 0),
393 (int) getDBparmap(dbParmap, "bha3dveto_theta_s_h", 0)
394 };
396 getDBparmap(dbParmap, "bha3dsel_e_l", 100),
397 getDBparmap(dbParmap, "bha3dsel_e_h", 100)
398 };
400 (int) getDBparmap(dbParmap, "bha3dsel_phi_d_l", 0),
401 (int) getDBparmap(dbParmap, "bha3dsel_phi_d_h", 0),
402 (int) getDBparmap(dbParmap, "bha3dsel_theta_s_l", 0),
403 (int) getDBparmap(dbParmap, "bha3dsel_theta_s_h", 0)
404 };
406 (int) getDBparmap(dbParmap, "bha3dsel_ps_fw", 0),
407 (int) getDBparmap(dbParmap, "bha3dsel_ps_br", 0),
408 (int) getDBparmap(dbParmap, "bha3dsel_ps_bw", 0)
409 };
410 m_mumuThreshold = getDBparmap(dbParmap, "mumu_e", 100);
411 m_mumuAngle = {
412 (int) getDBparmap(dbParmap, "mumu_phi_d_l", 0),
413 (int) getDBparmap(dbParmap, "mumu_phi_d_h", 0),
414 (int) getDBparmap(dbParmap, "mumu_theta_s_l", 0),
415 (int) getDBparmap(dbParmap, "mumu_theta_s_h", 0)
416 };
418 getDBparmap(dbParmap, "lml_cl_e_lab_1", 100),
419 getDBparmap(dbParmap, "lml_cl_e_lab_2", 100),
420 getDBparmap(dbParmap, "lml_cl_e_lab_3", 100)
421 };
423 getDBparmap(dbParmap, "lml_cl_e_cms_1", 100),
424 getDBparmap(dbParmap, "lml_cl_e_cms_2", 100),
425 getDBparmap(dbParmap, "lml_cl_e_cms_3", 100)
426 };
427 m_lml00NCLforMinE = (int) getDBparmap(dbParmap, "lml00_ncl", 100);
428 m_lml12NCLforMinE = (int) getDBparmap(dbParmap, "lml12_ncl", 100);
429 m_lml13ThetaIdSelection = (int) getDBparmap(dbParmap, "lml13_theta_id", 0);
430 m_ECLBurstThreshold = getDBparmap(dbParmap, "e_burst", 100);
432 getDBparmap(dbParmap, "event_timing_fine", 100),
433 getDBparmap(dbParmap, "event_timing_super", 100)
434 };
436 (int) getDBparmap(dbParmap, "bha3d_theta_id_in_trk_l", 100),
437 (int) getDBparmap(dbParmap, "bha3d_theta_id_in_trk_h", 0)
438 };
440 (int) getDBparmap(dbParmap, "taub2b_phi_d_l", 0),
441 (int) getDBparmap(dbParmap, "taub2b_phi_d_h", 0),
442 (int) getDBparmap(dbParmap, "taub2b_theta_s_l", 0),
443 (int) getDBparmap(dbParmap, "taub2b_theta_s_h", 0)
444 };
445 m_taub2bCLELabCut = getDBparmap(dbParmap, "taub2b_cl_e", 0);
446 m_taub2bEtotCut = getDBparmap(dbParmap, "taub2b_tot_e", 0);
448 (int) getDBparmap(dbParmap, "hie12_phi_d_l", 0),
449 (int) getDBparmap(dbParmap, "hie12_phi_d_h", 0),
450 (int) getDBparmap(dbParmap, "hie12_theta_s_l", 0),
451 (int) getDBparmap(dbParmap, "hie12_theta_s_h", 0)
452 };
454 (int) getDBparmap(dbParmap, "taub2b2_phi_d_l", 0),
455 (int) getDBparmap(dbParmap, "taub2b2_phi_d_h", 0),
456 (int) getDBparmap(dbParmap, "taub2b2_theta_s_l", 0),
457 (int) getDBparmap(dbParmap, "taub2b2_theta_s_h", 0)
458 };
459 m_taub2b2EtotCut = getDBparmap(dbParmap, "taub2b2_tot_e", 0);
461 getDBparmap(dbParmap, "taub2b2_cl_e_endcap", 100),
462 getDBparmap(dbParmap, "taub2b2_cl_e_all", 100)
463 };
465 (int) getDBparmap(dbParmap, "taub2b3_phi_d_l", 0),
466 (int) getDBparmap(dbParmap, "taub2b3_phi_d_h", 0),
467 (int) getDBparmap(dbParmap, "taub2b3_theta_s_l", 0),
468 (int) getDBparmap(dbParmap, "taub2b3_theta_s_h", 0)
469 };
470 m_taub2b3EtotCut = getDBparmap(dbParmap, "taub2b3_tot_e", 0);
471 m_taub2b3CLEb2bLabCut = getDBparmap(dbParmap, "taub2b3_cl_e_b2b", 0);
473 getDBparmap(dbParmap, "taub2b3_cl_e_all_l", 100),
474 getDBparmap(dbParmap, "taub2b3_cl_e_all_h", 100)
475 };
476 m_hie4LowCLELabCut = getDBparmap(dbParmap, "hie4_cl_e", 100);
477 }
478 //--------------------------------------------------------
479 //
480 //--------------------------------------------------------
481 B2DEBUG(100, "[TRGECLModule] Clustering method (0 := BelleI, 1 := BelleII) = "
482 << m_Clustering);
483
484 B2DEBUG(100, "[TRGECLModule] ConditionDB usage (0 := no, 1 := yes) = "
485 << m_ConditionDB);
486 B2DEBUG(100, "[TRGECLModule] ADC to Energy in Lab in GeV = "
487 << m_ADCtoEnergy);
488 B2DEBUG(100, "[TRGECLModule] TotalEnergyCut (Low, middle, high) in Lab in GeV = ("
489 << m_TotalEnergy[0] << ", "
490 << m_TotalEnergy[1] << ", "
491 << m_TotalEnergy[2] << ")");
492 B2DEBUG(100, "[TRGECLModule] 2D BhaV E FW in GeV = ("
493 << m_2DBhabhaThresholdFWD[0] << ", "
494 << m_2DBhabhaThresholdFWD[1] << ", "
495 << m_2DBhabhaThresholdFWD[2] << ", "
496 << m_2DBhabhaThresholdFWD[3] << ", "
497 << m_2DBhabhaThresholdFWD[4] << ", "
498 << m_2DBhabhaThresholdFWD[5] << ", "
499 << m_2DBhabhaThresholdFWD[6] << ", "
500 << m_2DBhabhaThresholdFWD[7] << ", "
501 << m_2DBhabhaThresholdFWD[8] << ", "
502 << m_2DBhabhaThresholdFWD[9] << ", "
503 << m_2DBhabhaThresholdFWD[10] << ", "
504 << m_2DBhabhaThresholdFWD[11] << ", "
505 << m_2DBhabhaThresholdFWD[12] << ", "
506 << m_2DBhabhaThresholdFWD[13] << ")");
507 B2DEBUG(100, "[TRGECLModule] 2D BhaV E BW in GeV = ("
508 << m_2DBhabhaThresholdBWD[0] << ", "
509 << m_2DBhabhaThresholdBWD[1] << ", "
510 << m_2DBhabhaThresholdBWD[2] << ", "
511 << m_2DBhabhaThresholdBWD[3] << ", "
512 << m_2DBhabhaThresholdBWD[4] << ", "
513 << m_2DBhabhaThresholdBWD[5] << ", "
514 << m_2DBhabhaThresholdBWD[6] << ", "
515 << m_2DBhabhaThresholdBWD[7] << ", "
516 << m_2DBhabhaThresholdBWD[8] << ", "
517 << m_2DBhabhaThresholdBWD[9] << ", "
518 << m_2DBhabhaThresholdBWD[10] << ", "
519 << m_2DBhabhaThresholdBWD[11] << ", "
520 << m_2DBhabhaThresholdBWD[12] << ", "
521 << m_2DBhabhaThresholdBWD[13] << ")");
522 B2DEBUG(100, "[TRGECLModule] 3D Bhabha veto CL E Threshold in CMS in GeV (Low, High) = ("
523 << m_3DBhabhaVetoThreshold[0] << ", "
524 << m_3DBhabhaVetoThreshold[1] << ")");
525 B2DEBUG(100, "[TRGECLModule] 3D Bhabha veto 2 CL angles in CMS in degree(dphi L, H, theta sum L, H) = ("
526 << m_3DBhabhaVetoAngle[0] << ", "
527 << m_3DBhabhaVetoAngle[1] << ", "
528 << m_3DBhabhaVetoAngle[2] << ", "
529 << m_3DBhabhaVetoAngle[3] << ")");
530 B2DEBUG(100, "[TRGECLModule] 3D Bhabha selection CL E Threshold in CMS in GeV (Low, High) = ("
531 << m_3DBhabhaSelectionThreshold[0] << ", "
532 << m_3DBhabhaSelectionThreshold[1] << ")");
533 B2DEBUG(100, "[TRGECLModule] 3D Bhabha selection 2 CL angles in CMS in degree(dphi L, H, theta sum L, H) = ("
534 << m_3DBhabhaSelectionAngle[0] << ", "
535 << m_3DBhabhaSelectionAngle[1] << ", "
536 << m_3DBhabhaSelectionAngle[2] << ", "
537 << m_3DBhabhaSelectionAngle[3] << ")");
538 B2DEBUG(100, "[TRGECLModule] 3D Bhabha selection prescale(FW, BR, BW) = ("
539 << m_3DBhabhaSelectionPreScale[0] << ", "
540 << m_3DBhabhaSelectionPreScale[1] << ", "
541 << m_3DBhabhaSelectionPreScale[2] << ")");
542 B2DEBUG(100, "[TRGECLModule] mumu CL E Threshold in CMS in GeV = "
543 << m_mumuThreshold);
544 B2DEBUG(100, "[TRGECLModule] mumu 2 CL angles in CMS in degree(dphi L, H, theta sum L, H) = ("
545 << m_mumuAngle[0] << ", "
546 << m_mumuAngle[1] << ", "
547 << m_mumuAngle[2] << ", "
548 << m_mumuAngle[3] << ")");
549 B2DEBUG(100, "[TRGECLModule] lml CL E cuts(high, mid, low) in Lab in GeV = ("
550 << m_lmlCLELabCut[0] << ", "
551 << m_lmlCLELabCut[1] << ", "
552 << m_lmlCLELabCut[2] << ")");
553 B2DEBUG(100, "[TRGECLModule] lml CL E cuts(high, mid, low) in CMS in GeV = ("
554 << m_lmlCLECMSCut[0] << ", "
555 << m_lmlCLECMSCut[1] << ", "
556 << m_lmlCLECMSCut[2] << ")");
557 B2DEBUG(100, "[TRGECLModule] lml00 the number of cluster for minimum energy cluster = "
559 B2DEBUG(100, "[TRGECLModule] lml12 the number of cluster for minimum energy cluster = "
561 B2DEBUG(100, "[TRGECLModule] lml13 ThetaID selection = "
563 B2DEBUG(100, "[TRGECLModule] ECL Burst Threshold in lab. in GeV = "
565 B2DEBUG(100, "[TRGECLModule] EventTimingQualityThreshold (low, high)= ("
567 << m_EventTimingQualityThreshold[1] << ") (GeV)");
568 B2DEBUG(100, "[TRGECLModule] 3DBhabhaVetoInTrackThetaRegion (low, high) = ("
571 B2DEBUG(100, "[TRGECLModule] Taub2b two CL Angle cut in CM (degree) (dphi L, H, theta sum L, H ) = ("
572 << m_taub2bAngleCut[0] << ", "
573 << m_taub2bAngleCut[1] << ", "
574 << m_taub2bAngleCut[2] << ", "
575 << m_taub2bAngleCut[3] << ")");
576 B2DEBUG(100, "[TRGECLModule] Taub2b Total Energy Cut in lab. (GeV) = "
577 << m_taub2bEtotCut);
578 B2DEBUG(100, "[TRGECLModule] Taub2b Cluster Energy Cut in lab. (GeV) = "
580 B2DEBUG(100, "[TRGECLModule] hie12 Bhabha Add Angle cut in CM (degree) (dphi L, H, theta sum L, H) = ("
581 << m_hie12BhabhaVetoAngle[0] << ", "
582 << m_hie12BhabhaVetoAngle[1] << ", "
583 << m_hie12BhabhaVetoAngle[2] << ", "
584 << m_hie12BhabhaVetoAngle[3] << ")");
585 B2DEBUG(100, "[TRGECLModule] Taub2b2 two CL Angle cut in CM (degree) (dphi L, H, theta sum L, H) = ("
586 << m_taub2b2AngleCut[0] << ", "
587 << m_taub2b2AngleCut[1] << ", "
588 << m_taub2b2AngleCut[2] << ", "
589 << m_taub2b2AngleCut[3] << ")");
590 B2DEBUG(100, "[TRGECLModule] Taub2b2 Total Energy Cut in lab. (GeV) = "
592 B2DEBUG(100, "[TRGECLModule] Taub2b2 Cluster energy cut(high, low) in lab. (GeV) = ("
593 << m_taub2b2CLELabCut[0] << ", "
594 << m_taub2b2CLELabCut[1] << ")");
595 B2DEBUG(100, "[TRGECLModule] Taub2b3 two CL Angle cut in CM (degree) (dphi L, H, theta sum L, H) = ("
596 << m_taub2b3AngleCut[0] << ", "
597 << m_taub2b3AngleCut[1] << ", "
598 << m_taub2b3AngleCut[2] << ", "
599 << m_taub2b3AngleCut[3] << ")");
600 B2DEBUG(100, "[TRGECLModule] Taub2b3 Total Energy Cut in lab. (GeV) = "
602 B2DEBUG(100, "[TRGECLModule] Taub2b3 Cluster energy cut in lab. for one of b2b clusters (GeV) = "
604 B2DEBUG(100, "[TRGECLModule] Taub2b3 Cluster energy cut(low, high) in lab. for all clusters (GeV) = ("
605 << m_taub2b3CLELabCut[0] << ", "
606 << m_taub2b3CLELabCut[1] << ")");
607 B2DEBUG(100, "[TRGECLModule] (hie4) CL E cut for minimum energy cluster = "
609
610 // set parameters to TRGECLMaster
611 etm->initialize();
612 etm->setClusterMethod(m_Clustering);
613 etm->setClusterLimit(m_ClusterLimit);
614 etm->setEventTimingMethod(m_EventTiming);
615 etm->setTimeWindow(m_TimeWindow);
616 etm->setOverlapWindow(m_OverlapWindow);
617 etm->setNofTopTC(m_NofTopTC);
618 //
619 etm->setADCtoEnergy(m_ADCtoEnergy);
620 etm->setTotalEnergyThreshold(m_TotalEnergy);
621 etm->set2DBhabhaThreshold(m_2DBhabhaThresholdFWD,
623 etm->set3DBhabhaVetoThreshold(m_3DBhabhaVetoThreshold);
624 etm->set3DBhabhaVetoAngle(m_3DBhabhaVetoAngle);
625 etm->set3DBhabhaSelectionThreshold(m_3DBhabhaSelectionThreshold);
626 etm->set3DBhabhaSelectionAngle(m_3DBhabhaSelectionAngle);
627 etm->set3DBhabhaSelectionPreScale(m_3DBhabhaSelectionPreScale);
628 etm->setmumuThreshold(m_mumuThreshold);
629 etm->setmumuAngle(m_mumuAngle);
630 etm->setlmlCLELabCut(m_lmlCLELabCut);
631 etm->setlmlCLECMSCut(m_lmlCLECMSCut);
632 etm->setlml00NCLforMinE(m_lml00NCLforMinE);
633 etm->setlml12NCLforMinE(m_lml12NCLforMinE);
634 etm->setlml13ThetaIdSelection(m_lml13ThetaIdSelection);
635 etm->setECLBurstThreshold(m_ECLBurstThreshold);
636 etm->setEventTimingQualityThreshold(m_EventTimingQualityThreshold);
637 etm->set3DBhabhaVetoInTrackThetaRegion(m_3DBhabhaVetoInTrackThetaRegion);
638 etm->setTaub2bAngleCut(m_taub2bAngleCut);
639 etm->setTaub2bEtotCut(m_taub2bEtotCut);
640 etm->setTaub2bCLELabCut(m_taub2bCLELabCut);
641 etm->sethie12BhabhaVetoAngle(m_hie12BhabhaVetoAngle);
642 etm->setTaub2b2Cut(m_taub2b2AngleCut,
645 etm->setTaub2b3Cut(m_taub2b3AngleCut,
649 etm->sethie4LowCLELabCut(m_hie4LowCLELabCut);
650
651 if (TRGDebug::level()) {
652 std::cout << "TRGECLModule ... beginRun called " << std::endl;
653 }
654
655 }
656 //
657 //
658 //
659 void
661 {
662
663 if (TRGDebug::level()) {
664 std::cout << "TRGECLMoudle ... event called" << std::endl;
665 }
666
667 // simulation
668 if (m_SelectEvent == 0) {
669 etm->simulate01(m_nEvent);
670 } else if (m_SelectEvent == 1) {
671 etm->simulate02(m_nEvent);
672 }
673
674 m_nEvent++;
675
676 }
677 //
678 //
679 //
680 double
681 TRGECLModule::getDBparmap(const std::map<std::string, double> dbParmap,
682 std::string parName,
683 double parAlternativeValue)
684 {
685 double par;
686 if (dbParmap.count(parName)) {
687 par = dbParmap.at(parName);
688 } else {
689 par = parAlternativeValue;
690 B2WARNING("No key(\"" + parName +
691 "\") for map in DB and set alternative value(" + parAlternativeValue +
692 ")");
693 }
694
695 return par;
696 }
697 //
698 //
699 //
700 void
702 {
703 if (TRGDebug::level()) {
704 std::cout << "TRGECLModule ... endRun called " << std::endl;
705 }
706 }
707 //
708 //
709 //
710 void
712 {
713 delete etm;
714
715 if (TRGDebug::level()) {
716 std::cout << "TRGECLModule ... terminate called " << std::endl;
717 }
718 }
719 //
720 //
721 //
723} // namespace Belle2
Class for accessing objects in the database.
Definition DBObjPtr.h:21
void setDescription(const std::string &description)
Sets the description of the module.
Definition Module.cc:214
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
Definition Module.cc:208
Module()
Constructor.
Definition Module.cc:30
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
Definition Module.h:80
int m_lml00NCLforMinE
lml0 the number of cluster for minimum energy
double m_taub2bEtotCut
taub2b total energy (TC theta ID =1-17) (GeV)
std::vector< int > m_hie12BhabhaVetoAngle
(hie1 and hie2) 2 cluster angle cut in CMS in degree for Bhabha veto in hie1 and hie2
int m_debugLevel
Parameters.
std::vector< int > m_3DBhabhaSelectionPreScale
3D Selection Bhabha preselection
int m_lml12NCLforMinE
lml12 the number of cluster for minimum energy
std::vector< double > m_2DBhabhaThresholdBWD
2D Bhabha Energy Threshold
double m_ECLBurstThreshold
ECL Burst Bit Threshold.
int m_Clustering
Clustering option.
std::vector< double > m_lmlCLECMSCut
Low Multiplicity cluster E cut in CMS in GeV.
std::vector< double > m_TotalEnergy
Total Energy Threshold (low, high, lum) in Lab in GeV.
std::vector< int > m_taub2bAngleCut
taub2b 2 cluster angle cut (degree) (dphi low, dphi high, theta_sum low, theta_sum high)
int m_ClusterLimit
Cluster Limit.
int m_SelectEvent
Event selection.
std::vector< int > m_mumuAngle
mumu bit Angle
StoreArray< TRGECLTrg > m_TRGECLTrg
output for TRGECLTrg
std::vector< int > m_3DBhabhaVetoInTrackThetaRegion
Theta region (low, high) of 3D Bhabha Veto InTrack.
int m_hitNum
The current number of created hits in an event.
double m_hie4LowCLELabCut
(hie4) CL E cut for minimum energy cluster
int m_EventTiming
Eventtiming option.
int m_hitTCNum
TC Hit number.
double m_OverlapWindow
Trigger decision overlap window in order to avoid boundary effect.
std::vector< int > m_3DBhabhaVetoAngle
3D Veto Bhabha Energy Angle
int m_nRun
Run number.
double m_ADCtoEnergy
conversion factor of ADC to Energy in GeV
TrgEclMaster * etm
ETM (ecl trigger master) to generate all trigger bits of ecl trigger.
int m_lml13ThetaIdSelection
lml13 cluster ThetaID selection
std::vector< double > m_3DBhabhaVetoThreshold
3D Veto Bhabha Energy Threshold
double m_taub2b2EtotCut
taub2b2 total energy cut in Lab (GeV)
std::vector< double > m_taub2b2CLELabCut
taub2b2 cluster energy cut(low, high) (GeV) in lab
std::vector< double > m_lmlCLELabCut
Low Multiplicity cluster E cut in Lab in GeV.
int m_nEvent
Event number.
std::vector< double > m_3DBhabhaSelectionThreshold
3D Selection Bhabha Energy Threshold
bool m_ConditionDB
Flag to use Condition DB.
StoreArray< TRGECLCluster > m_TRGECLCluster
output for TRGECLCluster
double m_taub2bCLELabCut
taub2b Cluster energy selection in Lab (GeV)
double m_mumuThreshold
mumu bit Energy Threshold
std::vector< int > m_3DBhabhaSelectionAngle
3D Selection Bhabha Energy Angle
std::vector< int > m_taub2b2AngleCut
taub2b2 two Cluster angle cut (degree)
double m_taub2b3EtotCut
taub2b3 total energy cut in lab (GeV)
std::vector< double > m_EventTimingQualityThreshold
Energy threshold(low, high) of event timing quality flag (GeV)
double m_taub2b3CLEb2bLabCut
taub2b3 cluster energy cut in lab for one of b2b clusters (GeV)
StoreArray< TRGECLHit > m_TRGECLHit
output for TRGECLHit
std::vector< double > m_2DBhabhaThresholdFWD
2D Bhabha Energy Threshold
std::vector< double > m_taub2b3CLELabCut
taub2b3 cluster energy cut(low and high) in lab for all clusters (GeV)
std::vector< int > m_taub2b3AngleCut
taub2b3 two Cluster angle cut in cms (degree)
double m_TimeWindow
Trigger decision time window.
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition Module.h:559
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition Module.h:649
virtual ~TRGECLModule()
Destructor.
virtual void initialize() override
Initializes TRGECLModule.
virtual void event() override
Called event by event.
virtual void endRun() override
Called when run ended.
virtual void terminate() override
Called when processing ended.
virtual void beginRun() override
Called when new run started.
double getDBparmap(const std::map< std::string, double >, std::string, double)
get payload from conditionDB
std::string version(void) const
returns version of TRGECLModule.
TRGECLModule()
Constructor.
static std::string tab(void)
returns tab spaces.
Definition Debug.cc:47
static int level(void)
returns the debug level.
Definition Debug.cc:67
Abstract base class for different kinds of events.
STL namespace.