APRILContent
Algorithm of Particle Reconstruction for ILC - implementation with PandoraSDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations
Connector.h
Go to the documentation of this file.
1 /*
3  *
4  * Connector.h header template automatically generated by a class generator
5  * Creation date : ven. mars 20 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 CONNECTOR_H
30 #define CONNECTOR_H
31 
32 #include "Pandora/StatusCodes.h"
33 #include "Objects/CartesianVector.h"
34 
37 
38 namespace april_content
39 {
40 
44 class Connector
45 {
46 public:
50  const april_content::CaloHit *GetFrom() const;
51 
55  const april_content::CaloHit *GetTo() const;
56 
60  const april_content::CaloHit *Get(ConnectorDirection direction) const;
61 
65  float GetLength() const;
66 
70  float GetReferenceLength() const;
71 
75  float GetNormalizedLength() const;
76 
80  pandora::CartesianVector GetVector(ConnectorDirection direction = FORWARD_DIRECTION) const;
81 
85  bool IsFrom(const april_content::CaloHit *const pCaloHit) const;
86 
90  bool IsTo(const april_content::CaloHit *const pCaloHit) const;
91 
95  float GetOpeningAngle(const Connector *const pConnector) const;
96 
97  unsigned int GetCreationStage() const;
98 
99 private:
103  Connector(const april_content::CaloHit *const pFromCaloHit, const april_content::CaloHit *const pToCaloHit,
104  float referenceLength = 1.f, unsigned int creationStage = -1);
105 
109  ~Connector();
110 
111 private:
115  unsigned int m_creationStage;
116 
117  // friendship
118  friend class CaloHit;
119  friend class ::APRILContentApi;
120 };
121 
122 }
123 
124 #endif // CONNECTOR_H
float GetNormalizedLength() const
Get the normalized length.
Definition: Connector.cc:90
Connector class.
Definition: Connector.h:44
unsigned int m_creationStage
The clustering stage of connector creation.
Definition: Connector.h:115
bool IsFrom(const april_content::CaloHit *const pCaloHit) const
Whether the calo hit is the &#39;from&#39; calo hit of this connector.
Definition: Connector.cc:105
pandora::CartesianVector GetVector(ConnectorDirection direction=FORWARD_DIRECTION) const
Get the connector vector depending on the asked direction.
Definition: Connector.cc:97
CaloHit class.
Definition: CaloHit.h:52
float GetOpeningAngle(const Connector *const pConnector) const
Get the opening angle with an other connector (radian)
Definition: Connector.cc:119
const CaloHit * m_pFromCaloHit
The &#39;from&#39; calo hit of this connector.
Definition: Connector.h:112
float m_referenceLength
The reference length on connector creation.
Definition: Connector.h:114
const april_content::CaloHit * GetFrom() const
Get the &#39;from&#39; calo hit.
Definition: Connector.cc:55
const april_content::CaloHit * GetTo() const
Get the &#39;to&#39; calo hit.
Definition: Connector.cc:62
float GetReferenceLength() const
Get the reference length.
Definition: Connector.cc:83
ConnectorDirection
ConnectorDirection enumerator.
Definition: APRILInputTypes.h:56
Connector(const april_content::CaloHit *const pFromCaloHit, const april_content::CaloHit *const pToCaloHit, float referenceLength=1.f, unsigned int creationStage=-1)
Constructor with two calo hits and a reference length.
Definition: Connector.cc:35
const april_content::CaloHit * Get(ConnectorDirection direction) const
Get the &#39;to&#39; or &#39;from&#39; calo hit (from (to) for BACKWARD_DIRECTION (FORWARD_DIRECTION)) ...
Definition: Connector.cc:69
~Connector()
Destructor.
Definition: Connector.cc:47
float GetLength() const
Get the connector length.
Definition: Connector.cc:76
bool IsTo(const april_content::CaloHit *const pCaloHit) const
Whether the calo hit is the &#39;to&#39; calo hit of this connector.
Definition: Connector.cc:112
const CaloHit * m_pToCaloHit
The &#39;to&#39; calo hit of this connector.
Definition: Connector.h:113