Skip to content
Snippets Groups Projects

Store calo reco

Merged Olivier Deschamps requested to merge StoreCaloReco into master
4 unresolved threads

No reaction to the Jira post - so I push

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Can you post here the JIRA task for cross-ref? Thanks.

  • I'm not familiar with the intent of this MR, but if you just want to copy objects from one location to another, including references to other objects that the 'parent object' knows about, you could use the existing MicroDST machinery.

    See !106 (merged) for example, where I've added an algorithm for copying CaloHypo objects. (The CaloHypoCloner class, which is used by this new copy algorithm for each CaloHypo, knows how to copy the related CaloCluster and CaloDigit objects.) These algorithms are all very similar to each other and lots already exist (e.g. for copying MCParticle or ProtoParticle objects), so adding new ones is relatively easy.

  • Hi Alex,

    thanks for the info. This is partly what the newly added storeCaloReco algorithm is doing. But for the purpose of the calo re-reconstruction there is some additional informations that also need to be stored (ExtraDigits attached to CaloHypo, CaloEntries attached to CaloClusters and the CaloADCs matching the CaloDigits that actually are not referenced in CaloDigits) taking care of avoiding duplicate. The references to other objects is actually not used and the calo reconstruction chain is restored using the ChannelID information.

  • Thanks for the explanation. I just wanted to make sure the existing cloners don't suit your needs, but it sounds like you need something more.

  • mentioned in commit 27c3de10

  • Sorry I missed this commit before it was merged. It would be good if new code were following the C++14 style and modern Gaudi from the beginning. In particular, member variables should be initialised in the header file where they are declared (e.g. initialise all pointers as nullptr, and properties should be declared as Gaudi::Property, not through declareProperty

13 // 2016-12-06 : Olivier Deschamps
14 //-----------------------------------------------------------------------------
15
16 // Declaration of the Algorithm Factory
17 DECLARE_ALGORITHM_FACTORY( StoreCaloRecoChain )
18
19 //=============================================================================
20 // Standard constructor, initializes variables
21 //=============================================================================
22 StoreCaloRecoChain::StoreCaloRecoChain( const std::string& name,
23 ISvcLocator* pSvcLocator ) : DaVinciAlgorithm ( name , pSvcLocator )
24 , m_status(LHCb::CaloDigitStatus::UseForEnergy|LHCb::CaloDigitStatus::UseForPosition|LHCb::CaloDigitStatus::UseForCovariance){
25 declareProperty("TESprefix" ,m_prefix="CaloReco/");
26 declareProperty("UseStatusMask",m_mask=true); // true : only store the masked digits
27 declareProperty("Verbose" ,m_verb=false); // activate verbose printing
28 }
  • If you declare these three properties as Gaudi::Property in the header file, and initialise m_status where it is declared, this constructor can be removed, just declare the inheritance in the header file with a

    using DaVinciAlgorithm::DaVinciAlgorithm()

  • Please register or sign in to reply
  • 18
    19 //=============================================================================
    20 // Standard constructor, initializes variables
    21 //=============================================================================
    22 StoreCaloRecoChain::StoreCaloRecoChain( const std::string& name,
    23 ISvcLocator* pSvcLocator ) : DaVinciAlgorithm ( name , pSvcLocator )
    24 , m_status(LHCb::CaloDigitStatus::UseForEnergy|LHCb::CaloDigitStatus::UseForPosition|LHCb::CaloDigitStatus::UseForCovariance){
    25 declareProperty("TESprefix" ,m_prefix="CaloReco/");
    26 declareProperty("UseStatusMask",m_mask=true); // true : only store the masked digits
    27 declareProperty("Verbose" ,m_verb=false); // activate verbose printing
    28 }
    29
    30 //=============================================================================
    31 // Destructor
    32 //=============================================================================
    33 StoreCaloRecoChain::~StoreCaloRecoChain() {}
  • 12 //
    13 // 2016-12-06 : Olivier Deschamps
    14 //-----------------------------------------------------------------------------
    15
    16 // Declaration of the Algorithm Factory
    17 DECLARE_ALGORITHM_FACTORY( StoreCaloRecoChain )
    18
    19 //=============================================================================
    20 // Standard constructor, initializes variables
    21 //=============================================================================
    22 StoreCaloRecoChain::StoreCaloRecoChain( const std::string& name,
    23 ISvcLocator* pSvcLocator ) : DaVinciAlgorithm ( name , pSvcLocator )
    24 , m_status(LHCb::CaloDigitStatus::UseForEnergy|LHCb::CaloDigitStatus::UseForPosition|LHCb::CaloDigitStatus::UseForCovariance){
    25 declareProperty("TESprefix" ,m_prefix="CaloReco/");
    26 declareProperty("UseStatusMask",m_mask=true); // true : only store the masked digits
    27 declareProperty("Verbose" ,m_verb=false); // activate verbose printing
  • 248 if( NULL != adcs->object( id ) )return false;
    249 int adc = (m_ecal(d)) ? m_edata->adc( id , -255 ) : m_pdata->adc( id , 0 );
    250 if(m_ecal(d ))m_counter("Ecal ADC");
    251 if(m_prs(d ))m_counter("Prs ADC");
    252 LHCb::CaloAdc* pAdc = new LHCb::CaloAdc( id, adc );
    253 adcs->insert( pAdc );
    254 return true;
    255 }
    256
    257 //=============================================================================
    258 // Finalize
    259 //=============================================================================
    260 StatusCode StoreCaloRecoChain::finalize() {
    261 if ( msgLevel(MSG::DEBUG) ) debug() << "==> Finalize" << endmsg;
    262 return DaVinciAlgorithm::finalize();
    263 }
  • Fair enougg Marco! I confess I need to catch up with latest and greatest Gaudi. Thanks for the reminder.

  • Please register or sign in to reply
    Loading