Belle II Software  release-08-01-10
AllFacetRelationFilter.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 #include <tracking/trackFindingCDC/filters/facetRelation/AllFacetRelationFilter.h>
9 
10 #include <tracking/trackFindingCDC/eventdata/hits/CDCFacet.h>
11 
12 using namespace Belle2;
13 using namespace TrackFindingCDC;
14 
15 Weight AllFacetRelationFilter::operator()(const CDCFacet& fromFacet, const CDCFacet& toFacet)
16 {
17  // The last wire of the neighbor should not be the same as the start wire of the facet
18  // The default weight must be -2 because the overlap of the facets is two points
19  // so the amount of two facets is 4 points hence the cellular automat
20  // must calculate 3 + (-2) + 3 = 4 as cellstate
21  // this can of course be adjusted for a more realistic information measure
22  // ( together with the facet creator filter)
23  return fromFacet.getStartRLWireHit().isOnWire(toFacet.getEndWire()) ? NAN : -2;
24 }
Weight operator()(const CDCFacet &fromFacet, const CDCFacet &toFacet) final
Main filter method returning the weight of the neighborhood relation.
Class representing a triple of neighboring oriented wire with additional trajectory information.
Definition: CDCFacet.h:32
const CDCWire & getEndWire() const
Getter for the wire the third oriented wire hit is based on.
CDCRLWireHit & getStartRLWireHit()
Getter for the first oriented wire hit.
bool isOnWire(const CDCWire &wire) const
Checks if the oriented hit is associated with the give wire.
Definition: CDCRLWireHit.h:168
Abstract base class for different kinds of events.