9#include <tracking/dqmUtils/DQMEventProcessorBase.h>
10#include <tracking/dqmUtils/DQMHistoModuleBase.h>
12#include <framework/datastore/StoreArray.h>
13#include <vxd/geometry/GeoTools.h>
14#include <vxd/geometry/SensorInfoBase.h>
22 B2DEBUG(22,
"Missing recoTracks array in event() for " +
m_histoModule->getName() +
" module.");
26 if (!tracks.isOptional()) {
27 B2DEBUG(22,
"Missing recoTracks array in event() for " +
m_histoModule->getName() +
" module.");
37 for (
const Track& track : tracks) {
42 }
catch (
const std::exception& e) {
43 B2WARNING(
"Exception " + std::string(e.what()) +
" in " +
m_histoModule->getName() +
" module!");
45 B2WARNING(
"Unhandled exception in " +
m_histoModule->getName() +
" module!");
52 if (!recoTracksVector.size())
60 nPXDClusters = (int)pxdClusters.
size();
63 int nSVDClusters = (int)svdClusters.
size();
65 int nCDCHits = (int)cdcHits.
size();
68 auto trackFitResult = track.getTrackFitResultWithClosestMass(
Const::pion);
70 TString message =
ConstructMessage(trackFitResult, nPXDClusters, nSVDClusters, nCDCHits);
71 B2DEBUG(20, message.Data());
74 m_histoModule->FillHitNumbers(nPXDClusters, nSVDClusters, nCDCHits);
80 if (((nPXDClusters > 0) || (nSVDClusters > 0)) && (nCDCHits == 0))
82 if (((nPXDClusters == 0) && (nSVDClusters == 0)) && (nCDCHits > 0))
84 if (((nPXDClusters > 0) || (nSVDClusters > 0)) && (nCDCHits > 0))
91 return Form(
"%s: track %3i, Mom: %f, %f, %f, Pt: %f, Mag: %f, Hits: PXD %i SVD %i CDC %i Suma %i\n",
99 nPXDClusters, nSVDClusters, nCDCHits, nPXDClusters + nSVDClusters + nCDCHits
109 m_histoModule->FillHelixParametersAndCorrelations(trackFitResult);
119 for (
auto recoHitInfo :
m_recoTrack->getRecoHitInformations(
true)) {
127 B2DEBUG(20,
"Missing genfit::pxd recoHitInfo in event() for " +
m_histoModule->getName() +
" module.");
136 if (!isPXD && !isSVD)
139 auto trackpoint =
m_recoTrack->getCreatedTrackPoint(recoHitInfo);
142 auto fitterInfo = trackpoint->getFitterInfo();
216 ROOT::Math::XYZVector globalPosition = sensorInfo->pointToGlobal(
m_position,
true);
251 switch (layerNumber) {
253 return ladderNumber < 5 || ladderNumber > 8;
255 return ladderNumber < 7 || ladderNumber > 12;
263 switch (layerNumber) {
265 return ladderNumber < 3 || ladderNumber > 5;
267 return ladderNumber < 4 || ladderNumber > 8;
269 return ladderNumber < 5 || ladderNumber > 10;
271 return ladderNumber < 6 || ladderNumber > 13;
static const ChargedStable pion
charged pion particle
virtual void ProcessSVDRecoHit(RecoHitInformation *recoHitInfo)
Compute position in a SVD way which means we need two consecutive hits to be from the same sensor to ...
ROOT::Math::XYZVector m_position
local coordinates of the hit position (u, v, w)
bool m_produce1Dres
if true, produce 1D Track residuals plots for each VXD sensor
bool m_produceTRClusters
if true, produce 2D Track-Related Cluster plots
static bool IsNotMat(int ladderNumber, int layerNumber)
Returns true if sensor with given ladderNumber and layerNumber isn't in the Mat half-shell,...
virtual void ProcessTrack(const Track &track)
Find RecoTrack for given track.
float m_phiPrev_deg
global phi in degrees of the previous hit
int m_layerIndex
index of the layer of the hit
std::string m_tracksStoreArrayName
StoreArray name where Tracks are written.
virtual void FillCommonHistograms()
Fill histograms which are common for PXD and SVD hit.
int m_layerNumberPrev
number of the layer of the previous hit
virtual void ProcessPXDRecoHit(RecoHitInformation *recoHitInfo)
Compute position in a PXD way.
int m_layerNumber
number of the layer of the hit
virtual void FillTrackFitResult(const TrackFitResult *trackFitResult)
Fill histograms with values derived from TrackFitResult.
int m_iTrackVXD
index of track where are VXD hits and aren't CDC hits (with valid TrackFitResult and related RecoTrac...
int m_iTrackCDC
index of track where are CDC hits and aren't VXD hits (with valid TrackFitResult and related RecoTrac...
bool m_produce2Dres
if true, produce 2D Track residuals plots for each VXD sensor
ROOT::Math::XYZVector m_residual_um
unbiased residual for the hit in micrometers in local coordinates (u, v, w)
bool m_isNotFirstHit
Determines if the hit is not the first hit in the current track.
int m_correlationIndex
index of the layer of the previous hit
int m_sensorIndex
index of the sensor of the hit
virtual void Run()
Call this to start processing the event data and filling histograms.
virtual void ComputeCommonVariables()
Compute variables which are common for PXD and SVD hit.
virtual void ProcessSuccessfulFit()
Continue track processing by calling ProcessRecoHit function on each RecoHitInformation in given Reco...
virtual void ProcessRecoHit(RecoHitInformation *recoHitInfo)
Compute unbiased residual and the calls ProcesPXDRecoHit or ProcessSVDRecoHit.
float m_theta_deg
global theta in degrees of the hit
TVectorT< double > * m_rawSensorResidual
unbiased residual for the hit obtained from the sensor so its length is different for PXD and SVD sen...
float m_phi_deg
global phi in degrees of the hit
virtual void SetCommonPrevVariables()
Set the value of -Prev values which are common for PXD and SVD hit.
bool m_runningOnHLT
true if the DQM is run on HLT
static bool IsNotYang(int ladderNumber, int layerNumber)
Returns true if sensor with given ladderNumber and layerNumber isn't in the Yang half-shell,...
std::string m_recoTracksStoreArrayName
StoreArray name where RecoTracks are written.
float m_thetaPrev_deg
global theta in degrees of the previous hit
VxdID m_sensorID
ID of the current sensor.
virtual TString ConstructMessage(const TrackFitResult *trackFitResult, int nPXDClusters, int nSVDClusters, int nCDCHits)
Make debug message with information about RecoTrack.
int m_iTrackVXDCDC
index of track where are both VXD hits and CDC hits (with valid TrackFitResult and related RecoTrack)
RecoTrack * m_recoTrack
RecoTrack related to currently processed Track.
DQMHistoModuleBase * m_histoModule
DQM histogram module on which the Fill- functions are called to fill histograms.
int m_iTrack
index of track (with valid TrackFitResult and related RecoTrack)
VxdID m_sensorIDPrev
ID of the prewious sensor.
ROOT::Math::XYZVector m_globalResidual_um
unbiased residual for the hit in micrometers in global coordinates (x, y, z)
static RelationVector< T > getRelationsWithObj(const TObject *object, const std::string &name="", const std::string &namedRelation="")
Get the relations between an object and other objects in a store array.
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
float getV() const
Get v coordinate of hit position.
float getU() const
Get u coordinate of hit position.
This is the Reconstruction Event-Data Model Track.
Class for type safe access to objects that are referred to in relations.
size_t size() const
Get number of relations.
TO * getRelatedTo(const std::string &name="", const std::string &namedRelation="") const
Get the object to which this object has a relation.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
bool isUCluster() const
Get the direction of strips.
float getPosition(double v=0) const
Get the coordinate of reconstructed hit.
bool isOptional(const std::string &name="")
Tell the DataStore about an optional input.
Accessor to arrays stored in the data store.
Values of the result of a track fit with a given particle hypothesis.
ROOT::Math::XYZVector getMomentum() const
Getter for vector of momentum at closest approach of track in r/phi projection.
Class that bundles various TrackFitResults.
static const double deg
degree to radians
static const double um
[micrometers]
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a reference to the SensorInfo of a given SensorID.
static GeoCache & getInstance()
Return a reference to the singleton instance.
const GeoTools * getGeoTools()
Return a raw pointer to a GeoTools object.
Abstract base class for different kinds of events.