Belle II Software development
DQMEventProcessorBase.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <tracking/dqmUtils/DQMHistoModuleBase.h>
12
13#include <tracking/dataobjects/RecoHitInformation.h>
14
15namespace Belle2 {
30
31 public:
37 DQMEventProcessorBase(DQMHistoModuleBase* histoModule, const std::string& recoTracksStoreArrayName,
38 const std::string& tracksStoreArrayName, bool runningOnHLT = false) :
39 m_tracksStoreArrayName(tracksStoreArrayName),
40 m_recoTracksStoreArrayName(recoTracksStoreArrayName),
41 m_runningOnHLT(runningOnHLT)
42 {
43 m_histoModule = histoModule;
44 }
45
48 virtual void Run();
49
51 void produce1Dres() {m_produce1Dres = true;};
53 void produce2Dres() {m_produce2Dres = true;};
54
55 protected:
57 virtual void ProcessTrack(const Track& track);
59 virtual TString ConstructMessage(const TrackFitResult* trackFitResult, int nPXDClusters, int nSVDClusters, int nCDCHits);
61 virtual void FillTrackFitResult(const TrackFitResult* trackFitResult);
63 virtual void ProcessSuccessfulFit();
65 virtual void ProcessRecoHit(RecoHitInformation* recoHitInfo);
67 virtual void ProcessPXDRecoHit(RecoHitInformation* recoHitInfo);
70 virtual void ProcessSVDRecoHit(RecoHitInformation* recoHitInfo);
72 virtual void ComputeCommonVariables();
74 virtual void FillCommonHistograms();
76 virtual void SetCommonPrevVariables();
77
88 static bool IsNotYang(int ladderNumber, int layerNumber);
89
102 static bool IsNotMat(int ladderNumber, int layerNumber);
103
107 std::string m_tracksStoreArrayName = "";
110
113
115 bool m_produce1Dres = false;
116
118 bool m_produce2Dres = false;
119
121 int m_iTrack = 0;
123 int m_iTrackVXD = 0;
125 int m_iTrackCDC = 0;
128
132 bool m_isNotFirstHit = false;
133
135 TVectorT<double>* m_rawSensorResidual = nullptr;
140
142 ROOT::Math::XYZVector m_position = ROOT::Math::XYZVector();
144 ROOT::Math::XYZVector m_residual_um = ROOT::Math::XYZVector();
146 ROOT::Math::XYZVector m_globalResidual_um = ROOT::Math::XYZVector();
148 float m_phi_deg = .0;
150 float m_phiPrev_deg = .0;
152 float m_theta_deg = .0;
154 float m_thetaPrev_deg = .0;
165 };
167}
The purpose of this class is to process one event() in DQMHistoModuleBase, which is a base for TrackD...
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 ...
void produce1Dres()
Call this if you want to produce 1D Track Residual plots for each VXD sensor.
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
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
DQMEventProcessorBase(DQMHistoModuleBase *histoModule, const std::string &recoTracksStoreArrayName, const std::string &tracksStoreArrayName, bool runningOnHLT=false)
Constructor.
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...
void produce2Dres()
Call this if you want to produce 2D Track Residual plots for each VXD sensor.
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)
This class serves as a base for the TrackDQMModule and AlignDQMModule (and possibly other DQM histogr...
This class stores additional information to every CDC/SVD/PXD hit stored in a RecoTrack.
This is the Reconstruction Event-Data Model Track.
Definition: RecoTrack.h:79
Values of the result of a track fit with a given particle hypothesis.
Class that bundles various TrackFitResults.
Definition: Track.h:25
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
Abstract base class for different kinds of events.