9#include "cdc/modules/cdcCRTest/CDCCRTestModule.h"
11#include <framework/gearbox/Const.h>
12#include <framework/core/HistoModule.h>
13#include <framework/datastore/StoreObjPtr.h>
14#include <framework/datastore/RelationArray.h>
16#include <genfit/TrackPoint.h>
17#include <genfit/KalmanFitterInfo.h>
18#include <genfit/MeasurementOnPlane.h>
19#include <genfit/MeasuredStateOnPlane.h>
20#include <genfit/StateOnPlane.h>
21#include <boost/foreach.hpp>
23#include <cdc/translators/RealisticCDCGeometryTranslator.h>
24#include <cdc/translators/RealisticTDCCountTranslator.h>
25#include <cdc/dataobjects/CDCRecoHit.h>
26#include <cdc/dataobjects/CDCSimHit.h>
27#include "TDirectory.h"
28#include <Math/ProbFuncMathCore.h>
33using namespace genfit;
44 addParam(
"CorrectToF",
m_ToF,
"if true, time of flight will take account in t",
true);
45 addParam(
"CorrectToP",
m_ToP,
"if true, time of Propagation will take account in t",
true);
48 "Track fit results histograms will be put into this directory", std::string(
"trackfit"));
51 addParam(
"noBFit",
m_noBFit,
"If true -> #Params ==4, #params ==5 for calculate P-Val",
false);
52 addParam(
"plotResidual",
m_plotResidual,
"plot biased residual, normalized res and xtplot for all layer",
false);
56 addParam(
"TriggerPos",
m_TriggerPos,
"Trigger position use for cut and reconstruct Trigger image", std::vector<double> { -0.6, -13.25, 17.3});
58 std::vector<double> { 0, 1, 0});
59 addParam(
"TriggerSize",
m_TriggerSize,
"Trigger Size, (Width x length)", std::vector<double> {100, 50});
60 addParam(
"IwireLow",
m_low,
"Lower boundary of hit dist. Histogram", std::vector<int> {0, 0, 0, 0, 0, 0, 0, 0, 0});
61 addParam(
"IwireUpper",
m_up,
"Upper boundary of hit dist. Histogram", std::vector<int> {161, 161, 193, 225, 257, 289, 321, 355, 385});
65 "Calculate residual for Layer that is set unUseInFit",
true);
66 addParam(
"SmallerOutput",
m_SmallerOutput,
"If true, trigghit position, residual cov,absRes, will not be stored",
false);
70 addParam(
"MinimumPt",
m_MinimumPt,
"Tracks with transverse momentum smaller than this will not be recorded", 0.);
133 TDirectory* oldDir = gDirectory;
137 m_hNTracks->GetXaxis()->SetBinLabel(1,
"fitted, converged");
138 m_hNTracks->GetXaxis()->SetBinLabel(2,
"fitted, not converged");
139 m_hNTracks->GetXaxis()->SetBinLabel(3,
"TrackCand, but no Track");
141 m_hNDF =
getHist(
"hNDF",
"NDF of fitted track;NDF;Tracks", 71, -1, 150);
142 m_hNHits =
getHist(
"hNHits",
"#hit of fitted track;#hit;Tracks", 61, -1, 150);
146 m_hChi2 =
getHist(
"hChi2",
"#chi^{2} of tracks;#chi^{2};Tracks", 400, 0, 400);
147 m_hPhi0 =
getHist(
"hPhi0",
"#Phi_{0} of tracks;#phi_{0} (Degree);Tracks", 400, -190, 190);
148 m_hAlpha =
getHist(
"hAlpha",
"#alpha Dist.;#alpha (Degree);Hits", 360, -90, 90);
149 m_hTheta =
getHist(
"hTheta",
"#theta Dist.;#theta (Degree);Hits", 360, 0, 180);
150 m_hPval =
getHist(
"hPval",
"p-values of tracks;pVal;Tracks", 1000, 0, 1);
151 m_hEvtT0 =
getHist(
"hEvtT0",
"Event T0; EvtT0 (ns); #event", 200, -100, 100);
153 m_hTriggerHitZX =
getHist(
"TriggerHitZX",
"Hit Position on trigger counter;z(cm);x(cm)", 300, -100, 100, 120, -15, 15);
163 m_hNDFChi2 =
getHist(
"hNDFChi2",
"#chi^{2} of tracks;NDF;#chi^{2};Tracks", 8, 0, 8, 800, 0, 200);
164 m_hNDFPval =
getHist(
"hNDFPval",
"p-values of tracks;NDF;pVal;Tracks", 8, 0, 8, 100, 0, 1);
167 for (
int i = 0; i < 56; ++i) {
170 Form(
"hit efficiency(soft) of Layer %d ;Drift distance;Software Efficiency", i), 200, -1, 1);
173 if (i < 8) {sl = 0;}
else { sl = floor((i - 8) / 6) + 1;}
183 const double normResRange = 20;
184 const double residualRange = 0.3;
185 std::string title, name;
187 name = (boost::format(
"hist_ResidualsU%1%") % i).str();
188 title = (boost::format(
"unnormalized, unbiased residuals in layer %1%;cm;Tracks") % i).str();
191 name = (boost::format(
"hNormalizedResidualsU%1%") % i).str();
192 title = (boost::format(
"normalized, unbiased residuals in layer %1%;NDF;#sigma (cm);Tracks") % i).str();
195 name = (boost::format(
"DxDt%1%") % i).str();
196 title = (boost::format(
"Drift Length vs Drift time at Layer_%1%;Drift Length (cm);Drift time (ns)") % i).str();
200 name = (boost::format(
"hNDFResidualsU%1%") % i).str();
201 title = (boost::format(
"unnormalized, unbiased residuals along U in layer %1%;NDF;cm;Tracks") % i).str();
204 name = (boost::format(
"hNDFNormalizedResidualsU%1%") % i).str();
205 title = (boost::format(
"normalized, unbiased residuals in layer %1%;NDF;#sigma (cm);Tracks") % i).str();
226 B2ASSERT(
"Trigger Position (TriggerPos) must be 3 components.",
m_TriggerPos.size() == 3);
227 B2ASSERT(
"Normal vector of Trigger Plane (NormTriggerPlaneDirection) must be 3 components.",
m_TriggerPlaneDirection.size() == 3);
228 B2ASSERT(
"Trigger size (TriggerSize) must be 2 component width and length(z direction)",
m_TriggerSize.size() == 2);
229 B2ASSERT(
"List of Lower boundary (IWireLow) ( for histo must be 9 components, equivalent 9 supper layers",
m_low.size() == 9);
230 B2ASSERT(
"List of Upper boundary (IWireUp) for histo must be 9 components, equivalent 9 supper layers",
m_low.size() == 9);
245 for (
int i = 0; i <
m_CDCHits.getEntries(); ++i) {
257 for (
int i = 0; i < nTr; ++i) {
259 if (track->getDirtyFlag()) {B2INFO(
"Dirty flag was set for track: " << track->getPositionSeed().Y());
continue;}
264 if (!track->hasTrackFitStatus()) {
268 const genfit::FitStatus* fs = track->getTrackFitStatus();
269 if (!fs || !fs->isFitted()) {
273 if (!fs->isFitConverged()) {
274 m_hNTracks->Fill(
"fitted, not converged", 1.0);
275 B2DEBUG(99,
"------Fitted but not converged");
280 B2DEBUG(99,
"-------Fitted and Converged");
282 nfitted = nfitted + 1;
285 if (!b2track) {B2DEBUG(99,
"No relation found");
continue;}
289 B2WARNING(
"track was fitted but Relation not found");
294 else {
ndf = fs->getNdf();}
295 double Chi2 = fs->getChi2();
296 TrPval = std::max(0., ROOT::Math::chisquared_cdf_c(Chi2,
ndf));
299 if (
ndf < 15)
continue;
326 }
catch (
const genfit::Exception& e) {
328 B2ERROR(
"Exception when calling the plotResults method" << e.what());
367 m_hNHits->Fill(track->getNumberOfCDCHits());
369 std::vector<genfit::TrackPoint*> tps = track->getHitPointsWithMeasurement();
371 BOOST_FOREACH(genfit::TrackPoint * tp, tps) {
372 if (!tp->hasRawMeasurements())
375 const genfit::AbsMeasurement* raw = tp->getRawMeasurement(0);
379 const genfit::KalmanFitterInfo* kfi = tp->getKalmanFitterInfo();
380 if (!kfi) {B2DEBUG(199,
"No Fitter Info: Layer " << wireid.getICLayer());
continue;}
382 for (
unsigned int iMeas = 0; iMeas < kfi->getNumMeasurements(); ++iMeas) {
383 if ((kfi->getWeights().at(iMeas)) > 0.5) {
384 const genfit::MeasurementOnPlane& residual_b = kfi->getResidual(iMeas,
true);
385 const genfit::MeasurementOnPlane& residual_u = kfi->getResidual(iMeas,
false);
386 lay = wireid.getICLayer();
387 IWire = wireid.getIWire();
397 const genfit::MeasuredStateOnPlane& mop = kfi->getFittedState();
398 const B2Vector3D pocaOnWire = mop.getPlane()->getO();
403 x_mea = kfi->getMeasurementOnPlane(iMeas)->getState()(0);
404 x_b = kfi->getFittedState(
true).getState()(3);
405 res_b = residual_b.getState()(0);
406 x_u = kfi->getFittedState(
false).getState()(3);
407 res_u = residual_u.getState()(0);
410 if (fabs(
alpha) > M_PI / 2) {
420 B2DEBUG(199,
"x_unbiased " <<
x_u <<
" |left_right " <<
lr);
431 weight = residual_u.getWeight();
432 res_b_err = std::sqrt(residual_b.getCov()(0, 0));
433 res_u_err = std::sqrt(residual_u.getCov()(0, 0));
469 B2DEBUG(99,
"In TrackCand: ICLayer: " << iclay <<
"IWire: " << cdchit->
getIWire());
479 const genfit::AbsTrackRep* trackRepresentation = track->getCardinalRepresentation();
482 genfit::MeasuredStateOnPlane mop = track->getMeasuredStateOnPlaneClosestTo(ROOT::Math::XYZVector(trigpos), trackRepresentation);
483 double l = mop.extrapolateToPlane(genfit::SharedPlanePtr(
new genfit::DetPlane(trigpos, trigDir)));
484 if (fabs(l) < 1000) pos = mop.getPos();
485 }
catch (
const genfit::Exception& er) {
486 B2WARNING(
"extrapolate to Trigger counter failure" << er.what());
487 }
catch (
const std::runtime_error& er) {
488 B2WARNING(
"Runtime error encountered: " << er.what());
490 B2WARNING(
"Undefined exception encountered.");
508 const genfit::TrackPoint* tp = track->getCreatedTrackPoint(track->getRecoHitInformation(cdchit));
512 if (rightLeftHitInformation == RecoHitInformation::RightLeftInformation::c_left) {
514 }
else if (rightLeftHitInformation == RecoHitInformation::RightLeftInformation::c_right) {
518 if (!tp->hasRawMeasurements())
520 const genfit::KalmanFitterInfo* kfi = tp->getKalmanFitterInfo();
525 unsigned short imea = 0;
526 for (
unsigned int iMeas = 0; iMeas < kfi->getNumMeasurements(); ++iMeas) {
527 double ww = kfi->getWeights().at(iMeas);
528 if (ww > max) {max = ww; imea = iMeas;}
530 double xx = kfi->getMeasurementOnPlane(imea)->getState()(0);
538 B2INFO(
"Start estimate residual for un-fitted layer");
539 B2INFO(
"position seed" << track->getPositionSeed().Y());
542 const genfit::AbsTrackRep* trackRepresentation = track->getCardinalRepresentation();
550 B2INFO(
"number of cdchit" << track->getCDCHitList().size());
551 B2INFO(
"number of point use int fit" <<
ndf + 4);
553 typedef std::pair<double, const RecoHitInformation*> SortingRecoHitPair;
557 if (track->getRecoHitInformation(cdchit)->useInFit())
continue;
561 int hitSortingParameter = track->getRecoHitInformation(cdchit)->getSortingParameter();
563 SortingRecoHitPair frontSideHit = std::make_pair(0,
nullptr);;
564 SortingRecoHitPair backsideSideHit = std::make_pair(0,
nullptr);;
565 SortingRecoHitPair hit4extraction;
578 auto hitListReverse = track->getCDCHitList();
579 std::reverse(hitListReverse.begin(), hitListReverse.end());
588 B2DEBUG(99,
"forward sorting parameter: " << frontSideHit.first <<
" |backward sorting parameter = " << backsideSideHit.first);
589 if (std::fabs(frontSideHit.first - hitSortingParameter) < std::fabs(backsideSideHit.first - hitSortingParameter)) {
590 hit4extraction = frontSideHit;
592 hit4extraction = backsideSideHit;
596 if (hit4extraction.second ==
nullptr)
599 auto closestHitTrackPoint = track->getCreatedTrackPoint(hit4extraction.second);
602 genfit::MeasuredStateOnPlane meaOnPlane = closestHitTrackPoint->getFitterInfo(trackRepresentation)->getFittedState(
609 genfit::SharedPlanePtr plane =
nullptr;
612 }
catch (
const genfit::Exception& e) {
613 B2WARNING(
"Error happen, can not reconstruct plan for extrapolating" << e.what());
616 double segmentLength;
618 segmentLength = meaOnPlane.extrapolateToPlane(plane);
619 }
catch (
const genfit::Exception& e) {
620 B2WARNING(
"Could not extrapolate the fit" << e.what());
623 IWire = wireid.getIWire();
624 lay = wireid.getICLayer();
625 const B2Vector3D pocaOnWire = meaOnPlane.getPlane()->getO();
626 const B2Vector3D pocaMom = meaOnPlane.getMom();
627 x_u = meaOnPlane.getState()(3);
636 if (fabs(
alpha) > M_PI / 2) {
659 B2DEBUG(199,
"we calculate residua for lay - IWire: " <<
lay <<
" - " <<
IWire);
660 B2DEBUG(199,
"distance between two hit" << segmentLength);
662 B2DEBUG(199,
"DriftLength (cal | sim)" <<
x_mea <<
" - " <<
x_sim);
674 const StateOnPlane stateOnPlane = StateOnPlane(state.getState(), state.getPlane(), state.getRep());
675 genfit::StateOnPlane st(stateOnPlane);
681 B2Vector3D WireDirectionIdeal = Wire2PosIdeal - Wire1PosIdeal;
682 WireDirectionIdeal.
SetMag(1.);
685 const genfit::AbsTrackRep* rep = state.getRep();
686 rep->extrapolateToLine(st, Wire1PosIdeal, WireDirectionIdeal);
687 const B2Vector3D& PocaIdeal = rep->getPos(st);
689 double zPOCA = (Wire1PosIdeal.
Z()
690 + WireDirectionIdeal.
Dot(PocaIdeal - Wire1PosIdeal) * WireDirectionIdeal.
Z());
701 rep->extrapolateToLine(st, wire1, wireDirection);
705 const B2Vector3D& pocaOnWire = wire1 + wireDirection.
Dot(poca - wire1) * wireDirection;
706 if (fabs(wireDirection.
Angle(dirInPoca)) < 0.01) {
707 B2WARNING(
"cannot construct det plane, track parallel with wire");
711 genfit::SharedPlanePtr pl = genfit::SharedPlanePtr(
new genfit::DetPlane(pocaOnWire, U, wireDirection));
void SetMag(DataType mag)
Set magnitude keeping theta and phi constant.
DataType Z() const
access variable Z (= .at(2) without boundary check)
B2Vector3< DataType > Cross(const B2Vector3< DataType > &p) const
Cross product.
DataType X() const
access variable X (= .at(0) without boundary check)
DataType Y() const
access variable Y (= .at(1) without boundary check)
DataType Dot(const B2Vector3< DataType > &p) const
Scalar product.
DataType Angle(const B2Vector3< DataType > &q) const
The angle w.r.t.
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
unsigned short getIWire() const
Getter for iWire.
short getTDCCount() const
Getter for TDC count.
unsigned short getID() const
Getter for encoded wire number.
unsigned short getADCCount() const
Getter for integrated charge.
unsigned short getISuperLayer() const
Getter for iSuperLayer.
unsigned short getILayer() const
Getter for iLayer.
This class is used to transfer CDC information to the track fit.
WireID getWireID() const
Getter for WireID object.
const CDCHit * getCDCHit() const
get the pointer to the CDCHit object that was used to create this CDCRecoHit object.
double getFlightTime() const
The method to get flight time.
B2Vector3D getPosWire() const
The method to get position on wire.
double getDriftLength() const
The method to get drift length.
StoreObjPtr< EventT0 > m_eventTimeStoreObject
Event timing.
std::string m_recoTrackArrayName
Belle2::RecoTrack StoreArray nam.e.
double m_MinimumPt
Minimum Transverse momentum of tracks.
int numhits
Number of hits.
TProfile * getHistProfile(const char *name, const char *title, int nBins, double x0, double x1)
Create profile plot.
int trighit
Trigger hit information.
bool m_calExpectedDriftTime
Calculate expected drift time from x_fit or not.
double x_sim
Simulation DriftLength .
TTree * m_tree
Output tree recording the information of each hit.
double res_b
Biased residual.
double alpha
Entrance Azimuthal angle of hit (degree).
void getHitDistInTrackCand(const RecoTrack *track)
Make hit distribution from track candidate.
TH1 * m_hNHits
Number of Hits per track.
bool m_plotResidual
Process track to get the hit information of fitted track.
double res_u_err
Unbiased residual error.
TH1 * m_hNHits_trackcand
Number of Hits per trackCand.
B2Vector3D m_trigHitPos
Trigger position.
void initialize() override
Initializes the Module.
int getICLayer(int slayer, int ilayer)
Convert slayer and ilayer to iclayer.
StoreArray< TrackFitResult > m_TrackFitResults
Track fit results.
double absRes_b
absolute value of biased residual.
bool m_StoreTrackParams
Store Track parameter or not.
void event() override
Event action (main routine).
double dt_flight
Time of flight.
bool m_SmallerOutput
make output smaller by ignore some variable.
void HitEfficiency(const Belle2::RecoTrack *track)
Cal Hit eff.
TH1 * m_hHitDistInTrack[56]
Hit Dist.
std::string m_cdcHitArrayName
Belle2::CDCHit StoreArray name.
void endRun() override
End run action.
double res_u
Unbiased residual.
TH1 * m_hPhi0
Phi0 of ttrack, see Helix.
void terminate() override
Termination action.
TH1 * m_hNormalizedResidualU[56]
Residual distribution normalized with tracking error.
TH1 * m_hNTracks
Number of track fitted, Convergence, not conv, not fit.
TH1 * m_hHitDistInCDCHit[56]
Hit Dist.
double z0
Track Parameter, z0.
bool m_hitEfficiency
calculate hit eff or not, Haven't finished.
std::string m_relRecoTrackTrackName
Relation between RecoTrack and Belle2:Track.
std::vector< int > m_low
lower channel list for each board.
void plotResults(Belle2::RecoTrack *track)
Plot track parameters and related variables.
const genfit::SharedPlanePtr constructPlane(const genfit::MeasuredStateOnPlane &state, WireID m_wireID)
Construct a plane for the hit.
TH2 * m_hNDFNormalizedResidualU[56]
Normalized residual vs.
double Pval
P-value of fitted track.
double z_prop
Propagation Length along the sense wire.
double res_b_err
Biased residual error.
double t
Measurement Drift time.
TH2 * m_hNDFPval
Degree-of-freedom vs Probability histo.
TH1 * m_hTheta
Theta of each Hit.
TH1 * m_hNTracksPerEvent
Number of TrackCand per Event.
void beginRun() override
Begin run action.
std::string m_histogramDirectoryName
subdir where to place the histograms.
void getResidualOfUnFittedLayer(Belle2::RecoTrack *track)
Calculate residual for Layers which didn't use int fitting.
double omega
Track Parameter, omega.
double weight
Weight of hit.
double Pt
Transverse momentum.
double x_b
X_fit for biased track fit.
double t_fit
Drift time calculated from x_fit.
bool m_fillExpertHistos
Fill some histogram for monitoring fit quality.
TH1 * m_hAlpha
Alpha of each Hit.
std::string m_trackArrayName
Belle2::Track StoreArray name.
double z_sim
Z of hit on wire (simulation).
const Belle2::TrackFitResult * fitresult
Track fit result.
double TrPval
P-value of fitted track.
bool m_MakeHitDist
Switch to make histograms of hit distribution.
TH2 * m_hNDFChi2
Chi2 vs degree-of-freedom histo.
virtual ~CDCCRTestModule()
Destructor.
bool m_noBFit
fit incase no magnetic Field of not, if true, NDF=4 in cal P-value
bool m_EstimateResultForUnFittedLayer
Calculate residual for layer that we do not use in track fitting.
int boardID
Electrical Board ID.
double z
Z of hit on wire.
std::vector< TH1 * > m_allHistos
A list of 1d histograms.
TProfile * m_hHitEff_soft[56]
Hit efficience of each layer, software.
TH2 * m_h2DHitDistInTrack
2D Hit Dist..(ICLay vs IWire) have weight>0.5 after fit with DAF
double trigHitPos_x
X-position of track at trigger counter.
std::string m_trackFitResultArrayName
Belle2::TrackFitResult StoreArray name.
double dt_prop
Time of propagation.
bool m_ToP
Enable to correct ToP if true.
double x_u
X_fit for unbiased track fit.
double theta
Entrance Polar angle of hit (degree).
std::vector< int > m_up
upper channel list for each board.
TH1 * m_hNTracksPerEventFitted
Number of TrackCand per Event.
bool m_ToF
Enable to correct ToF if true.
CDCCRTestModule()
Constructor.
TH1 * m_hPval
Fit Probability histo.
B2Vector3D getTriggerHitPosition(Belle2::RecoTrack *track)
extrapolation track to trigger counter plane (y position).
std::string m_treeName
Name of tree for the output file.
double d0
Track Parameter, d0.
StoreArray< RecoTrack > m_RecoTracks
Tracks.
TH1 * m_hHitDistInTrCand[56]
Hit Dist.
StoreArray< Track > m_Tracks
Tracks.
TH2 * m_h2DHitDistInTrCand
2D Hit Dist.
std::vector< double > m_TriggerPlaneDirection
Nominal center position of trigger counter.
TH2 * m_hDxDt[56]
Unbiased x_fit vs.
TH2 * m_hNDFResidualU[56]
Residual vs.
double tanL
Track Parameter, tanL.
unsigned short adc
adc value.
bool m_StoreCDCSimHitInfo
Store CDCSimHit Information.
double phi0
Track Parameter, phi0.
double trigHitPos_z
Z-position of track at trigger counter.
std::vector< double > m_TriggerPos
Nominal center position of trigger counter.
bool m_EventT0Extraction
use Event T0 extract t0 or not.
double ndf
degree of freedom.
double absRes_u
absolute value of unbiased residual.
TH1 * m_hNDF
Number of Degree Freedom.
TH1 * m_hResidualU[56]
Residual distribution (in cm)
TH2 * m_hTriggerHitZX
Trigger hit image.
std::vector< double > m_TriggerSize
Size of trigger counter (Width x length).
TH2 * m_h2DHitDistInCDCHit
2D Hit Dist.
TH1 * getHist(const char *name, const char *title, int nBins, double x0, double x1)
Create 1D histogram.
double dt_flight_sim
Time of flight (Simulation).
void defineHisto() override
Histogram definitions such as TH1(), TH2(), TNtuple(), TTree()....
StoreArray< CDCHit > m_CDCHits
CDC hits.
double x_mea
measure drift length (signed by left right).
The Class for CDC Geometry Parameters.
double getTheta(const B2Vector3D &momentum) const
Returns track incident angle (theta in rad.).
unsigned short getBoardID(const WireID &wID) const
Returns frontend board id. corresponding to the wire id.
double getAlpha(const B2Vector3D &posOnWire, const B2Vector3D &momentum) const
Returns track incident angle in rphi plane (alpha in rad.).
const B2Vector3D wireBackwardPosition(uint layerId, int cellId, EWirePosition set=c_Base) const
Returns the backward position of the input sense wire.
double getOutgoingAlpha(const double alpha) const
Converts incoming- to outgoing-alpha.
unsigned short getOutgoingLR(const unsigned short lr, const double alpha) const
Converts incoming-lr to outgoing-lr.
double getOutgoingTheta(const double alpha, const double theta) const
Converts incoming- to outgoing-theta.
double getDriftTime(double dist, unsigned short layer, unsigned short lr, double alpha, double theta) const
Return the drift time to the sense wire.
static CDCGeometryPar & Instance(const CDCGeometry *=nullptr)
Static method to get a reference to the CDCGeometryPar instance.
This class uses the realistic detector geometry (the one after alignment procedure) for the translati...
const B2Vector3D getWireBackwardPosition(const WireID &wireID) override
Get wire position at backward end.
const B2Vector3D getWireForwardPosition(const WireID &wireID) override
Get wire position at forward end.
Translator mirroring the realistic Digitization.
double getDriftLength(unsigned short tdcCount, const WireID &wireID=WireID(), double timeOfFlightEstimator=0, bool leftRight=false, double z=0, double alpha=0, double theta=static_cast< double >(TMath::Pi()/2.), unsigned short adcCount=0) override
Get Drift length.
double getDriftTime(unsigned short tdcCount, const WireID &wireID, double timeOfFlightEstimator, double z, unsigned short adcCount) override
Get Drift time.
static const ChargedStable muon
muon particle
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
void setDescription(const std::string &description)
Sets the description of the module.
void setPropertyFlags(unsigned int propertyFlags)
Sets the flags for the module properties.
@ c_ParallelProcessingCertified
This module can be run in parallel processing mode safely (All I/O must be done through the data stor...
This is the Reconstruction Event-Data Model Track.
Low-level class to create/modify relations between StoreArrays.
T * getRelated(const std::string &name="", const std::string &namedRelation="") const
Get the object to or from which this object has a relation.
const std::string & getName() const
Return name under which the object is saved in the DataStore.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
int getEntries() const
Get the number of objects in the array.
double getOmega() const
Getter for omega.
double getD0() const
Getter for d0.
double getTanLambda() const
Getter for tanLambda.
double getZ0() const
Getter for z0.
ROOT::Math::XYZVector getMomentum() const
Getter for vector of momentum at closest approach of track in r/phi projection.
double getPhi0() const
Getter for phi0.
Class that bundles various TrackFitResults.
const TrackFitResult * getTrackFitResult(const Const::ChargedStable &chargedStable) const
Default Access to TrackFitResults.
Class to identify a wire inside the CDC.
unsigned short getICLayer() const
Getter for continuous layer numbering.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.