 |
Belle II Software
release-05-02-19
|
10 #include <tracking/trackFindingCDC/filters/segment/AdvancedSegmentVarSet.h>
12 #include <tracking/trackFindingCDC/fitting/CDCRiemannFitter.h>
14 #include <tracking/trackFindingCDC/eventdata/segments/CDCSegment2D.h>
15 #include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
17 #include <tracking/trackFindingCDC/topology/CDCWireTopology.h>
18 #include <tracking/trackFindingCDC/topology/ISuperLayer.h>
20 #include <cdc/dataobjects/CDCHit.h>
23 using namespace TrackFindingCDC;
29 ISuperLayer iSuperLayer = segment->getISuperLayer();
34 double superLayerCenter = superLayer.getMiddleCylindricalR();
35 unsigned int size = segment->size();
37 int totalNNeighbors = 0;
38 double totalInnerDistance = 0;
39 double totalDriftLength = 0;
40 double totalDriftLengthSquared = 0;
41 double driftVariance = 0;
42 double totalADCCount = 0;
43 double totalADCCountSquared = 0;
44 double adcCountVariance;
45 unsigned int numberOfTakenHits = 0;
48 std::vector<bool> layerIsHit(8,
false);
51 const CDCWireHit& wireHit = recoHit.getWireHit();
62 totalNNeighbors += nNeighbors;
69 totalDriftLength += driftLength;
70 totalDriftLengthSquared += driftLength * driftLength;
75 totalADCCountSquared += adc * adc;
79 double driftLengthVarianceSquared = (totalDriftLengthSquared - totalDriftLength * totalDriftLength / size) / (size - 1.0) ;
80 double adcVarianceSquared = (totalADCCountSquared - totalADCCount * totalADCCount / size) / (size - 1.0) ;
82 if (driftLengthVarianceSquared > 0) {
83 driftVariance = std::sqrt(driftLengthVarianceSquared);
88 if (adcVarianceSquared > 0) {
89 adcCountVariance = std::sqrt(adcVarianceSquared);
96 adcCountVariance = -1;
99 unsigned int numberOfHitLayers = 0;
100 for (
bool hit : layerIsHit) {
110 var<
named(
"is_stereo")>() = segment->getStereoKind() != EStereoKind::c_Axial;
113 var<
named(
"number_of_taken_hits")>() = numberOfTakenHits;
115 var<
named(
"number_of_hit_layers")>() = numberOfHitLayers;
117 var<
named(
"total_number_of_neighbors")>() = totalNNeighbors;
118 var<
named(
"total_drift_length")>() = totalDriftLength;
119 var<
named(
"total_adc_count")>() = totalADCCount;
120 var<
named(
"total_inner_distance")>() = totalInnerDistance;
122 var<
named(
"variance_drift_length")>() = driftVariance;
123 var<
named(
"variance_adc_count")>() = adcCountVariance;
125 var<
named(
"distance_to_superlayer_center")>() = superLayerCenter - totalInnerDistance / size;
126 var<
named(
"superlayer_id")>() = iSuperLayer;
128 var<
named(
"mean_drift_length")>() = totalDriftLength / size;
129 var<
named(
"mean_adc_count")>() = totalADCCount / size;
130 var<
named(
"mean_inner_distance")>() = totalInnerDistance / size;
131 var<
named(
"mean_number_of_neighbors")>() = 1.0 * totalNNeighbors / size;
AutomatonCell & getAutomatonCell() const
Mutable getter for the automaton cell.
double getPValue() const
Getter for p-value.
Class implementing the Riemann fit for two dimensional trajectory circle.
A two dimensional vector which is equipped with functions for correct handeling of orientation relat...
double getRefDriftLength() const
Getter for the drift length at the reference position of the wire.
const Vector2D & getRefPos2D() const
The two dimensional reference position (z=0) of the underlying wire.
static CDCWireTopology & getInstance()
Getter for the singleton instance of the wire topology.
const CDCHit * getHit() const
Getter for the CDCHit pointer into the StoreArray.
Weight getCellWeight() const
Getter for the cell weight.
Particle trajectory as it is seen in xy projection represented as a circle.
ILayer getILayer() const
Getter for the layer id within its superlayer Gives the layer id within its superlayer ranging from ...
unsigned short getADCCount() const
Getter for integrated charge.
bool extract(const CDCSegment2D *segment) final
Generate and assign the contained variables.
Class representing a two dimensional reconstructed hit in the central drift chamber.
Abstract base class for different kinds of events.
static bool isInCDC(ISuperLayer iSuperLayer)
Indicates if the given number corresponds to a true cdc superlayer - excludes the logic ids for inner...
const CDCWireSuperLayer & getWireSuperLayer(const WireID &wireID) const
Getter for wire superlayer getter by wireID object.
bool hasTakenFlag() const
Gets the current state of the taken marker flag.
const CDCWire & getWire() const
Getter for the CDCWire the hit is located on.
Class representating a sense wire superlayer in the central drift chamber.
static const CDCRiemannFitter & getFitter()
Static getter for a general Riemann fitter.
double norm() const
Calculates the length of the vector.
A reconstructed sequence of two dimensional hits in one super layer.
constexpr static int named(const char *name)
Getter for the index from the name.
double getDist2D(const Vector2D &point) const
Calculates the distance from the point to the trajectory as seen from the xy projection.
Float_t & var()
Reference getter for the value of the ith variable. Static version.
Class representing a hit wire in the central drift chamber.
Class representating the sense wire arrangement in the whole of the central drift chamber.