Development #381
closedMC information in CbmTimeSlice
Description
Request from V. Akishina and I. Rosztovtseva: In the CbmTimeSlice objects, there should be information on which MC events have contributed and what is the number of CbmStsPoints for each of this events. This is needed for efficiency evaluation.
Updated by Volker Friese over 6 years ago
Update:
Dear Volker,
Thanks a lot for Issue #381.
since we are using only one MC file, a list of events and numbers CbmStsPoints corresponding to each event
would be enough for our current test as a temporary solution.
But in principle, for future we think
it would be even better to have the following request:
- some functionality in CbmTimeSlice to learn all pairs of (file, event) which went into it
(e.g. something like multimap<file, event> or maybe map<file, set<event>>)
- something like "int CbmMCDataArray::Size(int file, int event)" in order to be able to obtain
the size of corresponding MC TClonesArray for known file and event from CbmMCDataArray.h,cxx
(Thus, for example, we will also get access to all MCTracks from given (file, event),
even for tracks, which don"t have MCPoints).
Thanks in advance,
Best regards,
Irina, Valentina, Dima.
Updated by Volker Friese over 6 years ago
- Status changed from Scheduled to Feedback
- Assignee changed from Volker Friese to Valentina Akishina
Would a CbmMatchObject for each CbmTimeSlice be convenient? It would provide a list of CbmLinks, where each link gives
- file number
- entry ( = event number)
- index = :-1 (not used)
- weight = number of digis contributed from this event
This solution would somehow be in line with our current linking to MC.
Updated by Valentina Akishina over 6 years ago
- Status changed from Feedback to Scheduled
The proposed solution will work for us at this point.
Thank you!
Updated by Valentina Akishina over 6 years ago
- Assignee changed from Valentina Akishina to Volker Friese
Updated by Volker Friese over 6 years ago
- Status changed from Scheduled to In Progress
- % Done changed from 0 to 50
The class CbmTimeSlice contains an object of type CbmMatch, which is accessible through the methodconst CbmMatch& CbmTimeSlice::GetMatch()
This object contains all links to MC events. To obtain the required information:
Int_t nLinks = timeSlice->GetMatch().GetNofLinks();
for (Int_t iLink = 0; iLink < nLinks; iLink++) {
Int_t file = timeSlice->GetMatch().GetLink(iLink).GetFile();
Int_t event = timeSlice->GetMatch().GetLink(iLink).GetEntry();
Int_t nData = std::nint(timeSlice->GetMatch().GetLink(iLink).GetWeight();
...
}
The index variable of the link objects has no application here and is set to -1.
So, in this way you get a list of all (file, event) pairs with the number of digis from each pair in the timeslice.
The functionality for the event number was already there, I have added that for the file number in r8485.
The other requested functionality will be implemented in CbmMCDataArray by M. Prokudin. The API shall be Int_t CbmMCDataArray::Size(Int_t file, Int_t event)
which will return the number of objects (e.g., CbmMCTracks) for a given file and event number.
Updated by Volker Friese over 6 years ago
- Status changed from In Progress to Resolved
- % Done changed from 50 to 100
The functionality Int_t CbmMCDatArray::Size(Int_t file, Int_t event)
was provided by M. Prokudin in r8493. Please test and give feedback.
Updated by Volker Friese over 6 years ago
- Target version changed from FEB16 to NOV15
Updated by Volker Friese over 6 years ago
- Status changed from Resolved to Closed
I did not receive negative feedback, so I consider this issue closed.