GRSISort
Created by P.C. Bender
Developement Team: P.C. Bender, R. Dunlop, V. Bildstein
An extension of the ROOT analysis Framework
TFragmentMap Class Reference

The TFragmentMap calculates the charges of piled-up hits. In the newest GRIFFIN data (starting with tests in 2016), piled-up hits have 2*n-1 integrated charges reported, for the different integration areas.

Definition at line 28 of file TFragmentMap.h.

Public Member Functions

 TFragmentMap (std::vector< std::shared_ptr< ThreadsafeQueue< std::shared_ptr< const TFragment >>>> &good_output_queue, std::shared_ptr< ThreadsafeQueue< std::shared_ptr< const TBadFragment >>> &bad_output_queue)
 
 ~TFragmentMap ()=default
 
bool Add (std::shared_ptr< TFragment >, std::vector< Int_t >, std::vector< Short_t >)
 

Private Member Functions

void DropFragments (std::pair< std::multimap< UInt_t, std::tuple< std::shared_ptr< TFragment >, std::vector< Int_t >, std::vector< Short_t >>>::iterator, std::multimap< UInt_t, std::tuple< std::shared_ptr< TFragment >, std::vector< Int_t >, std::vector< Short_t >>>::iterator > &range)
 
void Solve (std::vector< std::shared_ptr< TFragment >>, std::vector< Float_t >, std::vector< Long_t >, int situation=-1)
 

Private Attributes

std::shared_ptr< ThreadsafeQueue< std::shared_ptr< const TBadFragment > > > & fBadOutputQueue
 
std::vector< std::shared_ptr< ThreadsafeQueue< std::shared_ptr< const TFragment > > > > & fGoodOutputQueue
 
std::multimap< UInt_t, std::tuple< std::shared_ptr< TFragment >, std::vector< Int_t >, std::vector< Short_t > > > fMap
 

Static Private Attributes

static bool fDebug = false
 

#include <TFragmentMap.h>

+ Collaboration diagram for TFragmentMap:

Constructor & Destructor Documentation

◆ TFragmentMap()

TFragmentMap::TFragmentMap ( std::vector< std::shared_ptr< ThreadsafeQueue< std::shared_ptr< const TFragment >>>> &  good_output_queue,
std::shared_ptr< ThreadsafeQueue< std::shared_ptr< const TBadFragment >>> &  bad_output_queue 
)

Definition at line 7 of file TFragmentMap.cxx.

◆ ~TFragmentMap()

TFragmentMap::~TFragmentMap ( )
default

Member Function Documentation

◆ Add()

bool TFragmentMap::Add ( std::shared_ptr< TFragment frag,
std::vector< Int_t >  charge,
std::vector< Short_t >  integrationLength 
)

Definition at line 14 of file TFragmentMap.cxx.

References DropFragments(), fDebug, fGoodOutputQueue, fMap, hex(), and Solve().

Referenced by TGRSIDataParser::GriffinDataToFragment().

◆ DropFragments()

void TFragmentMap::DropFragments ( std::pair< std::multimap< UInt_t, std::tuple< std::shared_ptr< TFragment >, std::vector< Int_t >, std::vector< Short_t >>>::iterator, std::multimap< UInt_t, std::tuple< std::shared_ptr< TFragment >, std::vector< Int_t >, std::vector< Short_t >>>::iterator > &  range)
private

put the fragments within the range of the two iterators into the bad output queue

Definition at line 448 of file TFragmentMap.cxx.

References fBadOutputQueue, fDebug, and fMap.

Referenced by Add().

◆ Solve()

void TFragmentMap::Solve ( std::vector< std::shared_ptr< TFragment >>  frag,
std::vector< Float_t >  c,
std::vector< Long_t >  k,
int  situation = -1 
)
private

Solves minimization of charges for given integrated charges c and integration lengths k. Resulting charges are stored in the provided fragments with a k-value of 1. The situation parameter distinguishes between the two different ways 3 hits can pile up with each other: 3 - both later hits pile up with the first, any other value - the third hit only piles up with the second hit not the first one.

Definition at line 342 of file TFragmentMap.cxx.

References fDebug.

Referenced by Add().

Member Data Documentation

◆ fBadOutputQueue

std::shared_ptr<ThreadsafeQueue<std::shared_ptr<const TBadFragment> > >& TFragmentMap::fBadOutputQueue
private

Definition at line 51 of file TFragmentMap.h.

Referenced by DropFragments().

◆ fDebug

bool TFragmentMap::fDebug = false
staticprivate

Definition at line 41 of file TFragmentMap.h.

Referenced by Add(), DropFragments(), and Solve().

◆ fGoodOutputQueue

std::vector<std::shared_ptr<ThreadsafeQueue<std::shared_ptr<const TFragment> > > >& TFragmentMap::fGoodOutputQueue
private

Definition at line 50 of file TFragmentMap.h.

Referenced by Add().

◆ fMap

std::multimap<UInt_t, std::tuple<std::shared_ptr<TFragment>, std::vector<Int_t>, std::vector<Short_t> > > TFragmentMap::fMap
private

Definition at line 49 of file TFragmentMap.h.

Referenced by Add(), and DropFragments().