APRILContent
Algorithm of Particle Reconstruction for ILC - implementation with PandoraSDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations
ReclusterHelper.h
Go to the documentation of this file.
1 /*
3  *
4  * ReclusterHelper.h header template automatically generated by a class generator
5  * Creation date : jeu. avr. 9 2015
6  *
7  * This file is part of APRILContent libraries.
8  *
9  * APRILContent is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  * based upon these libraries are permitted. Any copy of these libraries
14  * must include this copyright notice.
15  *
16  * APRILContent is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with APRILContent. If not, see <http://www.gnu.org/licenses/>.
23  *
24  * @author Remi Ete
25  * @copyright CNRS , IPNL
26  */
27 
28 
29 #ifndef RECLUSTERHELPER_H
30 #define RECLUSTERHELPER_H
31 
32 #include "Pandora/PandoraInputTypes.h"
33 #include "Pandora/PandoraInternal.h"
34 
35 namespace april_content
36 {
37 
38 class CaloHit;
39 
44 {
45 public:
49  float GetChi() const;
50 
54  float GetChi2() const;
55 
59  float GetChiPerDof() const;
60 
64  float GetChi2PerDof() const;
65 
69  float GetNeutralEnergy() const;
70 
74  float GetChargedEnergy() const;
75 
79  float GetChiWorstAssociation() const;
80 
84  void SetChi(float chi);
85 
89  void SetChi2(float chi2);
90 
94  void SetChiPerDof(float chiPerDof);
95 
99  void SetChi2PerDof(float chi2PerDof);
100 
104  void SetNeutralEnergy(float neutralEnergy);
105 
109  void SetChargedEnergy(float chargedEnergy);
110 
114  void SetChiWorstAssociation(float chiWorstAssociation);
115 
116 private:
117  float m_chi;
118  float m_chi2;
119  float m_chiPerDof;
120  float m_chi2PerDof;
121  float m_neutralEnergy;
122  float m_chargedEnergy;
123  float m_chiWorstAssociation;
124 };
125 
130 {
131 public:
143  static float GetTrackClusterCompatibility(const pandora::Pandora &pandora, const pandora::Cluster *const pCluster,
144  const pandora::TrackList &trackList);
145 
146  static float GetTrackClusterCompatibility(const pandora::Pandora &pandora, const pandora::Cluster *const pClusterToEnlarge, const pandora::Cluster *const pClusterToMerge, const pandora::TrackList &trackList);
147 
159  static float GetTrackClusterCompatibility(const pandora::Pandora &pandora, const float clusterEnergy, const float trackEnergy);
160 
168  static pandora::StatusCode ExtractReclusterResults(const pandora::Pandora &pandora, const pandora::ClusterList &clusterList, ReclusterResult &reclusterResult);
169 
179  static pandora::StatusCode SplitTreeFromCluster(const pandora::Algorithm &algorithm, const april_content::CaloHit *const pSeedCaloHit,
180  const pandora::Cluster *const pOriginalCluster, const pandora::Cluster *&pSeparatedTreeCluster, const std::string &originalClusterListName = "");
181 
190  static pandora::StatusCode SplitClusterIntoTreeClusters(const pandora::Algorithm &algorithm, const pandora::Cluster *const pCluster,
191  pandora::ClusterVector &treeClusterVector);
192 };
193 
194 //------------------------------------------------------------------------------------------------------------------------------------------
195 //------------------------------------------------------------------------------------------------------------------------------------------
196 
197 inline float ReclusterResult::GetChi() const
198 {
199  return m_chi;
200 }
201 
202 //------------------------------------------------------------------------------------------------------------------------------------------
203 
204 inline float ReclusterResult::GetChi2() const
205 {
206  return m_chi2;
207 }
208 
209 //------------------------------------------------------------------------------------------------------------------------------------------
210 
211 inline float ReclusterResult::GetChiPerDof() const
212 {
213  return m_chiPerDof;
214 }
215 
216 //------------------------------------------------------------------------------------------------------------------------------------------
217 
218 inline float ReclusterResult::GetChi2PerDof() const
219 {
220  return m_chi2PerDof;
221 }
222 
223 //------------------------------------------------------------------------------------------------------------------------------------------
224 
225 inline float ReclusterResult::GetNeutralEnergy() const
226 {
227  return m_neutralEnergy;
228 }
229 
230 //------------------------------------------------------------------------------------------------------------------------------------------
231 
232 inline float ReclusterResult::GetChargedEnergy() const
233 {
234  return m_chargedEnergy;
235 }
236 
237 //------------------------------------------------------------------------------------------------------------------------------------------
238 
239 inline float ReclusterResult::GetChiWorstAssociation() const
240 {
241  return m_chiWorstAssociation;
242 }
243 
244 //------------------------------------------------------------------------------------------------------------------------------------------
245 
246 inline void ReclusterResult::SetChi(float chi)
247 {
248  m_chi = chi;
249 }
250 
251 //------------------------------------------------------------------------------------------------------------------------------------------
252 
253 inline void ReclusterResult::SetChi2(float chi2)
254 {
255  m_chi2 = chi2;
256 }
257 
258 //------------------------------------------------------------------------------------------------------------------------------------------
259 
260 inline void ReclusterResult::SetChiPerDof(float chiPerDof)
261 {
262  m_chiPerDof = chiPerDof;
263 }
264 
265 //------------------------------------------------------------------------------------------------------------------------------------------
266 
267 inline void ReclusterResult::SetChi2PerDof(float chi2PerDof)
268 {
269  m_chi2PerDof = chi2PerDof;
270 }
271 
272 //------------------------------------------------------------------------------------------------------------------------------------------
273 
274 inline void ReclusterResult::SetNeutralEnergy(float neutralEnergy)
275 {
276  m_neutralEnergy = neutralEnergy;
277 }
278 
279 //------------------------------------------------------------------------------------------------------------------------------------------
280 
281 inline void ReclusterResult::SetChargedEnergy(float chargedEnergy)
282 {
283  m_chargedEnergy = chargedEnergy;
284 }
285 
286 //------------------------------------------------------------------------------------------------------------------------------------------
287 
288 inline void ReclusterResult::SetChiWorstAssociation(float chiWorstAssociation)
289 {
290  m_chiWorstAssociation = chiWorstAssociation;
291 }
292 
293 }
294 
295 #endif // RECLUSTERHELPER_H
static pandora::StatusCode SplitTreeFromCluster(const pandora::Algorithm &algorithm, const april_content::CaloHit *const pSeedCaloHit, const pandora::Cluster *const pOriginalCluster, const pandora::Cluster *&pSeparatedTreeCluster, const std::string &originalClusterListName="")
Create a separated tree cluster from a seed calo hit contained in an original cluster. Possible only if the original cluster contains more than one tree (more than one seed calo hit). Calo hits of the newly created tree cluster are removed from the original one.
Definition: ReclusterHelper.cc:198
CaloHit class.
Definition: CaloHit.h:52
ReclusterResult class.
Definition: ReclusterHelper.h:43
static pandora::StatusCode ExtractReclusterResults(const pandora::Pandora &pandora, const pandora::ClusterList &clusterList, ReclusterResult &reclusterResult)
Extract the recluster result.
Definition: ReclusterHelper.cc:147
static float GetTrackClusterCompatibility(const pandora::Pandora &pandora, const pandora::Cluster *const pCluster, const pandora::TrackList &trackList)
Evaluate the compatibility of a cluster with its associated tracks. Reclustering can be used to split...
Definition: ReclusterHelper.cc:39
static pandora::StatusCode SplitClusterIntoTreeClusters(const pandora::Algorithm &algorithm, const pandora::Cluster *const pCluster, pandora::ClusterVector &treeClusterVector)
Create a cluster list for each tree contained in the cluster Possible only if the cluster contains mo...
Definition: ReclusterHelper.cc:264
ReclusterHelper class.
Definition: ReclusterHelper.h:129