9#include <tracking/modules/mcTrackCandClassifier/MCTrackCandClassifierModule.h>
11#include <pxd/dataobjects/PXDTrueHit.h>
12#include <svd/dataobjects/SVDTrueHit.h>
13#include <vxd/geometry/GeoCache.h>
15#include <framework/geometry/B2Vector3.h>
16#include <framework/geometry/BFieldManager.h>
27 , m_rootFilePtr(nullptr)
30 setDescription(
"This module is meant to classify the MCTrackCands as either ideal, fine and nasty");
34 "Name of MC Particle collection.",
38 "Name of the input collection of MC track candidates",
42 "Name of the root file",
43 std::string(
"MCTrackCandClassifier.root"));
46 "Require that the hit is in the expected annulus",
49 "Require that the hit is in the expected semiplane",
52 "Require that the hit belong to the first lap in the transverse plane",
55 "Require that the hit belong to the barrel part of the SVD",
58 "Remove the clusters that do not satisfy the criteria from the idealMCTrackCands",
62 "Minimum number of 1D Clusters to classify the MCTrackCand as ideal",
90 Double_t bins_pt[9 + 1] = {0, 0.05, 0.1, 0.15, 0.2, 0.3, 0.5, 1, 2, 3.5};
91 const Double_t bins_theta[10 + 1] = {0, 0.25, 0.5, 0.75, 0.75 + 0.32, 0.75 + 2 * 0.32, 0.75 + 3 * 0.32, 0.75 + 4 * 0.32, 0.75 + 5 * 0.32, 2.65, TMath::Pi()};
92 Double_t bins_lambda[10 + 1];
93 const Double_t width_lambda = TMath::Pi() / 10;
94 Double_t bins_phi[14 + 1];
95 const Double_t width_phi = 2 * TMath::Pi() / 14;
96 for (
int bin = 0; bin < 14 + 1; bin++)
97 bins_phi[bin] = - TMath::Pi() + bin * width_phi;
99 for (
int bin = 0; bin < 10 + 1; bin++) {
100 bins_lambda[bin] = - TMath::Pi() / 2 + bin * width_lambda;
101 B2DEBUG(21, bins_lambda[bin] <<
" " << bins_theta[bin]);
105 9, bins_pt,
"p_{t} (GeV/c)",
106 10, bins_lambda,
"#lambda",
107 14, bins_phi,
"#phi" );
110 "entry per idealMCTrackCand",
114 "entry per MCTrackCand",
118 m_h1_thetaMS_SVD =
new TH1F(
"h1thetaMS_SVD",
"Multiple Scattering Angle (SVD)", 500, 0, 500);
124 m_h1_dR =
new TH1F(
"h1dR",
"dR, annulus half width", 1000, 0, 5);
126 m_h1_dR->GetXaxis()->SetTitle(
"dR (cm)");
128 m_h1_dRoverR =
new TH1F(
"h1dRoverR",
"dR over helix radius", 1000, 0, 0.1);
132 m_h1_distOVERdR =
new TH1F(
"h1distOVERdR",
"(hit radius - helix radius)/dR", 100, -5, 5);
152 m_h1_lapTime =
new TH1F(
"h1LapTime",
"lap time", 200, 0, 100);
158 m_h1_diffOVERlap =
new TH1F(
"h1HitDiffOVERlap",
"Hit Time Difference over Lap Time",
163 m_h1_nGoodTrueHits =
new TH1F(
"h1nTrueHitsGoods",
"Number of True Hits for Accepted Tracks", 20, 0, 20);
167 m_h1_nBadTrueHits =
new TH1F(
"h1nTrueHitsBads",
"Number of True Hits for Rejected Tracks", 10, 0, 10);
171 m_h1_nGood1dInfo =
new TH1F(
"h1nGood1Dinfo",
"Number of 1D Info for Accepted Tracks", 20, 0, 20);
175 m_h1_nBad1dInfo =
new TH1F(
"h1nBad1Dinfo",
"Number of 1D Info for Rejected Tracks", 20, 0, 20);
203 B2DEBUG(21,
"+++++ 1. loop on MCTrackCands");
210 int nGoodTrueHits = 0;
213 B2DEBUG(21,
" a NEW MCTrackCand ");
218 B2DEBUG(21,
"~~~ " << MCParticles_fromMCTrackCand.
size() <<
" MCParticles related to this MCTrackCand");
219 for (
int mcp = 0; mcp < (int)MCParticles_fromMCTrackCand.
size(); mcp++) {
221 MCParticle mcParticle = *MCParticles_fromMCTrackCand[mcp];
223 B2DEBUG(21,
" a NEW charged MC Particle, " << mcParticle.
getIndex() <<
", " << mcParticle.
getPDG());
228 ROOT::Math::XYZVector mom = mcParticle.
getMomentum();
230 double omega = mcParticleInfo.
getOmega();
233 double pt = mom.Rho();
234 double x = decayVertex.
X();
235 double y = decayVertex.
Y();
236 double R = 1 / abs(omega);
240 double alpha =
R / pt * charge;
241 double Cx = x + alpha * py;
242 double Cy = y - alpha * px;
244 ROOT::Math::XYZVector center(Cx, Cy, 0);
247 int Nhits = mcTrackCand.getNHits();
251 bool hasTrueHit =
true;
252 bool isAccepted =
true;
253 int firstRejectedHit = Nhits + 1;
254 double prevHitRadius = abs(1 / omega);
257 double FirstHitTime = -1;
260 bool isFirstSVDhit =
true;
262 while (cluster < Nhits && isAccepted && hasTrueHit) {
264 mcTrackCand.getHit(cluster, detId, hitId);
266 bool hasPXDCluster =
false;
267 bool hasSVDuCluster =
false;
268 bool hasSVDvCluster =
false;
276 if (detId == Const::PXD &&
m_usePXD) {
280 if (PXDTrueHit_fromPXDCluster.
size() == 0) {
281 B2WARNING(
"What's happening?!? no True Hit associated to the PXD Cluster");
287 PXDTrueHit* aPXDTrueHit = PXDTrueHit_fromPXDCluster[0];
291 uCoor = aPXDTrueHit->
getU();
292 vCoor = aPXDTrueHit->
getV();
296 HitTime = FirstHitTime;
300 hasPXDCluster =
true;
301 }
else if (detId == Const::SVD) {
304 if (SVDTrueHit_fromSVDCluster.
size() == 0) {
305 B2WARNING(
"What's happening?!? no True Hit associated to the SVD Cluster");
311 SVDTrueHit* aSVDTrueHit = SVDTrueHit_fromSVDCluster[0];
316 uCoor = aSVDTrueHit->
getU();
317 vCoor = aSVDTrueHit->
getV();
321 HitTime = FirstHitTime;
322 isFirstSVDhit =
false;
327 hasSVDuCluster =
true;
329 hasSVDvCluster =
true;
336 bool accepted4 =
true;
345 ROOT::Math::XYZVector globalHit = aSensorInfo.
pointToGlobal(ROOT::Math::XYZVector(uCoor, vCoor, 0),
true);
348 bool accepted1 =
true;
353 B2DEBUG(21,
" semiplane: ACCEPTED");
355 B2DEBUG(21,
" semiplane: REJECTED, next track");
364 bool accepted2 =
true;
366 accepted2 =
isInAnnulus(hitRadius, prevHitRadius, dR);
368 prevHitRadius = hitRadius;
371 B2DEBUG(21,
" annulus: ACCEPTED");
373 B2DEBUG(21,
" annulus: REJECTED, next track");
376 bool accepted3 =
true;
378 accepted3 =
isFirstLap(FirstHitTime, HitTime, lapTime);
381 B2DEBUG(21,
" lapTime: ACCEPTED");
383 B2DEBUG(21,
" lapTime: REJECTED, next track");
386 if (accepted2 && accepted1 && accepted3 && accepted4) {
394 firstRejectedHit = cluster;
407 if (hasPXDCluster || hasSVDuCluster || hasSVDvCluster)
408 B2DEBUG(21,
"cluster: ACCEPTED (" << nGood1Dinfo <<
")");
414 B2DEBUG(21,
" idealMCTrackCand FOUND!! " << nGood1Dinfo <<
" 1D infos (" << nGoodTrueHits <<
" good true hits)");
419 genfit::TrackCand* tmpTrackCand =
new genfit::TrackCand(mcTrackCand);
421 if ((
int)firstRejectedHit <= (
int)mcTrackCand.getNHits()) {
422 tmpTrackCand->reset();
423 for (
int hit = 0; hit < firstRejectedHit; hit++)
424 if (mcTrackCand.getHit(hit))
425 tmpTrackCand->addHit(mcTrackCand.getHit(hit));
426 tmpTrackCand->sortHits();
433 B2DEBUG(21,
" too few good hits (" << nGood1Dinfo <<
") to track this one ( vs " << nGoodTrueHits <<
" true hits)");
446 B2INFO(
"** MCTrackCandClassifier parameters **");
448 B2INFO(
"use PXD information = " <<
m_usePXD);
449 B2INFO(
"--> classification criteria:");
451 B2INFO(
" -) |d - R| < " <<
m_nSigma <<
" dL thetaMS");
453 B2INFO(
" -) hit in the expected semiplane");
455 B2INFO(
" -) HitTime < " <<
m_fraction <<
" lap time");
457 B2INFO(
" -) hit must be in the barrel part of the VXD");
465 double efficiency = num / den ;
466 double efficiencyErr =
sqrt(efficiency * (1 - efficiency)) /
sqrt(den);
469 B2INFO(
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
470 B2INFO(
"~ MCTrackCandClassifier ~ SHORT SUMMARY ~");
472 B2INFO(
" + overall:");
473 B2INFO(
" fraction of ideal MCTrackCands = (" << efficiency * 100 <<
" +/- " << efficiencyErr * 100 <<
")% ");
475 B2INFO(
" # idealMCTrackCand = " << num);
476 B2INFO(
" # MCTrackCand = " << den);
477 B2INFO(
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
479 B2DEBUG(21,
" nWedge = " <<
nWedge);
480 B2DEBUG(21,
" nBarrel = " <<
nBarrel);
494 while ((obj = nextH()))
504 ROOT::Math::XYZVector err = center - vertex;
506 double semiPlane = err.Y() / err.X() * hit.X() + err.Y() / err.X() * vertex.x() - vertex.Y();
509 B2DEBUG(21,
" SEMI-PLANE defined by: y + " << err.Y() / err.X() <<
" x + " << err.Y() / err.X()*vertex.x() - vertex.Y() <<
" = 0");
510 B2DEBUG(21,
" with: center(" << center.X() <<
"," << center.Y() <<
")");
511 B2DEBUG(21,
" decayV(" << vertex.X() <<
"," << vertex.Y() <<
")");
512 B2DEBUG(21,
" vector(" << err.X() <<
"," << err.Y() <<
")");
513 B2DEBUG(21,
" y SLOPE = " <<
semiPlane <<
" VS y HIT = " << hit.Y());
514 B2DEBUG(21,
" HIT - SLOPE = " << -
semiPlane + hit.Y());
516 if (vertex.X() < center.X())
534 double xSquared = TMath::Power(center.X() - hit.X(), 2);
535 double ySquared = TMath::Power(center.Y() - hit.Y(), 2);
537 return TMath::Sqrt(xSquared + ySquared);
543 bool accepted =
false;
546 B2DEBUG(21,
" ANNULUS defined between radii: " <<
R - dR <<
" and " <<
R + dR);
547 B2DEBUG(21,
" hit distance = " << hitDistance);
548 B2DEBUG(21,
" helix radius = " <<
R);
549 B2DEBUG(21,
" dR = " << dR);
551 if ((hitDistance >
R - dR) && (hitDistance <
R + dR))
560 bool accepted =
false;
563 B2DEBUG(21,
" lapTime: " << LapTime);
564 B2DEBUG(21,
" FirstHitTime = " << FirstHitTime);
565 B2DEBUG(21,
" HitTime = " << HitTime);
566 B2DEBUG(21,
" difference = " << HitTime - FirstHitTime);
572 if (HitTime - FirstHitTime <
m_fraction * LapTime)
580 Int_t nbinsX, Double_t minX, Double_t maxX,
582 Int_t nbinsY, Double_t minY, Double_t maxY,
584 Int_t nbinsZ, Double_t minZ, Double_t maxZ,
588 TH3F* h =
new TH3F(name, title, nbinsX, minX, maxX, nbinsY, minY, maxY, nbinsZ, minZ, maxZ);
590 h->GetXaxis()->SetTitle(titleX);
591 h->GetYaxis()->SetTitle(titleY);
592 h->GetZaxis()->SetTitle(titleZ);
602 Int_t nbinsX, Double_t* binsX,
604 Int_t nbinsY, Double_t* binsY,
606 Int_t nbinsZ, Double_t* binsZ,
610 TH3F* h =
new TH3F(name, title, nbinsX, binsX, nbinsY, binsY, nbinsZ, binsZ);
612 h->GetXaxis()->SetTitle(titleX);
613 h->GetYaxis()->SetTitle(titleY);
614 h->GetZaxis()->SetTitle(titleZ);
624 TH1* h, TList* histoList)
626 TH1F* h1 =
dynamic_cast<TH1F*
>(h);
627 TH2F* h2 =
dynamic_cast<TH2F*
>(h);
628 TH3F* h3 =
dynamic_cast<TH3F*
>(h);
633 newh =
new TH1F(*h1);
635 newh =
new TH2F(*h2);
637 newh =
new TH3F(*h3);
639 if (newh ==
nullptr) {
640 B2ERROR(
"In function duplicateHistogram: newh is a nullptr. This shouldn't happen."\
641 "Don't continue creation of duplicate histogram in this case and return nullptr.");
645 newh->SetName(newname);
646 newh->SetTitle(newtitle);
649 histoList->Add(newh);
660 histoList->Add(h_effMCTC_pt);
664 histoList->Add(h_effMCTC_theta);
668 histoList->Add(h_effMCTC_phi);
677 histoList->Add(h_ineffMCTC_pt);
679 TH1F* h_ineffMCTC_theta =
createHistogramsRatio(
"hineffMCTCtheta",
"1 - fraction of idealMCTrackCandVS #lambda",
681 histoList->Add(h_ineffMCTC_theta);
685 histoList->Add(h_ineffMCTC_phi);
690 TH1* hNum, TH1* hDen,
bool isEffPlot,
693 TH1F* h1den =
dynamic_cast<TH1F*
>(hDen);
694 TH1F* h1num =
dynamic_cast<TH1F*
>(hNum);
695 TH2F* h2den =
dynamic_cast<TH2F*
>(hDen);
696 TH2F* h2num =
dynamic_cast<TH2F*
>(hNum);
697 TH3F* h3den =
dynamic_cast<TH3F*
>(hDen);
698 TH3F* h3num =
dynamic_cast<TH3F*
>(hNum);
704 hden =
new TH1F(*h1den);
705 hnum =
new TH1F(*h1num);
708 hden =
new TH2F(*h2den);
709 hnum =
new TH2F(*h2num);
712 hden =
new TH3F(*h3den);
713 hnum =
new TH3F(*h3num);
716 if (hden ==
nullptr or hnum ==
nullptr) {
717 B2ERROR(
"In function createHistogramsRatio: either hden or hnum are a nullptr. This shouldn't happen."\
718 "Don't continue creatio of histogram ratios in this case and return nullptr.");
727 the_axis = hden->GetXaxis();
728 the_other1 = hden->GetYaxis();
729 the_other2 = hden->GetZaxis();
730 }
else if (axisRef == 1) {
731 the_axis = hden->GetYaxis();
732 the_other1 = hden->GetXaxis();
733 the_other2 = hden->GetZaxis();
734 }
else if (axisRef == 2) {
735 the_axis = hden->GetZaxis();
736 the_other1 = hden->GetXaxis();
737 the_other2 = hden->GetYaxis();
743 if (the_axis->GetXbins()->GetSize())
744 h =
new TH1F(name, title, the_axis->GetNbins(), (the_axis->GetXbins())->GetArray());
746 h =
new TH1F(name, title, the_axis->GetNbins(), the_axis->GetXmin(), the_axis->GetXmax());
747 h->GetXaxis()->SetTitle(the_axis->GetTitle());
749 h->GetYaxis()->SetRangeUser(0.00001, 1);
753 for (
int the_bin = 1; the_bin < the_axis->GetNbins() + 1; the_bin++) {
758 for (
int other1_bin = 1; other1_bin < the_other1->GetNbins() + 1; other1_bin++)
759 for (
int other2_bin = 1; other2_bin < the_other2->GetNbins() + 1; other2_bin++) {
761 if (axisRef == 0) bin = hden->GetBin(the_bin, other1_bin, other2_bin);
762 else if (axisRef == 1) bin = hden->GetBin(other1_bin, the_bin, other2_bin);
763 else if (axisRef == 2) bin = hden->GetBin(other1_bin, other2_bin, the_bin);
765 if (hden->IsBinUnderflow(bin))
766 B2DEBUG(21,
" bin = " << bin <<
"(" << the_bin <<
"," << other1_bin <<
"," << other2_bin <<
"), UNDERFLOW");
767 if (hden->IsBinOverflow(bin))
768 B2DEBUG(21,
" bin = " << bin <<
"(" << the_bin <<
"," << other1_bin <<
"," << other2_bin <<
"), OVERFLOW");
770 num += hnum->GetBinContent(bin);
771 den += hden->GetBinContent(bin);
777 eff = (double)num / den;
778 err =
sqrt(eff * (1 - eff)) /
sqrt(den);
782 h->SetBinContent(the_bin, eff);
783 h->SetBinError(the_bin, err);
785 h->SetBinContent(the_bin, 1 - eff);
786 h->SetBinError(the_bin, err);
798 if (hitDistance < 1.8)
800 else if (hitDistance < 3)
802 else if (hitDistance < 5)
804 else if (hitDistance < 9)
806 else if (hitDistance < 12)
810 if ((hitDistance < 3) && (hitDistance > 1.2))
811 thetaMS = thetaMS / 2;
813 double dR =
m_nSigma * dL * thetaMS;
822 double thetaMS = 0.0136 * 14;
824 double p = mcParticleInfo.
getP();
834 thetaMS = thetaMS / (p * p /
E) *
sqrt(X / X0 * rho);
DataType X() const
access variable X (= .at(0) without boundary check)
DataType Y() const
access variable Y (= .at(1) without boundary check)
@ c_ErrorIfAlreadyRegistered
If the object/array was already registered, produce an error (aborting initialisation).
This struct is used by the TrackingPerformanceEvaluation Module to save information of reconstructed ...
double getPt()
Getter for transverse momentum.
double getLambda()
Getter for Lambda.
double getEnergy()
Getter for energy.
double getOmega()
Getter for Omega.
double getPphi()
Getter for phi of momentum vector.
double getP()
Getter for magnitut of momentum.
A Class to store the Monte Carlo particle information.
float getEnergy() const
Return particle energy in GeV.
int getIndex() const
Get 1-based index of the particle in the corresponding MCParticle list.
ROOT::Math::XYZVector getProductionVertex() const
Return production vertex position.
float getCharge() const
Return the particle charge defined in TDatabasePDG.
int getPDG() const
Return PDG code of particle.
ROOT::Math::XYZVector getMomentum() const
Return momentum.
std::string m_rootFileName
root file name
bool m_applySemiplane
Whether to require that the hit is in the expected semiplane.
TH1F * m_h1_nBadTrueHits
Histogram.
bool m_applyWedge
Whether to require that the hit belong to the barrel part of the SVD.
TH3F * m_h3_MCTrackCand
Histogram.
void addInefficiencyPlots(TList *graphList=nullptr)
Function to create inefficiency plots and add them to list.
ROOT::Math::XYZVector m_magField
magnetic field needed set particle info
TH1F * m_h1_nBad1dInfo
Histogram.
StoreArray< genfit::TrackCand > m_GenfitMCTrackCands
MC Genfit TrackCands StoreArray.
int nWedge
Counter for hits on wedged sensors.
StoreArray< SVDCluster > m_SVDClusters
SVDClusters StoreArray.
bool isInAnnulus(double hitDistance, double R, double dR)
Function to check if hitDistance is within a given annulus.
void initialize() override
Initializes the Module.
std::string m_mcParticlesName
MCParticle list name.
int nBarrel
Counter for hits on barrel sensors.
bool m_usePXD
Whether to use PXD.
void event() override
Event function.
TH1 * duplicateHistogram(const char *newname, const char *newtitle, TH1 *h, TList *histoList=nullptr)
Function to clone a histogram.
TH3F * m_h3_idealMCTrackCand
Histogram.
void endRun() override
End run.
float compute_thetaMS(MCParticleInfo &mcParticleInfo, VXDTrueHit *aTrueHit)
Calculate thetaMS.
void terminate() override
Termination action.
TH1F * m_h1_nGood1dInfo
Histogram.
bool m_applyLap
Whether to require that the hit belongs to the first lap in the transverse plane.
TH1F * m_h1_nGoodTrueHits
Histogram.
MCTrackCandClassifierModule()
Constructor of the module.
StoreArray< genfit::TrackCand > m_GenfitIdealMCTrackCands
Ideal Genfit TrackCands StoreArray.
TH1F * m_h1_dRoverR
Histogram.
bool isFirstLap(double FirstHitTime, double HitTime, double LapTime)
Function to check if a hitTime is within a given lapTime, under consideration of m_fraction and with ...
void addEfficiencyPlots(TList *graphList=nullptr)
Function to create efficiency plots and add them to list.
StoreArray< PXDCluster > m_PXDClusters
PXDClusters StoreArray.
TH1F * m_h1_timeDifference
Histogram.
void beginRun() override
Begin run.
double semiPlane(ROOT::Math::XYZVector vertex, ROOT::Math::XYZVector center, ROOT::Math::XYZVector hit)
Function to get semiplane.
TH1F * m_h1_hitDistance_rejected
Histogram.
TList * m_histoList
List of histograms.
TH1F * m_h1_hitRadius_rejected
Histogram.
TH1F * m_h1_lapTime
Histogram.
TH1F * m_h1_thetaMS_PXD
Histogram.
double m_fraction
Fraction of lap.
double theDistance(ROOT::Math::XYZVector center, ROOT::Math::XYZVector hit)
Get distance between two points.
TH1F * m_h1_hitRadius_accepted
Histogram.
TH1F * m_h1_MCTrackCandNhits
Histogram.
TH3F * createHistogram3D(const char *name, const char *title, Int_t nbinsX, Double_t minX, Double_t maxX, const char *titleX, Int_t nbinsY, Double_t minY, Double_t maxY, const char *titleY, Int_t nbinsZ, Double_t minZ, Double_t maxZ, const char *titleZ, TList *histoList=nullptr)
Create a 3D ROOT Histogram.
TH1F * createHistogramsRatio(const char *name, const char *title, TH1 *hNum, TH1 *hDen, bool isEffPlot, int axisRef)
Function to create a ratio histogram from two histograms.
TH1F * m_h1_diffOVERlap
Histogram.
TH1F * m_h1_firstRejectedOVERMCHit
Histogram.
TH1F * m_h1_thetaMS_SVD
Histogram.
TH1F * m_h1_firstRejectedHit
Histogram.
TFile * m_rootFilePtr
Pointer to root file used for storing histograms.
TH1F * m_h1_hitDistance_accepted
Histogram.
StoreArray< MCParticle > m_MCParticles
MCParticles StoreArray.
bool m_applyAnnulus
Whether to require that the hit is in the expected annulus.
TH3F * m_h3_MCParticle
Histogram.
std::string m_mcTrackCandsColName
TrackCand list name.
bool isInSemiPlane(double semiPlane, double omega)
Function to check if a omega value is in a given semiPlane.
float compute_dR(double thetaMS, double omega)
Calculate dR.
bool m_removeBadHits
Whether to remove the clusters that do not satisfy the criteria from the idealMCTrackCands.
int m_minHit
Minimum number of 1D Clusters to classify the MCTrackCand as ideal.
TH1F * m_h1_distOVERdR
Histogram.
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...
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
Class PXDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Class for type safe access to objects that are referred to in relations.
size_t size() const
Get number of relations.
RelationVector< T > getRelationsWith(const std::string &name="", const std::string &namedRelation="") const
Get the relations between this object and another store array.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
bool isUCluster() const
Get the direction of strips.
Class SVDTrueHit - Records of tracks that either enter or leave the sensitive volume.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
bool registerInDataStore(DataStore::EStoreFlags storeFlags=DataStore::c_WriteOut)
Register the object/array in the DataStore.
T * appendNew()
Construct a new T object at the end of the array.
static const double T
[tesla]
Class VXDTrueHit - Records of tracks that either enter or leave the sensitive volume.
float getV() const
Return local v coordinate of hit.
float getGlobalTime() const
Return the time when the track reached its midpoint.
float getEntryU() const
Return local u coordinate of hit when entering silicon.
float getExitW() const
Return local w coordinate of hit at the endpoint of the track.
float getEntryW() const
Return local w coordinate of the start point of the track.
VxdID getSensorID() const
Return the Sensor ID.
float getU() const
Return local u coordinate of hit.
float getExitU() const
Return local u coordinate of hit at the endpoint of the track.
float getExitV() const
Return local v coordinate of hit at the endpoint of the track.
float getEntryV() const
Return local v coordinate of the start point of the track.
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
static GeoCache & getInstance()
Return a reference to the singleton instance.
Base class to provide Sensor Information for PXD and SVD.
ROOT::Math::XYZVector pointToGlobal(const ROOT::Math::XYZVector &local, bool reco=false) const
Convert a point from local to global coordinates.
double getForwardWidth() const
Convinience Wrapper to return width at forward side.
double getBackwardWidth() const
Convinience Wrapper to return width at backward side.
Class to uniquely identify a any structure of the PXD and SVD.
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.
static void getField(const double *pos, double *field)
return the magnetic field at a given position.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.