 |
Belle II Software
release-05-01-25
|
11 #include <tracking/trackFindingVXD/sectorMapTools/NoKickRTSel.h>
12 #include <tracking/trackFindingVXD/sectorMapTools/NoKickCuts.h>
14 #include <tracking/dataobjects/hitXPDerivate.h>
16 #include <mdst/dataobjects/MCParticle.h>
17 #include <pxd/dataobjects/PXDTrueHit.h>
18 #include <svd/dataobjects/SVDTrueHit.h>
30 if (track.getRelationsTo<
MCParticle>().size() > 0) {
34 std::vector<Belle2::RecoHitInformation::UsedSVDHit*> clusterListSVD = track.getSVDHitList();
35 for (
const SVDCluster* cluster : clusterListSVD) {
38 if (hitFromParticle.
size() > 0) {
39 if (hitFromParticle[0]->getIndex() != particle->getIndex()) {
43 VxdID trueHitSensorID = hit.getSensorID();
49 if (Ncluster.isUCluster()) NClusterU++;
55 bool isReconstructed(
false);
57 isReconstructed |= aRecoTrack.hasSVDHits();
68 std::vector<Belle2::RecoHitInformation::UsedPXDHit*> clusterListPXD = track.getPXDHitList();
69 for (
const PXDCluster* cluster : clusterListPXD) {
72 if (hitFromParticle.
size() > 0) {
73 if (hitFromParticle[0]->getIndex() != particle->getIndex()) {
77 VxdID trueHitSensorID = hit.getSensorID();
81 bool isReconstructed(
false);
83 isReconstructed |= aRecoTrack.hasPXDHits();
104 }
else if (XP.m_sensorLayer !=
m_8hitTrack.back().m_sensorLayer ||
105 XP.m_sensorLadder !=
m_8hitTrack.back().m_sensorLadder ||
106 XP.m_sensorSensor !=
m_8hitTrack.back().m_sensorSensor) {
121 for (
hitXP XP : track8) {
122 if (XP.getSensorLayer() == 3) lay3 = 1;
123 if (XP.getSensorLayer() == 4) lay4 = 1;
124 if (XP.getSensorLayer() == 5) lay5 = 1;
125 if (XP.getSensorLayer() == 6) lay6 = 1;
129 int N_lay = lay3 + lay4 + lay5 + lay6;
130 if (N_lay >= 3) N_lay = 1;
132 int flagTot = flagd0 * flagz0 * N_lay;
133 if (flagTot == 1)
return true;
143 case NoKickCuts::c_Omega:
149 case NoKickCuts::c_D0:
155 case NoKickCuts::c_Phi0:
161 case NoKickCuts::c_Z0:
167 case NoKickCuts::c_Tanlambda:
175 if (fabs(selCut.at(0)) > fabs(selCut.at(1))) {
176 usedCut = fabs(selCut.at(0));
177 }
else usedCut = fabs(selCut.at(1));
179 if (deltaPar > -usedCut && deltaPar < usedCut)
return true;
181 B2DEBUG(20,
"--------------------------");
184 B2DEBUG(20,
"parameter=" << par);
185 B2DEBUG(20,
"Min=" << selCut.at(0));
186 B2DEBUG(20,
"Max=" << selCut.at(1));
187 B2DEBUG(20,
"deltaPar=" << deltaPar);
188 B2DEBUG(20,
"momentum=" << hit1.
m_momentum0.Mag());
203 m_pMag = track.getMomentumSeed().Mag();
204 m_pt = sqrt(track.getMomentumSeed().X() * track.getMomentumSeed().X() + track.getMomentumSeed().Y() * track.getMomentumSeed().Y());
214 m_momCut->Fill(track.getMomentumSeed().Mag());
221 if (track.getMomentumSeed().Mag() >
m_pmax) {
226 m_momSel->Fill(track.getMomentumSeed().Mag());
232 for (
int i = 0; i < (int)(
m_8hitTrack.size() - 2); i++) {
233 double sinTheta = fabs(
m_8hitTrack.at(i).m_momentum0.Y()) /
242 for (
int j = NoKickCuts::c_Omega; j <= NoKickCuts::c_Tanlambda; j++) {
266 m_momSel->Fill(track.getMomentumSeed().Mag());
270 m_momCut->Fill(track.getMomentumSeed().Mag());
size_t size() const
Get number of relations.
double getPhi00() const
evaluate relative parameter using IP position and momentum
TH1F * m_momEff
histogram for efficiency
Class to uniquely identify a any structure of the PXD and SVD.
bool m_outputFlag
true=produce validation output
TTree * m_noKickTree
TTree to which the information is written.
bool trackSelector(const RecoTrack &track)
This method return true if every segment (see segmentSelector) of the input track respects the cuts c...
NoKickCuts m_trackCuts
auxiliary member to apply the cuts
Class PXDTrueHit - Records of tracks that either enter or leave the sensitive volume.
std::set< hitXP, hitXP::timeCompare > m_setHitXP
set of hit to order the hit in time
bool m_isCutted
Indicator if cut is applied.
TH1F * m_momSel
histogram of selected tracks
Class SVDTrueHit - Records of tracks that either enter or leave the sensitive volume.
EParameters
enum for parameters name
Base class to provide Sensor Information for PXD and SVD.
double getOmegaEntry() const
evaluate relative parameter using entrypoint position and momentum
int m_sensorLayer
layer of the hit
std::vector< double > cutSelector(double sintheta, double momentum, int layer1, int layer2, EParameters par)
This methods selects 2 cuts (minimum and maximum inside a vector) from the information of theta,...
int m_Ncuts
number of times the cut is applied on a particle
TFile * m_noKickOutputTFile
validartion output TFile
void hit8TrackBuilder(const RecoTrack &track)
this metod build a vector of hitXP from a track selecting the first hit on each layer of VXD (8 hit f...
std::vector< hitXP > m_hitXP
vector of hit, to convert the track
double m_pt
transverse momentum
void setClusterV(int cluster)
get the relative memeber
This class collects some information of a TrueHit, using SVDCLuster and MCParticle information too.
void hitXPBuilder(const RecoTrack &track)
this method build a vector of hitXP from a track.
This is the Reconstruction Event-Data Model Track.
Class for type safe access to objects that are referred to in relations.
double getZ0Entry() const
evaluate relative parameter using entrypoint position and momentum
void initNoKickRTSel()
Inizialize the class cleaning the member vectors.
TH1F * m_PDGIDEff
histogram for efficiency for each PDGID
double getOmega0() const
evaluate relative parameter using IP position and momentum
static GeoCache & getInstance()
Return a reference to the singleton instance.
Abstract base class for different kinds of events.
int getPDG() const
Return PDG code of particle.
TH1F * m_momCut
histrogram of cutted tracks
TVector3 m_momentum0
momentum at IP
double m_pmax
range analyzed with cuts
double getD0Entry() const
evaluate relative parameter using entrypoint position and momentum
void produceHistoNoKick()
This method produce the validation histograms (to be used the endrun combined with the filling in tra...
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
double m_pMag
momentum magnitut
void setReconstructed(bool isReconstructed)
get the relative memeber
double getZ00() const
evaluate relative parameter using IP position and momentum
bool segmentSelector(hitXP hit1, hitXP hit2, std::vector< double > selCut, NoKickCuts::EParameters par, bool is0=false)
This method return true if a couple of hits resects the cuts constraints.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
std::vector< hitXP > m_8hitTrack
vector of selected hit
void setClusterU(int cluster)
get the relative memeber
double getD00() const
evaluate relative parameter using IP position and momentum
TH1F * m_PDGIDSel
histogram for PDGID of selected track
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
A Class to store the Monte Carlo particle information.
double getTanLambdaEntry() const
evaluate relative parameter using entrypoint position and momentum
This class is the derivate of HitXP, and complete it with a constructor that use all other complex ty...
bool globalCut(const std::vector< hitXP > &track8)
This method make some global cuts on the tracks (layer 3 and 6 required, d0 and z0 inside beam pipe).
TH1F * m_PDGIDCut
histogram for PDGID of cutted track
double getPhi0Entry() const
evaluate relative parameter using entrypoint position and momentum
double getTanLambda0() const
evaluate relative parameter using IP position and momentum
TH1F * m_nCutHit
histogram for number of cutted hist per track
int m_numberOfCuts
number of catastrophic interaction for each track