 |
Belle II Software
release-05-02-19
|
11 #include <tracking/modules/trackFilter/TrackFilterModule.h>
12 #include <mdst/dataobjects/TrackFitResult.h>
13 #include <mdst/dataobjects/HitPatternVXD.h>
14 #include <mdst/dataobjects/HitPatternCDC.h>
15 #include <framework/datastore/StoreArray.h>
47 setDescription(
"generates a new StoreArray from the input StoreArray which has all specified Tracks removed");
50 addParam(
"inputArrayName", m_inputArrayName,
"StoreArray with the input tracks", std::string(
"Tracks"));
51 addParam(
"outputINArrayName", m_outputINArrayName,
"StoreArray with the output tracks", std::string(
""));
52 addParam(
"outputOUTArrayName", m_outputOUTArrayName,
"StoreArray with the output tracks", std::string(
""));
55 addParam(
"min_d0", m_min_d0,
"minimum value of the d0",
double(-100));
56 addParam(
"max_d0", m_max_d0,
"maximum value of the d0",
double(+100));
57 addParam(
"min_z0", m_min_z0,
"minimum value of the z0",
double(-500));
58 addParam(
"max_z0", m_max_z0,
"maximum value of the z0",
double(+500));
59 addParam(
"min_pCM", m_min_pCM,
"minimum value of the center-of-mass-momentum",
double(0));
60 addParam(
"min_pT", m_min_pT,
"minimum value of the transverse momentum",
double(0));
61 addParam(
"min_Pvalue", m_min_Pval,
"minimum value of the P-Value of the track fit",
double(0));
62 addParam(
"min_NumHitPXD", m_min_NumHitsPXD,
"minimum number of PXD hits associated to the trcak",
int(0));
63 addParam(
"min_NumHitSVD", m_min_NumHitsSVD,
"minimum number of SVD hits associated to the trcak",
int(0));
64 addParam(
"min_NumHitCDC", m_min_NumHitsCDC,
"minimum number of CDC hits associated to the trcak",
int(0));
66 addParam(
"saveControNtuples", m_saveControlNtuples,
"if true, generate a rootfile containing histograms ",
bool(
true));
67 addParam(
"outputFileName", m_rootFileName,
"Name of output root file.",
68 std::string(
"TrackFilterControlNtuples.root"));
82 inputArray.isRequired();
93 m_selectedNtpl =
new TNtuple(
"selected",
"Selected Tracks",
"d0:z0:phi:tanDip:omega:pT:pCM:nPXD:nSVD:nCDC:pVal");
94 m_rejectedNtpl =
new TNtuple(
"rejected",
"Rejected Tracks",
"d0:z0:phi:tanDip:omega:pT:pCM:nPXD:nSVD:nCDC:pVal");
130 bool isExcluded =
false;
173 double d0 = tfr->
getD0();
174 double z0 = tfr->
getZ0();
175 float phi = tfr->
getPhi();
181 pStar.Boost(0, 0, 3. / 11);
182 double pCM = pStar.P();
186 int nCDChits = hitPatternCDC.
getNHits();
188 float nPXD = nPXDhits;
189 float nSVD = nSVDhits;
190 float nCDC = nCDChits;
193 m_selectedNtpl->Fill(d0, z0, phi, tanDip, omega, pt, pCM, nPXD, nSVD, nCDC, pVal);
195 m_rejectedNtpl->Fill(d0, z0, phi, tanDip, omega, pt, pCM, nPXD, nSVD, nCDC, pVal);
virtual void terminate() override
terminates the module
static double m_min_Pval
miminum P-value of the track fit
TLorentzVector get4Momentum() const
Getter for the 4Momentum at the closest approach of the track in the r/phi projection.
static bool isSelected(const Track *track)
determine if the track satisfies the selection criteria
static TNtuple * m_rejectedNtpl
tuple of rejected tracks
unsigned short getNPXDHits() const
Get total number of hits in the PXD.
static void fillControlNtuples(const Track *track, bool isSelected)
determine if the track does not satisfies the selection criteria
TVector3 getMomentum() const
Getter for vector of momentum at closest approach of track in r/phi projection.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
static bool m_saveControlNtuples
if true produces a rootfile with control ntupled
static double m_min_pCM
miminum value of the center of mass momentum
double getOmega() const
Getter for omega.
double getPValue() const
Getter for Chi2 Probability of the track fit.
double getTanLambda() const
Getter for tanLambda.
TFile * m_rootFilePtr
pointer at root file used for storing ntuples
static double m_max_z0
z0 maximum value
Values of the result of a track fit with a given particle hypothesis.
static int m_min_NumHitsPXD
miminum value of PXD hits
SelectSubset< Track > m_selectedTracks
selected tracks
HitPatternCDC getHitPatternCDC() const
Getter for the hit pattern in the CDC;.
double getZ0() const
Getter for z0.
virtual void initialize() override
init the module
std::string m_inputArrayName
StoreArray with the input tracks.
static double m_min_z0
z0 miminum value
SelectSubset< Track > m_notSelectedTracks
not selected tracks
Abstract base class for different kinds of events.
virtual void event() override
processes the event
std::string m_rootFileName
root file name
std::string m_outputOUTArrayName
StoreArray with the NOT selected output tracks.
static double m_min_d0
d0 miminum value
HitPatternVXD getHitPatternVXD() const
Getter for the hit pattern in the VXD;.
static int m_min_NumHitsCDC
miminum value of CDC hits
static int m_min_NumHitsSVD
miminum value of SVD hits
Provides a type-safe way to pass members of the chargedStableSet set.
unsigned short getNHits() const
Get the total Number of CDC hits in the fit.
unsigned short getNSVDHits() const
Get total number of hits in the SVD.
static double m_min_pT
miminum value of the transverse momentum
Class that bundles various TrackFitResults.
static TNtuple * m_selectedNtpl
tuple of selected tracks
Accessor to arrays stored in the data store.
generates a new StoreArray from the input StoreArray which has all specified Tracks removed
static double m_max_d0
d0 maximum value
std::string m_outputINArrayName
StoreArray with the selected output tracks.
Hit pattern of the VXD within a track.
Hit pattern of CDC hits within a track.
double getPhi() const
Getter for phi0 with CDF naming convention.
double getD0() const
Getter for d0.