Project

General

Profile

Bug #4913

Question about association usage in art v1_08_09

Added by Matthew Tamsett about 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Urgent
Category:
Navigation
Target version:
Start date:
11/06/2013
Due date:
% Done:

100%

Estimated time:
Spent time:
Occurs In:
Scope:
Internal
Experiment:
NOvA
SSI Package:
art
Duration:

Description

Dear Artists,

The nova ddt group has recently upgraded to art version 1_08_09, since then I've discovered that the previous way in which I was retrieving a one to many association has stopped working. I've managed to find that it only seems to work if retrieve a one to one association (which includes the "many" product of the aforementioned one to many association) before hand.

Do you know why this would be?

In order to illustrate our use case and to demonstrate the problem I've prepared a small test package. This package runs in the novaddt environment and consists of the following:

  1. a producer module which makes several vectors of DAQ hits
  2. a producer module which makes two tracks for each vector of DAQ hits then stores the associations between each track and and a sub-set of the hits with no instance label (this would represent the hits that make up the track) and then also the entire vector of DAQ hits and each track with an instance label (this represents a link to the entire hit list within which the track was found).
  3. a filter module which retrieves these products and associations

You can run this by running the following commands:

# setup novaddt
source /grid/fermiapp/nova/novaddt/srt/srt.sh
export EXTERNALS=/nusoft/app/externals
source $SRT_DIST/products/setup
source $SRT_DIST/setup/setup_novaddt.sh "$@" 
# make a test release
newrel -t development nova_ddt_sandbox_061113
cd nova_ddt_sandbox_061113/
srt_setup -a
# add in the test package
svn co svn+ssh://p-novaart@cdcvs.fnal.gov/cvs/projects/novaart-devs/trunk/users/tamsett/AssnTest ./AssnTest
cd include/
ln -s ../AssnTest/
cd ../
# make
make
# run
nova -c job/dummytrackmakeranajob.fcl /nova/ana/trigger/data/ddt.root -n 1

You'll notice that the printout from the final module (3.) shows that the track to hits association finds no tracks:

--- novaddt::DummyTrack Ana analyze. Event: 1
    --- got 10 tracks
    --- got 5 slices
    got 5 associations between slices and tracks
        slice[0]: 1 hits
            got 0 tracks
        slice[1]: 2 hits
            got 0 tracks
        slice[2]: 3 hits
            got 0 tracks
        slice[3]: 4 hits
            got 0 tracks
        slice[4]: 5 hits
            got 0 tracks
However if you now edit AssnTest/DummyTrackAna_module.cc and comment in line 86: https://cdcvs.fnal.gov/redmine/projects/novaart/repository/devs/entry/trunk/users/tamsett/AssnTest/DummyTrackAna_module.cc#L86

and then remake and run that the associations now work:

--- novaddt::DummyTrack Ana analyze. Event: 1
    --- got 10 tracks
    --- got 5 slices
    got 5 associations between slices and tracks
        slice[0]: 1 hits
            got 2 tracks
        track[0] V: 0
        track[1] V: 0
        slice[1]: 2 hits
            got 2 tracks
        track[0] V: 1
        track[1] V: 1
        slice[2]: 3 hits
            got 2 tracks
        track[0] V: 2
        track[1] V: 2
        slice[3]: 4 hits
            got 2 tracks
        track[0] V: 3
        track[1] V: 3
        slice[4]: 5 hits
            got 2 tracks
        track[0] V: 4
        track[1] V: 4
In case any of the above steps don't work the code can be seen here:

https://cdcvs.fnal.gov/redmine/projects/novaart/repository/devs?path[]=trunk&path[]=users&path[]=tamsett&path[]=AssnTest

and found in: /afs/fnal.gov/files/home/room2/tamsett/public/AssnTest

Sorry for the long email, regards

Matthew


Related issues

Related to art - Bug #4621: art::Ptr::isAvailable() unsafe to callClosed09/05/2013

Associated revisions

History

#1 Updated by Christopher Green about 6 years ago

  • Description updated (diff)
  • Category set to Navigation
  • Status changed from New to Assigned
  • Assignee set to Christopher Green
  • Priority changed from Normal to Urgent
  • Target version set to 1.08.10
  • Experiment NOvA added
  • Experiment deleted (-)
  • SSI Package art added
  • SSI Package deleted ()

Attempting to reproduce and study now.

#2 Updated by Christopher Green about 6 years ago

Problem appears to be an unintended consequence of the fix to issue #4621. Characterizing now.

#3 Updated by Christopher Green about 6 years ago

Problem and likely fix identified: working on regression test now.

#4 Updated by Christopher Green about 6 years ago

  • Status changed from Assigned to Resolved
  • % Done changed from 0 to 100
Quite the tricky bug to trigger in vitro, even though I had already identified the problem and the likely fix. The bug is only triggered if:
  1. Products and association are produced in the same module; and
  2. Assns is accessed via a FindMany in a different module in the same job.

Test with 40aeb00; fix with f585b48.

#5 Updated by Lynn Garren almost 6 years ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF