Skip to content
Snippets Groups Projects
Commit 5b99a05c authored by fangwx@ihep.ac.cn's avatar fangwx@ihep.ac.cn
Browse files

rename DedxAlg to RecDCHDedxAlg

parent e7e76981
No related branches found
No related tags found
No related merge requests found
gaudi_subdir(Dedx v0r0) gaudi_subdir(DCHDedx v0r0)
find_package(EDM4HEP REQUIRED ) find_package(EDM4HEP REQUIRED )
find_package(DD4hep COMPONENTS DDCore DDRec REQUIRED) find_package(DD4hep COMPONENTS DDCore DDRec REQUIRED)
...@@ -16,7 +16,7 @@ set(srcs ...@@ -16,7 +16,7 @@ set(srcs
) )
# Modules # Modules
gaudi_add_module(Dedx ${srcs} gaudi_add_module(DCHDedx ${srcs}
INCLUDE_DIRS GaudiKernel INCLUDE_DIRS GaudiKernel
LINK_LIBRARIES GaudiAlgLib GaudiKernel LINK_LIBRARIES GaudiAlgLib GaudiKernel
DetSegmentation DetSegmentation
......
#include "DedxAlg.h" #include "RecDCHDedxAlg.h"
#include "edm4hep/EventHeaderCollection.h" #include "edm4hep/EventHeaderCollection.h"
#include "edm4hep/MCParticleCollection.h" #include "edm4hep/MCParticleCollection.h"
#include "edm4hep/SimTrackerHitCollection.h" #include "edm4hep/SimTrackerHitCollection.h"
...@@ -19,16 +19,16 @@ ...@@ -19,16 +19,16 @@
#include "DD4hep/DD4hepUnits.h" #include "DD4hep/DD4hepUnits.h"
#include "CLHEP/Random/RandGauss.h" #include "CLHEP/Random/RandGauss.h"
DECLARE_COMPONENT(DedxAlg) DECLARE_COMPONENT(RecDCHDedxAlg)
DedxAlg::DedxAlg(const std::string& name, ISvcLocator* svcLoc) RecDCHDedxAlg::RecDCHDedxAlg(const std::string& name, ISvcLocator* svcLoc)
: GaudiAlgorithm(name, svcLoc) : GaudiAlgorithm(name, svcLoc)
{ {
declareProperty("DCHitAssociationCollection", m_dcHitAssociationCol, "Handle of association collection"); declareProperty("DCHitAssociationCollection", m_dcHitAssociationCol, "Handle of association collection");
declareProperty("DCTrackCollection", m_dcTrackCol,"Handle of input Track collection"); declareProperty("DCTrackCollection", m_dcTrackCol,"Handle of input Track collection");
} }
StatusCode DedxAlg::initialize() StatusCode RecDCHDedxAlg::initialize()
{ {
if(m_WriteAna){ if(m_WriteAna){
...@@ -57,7 +57,7 @@ StatusCode DedxAlg::initialize() ...@@ -57,7 +57,7 @@ StatusCode DedxAlg::initialize()
} }
StatusCode DedxAlg::execute() StatusCode RecDCHDedxAlg::execute()
{ {
if(m_WriteAna){ if(m_WriteAna){
...@@ -142,12 +142,12 @@ StatusCode DedxAlg::execute() ...@@ -142,12 +142,12 @@ StatusCode DedxAlg::execute()
return StatusCode::SUCCESS; return StatusCode::SUCCESS;
} }
StatusCode DedxAlg::finalize() StatusCode RecDCHDedxAlg::finalize()
{ {
return GaudiAlgorithm::finalize(); return GaudiAlgorithm::finalize();
} }
double DedxAlg::cal_dedx_bitrunc(float truncate, std::vector<double> phlist, int & usedhit ) double RecDCHDedxAlg::cal_dedx_bitrunc(float truncate, std::vector<double> phlist, int & usedhit )
{ {
sort(phlist.begin(),phlist.end()); sort(phlist.begin(),phlist.end());
int nsampl = (int)( phlist.size()*truncate ); int nsampl = (int)( phlist.size()*truncate );
...@@ -167,7 +167,7 @@ double DedxAlg::cal_dedx_bitrunc(float truncate, std::vector<double> phlist, int ...@@ -167,7 +167,7 @@ double DedxAlg::cal_dedx_bitrunc(float truncate, std::vector<double> phlist, int
return trunc; return trunc;
} }
/* /*
double DedxAlg::BetheBlochEquationDedx(const edm4hep::MCParticle& mcp) double RecDCHDedxAlg::BetheBlochEquationDedx(const edm4hep::MCParticle& mcp)
{ {
int z = mcp.getCharge(); int z = mcp.getCharge();
if (z == 0) return 0; if (z == 0) return 0;
......
#ifndef DedxAlg_h #ifndef RecDCHDedxAlg_h
#define DedxAlg_h #define RecDCHDedxAlg_h
#include "edm4hep/MCParticleCollection.h" #include "edm4hep/MCParticleCollection.h"
#include "GaudiAlg/GaudiAlgorithm.h" #include "GaudiAlg/GaudiAlgorithm.h"
...@@ -26,10 +26,10 @@ namespace edm4hep { ...@@ -26,10 +26,10 @@ namespace edm4hep {
class MCRecoParticleAssociationCollection; class MCRecoParticleAssociationCollection;
} }
class DedxAlg: public GaudiAlgorithm class RecDCHDedxAlg: public GaudiAlgorithm
{ {
public: public:
DedxAlg(const std::string& name, ISvcLocator* svcLoc); RecDCHDedxAlg(const std::string& name, ISvcLocator* svcLoc);
virtual StatusCode initialize(); virtual StatusCode initialize();
virtual StatusCode execute(); virtual StatusCode execute();
......
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