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>
15#include <Math/Boost.h>
47 setDescription(
"generates a new StoreArray from the input StoreArray which has all specified Tracks removed");
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));
68 std::string(
"TrackFilterControlNtuples.root"));
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 ROOT::Math::BoostZ boost(3. / 11);
182 pStar = boost(pStar);
183 double pCM = pStar.P();
187 int nCDChits = hitPatternCDC.
getNHits();
189 float nPXD = nPXDhits;
190 float nSVD = nSVDhits;
191 float nCDC = nCDChits;
194 m_selectedNtpl->Fill(d0, z0, phi, tanDip, omega, pt, pCM, nPXD, nSVD, nCDC, pVal);
196 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.
void setDescription(const std::string &description)
Sets the description of the module.
bool isRequired(const std::string &name="")
Ensure this array/object has been registered previously.
Accessor to arrays stored in the data store.
std::string m_rootFileName
root file name
static double m_min_z0
z0 minimum 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
minimum value of CDC hits
static TNtuple * m_selectedNtpl
tuple of selected tracks
static double m_min_Pval
minimum 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
minimum 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
minimum 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
minimum 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 minimum value
static double m_min_pCM
minimum value of the center of mass momentum
TrackFilterModule()
Constructor: Sets the description, the properties and the parameters of the module.
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.
ROOT::Math::PxPyPzEVector get4Momentum() const
Getter for the 4Momentum at the closest approach of the track in the r/phi projection.
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.
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.
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.
Abstract base class for different kinds of events.