APRILContent
Algorithm of Particle Reconstruction for ILC - implementation with PandoraSDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations
APRILInputTypes.h
Go to the documentation of this file.
1 /*
3  *
4  * APRILInputTypes.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 APRILINPUTTYPES_H
30 #define APRILINPUTTYPES_H
31 
32 #include "Pandora/PandoraInputTypes.h"
33 
34 #include <bitset>
35 
36 namespace april_content
37 {
38 
39 //------------------------------------------------------------------------------------------------------------------------------------------
40 
45 {
46  THRESHOLD_1 = 1,
47  THRESHOLD_2 = 2,
48  THRESHOLD_3 = 3
49 };
50 
51 //------------------------------------------------------------------------------------------------------------------------------------------
52 
57 {
58  BACKWARD_DIRECTION = -1,
59  FORWARD_DIRECTION = 1
60 };
61 
62 //------------------------------------------------------------------------------------------------------------------------------------------
63 
67 enum HitTag
68 {
69  CORE_HIT,
70  ISOLATED_HIT,
71  MIP_HIT,
72  NOISE_HIT,
73  NUMBER_OF_HIT_TAGS
74 };
75 
76 //------------------------------------------------------------------------------------------------------------------------------------------
77 
78 class Connector;
79 class CaloHit;
80 class Branch;
81 class Track;
82 class ConnectorAlgorithmTool;
83 
84 typedef std::set<const CaloHit *> CaloHitList;
85 typedef std::set<const Track *> TrackList;
86 typedef std::set<const Connector *> ConnectorList;
87 
88 typedef std::map<const pandora::Cluster *, const pandora::Cluster *> ClusterToClusterMap;
89 typedef std::map<const pandora::CaloHit *, const pandora::Cluster *> CaloHitToClusterMap;
90 
91 typedef std::vector<ConnectorAlgorithmTool *> ConnectorAlgorithmToolVector;
92 typedef std::vector<SemiDigitalThreshold> SemiDigitalThresholdList;
93 typedef std::bitset<NUMBER_OF_HIT_TAGS> HitTagMap;
94 
95 typedef pandora::PandoraInputType<SemiDigitalThreshold> InputSemiDigitalThreshold;
96 typedef pandora::PandoraInputType<SemiDigitalThresholdList> InputSemiDigitalThresholdList;
97 
98 typedef std::vector<Branch> BranchList;
99 
100 }
101 
102 namespace pandora
103 {
104 
105 // PandoraInputType template specialization for new defined types
106 //------------------------------------------------------------------------------------------------------------------------------------------
107 //------------------------------------------------------------------------------------------------------------------------------------------
108 
109 template <>
110 inline bool pandora::PandoraInputType<april_content::SemiDigitalThresholdList>::IsValid(const april_content::SemiDigitalThresholdList &list) const
111 {
112  if(list.empty())
113  return false;
114 
115  for(unsigned int i=0 ; i<list.size() ; i++)
116  {
117  if( !(std::isnan(static_cast<unsigned int>(list.at(i))) || std::isinf(static_cast<unsigned int>(list.at(i)))) )
118  return false;
119  }
120 
121  return true;
122 }
123 
124 //------------------------------------------------------------------------------------------------------------------------------------------
125 
126 template <>
127 inline bool pandora::PandoraInputType<april_content::SemiDigitalThreshold>::IsValid(const april_content::SemiDigitalThreshold &t) const
128 {
129  return !(std::isnan(static_cast<unsigned int>(t)) || std::isinf(static_cast<unsigned int>(t)));
130 }
131 
132 }
133 
134 #endif // APRILINPUTTYPES_H
HitTag
HitTag enumerator.
Definition: APRILInputTypes.h:67
ConnectorDirection
ConnectorDirection enumerator.
Definition: APRILInputTypes.h:56
SemiDigitalThreshold
SemiDigitalThreshold enumerator.
Definition: APRILInputTypes.h:44