Skip to content

Add a module to convert straw digis to artdaq fragments#1775

Open
michaelmackenzie wants to merge 3 commits intoMu2e:mainfrom
michaelmackenzie:StrawDigisToFragments
Open

Add a module to convert straw digis to artdaq fragments#1775
michaelmackenzie wants to merge 3 commits intoMu2e:mainfrom
michaelmackenzie:StrawDigisToFragments

Conversation

@michaelmackenzie
Copy link
Copy Markdown
Contributor

This was mostly generated using AI. It produces artdaq fragments from straw digis/waveforms. The goal is to have fragments from Offline simulations to help characterize the Online trigger while waiting for real beam data. The actual panel mapping won't be very sensible here yet, so I had to add the option to override the panel mapping with the Offline straw ID.

I validated that on 1k events I get identical digi collections (including waveforms). I also found when using the calo version of this as well I get identical trigger results on these 1k events (after correcting a bug in calo reco that introduces digi collection order dependence, which Bertrand is aware of an investigating).

Here is an example fcl to test this:

#include "Offline/fcl/minimalMessageService.fcl"
#include "Offline/fcl/standardServices.fcl"

process_name : DigiTest
source : {
  module_type : RootInput
  fileNames   : @nil
}

services : @local::Services.Reco
services.GeometryService.bFieldFile     : "Offline/Mu2eG4/geom/bfgeom_reco_v01.txt"

physics : {

  producers : {
    StrawDigisToFragments : {
      module_type : StrawDigisToFragments
      diagLevel : 0
      skipFragmentOnSizeMismatch : false
      fallbackToOfflineWhenMapMissing : true
      forceOfflineAddressing : true
      strawDigiTag : "makeSD"
      strawDigiADCTag : "makeSD"
    }
    StrawFragmentsToDigis : {
      module_type   : "StrawDigisFromArtdaqFragments"
      diagLevel : 0
      debugMode : 0
      debugBits : [ "bit0:0", "bit1:0" ]
      saveWaveforms : true
      missingDTCHeaders : false
      keyOnMnid : false
      allowOfflineFallbackWhenPanelMapMissing : true
      forceOfflineAddressing : true
      geography : []
    }
  }

  analyzers : {
    CompareStrawDigis : {
      module_type : StrawDigiCollectionsComparator
      referenceDigiTag : "makeSD"
      candidateDigiTag : "StrawFragmentsToDigis"
      compareWaveforms : true
      normalizeWaveformsTo10Bit : true
      referenceWaveformTag : "makeSD"
      candidateWaveformTag : "StrawFragmentsToDigis"
      failOnMismatch : true
      diagLevel : 1
    }
  }

  TrigPath      : [ StrawDigisToFragments, StrawFragmentsToDigis ]
  TrkEndPath        : [ CompareStrawDigis ]
  OutputPath        : [ out ]
  trigger_paths : [ TrigPath ]
  end_paths     : [ TrkEndPath, OutputPath ]
}

outputs : {
  out : {
    module_type : RootOutput
    fileName : "test_digi_to_frag.art"
    SelectEvents : [  ]
    outputCommands : [
      "drop *_*_*_*",
      "keep *_CaloDigisToFragments_*_*",
      "keep *_StrawDigisToFragments_*_*",
      "keep mu2e::ProtonBunchTime_*_*_*",
      "keep mu2e::EventWindowMarker_*_*_*"
    ]
  }
}
# Proditions setup: use full TrackerPanelMap from text DB payload
# services.DbService          : @local::DbEmpty
# services.DbService.textFile : [ "Offline/TrackerConditions/data/TrkPanelMap.txt" ]
# services.ProditionsService.trackerPanelMap.useDb : true
# services.LingeringConditions: @erase
services.DbService.purpose: Sim_best
services.DbService.version: v1_4
services.DbService.verbose : 2

Once this and the calo PR (#1774) are merged, I believe we'll be ready to repeat trigger timing studies, this time starting from fragments.

@FNALbuild
Copy link
Copy Markdown
Collaborator

Hi @michaelmackenzie,
You have proposed changes to files in these packages:

  • DAQ

which require these tests: build.

@Mu2e/write, @Mu2e/fnalbuild-users have access to CI actions on main.

⌛ The following tests have been triggered for 9649ba9: build (Build queue - API unavailable)

About FNALbuild. Code review on Mu2e/Offline.

@FNALbuild
Copy link
Copy Markdown
Collaborator

☔ The build tests failed for 9649ba9.

Test Result Details
test with Command did not list any other PRs to include
merge Merged 9649ba9 at b4e91ff
build (prof) Log file. Build time: 08 min 18 sec
ceSimReco Log file.
g4test_03MT Log file.
transportOnly Log file.
POT Log file.
g4study Log file.
cosmicSimReco Log file.
cosmicOffSpill Log file.
ceSteps Log file.
ceDigi Log file.
muDauSteps Log file.
ceMix Log file.
rootOverlaps Log file.
g4surfaceCheck Log file.
trigger Log file. Return Code 1.
check_cmake Log file. Return Code 1.
FIXME, TODO TODO (0) FIXME (0) in 3 files
clang-tidy ➡️ 31 errors 80 warnings
whitespace check no whitespace errors found

N.B. These results were obtained from a build of this Pull Request at 9649ba9 after being merged into the base branch at b4e91ff.

For more information, please check the job page here.
Build artifacts are deleted after 5 days. If this is not desired, select Keep this build forever on the job page.

Copy link
Copy Markdown
Contributor

@pavel1murat pavel1murat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let it be. I approve

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants