Skip to content
Snippets Groups Projects
Commit 11e991b0 authored by Marco Cattaneo's avatar Marco Cattaneo
Browse files

Merge branch 'apearce-turbo-calo-digit-linkers' into '2017-patches'

Allow finding LHCb::Digit MC associations only by digit index

See merge request !191
parents 68a8ff36 d20a3401
No related branches found
No related tags found
5 merge requests!206Rebase RichTTFUStudies to current master,!197Merging master -> future,!195Propagate MR !191 from 2017-patches to master, fixing conflicts,!193Propagate MR !191 from 2017-patches to master,!191Allow finding LHCb::Digit MC associations only by digit index
......@@ -71,6 +71,7 @@ protected:
: GaudiAlgorithm ( name , pSvc )
, m_inputs ( 1 , LHCb::CaloDigitLocation::Ecal )
, m_output ( "Relations/" + LHCb::CaloDigitLocation::Default )
, m_respectInputDigitLocation ( true )
{
declareProperty
( "Inputs" ,
......@@ -80,6 +81,17 @@ protected:
( "Output" ,
m_output ,
"TES-Output Location of Relation Table CaloDigit->MCParticle" ) ;
/*
* Problem: By default, this algorithm will ask the linker tables for links
* based on the index *and* location of the input digits. This means
* cloning digits and then running this algorithm on the clones won't work.
* Solution: Only associate digits based on their index, enabled by setting
* this property to false.
*/
declareProperty
( "RespectInputDigitLocation" ,
m_respectInputDigitLocation ,
"If false, do not check that the location of the input digits match those defined in the linker table, only the index" ) ;
}
/// virtual destructor (protected)
virtual ~CaloDigit2MCLinks2Table() {}
......@@ -100,6 +112,7 @@ private:
typedef std::vector<std::string> Inputs ;
Inputs m_inputs ;
std::string m_output ;
bool m_respectInputDigitLocation ;
// ==========================================================================
};
// ============================================================================
......@@ -150,7 +163,7 @@ StatusCode CaloDigit2MCLinks2Table::execute ()
if ( 0 == digit ) { continue ; }
// use Linker
const LHCb::MCParticle* particle = linker.first( digit ) ;
const LHCb::MCParticle* particle = m_respectInputDigitLocation ? linker.first(digit) : linker.first(digit->index());
if ( 0 == particle ) { continue ; }
// use the auxillary container to be immune agains
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment