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