13 #ifndef L1_TRACK_TRIGGER_CLUSTER_ASSOCIATION_FORMAT_H 14 #define L1_TRACK_TRIGGER_CLUSTER_ASSOCIATION_FORMAT_H 32 template<
typename T >
80 template<
typename T >
91 template<
typename T >
95 template<
typename T >
108 template<
typename T >
116 std::vector< edm::Ptr< TrackingParticle > >
tempVector;
134 template<
typename T >
141 if ( theseTrackingParticles.size() == 0 )
145 unsigned int nullTPs = 0;
146 unsigned int goodDifferentTPs = 0;
147 std::vector< const TrackingParticle* > tpAddressVector;
150 for (
unsigned int itp = 0; itp < theseTrackingParticles.size(); itp++ )
164 tpAddressVector.push_back( curTP.
get() );
169 std::sort( tpAddressVector.begin(), tpAddressVector.end() );
170 tpAddressVector.erase(
std::unique( tpAddressVector.begin(), tpAddressVector.end() ), tpAddressVector.end() );
171 goodDifferentTPs = tpAddressVector.size();
174 return ( nullTPs == 0 && goodDifferentTPs == 1 );
177 template<
typename T >
184 if ( theseTrackingParticles.size() == 0 )
188 unsigned int goodDifferentTPs = 0;
189 std::vector< const TrackingParticle* > tpAddressVector;
192 for (
unsigned int itp = 0; itp < theseTrackingParticles.size(); itp++ )
202 tpAddressVector.push_back( curTP.
get() );
207 std::sort( tpAddressVector.begin(), tpAddressVector.end() );
208 tpAddressVector.erase(
std::unique( tpAddressVector.begin(), tpAddressVector.end() ), tpAddressVector.end() );
209 goodDifferentTPs = tpAddressVector.size();
212 return ( goodDifferentTPs == 0 );
215 template<
typename T >
222 if ( theseTrackingParticles.size() == 0 )
226 unsigned int nullTPs = 0;
227 unsigned int goodDifferentTPs = 0;
228 std::vector< const TrackingParticle* > tpAddressVector;
231 for (
unsigned int itp = 0; itp < theseTrackingParticles.size(); itp++ )
245 tpAddressVector.push_back( curTP.
get() );
250 std::sort( tpAddressVector.begin(), tpAddressVector.end() );
251 tpAddressVector.erase(
std::unique( tpAddressVector.begin(), tpAddressVector.end() ), tpAddressVector.end() );
252 goodDifferentTPs = tpAddressVector.size();
256 return ( ( nullTPs == 0 && goodDifferentTPs > 1 ) || ( nullTPs > 0 && goodDifferentTPs > 0 ) );
259 template<
typename T >
std::vector< edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > > findTTClusterRefs(edm::Ptr< TrackingParticle > aTrackingParticle) const
Operations.
~TTClusterAssociationMap()
Destructor.
void setTrackingParticleToTTClustersMap(std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > > > aMap)
T const * get() const
Returns C++ pointer to the item.
std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > > > trackingParticleToClusterVectorMap
bool isGenuine(edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > aCluster) const
MC Truth methods.
void setTTClusterToTrackingParticlesMap(std::map< edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > >, std::vector< edm::Ptr< TrackingParticle > > > aMap)
NOTE: this is needed even if it seems not.
TTClusterAssociationMap()
Constructors.
std::vector< edm::Ptr< TrackingParticle > > findTrackingParticlePtrs(edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > aCluster) const
Operations.
def unique(seq, keepstr=True)
bool isCombinatoric(edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > aCluster) const
bool isNull() const
Checks for null.
std::map< edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > >, std::vector< edm::Ptr< TrackingParticle > > > clusterToTrackingParticleVectorMap
Data members.
edm::Ptr< TrackingParticle > findTrackingParticlePtr(edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > aCluster) const
std::map< edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > >, std::vector< edm::Ptr< TrackingParticle > > > getTTClusterToTrackingParticlesMap() const
Maps.
NOTE: this is needed even if it seems not.
bool isUnknown(edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > aCluster) const
std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > > > getTrackingParticleToTTClustersMap() const