Skip to content
Snippets Groups Projects

Prepare framework for new MUST detector subsystem

Merged Florian Uhlig requested to merge f.uhlig/cbmroot:add_new_detector_system into master
All threads resolved!

Remove ECbmModuleId::kEcal from the enumerator and reuse the connected integer value 7 for the new entry ECbmModuleId::kMust. Remove all usage of ECbmModuleId::kEcal from the source code and implement the usage of ECbmModuleId::kMust at the required places. In CbmMCTrack the information of the MUCH and MUST part of the muon system is added to the the same counter. Prepare the geometry interface classes for the new code but currently comment it since the detector code is missing since it will be only added with a later commit.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Pierre-Alain Loizeau approved this merge request

    approved this merge request

  • Dear @f.uhlig, @v.friese, @p.-a.loizeau,

    you have been identified as code owner of at least one file which was changed with this merge request.

    Please check the changes and approve them or request changes.

  • Florian Uhlig added 29 commits

    added 29 commits

    Compare with previous version

  • Florian Uhlig added 1 commit

    added 1 commit

    • aed1fa0c - Properly summing points for MUCH and MUST detector

    Compare with previous version

  • Florian Uhlig added 1 commit

    added 1 commit

    • 96f06611 - Properly summing points for MUCH and MUST detector

    Compare with previous version

  • Pierre-Alain Loizeau resolved all threads

    resolved all threads

  • @v.friese,

    could you please have a look and see if you can merge it. This one is currently blocking adding the code for the new MUST detector.

    • Resolved by Volker Friese
      int32_t CbmMCTrack::GetNPoints(ECbmModuleId detId) const
      {
        if (detId == ECbmModuleId::kRef) return (fNPoints & 1);
        if (detId == ECbmModuleId::kRef)
          return (fNPoints & 1);
        else if (detId == ECbmModuleId::kMvd)
          return ((fNPoints & (7 << 1)) >> 1);
        else if (detId == ECbmModuleId::kSts)
          return ((fNPoints & (31 << 4)) >> 4);
        else if (detId == ECbmModuleId::kRich)
          return ((fNPoints & (1 << 9)) >> 9);
        // The much (Muon Chambers) as well as the must (Muon Straws)
        // are part of the muon detector subsystem, so points from both
        // detector implementations are added to the same system
        // Here the same number is returned for much and must
        else if (detId == ECbmModuleId::kMuch)
          return ((fNPoints & (31 << 10)) >> 10);
        else if (detId == ECbmModuleId::kMust)
          return ((fNPoints & (31 << 10)) >> 10);
        else if (detId == ECbmModuleId::kTrd)
          return ((fNPoints & (31 << 15)) >> 15);
        else if (detId == ECbmModuleId::kTof)
          return ((fNPoints & (15 << 20)) >> 20);
        else if (detId == ECbmModuleId::kEcal)
          return ((fNPoints & (1 << 24)) >> 24);
        else if (detId == ECbmModuleId::kPsd)
          return ((fNPoints & (1 << 25)) >> 25);
        else if (detId == ECbmModuleId::kFsd)
          return ((fNPoints & (1 << 26)) >> 26);
        else {
          LOG(error) << "GetNPoints: Unknown detector ID " << detId;
          return 0;
        }
      }

      I realise that you probably wrote this code and I didn't but are you sure this inclusion is correct. The initial eye catch is that it is the same as MUCH, which you do comment about, to be fair. It chooses out a portion of fNpoints by right shift bitwise operator, you mask fNpoints, and shift back, so is basically an extraction from fNPoints for different detectors. But this should mean the MUCH and MUST return the exactly the same number always?

      If this is intentionally the case I would suggest that

      else if (detId == ECbmModuleId::kMuch || detId == ECbmModuleId::kMust) return ((fNPoints & (31 << 10)) >> 10); would prevent need to notice the similarity.

  • Eoin Clerkin resolved all threads

    resolved all threads

    • Resolved by Volker Friese

      For me this MR, which will presumably squashed to a single commit, does two things, it

      1. purges Ecal from CBMROOT (although not completely)
      2. prepares framework for MUST detector.

      Obviously this would be best done in two commits, one to remove, next to introduce. Is this easily possible?

      Edited by Eoin Clerkin
    • Resolved by Eoin Clerkin

      Might I suggest for a fuller purging of Ecal that comments/references in

      • MQ/source/CbmMCPointSource.cxx
      • analysis/PWGC2F/femtoscopy/hal/helpers/HalCbmDetectorID.h
      • algo/base/Definitions.h
      • core/data/test/_GTestCbmDefs.cxx
      • reco/global/CMakeLists.txt

      are removed?

      Edited by Eoin Clerkin
  • Volker Friese added 1 commit

    added 1 commit

    • 6421eb36 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Volker Friese
  • Volker Friese requested changes

    requested changes

  • Volker Friese added 1 commit

    added 1 commit

    • f6b0fc8b - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Volker Friese
  • Volker Friese added 1 commit

    added 1 commit

    • 48b0e187 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Volker Friese resolved all threads

    resolved all threads

  • Volker Friese added 12 commits

    added 12 commits

    • 48b0e187...ad593652 - 5 commits from branch computing:master
    • 7ac4f930 - Remove obsolete files
    • 4612c50c - Prepare framework for new MUST detector subsystem
    • 53075505 - Code formating
    • 3e6cd596 - Properly summing points for MUCH and MUST detector
    • dc66bcdc - Apply 1 suggestion(s) to 1 file(s)
    • 7045dcec - Apply 1 suggestion(s) to 1 file(s)
    • 48e8515f - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Volker Friese resolved all threads

    resolved all threads

  • Unfortunately the MR is merged. I was still working on Eoin's comments and removed all occurrence of Ecal from the code. I will create another MR which will do the final cleanup.

  • Florian Uhlig mentioned in merge request !2138

    mentioned in merge request !2138

  • Bartosz Sobol mentioned in merge request !2007

    mentioned in merge request !2007

  • Please register or sign in to reply
    Loading