Belle II Software prerelease-10-00-00a
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 //
50 m_TimeWindow(250.0), m_OverlapWindow(125.0), m_NofTopTC(3),
52 {
53
54 string desc = "TRGECLModule(" + version() + ")";
55 setDescription(desc);
57
58 addParam("DebugLevel",
60 "TRGECL debug level",
62 addParam("Bhabha",
64 "TRGECL Bhabha method 0 : Belle I, 1 :belle II(default)",
65 m_Bhabha);
66 addParam("Clustering",
68 "TRGECL Clustering method 0 : use only ICN, 1 : ICN + Energy(Default)",
70 addParam("ClusterLimit",
72 "The Limit number of cluster (Default:6)",
74 addParam("EventTiming",
76 "TRGECL EventTiming method 0 : Belle I, 1 : Energetic TC, 2 : Energy Weighted timing (default)",
78 addParam("NofTopTC",
80 "TRGECL # of considered TC in energy weighted Timing method(Only work for EvenTiming Method 2)",
82 addParam("TimeWindow",
84 "TRGECL Trigger decision Time Window",
86 addParam("OverlapWindow",
88 "TRGECL Trigger decision Time Window",
90 addParam("EventSelect",
92 "TRGECL Select one trigger window for logic study",
94 addParam("ConditionDB",
96 "Flag to use Condition Database (0:=not use, 1:=use(default))",
98 //-----------------------------------------------
99 addParam("ADCtoEnergy",
101 "set conversion factor of ADC to Energy (GeV) : ",
103 addParam("TotalEnergyCut",
105 "set total energy cut(lowe, hie, lumie) in lab (GeV) : ",
107 addParam("Bhabha2DThresholdFWD",
109 "set energy threshold(14 regions) of 2D Bhabha veto for FWD side in Lab. (GeV) : ",
111 addParam("Bhabha2DThresholdBWD",
113 "set energy threshold(14 regions) of 2D Bhabha veto for BWD side in Lab. (GeV) : ",
115 addParam("Bhabha3DVetoThreshold",
117 "set energy threshold(low, high) of 3D Bhabha veto in CMS (GeV) : ",
119 addParam("Bhabha3DVetoAngle",
121 "set angle cut (phi diff L, H, and theta sum L, H) of 3D Bhabha veto in CMS(degree) : ",
123 addParam("Bhabha3DSelectionThreshold",
125 "set energy threshold(low, high) of 3D Bhabha selection in CMS (GeV) : ",
127 addParam("Bhabha3DSelectionAngle",
129 "set angle cut (phi diff L, H, and theta sum L, H) of 3D Bhabha selection in CMS(degree) : ",
131 addParam("Bhabha3DSelectionPreScale",
133 "set prescale (FW, BR, BW for Bhabha selection : ",
135 addParam("mumuThreshold",
137 "set cluster energy cut for mumu in CMS (GeV) : ",
139 addParam("mumuAngle",
141 "set angle cut (phi diff L, H, and theta sum L, H) of mumu in CMS(degree) : ",
143
144 addParam("lmlCLELabCut",
146 "set lml cluster energy thresholds(high, middle, low) in Lab in GeV : ",
148 addParam("lmlCLECMSCut",
150 "set lml cluster energy thresholds(high, middle, low) in CMS in GeV : ",
152 addParam("lml00NCLforMinE",
154 "set lml00 the number of cluster for minimum energy cluster : ",
156 addParam("lml12NCLforMinE",
158 "set lml12 the number of cluster for minimum energy cluster : ",
160 addParam("lml13ThetaIdSelection",
162 "set lml13 theta ID selection : ",
164
165 addParam("ECLBurstThreshold",
167 "set ECL Burst Threshold in lab in GeV : ",
169 addParam("EventTimingQualityThreshold",
171 "set EventTimingQualityThreshold (low energy(GeV) and high energy(GeV))",
173
174 addParam("3DBhabhaVetoInTrackThetaRegion",
176 "set 3DBhabhaVetoInTrackThetaRegion (low TCID and high TCID)",
178
179 addParam("Taub2bAngleCut",
181 "set Taub2bAngleCut(dphi low and high, theta sum low and high(degree)",
183 addParam("Taub2bEtotCut",
185 "set Taub2b total energy cut in TC ThetaID 1-17(GeV)",
187 addParam("Taub2bCLELabCut",
189 "set Taub2b cluster energy cut in Lab (GeV) : ",
191
192 addParam("hie12BhabhaVetoAngle",
194 "set Angle Cut of Bhbaha Additional veto for hie (dphi low and high, theta sum low and high(degree)",
196
197 addParam("Taub2b2AngleCut",
199 "set Taub2b2AngleCut(dphi low and high, theta sum low and high(degree))",
201 addParam("Taub2b2EtotCut",
203 "set Taub2b2 total energy cut in TC ThetaID 1-17(GeV)",
205 addParam("Taub2b2CLELabCut",
207 "set Taub2b2 cluster energy Cut(high, low) (GeV) : ",
209
210 addParam("Taub2b3AngleCut",
212 "set Taub2b3AngleCut(dphi low and high, theta sum low and high in cms (degree))",
214 addParam("Taub2b3EtotCut",
216 "set Taub2b3 total energy cut in lab in ThetaID 1-17(GeV)",
218 addParam("Taub2b3CLEb2bLabCut",
220 "set Taub2b3 cluster energy Cut in lab for one of b2b clusters (GeV) : ",
222 addParam("Taub2b3CLELabCut",
224 "set Taub2b3 cluster energy Cut(low, high) in lab for all clusters (GeV) : ",
226
227 //-------------------------------------
228 m_TotalEnergy.clear();
232 m_3DBhabhaVetoAngle.clear();
236 m_mumuAngle.clear();
237 m_lmlCLELabCut.clear();
238 m_lmlCLECMSCut.clear();
242 m_taub2bAngleCut.clear();
243 m_taub2b2AngleCut.clear();
244 m_taub2b2CLELabCut.clear();
245 m_taub2b3AngleCut.clear();
246 m_taub2b3CLELabCut.clear();
247 // lowe, hie, lume in Lab in GeV
248 m_TotalEnergy = {0.5, 1.0, 3.0};
249 // 2D Bhabha E cut in Lab in GeV (forward and backward sides)
250 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};
251 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};
252 // 3D Bhabha
253 m_3DBhabhaVetoThreshold = {3.0, 4.5}; // GeV
254 m_3DBhabhaVetoAngle = {160, 200, 165, 190}; // degree
255 // 3D Bhabha selection
256 m_3DBhabhaSelectionThreshold = {2.5, 4.0}; // GeV
257 m_3DBhabhaSelectionAngle = {140, 220, 160, 200}; // degree
258 m_3DBhabhaSelectionPreScale = {1, 1, 1}; // pre-scale(no unit)
259 // mumu
260 m_mumuThreshold = 2.0; // GeV
261 m_mumuAngle = {160, 200, 165, 190}; // degree
262 // lml
263 m_lmlCLELabCut = {0.5, 0.3, 0.25}; // in GeV
264 m_lmlCLECMSCut = {2.0, 1.0, 0.5}; // in GeV
268 //
269 m_ECLBurstThreshold = 20.0; // GeV
270 //
271 m_EventTimingQualityThreshold = {1.0, 20}; // GeV
272 //
274 // taub2b
275 m_taub2bAngleCut = {110, 250, 130, 230}; // degree
276 m_taub2bEtotCut = 7.0; // GeV
277 m_taub2bCLELabCut = 1.9; // GeV
278 //
279 m_hie12BhabhaVetoAngle = {150, 210, 160, 200}; // degree
280 // taub2b2
281 m_taub2b2AngleCut = {120, 240, 140, 220}; // degree
282 m_taub2b2EtotCut = 7.0; // GeV
283 m_taub2b2CLELabCut = {3.0, 0.162}; // GeV
284 // taub2b3
285 m_taub2b3AngleCut = {120, 240, 140, 220}; // degree
286 m_taub2b3EtotCut = 7.0; // GeV
287 m_taub2b3CLEb2bLabCut = 0.14; // GeV
288 m_taub2b3CLELabCut = {0.12, 4.50}; // GeV
289 //
290 m_hie4LowCLELabCut = 0.5; // GeV
291
292 if (TRGDebug::level()) {
293 std::cout << "TRGECLModule ... created" << std::endl;
294 }
295 }
296 //
297 //
298 //
300 {
301 if (TRGDebug::level()) {
302 std::cout << "TRGECLModule ... destructed " << std::endl;
303
304 }
305 }
306 //
307 //
308 //
309 void
311 {
312
314
315 if (TRGDebug::level()) {
316 std::cout << "TRGECLModule::initialize ... options" << std::endl;
317 std::cout << TRGDebug::tab(4) << "debug level = " << TRGDebug::level()
318 << std::endl;
319 }
320 //
321 //
322 //
323 m_nRun = 0 ;
324 m_nEvent = 0 ;
325 m_hitNum = 0;
326 m_hitTCNum = 0;
327
328 m_TRGECLHit.registerInDataStore();
329 m_TRGECLTrg.registerInDataStore();
330 m_TRGECLCluster.registerInDataStore();
331
332 etm = new TrgEclMaster();
333
334 }
335 //
336 //
337 //
338 void
340 {
341
342 if (m_ConditionDB) {
343
345 DBObjPtr<TRGECLETMParameters> m_ETMParameters;
346
347 const auto& dbParmap = m_ETMParameters->getparMap();
348
349 B2DEBUG(100, "[TRGECLModule] valid N(par) in ETMParameters = "
350 << m_ETMParameters->getnpar());
351 B2DEBUG(100, "[TRGECLModule] all N(par) in ETMParameters = "
352 << dbParmap.size());
353
354 m_ADCtoEnergy = getDBparmap(dbParmap, "adc2energy", 0);
355 m_TotalEnergy = {
356 getDBparmap(dbParmap, "lowe", 100),
357 getDBparmap(dbParmap, "hie", 100),
358 getDBparmap(dbParmap, "lume", 100)
359 };
361 getDBparmap(dbParmap, "bha2d_fw01", 100),
362 getDBparmap(dbParmap, "bha2d_fw02", 100),
363 getDBparmap(dbParmap, "bha2d_fw03", 100),
364 getDBparmap(dbParmap, "bha2d_fw04", 100),
365 getDBparmap(dbParmap, "bha2d_fw05", 100),
366 getDBparmap(dbParmap, "bha2d_fw06", 100),
367 getDBparmap(dbParmap, "bha2d_fw07", 100),
368 getDBparmap(dbParmap, "bha2d_fw08", 100),
369 getDBparmap(dbParmap, "bha2d_fw09", 100),
370 getDBparmap(dbParmap, "bha2d_fw10", 100),
371 getDBparmap(dbParmap, "bha2d_fw11", 100),
372 getDBparmap(dbParmap, "bha2d_fw12", 100),
373 getDBparmap(dbParmap, "bha2d_fw13", 100),
374 getDBparmap(dbParmap, "bha2d_fw14", 100)
375 };
377 getDBparmap(dbParmap, "bha2d_bw01", 100),
378 getDBparmap(dbParmap, "bha2d_bw02", 100),
379 getDBparmap(dbParmap, "bha2d_bw03", 100),
380 getDBparmap(dbParmap, "bha2d_bw04", 100),
381 getDBparmap(dbParmap, "bha2d_bw05", 100),
382 getDBparmap(dbParmap, "bha2d_bw06", 100),
383 getDBparmap(dbParmap, "bha2d_bw07", 100),
384 getDBparmap(dbParmap, "bha2d_bw08", 100),
385 getDBparmap(dbParmap, "bha2d_bw09", 100),
386 getDBparmap(dbParmap, "bha2d_bw10", 100),
387 getDBparmap(dbParmap, "bha2d_bw11", 100),
388 getDBparmap(dbParmap, "bha2d_bw12", 100),
389 getDBparmap(dbParmap, "bha2d_bw13", 100),
390 getDBparmap(dbParmap, "bha2d_bw14", 100)
391 };
393 getDBparmap(dbParmap, "bha3dveto_e_l", 100),
394 getDBparmap(dbParmap, "bha3dveto_e_h", 100)
395 };
397 (int) getDBparmap(dbParmap, "bha3dveto_phi_d_l", 0),
398 (int) getDBparmap(dbParmap, "bha3dveto_phi_d_h", 0),
399 (int) getDBparmap(dbParmap, "bha3dveto_theta_s_l", 0),
400 (int) getDBparmap(dbParmap, "bha3dveto_theta_s_h", 0)
401 };
403 getDBparmap(dbParmap, "bha3dsel_e_l", 100),
404 getDBparmap(dbParmap, "bha3dsel_e_h", 100)
405 };
407 (int) getDBparmap(dbParmap, "bha3dsel_phi_d_l", 0),
408 (int) getDBparmap(dbParmap, "bha3dsel_phi_d_h", 0),
409 (int) getDBparmap(dbParmap, "bha3dsel_theta_s_l", 0),
410 (int) getDBparmap(dbParmap, "bha3dsel_theta_s_h", 0)
411 };
413 (int) getDBparmap(dbParmap, "bha3dsel_ps_fw", 0),
414 (int) getDBparmap(dbParmap, "bha3dsel_ps_br", 0),
415 (int) getDBparmap(dbParmap, "bha3dsel_ps_bw", 0)
416 };
417 m_mumuThreshold = getDBparmap(dbParmap, "mumu_e", 100);
418 m_mumuAngle = {
419 (int) getDBparmap(dbParmap, "mumu_phi_d_l", 0),
420 (int) getDBparmap(dbParmap, "mumu_phi_d_h", 0),
421 (int) getDBparmap(dbParmap, "mumu_theta_s_l", 0),
422 (int) getDBparmap(dbParmap, "mumu_theta_s_h", 0)
423 };
425 getDBparmap(dbParmap, "lml_cl_e_lab_1", 100),
426 getDBparmap(dbParmap, "lml_cl_e_lab_2", 100),
427 getDBparmap(dbParmap, "lml_cl_e_lab_3", 100)
428 };
430 getDBparmap(dbParmap, "lml_cl_e_cms_1", 100),
431 getDBparmap(dbParmap, "lml_cl_e_cms_2", 100),
432 getDBparmap(dbParmap, "lml_cl_e_cms_3", 100)
433 };
434 m_lml00NCLforMinE = (int) getDBparmap(dbParmap, "lml00_ncl", 100);
435 m_lml12NCLforMinE = (int) getDBparmap(dbParmap, "lml12_ncl", 100);
436 m_lml13ThetaIdSelection = (int) getDBparmap(dbParmap, "lml13_theta_id", 0);
437 m_ECLBurstThreshold = getDBparmap(dbParmap, "e_burst", 100);
439 getDBparmap(dbParmap, "event_timing_fine", 100),
440 getDBparmap(dbParmap, "event_timing_super", 100)
441 };
443 (int) getDBparmap(dbParmap, "bha3d_theta_id_in_trk_l", 100),
444 (int) getDBparmap(dbParmap, "bha3d_theta_id_in_trk_h", 0)
445 };
447 (int) getDBparmap(dbParmap, "taub2b_phi_d_l", 0),
448 (int) getDBparmap(dbParmap, "taub2b_phi_d_h", 0),
449 (int) getDBparmap(dbParmap, "taub2b_theta_s_l", 0),
450 (int) getDBparmap(dbParmap, "taub2b_theta_s_h", 0)
451 };
452 m_taub2bCLELabCut = getDBparmap(dbParmap, "taub2b_cl_e", 0);
453 m_taub2bEtotCut = getDBparmap(dbParmap, "taub2b_tot_e", 0);
455 (int) getDBparmap(dbParmap, "hie12_phi_d_l", 0),
456 (int) getDBparmap(dbParmap, "hie12_phi_d_h", 0),
457 (int) getDBparmap(dbParmap, "hie12_theta_s_l", 0),
458 (int) getDBparmap(dbParmap, "hie12_theta_s_h", 0)
459 };
461 (int) getDBparmap(dbParmap, "taub2b2_phi_d_l", 0),
462 (int) getDBparmap(dbParmap, "taub2b2_phi_d_h", 0),
463 (int) getDBparmap(dbParmap, "taub2b2_theta_s_l", 0),
464 (int) getDBparmap(dbParmap, "taub2b2_theta_s_h", 0)
465 };
466 m_taub2b2EtotCut = getDBparmap(dbParmap, "taub2b2_tot_e", 0);
468 getDBparmap(dbParmap, "taub2b2_cl_e_endcap", 100),
469 getDBparmap(dbParmap, "taub2b2_cl_e_all", 100)
470 };
472 (int) getDBparmap(dbParmap, "taub2b3_phi_d_l", 0),
473 (int) getDBparmap(dbParmap, "taub2b3_phi_d_h", 0),
474 (int) getDBparmap(dbParmap, "taub2b3_theta_s_l", 0),
475 (int) getDBparmap(dbParmap, "taub2b3_theta_s_h", 0)
476 };
477 m_taub2b3EtotCut = getDBparmap(dbParmap, "taub2b3_tot_e", 0);
478 m_taub2b3CLEb2bLabCut = getDBparmap(dbParmap, "taub2b3_cl_e_b2b", 0);
480 getDBparmap(dbParmap, "taub2b3_cl_e_all_l", 100),
481 getDBparmap(dbParmap, "taub2b3_cl_e_all_h", 100)
482 };
483 m_hie4LowCLELabCut = getDBparmap(dbParmap, "hie4_cl_e", 100);
484 }
485 //--------------------------------------------------------
486 //
487 //--------------------------------------------------------
488 B2DEBUG(100, "[TRGECLModule] Clustering method (0 := BelleI, 1 := BelleII) = "
489 << m_Clustering);
490
491 B2DEBUG(100, "[TRGECLModule] ConditionDB usage (0 := no, 1 := yes) = "
492 << m_ConditionDB);
493 B2DEBUG(100, "[TRGECLModule] ADC to Energy in Lab in GeV = "
494 << m_ADCtoEnergy);
495 B2DEBUG(100, "[TRGECLModule] TotalEnergyCut (Low, middle, high) in Lab in GeV = ("
496 << m_TotalEnergy[0] << ", "
497 << m_TotalEnergy[1] << ", "
498 << m_TotalEnergy[2] << ")");
499 B2DEBUG(100, "[TRGECLModule] 2D BhaV E FW in GeV = ("
500 << m_2DBhabhaThresholdFWD[0] << ", "
501 << m_2DBhabhaThresholdFWD[1] << ", "
502 << m_2DBhabhaThresholdFWD[2] << ", "
503 << m_2DBhabhaThresholdFWD[3] << ", "
504 << m_2DBhabhaThresholdFWD[4] << ", "
505 << m_2DBhabhaThresholdFWD[5] << ", "
506 << m_2DBhabhaThresholdFWD[6] << ", "
507 << m_2DBhabhaThresholdFWD[7] << ", "
508 << m_2DBhabhaThresholdFWD[8] << ", "
509 << m_2DBhabhaThresholdFWD[9] << ", "
510 << m_2DBhabhaThresholdFWD[10] << ", "
511 << m_2DBhabhaThresholdFWD[11] << ", "
512 << m_2DBhabhaThresholdFWD[12] << ", "
513 << m_2DBhabhaThresholdFWD[13] << ")");
514 B2DEBUG(100, "[TRGECLModule] 2D BhaV E BW in GeV = ("
515 << m_2DBhabhaThresholdBWD[0] << ", "
516 << m_2DBhabhaThresholdBWD[1] << ", "
517 << m_2DBhabhaThresholdBWD[2] << ", "
518 << m_2DBhabhaThresholdBWD[3] << ", "
519 << m_2DBhabhaThresholdBWD[4] << ", "
520 << m_2DBhabhaThresholdBWD[5] << ", "
521 << m_2DBhabhaThresholdBWD[6] << ", "
522 << m_2DBhabhaThresholdBWD[7] << ", "
523 << m_2DBhabhaThresholdBWD[8] << ", "
524 << m_2DBhabhaThresholdBWD[9] << ", "
525 << m_2DBhabhaThresholdBWD[10] << ", "
526 << m_2DBhabhaThresholdBWD[11] << ", "
527 << m_2DBhabhaThresholdBWD[12] << ", "
528 << m_2DBhabhaThresholdBWD[13] << ")");
529 B2DEBUG(100, "[TRGECLModule] 3D Bhabha veto CL E Threshold in CMS in GeV (Low, High) = ("
530 << m_3DBhabhaVetoThreshold[0] << ", "
531 << m_3DBhabhaVetoThreshold[1] << ")");
532 B2DEBUG(100, "[TRGECLModule] 3D Bhabha veto 2 CL angles in CMS in degree(dphi L, H, theta sum L, H) = ("
533 << m_3DBhabhaVetoAngle[0] << ", "
534 << m_3DBhabhaVetoAngle[1] << ", "
535 << m_3DBhabhaVetoAngle[2] << ", "
536 << m_3DBhabhaVetoAngle[3] << ")");
537 B2DEBUG(100, "[TRGECLModule] 3D Bhabha selection CL E Threshold in CMS in GeV (Low, High) = ("
538 << m_3DBhabhaSelectionThreshold[0] << ", "
539 << m_3DBhabhaSelectionThreshold[1] << ")");
540 B2DEBUG(100, "[TRGECLModule] 3D Bhabha selection 2 CL angles in CMS in degree(dphi L, H, theta sum L, H) = ("
541 << m_3DBhabhaSelectionAngle[0] << ", "
542 << m_3DBhabhaSelectionAngle[1] << ", "
543 << m_3DBhabhaSelectionAngle[2] << ", "
544 << m_3DBhabhaSelectionAngle[3] << ")");
545 B2DEBUG(100, "[TRGECLModule] 3D Bhabha selection prescale(FW, BR, BW) = ("
546 << m_3DBhabhaSelectionPreScale[0] << ", "
547 << m_3DBhabhaSelectionPreScale[1] << ", "
548 << m_3DBhabhaSelectionPreScale[2] << ")");
549 B2DEBUG(100, "[TRGECLModule] mumu CL E Threshold in CMS in GeV = "
550 << m_mumuThreshold);
551 B2DEBUG(100, "[TRGECLModule] mumu 2 CL angles in CMS in degree(dphi L, H, theta sum L, H) = ("
552 << m_mumuAngle[0] << ", "
553 << m_mumuAngle[1] << ", "
554 << m_mumuAngle[2] << ", "
555 << m_mumuAngle[3] << ")");
556 B2DEBUG(100, "[TRGECLModule] lml CL E cuts(high, mid, low) in Lab in GeV = ("
557 << m_lmlCLELabCut[0] << ", "
558 << m_lmlCLELabCut[1] << ", "
559 << m_lmlCLELabCut[2] << ")");
560 B2DEBUG(100, "[TRGECLModule] lml CL E cuts(high, mid, low) in CMS in GeV = ("
561 << m_lmlCLECMSCut[0] << ", "
562 << m_lmlCLECMSCut[1] << ", "
563 << m_lmlCLECMSCut[2] << ")");
564 B2DEBUG(100, "[TRGECLModule] lml00 the number of cluster for minimum energy cluster = "
566 B2DEBUG(100, "[TRGECLModule] lml12 the number of cluster for minimum energy cluster = "
568 B2DEBUG(100, "[TRGECLModule] lml13 ThetaID selection = "
570 B2DEBUG(100, "[TRGECLModule] ECL Burst Threshold in lab. in GeV = "
572 B2DEBUG(100, "[TRGECLModule] EventTimingQualityThreshold (low, high)= ("
574 << m_EventTimingQualityThreshold[1] << ") (GeV)");
575 B2DEBUG(100, "[TRGECLModule] 3DBhabhaVetoInTrackThetaRegion (low, high) = ("
578 B2DEBUG(100, "[TRGECLModule] Taub2b two CL Angle cut in CM (degree) (dphi L, H, theta sum L, H ) = ("
579 << m_taub2bAngleCut[0] << ", "
580 << m_taub2bAngleCut[1] << ", "
581 << m_taub2bAngleCut[2] << ", "
582 << m_taub2bAngleCut[3] << ")");
583 B2DEBUG(100, "[TRGECLModule] Taub2b Total Energy Cut in lab. (GeV) = "
584 << m_taub2bEtotCut);
585 B2DEBUG(100, "[TRGECLModule] Taub2b Cluster Energy Cut in lab. (GeV) = "
587 B2DEBUG(100, "[TRGECLModule] hie12 Bhabha Add Angle cut in CM (degree) (dphi L, H, theta sum L, H) = ("
588 << m_hie12BhabhaVetoAngle[0] << ", "
589 << m_hie12BhabhaVetoAngle[1] << ", "
590 << m_hie12BhabhaVetoAngle[2] << ", "
591 << m_hie12BhabhaVetoAngle[3] << ")");
592 B2DEBUG(100, "[TRGECLModule] Taub2b2 two CL Angle cut in CM (degree) (dphi L, H, theta sum L, H) = ("
593 << m_taub2b2AngleCut[0] << ", "
594 << m_taub2b2AngleCut[1] << ", "
595 << m_taub2b2AngleCut[2] << ", "
596 << m_taub2b2AngleCut[3] << ")");
597 B2DEBUG(100, "[TRGECLModule] Taub2b2 Total Energy Cut in lab. (GeV) = "
599 B2DEBUG(100, "[TRGECLModule] Taub2b2 Cluster energy cut(high, low) in lab. (GeV) = ("
600 << m_taub2b2CLELabCut[0] << ", "
601 << m_taub2b2CLELabCut[1] << ")");
602 B2DEBUG(100, "[TRGECLModule] Taub2b3 two CL Angle cut in CM (degree) (dphi L, H, theta sum L, H) = ("
603 << m_taub2b3AngleCut[0] << ", "
604 << m_taub2b3AngleCut[1] << ", "
605 << m_taub2b3AngleCut[2] << ", "
606 << m_taub2b3AngleCut[3] << ")");
607 B2DEBUG(100, "[TRGECLModule] Taub2b3 Total Energy Cut in lab. (GeV) = "
609 B2DEBUG(100, "[TRGECLModule] Taub2b3 Cluster energy cut in lab. for one of b2b clusters (GeV) = "
611 B2DEBUG(100, "[TRGECLModule] Taub2b3 Cluster energy cut(low, high) in lab. for all clusters (GeV) = ("
612 << m_taub2b3CLELabCut[0] << ", "
613 << m_taub2b3CLELabCut[1] << ")");
614 B2DEBUG(100, "[TRGECLModule] (hie4) CL E cut for minimum energy cluster = "
616
617 // set parameters to TRGECLMaster
618 etm->initialize();
619 etm->setClusterMethod(m_Clustering);
620 etm->setClusterLimit(m_ClusterLimit);
621 etm->setBhabhaMethod(m_Bhabha);
622 etm->setEventTimingMethod(m_EventTiming);
623 etm->setTimeWindow(m_TimeWindow);
624 etm->setOverlapWindow(m_OverlapWindow);
625 etm->setNofTopTC(m_NofTopTC);
626 //
627 etm->setADCtoEnergy(m_ADCtoEnergy);
628 etm->setTotalEnergyThreshold(m_TotalEnergy);
629 etm->set2DBhabhaThreshold(m_2DBhabhaThresholdFWD,
631 etm->set3DBhabhaVetoThreshold(m_3DBhabhaVetoThreshold);
632 etm->set3DBhabhaVetoAngle(m_3DBhabhaVetoAngle);
633 etm->set3DBhabhaSelectionThreshold(m_3DBhabhaSelectionThreshold);
634 etm->set3DBhabhaSelectionAngle(m_3DBhabhaSelectionAngle);
635 etm->set3DBhabhaSelectionPreScale(m_3DBhabhaSelectionPreScale);
636 etm->setmumuThreshold(m_mumuThreshold);
637 etm->setmumuAngle(m_mumuAngle);
638 etm->setlmlCLELabCut(m_lmlCLELabCut);
639 etm->setlmlCLECMSCut(m_lmlCLECMSCut);
640 etm->setlml00NCLforMinE(m_lml00NCLforMinE);
641 etm->setlml12NCLforMinE(m_lml12NCLforMinE);
642 etm->setlml13ThetaIdSelection(m_lml13ThetaIdSelection);
643 etm->setECLBurstThreshold(m_ECLBurstThreshold);
644 etm->setEventTimingQualityThreshold(m_EventTimingQualityThreshold);
645 etm->set3DBhabhaVetoInTrackThetaRegion(m_3DBhabhaVetoInTrackThetaRegion);
646 etm->setTaub2bAngleCut(m_taub2bAngleCut);
647 etm->setTaub2bEtotCut(m_taub2bEtotCut);
648 etm->setTaub2bCLELabCut(m_taub2bCLELabCut);
649 etm->sethie12BhabhaVetoAngle(m_hie12BhabhaVetoAngle);
650 etm->setTaub2b2Cut(m_taub2b2AngleCut,
653 etm->setTaub2b3Cut(m_taub2b3AngleCut,
657 etm->sethie4LowCLELabCut(m_hie4LowCLELabCut);
658
659 if (TRGDebug::level()) {
660 std::cout << "TRGECLModule ... beginRun called " << std::endl;
661 }
662
663 }
664 //
665 //
666 //
667 void
669 {
670
671 if (TRGDebug::level()) {
672 std::cout << "TRGECLMoudle ... event called" << std::endl;
673 }
674
675 // simulation
676 if (m_SelectEvent == 0) {
677 etm->simulate01(m_nEvent);
678 } else if (m_SelectEvent == 1) {
679 etm->simulate02(m_nEvent);
680 }
681
682 m_nEvent++;
683
684 }
685 //
686 //
687 //
688 double
689 TRGECLModule::getDBparmap(const std::map<std::string, double> dbParmap,
690 std::string parName,
691 double parAlternativeValue)
692 {
693 double par;
694 if (dbParmap.count(parName)) {
695 par = dbParmap.at(parName);
696 } else {
697 par = parAlternativeValue;
698 B2WARNING("No key(\"" + parName +
699 "\") for map in DB and set alternative value(" + parAlternativeValue +
700 ")");
701 }
702
703 return par;
704 }
705 //
706 //
707 //
708 void
710 {
711 if (TRGDebug::level()) {
712 std::cout << "TRGECLModule ... endRun called " << std::endl;
713 }
714 }
715 //
716 //
717 //
718 void
720 {
721 delete etm;
722
723 if (TRGDebug::level()) {
724 std::cout << "TRGECLModule ... terminate called " << std::endl;
725 }
726 }
727 //
728 //
729 //
731} // 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
int m_Bhabha
Bhabha option.
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.