Build separate CaloHitLists for each view.
81 const CaloHitList *pCaloHitList(
nullptr);
82 PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::GetList(*
this,
m_inputCaloHitListName, pCaloHitList));
84 if (pCaloHitList->empty())
88 throw StatusCodeException(STATUS_CODE_OUT_OF_RANGE);
90 CaloHitList selectedCaloHitListU, selectedCaloHitListV, selectedCaloHitListW;
92 for (
const CaloHit *
const pCaloHit : *pCaloHitList)
105 if (pCaloHit->GetInputEnergy() < std::numeric_limits<float>::epsilon())
107 if (PandoraContentApi::GetSettings(*this)->ShouldDisplayAlgorithmInfo())
108 std::cout <<
"PreProcessingAlgorithm: found a hit with zero energy, will remove it" << std::endl;
115 if (PandoraContentApi::GetSettings(*this)->ShouldDisplayAlgorithmInfo())
117 std::cout <<
"PreProcessingAlgorithm: found a hit with extent " << pCaloHit->GetCellLengthScale() <<
", require ("
124 if (TPC_VIEW_U == pCaloHit->GetHitType())
126 selectedCaloHitListU.push_back(pCaloHit);
128 else if (TPC_VIEW_V == pCaloHit->GetHitType())
130 selectedCaloHitListV.push_back(pCaloHit);
132 else if (TPC_VIEW_W == pCaloHit->GetHitType())
134 selectedCaloHitListW.push_back(pCaloHit);
138 CaloHitList filteredCaloHitListU, filteredCaloHitListV, filteredCaloHitListW;
143 CaloHitList filteredInputList;
144 filteredInputList.insert(filteredInputList.end(), filteredCaloHitListU.begin(), filteredCaloHitListU.end());
145 filteredInputList.insert(filteredInputList.end(), filteredCaloHitListV.begin(), filteredCaloHitListV.end());
146 filteredInputList.insert(filteredInputList.end(), filteredCaloHitListW.begin(), filteredCaloHitListW.end());
149 PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::SaveList(*
this, filteredInputList,
m_filteredCaloHitListName));
152 PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::SaveList(*
this, filteredCaloHitListU,
m_outputCaloHitListNameU));
155 PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::SaveList(*
this, filteredCaloHitListV,
m_outputCaloHitListNameV));
158 PANDORA_THROW_RESULT_IF(STATUS_CODE_SUCCESS, !=, PandoraContentApi::SaveList(*
this, filteredCaloHitListW,
m_outputCaloHitListNameW));
std::string m_outputCaloHitListNameV
The output calo hit list name for TPC_VIEW_V hits.
void GetFilteredCaloHitList(const pandora::CaloHitList &inputList, pandora::CaloHitList &outputList)
Clean up the input CaloHitList.
float m_maxCellLengthScale
The maximum length scale for calo hit.
float m_mipEquivalentCut
Minimum mip equivalent energy for calo hit.
unsigned int m_maxEventHits
The maximum number of hits in an event to proceed with the reconstruction.
std::string m_outputCaloHitListNameW
The output calo hit list name for TPC_VIEW_W hits.
std::string m_filteredCaloHitListName
The output calo hit list name for all U, V and W hits.
float m_minCellLengthScale
The minimum length scale for calo hit.
std::string m_outputCaloHitListNameU
The output calo hit list name for TPC_VIEW_U hits.
std::string m_inputCaloHitListName
The input calo hit list name.
pandora::CaloHitSet m_processedHits
The set of all previously processed calo hits.
bool m_onlyAvailableCaloHits
Whether to only include available calo hits.
BEGIN_PROLOG could also be cout