Belle II Software development
CDCCalibrationCollector.h
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
9#pragma once
10
11#include <calibration/CalibrationCollectorModule.h>
12
13#include <mdst/dataobjects/Track.h>
14#include <mdst/dataobjects/TrackFitResult.h>
15
16#include <tracking/dataobjects/RecoTrack.h>
17#include <tracking/trackFindingCDC/eventdata/tracks/CDCTrack.h>
18#include <tracking/trackFindingCDC/rootification/StoreWrappedObjPtr.h>
19#include <tracking/trackFindingCDC/topology/CDCWire.h>
20
21#include <framework/dataobjects/EventT0.h>
22#include <framework/datastore/StoreArray.h>
23
24#include <Math/Vector3D.h>
25#include <string>
26
27namespace Belle2 {
32 namespace CDC {
33
38
39 public:
40
45
50
54 void prepare() override;
55
56
60
61 void collect() override;
62
66 void finish() override;
67
68 private:
69
70
74 void harvest(Belle2::RecoTrack* track);
78 void buildEfficiencies(std::vector<unsigned short> wireHits, const Helix helixFit);
82 const TrackFindingCDC::CDCWire& getIntersectingWire(const ROOT::Math::XYZVector& xyz, const TrackFindingCDC::CDCWireLayer& layer,
83 const Helix& helixFit) const;
84
91
92 std::string m_trackArrayName;
93 std::string m_cdcHitArrayName;
94 std::string m_cdcTrackVectorName = "CDCTrackVector";
95 std::string m_recoTrackArrayName ;
98 std::string m_treeName;
99 std::string m_effTreeName;
100
101 Float_t weight;
102 Float_t alpha;
103 Float_t theta;
104 UShort_t adc;
105 Float_t t;
106 Float_t t_fit;
107 Float_t evtT0;
108 Float_t x_mea;
109 Float_t x_u;
110 Float_t x_b;
111 UChar_t lay;
112 UShort_t IWire;
113 Float_t Pval;
114 Float_t ndf;
115 Float_t d0;
116 Float_t z0;
117 Float_t phi0;
118 Float_t tanL;
119 Float_t omega;
120 double m_minimumPt = 0;
121 double m_minimumNDF = 0;
122
124 bool m_bField = true;
125 bool m_storeTrackParams = true;
127 bool m_isCosmic = false;
128 bool m_effStudy = false;
129
130 unsigned short wireID;
131 unsigned short layerID;
132 float z;
133 bool isFound;
134 };
135 }
137}
StoreObjPtr< EventT0 > m_eventTimeStoreObject
Event t0 object.
std::string m_recoTrackArrayName
Belle2::RecoTrack StoreArray name.e.
bool m_calExpectedDriftTime
Calculate expected drift time from x_fit or not.
double m_minimumNDF
minimum NDF required for track
std::string m_effTreeName
Name of efficiency tree for the output file.
std::string m_cdcTrackVectorName
Belle2::CDCTrack vectorpointer name.
bool m_storeTrackParams
Store Track parameter or not.
TrackFindingCDC::StoreWrappedObjPtr< std::vector< TrackFindingCDC::CDCTrack > > m_CDCTracks
CDC tracks.
StoreArray< TrackFitResult > m_TrackFitResults
Track fit results.
void harvest(Belle2::RecoTrack *track)
collect hit information of fitted track.
std::string m_cdcHitArrayName
Belle2::CDCHit StoreArray name.
Float_t theta
Entrance Polar angle of hit (degree).
std::string m_relRecoTrackTrackName
Relation between RecoTrack and Belle2:Track.
unsigned short wireID
wireID for hit-level wire monitoring
void collect() override
Event action, collect information for calibration.
bool m_isCosmic
true when we process cosmic events, else false (collision).
Float_t t_fit
Drift time calculated from x_fit.
bool m_eventT0Extraction
use Event T0 extract t0 or not.
void buildEfficiencies(std::vector< unsigned short > wireHits, const Helix helixFit)
fills efficiency objects
bool m_bField
fit incase no magnetic Field of not, if false, NDF=4 in cal P-value
std::string m_trackArrayName
Belle2::Track StoreArray name.
void prepare() override
Initializes the Module.
Float_t x_u
X_fit for unbiased track fit.
std::string m_trackFitResultArrayName
Belle2::TrackFitResult StoreArray name.
unsigned short layerID
layerID for hit-level wire monitoring
Float_t x_mea
measure drift length (signed by left right).
const TrackFindingCDC::CDCWire & getIntersectingWire(const ROOT::Math::XYZVector &xyz, const TrackFindingCDC::CDCWireLayer &layer, const Helix &helixFit) const
extrapolates the helix fit to a given layer and finds the wire which it would be hitting
std::string m_treeName
Name of tree for the output file.
Float_t alpha
Entrance Azimuthal angle of hit (degree).
double m_minimumPt
minimum pt required for track
bool m_effStudy
When true module collects info only necessary for wire eff study.
float z
z of hit for hit-level wire monitoring
bool isFound
flag for a hit that has been found near a track as expected by extrapolation
Helix parameter class.
Definition Helix.h:48
CalibrationCollectorModule()
Constructor. Sets the default prefix for calibration dataobjects.
This is the Reconstruction Event-Data Model Track.
Definition RecoTrack.h:79
Accessor to arrays stored in the data store.
Definition StoreArray.h:113
Type-safe access to single objects in the data store.
Definition StoreObjPtr.h:96
Class representing a sense wire layer in the central drift chamber.
Class representing a sense wire in the central drift chamber.
Definition CDCWire.h:58
This class is for convenience access and registration of objects, that are stored inside the StoreWra...
Abstract base class for different kinds of events.