APRILContent
Algorithm of Particle Reconstruction for ILC - implementation with PandoraSDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations
CaloHitHelper.h
Go to the documentation of this file.
1 /*
3  *
4  * CaloHitHelper.h header template automatically generated by a class generator
5  * Creation date : lun. mars 30 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 CALOHITHELPER_H
30 #define CALOHITHELPER_H
31 
32 #include "Pandora/PandoraInternal.h"
33 #include "Pandora/StatusCodes.h"
34 
35 #include "APRILObjects/CaloHit.h"
36 #include "APRILObjects/Connector.h"
37 
38 namespace pandora { class Algorithm; class CaloHit; class Track; }
39 
40 namespace april_content
41 {
42 
47 {
48 public:
54  static pandora::StatusCode RemoveCurrentConnections(const pandora::Algorithm &algorithm);
55 
61  static pandora::StatusCode RemoveConnections(const pandora::CaloHitList *const pCaloHitList);
62 
70  static pandora::StatusCode ExtractCurrentSeedCaloHitList(const pandora::Algorithm &algorithm, pandora::CaloHitList &seedCaloHitList, bool discriminateLeafHits = false);
71 
79  static pandora::StatusCode ExtractSeedCaloHitList(const pandora::CaloHitList *const pCaloHitList, pandora::CaloHitList &seedCaloHitList, bool discriminateLeafHits = false);
80 
88  static pandora::StatusCode ExtractCurrentLeafCaloHitList(const pandora::Algorithm &algorithm, pandora::CaloHitList &leafCaloHitList, bool discriminateSeedHits = false);
89 
97  static pandora::StatusCode ExtractLeafCaloHitList(const pandora::CaloHitList *const pCaloHitList, pandora::CaloHitList &leafCaloHitList, bool discriminateSeedHits = false);
98 
106  static pandora::StatusCode BuildCaloHitList(const CaloHit *const pCaloHit, ConnectorDirection direction, pandora::CaloHitList &calohitList);
107 
118  static pandora::StatusCode BuildCaloHitList(const CaloHit *const pCaloHit, ConnectorDirection direction, pandora::CaloHitList &calohitList,
119  unsigned int connectionLimit, unsigned int pseudoLayerLimit);
120 
129  static pandora::StatusCode GetMeanDirection(const CaloHit *const pCaloHit, ConnectorDirection connectorDirection,
130  pandora::CartesianVector &direction, unsigned int depth);
131 
144  static bool CanConnect(const CaloHit *const pCaloHit1, const CaloHit *const pCaloHit2, const pandora::CartesianVector &expectedDirection,
145  const float normaleMaxAngle, const float normaleMaxDistance,
146  const float transverseMaxAngle, const float transverseMaxDistance);
147 
159  static bool CanConnect(const pandora::Track *const pTrack, const CaloHit *const pCaloHit,
160  const float normaleMaxAngle, const float normaleMaxDistance,
161  const float transverseMaxAngle, const float transverseMaxDistance);
162 
175  static bool IsInRegionOfInterest(const pandora::CartesianVector &startRegionPosition, const pandora::CartesianVector &testPosition, const pandora::CartesianVector &expectedDirection,
176  const pandora::CartesianVector &normaleVector, const float normaleMaxAngle, const float normaleMaxDistance, const float transverseMaxAngle, const float transverseMaxDistance);
177 };
178 
179 }
180 
181 #endif // CALOHITHELPER_H
static pandora::StatusCode ExtractCurrentLeafCaloHitList(const pandora::Algorithm &algorithm, pandora::CaloHitList &leafCaloHitList, bool discriminateSeedHits=false)
Extract the calo hit leaf list from the current calo hit list.
Definition: CaloHitHelper.cc:102
static pandora::StatusCode ExtractCurrentSeedCaloHitList(const pandora::Algorithm &algorithm, pandora::CaloHitList &seedCaloHitList, bool discriminateLeafHits=false)
Extract the calo hit seed list from the current calo hit list.
Definition: CaloHitHelper.cc:71
static pandora::StatusCode BuildCaloHitList(const CaloHit *const pCaloHit, ConnectorDirection direction, pandora::CaloHitList &calohitList)
Build the calo hit list starting from a calo hit by looking recursively in the connector list (forwar...
Definition: CaloHitHelper.cc:133
CaloHit class.
Definition: CaloHit.h:52
static pandora::StatusCode RemoveConnections(const pandora::CaloHitList *const pCaloHitList)
Remove the connections of the calo hit list.
Definition: CaloHitHelper.cc:53
static pandora::StatusCode RemoveCurrentConnections(const pandora::Algorithm &algorithm)
Remove the connections of the current calo hit list.
Definition: CaloHitHelper.cc:43
CaloHitHelper class.
Definition: CaloHitHelper.h:46
static bool CanConnect(const CaloHit *const pCaloHit1, const CaloHit *const pCaloHit2, const pandora::CartesianVector &expectedDirection, const float normaleMaxAngle, const float normaleMaxDistance, const float transverseMaxAngle, const float transverseMaxDistance)
Whether the two calo hits can be connected. The valid region to connect two hits is contained within ...
Definition: CaloHitHelper.cc:234
static pandora::StatusCode ExtractSeedCaloHitList(const pandora::CaloHitList *const pCaloHitList, pandora::CaloHitList &seedCaloHitList, bool discriminateLeafHits=false)
Extract the calo hit seed list from the calo hit list.
Definition: CaloHitHelper.cc:82
ConnectorDirection
ConnectorDirection enumerator.
Definition: APRILInputTypes.h:56
static pandora::StatusCode GetMeanDirection(const CaloHit *const pCaloHit, ConnectorDirection connectorDirection, pandora::CartesianVector &direction, unsigned int depth)
Get the mean direction of the calo hit in a given direction.
Definition: CaloHitHelper.cc:193
static bool IsInRegionOfInterest(const pandora::CartesianVector &startRegionPosition, const pandora::CartesianVector &testPosition, const pandora::CartesianVector &expectedDirection, const pandora::CartesianVector &normaleVector, const float normaleMaxAngle, const float normaleMaxDistance, const float transverseMaxAngle, const float transverseMaxDistance)
Whether the tested position is in the region of interest. The valid region is contained within a cone...
Definition: CaloHitHelper.cc:270
static pandora::StatusCode ExtractLeafCaloHitList(const pandora::CaloHitList *const pCaloHitList, pandora::CaloHitList &leafCaloHitList, bool discriminateSeedHits=false)
Extract the calo hit leaf list from the calo hit list.
Definition: CaloHitHelper.cc:113