Skip to content
Snippets Groups Projects
Select Git revision
  • master
  • params
  • hades
  • revert-de3a3241
  • shine_module
  • TrackMatching_refactor
  • setup_ci
  • 1.4
  • 1.3
  • 1.2
  • 1.1
  • 1.0
12 results

DataTreePSDModule.cxx

Blame
  • user avatar
    Evgeny Kashirin authored
    b5ee541a
    History
    DataTreePSDModule.cxx 1.03 KiB
    #include "DataTreePSDModule.h"
    
    DataTreePSDModule::DataTreePSDModule(int idx) : TObject(),
    fProcessFlag(false),
    // fSections (new TClonesArray("DataTreePSDSection")),
    fSections (0),
    fNumberOfSections(0)
    {
        SetId(idx);
    }
    
    DataTreePSDModule::DataTreePSDModule(int idx, int inSections) : TObject(),
    fProcessFlag(false),
    // fSections (new TClonesArray("DataTreePSDSection")),
    fSections (0),
    fNumberOfSections(0)
    {
        SetId(idx);
        for (int i=0;i<inSections;i++)
    	AddSection();
        
        fNumberOfSections = inSections;
    }
    
    void DataTreePSDModule::ClearEvent()
    {
        for(int i=0;i<fNumberOfSections;i++)
            GetSection(i)->ClearEvent();
        
        fSections.clear();
        fEnergy = 0.;
        fProcessFlag = false;
        fPosition[0] = fPosition[1] = fPosition[2] = EnumGlobalConst::kUndefinedValue;
    }
    
    void DataTreePSDModule::Process()
    {
        fEnergy = 0.;
        for(int i=0;i<fNumberOfSections;i++)
            fEnergy += GetSection(i)->GetEnergy();
        
        fProcessFlag = true;
    }
    
    DataTreePSDModule::~DataTreePSDModule()
    {
        
    }
    
    ClassImp(DataTreePSDModule)