Belle II Software development
ECLDataAnalysisModule.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/* Own header. */
10#include <ecl/modules/eclDataAnalysis/ECLDataAnalysisModule.h>
11
12/* ECL headers. */
13#include <ecl/dataobjects/ECLCalDigit.h>
14#include <ecl/dataobjects/ECLConnectedRegion.h>
15#include <ecl/dataobjects/ECLDigit.h>
16#include <ecl/dataobjects/ECLHit.h>
17#include <ecl/dataobjects/ECLLocalMaximum.h>
18#include <ecl/dataobjects/ECLPidLikelihood.h>
19#include <ecl/dataobjects/ECLShower.h>
20#include <ecl/dataobjects/ECLSimHit.h>
21
22/* Basf2 headers. */
23#include <framework/dataobjects/EventMetaData.h>
24#include <framework/datastore/RelationVector.h>
25#include <framework/gearbox/Const.h>
26#include <framework/logging/Logger.h>
27#include <mdst/dataobjects/ECLCluster.h>
28#include <mdst/dataobjects/EventLevelClusteringInfo.h>
29#include <mdst/dataobjects/MCParticle.h>
30#include <mdst/dataobjects/Track.h>
31
32/* ROOT headers. */
33#include <TFile.h>
34#include <TMath.h>
35#include <TTree.h>
36
37using namespace std;
38using namespace Belle2;
39
40//-----------------------------------------------------------------
41// Register the Module
42//-----------------------------------------------------------------
43
44REG_MODULE(ECLDataAnalysis);
45
46//-----------------------------------------------------------------
47// Implementation
48//-----------------------------------------------------------------
49
51 : Module(),
54 m_doTracking(0),
69 m_tree(0),
71 m_iRun(0),
72 m_iEvent(0),
73//Digit
82//CalDigit
109//Connected Region
110 m_eclCRIdx(0),
118//Local Maxima
119 m_eclLMMultip(0),
120 m_eclLMId(0),
121 m_eclLMType(0),
122 m_eclLMCellId(0),
123//SimHit
131 m_eclSimHitX(0),
132 m_eclSimHitY(0),
133 m_eclSimHitZ(0),
134 m_eclSimHitPx(0),
135 m_eclSimHitPy(0),
136 m_eclSimHitPz(0),
137//Hit
139 m_eclHitIdx(0),
140 m_eclHitToMC(0),
148//Cluster
177 m_eclClusterR(0),
199
200//PureDigits
209//PureCalDigit
236//Connected Region
245//Local Maxima
247 m_eclPureLMId(0),
250//PureCluster
297
298//Shower
347 m_eclShowerR(0),
376//MC
377 m_mcMultip(0),
378 m_mcIdx(0),
379 m_mcPdg(0),
380 m_mcMothPdg(0),
381 m_mcGMothPdg(0),
382 m_mcGGMothPdg(0),
383 m_mcEnergy(0),
384 m_mcPx(0),
385 m_mcPy(0),
386 m_mcPz(0),
387 m_mcDecayVtxX(0),
388 m_mcDecayVtxY(0),
389 m_mcDecayVtxZ(0),
390 m_mcProdVtxX(0),
391 m_mcProdVtxY(0),
392 m_mcProdVtxZ(0),
394//Tracks
395 m_trkMultip(0),
396 m_trkPdg(0),
397 m_trkIdx(0),
398 m_trkCharge(0),
399 m_trkPx(0),
400 m_trkPy(0),
401 m_trkPz(0),
402 m_trkP(0),
403 m_trkTheta(0),
404 m_trkPhi(0),
405 m_trkX(0),
406 m_trkY(0),
407 m_trkZ(0),
408//PID
411 m_eclpidEop(0),
412 m_eclpidE9E21(0),
418
419{
420 //Set module properties
421 setDescription("This module produces an ntuple with ECL-related quantities starting from mdst");
422 addParam("writeToRoot", m_writeToRoot,
423 "set true if you want to save the information in a root file named by parameter 'rootFileName'", bool(true));
424 addParam("rootFileName", m_rootFileName,
425 "fileName used for root file where info are saved. Will be ignored if parameter 'writeToRoot' is false (standard)",
426 string("eclDataAnalysis"));
427 addParam("doTracking", m_doTracking, "set true if you want to save the information from TrackFitResults'rootFileName'",
428 bool(false));
429 addParam("doHits", m_doHits, "set true if you want to save the Hit and SimHit informations'", bool(false));
430 addParam("doDigits", m_doDigits, "set true if you want to save the Digits and CalDigits informations'", bool(false));
431 addParam("doPureCsI", m_doPureCsI, "set true if you want to save the information for upgrade option'", bool(false));
432
433}
434
438
439
441{
442
443 B2INFO("[ECLDataAnalysis Module]: Starting initialization of ECLDataAnalysis Module.");
444
445 m_eventLevelClusteringInfo.registerInDataStore();
446
447 m_eclSimHits.registerInDataStore(eclSimHitArrayName());
448 m_eclHits.registerInDataStore(eclHitArrayName());
449
450 m_eclDigits.registerInDataStore(eclDigitArrayName());
451 m_eclCalDigits.registerInDataStore(eclCalDigitArrayName());
453 m_eclShowers.registerInDataStore(eclShowerArrayName());
454 m_eclClusters.registerInDataStore(eclClusterArrayName());
455 m_eclLocalMaximums.registerInDataStore(eclLocalMaximumArrayName());
456
457 m_eclCalDigits.registerRelationTo(m_mcParticles);
458 m_eclDigits.registerRelationTo(m_mcParticles);
459 m_eclShowers.registerRelationTo(m_mcParticles);
460 m_eclClusters.registerRelationTo(m_mcParticles);
461
462 if (m_doPureCsI == 1) {
463 m_eclPureDigits.registerInDataStore(eclPureDigitArrayName());
464 m_eclPureCalDigits.registerInDataStore(eclPureCalDigitArrayName());
466 m_eclPureShowers.registerInDataStore(eclPureShowerArrayName());
467 m_eclPureClusters.registerInDataStore(eclPureClusterArrayName());
469
470 m_eclPureCalDigits.registerRelationTo(m_mcParticles);
471 m_eclPureDigits.registerRelationTo(m_mcParticles);
472 m_eclPureShowers.registerRelationTo(m_mcParticles);
473 m_eclPureClusters.registerRelationTo(m_mcParticles);
474 }
475
476 if (m_doTracking == true) {
477 m_tracks.isRequired();
478 m_trackFitResults.isRequired();
479 m_eclPidLikelihoods.isRequired();
480 }
481
482 if (m_writeToRoot == true) {
483 m_rootFilePtr = new TFile(m_rootFileName.c_str(), "RECREATE");
484 } else
485 m_rootFilePtr = nullptr;
486
487 // initialize tree
488 m_tree = new TTree("m_tree", "ECL Analysis tree");
489
490 m_tree->Branch("expNo", &m_iExperiment, "expNo/I");
491 m_tree->Branch("runNo", &m_iRun, "runNo/I");
492 m_tree->Branch("evtNo", &m_iEvent, "evtNo/I");
493
494 //EventLevelClusteringInfo
495 m_tree->Branch("eclNumOutOfTimeDigitsFwd", &m_nECLCalDigitsOutOfTimeFWD, "eclNumOutOfTimeDigitsFwd/s");
496 m_tree->Branch("eclNumOutOfTimeDigitsBrl", &m_nECLCalDigitsOutOfTimeBarrel, "eclNumOutOfTimeDigitsBrl/s");
497 m_tree->Branch("eclNumOutOfTimeDigitsBwd", &m_nECLCalDigitsOutOfTimeBWD, "eclNumOutOfTimeDigitsBwd/s");
498 m_tree->Branch("eclNumRejectedShowersFwd", &m_nECLShowersRejectedFWD, "eclNumRejectedShowersFwd/b");
499 m_tree->Branch("eclNumRejectedShowersBrl", &m_nECLShowersRejectedBarrel, "eclNumRejectedShowersBrl/b");
500 m_tree->Branch("eclNumRejectedShowersBwd", &m_nECLShowersRejectedBWD, "eclNumRejectedShowersBwd/b");
501
502 if (m_doDigits == 1) {
503 m_tree->Branch("eclDigitMultip", &m_eclDigitMultip, "ecldigit_Multip/I");
504 m_tree->Branch("eclDigitIdx", "std::vector<int>", &m_eclDigitIdx);
505 m_tree->Branch("eclDigitToMC", "std::vector<int>", &m_eclDigitToMC);
506 m_tree->Branch("eclDigitCellId", "std::vector<int>", &m_eclDigitCellId);
507 m_tree->Branch("eclDigitAmp", "std::vector<int>", &m_eclDigitAmp);
508 m_tree->Branch("eclDigitTimeFit", "std::vector<int>", &m_eclDigitTimeFit);
509 m_tree->Branch("eclDigitFitQuality", "std::vector<int>", &m_eclDigitFitQuality);
510 m_tree->Branch("eclDigitToCalDigit", "std::vector<int>", &m_eclDigitToCalDigit);
511
512 m_tree->Branch("eclCalDigitMultip", &m_eclCalDigitMultip, "eclCaldigit_Multip/I");
513 m_tree->Branch("eclCalDigitIdx", "std::vector<int>", &m_eclCalDigitIdx);
514 m_tree->Branch("eclCalDigitToMC1", "std::vector<int>", &m_eclCalDigitToMC1);
515 m_tree->Branch("eclCalDigitToMC1PDG", "std::vector<int>", &m_eclCalDigitToMC1PDG);
516 m_tree->Branch("eclCalDigitToMCWeight1", "std::vector<double>", &m_eclCalDigitToMCWeight1);
517 m_tree->Branch("eclCalDigitToMC2", "std::vector<int>", &m_eclCalDigitToMC2);
518 m_tree->Branch("eclCalDigitToMC2PDG", "std::vector<int>", &m_eclCalDigitToMC2PDG);
519 m_tree->Branch("eclCalDigitToMCWeight2", "std::vector<double>", &m_eclCalDigitToMCWeight2);
520 m_tree->Branch("eclCalDigitToMC3", "std::vector<int>", &m_eclCalDigitToMC3);
521 m_tree->Branch("eclCalDigitToMC3PDG", "std::vector<int>", &m_eclCalDigitToMC3PDG);
522 m_tree->Branch("eclCalDigitToMCWeight3", "std::vector<double>", &m_eclCalDigitToMCWeight3);
523 m_tree->Branch("eclCalDigitToMC4", "std::vector<int>", &m_eclCalDigitToMC4);
524 m_tree->Branch("eclCalDigitToMC4PDG", "std::vector<int>", &m_eclCalDigitToMC4PDG);
525 m_tree->Branch("eclCalDigitToMCWeight4", "std::vector<double>", &m_eclCalDigitToMCWeight4);
526 m_tree->Branch("eclCalDigitToMC5", "std::vector<int>", &m_eclCalDigitToMC5);
527 m_tree->Branch("eclCalDigitToMC5PDG", "std::vector<int>", &m_eclCalDigitToMC5PDG);
528 m_tree->Branch("eclCalDigitToMCWeight5", "std::vector<double>", &m_eclCalDigitToMCWeight5);
529 m_tree->Branch("eclCalDigitToBkgWeight", "std::vector<double>", &m_eclCalDigitToBkgWeight);
530 m_tree->Branch("eclCalDigitSimHitSum", "std::vector<double>", &m_eclCalDigitSimHitSum);
531 m_tree->Branch("eclCalDigitToShower", "std::vector<int>", &m_eclCalDigitToShower);
532 m_tree->Branch("eclCalDigitCellId", "std::vector<int>", &m_eclCalDigitCellId);
533 m_tree->Branch("eclCalDigitAmp", "std::vector<double>", &m_eclCalDigitAmp);
534 m_tree->Branch("eclCalDigitTimeFit", "std::vector<double>", &m_eclCalDigitTimeFit);
535 m_tree->Branch("eclCalDigitFitQuality", "std::vector<int>", &m_eclCalDigitFitQuality);
536 m_tree->Branch("eclCalDigitToCR", "std::vector<int>", &m_eclCalDigitToCR);
537 m_tree->Branch("eclCalDigitToLM", "std::vector<int>", &m_eclCalDigitToLM);
538 }
539
540 m_tree->Branch("eclCRIdx", "std::vector<int>", &m_eclCRIdx);
541 m_tree->Branch("eclCRIsTrack", "std::vector<int>", &m_eclCRIsTrack);
542 m_tree->Branch("eclCRLikelihoodMIPNGamma", "std::vector<double>", &m_eclCRLikelihoodMIPNGamma);
543 m_tree->Branch("eclCRLikelihoodChargedHadron", "std::vector<double>", &m_eclCRLikelihoodChargedHadron);
544 m_tree->Branch("eclCRLikelihoodElectronNGamma", "std::vector<double>", &m_eclCRLikelihoodElectronNGamma);
545 m_tree->Branch("eclCRLikelihoodNGamma", "std::vector<double>", &m_eclCRLikelihoodNGamma);
546 m_tree->Branch("eclCRLikelihoodNeutralHadron", "std::vector<double>", &m_eclCRLikelihoodNeutralHadron);
547 m_tree->Branch("eclCRLikelihoodMergedPi0", "std::vector<double>", &m_eclCRLikelihoodMergedPi0);
548
549 if (m_doHits == 1) {
550 m_tree->Branch("eclSimHitMultip", &m_eclSimHitMultip, "eclSimHitMultip/I");
551 m_tree->Branch("eclSimHitIdx", "std::vector<int>", &m_eclSimHitIdx);
552 m_tree->Branch("eclSimHitToMC", "std::vector<int>", &m_eclSimHitToMC);
553 m_tree->Branch("eclSimHitCellId", "std::vector<int>", &m_eclSimHitCellId);
554 m_tree->Branch("eclSimHitPdg", "std::vector<int>", &m_eclSimHitPdg);
555 m_tree->Branch("eclSimHitEnergyDep", "std::vector<double>", &m_eclSimHitEnergyDep);
556 m_tree->Branch("eclSimHitFlightTime", "std::vector<double>", &m_eclSimHitFlightTime);
557 m_tree->Branch("eclSimHitX", "std::vector<double>", &m_eclSimHitX);
558 m_tree->Branch("eclSimHitY", "std::vector<double>", &m_eclSimHitY);
559 m_tree->Branch("eclSimHitZ", "std::vector<double>", &m_eclSimHitZ);
560 m_tree->Branch("eclSimHitPx", "std::vector<double>", &m_eclSimHitPx);
561 m_tree->Branch("eclSimHitPy", "std::vector<double>", &m_eclSimHitPy);
562 m_tree->Branch("eclSimHitPz", "std::vector<double>", &m_eclSimHitPz);
563
564 m_tree->Branch("eclHitMultip", &m_eclHitMultip, "eclHitMultip/I");
565 m_tree->Branch("eclHitIdx", "std::vector<int>", &m_eclHitIdx);
566 m_tree->Branch("eclHitToMC", "std::vector<int>", &m_eclHitToMC);
567 m_tree->Branch("eclHitToDigit", "std::vector<int>", &m_eclHitToDigit);
568 m_tree->Branch("eclHitToDigitAmp", "std::vector<int>", &m_eclHitToDigitAmp);
569 m_tree->Branch("eclHitCellId", "std::vector<int>", &m_eclHitCellId);
570 m_tree->Branch("eclHitEnergyDep", "std::vector<double>", &m_eclHitEnergyDep);
571 m_tree->Branch("eclHitTimeAve", "std::vector<double>", &m_eclHitTimeAve);
572 }
573
574 m_tree->Branch("eclLMMultip", &m_eclLMMultip, "eclLMMultip/I");
575 m_tree->Branch("eclLMId", "std::vector<int>", &m_eclLMId);
576 m_tree->Branch("eclLMType", "std::vector<int>", &m_eclLMType);
577 m_tree->Branch("eclLMCellId", "std::vector<int>", &m_eclLMCellId);
578
579 m_tree->Branch("eclClusterMultip", &m_eclClusterMultip, "eclClusterMultip/I");
580 m_tree->Branch("eclClusterTrueMultip", &m_eclClusterTrueMultip, "eclClusterTrueMultip/I");
581 m_tree->Branch("eclClusterGammaMultip", &m_eclClusterGammaMultip, "eclClusterGammaMultip/I");
582 m_tree->Branch("eclClusterIdx", "std::vector<int>", &m_eclClusterIdx);
583 m_tree->Branch("eclClusterToMC1", "std::vector<int>", &m_eclClusterToMC1);
584 m_tree->Branch("eclClusterToMCWeight1", "std::vector<double>", &m_eclClusterToMCWeight1);
585 m_tree->Branch("eclClusterToMC1PDG", "std::vector<int>", &m_eclClusterToMC1PDG);
586 m_tree->Branch("eclClusterToMC2", "std::vector<int>", &m_eclClusterToMC2);
587 m_tree->Branch("eclClusterToMCWeight2", "std::vector<double>", &m_eclClusterToMCWeight2);
588 m_tree->Branch("eclClusterToMC2PDG", "std::vector<int>", &m_eclClusterToMC2PDG);
589 m_tree->Branch("eclClusterToMC3", "std::vector<int>", &m_eclClusterToMC3);
590 m_tree->Branch("eclClusterToMCWeight3", "std::vector<double>", &m_eclClusterToMCWeight3);
591 m_tree->Branch("eclClusterToMC3PDG", "std::vector<int>", &m_eclClusterToMC3PDG);
592 m_tree->Branch("eclClusterToMC4", "std::vector<int>", &m_eclClusterToMC4);
593 m_tree->Branch("eclClusterToMCWeight4", "std::vector<double>", &m_eclClusterToMCWeight4);
594 m_tree->Branch("eclClusterToMC4PDG", "std::vector<int>", &m_eclClusterToMC4PDG);
595 m_tree->Branch("eclClusterToMC5", "std::vector<int>", &m_eclClusterToMC5);
596 m_tree->Branch("eclClusterToMCWeight5", "std::vector<double>", &m_eclClusterToMCWeight5);
597 m_tree->Branch("eclClusterToMC5PDG", "std::vector<int>", &m_eclClusterToMC5PDG);
598 m_tree->Branch("eclClusterToBkgWeight", "std::vector<double>", &m_eclClusterToBkgWeight);
599 m_tree->Branch("eclClusterSimHitSum", "std::vector<double>", &m_eclClusterSimHitSum);
600 m_tree->Branch("eclClusterToShower", "std::vector<int>", &m_eclClusterToShower);
601 m_tree->Branch("eclClusterEnergy", "std::vector<double>", &m_eclClusterEnergy);
602 m_tree->Branch("eclClusterEnergyError", "std::vector<double>", &m_eclClusterEnergyError);
603 m_tree->Branch("eclClusterTheta", "std::vector<double>", &m_eclClusterTheta);
604 m_tree->Branch("eclClusterThetaError", "std::vector<double>", &m_eclClusterThetaError);
605 m_tree->Branch("eclClusterPhi", "std::vector<double>", &m_eclClusterPhi);
606 m_tree->Branch("eclClusterPhiError", "std::vector<double>", &m_eclClusterPhiError);
607 m_tree->Branch("eclClusterR", "std::vector<double>", &m_eclClusterR);
608 m_tree->Branch("eclClusterEnergyDepSum", "std::vector<double>", &m_eclClusterEnergyDepSum);
609 m_tree->Branch("eclClusterTiming", "std::vector<double>", &m_eclClusterTiming);
610 m_tree->Branch("eclClusterTimingError", "std::vector<double>", &m_eclClusterTimingError);
611 m_tree->Branch("eclClusterE9oE21", "std::vector<double>", &m_eclClusterE9oE21);
612 m_tree->Branch("eclClusterHighestE", "std::vector<double>", &m_eclClusterHighestE);
613 m_tree->Branch("eclClusterCellId", "std::vector<int>", &m_eclClusterCellId);
614 m_tree->Branch("eclClusterNofCrystals", "std::vector<int>", &m_eclClusterNofCrystals);
615 m_tree->Branch("eclClusterCrystalHealth", "std::vector<int>", &m_eclClusterCrystalHealth);
616 m_tree->Branch("eclClusterIsTrack", "std::vector<bool>", &m_eclClusterIsTrack);
617 m_tree->Branch("eclClusterClosestTrackDist", "std::vector<double>", &m_eclClusterClosestTrackDist);
618 m_tree->Branch("eclClusterDeltaL", "std::vector<double>", &m_eclClusterDeltaL);
619 m_tree->Branch("eclClusterAbsZernike40", "std::vector<double>", &m_eclClusterAbsZernike40);
620 m_tree->Branch("eclClusterAbsZernike51", "std::vector<double>", &m_eclClusterAbsZernike51);
621 m_tree->Branch("eclClusterZernikeMVA", "std::vector<double>", &m_eclClusterZernikeMVA);
622 m_tree->Branch("eclClusterE1oE9", "std::vector<double>", &m_eclClusterE1oE9);
623 m_tree->Branch("eclClusterSecondMoment", "std::vector<double>", &m_eclClusterSecondMoment);
624 m_tree->Branch("eclClusterLAT", "std::vector<double>", &m_eclClusterLAT);
625 m_tree->Branch("eclClusterDeltaTime99", "std::vector<double>", &m_eclClusterDeltaTime99);
626 m_tree->Branch("eclClusterDetectorRegion", "std::vector<int>", &m_eclClusterDetectorRegion);
627 m_tree->Branch("eclClusterHasNPhotonHypothesis", "std::vector<int>", &m_eclClusterHasNPhotonHypothesis);
628 m_tree->Branch("eclClusterHasNeutralHadronHypothesis", "std::vector<int>", &m_eclClusterHasNeutralHadronHypothesis);
629
630 if (m_doPureCsI == true) {
631 m_tree->Branch("eclHitToPureDigit", "std::vector<int>", &m_eclHitToPureDigit);
632 m_tree->Branch("eclHitToPureDigitAmp", "std::vector<int>", &m_eclHitToPureDigitAmp);
633 //Pure Digit
634 m_tree->Branch("eclPureDigitMultip", &m_eclPureDigitMultip, "eclPureDigit_Multip/I");
635 m_tree->Branch("eclPureDigitIdx", "std::vector<int>", &m_eclPureDigitIdx);
636 m_tree->Branch("eclPureDigitToMC", "std::vector<int>", &m_eclPureDigitToMC);
637 m_tree->Branch("eclPureDigitCellId", "std::vector<int>", &m_eclPureDigitCellId);
638 m_tree->Branch("eclPureDigitAmp", "std::vector<int>", &m_eclPureDigitAmp);
639 m_tree->Branch("eclPureDigitTimeFit", "std::vector<int>", &m_eclPureDigitTimeFit);
640 m_tree->Branch("eclPureDigitFitQuality", "std::vector<int>", &m_eclPureDigitFitQuality);
641 m_tree->Branch("eclPureDigitToCluster", "std::vector<int>", &m_eclPureDigitToCluster);
642 //Pure CalDigit
643 m_tree->Branch("eclPureCalDigitMultip", &m_eclPureCalDigitMultip, "eclPureCalDigit_Multip/I");
644 m_tree->Branch("eclPureCalDigitIdx", "std::vector<int>", &m_eclPureCalDigitIdx);
645 m_tree->Branch("eclPureCalDigitToMC1", "std::vector<int>", &m_eclPureCalDigitToMC1);
646 m_tree->Branch("eclPureCalDigitToMC1PDG", "std::vector<int>", &m_eclPureCalDigitToMC1PDG);
647 m_tree->Branch("eclPureCalDigitToMCWeight1", "std::vector<double>", &m_eclPureCalDigitToMCWeight1);
648 m_tree->Branch("eclPureCalDigitToMC2", "std::vector<int>", &m_eclPureCalDigitToMC2);
649 m_tree->Branch("eclPureCalDigitToMC2PDG", "std::vector<int>", &m_eclPureCalDigitToMC2PDG);
650 m_tree->Branch("eclPureCalDigitToMCWeight2", "std::vector<double>", &m_eclPureCalDigitToMCWeight2);
651 m_tree->Branch("eclPureCalDigitToMC3", "std::vector<int>", &m_eclPureCalDigitToMC3);
652 m_tree->Branch("eclPureCalDigitToMC3PDG", "std::vector<int>", &m_eclPureCalDigitToMC3PDG);
653 m_tree->Branch("eclPureCalDigitToMCWeight3", "std::vector<double>", &m_eclPureCalDigitToMCWeight3);
654 m_tree->Branch("eclPureCalDigitToMC4", "std::vector<int>", &m_eclPureCalDigitToMC4);
655 m_tree->Branch("eclPureCalDigitToMC4PDG", "std::vector<int>", &m_eclPureCalDigitToMC4PDG);
656 m_tree->Branch("eclPureCalDigitToMCWeight4", "std::vector<double>", &m_eclPureCalDigitToMCWeight4);
657 m_tree->Branch("eclPureCalDigitToMC5", "std::vector<int>", &m_eclPureCalDigitToMC5);
658 m_tree->Branch("eclPureCalDigitToMC5PDG", "std::vector<int>", &m_eclPureCalDigitToMC5PDG);
659 m_tree->Branch("eclPureCalDigitToMCWeight5", "std::vector<double>", &m_eclPureCalDigitToMCWeight5);
660 m_tree->Branch("eclPureCalDigitToBkgWeight", "std::vector<double>", &m_eclPureCalDigitToBkgWeight);
661 m_tree->Branch("eclPureCalDigitSimHitSum", "std::vector<double>", &m_eclPureCalDigitSimHitSum);
662 m_tree->Branch("eclPureCalDigitToShower", "std::vector<int>", &m_eclPureCalDigitToShower);
663 m_tree->Branch("eclPureCalDigitCellId", "std::vector<int>", &m_eclPureCalDigitCellId);
664 m_tree->Branch("eclPureCalDigitAmp", "std::vector<double>", &m_eclPureCalDigitAmp);
665 m_tree->Branch("eclPureCalDigitTimeFit", "std::vector<double>", &m_eclPureCalDigitTimeFit);
666 m_tree->Branch("eclPureCalDigitFitQuality", "std::vector<int>", &m_eclPureCalDigitFitQuality);
667 m_tree->Branch("eclPureCalDigitToCR", "std::vector<int>", &m_eclPureCalDigitToCR);
668 m_tree->Branch("eclPureCalDigitToLM", "std::vector<int>", &m_eclPureCalDigitToLM);
669 m_tree->Branch("eclPureLMMultip", &m_eclPureLMMultip, "eclPureLMMultip/I");
670
671 m_tree->Branch("eclPureCRIdx", "std::vector<int>", &m_eclPureCRIdx);
672 m_tree->Branch("eclPureCRIsTrack", "std::vector<int>", &m_eclPureCRIsTrack);
673 m_tree->Branch("eclPureCRLikelihoodMIPNGamma", "std::vector<double>", &m_eclPureCRLikelihoodMIPNGamma);
674 m_tree->Branch("eclPureCRLikelihoodChargedHadron", "std::vector<double>", &m_eclPureCRLikelihoodChargedHadron);
675 m_tree->Branch("eclPureCRLikelihoodElectronNGamma", "std::vector<double>", &m_eclPureCRLikelihoodElectronNGamma);
676 m_tree->Branch("eclPureCRLikelihoodNGamma", "std::vector<double>", &m_eclPureCRLikelihoodNGamma);
677 m_tree->Branch("eclPureCRLikelihoodNeutralHadron", "std::vector<double>", &m_eclPureCRLikelihoodNeutralHadron);
678 m_tree->Branch("eclPureCRLikelihoodMergedPi0", "std::vector<double>", &m_eclPureCRLikelihoodMergedPi0);
679
680 m_tree->Branch("eclPureLMId", "std::vector<int>", &m_eclPureLMId);
681 m_tree->Branch("eclPureLMType", "std::vector<int>", &m_eclPureLMType);
682 m_tree->Branch("eclPureLMCellId", "std::vector<int>", &m_eclPureLMCellId);
683 //Pure Clusters
684 m_tree->Branch("eclPureClusterMultip", &m_eclPureClusterMultip, "eclPureClusterMultip/I");
685 m_tree->Branch("eclPureClusterIdx", "std::vector<int>", &m_eclPureClusterIdx);
686 m_tree->Branch("eclPureClusterToMC1", "std::vector<int>", &m_eclPureClusterToMC1);
687 m_tree->Branch("eclPureClusterToMCWeight1", "std::vector<double>", &m_eclPureClusterToMCWeight1);
688 m_tree->Branch("eclPureClusterToMC1PDG", "std::vector<int>", &m_eclPureClusterToMC1PDG);
689 m_tree->Branch("eclPureClusterToMC2", "std::vector<int>", &m_eclPureClusterToMC2);
690 m_tree->Branch("eclPureClusterToMCWeight2", "std::vector<double>", &m_eclPureClusterToMCWeight2);
691 m_tree->Branch("eclPureClusterToMC2PDG", "std::vector<int>", &m_eclPureClusterToMC2PDG);
692 m_tree->Branch("eclPureClusterToMC3", "std::vector<int>", &m_eclPureClusterToMC3);
693 m_tree->Branch("eclPureClusterToMCWeight3", "std::vector<double>", &m_eclPureClusterToMCWeight3);
694 m_tree->Branch("eclPureClusterToMC3PDG", "std::vector<int>", &m_eclPureClusterToMC3PDG);
695 m_tree->Branch("eclPureClusterToMC4", "std::vector<int>", &m_eclPureClusterToMC4);
696 m_tree->Branch("eclPureClusterToMCWeight4", "std::vector<double>", &m_eclPureClusterToMCWeight4);
697 m_tree->Branch("eclPureClusterToMC4PDG", "std::vector<int>", &m_eclPureClusterToMC4PDG);
698 m_tree->Branch("eclPureClusterToMC5", "std::vector<int>", &m_eclPureClusterToMC5);
699 m_tree->Branch("eclPureClusterToMCWeight5", "std::vector<double>", &m_eclPureClusterToMCWeight5);
700 m_tree->Branch("eclPureClusterToMC5PDG", "std::vector<int>", &m_eclPureClusterToMC5PDG);
701 m_tree->Branch("eclPureClusterToBkgWeight", "std::vector<double>", &m_eclPureClusterToBkgWeight);
702 m_tree->Branch("eclPureClusterEnergy", "std::vector<double>", &m_eclPureClusterEnergy);
703 m_tree->Branch("eclPureClusterEnergyError", "std::vector<double>", &m_eclPureClusterEnergyError);
704 m_tree->Branch("eclPureClusterTheta", "std::vector<double>", &m_eclPureClusterTheta);
705 m_tree->Branch("eclPureClusterThetaError", "std::vector<double>", &m_eclPureClusterThetaError);
706 m_tree->Branch("eclPureClusterPhi", "std::vector<double>", &m_eclPureClusterPhi);
707 m_tree->Branch("eclPureClusterPhiError", "std::vector<double>", &m_eclPureClusterPhiError);
708 m_tree->Branch("eclPureClusterR", "std::vector<double>", &m_eclPureClusterR);
709 m_tree->Branch("eclPureClusterEnergyDepSum", "std::vector<double>", &m_eclPureClusterEnergyDepSum);
710 m_tree->Branch("eclPureClusterTiming", "std::vector<double>", &m_eclPureClusterTiming);
711 m_tree->Branch("eclPureClusterTimingError", "std::vector<double>", &m_eclPureClusterTimingError);
712 m_tree->Branch("eclPureClusterE9oE21", "std::vector<double>", &m_eclPureClusterE9oE21);
713 m_tree->Branch("eclPureClusterHighestE", "std::vector<double>", &m_eclPureClusterHighestE);
714 m_tree->Branch("eclPureClusterCellId", "std::vector<int>", &m_eclPureClusterCellId);
715 m_tree->Branch("eclPureClusterLat", "std::vector<double>", &m_eclPureClusterLat);
716 m_tree->Branch("eclPureClusterNofCrystals", "std::vector<int>", &m_eclPureClusterNofCrystals);
717 m_tree->Branch("eclPureClusterCrystalHealth", "std::vector<int>", &m_eclPureClusterCrystalHealth);
718 m_tree->Branch("eclPureClusterClosestTrackDist", "std::vector<double>", &m_eclPureClusterClosestTrackDist);
719 m_tree->Branch("eclPureClusterAbsZernike40", "std::vector<double>", &m_eclPureClusterAbsZernike40);
720 m_tree->Branch("eclPureClusterAbsZernike51", "std::vector<double>", &m_eclPureClusterAbsZernike51);
721 m_tree->Branch("eclPureClusterZernikeMVA", "std::vector<double>", &m_eclPureClusterZernikeMVA);
722 m_tree->Branch("eclPureClusterSecondMoment", "std::vector<double>", &m_eclPureClusterSecondMoment);
723 m_tree->Branch("eclPureClusterIsTrack", "std::vector<bool>", &m_eclPureClusterIsTrack);
724 m_tree->Branch("eclPureClusterDeltaL", "std::vector<double>", &m_eclPureClusterDeltaL);
725 m_tree->Branch("eclPureClusterE1oE9", "std::vector<double>", &m_eclPureClusterE1oE9);
726 m_tree->Branch("eclPureClusterDeltaTime99", "std::vector<double>", &m_eclPureClusterDeltaTime99);
727 m_tree->Branch("eclPureClusterDetectorRegion", "std::vector<int>", &m_eclPureClusterDetectorRegion);
728 m_tree->Branch("eclPureClusterHasNPhotonHypothesis", "std::vector<int>", &m_eclPureClusterHasNPhotonHypothesis);
729 m_tree->Branch("eclPureClusterHasNeutralHadronHypothesis", "std::vector<int>", &m_eclPureClusterHasNeutralHadronHypothesis);
730 }
731
733 m_tree->Branch("eclShowerMultip", &m_eclShowerMultip, "eclShowerMultip/I");
734 m_tree->Branch("eclShowerIdx", "std::vector<int>", &m_eclShowerIdx);
735 m_tree->Branch("eclShowerToMC1", "std::vector<int>", &m_eclShowerToMC1);
736 m_tree->Branch("eclShowerToMCWeight1", "std::vector<double>", &m_eclShowerToMCWeight1);
737 m_tree->Branch("eclShowerToMC1PDG", "std::vector<int>", &m_eclShowerToMC1PDG);
738 m_tree->Branch("eclShowerToMC1Moth", "std::vector<int>", &m_eclShowerToMC1Moth);
739 m_tree->Branch("eclShowerToMC1MothPDG", "std::vector<int>", &m_eclShowerToMC1MothPDG);
740 m_tree->Branch("eclShowerToMC1GMoth", "std::vector<int>", &m_eclShowerToMC1GMoth);
741 m_tree->Branch("eclShowerToMC1GMothPDG", "std::vector<int>", &m_eclShowerToMC1GMothPDG);
742 m_tree->Branch("eclShowerToMC2", "std::vector<int>", &m_eclShowerToMC2);
743 m_tree->Branch("eclShowerToMCWeight2", "std::vector<double>", &m_eclShowerToMCWeight2);
744 m_tree->Branch("eclShowerToMC2PDG", "std::vector<int>", &m_eclShowerToMC2PDG);
745 m_tree->Branch("eclShowerToMC2Moth", "std::vector<int>", &m_eclShowerToMC2Moth);
746 m_tree->Branch("eclShowerToMC2MothPDG", "std::vector<int>", &m_eclShowerToMC2MothPDG);
747 m_tree->Branch("eclShowerToMC2GMoth", "std::vector<int>", &m_eclShowerToMC2GMoth);
748 m_tree->Branch("eclShowerToMC2GMothPDG", "std::vector<int>", &m_eclShowerToMC2GMothPDG);
749 m_tree->Branch("eclShowerToMC3", "std::vector<int>", &m_eclShowerToMC3);
750 m_tree->Branch("eclShowerToMCWeight3", "std::vector<double>", &m_eclShowerToMCWeight3);
751 m_tree->Branch("eclShowerToMC3PDG", "std::vector<int>", &m_eclShowerToMC3PDG);
752 m_tree->Branch("eclShowerToMC3Moth", "std::vector<int>", &m_eclShowerToMC3Moth);
753 m_tree->Branch("eclShowerToMC3MothPDG", "std::vector<int>", &m_eclShowerToMC3MothPDG);
754 m_tree->Branch("eclShowerToMC3GMoth", "std::vector<int>", &m_eclShowerToMC3GMoth);
755 m_tree->Branch("eclShowerToMC3GMothPDG", "std::vector<int>", &m_eclShowerToMC3GMothPDG);
756 m_tree->Branch("eclShowerToMC4", "std::vector<int>", &m_eclShowerToMC4);
757 m_tree->Branch("eclShowerToMCWeight4", "std::vector<double>", &m_eclShowerToMCWeight4);
758 m_tree->Branch("eclShowerToMC4PDG", "std::vector<int>", &m_eclShowerToMC4PDG);
759 m_tree->Branch("eclShowerToMC4Moth", "std::vector<int>", &m_eclShowerToMC4Moth);
760 m_tree->Branch("eclShowerToMC4MothPDG", "std::vector<int>", &m_eclShowerToMC4MothPDG);
761 m_tree->Branch("eclShowerToMC4GMoth", "std::vector<int>", &m_eclShowerToMC4GMoth);
762 m_tree->Branch("eclShowerToMC4GMothPDG", "std::vector<int>", &m_eclShowerToMC4GMothPDG);
763 m_tree->Branch("eclShowerToMC5", "std::vector<int>", &m_eclShowerToMC5);
764 m_tree->Branch("eclShowerToMCWeight5", "std::vector<double>", &m_eclShowerToMCWeight5);
765 m_tree->Branch("eclShowerToMC5PDG", "std::vector<int>", &m_eclShowerToMC5PDG);
766 m_tree->Branch("eclShowerToMC5Moth", "std::vector<int>", &m_eclShowerToMC5Moth);
767 m_tree->Branch("eclShowerToMC5MothPDG", "std::vector<int>", &m_eclShowerToMC5MothPDG);
768 m_tree->Branch("eclShowerToMC5GMoth", "std::vector<int>", &m_eclShowerToMC5GMoth);
769 m_tree->Branch("eclShowerToMC5GMothPDG", "std::vector<int>", &m_eclShowerToMC5GMothPDG);
770 m_tree->Branch("eclShowerToBkgWeight", "std::vector<double>", &m_eclShowerToBkgWeight);
771 m_tree->Branch("eclShowerToLM1", "std::vector<int>", &m_eclShowerToLM1);
772 m_tree->Branch("eclShowerToLM2", "std::vector<int>", &m_eclShowerToLM2);
773 m_tree->Branch("eclShowerToLM3", "std::vector<int>", &m_eclShowerToLM3);
774 m_tree->Branch("eclShowerToLM4", "std::vector<int>", &m_eclShowerToLM4);
775 m_tree->Branch("eclShowerToLM5", "std::vector<int>", &m_eclShowerToLM5);
776 m_tree->Branch("eclShowerSimHitSum", "std::vector<double>", &m_eclShowerSimHitSum);
777 m_tree->Branch("eclShowerEnergy", "std::vector<double>", &m_eclShowerEnergy);
778 m_tree->Branch("eclShowerUncEnergy", "std::vector<double>", &m_eclShowerUncEnergy);
779 m_tree->Branch("eclShowerTheta", "std::vector<double>", &m_eclShowerTheta);
780 m_tree->Branch("eclShowerPhi", "std::vector<double>", &m_eclShowerPhi);
781 m_tree->Branch("eclShowerR", "std::vector<double>", &m_eclShowerR);
782 m_tree->Branch("eclShowerNHits", "std::vector<double>", &m_eclShowerNHits);
783 m_tree->Branch("eclShowerE9oE21", "std::vector<double>", &m_eclShowerE9oE21);
784 m_tree->Branch("eclShowerTime", "std::vector<double>", &m_eclShowerTime);
785 m_tree->Branch("eclShowerT99", "std::vector<double>", &m_eclShowerT99);
786 m_tree->Branch("eclShowerConnectedRegionId", "std::vector<int>", &m_eclShowerConnectedRegionId);
787 m_tree->Branch("eclShowerHypothesisId", "std::vector<int>", &m_eclShowerHypothesisId);
788 m_tree->Branch("eclShowerCentralCellId", "std::vector<int>", &m_eclShowerCentralCellId);
789 m_tree->Branch("eclShowerEnergyError", "std::vector<double>", &m_eclShowerEnergyError);
790 m_tree->Branch("eclShowerThetaError", "std::vector<double>", &m_eclShowerThetaError);
791 m_tree->Branch("eclShowerPhiError", "std::vector<double>", &m_eclShowerPhiError);
792 m_tree->Branch("eclShowerTimeResolution", "std::vector<double>", &m_eclShowerTimeResolution);
793 m_tree->Branch("eclShowerHighestEnergy", "std::vector<double>", &m_eclShowerHighestEnergy);
794 m_tree->Branch("eclShowerLateralEnergy", "std::vector<double>", &m_eclShowerLateralEnergy);
795 m_tree->Branch("eclShowerMinTrkDistance", "std::vector<double>", &m_eclShowerMinTrkDistance);
796 m_tree->Branch("eclShowerTrkDepth", "std::vector<double>", &m_eclShowerTrkDepth);
797 m_tree->Branch("eclShowerShowerDepth", "std::vector<double>", &m_eclShowerShowerDepth);
798 m_tree->Branch("eclShowerAbsZernike40", "std::vector<double>", &m_eclShowerAbsZernike40);
799 m_tree->Branch("eclShowerAbsZernike51", "std::vector<double>", &m_eclShowerAbsZernike51);
800 m_tree->Branch("eclShowerZernikeMVA", "std::vector<double>", &m_eclShowerZernikeMVA);
801 m_tree->Branch("eclShowerSecondMoment", "std::vector<double>", &m_eclShowerSecondMoment);
802 m_tree->Branch("eclShowerE1oE9", "std::vector<double>", &m_eclShowerE1oE9);
803 m_tree->Branch("eclShowerIsTrack", "std::vector<int>", &m_eclShowerIsTrack);
804 m_tree->Branch("eclShowerIsCluster", "std::vector<bool>", &m_eclShowerIsCluster);
805 m_tree->Branch("eclShowerMCVtxInEcl", "std::vector<int>", &m_eclShowerMCVtxInEcl);
806 m_tree->Branch("eclShowerMCFlightMatch", "std::vector<int>", &m_eclShowerMCFlightMatch);
807 m_tree->Branch("eclShowerMCFFlightMatch", "std::vector<int>", &m_eclShowerMCFFlightMatch);
808 m_tree->Branch("eclShowerHighestE1mE2", "std::vector<double>", &m_eclShowerHighestE1mE2);
809 m_tree->Branch("eclShowerNumberOfCrystalsForEnergy", "std::vector<double>", &m_eclShowerNumberOfCrystalsForEnergy);
810
811 //MC Truth
812 m_tree->Branch("mcMultip", &m_mcMultip, "mcMultip/I");
813 m_tree->Branch("mcIdx", "std::vector<int>", &m_mcIdx);
814 m_tree->Branch("mcPdg", "std::vector<int>", &m_mcPdg);
815 m_tree->Branch("mcMothPdg", "std::vector<int>", &m_mcMothPdg);
816 m_tree->Branch("mcGMothPdg", "std::vector<int>", &m_mcGMothPdg);
817 m_tree->Branch("mcGGMothPdg", "std::vector<int>", &m_mcGGMothPdg);
818 m_tree->Branch("mcEnergy", "std::vector<double>", &m_mcEnergy);
819 m_tree->Branch("mcPx", "std::vector<double>", &m_mcPx);
820 m_tree->Branch("mcPy", "std::vector<double>", &m_mcPy);
821 m_tree->Branch("mcPz", "std::vector<double>", &m_mcPz);
822 m_tree->Branch("mcDecVtxx", "std::vector<double>", &m_mcDecayVtxX);
823 m_tree->Branch("mcDecVtxy", "std::vector<double>", &m_mcDecayVtxY);
824 m_tree->Branch("mcDecVtxz", "std::vector<double>", &m_mcDecayVtxZ);
825 m_tree->Branch("mcProdVtxx", "std::vector<double>", &m_mcProdVtxX);
826 m_tree->Branch("mcProdVtxy", "std::vector<double>", &m_mcProdVtxY);
827 m_tree->Branch("mcProdVtxz", "std::vector<double>", &m_mcProdVtxZ);
828 m_tree->Branch("mcSecProc", "std::vector<int>", &m_mcSecondaryPhysProc);
829
830 if (m_doTracking == true) {
831 m_tree->Branch("trkMultip", &m_trkMultip, "trkMulti/I");
832 m_tree->Branch("trkIdx", "std::vector<int>", &m_trkIdx);
833 m_tree->Branch("trkPdg", "std::vector<int>", &m_trkPdg);
834 m_tree->Branch("trkCharge", "std::vector<int>", &m_trkCharge);
835 m_tree->Branch("trkPx", "std::vector<double>", &m_trkPx);
836 m_tree->Branch("trkPy", "std::vector<double>", &m_trkPy);
837 m_tree->Branch("trkPz", "std::vector<double>", &m_trkPz);
838 m_tree->Branch("trkP", "std::vector<double>", &m_trkP);
839 m_tree->Branch("trkTheta", "std::vector<double>", &m_trkTheta);
840 m_tree->Branch("trkPhi", "std::vector<double>", &m_trkPhi);
841 m_tree->Branch("trkPosx", "std::vector<double>", &m_trkX);
842 m_tree->Branch("trkPosy", "std::vector<double>", &m_trkY);
843 m_tree->Branch("trkPosz", "std::vector<double>", &m_trkZ);
844
845 m_tree->Branch("eclpidtrkIdx", "std::vector<int>", &m_eclpidtrkIdx);
846 m_tree->Branch("eclpidEnergy", "std::vector<double>", &m_eclpidEnergy);
847 m_tree->Branch("eclpidEop", "std::vector<double>", &m_eclpidEop);
848 m_tree->Branch("eclpidE9E21", "std::vector<double>", &m_eclpidE9E21);
849 m_tree->Branch("eclpidNCrystals", "std::vector<int>", &m_eclpidNCrystals);
850 m_tree->Branch("eclpidNClusters", "std::vector<int>", &m_eclpidNClusters);
851 m_tree->Branch("eclLogLikeEl", "std::vector<double>", &m_eclLogLikeEl);
852 m_tree->Branch("eclLogLikeMu", "std::vector<double>", &m_eclLogLikeMu);
853 m_tree->Branch("eclLogLikePi", "std::vector<double>", &m_eclLogLikePi);
854 }
855
856 B2INFO("[ECLDataAnalysis Module]: Initialization of ECLDataAnalysis Module completed.");
857
858}
859
860
862{
863
864 B2DEBUG(1, " ++++++++++++++ ECLDataAnalysisModule");
865
866 //EventLevelClusteringInfo
873
874 if (m_doDigits == 1) {
877 m_eclDigitIdx->clear();
878 m_eclDigitToMC->clear();
879 m_eclDigitCellId->clear();
880 m_eclDigitAmp->clear();
881 m_eclDigitTimeFit->clear();
882 m_eclDigitFitQuality->clear();
883 m_eclDigitToCalDigit->clear();
884
887 m_eclCalDigitCellId->clear();
888 m_eclCalDigitAmp->clear();
889 m_eclCalDigitTimeFit->clear();
891 m_eclCalDigitIdx->clear();
892 m_eclCalDigitToMC1->clear();
894 m_eclCalDigitToMC2->clear();
896 m_eclCalDigitToMC3->clear();
898 m_eclCalDigitToMC4->clear();
900 m_eclCalDigitToMC5->clear();
902 m_eclCalDigitToMC1PDG->clear();
903 m_eclCalDigitToMC2PDG->clear();
904 m_eclCalDigitToMC3PDG->clear();
905 m_eclCalDigitToMC4PDG->clear();
906 m_eclCalDigitToMC5PDG->clear();
908 m_eclCalDigitSimHitSum->clear();
909 m_eclCalDigitToShower->clear();
910 m_eclCalDigitToCR->clear();
911 m_eclCalDigitToLM->clear();
912 }
913
914 m_eclCRIdx->clear();
915 m_eclCRIsTrack->clear();
922
923 if (m_doHits == 1) {
924 //SimHit
926 m_eclSimHitCellId->clear();
927 m_eclSimHitPdg->clear();
928 m_eclSimHitEnergyDep->clear();
929 m_eclSimHitFlightTime->clear();
930 m_eclSimHitIdx->clear();
931 m_eclSimHitToMC->clear();
932 m_eclSimHitX->clear();
933 m_eclSimHitY->clear();
934 m_eclSimHitZ->clear();
935 m_eclSimHitPx->clear();
936 m_eclSimHitPy->clear();
937 m_eclSimHitPz->clear();
938
940 m_eclHitMultip = 0;
941 m_eclHitCellId->clear();
942 m_eclHitEnergyDep->clear();
943 m_eclHitTimeAve->clear();
944 m_eclHitIdx->clear();
945 m_eclHitToMC->clear();
946 m_eclHitToDigit->clear();
947 m_eclHitToDigitAmp->clear();
948 }
949
950 m_eclLMMultip = 0;
951 m_eclLMId->clear();
952 m_eclLMType->clear();
953 m_eclLMCellId->clear();
954
959 m_eclClusterEnergy->clear();
961 m_eclClusterTheta->clear();
962 m_eclClusterThetaError->clear();
963 m_eclClusterPhi->clear();
964 m_eclClusterPhiError->clear();
965 m_eclClusterR->clear();
966 m_eclClusterIdx->clear();
967 m_eclClusterToMC1->clear();
969 m_eclClusterToMC1PDG->clear();
970 m_eclClusterToMC2->clear();
972 m_eclClusterToMC2PDG->clear();
973 m_eclClusterToMC3->clear();
975 m_eclClusterToMC3PDG->clear();
976 m_eclClusterToMC4->clear();
978 m_eclClusterToMC4PDG->clear();
979 m_eclClusterToMC5->clear();
981 m_eclClusterToMC5PDG->clear();
983 m_eclClusterSimHitSum->clear();
985 m_eclClusterTiming->clear();
987 m_eclClusterE9oE21->clear();
988 m_eclClusterHighestE->clear();
989 m_eclClusterCellId->clear();
992 m_eclClusterIsTrack->clear();
994 m_eclClusterDeltaL->clear();
995 m_eclClusterToShower->clear();
998 m_eclClusterZernikeMVA->clear();
999 m_eclClusterE1oE9->clear();
1000 m_eclClusterSecondMoment->clear();
1001 m_eclClusterLAT->clear();
1002 m_eclClusterDeltaTime99->clear();
1006
1009 m_eclShowerIdx->clear();
1010 m_eclShowerToMC1->clear();
1011 m_eclShowerToMCWeight1->clear();
1012 m_eclShowerToMC1PDG->clear();
1013 m_eclShowerToMC1Moth->clear();
1014 m_eclShowerToMC1MothPDG->clear();
1015 m_eclShowerToMC1GMoth->clear();
1016 m_eclShowerToMC1GMothPDG->clear();
1017 m_eclShowerToMC2->clear();
1018 m_eclShowerToMCWeight2->clear();
1019 m_eclShowerToMC2PDG->clear();
1020 m_eclShowerToMC2Moth->clear();
1021 m_eclShowerToMC2MothPDG->clear();
1022 m_eclShowerToMC2GMoth->clear();
1023 m_eclShowerToMC2GMothPDG->clear();
1024 m_eclShowerToMC3->clear();
1025 m_eclShowerToMCWeight3->clear();
1026 m_eclShowerToMC3PDG->clear();
1027 m_eclShowerToMC3Moth->clear();
1028 m_eclShowerToMC3MothPDG->clear();
1029 m_eclShowerToMC3GMoth->clear();
1030 m_eclShowerToMC3GMothPDG->clear();
1031 m_eclShowerToMC4->clear();
1032 m_eclShowerToMCWeight4->clear();
1033 m_eclShowerToMC4PDG->clear();
1034 m_eclShowerToMC4Moth->clear();
1035 m_eclShowerToMC4MothPDG->clear();
1036 m_eclShowerToMC4GMoth->clear();
1037 m_eclShowerToMC4GMothPDG->clear();
1038 m_eclShowerToMC5->clear();
1039 m_eclShowerToMCWeight5->clear();
1040 m_eclShowerToMC5PDG->clear();
1041 m_eclShowerToMC5Moth->clear();
1042 m_eclShowerToMC5MothPDG->clear();
1043 m_eclShowerToMC5GMoth->clear();
1044 m_eclShowerToMC5GMothPDG->clear();
1045 m_eclShowerToBkgWeight->clear();
1046 m_eclShowerToLM1->clear();
1047 m_eclShowerToLM2->clear();
1048 m_eclShowerToLM3->clear();
1049 m_eclShowerToLM4->clear();
1050 m_eclShowerToLM5->clear();
1051 m_eclShowerSimHitSum->clear();
1052 m_eclShowerUncEnergy->clear();
1053 m_eclShowerEnergy->clear();
1054 m_eclShowerTheta->clear();
1055 m_eclShowerPhi->clear();
1056 m_eclShowerR->clear();
1057 m_eclShowerNHits->clear();
1058 m_eclShowerE9oE21->clear();
1059 m_eclShowerTime->clear();
1060 m_eclShowerT99->clear();
1062 m_eclShowerHypothesisId->clear();
1063 m_eclShowerCentralCellId->clear();
1064 m_eclShowerEnergyError->clear();
1065 m_eclShowerThetaError->clear();
1066 m_eclShowerPhiError->clear();
1068 m_eclShowerHighestEnergy->clear();
1069 m_eclShowerLateralEnergy->clear();
1071 m_eclShowerTrkDepth->clear();
1072 m_eclShowerShowerDepth->clear();
1073 m_eclShowerAbsZernike40->clear();
1074 m_eclShowerAbsZernike51->clear();
1075 m_eclShowerZernikeMVA->clear();
1076 m_eclShowerSecondMoment->clear();
1077 m_eclShowerE1oE9->clear();
1078 m_eclShowerIsTrack->clear();
1079 m_eclShowerIsCluster->clear();
1080 m_eclShowerMCVtxInEcl->clear();
1081 m_eclShowerMCFlightMatch->clear();
1083 m_eclShowerHighestE1mE2->clear();
1085
1087 if (m_doPureCsI == true) {
1089 m_eclPureDigitIdx->clear();
1090 m_eclPureDigitToMC->clear();
1091 m_eclPureDigitCellId->clear();
1092 m_eclPureDigitAmp->clear();
1093 m_eclPureDigitTimeFit->clear();
1094 m_eclPureDigitFitQuality->clear();
1095 m_eclPureDigitToCluster->clear();
1096 m_eclHitToPureDigit->clear();
1097 m_eclHitToPureDigitAmp->clear();
1098
1099 //Pure CalDigits
1101 m_eclPureCalDigitCellId->clear();
1102 m_eclPureCalDigitAmp->clear();
1103 m_eclPureCalDigitTimeFit->clear();
1105 m_eclPureCalDigitIdx->clear();
1106 m_eclPureCalDigitToMC1->clear();
1108 m_eclPureCalDigitToMC2->clear();
1110 m_eclPureCalDigitToMC3->clear();
1112 m_eclPureCalDigitToMC4->clear();
1114 m_eclPureCalDigitToMC5->clear();
1124 m_eclPureCalDigitToCR->clear();
1125 m_eclPureCalDigitToLM->clear();
1126
1127 m_eclPureCRIdx->clear();
1128 m_eclPureCRIsTrack->clear();
1135
1137 m_eclPureLMId->clear();
1138 m_eclPureLMType->clear();
1139 m_eclPureLMCellId->clear();
1140
1143 m_eclPureClusterToMC1->clear();
1145 m_eclPureClusterToMC1PDG->clear();
1146 m_eclPureClusterToMC2->clear();
1148 m_eclPureClusterToMC2PDG->clear();
1149 m_eclPureClusterToMC3->clear();
1151 m_eclPureClusterToMC3PDG->clear();
1152 m_eclPureClusterToMC4->clear();
1154 m_eclPureClusterToMC4PDG->clear();
1155 m_eclPureClusterToMC5->clear();
1157 m_eclPureClusterToMC5PDG->clear();
1159 m_eclPureClusterEnergy->clear();
1161 m_eclPureClusterTheta->clear();
1164 m_eclPureClusterPhi->clear();
1165 m_eclPureClusterPhiError->clear();
1166 m_eclPureClusterR->clear();
1167 m_eclPureClusterIdx->clear();
1168 m_eclPureClusterTiming->clear();
1170 m_eclPureClusterE9oE21->clear();
1171 m_eclPureClusterHighestE->clear();
1172 m_eclPureClusterCellId->clear();
1173 m_eclPureClusterLat->clear();
1181 m_eclPureClusterIsTrack->clear();
1182 m_eclPureClusterDeltaL->clear();
1183 m_eclPureClusterE1oE9->clear();
1188 }
1189
1191 m_mcMultip = 0;
1192 m_mcIdx->clear();
1193 m_mcPdg->clear();
1194 m_mcMothPdg->clear();
1195 m_mcGMothPdg->clear();
1196 m_mcGGMothPdg->clear();
1197 m_mcEnergy->clear();
1198 m_mcPx->clear();
1199 m_mcPy->clear();
1200 m_mcPz->clear();
1201 m_mcDecayVtxX->clear();
1202 m_mcDecayVtxY->clear();
1203 m_mcDecayVtxZ->clear();
1204 m_mcProdVtxX->clear();
1205 m_mcProdVtxY->clear();
1206 m_mcProdVtxZ->clear();
1207 m_mcSecondaryPhysProc->clear();
1208
1210 if (m_doTracking == true) {
1211 m_trkMultip = 0;
1212 m_trkIdx->clear();
1213 m_trkPdg->clear();
1214 m_trkCharge->clear();
1215 m_trkPx->clear();
1216 m_trkPy->clear();
1217 m_trkPz->clear();
1218 m_trkP->clear();
1219 m_trkPhi->clear();
1220 m_trkTheta->clear();
1221 m_trkPhi->clear();
1222 m_trkX->clear();
1223 m_trkY->clear();
1224 m_trkZ->clear();
1225
1227 m_eclpidtrkIdx->clear();
1228 m_eclpidEnergy->clear();
1229 m_eclpidEop->clear();
1230 m_eclpidE9E21->clear();
1231 m_eclpidNCrystals->clear();
1232 m_eclpidNClusters->clear();
1233 m_eclLogLikeEl->clear();
1234 m_eclLogLikeMu->clear();
1235 m_eclLogLikePi->clear();
1236 }
1237
1238
1239 if (m_eventmetadata) {
1240 m_iExperiment = m_eventmetadata->getExperiment();
1241 m_iRun = m_eventmetadata->getRun();
1242 m_iEvent = m_eventmetadata->getEvent();
1243 } else {
1244 m_iExperiment = -1;
1245 m_iRun = -1;
1246 m_iEvent = -1;
1247 }
1248
1249 //EventLevelClusteringInfo
1250 m_nECLCalDigitsOutOfTimeFWD = m_eventLevelClusteringInfo->getNECLCalDigitsOutOfTimeFWD();
1251 m_nECLCalDigitsOutOfTimeBarrel = m_eventLevelClusteringInfo->getNECLCalDigitsOutOfTimeBarrel();
1252 m_nECLCalDigitsOutOfTimeBWD = m_eventLevelClusteringInfo->getNECLCalDigitsOutOfTimeBWD();
1253 m_nECLShowersRejectedFWD = m_eventLevelClusteringInfo->getNECLShowersRejectedFWD();
1254 m_nECLShowersRejectedBarrel = m_eventLevelClusteringInfo->getNECLShowersRejectedBarrel();
1255 m_nECLShowersRejectedBWD = m_eventLevelClusteringInfo->getNECLShowersRejectedBWD();
1256
1257 if (m_doDigits == 1) {
1258 //DIGITS
1259 m_eclDigitMultip = m_eclDigits.getEntries();
1260 for (int idigits = 0; idigits < m_eclDigits.getEntries() ; idigits++) {
1261 ECLDigit* aECLDigits = m_eclDigits[idigits];
1262 m_eclDigitIdx->push_back(idigits);
1263 m_eclDigitCellId->push_back(aECLDigits->getCellId());
1264 m_eclDigitAmp->push_back(aECLDigits->getAmp());
1265 m_eclDigitTimeFit->push_back(aECLDigits->getTimeFit());
1266 m_eclDigitFitQuality->push_back(aECLDigits->getQuality());
1267
1268 if (aECLDigits->getRelated<MCParticle>() != (nullptr)) {
1269 const MCParticle* mc_digit = aECLDigits->getRelated<MCParticle>();
1270 m_eclDigitToMC->push_back(mc_digit->getArrayIndex());
1271 } else
1272 m_eclDigitToMC->push_back(-1);
1273
1274 if (aECLDigits->getRelated<ECLCalDigit>() != (nullptr)) {
1275 const ECLCalDigit* cal_digit = aECLDigits->getRelated<ECLCalDigit>();
1276 m_eclDigitToCalDigit->push_back(cal_digit->getArrayIndex());
1277 } else
1278 m_eclDigitToCalDigit->push_back(-1);
1279 }
1280
1281 //CAL DIGITS
1282 m_eclCalDigitMultip = m_eclCalDigits.getEntries();
1283 for (uint icaldigits = 0; icaldigits < (uint)m_eclCalDigits.getEntries() ; icaldigits++) {
1284 ECLCalDigit* aECLCalDigits = m_eclCalDigits[icaldigits];
1285
1286 m_eclCalDigitIdx->push_back(icaldigits);
1287 m_eclCalDigitCellId->push_back(aECLCalDigits->getCellId());
1288 m_eclCalDigitAmp->push_back(aECLCalDigits->getEnergy());
1289 m_eclCalDigitTimeFit->push_back(aECLCalDigits->getTime());
1290 m_eclCalDigitFitQuality->push_back(aECLCalDigits->isFailedFit());
1291
1292 double sumHit = 0;
1293 int idx[10];
1294 for (int i = 0; i < 10; i++)
1295 idx[i] = -1;
1296
1297 double wi[10];
1298 for (int i = 0; i < 10; i++)
1299 wi[i] = -1;
1300
1301 int ii = 0;
1302 sumHit = 0;
1303
1304 auto digitMCRelations = aECLCalDigits->getRelationsTo<MCParticle>();
1305 for (unsigned int i = 0; i < digitMCRelations.size(); ++i) {
1306 if (ii < 10) {
1307 const auto mcParticle = digitMCRelations.object(i);
1308 idx[ii] = mcParticle->getIndex() - 1;
1309 wi[ii] = digitMCRelations.weight(i);
1310 sumHit = sumHit + digitMCRelations.weight(i);
1311 ii++;
1312 }
1313 }
1314
1315 //Re-ordering based on contribution
1316 int y = 0;
1317 while (y < 10) {
1318 for (int i = 0; i < 9; i++) {
1319 if (((idx[i]) > -1) && ((idx[i + 1]) > -1)) {
1320 if (wi[i] < wi[i + 1]) {
1321 int temp = idx[i];
1322 idx[i] = idx[i + 1];
1323 idx[i + 1] = temp;
1324
1325 double wtemp = wi[i];
1326 wi[i] = wi[i + 1];
1327 wi[i + 1] = wtemp;
1328 }
1329 }
1330 }
1331 y++;
1332 }
1333
1334 m_eclCalDigitToBkgWeight->push_back(aECLCalDigits->getEnergy() - sumHit);
1335 m_eclCalDigitSimHitSum->push_back(sumHit);
1336 if (idx[0] > -1) {
1337 m_eclCalDigitToMCWeight1->push_back(wi[0]);
1338 m_eclCalDigitToMC1->push_back(idx[0]);
1339 const MCParticle* amcParticle = m_mcParticles[idx[0]];
1340 m_eclCalDigitToMC1PDG->push_back(amcParticle->getPDG());
1341 } else {
1342 m_eclCalDigitToMCWeight1->push_back(-1);
1343 m_eclCalDigitToMC1->push_back(-1);
1344 m_eclCalDigitToMC1PDG->push_back(-1);
1345 }
1346 if (idx[1] > -1) {
1347 m_eclCalDigitToMCWeight2->push_back(wi[1]);
1348 m_eclCalDigitToMC2->push_back(idx[1]);
1349 const MCParticle* amcParticle = m_mcParticles[idx[1]];
1350 m_eclCalDigitToMC2PDG->push_back(amcParticle->getPDG());
1351 } else {
1352 m_eclCalDigitToMCWeight2->push_back(-1);
1353 m_eclCalDigitToMC2->push_back(-1);
1354 m_eclCalDigitToMC2PDG->push_back(-1);
1355 }
1356 if (idx[2] > -1) {
1357 m_eclCalDigitToMCWeight3->push_back(wi[2]);
1358 m_eclCalDigitToMC3->push_back(idx[2]);
1359 const MCParticle* amcParticle = m_mcParticles[idx[2]];
1360 m_eclCalDigitToMC3PDG->push_back(amcParticle->getPDG());
1361 } else {
1362 m_eclCalDigitToMCWeight3->push_back(-1);
1363 m_eclCalDigitToMC3->push_back(-1);
1364 m_eclCalDigitToMC3PDG->push_back(-1);
1365 }
1366 if (idx[3] > -1) {
1367 m_eclCalDigitToMCWeight4->push_back(wi[3]);
1368 m_eclCalDigitToMC4->push_back(idx[3]);
1369 const MCParticle* amcParticle = m_mcParticles[idx[3]];
1370 m_eclCalDigitToMC4PDG->push_back(amcParticle->getPDG());
1371 } else {
1372 m_eclCalDigitToMCWeight4->push_back(-1);
1373 m_eclCalDigitToMC4->push_back(-1);
1374 m_eclCalDigitToMC4PDG->push_back(-1);
1375 }
1376 if (idx[4] > -1) {
1377 m_eclCalDigitToMCWeight5->push_back(wi[4]);
1378 m_eclCalDigitToMC5->push_back(idx[4]);
1379 const MCParticle* amcParticle = m_mcParticles[idx[4]];
1380 m_eclCalDigitToMC5PDG->push_back(amcParticle->getPDG());
1381 } else {
1382 m_eclCalDigitToMCWeight5->push_back(-1);
1383 m_eclCalDigitToMC5->push_back(-1);
1384 m_eclCalDigitToMC5PDG->push_back(-1);
1385 }
1386
1387 if (aECLCalDigits->getRelated<ECLShower>() != (nullptr)) {
1388 const ECLShower* shower_caldigit = aECLCalDigits->getRelated<ECLShower>();
1389 m_eclCalDigitToShower->push_back(shower_caldigit->getArrayIndex());
1390 } else
1391 m_eclCalDigitToShower->push_back(-1);
1392
1393 if (aECLCalDigits->getRelated<ECLConnectedRegion>() != (nullptr)) {
1394 const ECLConnectedRegion* cr_caldigit = aECLCalDigits->getRelated<ECLConnectedRegion>();
1395 m_eclCalDigitToCR->push_back(cr_caldigit->getCRId());
1396 } else
1397 m_eclCalDigitToCR->push_back(-1);
1398
1399 if (aECLCalDigits->getRelated<ECLLocalMaximum>() != (nullptr)) {
1400 const ECLLocalMaximum* lm_caldigit = aECLCalDigits->getRelated<ECLLocalMaximum>();
1401 m_eclCalDigitToLM->push_back(lm_caldigit->getLMId());
1402 } else
1403 m_eclCalDigitToLM->push_back(-1);
1404
1405 }
1406 }
1407
1408 //CR
1409 int CRmultip = m_eclConnectedRegions.getEntries();
1410 for (int i = 0; i < CRmultip; i++) {
1411 const ECLConnectedRegion* aECLCR = m_eclConnectedRegions[i];
1412 m_eclCRIdx->push_back(aECLCR->getCRId());
1413 m_eclCRIsTrack->push_back(aECLCR->isTrack());
1417 m_eclCRLikelihoodNGamma->push_back(aECLCR->getLikelihoodNGamma());
1420 }
1421
1422 if (m_doHits == 1) {
1423
1424 //SIM HITS
1425 m_eclSimHitMultip = m_eclSimHits.getEntries();
1426 for (int isimhits = 0; isimhits < m_eclSimHits.getEntries() ; isimhits++) {
1427 ECLSimHit* aECLSimHits = m_eclSimHits[isimhits];
1428
1429 m_eclSimHitIdx->push_back(isimhits);
1430 m_eclSimHitCellId->push_back(aECLSimHits->getCellId());
1431 m_eclSimHitPdg->push_back(aECLSimHits->getPDGCode());
1432 m_eclSimHitEnergyDep->push_back(aECLSimHits->getEnergyDep());
1433 m_eclSimHitFlightTime->push_back(aECLSimHits->getFlightTime());
1434 m_eclSimHitX->push_back(aECLSimHits->getPosition().x());
1435 m_eclSimHitY->push_back(aECLSimHits->getPosition().y());
1436 m_eclSimHitZ->push_back(aECLSimHits->getPosition().z());
1437 m_eclSimHitPx->push_back(aECLSimHits->getMomentum().x());
1438 m_eclSimHitPy->push_back(aECLSimHits->getMomentum().y());
1439 m_eclSimHitPz->push_back(aECLSimHits->getMomentum().z());
1440
1441 if (aECLSimHits->getRelated<MCParticle>() != (nullptr)) {
1442 const MCParticle* mc_simhit = aECLSimHits->getRelated<MCParticle>();
1443 m_eclSimHitToMC->push_back(mc_simhit->getArrayIndex());
1444 } else
1445 m_eclSimHitToMC->push_back(-1);
1446 }
1447
1448 //HITS
1449 m_eclHitMultip = m_eclHits.getEntries();
1450 for (int ihits = 0; ihits < m_eclHits.getEntries() ; ihits++) {
1451 ECLHit* aECLHits = m_eclHits[ihits];
1452 m_eclHitIdx->push_back(ihits);
1453 m_eclHitCellId->push_back(aECLHits->getCellId());
1454 m_eclHitEnergyDep->push_back(aECLHits->getEnergyDep());
1455 m_eclHitTimeAve->push_back(aECLHits->getTimeAve());
1456
1457 if (aECLHits->getRelated<ECLDigit>() != (nullptr)) {
1458 const ECLDigit* hit_digit = aECLHits->getRelated<ECLDigit>();
1459 m_eclHitToDigit->push_back(hit_digit->getArrayIndex());
1460 m_eclHitToDigitAmp->push_back(hit_digit->getAmp());
1461 } else {
1462 m_eclHitToDigit->push_back(-1);
1463 m_eclHitToDigitAmp->push_back(-1);
1464 }
1465
1466 if (m_doPureCsI == true) {
1467 if (aECLHits->getRelated<ECLDigit>(eclPureDigitArrayName()) != (nullptr)) {
1468 const ECLDigit* hit_pdigit = aECLHits->getRelated<ECLDigit>(eclPureDigitArrayName());
1469 m_eclHitToPureDigit->push_back(hit_pdigit->getArrayIndex());
1470 m_eclHitToPureDigitAmp->push_back(hit_pdigit->getAmp());
1471 } else {
1472 m_eclHitToPureDigit->push_back(-1);
1473 m_eclHitToPureDigitAmp->push_back(-1);
1474 }
1475 }
1476
1477 if (aECLHits->getRelated<MCParticle>() != (nullptr)) {
1478 const MCParticle* mc_hit = aECLHits->getRelated<MCParticle>();
1479 m_eclHitToMC->push_back(mc_hit->getArrayIndex());
1480 } else
1481 m_eclHitToMC->push_back(-1);
1482 }
1483 }
1484
1485 //LM
1486 m_eclLMMultip = m_eclLocalMaximums.getEntries();
1487 for (unsigned int ilms = 0; ilms < (unsigned int)m_eclLocalMaximums.getEntries() ; ilms++) {
1488 const ECLLocalMaximum* aECLLMs = m_eclLocalMaximums[ilms];
1489 m_eclLMId->push_back(aECLLMs->getLMId());
1490 m_eclLMType->push_back(aECLLMs->getType());
1491 m_eclLMCellId->push_back(aECLLMs->getCellId());
1492 }
1493
1494 //CLUSTERS
1495 m_eclClusterMultip = m_eclClusters.getEntries();
1496 for (unsigned int iclusters = 0; iclusters < (unsigned int)m_eclClusters.getEntries() ; iclusters++) {
1497 ECLCluster* aECLClusters = m_eclClusters[iclusters];
1498 m_eclClusterIdx->push_back(iclusters);
1499
1500 double clusterE = 0.0;
1501 if (aECLClusters->hasHypothesis(ECLCluster::EHypothesisBit::c_nPhotons)) clusterE = aECLClusters->getEnergy(
1503 else clusterE = aECLClusters->getEnergy(ECLCluster::EHypothesisBit::c_neutralHadron);
1504 m_eclClusterEnergy->push_back(clusterE);
1505
1506 m_eclClusterEnergyError->push_back(aECLClusters->getUncertaintyEnergy());
1507 m_eclClusterTheta->push_back(aECLClusters->getTheta());
1508 m_eclClusterThetaError->push_back(aECLClusters->getUncertaintyTheta());
1509 m_eclClusterPhi->push_back(aECLClusters->getPhi());
1510 m_eclClusterPhiError->push_back(aECLClusters->getUncertaintyPhi());
1511 m_eclClusterR->push_back(aECLClusters->getR());
1512 m_eclClusterEnergyDepSum->push_back(aECLClusters->getEnergyRaw());
1513 m_eclClusterTiming->push_back(aECLClusters->getTime());
1514 m_eclClusterTimingError->push_back(aECLClusters->getDeltaTime99());
1515 m_eclClusterE9oE21->push_back(aECLClusters->getE9oE21());
1516 m_eclClusterHighestE->push_back(aECLClusters->getEnergyHighestCrystal());
1517 m_eclClusterCellId->push_back(aECLClusters->getMaxECellId());
1518 m_eclClusterNofCrystals->push_back(aECLClusters->getNumberOfCrystals());
1519 m_eclClusterCrystalHealth->push_back(aECLClusters->getStatus());
1520
1521 m_eclClusterIsTrack->push_back(aECLClusters->isTrack());
1522 m_eclClusterClosestTrackDist->push_back(aECLClusters->getMinTrkDistance());
1523 m_eclClusterDeltaL->push_back(aECLClusters->getDeltaL());
1524
1525 m_eclClusterAbsZernike40->push_back(aECLClusters->getAbsZernike40());
1526 m_eclClusterAbsZernike51->push_back(aECLClusters->getAbsZernike51());
1527 m_eclClusterZernikeMVA->push_back(aECLClusters->getZernikeMVA());
1528 m_eclClusterE1oE9->push_back(aECLClusters->getE1oE9());
1529 m_eclClusterSecondMoment->push_back(aECLClusters->getSecondMoment());
1530 m_eclClusterLAT->push_back(aECLClusters->getLAT());
1531 m_eclClusterDeltaTime99->push_back(aECLClusters->getDeltaTime99());
1532 m_eclClusterDetectorRegion->push_back(aECLClusters->getDetectorRegion());
1535
1536 if (aECLClusters->getRelated<ECLShower>() != (nullptr)) {
1537 const ECLShower* shower_cluster = aECLClusters->getRelated<ECLShower>();
1538 m_eclClusterToShower->push_back(shower_cluster->getArrayIndex());
1539 } else
1540 m_eclClusterToShower->push_back(-1);
1541
1542 //Dump MC Info - Multiple Matching
1543 double sumHit = 0;
1544 int idx[10];
1545 for (int i = 0; i < 10; i++)
1546 idx[i] = -1;
1547
1548 double wi[10];
1549 for (int i = 0; i < 10; i++)
1550 wi[i] = -1;
1551
1552 int ii = 0;
1553 sumHit = 0;
1554
1555 auto clusterMCRelations = aECLClusters->getRelationsTo<MCParticle>();
1556 for (unsigned int i = 0; i < clusterMCRelations.size(); ++i) {
1557 if (ii < 10) {
1558 const auto mcParticle = clusterMCRelations.object(i);
1559 idx[ii] = mcParticle->getIndex() - 1;
1560 wi[ii] = clusterMCRelations.weight(i);
1561 sumHit = sumHit + clusterMCRelations.weight(i);
1562 ii++;
1563 }
1564 }
1565
1566 //Re-ordering based on contribution
1567 int y = 0;
1568 while (y < 10) {
1569 for (int i = 0; i < 9; i++) {
1570 if (((idx[i]) > -1) && ((idx[i + 1]) > -1)) {
1571 if (wi[i] < wi[i + 1]) {
1572 int temp = idx[i];
1573 idx[i] = idx[i + 1];
1574 idx[i + 1] = temp;
1575
1576 double wtemp = wi[i];
1577 wi[i] = wi[i + 1];
1578 wi[i + 1] = wtemp;
1579 }
1580 }
1581 }
1582 y++;
1583 }
1584
1585 m_eclClusterToBkgWeight->push_back(clusterE - sumHit);
1586 m_eclClusterSimHitSum->push_back(sumHit);
1587 if (idx[0] > -1) {
1588 m_eclClusterToMCWeight1->push_back(wi[0]);
1589 m_eclClusterToMC1->push_back(idx[0]);
1590 const MCParticle* amcParticle = m_mcParticles[idx[0]];
1591 m_eclClusterToMC1PDG->push_back(amcParticle->getPDG());
1592 } else {
1593 m_eclClusterToMCWeight1->push_back(-1);
1594 m_eclClusterToMC1->push_back(-1);
1595 m_eclClusterToMC1PDG->push_back(-1);
1596 }
1597 if (idx[1] > -1) {
1598 m_eclClusterToMCWeight2->push_back(wi[1]);
1599 m_eclClusterToMC2->push_back(idx[1]);
1600 const MCParticle* amcParticle = m_mcParticles[idx[1]];
1601 m_eclClusterToMC2PDG->push_back(amcParticle->getPDG());
1602 } else {
1603 m_eclClusterToMCWeight2->push_back(-1);
1604 m_eclClusterToMC2->push_back(-1);
1605 m_eclClusterToMC2PDG->push_back(-1);
1606 }
1607 if (idx[2] > -1) {
1608 m_eclClusterToMCWeight3->push_back(wi[2]);
1609 m_eclClusterToMC3->push_back(idx[2]);
1610 const MCParticle* amcParticle = m_mcParticles[idx[2]];
1611 m_eclClusterToMC3PDG->push_back(amcParticle->getPDG());
1612 } else {
1613 m_eclClusterToMCWeight3->push_back(-1);
1614 m_eclClusterToMC3->push_back(-1);
1615 m_eclClusterToMC3PDG->push_back(-1);
1616 }
1617 if (idx[3] > -1) {
1618 m_eclClusterToMCWeight4->push_back(wi[3]);
1619 m_eclClusterToMC4->push_back(idx[3]);
1620 const MCParticle* amcParticle = m_mcParticles[idx[3]];
1621 m_eclClusterToMC4PDG->push_back(amcParticle->getPDG());
1622 } else {
1623 m_eclClusterToMCWeight4->push_back(-1);
1624 m_eclClusterToMC4->push_back(-1);
1625 m_eclClusterToMC4PDG->push_back(-1);
1626 }
1627 if (idx[4] > -1) {
1628 m_eclClusterToMCWeight5->push_back(wi[4]);
1629 m_eclClusterToMC5->push_back(idx[4]);
1630 const MCParticle* amcParticle = m_mcParticles[idx[4]];
1631 m_eclClusterToMC5PDG->push_back(amcParticle->getPDG());
1632 } else {
1633 m_eclClusterToMCWeight5->push_back(-1);
1634 m_eclClusterToMC5->push_back(-1);
1635 m_eclClusterToMC5PDG->push_back(-1);
1636 }
1637
1638 }
1639
1640 if (m_doPureCsI == true) {
1641
1643 for (int idigits = 0; idigits < m_eclPureDigits.getEntries() ; idigits++) {
1644 ECLDigit* aECLPureDigits = m_eclPureDigits[idigits];
1645
1646 m_eclPureDigitIdx->push_back(idigits);
1647 m_eclPureDigitCellId->push_back(aECLPureDigits->getCellId());
1648 m_eclPureDigitAmp->push_back(aECLPureDigits->getAmp());
1649 m_eclPureDigitTimeFit->push_back(aECLPureDigits->getTimeFit());
1650 m_eclPureDigitFitQuality->push_back(aECLPureDigits->getQuality());
1651
1652 if (aECLPureDigits->getRelated<MCParticle>() != (nullptr)) {
1653 const MCParticle* mc_digit = aECLPureDigits->getRelated<MCParticle>();
1654 m_eclPureDigitToMC->push_back(mc_digit->getArrayIndex());
1655 } else
1656 m_eclPureDigitToMC->push_back(-1);
1657 }
1658
1659 //PURE CAL DIGITS
1661 for (uint icaldigits = 0; icaldigits < (uint)m_eclPureCalDigits.getEntries() ; icaldigits++) {
1662 ECLCalDigit* aECLPureCalDigits = m_eclPureCalDigits[icaldigits];
1663
1664 m_eclPureCalDigitIdx->push_back(icaldigits);
1665 m_eclPureCalDigitCellId->push_back(aECLPureCalDigits->getCellId());
1666 m_eclPureCalDigitAmp->push_back(aECLPureCalDigits->getEnergy());
1667 m_eclPureCalDigitTimeFit->push_back(aECLPureCalDigits->getTime());
1668 m_eclPureCalDigitFitQuality->push_back(aECLPureCalDigits->isFailedFit());
1669
1670 double sumHit = 0;
1671 int idx[10];
1672 for (int i = 0; i < 10; i++)
1673 idx[i] = -1;
1674
1675 double wi[10];
1676 for (int i = 0; i < 10; i++)
1677 wi[i] = -1;
1678
1679 int ii = 0;
1680 sumHit = 0;
1681
1682 auto digitMCRelations = aECLPureCalDigits->getRelationsTo<MCParticle>();
1683 for (unsigned int i = 0; i < digitMCRelations.size(); ++i) {
1684 if (ii < 10) {
1685 const auto mcParticle = digitMCRelations.object(i);
1686 idx[ii] = mcParticle->getIndex() - 1;
1687 wi[ii] = digitMCRelations.weight(i);
1688 sumHit = sumHit + digitMCRelations.weight(i);
1689 ii++;
1690 }
1691 }
1692
1693 //Re-ordering based on contribution
1694 int y = 0;
1695 while (y < 10) {
1696 for (int i = 0; i < 9; i++) {
1697 if (((idx[i]) > -1) && ((idx[i + 1]) > -1)) {
1698 if (wi[i] < wi[i + 1]) {
1699 int temp = idx[i];
1700 idx[i] = idx[i + 1];
1701 idx[i + 1] = temp;
1702
1703 double wtemp = wi[i];
1704 wi[i] = wi[i + 1];
1705 wi[i + 1] = wtemp;
1706 }
1707 }
1708 }
1709 y++;
1710 }
1711
1712 m_eclPureCalDigitToBkgWeight->push_back(aECLPureCalDigits->getEnergy() - sumHit);
1713 m_eclPureCalDigitSimHitSum->push_back(sumHit);
1714 if (idx[0] > -1) {
1715 m_eclPureCalDigitToMCWeight1->push_back(wi[0]);
1716 m_eclPureCalDigitToMC1->push_back(idx[0]);
1717 const MCParticle* amcParticle = m_mcParticles[idx[0]];
1718 m_eclPureCalDigitToMC1PDG->push_back(amcParticle->getPDG());
1719 } else {
1720 m_eclPureCalDigitToMCWeight1->push_back(-1);
1721 m_eclPureCalDigitToMC1->push_back(-1);
1722 m_eclPureCalDigitToMC1PDG->push_back(-1);
1723 }
1724 if (idx[1] > -1) {
1725 m_eclPureCalDigitToMCWeight2->push_back(wi[1]);
1726 m_eclPureCalDigitToMC2->push_back(idx[1]);
1727 const MCParticle* amcParticle = m_mcParticles[idx[1]];
1728 m_eclPureCalDigitToMC2PDG->push_back(amcParticle->getPDG());
1729 } else {
1730 m_eclPureCalDigitToMCWeight2->push_back(-1);
1731 m_eclPureCalDigitToMC2->push_back(-1);
1732 m_eclPureCalDigitToMC2PDG->push_back(-1);
1733 }
1734 if (idx[2] > -1) {
1735 m_eclPureCalDigitToMCWeight3->push_back(wi[2]);
1736 m_eclPureCalDigitToMC3->push_back(idx[2]);
1737 const MCParticle* amcParticle = m_mcParticles[idx[2]];
1738 m_eclPureCalDigitToMC3PDG->push_back(amcParticle->getPDG());
1739 } else {
1740 m_eclPureCalDigitToMCWeight3->push_back(-1);
1741 m_eclPureCalDigitToMC3->push_back(-1);
1742 m_eclPureCalDigitToMC3PDG->push_back(-1);
1743 }
1744 if (idx[3] > -1) {
1745 m_eclPureCalDigitToMCWeight4->push_back(wi[3]);
1746 m_eclPureCalDigitToMC4->push_back(idx[3]);
1747 const MCParticle* amcParticle = m_mcParticles[idx[3]];
1748 m_eclPureCalDigitToMC4PDG->push_back(amcParticle->getPDG());
1749 } else {
1750 m_eclPureCalDigitToMCWeight4->push_back(-1);
1751 m_eclPureCalDigitToMC4->push_back(-1);
1752 m_eclPureCalDigitToMC4PDG->push_back(-1);
1753 }
1754 if (idx[4] > -1) {
1755 m_eclPureCalDigitToMCWeight5->push_back(wi[4]);
1756 m_eclPureCalDigitToMC5->push_back(idx[4]);
1757 const MCParticle* amcParticle = m_mcParticles[idx[4]];
1758 m_eclPureCalDigitToMC5PDG->push_back(amcParticle->getPDG());
1759 } else {
1760 m_eclPureCalDigitToMCWeight5->push_back(-1);
1761 m_eclPureCalDigitToMC5->push_back(-1);
1762 m_eclPureCalDigitToMC5PDG->push_back(-1);
1763 }
1764
1765 if (aECLPureCalDigits->getRelated<ECLShower>() != (nullptr)) {
1766 const ECLShower* shower_caldigit = aECLPureCalDigits->getRelated<ECLShower>();
1767 m_eclPureCalDigitToShower->push_back(shower_caldigit->getArrayIndex());
1768 } else
1769 m_eclPureCalDigitToShower->push_back(-1);
1770
1771 if (aECLPureCalDigits->getRelated<ECLConnectedRegion>(eclPureConnectedRegionArrayName()) != (nullptr)) {
1772 const ECLConnectedRegion* cr_caldigit = aECLPureCalDigits->getRelated<ECLConnectedRegion>(eclPureConnectedRegionArrayName());
1773 m_eclPureCalDigitToCR->push_back(cr_caldigit->getCRId());
1774 } else
1775 m_eclPureCalDigitToCR->push_back(-1);
1776
1777 if (aECLPureCalDigits->getRelated<ECLLocalMaximum>(eclPureLocalMaximumArrayName()) != (nullptr)) {
1778 const ECLLocalMaximum* lm_caldigit = aECLPureCalDigits->getRelated<ECLLocalMaximum>(eclPureLocalMaximumArrayName());
1779 m_eclPureCalDigitToLM->push_back(lm_caldigit->getLMId());
1780 } else
1781 m_eclPureCalDigitToLM->push_back(-1);
1782
1783 }
1784
1785 //CR
1786 int PureCRmultip = m_eclPureConnectedRegions.getEntries();
1787 for (int i = 0; i < PureCRmultip; i++) {
1788 const ECLConnectedRegion* aECLPureCR = m_eclPureConnectedRegions[i];
1789 m_eclPureCRIdx->push_back(aECLPureCR->getCRId());
1790 m_eclPureCRIsTrack->push_back(aECLPureCR->isTrack());
1794 m_eclPureCRLikelihoodNGamma->push_back(aECLPureCR->getLikelihoodNGamma());
1797 }
1798
1799 //LM
1801 for (unsigned int pure_ilms = 0; pure_ilms < (unsigned int)m_eclPureLocalMaximums.getEntries() ; pure_ilms++) {
1802 const ECLLocalMaximum* aECLLMs = m_eclPureLocalMaximums[pure_ilms];
1803 m_eclPureLMId->push_back(aECLLMs->getLMId());
1804 m_eclPureLMType->push_back(aECLLMs->getType());
1805 m_eclPureLMCellId->push_back(aECLLMs->getCellId());
1806 }
1807
1809 for (unsigned int iclusters = 0; iclusters < (unsigned int)m_eclPureClusters.getEntries() ; iclusters++) {
1810 ECLCluster* aECLClusters = m_eclPureClusters[iclusters];
1811 m_eclPureClusterIdx->push_back(iclusters);
1812
1813 double clusterE = 0.0;
1814 if (aECLClusters->hasHypothesis(ECLCluster::EHypothesisBit::c_nPhotons)) clusterE = aECLClusters->getEnergy(
1816 else clusterE = aECLClusters->getEnergy(ECLCluster::EHypothesisBit::c_neutralHadron);
1817 m_eclPureClusterEnergy->push_back(clusterE);
1818
1819 m_eclPureClusterEnergyError->push_back(aECLClusters->getUncertaintyEnergy());
1820 m_eclPureClusterTheta->push_back(aECLClusters->getTheta());
1821 m_eclPureClusterThetaError->push_back(aECLClusters->getUncertaintyTheta());
1822 m_eclPureClusterPhi->push_back(aECLClusters->getPhi());
1823 m_eclPureClusterPhiError->push_back(aECLClusters->getUncertaintyPhi());
1824 m_eclPureClusterR->push_back(aECLClusters->getR());
1825 m_eclPureClusterEnergyDepSum->push_back(aECLClusters->getEnergyRaw());
1826 m_eclPureClusterTiming->push_back(aECLClusters->getTime());
1827 m_eclPureClusterTimingError->push_back(aECLClusters->getDeltaTime99());
1828 m_eclPureClusterE9oE21->push_back(aECLClusters->getE9oE21());
1829 m_eclPureClusterHighestE->push_back(aECLClusters->getEnergyHighestCrystal());
1830 m_eclPureClusterCellId->push_back(aECLClusters->getMaxECellId());
1831 m_eclPureClusterLat->push_back(aECLClusters->getLAT());
1832 m_eclPureClusterNofCrystals->push_back(aECLClusters->getNumberOfCrystals());
1833 m_eclPureClusterCrystalHealth->push_back(aECLClusters->getStatus());
1834
1835 m_eclPureClusterClosestTrackDist->push_back(aECLClusters->getMinTrkDistance());
1836 m_eclPureClusterAbsZernike40->push_back(aECLClusters->getAbsZernike40());
1837 m_eclPureClusterAbsZernike51->push_back(aECLClusters->getAbsZernike51());
1838 m_eclPureClusterZernikeMVA->push_back(aECLClusters->getZernikeMVA());
1839 m_eclPureClusterSecondMoment->push_back(aECLClusters->getSecondMoment());
1840
1841 m_eclPureClusterIsTrack->push_back(aECLClusters->isTrack());
1842 m_eclPureClusterDeltaL->push_back(aECLClusters->getDeltaL());
1843
1844 m_eclPureClusterE1oE9->push_back(aECLClusters->getE1oE9());
1845 m_eclPureClusterDeltaTime99->push_back(aECLClusters->getDeltaTime99());
1846 m_eclPureClusterDetectorRegion->push_back(aECLClusters->getDetectorRegion());
1849
1850 //Dump MC Info - Multiple Matching
1851 double sumHit = 0;
1852 int idx[10];
1853 for (int i = 0; i < 10; i++)
1854 idx[i] = -1;
1855
1856 double wi[10];
1857 for (int i = 0; i < 10; i++)
1858 wi[i] = -1;
1859
1860 int ii = 0;
1861 sumHit = 0;
1862
1863 auto clusterMCRelations = aECLClusters->getRelationsTo<MCParticle>();
1864 for (unsigned int i = 0; i < clusterMCRelations.size(); ++i) {
1865 if (ii < 10) {
1866 const auto mcParticle = clusterMCRelations.object(i);
1867 idx[ii] = mcParticle->getIndex() - 1;
1868 wi[ii] = clusterMCRelations.weight(i);
1869 sumHit = sumHit + clusterMCRelations.weight(i);
1870 ii++;
1871 }
1872 }
1873
1874 //Re-ordering based on contribution
1875 int y = 0;
1876 while (y < 10) {
1877 for (int i = 0; i < 9; i++) {
1878 if (((idx[i]) > -1) && ((idx[i + 1]) > -1)) {
1879 if (wi[i] < wi[i + 1]) {
1880 int temp = idx[i];
1881 idx[i] = idx[i + 1];
1882 idx[i + 1] = temp;
1883
1884 double wtemp = wi[i];
1885 wi[i] = wi[i + 1];
1886 wi[i + 1] = wtemp;
1887 }
1888 }
1889 }
1890 y++;
1891 }
1892
1893 m_eclPureClusterToBkgWeight->push_back(clusterE - sumHit);
1894 if (idx[0] > -1) {
1895 m_eclPureClusterToMCWeight1->push_back(wi[0]);
1896 m_eclPureClusterToMC1->push_back(idx[0]);
1897 const MCParticle* amcParticle = m_mcParticles[idx[0]];
1898 m_eclPureClusterToMC1PDG->push_back(amcParticle->getPDG());
1899 } else {
1900 m_eclPureClusterToMCWeight1->push_back(-1);
1901 m_eclPureClusterToMC1->push_back(-1);
1902 m_eclPureClusterToMC1PDG->push_back(-1);
1903 }
1904 if (idx[1] > -1) {
1905 m_eclPureClusterToMCWeight2->push_back(wi[1]);
1906 m_eclPureClusterToMC2->push_back(idx[1]);
1907 const MCParticle* amcParticle = m_mcParticles[idx[1]];
1908 m_eclPureClusterToMC2PDG->push_back(amcParticle->getPDG());
1909 } else {
1910 m_eclPureClusterToMCWeight2->push_back(-1);
1911 m_eclPureClusterToMC2->push_back(-1);
1912 m_eclPureClusterToMC2PDG->push_back(-1);
1913 }
1914 if (idx[2] > -1) {
1915 m_eclPureClusterToMCWeight3->push_back(wi[2]);
1916 m_eclPureClusterToMC3->push_back(idx[2]);
1917 const MCParticle* amcParticle = m_mcParticles[idx[2]];
1918 m_eclPureClusterToMC3PDG->push_back(amcParticle->getPDG());
1919 } else {
1920 m_eclPureClusterToMCWeight3->push_back(-1);
1921 m_eclPureClusterToMC3->push_back(-1);
1922 m_eclPureClusterToMC3PDG->push_back(-1);
1923 }
1924 if (idx[3] > -1) {
1925 m_eclPureClusterToMCWeight4->push_back(wi[3]);
1926 m_eclPureClusterToMC4->push_back(idx[3]);
1927 const MCParticle* amcParticle = m_mcParticles[idx[3]];
1928 m_eclPureClusterToMC4PDG->push_back(amcParticle->getPDG());
1929 } else {
1930 m_eclPureClusterToMCWeight4->push_back(-1);
1931 m_eclPureClusterToMC4->push_back(-1);
1932 m_eclPureClusterToMC4PDG->push_back(-1);
1933 }
1934 if (idx[4] > -1) {
1935 m_eclPureClusterToMCWeight5->push_back(wi[4]);
1936 m_eclPureClusterToMC5->push_back(idx[4]);
1937 const MCParticle* amcParticle = m_mcParticles[idx[4]];
1938 m_eclPureClusterToMC5PDG->push_back(amcParticle->getPDG());
1939 } else {
1940 m_eclPureClusterToMCWeight5->push_back(-1);
1941 m_eclPureClusterToMC5->push_back(-1);
1942 m_eclPureClusterToMC5PDG->push_back(-1);
1943 }
1944
1945 }
1946 }
1947
1948 m_eclShowerMultip = m_eclShowers.getEntries();
1949 for (uint ishowers = 0; ishowers < (uint)m_eclShowers.getEntries() ; ishowers++) {
1950 ECLShower* aECLShowers = m_eclShowers[ishowers];
1951 m_eclShowerIdx->push_back(ishowers);
1952 m_eclShowerEnergy->push_back(aECLShowers->getEnergy());
1953 m_eclShowerTheta->push_back(aECLShowers->getTheta());
1954 m_eclShowerPhi->push_back(aECLShowers->getPhi());
1955 m_eclShowerR->push_back(aECLShowers->getR());
1956 m_eclShowerNHits->push_back(aECLShowers->getNumberOfCrystals());
1957 m_eclShowerE9oE21->push_back(aECLShowers->getE9oE21());
1958 m_eclShowerUncEnergy->push_back(aECLShowers->getEnergyRaw());
1959 m_eclShowerTime->push_back(aECLShowers->getTime());
1960 m_eclShowerT99->push_back(aECLShowers->getDeltaTime99());
1961 m_eclShowerConnectedRegionId->push_back(aECLShowers->getConnectedRegionId());
1962 m_eclShowerHypothesisId->push_back(aECLShowers->getHypothesisId());
1963 m_eclShowerCentralCellId->push_back(aECLShowers->getCentralCellId());
1964 m_eclShowerEnergyError->push_back(aECLShowers->getUncertaintyEnergy());
1965 m_eclShowerThetaError->push_back(aECLShowers->getUncertaintyTheta());
1966 m_eclShowerPhiError->push_back(aECLShowers->getUncertaintyPhi());
1967 m_eclShowerTimeResolution->push_back(aECLShowers->getDeltaTime99());
1968 m_eclShowerHighestEnergy->push_back(aECLShowers->getEnergyHighestCrystal());
1969 m_eclShowerLateralEnergy->push_back(aECLShowers->getLateralEnergy());
1970 m_eclShowerMinTrkDistance->push_back(aECLShowers->getMinTrkDistance());
1971 m_eclShowerTrkDepth->push_back(aECLShowers->getTrkDepth());
1972 m_eclShowerShowerDepth->push_back(aECLShowers->getShowerDepth());
1973 m_eclShowerAbsZernike40->push_back(aECLShowers->getAbsZernikeMoment(4, 0));
1974 m_eclShowerAbsZernike51->push_back(aECLShowers->getAbsZernikeMoment(5, 1));
1975 m_eclShowerZernikeMVA->push_back(aECLShowers->getZernikeMVA());
1976 m_eclShowerSecondMoment->push_back(aECLShowers->getSecondMoment());
1977 m_eclShowerE1oE9->push_back(aECLShowers->getE1oE9());
1978 m_eclShowerIsTrack->push_back(aECLShowers->getIsTrack());
1980
1981 double fe = 0.;
1982 double se = 0.;
1983
1984 auto showerDigitRelations = aECLShowers->getRelationsTo<ECLCalDigit>();
1985 for (unsigned int i = 0; i < showerDigitRelations.size(); ++i) {
1986 const auto aECLCalDigits = showerDigitRelations.object(i);
1987 if (aECLCalDigits->getEnergy() > fe) {
1988 se = fe;
1989 fe = aECLCalDigits->getEnergy();
1990 }
1991 }
1992 if (fe > 0 && se > 0)
1993 m_eclShowerHighestE1mE2->push_back(fe - se);
1994 else
1995 m_eclShowerHighestE1mE2->push_back(-1);
1996
1997 int lm1[5] = { -1, -1, -1, -1, -1};
1998
1999 auto showerLMRelations = aECLShowers->getRelationsTo<ECLLocalMaximum>();
2000 for (unsigned int i = 0; i < showerLMRelations.size(); ++i) {
2001 const auto aECLLM = showerLMRelations.object(i);
2002 lm1[i] = aECLLM->getLMId();
2003 }
2004 m_eclShowerToLM1->push_back(lm1[0]);
2005 m_eclShowerToLM2->push_back(lm1[1]);
2006 m_eclShowerToLM3->push_back(lm1[2]);
2007 m_eclShowerToLM4->push_back(lm1[3]);
2008 m_eclShowerToLM5->push_back(lm1[4]);
2009
2010 double sumHit = 0;
2011
2012 int idx[10];
2013 for (int i = 0; i < 10; i++)
2014 idx[i] = -1;
2015
2016 double wi[10];
2017 for (int i = 0; i < 10; i++)
2018 wi[i] = -1;
2019
2020 int ii = 0;
2021 sumHit = 0;
2022
2023 auto showerMCRelations = aECLShowers->getRelationsTo<MCParticle>();
2024 for (unsigned int i = 0; i < showerMCRelations.size(); ++i) {
2025 if (ii < 10) {
2026 const auto mcParticle = showerMCRelations.object(i);
2027 idx[ii] = mcParticle->getIndex() - 1;
2028 wi[ii] = showerMCRelations.weight(i);
2029 sumHit = sumHit + showerMCRelations.weight(i);
2030 ii++;
2031 }
2032 }
2033
2034 //Re-ordering based on contribution
2035 int y = 0;
2036 while (y < 10) {
2037 for (int i = 0; i < 9; i++) {
2038 if (((idx[i]) > -1) && ((idx[i + 1]) > -1)) {
2039 if (wi[i] < wi[i + 1]) {
2040 int temp = idx[i];
2041 idx[i] = idx[i + 1];
2042 idx[i + 1] = temp;
2043
2044 double wtemp = wi[i];
2045 wi[i] = wi[i + 1];
2046 wi[i + 1] = wtemp;
2047 }
2048 }
2049 }
2050 y++;
2051 }
2052
2053 int no_Primary = 1;
2054
2055 for (unsigned int i = 0; i < showerMCRelations.size(); ++i) {
2056 const auto mcParticle = showerMCRelations.object(i);
2057 if (mcParticle->getSecondaryPhysicsProcess() == 0 && mcParticle->getPDG() == Const::Klong.getPDGCode()) {
2058 double vtxx = mcParticle->getDecayVertex().X();
2059 double vtxy = mcParticle->getDecayVertex().Y();
2060 double vtxz = mcParticle->getDecayVertex().Z();
2061 if ((TMath::Sqrt(vtxx * vtxx + vtxy * vtxy) > 118) || (vtxz > 196.16) || (vtxz < -102.16))
2062 no_Primary = 0;
2063 } else if (mcParticle->getSecondaryPhysicsProcess() != 0 && mcParticle->getMother()->getPDG() == Const::Klong.getPDGCode()) {
2064 double vtxx = mcParticle->getProductionVertex().X();
2065 double vtxy = mcParticle->getProductionVertex().Y();
2066 double vtxz = mcParticle->getProductionVertex().Z();
2067 if ((TMath::Sqrt(vtxx * vtxx + vtxy * vtxy) > 118) || (vtxz > 196.16) || (vtxz < -102.16))
2068 no_Primary = 0;
2069 }
2070 }
2071
2072 if (no_Primary == 0)
2073 m_eclShowerMCVtxInEcl->push_back(1);
2074 else
2075 m_eclShowerMCVtxInEcl->push_back(0);
2076
2077 double no_fMatch = 0;
2078 double no_fFMatch = 0;
2079
2080 for (unsigned int i = 0; i < showerMCRelations.size(); ++i) {
2081 const auto mcParticle = showerMCRelations.object(i);
2082 if (mcParticle->getSecondaryPhysicsProcess() == 0) {
2083 double vtxx = mcParticle->getDecayVertex().X();
2084 double vtxy = mcParticle->getDecayVertex().Y();
2085 double vtxz = mcParticle->getDecayVertex().Z();
2086 double px = mcParticle->getMomentum().X();
2087 double py = mcParticle->getMomentum().Y();
2088 double pz = mcParticle->getMomentum().Z();
2089 double p = TMath::Sqrt(px * px + py * py + pz * pz);
2090 double pTheta = TMath::ACos(pz / p);
2091 double pPhi = 10.;
2092 if (py > 0) {
2093 if (px > 0)
2094 pPhi = TMath::ATan(py / px);
2095 if (px < 0)
2096 pPhi = TMath::ATan(py / px) + M_PI;
2097 } else {
2098 if (px > 0)
2099 pPhi = TMath::ATan(py / px) ;
2100 if (px < 0)
2101 pPhi = TMath::ATan(py / px) - M_PI;
2102 }
2103 if ((TMath::Sqrt(vtxx * vtxx + vtxy * vtxy) > 118) || (vtxz > 196.16) || (vtxz < -102.16)) {
2104 if (TMath::Abs(aECLShowers->getTheta() - pTheta) < 0.05 && TMath::Abs(aECLShowers->getPhi() - pPhi) < 0.05)
2105 no_fMatch = 1;
2106 no_fFMatch = 1;
2107 }
2108 } else if (mcParticle->getMother()->getPDG() == Const::Klong.getPDGCode()) {
2109 double vtxx = mcParticle->getProductionVertex().X();
2110 double vtxy = mcParticle->getProductionVertex().Y();
2111 double vtxz = mcParticle->getProductionVertex().Z();
2112 const MCParticle* amcParticle = mcParticle->getMother();
2113 double px = amcParticle->getMomentum().X();
2114 double py = amcParticle->getMomentum().Y();
2115 double pz = amcParticle->getMomentum().Z();
2116 double p = TMath::Sqrt(px * px + py * py + pz * pz);
2117 double pTheta = TMath::ACos(pz / p);
2118 double pPhi = 10.;
2119 if (py > 0) {
2120 if (px > 0)
2121 pPhi = TMath::ATan(py / px);
2122 if (px < 0)
2123 pPhi = TMath::ATan(py / px) + M_PI;
2124 } else {
2125 if (px > 0)
2126 pPhi = TMath::ATan(py / px) ;
2127 if (px < 0)
2128 pPhi = TMath::ATan(py / px) - M_PI;
2129 }
2130 if ((TMath::Sqrt(vtxx * vtxx + vtxy * vtxy) > 118) || (vtxz > 196.16) || (vtxz < -102.16)) {
2131 if (TMath::Abs(aECLShowers->getTheta() - pTheta) < 0.05 && TMath::Abs(aECLShowers->getPhi() - pPhi) < 0.05)
2132 no_fMatch = 1;
2133 }
2134 }
2135 }
2136
2137 if (no_fMatch == 1)
2138 m_eclShowerMCFlightMatch->push_back(1);
2139 else
2140 m_eclShowerMCFlightMatch->push_back(0);
2141
2142 if (no_fFMatch == 1)
2143 m_eclShowerMCFFlightMatch->push_back(1);
2144 else
2145 m_eclShowerMCFFlightMatch->push_back(0);
2146
2147 if (idx[0] > -1) {
2148 m_eclShowerToMCWeight1->push_back(wi[0]);
2149 m_eclShowerToMC1->push_back(idx[0]);
2150 const MCParticle* amcParticle = m_mcParticles[idx[0]];
2151 m_eclShowerToMC1PDG->push_back(amcParticle->getPDG());
2152 if (amcParticle->getMother() != nullptr) {
2153 m_eclShowerToMC1Moth->push_back(amcParticle->getMother()->getIndex());
2154 m_eclShowerToMC1MothPDG->push_back(amcParticle->getMother()->getPDG());
2155 if (amcParticle->getMother()->getMother() != nullptr) {
2156 m_eclShowerToMC1GMoth->push_back(amcParticle->getMother()->getMother()->getIndex());
2157 m_eclShowerToMC1GMothPDG->push_back(amcParticle->getMother()->getMother()->getPDG());
2158 } else {
2159 m_eclShowerToMC1GMoth->push_back(-999);
2160 m_eclShowerToMC1GMothPDG->push_back(-999);
2161 }
2162 } else {
2163 m_eclShowerToMC1Moth->push_back(-999);
2164 m_eclShowerToMC1MothPDG->push_back(-999);
2165 m_eclShowerToMC1GMoth->push_back(-999);
2166 m_eclShowerToMC1GMothPDG->push_back(-999);
2167 }
2168 } else {
2169 m_eclShowerToMCWeight1->push_back(-1);
2170 m_eclShowerToMC1->push_back(-1);
2171 m_eclShowerToMC1PDG->push_back(-1);
2172 m_eclShowerToMC1Moth->push_back(-1);
2173 m_eclShowerToMC1MothPDG->push_back(-1);
2174 m_eclShowerToMC1GMoth->push_back(-1);
2175 m_eclShowerToMC1GMothPDG->push_back(-1);
2176 }
2177 if (idx[1] > -1) {
2178 m_eclShowerToMCWeight2->push_back(wi[1]);
2179 m_eclShowerToMC2->push_back(idx[1]);
2180 const MCParticle* amcParticle = m_mcParticles[idx[1]];
2181 m_eclShowerToMC2PDG->push_back(amcParticle->getPDG());
2182 if (amcParticle->getMother() != nullptr) {
2183 m_eclShowerToMC2Moth->push_back(amcParticle->getMother()->getIndex());
2184 m_eclShowerToMC2MothPDG->push_back(amcParticle->getMother()->getPDG());
2185 if (amcParticle->getMother()->getMother() != nullptr) {
2186 m_eclShowerToMC2GMoth->push_back(amcParticle->getMother()->getMother()->getIndex());
2187 m_eclShowerToMC2GMothPDG->push_back(amcParticle->getMother()->getMother()->getPDG());
2188 } else {
2189 m_eclShowerToMC2GMoth->push_back(-999);
2190 m_eclShowerToMC2GMothPDG->push_back(-999);
2191 }
2192 } else {
2193 m_eclShowerToMC2Moth->push_back(-999);
2194 m_eclShowerToMC2MothPDG->push_back(-999);
2195 m_eclShowerToMC2GMoth->push_back(-999);
2196 m_eclShowerToMC2GMothPDG->push_back(-999);
2197 };
2198 } else {
2199 m_eclShowerToMCWeight2->push_back(-1);
2200 m_eclShowerToMC2->push_back(-1);
2201 m_eclShowerToMC2PDG->push_back(-1);
2202 m_eclShowerToMC2Moth->push_back(-1);
2203 m_eclShowerToMC2MothPDG->push_back(-1);
2204 m_eclShowerToMC2GMoth->push_back(-1);
2205 m_eclShowerToMC2GMothPDG->push_back(-1);
2206 }
2207 if (idx[2] > -1) {
2208 m_eclShowerToMCWeight3->push_back(wi[2]);
2209 m_eclShowerToMC3->push_back(idx[2]);
2210 const MCParticle* amcParticle = m_mcParticles[idx[2]];
2211 m_eclShowerToMC3PDG->push_back(amcParticle->getPDG());
2212 if (amcParticle->getMother() != nullptr) {
2213 m_eclShowerToMC3Moth->push_back(amcParticle->getMother()->getIndex());
2214 m_eclShowerToMC3MothPDG->push_back(amcParticle->getMother()->getPDG());
2215 if (amcParticle->getMother()->getMother() != nullptr) {
2216 m_eclShowerToMC3GMoth->push_back(amcParticle->getMother()->getMother()->getIndex());
2217 m_eclShowerToMC3GMothPDG->push_back(amcParticle->getMother()->getMother()->getPDG());
2218 } else {
2219 m_eclShowerToMC3GMoth->push_back(-999);
2220 m_eclShowerToMC3GMothPDG->push_back(-999);
2221 }
2222 } else {
2223 m_eclShowerToMC3Moth->push_back(-999);
2224 m_eclShowerToMC3MothPDG->push_back(-999);
2225 m_eclShowerToMC3GMoth->push_back(-999);
2226 m_eclShowerToMC3GMothPDG->push_back(-999);
2227 }
2228 } else {
2229 m_eclShowerToMCWeight3->push_back(-1);
2230 m_eclShowerToMC3->push_back(-1);
2231 m_eclShowerToMC3PDG->push_back(-1);
2232 m_eclShowerToMC3Moth->push_back(-1);
2233 m_eclShowerToMC3MothPDG->push_back(-1);
2234 m_eclShowerToMC3GMoth->push_back(-1);
2235 m_eclShowerToMC3GMothPDG->push_back(-1);
2236 }
2237 if (idx[3] > -1) {
2238 m_eclShowerToMCWeight4->push_back(wi[3]);
2239 m_eclShowerToMC4->push_back(idx[3]);
2240 const MCParticle* amcParticle = m_mcParticles[idx[3]];
2241 m_eclShowerToMC4PDG->push_back(amcParticle->getPDG());
2242 if (amcParticle->getMother() != nullptr) {
2243 m_eclShowerToMC4Moth->push_back(amcParticle->getMother()->getIndex());
2244 m_eclShowerToMC4MothPDG->push_back(amcParticle->getMother()->getPDG());
2245 if (amcParticle->getMother()->getMother() != nullptr) {
2246 m_eclShowerToMC4GMoth->push_back(amcParticle->getMother()->getMother()->getIndex());
2247 m_eclShowerToMC4GMothPDG->push_back(amcParticle->getMother()->getMother()->getPDG());
2248 } else {
2249 m_eclShowerToMC4GMoth->push_back(-999);
2250 m_eclShowerToMC4GMothPDG->push_back(-999);
2251 }
2252 } else {
2253 m_eclShowerToMC4Moth->push_back(-999);
2254 m_eclShowerToMC4MothPDG->push_back(-999);
2255 m_eclShowerToMC4GMoth->push_back(-999);
2256 m_eclShowerToMC4GMothPDG->push_back(-999);
2257 }
2258 } else {
2259 m_eclShowerToMCWeight4->push_back(-1);
2260 m_eclShowerToMC4->push_back(-1);
2261 m_eclShowerToMC4PDG->push_back(-1);
2262 m_eclShowerToMC4Moth->push_back(-1);
2263 m_eclShowerToMC4MothPDG->push_back(-1);
2264 m_eclShowerToMC4GMoth->push_back(-1);
2265 m_eclShowerToMC4GMothPDG->push_back(-1);
2266 }
2267 if (idx[4] > -1) {
2268 m_eclShowerToMCWeight5->push_back(wi[4]);
2269 m_eclShowerToMC5->push_back(idx[4]);
2270 const MCParticle* amcParticle = m_mcParticles[idx[4]];
2271 m_eclShowerToMC5PDG->push_back(amcParticle->getPDG());
2272 if (amcParticle->getMother() != nullptr) {
2273 m_eclShowerToMC5Moth->push_back(amcParticle->getMother()->getIndex());
2274 m_eclShowerToMC5MothPDG->push_back(amcParticle->getMother()->getPDG());
2275 if (amcParticle->getMother()->getMother() != nullptr) {
2276 m_eclShowerToMC5GMoth->push_back(amcParticle->getMother()->getMother()->getIndex());
2277 m_eclShowerToMC5GMothPDG->push_back(amcParticle->getMother()->getMother()->getPDG());
2278 } else {
2279 m_eclShowerToMC5GMoth->push_back(-999);
2280 m_eclShowerToMC5GMothPDG->push_back(-999);
2281 }
2282 } else {
2283 m_eclShowerToMC5Moth->push_back(-999);
2284 m_eclShowerToMC5MothPDG->push_back(-999);
2285 m_eclShowerToMC5GMoth->push_back(-999);
2286 m_eclShowerToMC5GMothPDG->push_back(-999);
2287 }
2288 } else {
2289 m_eclShowerToMCWeight5->push_back(-1);
2290 m_eclShowerToMC5->push_back(-1);
2291 m_eclShowerToMC5PDG->push_back(-1);
2292 m_eclShowerToMC5Moth->push_back(-1);
2293 m_eclShowerToMC5MothPDG->push_back(-1);
2294 m_eclShowerToMC5GMoth->push_back(-1);
2295 m_eclShowerToMC5GMothPDG->push_back(-1);
2296 }
2297 m_eclShowerToBkgWeight->push_back(aECLShowers->getEnergy() - sumHit);
2298 }
2299
2300 m_mcMultip = m_mcParticles.getEntries();
2301 for (int imcpart = 0; imcpart < m_mcParticles.getEntries(); imcpart++) {
2302 const MCParticle* amcParticle = m_mcParticles[imcpart];
2303 m_mcIdx->push_back(amcParticle->getArrayIndex());
2304 m_mcPdg->push_back(amcParticle->getPDG());
2305 if (amcParticle->getMother() != nullptr) m_mcMothPdg->push_back(amcParticle->getMother()->getPDG());
2306 else m_mcMothPdg->push_back(-999);
2307 if (amcParticle->getMother() != nullptr
2308 && amcParticle->getMother()->getMother() != nullptr) m_mcGMothPdg->push_back(amcParticle->getMother()->getMother()->getPDG());
2309 else m_mcGMothPdg->push_back(-999);
2310 if (amcParticle->getMother() != nullptr && amcParticle->getMother()->getMother() != nullptr
2311 && amcParticle->getMother()->getMother()->getMother() != nullptr)
2312 m_mcGGMothPdg->push_back(amcParticle->getMother()->getMother()->getMother()->getPDG());
2313 else m_mcGGMothPdg->push_back(-999);
2314 m_mcEnergy->push_back(amcParticle->getEnergy());
2315 m_mcSecondaryPhysProc->push_back(amcParticle->getSecondaryPhysicsProcess());
2316
2317 m_mcPx->push_back(amcParticle->getMomentum().X());
2318 m_mcPy->push_back(amcParticle->getMomentum().Y());
2319 m_mcPz->push_back(amcParticle->getMomentum().Z());
2320
2321 m_mcDecayVtxX->push_back(amcParticle->getDecayVertex().X());
2322 m_mcDecayVtxY->push_back(amcParticle->getDecayVertex().Y());
2323 m_mcDecayVtxZ->push_back(amcParticle->getDecayVertex().Z());
2324
2325 m_mcProdVtxX->push_back(amcParticle->getProductionVertex().X());
2326 m_mcProdVtxY->push_back(amcParticle->getProductionVertex().Y());
2327 m_mcProdVtxZ->push_back(amcParticle->getProductionVertex().Z());
2328
2329 }
2330
2331 if (m_doTracking == true) {
2332 m_trkMultip = 0;
2333 for (const Track& itrk : m_tracks) {
2334 const TrackFitResult* atrk = itrk.getTrackFitResult(Const::pion);
2335 if (atrk == nullptr) continue;
2336
2337 m_trkIdx->push_back(m_trkMultip);
2338 m_trkPdg->push_back(atrk->getParticleType().getPDGCode());
2339 m_trkCharge->push_back(atrk->getChargeSign());
2340 m_trkPx->push_back(atrk->getMomentum().X());
2341 m_trkPy->push_back(atrk->getMomentum().Y());
2342 m_trkPz->push_back(atrk->getMomentum().Z());
2343 m_trkP->push_back(atrk->getMomentum().R());
2344 m_trkTheta->push_back(atrk->getMomentum().Theta());
2345 m_trkPhi->push_back(atrk->getMomentum().Phi());
2346 m_trkX->push_back(atrk->getPosition().X());
2347 m_trkY->push_back(atrk->getPosition().Y());
2348 m_trkZ->push_back(atrk->getPosition().Z());
2349
2350 const ECLPidLikelihood* eclpid = itrk.getRelatedTo<ECLPidLikelihood>() ;
2351
2352 if (eclpid != nullptr) {
2353 m_eclpidtrkIdx -> push_back(m_trkMultip);
2354 m_eclpidEnergy -> push_back(eclpid-> energy());
2355 m_eclpidEop -> push_back(eclpid-> eop());
2356 m_eclpidE9E21 -> push_back(eclpid-> e9e25());
2357 m_eclpidNCrystals -> push_back(eclpid-> nCrystals());
2358 m_eclpidNClusters -> push_back(eclpid-> nClusters());
2359 m_eclLogLikeEl -> push_back(eclpid-> getLogLikelihood(Const::electron));
2360 m_eclLogLikeMu -> push_back(eclpid-> getLogLikelihood(Const::muon));
2361 m_eclLogLikePi -> push_back(eclpid-> getLogLikelihood(Const::pion));
2362 } else {
2363 m_eclpidtrkIdx -> push_back(m_trkMultip);
2364 m_eclpidEnergy -> push_back(0);
2365 m_eclpidEop -> push_back(0);
2366 m_eclpidE9E21 -> push_back(0);
2367 m_eclpidNCrystals -> push_back(0);
2368 m_eclpidNClusters -> push_back(0);
2369 m_eclLogLikeEl -> push_back(0);
2370 m_eclLogLikeMu -> push_back(0);
2371 m_eclLogLikePi -> push_back(0);
2372 }
2373 m_trkMultip++;
2374 }
2375 }
2376
2377 m_tree->Fill();
2378}
2379
2381{
2382
2383 if (m_rootFilePtr != nullptr) {
2384 m_rootFilePtr->cd();
2385 m_tree->Write();
2386 }
2387
2388}
int getPDGCode() const
PDG code.
Definition Const.h:474
static const ChargedStable muon
muon particle
Definition Const.h:661
static const ChargedStable pion
charged pion particle
Definition Const.h:662
static const ParticleType Klong
K^0_L particle.
Definition Const.h:679
static const ChargedStable electron
electron particle
Definition Const.h:660
Class to store calibrated ECLDigits: ECLCalDigits.
Definition ECLCalDigit.h:23
int getCellId() const
Get Cell ID.
double getEnergy() const
Get Calibrated Energy.
double getTime() const
Get Calibrated Time.
ECL cluster data.
Definition ECLCluster.h:27
unsigned short getMaxECellId() const
Return cellID of maximum energy crystal.
Definition ECLCluster.h:256
bool isTrack() const
Return true if the cluster matches with track.
Definition ECLCluster.h:244
bool hasHypothesis(EHypothesisBit bitmask) const
Return if specific hypothesis bit is set.
Definition ECLCluster.h:360
double getPhi() const
Return Corrected Phi of Shower (radian).
Definition ECLCluster.h:313
double getE1oE9() const
Return E1/E9 (shower shape variable).
Definition ECLCluster.h:286
double getDeltaL() const
Return deltaL.
Definition ECLCluster.h:274
double getR() const
Return R.
Definition ECLCluster.h:319
double getEnergyRaw() const
Return Uncorrected Energy deposited (GeV)
Definition ECLCluster.h:325
double getUncertaintyTheta() const
Return Uncertainty on Theta of Shower.
Definition ECLCluster.h:334
double getLAT() const
Return LAT (shower shape variable).
Definition ECLCluster.h:301
double getE9oE21() const
Return E9/E21 (shower shape variable).
Definition ECLCluster.h:289
int getDetectorRegion() const
Return detector region: 0: below acceptance, 1: FWD, 2: BRL, 3: BWD, 11: FWDGAP, 13: BWDGAP.
Definition ECLCluster.cc:70
unsigned short getStatus() const
Return status.
Definition ECLCluster.h:250
double getEnergy(EHypothesisBit hypothesis) const
Return Energy (GeV).
Definition ECLCluster.cc:23
double getUncertaintyEnergy() const
Return Uncertainty on Energy of Shower.
Definition ECLCluster.h:331
double getMinTrkDistance() const
Get distance between cluster COG and track extrapolation to ECL.
Definition ECLCluster.h:268
double getNumberOfCrystals() const
Return number of a crystals in a shower (sum of weights).
Definition ECLCluster.h:304
double getEnergyHighestCrystal() const
Return energy of highest energetic crystal in cluster (GeV)
Definition ECLCluster.h:328
double getZernikeMVA() const
Return MVA based hadron/photon value based on Zernike moments (shower shape variable).
Definition ECLCluster.h:283
double getUncertaintyPhi() const
Return Uncertainty on Phi of Shower.
Definition ECLCluster.h:337
double getAbsZernike40() const
Return Zernike moment 40 (shower shape variable).
Definition ECLCluster.h:277
double getSecondMoment() const
Return second moment (shower shape variable).
Definition ECLCluster.h:298
double getTheta() const
Return Corrected Theta of Shower (radian).
Definition ECLCluster.h:316
double getDeltaTime99() const
Return cluster delta time 99.
Definition ECLCluster.h:310
double getTime() const
Return cluster time.
Definition ECLCluster.h:307
@ c_nPhotons
CR is split into n photons (N1)
Definition ECLCluster.h:41
@ c_neutralHadron
CR is reconstructed as a neutral hadron (N2)
Definition ECLCluster.h:43
double getAbsZernike51() const
Return Zernike moment 51 (shower shape variable).
Definition ECLCluster.h:280
Class to store connected regions (CRs)
float getLikelihoodChargedHadron() const
Get Charged Hadron likelihood (ECL based only) T2.
bool isTrack() const
Get boolean to flag if a track is matched to the CR.
float getLikelihoodNeutralHadron() const
Get Neutral Hadron likelihood (ECL based only) N2.
float getLikelihoodMIPNGamma() const
Get MIPNGamma likelihood (ECL based only) T1.
float getLikelihoodNGamma() const
Get NGamma likelihood (ECL based only) N1.
int getCRId() const
Get CR identifier.
float getLikelihoodMergedPi0() const
Get Merged Pi0 likelihood (ECL based only) N3.
float getLikelihoodElectronNGamma() const
Get ElectronNGamma likelihood (ECL based only) T3.
std::vector< int > * m_eclClusterToMC4PDG
PDG code of fourth MCParticle related to ECLCluster.
std::vector< int > * m_eclShowerToLM5
Index of 5th maximum related to ECLShower.
std::vector< int > * m_eclShowerToMC2PDG
PDG code of second MCParticle related to ECLShower.
std::vector< double > * m_eclShowerTimeResolution
Shower Time Resolution.
bool m_doPureCsI
if true, info on pureCsI upgrade is stored
std::vector< int > * m_eclPureCalDigitToMC5PDG
PDG code of fifth MCParticle related to CalDigit, PureCsI option.
std::string m_rootFileName
name of the root file
std::vector< double > * m_eclPureCalDigitToMCWeight5
Energy contribution of fifth MCParticle related to CalDigit, PureCsI option.
std::vector< int > * m_eclShowerToMC5GMothPDG
PDG code of Gparent of fifth MCParticle related to ECLShower.
virtual const char * eclShowerArrayName() const
Default name ECLShower array.
std::vector< double > * m_eclLogLikeEl
PID track electron likelihood.
int m_eclDigitMultip
Number of ECLDigits per event.
std::vector< double > * m_eclClusterToMCWeight5
Energy contribution of 5th MCParticle related to ECLCluster.
bool m_doHits
if true, info on Hits and SimHits is stored
std::vector< int > * m_eclShowerToMC4MothPDG
PDG code of parent of fourth MCParticle related to ECLShower.
std::vector< double > * m_mcPy
MCParticle momentum Y direction.
std::vector< double > * m_eclCalDigitToMCWeight1
Energy contribution of first MCParticle related to ECLCalDigit.
std::vector< double > * m_eclClusterTheta
ECLCluster polar direction.
std::vector< int > * m_eclClusterNofCrystals
Number of crystals in ECLCluster.
std::vector< double > * m_eclPureClusterToBkgWeight
Remaining energy contribution not associated to first five MCParticles related to ECLCluster,...
std::vector< double > * m_eclPureCRLikelihoodNeutralHadron
Connected Region Neutral Hadron Likelihood, PureCsI option.
std::vector< int > * m_eclPureCalDigitToMC3PDG
PDG code of third MCParticle related to CalDigit, PureCsI option.
virtual const char * eclClusterArrayName() const
Default name ECLClusters array.
std::vector< int > * m_eclClusterDetectorRegion
Cluster Detector Region.
std::vector< int > * m_eclPureCalDigitToMC2
Index of second MCParticle related to CalDigit, PureCsI option.
std::vector< double > * m_eclCalDigitToMCWeight2
Energy contribution of second MCParticle related to ECLCalDigit.
ECLDataAnalysisModule()
Constructor of the module.
std::vector< int > * m_eclCRIdx
Connected Region ID.
std::vector< int > * m_eclClusterCellId
CellId with highest energy deposit in ECLCluster.
std::vector< int > * m_eclPureCalDigitToShower
Index of ECLShower related to that CalDigit, PureCsI option.
std::vector< int > * m_eclHitToMC
Index of MCParticle related to ECLHit.
std::vector< int > * m_eclClusterToMC3PDG
PDG code of third MCParticle related to ECLCluster.
std::vector< double > * m_eclCRLikelihoodElectronNGamma
Connected Region Electron Likelihood.
std::vector< double > * m_eclCalDigitTimeFit
ECLCalDigit timing.
std::vector< double > * m_eclPureClusterDeltaL
Reconstructed Cluster DeltaL, PureCsI option.
TTree * m_tree
Root tree and file for saving the output.
StoreArray< ECLShower > m_eclShowers
Store array: ECLShower.
std::vector< double > * m_eclCalDigitToMCWeight5
Energy contribution of fifth MCParticle related to ECLCalDigit.
std::vector< double > * m_eclSimHitFlightTime
ECLSimhit Flight Time.
std::vector< int > * m_eclClusterIdx
ECLCluster index.
std::vector< int > * m_eclPureClusterToMC5
Index of fifth MCParticle related to ECLCluster, PureCsI option.
std::vector< double > * m_eclPureCalDigitToBkgWeight
Remaining energy contribution not associated to first five MCParticles related to CalDigit,...
std::vector< double > * m_eclShowerEnergyError
Shower Energy Error.
StoreArray< ECLConnectedRegion > m_eclConnectedRegions
Store array: ECLConnectedRegion.
std::vector< double > * m_eclShowerTime
Shower Timing.
std::vector< double > * m_eclShowerTheta
Shower Theta.
std::vector< double > * m_eclShowerShowerDepth
Shower Depth.
std::vector< int > * m_eclShowerToMC4GMoth
GMother index of fourth MCParticle related to ECLShower.
std::vector< double > * m_eclCalDigitToMCWeight4
Energy contribution of fourth MCParticle related to ECLCalDigit.
std::vector< int > * m_eclPureCalDigitCellId
Number of CalDigit CellId, PureCsI option.
std::vector< double > * m_eclClusterR
ECLCluster distance from IP.
virtual const char * eclSimHitArrayName() const
Default name ECLCalDigits array.
std::vector< bool > * m_eclPureClusterIsTrack
Flag for charged clusters, PureCsI option.
std::vector< int > * m_eclPureCalDigitToMC1
Index of first MCParticle related to CalDigit, PureCsI option.
bool m_writeToRoot
if true, a rootFile named by m_rootFileName will be filled with info
std::vector< int > * m_eclPureClusterToMC5PDG
PDG code of fifth MCParticle related to ECLCluster, PureCsI option.
std::vector< double > * m_eclShowerE9oE21
Shower E9oE21.
std::vector< double > * m_eclPureClusterTimingError
Cluster time error, PureCsI option.
std::vector< int > * m_eclPureClusterToMC3
Index of third MCParticle related to ECLCluster, PureCsI option.
std::vector< int > * m_eclPureDigitToCluster
ECLDigit To Cluster, PureCsI option.
bool m_doDigits
if true, info on Digits and CalDigits is stored
std::vector< double > * m_eclPureClusterEnergyDepSum
Cluster simulated energy, PureCsI option.
virtual const char * eclPureClusterArrayName() const
Default name ECLPureClusters array.
std::vector< double > * m_eclShowerNumberOfCrystalsForEnergy
Number of crystals used for energy calculation.
std::vector< bool > * m_eclShowerIsCluster
Shower Cluster Match.
std::vector< int > * m_eclPureClusterToMC3PDG
PDG code of third MCParticle related to ECLCluster, PureCsI option.
std::vector< int > * m_eclCalDigitToMC2PDG
PDG code of second MCParticle related to ECLCalDigit.
std::vector< double > * m_mcDecayVtxZ
MCParticle decay vertex Z.
std::vector< int > * m_eclPureDigitToMC
Index of MCParticle related to that ECLDigit, PureCsI option.
std::vector< int > * m_eclClusterToMC5PDG
PDG code of fifth MCParticle related to ECLCluster.
std::vector< double > * m_eclPureClusterZernikeMVA
Output of MVA classifier based on Zernike Momenta, PureCsI option.
std::vector< double > * m_eclSimHitX
ECLSimHit X position.
virtual void initialize() override
Initializes the Module.
std::vector< int > * m_eclCalDigitToMC2
Index of second MCParticle related to ECLCalDigit.
StoreArray< ECLCalDigit > m_eclPureCalDigits
Store array: ECLPureCalDigit.
std::vector< int > * m_eclShowerHypothesisId
Shower Particle Hypothesis ID.
std::vector< double > * m_eclSimHitPz
ECLSimHit PZ.
std::vector< int > * m_eclShowerMCVtxInEcl
Int, 1 if particle decays (interacts) in ECL, 0 otherwise.
std::vector< int > * m_eclPureCalDigitToCR
Index of CR related to that CalDigit, PureCsI option.
std::vector< double > * m_eclShowerToMCWeight4
Energy contribution of fourth MCParticle related to ECLShower.
std::vector< double > * m_eclPureClusterDeltaTime99
Reconstructed DeltaT99, PureCsI option.
int m_eclHitMultip
Number of ECLHits per event.
std::vector< double > * m_eclClusterZernikeMVA
Zernike MVA.
std::vector< int > * m_eclShowerToMC5PDG
PDG code of fifth MCParticle related to ECLShower.
std::vector< int > * m_eclShowerToMC3PDG
PDG code of third MCParticle related to ECLShower.
std::vector< int > * m_eclPureLMType
Local Maximum type, PureCsI option.
std::vector< int > * m_trkCharge
Track charge.
std::vector< int > * m_eclShowerToMC2
Index of second MCParticle related to ECLShower.
std::vector< double > * m_eclShowerToBkgWeight
Remaining energy contribution not associated to first five MCParticles related to ECLShower.
std::vector< double > * m_trkPx
Track momentum along X direction.
std::vector< double > * m_eclPureClusterAbsZernike51
Reconstructed Zernike51, PureCsI option.
std::vector< int > * m_eclDigitToMC
Index of MCParticle related to that ECLDigit.
std::vector< double > * m_eclPureCRLikelihoodMergedPi0
Connected Region Merged Pi0 Likelihood, PureCsI option.
std::vector< double > * m_eclCRLikelihoodMIPNGamma
Connected Region MIP Likelihood.
std::vector< int > * m_eclClusterToMC4
Index of fourth MCParticle related to ECLCluster.
virtual const char * eclHitArrayName() const
Default name ECLCalDigits array.
std::vector< int > * m_eclSimHitCellId
ECLSimHit CellId.
StoreArray< ECLLocalMaximum > m_eclLocalMaximums
Store array: ECLLocalMaximum.
virtual void event() override
event
std::vector< double > * m_eclCRLikelihoodNeutralHadron
Connected Region Neutral Hadron Likelihood.
std::vector< double > * m_eclPureClusterTiming
Cluster time, PureCsI option.
std::vector< double > * m_trkZ
Track DOCA Z (?)
std::vector< double > * m_eclCalDigitSimHitSum
Full energy contribution related to ECLCalDigit.
std::vector< int > * m_eclPureClusterHasNPhotonHypothesis
Cluster has n-photon hypothesis, PureCsI option.
std::vector< double > * m_eclPureCalDigitToMCWeight4
Energy contribution of fourth MCParticle related to CalDigit, PureCsI option.
virtual const char * eclLocalMaximumArrayName() const
Default name ECLLocalMaxima array.
std::vector< int > * m_eclCalDigitFitQuality
ECLCalDigit fit quality.
std::vector< int > * m_eclShowerToMC5GMoth
GMother index of fifth MCParticle related to ECLShower.
std::vector< int > * m_eclCalDigitToMC4
Index of fourth MCParticle related to ECLCalDigit.
std::vector< double > * m_eclHitEnergyDep
ECLHit energy.
std::vector< double > * m_eclCRLikelihoodChargedHadron
Connected Region Charged Hadron Likelihood.
std::vector< int > * m_eclShowerMCFlightMatch
Int, 1 if particle flight direction is "well" reconstructed in ECL, 0 otherwise.
std::vector< double > * m_eclClusterPhi
ECLCluster azimuthal direction.
std::vector< double > * m_eclClusterAbsZernike40
Reconstructed Abs Zernike40.
int m_eclCalDigitMultip
Number of ECLCalDigits per event.
std::vector< int > * m_eclShowerToMC4Moth
Mother index of fourth MCParticle related to ECLShower.
std::vector< int > * m_eclShowerToMC3GMoth
GMother index of third MCParticle related to ECLShower.
std::vector< double > * m_eclPureClusterHighestE
Highest energy deposit (per crystal) in Cluster, PureCsI option.
std::vector< int > * m_eclClusterHasNPhotonHypothesis
Cluster has n-photon hypothesis.
std::vector< int > * m_eclPureClusterToMC2PDG
PDG code of second MCParticle related to ECLCluster, PureCsI option.
std::vector< double > * m_eclShowerToMCWeight2
Energy contribution of second MCParticle related to ECLShower.
std::vector< int > * m_eclShowerToMC1PDG
PDG code of first MCParticle related to ECLShower.
uint16_t m_nECLCalDigitsOutOfTimeFWD
Number of out of time, energetic ECLCalDigits, FWD.
std::vector< double > * m_eclSimHitEnergyDep
Energy deposition of ECLSimHit.
std::vector< int > * m_eclPureCalDigitToMC2PDG
PDG code of second MCParticle related to CalDigit, PureCsI option.
std::vector< double > * m_trkPz
Track momentum along Z direction.
std::vector< double > * m_eclClusterToMCWeight1
Energy contribution of first MCParticle related to ECLCluster.
std::vector< int > * m_eclShowerToLM2
Index of 2nd maximum related to ECLShower.
std::vector< int > * m_eclPureCalDigitToMC4
Index of fourth MCParticle related to CalDigit, PureCsI option.
std::vector< int > * m_eclPureClusterNofCrystals
Number of crystals in Cluster, PureCsI option.
std::vector< int > * m_eclHitToPureDigit
Index of ECLDigit related to ECLHit, PureCsI option.
std::vector< int > * m_eclShowerToMC3GMothPDG
PDG code of Gparent of third MCParticle related to ECLShower.
int m_eclPureClusterMultip
Number of ECLClusterss per event, PureCsI option.
std::vector< double > * m_eclShowerMinTrkDistance
Shower Min Dist to Track.
std::vector< double > * m_eclSimHitPx
ECLSimHit PX.
std::vector< int > * m_eclPureClusterCellId
CellId with highest energy deposit in Cluster, PureCsI option.
std::vector< int > * m_eclCalDigitToShower
Index of ECLShower related to that ECLCalDigit.
std::vector< double > * m_eclSimHitZ
ECLSimHit Z position.
std::vector< double > * m_eclClusterThetaError
ECLCluster error on polar direction.
uint8_t m_nECLShowersRejectedBWD
Number of photon showers that are rejected before storing to mdst (max.
std::vector< int > * m_eclPureClusterToMC2
Index of second MCParticle related to ECLCluster, PureCsI option.
std::vector< double > * m_eclClusterAbsZernike51
Reconstructed Abs Zernike51.
StoreArray< TrackFitResult > m_trackFitResults
TrackFitResult storeArray.
std::vector< int > * m_eclDigitAmp
ECLDigit amplitude.
std::vector< double > * m_trkPy
Track momentum along Y direction.
std::vector< double > * m_eclClusterEnergyDepSum
ECLCluster simulated energy.
std::vector< double > * m_eclPureClusterThetaError
Cluster error on polar direction, PureCsI option.
std::vector< int > * m_eclPureDigitIdx
ECLDigit index, PureCsI option.
std::vector< int > * m_eclShowerToMC2GMothPDG
PDG code of Gparent of second MCParticle related to ECLShower.
std::vector< int > * m_mcPdg
MCParticle PDG code.
std::vector< double > * m_eclShowerSecondMoment
Shower Second Moment.
std::vector< int > * m_eclShowerToMC5
Index of fifth MCParticle related to ECLShower.
virtual void terminate() override
Termination action.
std::vector< double > * m_mcDecayVtxY
MCParticle decay vertex Y.
std::vector< int > * m_eclShowerToMC3MothPDG
PDG code of parent of first MCParticle related to ECLShower.
StoreArray< ECLSimHit > m_eclSimHits
Store array: ECLSimHit.
std::vector< int > * m_eclClusterToMC5
Index of fifth MCParticle related to ECLCluster.
std::vector< int > * m_eclShowerToMC4GMothPDG
PDG code of Gparent of fourth MCParticle related to ECLShower.
std::vector< double > * m_eclPureClusterToMCWeight5
Energy contribution of 5th MCParticle related to ECLCluster, PureCsI option.
std::vector< int > * m_eclShowerToLM3
Index of 3rd maximum related to ECLShower.
std::vector< double > * m_eclPureClusterToMCWeight1
Energy contribution of first MCParticle related to ECLCluster, PureCsI option.
std::vector< int > * m_eclPureDigitFitQuality
ECLDigit fit quality, PureCsI option.
StoreArray< ECLDigit > m_eclDigits
Store array: ECLDigit.
std::vector< double > * m_eclClusterEnergyError
ECLCluster energy error.
std::vector< double > * m_eclClusterPhiError
ECLCluster error on azimuthal direction.
std::vector< int > * m_trkIdx
Track index.
std::vector< int > * m_eclCalDigitToCR
Index of CR related to that ECLCalDigit.
std::vector< int > * m_eclClusterToMC3
Index of third MCParticle related to ECLCluster.
std::vector< double > * m_eclClusterSimHitSum
Energy contribution of 1st MCParticle related to ECLCluster.
virtual ~ECLDataAnalysisModule() override
Destructor of the module.
std::vector< int > * m_eclPureCalDigitFitQuality
CalDigit fit quality, PureCsI option.
std::vector< int > * m_eclPureCalDigitToMC1PDG
PDG code of first MCParticle related to CalDigit, PureCsI option.
std::vector< double > * m_eclPureCRLikelihoodNGamma
Connected Region Gamma Likelihood, PureCsI option.
std::vector< int > * m_eclPureCalDigitToMC3
Index of third MCParticle related to CalDigit, PureCsI option.
int m_eclPureLMMultip
Local Maxima multiplicity, PureCsI option.
std::vector< int > * m_mcMothPdg
MCParticle mother particle PDG code.
std::vector< int > * m_eclClusterToMC1
Index of first MCParticle related to ECLCluster.
std::vector< int > * m_eclShowerToLM4
Index of 4th maximum related to ECLShower.
std::vector< double > * m_eclClusterToMCWeight2
Energy contribution of second MCParticle related to ECLCluster.
std::vector< double > * m_eclLogLikePi
PID track pion likelihood.
std::vector< double > * m_eclClusterE1oE9
Reconstructed E1 over E9.
std::vector< double > * m_eclPureCalDigitTimeFit
CalDigit timing, PureCsI option.
std::vector< double > * m_eclShowerUncEnergy
Shower bare energy.
std::vector< double > * m_eclCalDigitToBkgWeight
Remaining energy contribution not associated to first five MCParticles related to ECLCalDigit.
std::vector< int > * m_eclHitToDigit
Index of ECLDigit related to ECLHit.
StoreArray< ECLDigit > m_eclPureDigits
Store array: ECLPureDigit.
std::vector< int > * m_eclClusterHasNeutralHadronHypothesis
Cluster has neutral hadron hypothesis.
std::vector< int > * m_eclShowerToMC2Moth
Mother index of first MCParticle related to ECLShower.
std::vector< double > * m_eclShowerT99
Shower T99.
std::vector< int > * m_eclShowerToLM1
Index of first maximum related to ECLShower.
std::vector< int > * m_eclLMCellId
Local Maximum Cell ID.
std::vector< double > * m_eclShowerToMCWeight3
Energy contribution of third MCParticle related to ECLShower.
std::vector< int > * m_eclHitToDigitAmp
Amplitude of ECLDigit related to ECLHit.
int m_eclClusterTrueMultip
Number of ECLClusters per event.
std::vector< int > * m_eclDigitTimeFit
ECLDigit timing.
std::vector< double > * m_eclPureClusterClosestTrackDist
Reconstructed Distance to Closest Track, PureCsI option.
std::vector< double > * m_eclClusterToMCWeight4
Energy contribution of fourth MCParticle related to ECLCluster.
std::vector< double > * m_eclShowerHighestEnergy
Shower Highest Energy Crystal Energy.
std::vector< double > * m_eclPureCRLikelihoodElectronNGamma
Connected Region Electron Likelihood, PureCsI option.
std::vector< int > * m_eclClusterToMC2
Index of second MCParticle related to ECLCluster.
std::vector< int > * m_eclShowerIdx
Shower Index.
std::vector< int > * m_eclPureCalDigitIdx
ECLCalDigit index, PureCsI option.
std::vector< int > * m_eclSimHitToMC
Index of MCParticle related to that ECLSimHit.
std::vector< double > * m_eclClusterToBkgWeight
Remaining energy contribution not associated to first five MCParticles related to ECLCluster.
std::vector< int > * m_eclDigitToCalDigit
Index of CalDigit related to that ECLDigit.
std::vector< int > * m_eclShowerToMC3Moth
Mother index of first MCParticle related to ECLShower.
std::vector< double > * m_eclPureCalDigitToMCWeight2
Energy contribution of second MCParticle related to CalDigit, PureCsI option.
std::vector< int > * m_eclDigitIdx
ECLDigit index.
int m_eclClusterGammaMultip
Number of ECLClusters per event.
std::vector< double > * m_eclPureClusterE1oE9
Reconstructed E1oE9, PureCsI option.
std::vector< double > * m_eclShowerThetaError
Shower Theta Error.
std::vector< double > * m_eclShowerSimHitSum
Full energy contribution related to ECLShower.
StoreArray< Track > m_tracks
Tracks storeArray.
virtual const char * eclPureDigitArrayName() const
Default name ECLPureDigits array.
StoreArray< ECLLocalMaximum > m_eclPureLocalMaximums
Store array: ECLPureLocalMaximum.
std::vector< int > * m_eclPureLMCellId
Local Maximum Cell ID, PureCsI option.
std::vector< int > * m_eclCalDigitToMC5PDG
PDG code of fifth MCParticle related to ECLCalDigit.
std::vector< int > * m_eclShowerIsTrack
Shower Track Match.
std::vector< int > * m_mcGMothPdg
MCParticle grandmother particle PDG code.
std::vector< double > * m_eclpidEnergy
PID track energy.
std::vector< int > * m_eclpidNClusters
PID track number of clusters.
std::vector< double > * m_eclShowerPhi
Shower Phi.
int m_mcMultip
Multiplicity of MCParticles.
std::vector< double > * m_eclPureCRLikelihoodMIPNGamma
Connected Region MIP Likelihood, PureCsI option.
std::vector< double > * m_eclPureClusterE9oE21
Ratio of 3x3 over 5x5 crystal matrices energies for Cluster, PureCsI option.
std::vector< int > * m_eclLMType
Local Maximum type.
std::vector< double > * m_eclShowerTrkDepth
Shower Track Depth.
std::vector< int > * m_eclLMId
Local Maximum ID.
std::vector< double > * m_trkP
Track momentum.
std::vector< double > * m_eclPureClusterEnergy
Cluster energy, PureCsI option.
std::vector< int > * m_eclHitToPureDigitAmp
Amplitude of ECLDigit related to ECLHit, PureCsI option.
std::vector< double > * m_eclClusterTimingError
ECLCluster time error.
std::vector< int > * m_eclShowerToMC4
Index of fourth MCParticle related to ECLShower.
std::vector< double > * m_mcProdVtxZ
MCParticle production vertex Z.
std::vector< double > * m_mcEnergy
MCParticle energyx.
std::vector< int > * m_eclpidtrkIdx
PID track index.
std::vector< int > * m_eclShowerCentralCellId
Cell ID for most energetic crystal.
std::vector< double > * m_eclShowerToMCWeight1
Energy contribution of first MCParticle related to ECLShower.
StoreArray< ECLCluster > m_eclClusters
Store array: ECLCluster.
std::vector< int > * m_eclCalDigitToMC3
Index of third MCParticle related to ECLCalDigit.
std::vector< int > * m_eclPureCalDigitToMC4PDG
PDG code of fourth MCParticle related to CalDigit, PureCsI option.
std::vector< int > * m_eclHitIdx
Index of ECLHits.
std::vector< int > * m_eclClusterToMC1PDG
PDG code of first MCParticle related to ECLCluster.
std::vector< int > * m_eclPureClusterDetectorRegion
Clusters detector region, PureCsI option.
std::vector< double > * m_mcDecayVtxX
MCParticle decay vertex X.
std::vector< double > * m_trkY
Track DOCA Y (?)
std::vector< int > * m_eclShowerToMC5Moth
Mother index of fifth MCParticle related to ECLShower.
std::vector< double > * m_eclPureCalDigitAmp
CalDigit amplitude, PureCsI option.
std::vector< int > * m_eclPureCalDigitToLM
Index of LM related to that CalDigit, PureCsI option.
std::vector< int > * m_eclCalDigitIdx
ECLCalDigit index.
std::vector< int > * m_eclSimHitIdx
Index of ECLSimHit.
std::vector< int > * m_eclClusterToMC2PDG
PDG code of second MCParticle related to ECLCluster.
StoreArray< ECLConnectedRegion > m_eclPureConnectedRegions
Store array: ECLPureConnectedRegion.
std::vector< int > * m_eclPureDigitCellId
Number of ECLDigit CellId, PureCsI option.
std::vector< int > * m_eclDigitFitQuality
ECLDigit fit quality.
int m_eclPureCalDigitMultip
Number of ECLCalDigits per event, PureCsI option.
std::vector< double > * m_eclPureClusterLat
Cluster shape parameter LAT, PureCsI option.
std::vector< int > * m_eclPureClusterToMC4PDG
PDG code of fourth MCParticle related to ECLCluster, PureCsI option.
std::vector< int > * m_eclShowerMCFFlightMatch
Int, 1 if primary particle flight direction is "well" reconstructed in ECL, 0 otherwise,...
std::vector< int > * m_eclCalDigitToMC1PDG
PDG code of first MCParticle related to ECLCalDigit.
std::vector< double > * m_eclCalDigitAmp
ECLCalDigit amplitude.
std::vector< double > * m_mcPx
MCParticle momentum X direction.
std::vector< int > * m_eclShowerToMC2MothPDG
PDG code of parent of first MCParticle related to ECLShower.
std::vector< int > * m_eclpidNCrystals
PID track number of crystals.
std::vector< int > * m_mcIdx
MCParticle index.
StoreArray< ECLShower > m_eclPureShowers
Store array: ECLPureShower.
std::vector< int > * m_eclPureClusterToMC1PDG
PDG code of first MCParticle related to ECLCluster, PureCsI option.
std::vector< double > * m_eclShowerZernikeMVA
Shower ZernikeMVA.
std::vector< double > * m_eclPureClusterAbsZernike40
Reconstructed Zernike40, PureCsI option.
std::vector< double > * m_eclPureClusterSecondMoment
Reconstructed Cluster Second Moment, PureCsI option.
int m_eclPureDigitMultip
Number of ECLDigits per event, PureCsI option.
uint8_t m_nECLShowersRejectedBarrel
Number of photon showers that are rejected before storing to mdst (max.
virtual const char * eclDigitArrayName() const
Default name ECLDigits array.
std::vector< double > * m_eclClusterTiming
ECLCluster time.
std::vector< int > * m_eclCalDigitCellId
Number of ECLCalDigit CellId.
std::vector< double > * m_mcProdVtxX
MCParticle production vertex X.
std::vector< double > * m_eclShowerEnergy
Shower Energy.
StoreArray< ECLHit > m_eclHits
Store array: ECLHit.
std::vector< int > * m_eclPureCRIdx
Connected Region ID, PureCsI option.
std::vector< double > * m_eclCRLikelihoodMergedPi0
Connected Region Merged Pi0 Likelihood.
uint8_t m_nECLShowersRejectedFWD
Number of photon showers that are rejected before storing to mdst (max.
virtual const char * eclConnectedRegionArrayName() const
Default name ECLConnectedRegions array.
std::vector< int > * m_eclShowerToMC5MothPDG
PDG code of parent of fifth MCParticle related to ECLShower.
std::vector< double > * m_eclPureClusterToMCWeight2
Energy contribution of second MCParticle related to ECLCluster, PureCsI option.
std::vector< double > * m_trkX
Track DOCA X (?)
std::vector< double > * m_eclPureClusterToMCWeight3
Energy contribution of third MCParticle related to ECLCluster, PureCsI option.
int m_eclClusterMultip
Number of ECLClusters per event.
std::vector< double > * m_eclShowerLateralEnergy
Shower Lateral Energy.
std::vector< double > * m_mcPz
MCParticle momentum Z direction.
std::vector< int > * m_eclPureClusterHasNeutralHadronHypothesis
Cluster has neutral hadron hypothesis, PureCsI option.
std::vector< double > * m_eclPureCalDigitSimHitSum
Full energy contribution related to CalDigit, PureCsI option.
std::vector< int > * m_eclCalDigitToMC5
Index of fifth MCParticle related to ECLCalDigit.
StoreArray< MCParticle > m_mcParticles
MCParticles StoreArray.
std::vector< double > * m_eclClusterHighestE
Highest energy deposit (per crystal) in ECLCluster.
std::vector< int > * m_eclPureDigitAmp
ECLDigit amplitude, PureCsI option.
StoreObjPtr< EventMetaData > m_eventmetadata
Store object pointer: EventMetaData.
std::vector< int > * m_eclCRIsTrack
Int for Connected Region - Track Match.
std::vector< int > * m_eclShowerConnectedRegionId
Matched Connetcted Region Idx.
virtual const char * eclCalDigitArrayName() const
Default name ECLCalDigits array.
std::vector< double > * m_eclPureClusterToMCWeight4
Energy contribution of fourth MCParticle related to ECLCluster, PureCsI option.
std::vector< double > * m_eclPureClusterPhiError
Cluster error on azimuthal direction, PureCsI option.
bool m_doTracking
if true, info on tracking will be stored, job will fail if doTracking==1 and the tracking modules are...
std::vector< double > * m_eclShowerAbsZernike51
Shower Zernike51 Moment.
std::vector< double > * m_eclShowerR
Shower R.
std::vector< int > * m_eclPureClusterToMC1
Index of first MCParticle related to ECLCluster, PureCsI option.
std::vector< double > * m_eclShowerToMCWeight5
Energy contribution of fifth MCParticle related to ECLShower.
std::vector< double > * m_eclHitTimeAve
ECLHit time.
StoreArray< ECLCluster > m_eclPureClusters
Store array: ECLPureCluster.
int m_eclLMMultip
Local Maxima multiplicity.
std::vector< int > * m_eclSimHitPdg
PDG code of MCParticle associated to that ECLDigit.
virtual const char * eclPureLocalMaximumArrayName() const
Default name ECLPureLocalMaxima array.
std::vector< double > * m_trkPhi
Track azimuthal direction.
std::vector< int > * m_eclCalDigitToMC3PDG
PDG code of third MCParticle related to ECLCalDigit.
std::vector< int > * m_eclDigitCellId
Number of ECLDigit CellId.
std::vector< double > * m_eclPureCalDigitToMCWeight1
Energy contribution of first MCParticle related to CalDigit, PureCsI option.
std::vector< double > * m_eclPureClusterR
Cluster distance from IP, PureCsI option.
std::vector< double > * m_eclPureClusterTheta
Cluster polar direction, PureCsI option.
std::vector< double > * m_trkTheta
Track polar direction.
uint16_t m_nECLCalDigitsOutOfTimeBarrel
Number of out of time, energetic ECLCalDigits, Barrel.
std::vector< double > * m_eclLogLikeMu
PID track muon likelihood.
std::vector< int > * m_eclCalDigitToMC4PDG
PDG code of fourth MCParticle related to ECLCalDigit.
std::vector< int > * m_eclPureClusterToMC4
Index of fourth MCParticle related to ECLCluster, PureCsI option.
std::vector< int > * m_eclPureClusterIdx
ECLCluster index, PureCsI option.
std::vector< double > * m_eclClusterEnergy
ECLCluster energy.
virtual const char * eclPureShowerArrayName() const
Default name ECLPureShower array.
std::vector< int > * m_eclShowerToMC1
Index of first MCParticle related to ECLShower.
std::vector< double > * m_eclSimHitPy
ECLSimHit PY.
std::vector< int > * m_eclCalDigitToLM
Index of LM related to that ECLCalDigit.
std::vector< double > * m_eclClusterClosestTrackDist
Flag for charged clusters.
std::vector< double > * m_eclSimHitY
ECLSimHit Y position.
std::vector< double > * m_eclPureCRLikelihoodChargedHadron
Connected Region Charged Hadron Likelihood, PureCsI option.
int m_eclSimHitMultip
Number of ECLSimHits per event.
TFile * m_rootFilePtr
members of ECLReconstructor Module
std::vector< double > * m_eclClusterLAT
Reconstructed LAT.
std::vector< double > * m_eclShowerHighestE1mE2
Energy difference for 2 highest energy deposits in shower.
std::vector< double > * m_eclClusterDeltaTime99
DeltaTime99.
std::vector< int > * m_eclHitCellId
ECLHit CellID.
StoreObjPtr< EventLevelClusteringInfo > m_eventLevelClusteringInfo
Store object pointer: EventLevelClusteringInfo.
std::vector< int > * m_mcSecondaryPhysProc
Flag for secondary physics process.
std::vector< int > * m_eclShowerToMC1Moth
Mother index of first MCParticle related to ECLShower.
std::vector< double > * m_eclShowerE1oE9
Shower E1/E9.
std::vector< int > * m_eclShowerToMC3
Index of third MCParticle related to ECLShower.
std::vector< int > * m_eclShowerToMC1GMothPDG
PDG code of Gparent of first MCParticle related to ECLShower.
std::vector< double > * m_mcProdVtxY
MCParticle production vertex Y.
std::vector< double > * m_eclClusterSecondMoment
Reconstructed Second Moment.
std::vector< double > * m_eclPureClusterEnergyError
Cluster energy error, PureCsI option.
std::vector< int > * m_eclShowerToMC2GMoth
GMother index of second MCParticle related to ECLShower.
std::vector< double > * m_eclClusterE9oE21
Ratio of 3x3 over 5x5 crystal matrices energies for ECLCluster.
std::vector< int > * m_eclPureLMId
Local Maximum ID, PureCsI option.
virtual const char * eclPureCalDigitArrayName() const
Default name ECLPureCalDigits array.
std::vector< int > * m_eclShowerToMC4PDG
PDG code of fourth MCParticle related to ECLShower.
std::vector< int > * m_eclCalDigitToMC1
Index of first MCParticle related to ECLCalDigit.
std::vector< double > * m_eclPureClusterPhi
Cluster azimuthal direction, PureCsI option.
std::vector< int > * m_eclClusterCrystalHealth
Crystal health flag.
std::vector< bool > * m_eclClusterIsTrack
Flag for charged clusters.
virtual const char * eclPureConnectedRegionArrayName() const
Default name ECLPureConnectedRegions array.
std::vector< int > * m_eclClusterToShower
Index of ECLShower related to ECLCluster.
std::vector< double > * m_eclCalDigitToMCWeight3
Energy contribution of third MCParticle related to ECLCalDigit.
StoreArray< ECLCalDigit > m_eclCalDigits
Store array: ECLCalDigit.
std::vector< double > * m_eclpidE9E21
PID track ration of 3x3 over 5x5 crystal matrices energies.
std::vector< int > * m_eclPureCRIsTrack
Int for Connected Region - Track Match, PureCsI option.
std::vector< double > * m_eclCRLikelihoodNGamma
Connected Region Gamma Likelihood.
std::vector< int > * m_eclPureDigitTimeFit
ECLDigit timing, PureCsI option.
std::vector< int > * m_eclPureCalDigitToMC5
Index of fifth MCParticle related to CalDigit, PureCsI option.
std::vector< int > * m_trkPdg
Track PDG code.
std::vector< double > * m_eclPureCalDigitToMCWeight3
Energy contribution of third MCParticle related to CalDigit, PureCsI option.
std::vector< double > * m_eclClusterDeltaL
Reconstructed Cluster DeltaL.
std::vector< int > * m_mcGGMothPdg
MCParticle greand-grandmother particle PDG code.
std::vector< int > * m_eclShowerToMC1MothPDG
PDG code of parent of first MCParticle related to ECLShower.
uint16_t m_nECLCalDigitsOutOfTimeBWD
Number of out of time, energetic ECLCalDigits, BWD.
StoreArray< ECLPidLikelihood > m_eclPidLikelihoods
ECLPidLikelihood storeArray.
std::vector< int > * m_eclPureClusterCrystalHealth
Crystal health flag, PureCsI option.
std::vector< double > * m_eclShowerPhiError
Shower Phi Error.
std::vector< double > * m_eclpidEop
PID track E/p.
std::vector< int > * m_eclShowerToMC1GMoth
GMother index of first MCParticle related to ECLShower.
std::vector< double > * m_eclShowerAbsZernike40
Shower Zernike40 Moment.
std::vector< double > * m_eclShowerNHits
Shower NHits.
int m_eclShowerMultip
Number of ECLShowers per event.
std::vector< double > * m_eclClusterToMCWeight3
Energy contribution of third MCParticle related to ECLCluster.
Class to store ECL digitized hits (output of ECLDigi) relation to ECLHit filled in ecl/modules/eclDig...
Definition ECLDigit.h:25
int getAmp() const
Get Fitting Amplitude.
Definition ECLDigit.h:102
int getQuality() const
Get Fitting Quality.
Definition ECLDigit.h:112
int getCellId() const
Get Cell ID.
Definition ECLDigit.h:97
int getTimeFit() const
Get Fitting Time.
Definition ECLDigit.h:107
Class to store simulated hits which equate to average of ECLSImHit on crystals input for digitization...
Definition ECLHit.h:25
double getTimeAve() const
Get average time.
Definition ECLHit.h:75
int getCellId() const
Get Cell ID.
Definition ECLHit.h:65
double getEnergyDep() const
Get deposit energy.
Definition ECLHit.h:70
Class to store local maxima (LM)
int getCellId() const
Get CellId.
int getLMId() const
Get LM identifier.
int getType() const
Get type.
Container for likelihoods with ECL PID (ECLChargedPIDModule)
Class to store ECL Showers.
Definition ECLShower.h:30
double getAbsZernikeMoment(unsigned int n, unsigned int m) const
Get absolute value of Zernike Moment nm.
Definition ECLShower.h:377
int getHypothesisId() const
Get Hypothesis Id.
Definition ECLShower.h:277
double getPhi() const
Get Phi.
Definition ECLShower.h:302
double getLateralEnergy() const
Get Lateral Energy in Shower.
Definition ECLShower.h:352
double getE1oE9() const
Get energy ratio E1oE9.
Definition ECLShower.h:392
double getEnergy() const
Get Energy.
Definition ECLShower.h:287
double getShowerDepth() const
path on track extrapolation to POCA to average cluster direction
Definition ECLShower.h:367
int getConnectedRegionId() const
Get Connected region Id.
Definition ECLShower.h:272
double getR() const
Get R.
Definition ECLShower.h:307
double getEnergyRaw() const
Get Energy Sum.
Definition ECLShower.h:292
double getUncertaintyTheta() const
Get Error of theta.
Definition ECLShower.h:327
double getE9oE21() const
Get energy ratio E9oE21.
Definition ECLShower.h:397
double getNumberOfCrystalsForEnergy() const
Get number of crystals used for energy calculation.
Definition ECLShower.h:417
double getUncertaintyEnergy() const
Get Error of Energy.
Definition ECLShower.h:322
double getTrkDepth() const
path on track extrapolation to POCA to average cluster direction
Definition ECLShower.h:362
double getMinTrkDistance() const
Get distance to closest Track.
Definition ECLShower.h:357
double getNumberOfCrystals() const
Get NofCrystals.
Definition ECLShower.h:372
double getEnergyHighestCrystal() const
Get Highest Energy in Shower.
Definition ECLShower.h:347
double getZernikeMVA() const
Get Zernike MVA.
Definition ECLShower.h:382
bool getIsTrack() const
Get if matched with a Track.
Definition ECLShower.h:257
double getUncertaintyPhi() const
Get Error of phi.
Definition ECLShower.h:332
int getCentralCellId() const
Get central cell Id.
Definition ECLShower.h:282
double getSecondMoment() const
Get second moment.
Definition ECLShower.h:387
double getTheta() const
Get Theta.
Definition ECLShower.h:297
double getDeltaTime99() const
Get Time Resolution.
Definition ECLShower.h:342
double getTime() const
Get Time.
Definition ECLShower.h:337
ClassECLSimHit - Geant4 simulated hit for the ECL.
Definition ECLSimHit.h:29
int getPDGCode() const
Get Particle PDG (can be one of secondaries)
Definition ECLSimHit.h:96
int getCellId() const
Get Cell ID.
Definition ECLSimHit.h:86
double getFlightTime() const
Get Flight time from IP.
Definition ECLSimHit.h:101
double getEnergyDep() const
Get Deposit energy.
Definition ECLSimHit.h:106
G4ThreeVector getPosition() const
Get Position.
Definition ECLSimHit.h:126
G4ThreeVector getMomentum() const
Get Momentum.
Definition ECLSimHit.h:116
A Class to store the Monte Carlo particle information.
Definition MCParticle.h:32
float getEnergy() const
Return particle energy in GeV.
Definition MCParticle.h:136
int getIndex() const
Get 1-based index of the particle in the corresponding MCParticle list.
Definition MCParticle.h:219
ROOT::Math::XYZVector getDecayVertex() const
Return decay vertex.
Definition MCParticle.h:208
int getArrayIndex() const
Get 0-based index of the particle in the corresponding MCParticle list.
Definition MCParticle.h:234
ROOT::Math::XYZVector getProductionVertex() const
Return production vertex position.
Definition MCParticle.h:178
int getPDG() const
Return PDG code of particle.
Definition MCParticle.h:101
ROOT::Math::XYZVector getMomentum() const
Return momentum.
Definition MCParticle.h:187
int getSecondaryPhysicsProcess() const
Returns the physics process type of a secondary particle.
Definition MCParticle.h:287
void setDescription(const std::string &description)
Sets the description of the module.
Definition Module.cc:214
Module()
Constructor.
Definition Module.cc:30
int getArrayIndex() const
Returns this object's array index (in StoreArray), or -1 if not found.
TO * getRelatedTo(const std::string &name="", const std::string &namedRelation="") const
Get the object to which this object has a relation.
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
RelationVector< TO > getRelationsTo(const std::string &name="", const std::string &namedRelation="") const
Get the relations that point from this object to another store array.
Values of the result of a track fit with a given particle hypothesis.
short getChargeSign() const
Return track charge (1 or -1).
Const::ParticleType getParticleType() const
Getter for ParticleType of the mass hypothesis of the track fit.
ROOT::Math::XYZVector getMomentum() const
Getter for vector of momentum at closest approach of track in r/phi projection.
ROOT::Math::XYZVector getPosition() const
Getter for vector of position at closest approach of track in r/phi projection.
Class that bundles various TrackFitResults.
Definition Track.h:25
bool isFailedFit() const
Get Boolean Fit Failed Status.
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
MCParticle * getMother() const
Returns a pointer to the mother particle.
Definition MCParticle.h:591
Abstract base class for different kinds of events.
STL namespace.