9#include <tracking/modules/VXDOverlaps/OverlapResidualsModule.h>
10#include <framework/datastore/StoreArray.h>
11#include <framework/gearbox/Unit.h>
12#include <framework/core/Environment.h>
13#include <svd/dataobjects/SVDCluster.h>
14#include <svd/dataobjects/SVDRecoDigit.h>
15#include <svd/dataobjects/SVDShaperDigit.h>
16#include <svd/dataobjects/SVDTrueHit.h>
17#include <vxd/dataobjects/VxdID.h>
18#include <vxd/geometry/GeoCache.h>
19#include <vxd/geometry/SensorInfoBase.h>
20#include <tracking/dataobjects/RecoTrack.h>
21#include <tracking/dataobjects/RecoHitInformation.h>
22#include <genfit/TrackPoint.h>
23#include <Math/Vector3D.h>
24#include <TDirectory.h>
25#include <Math/Boost.h>
29#include <mdst/dataobjects/Track.h>
30#include <mdst/dataobjects/TrackFitResult.h>
47 setDescription(
"The module studies consecutive hits in overlapping sensors of a same VXD layer, and the differences of their residuals, to monitor the detector alignment.");
53 "If set, enables the production of TTrees containing low level information on PXD and SVD overlaps",
false);
67 TDirectory* oldDir = gDirectory;
68 TDirectory* ResDir = oldDir->mkdir(
"Monitoring_VXDOverlaps");
71 h_U_DeltaRes =
new TH1F(
"h_U_DeltaRes",
"Histrogram of residual difference #Delta res_{u} for overlapping hits", 100, -1000, 1000);
72 h_U_DeltaRes->GetXaxis()->SetTitle(
"#Delta res_{u} (#mum)");
74 h_V_DeltaRes =
new TH1F(
"h_V_DeltaRes",
"Histrogram of residual difference #Delta res_{v} for overlapping hits", 100, -1000, 1000);
75 h_V_DeltaRes->GetXaxis()->SetTitle(
"#Delta res_{v} (#mum)");
77 h_U_DeltaRes_PXD =
new TH1F(
"h_U_DeltaRes_PXD",
"Histrogram of residual difference #Delta res_{u} for overlapping PXD hits", 100,
82 "Layer1: histrogram of residual difference #Delta res_{u} for overlapping PXD hits", 100, -1000, 1000);
86 "Layer 2: hstrogram of residual difference #Delta res_{u} for overlapping PXD hits", 100, -1000, 1000);
89 h_V_DeltaRes_PXD =
new TH1F(
"h_V_DeltaRes_PXD",
"Histrogram of residual difference #Delta res_{v} for overlapping PXD hits", 100,
94 "Layer 1: histrogram of residual difference #Delta res_{v} for overlapping PXD hits", 100, -1000, 1000);
98 "Layer 2: histrogram of residual difference #Delta res_{v} for overlapping PXD hits", 100, -1000, 1000);
101 h_U_DeltaRes_SVD =
new TH1F(
"h_U_DeltaRes_SVD",
"Histrogram of residual difference #Delta res_{u} for overlapping SVD hits", 100,
106 "Layer 3: histrogram of residual difference #Delta res_{u} for overlapping SVD hits", 100, -1000, 1000);
110 "Layer 4: histrogram of residual difference #Delta res_{u} for overlapping SVD hits", 100, -1000, 1000);
114 "Layer 5: histrogram of residual difference #Delta res_{u} for overlapping SVD hits", 100, -1000, 1000);
118 "Layer 6: histrogram of residual difference #Delta res_{u} for overlapping SVD hits", 100, -1000, 1000);
121 h_V_DeltaRes_SVD =
new TH1F(
"h_V_DeltaRes_SVD",
"Histrogram of residual difference #Delta res_{v} for overlapping SVD hits", 100,
126 "Layer 3: histrogram of residual difference #Delta res_{v} for overlapping SVD hits", 100, -1000, 1000);
130 "Layer 4: histrogram of residual difference #Delta res_{v} for overlapping SVD hits", 100, -1000, 1000);
134 "Layer 5: histrogram of residual difference #Delta res_{v} for overlapping SVD hits", 100, -1000, 1000);
138 "Layer 6: histrogram of residual difference #Delta res_{v} for overlapping SVD hits", 100, -1000, 1000);
141 h_SVDstrips_Mult =
new TH1F(
"h_SVDstrips_Mult",
"SVD strips multiplicity for SVD clusters in overlapping sensors", 15, 0.5, 15.5);
142 h_SVDstrips_Mult->GetXaxis()->SetTitle(
"N. of SVD strips contributing to the cluster");
145 h_DeltaResUPhi_Lyr1 =
new TH2F(
"h_DeltaResUPhi_Lyr1",
"Layer 1: #Delta res_{u} vs #phi", 200, -3.4, 3.4, 100, -200, 200);
148 h_DeltaResUPhi_Lyr2 =
new TH2F(
"h_DeltaResUPhi_Lyr2",
"Layer 2: #Delta res_{u} vs #phi", 200, -3.4, 3.4, 100, -200, 200);
151 h_DeltaResUPhi_Lyr3 =
new TH2F(
"h_DeltaResUPhi_Lyr3",
"Layer 3: #Delta res_{u} vs #phi", 200, -3.4, 3.4, 100, -1000, 1000);
154 h_DeltaResUPhi_Lyr4 =
new TH2F(
"h_DeltaResUPhi_Lyr4",
"Layer 4: #Delta res_{u} vs #phi", 200, -3.4, 3.4, 100, -1000, 1000);
157 h_DeltaResUPhi_Lyr5 =
new TH2F(
"h_DeltaResUPhi_Lyr5",
"Layer 5: #Delta res_{u} vs #phi", 200, -3.4, 3.4, 100, -1000, 1000);
160 h_DeltaResUPhi_Lyr6 =
new TH2F(
"h_DeltaResUPhi_Lyr6",
"Layer 6: #Delta res_{u} vs #phi", 200, -3.4, 3.4, 100, -1000, 1000);
164 h_DeltaResUz_Lyr1 =
new TH2F(
"h_DeltaResUz_Lyr1",
"Layer 1: #Delta res_{u} vs z", 100, -4, 8, 100, -200, 200);
167 h_DeltaResUz_Lyr2 =
new TH2F(
"h_DeltaResUz_Lyr2",
"Layer 2: #Delta res_{u} vs z", 100, -10, 15, 100, -200, 200);
170 h_DeltaResUz_Lyr3 =
new TH2F(
"h_DeltaResUz_Lyr3",
"Layer 3: #Delta res_{u} vs z", 250, -15, 20, 100, -1000, 1000);
173 h_DeltaResUz_Lyr4 =
new TH2F(
"h_DeltaResUz_Lyr4",
"Layer 4: #Delta res_{u} vs z", 250, -20, 25, 100, -1000, 1000);
176 h_DeltaResUz_Lyr5 =
new TH2F(
"h_DeltaResUz_Lyr5",
"Layer 5: #Delta res_{u} vs z", 250, -25, 35, 100, -1000, 1000);
179 h_DeltaResUz_Lyr6 =
new TH2F(
"h_DeltaResUz_Lyr6",
"Layer 6: #Delta res_{u} vs z", 250, -30, 45, 100, -1000, 1000);
183 h_DeltaResVPhi_Lyr1 =
new TH2F(
"h_DeltaResVPhi_Lyr1",
"Layer 1: #Delta res_{v} vs #phi", 200, -3.4, 3.4, 100, -200, 200);
186 h_DeltaResVPhi_Lyr2 =
new TH2F(
"h_DeltaResVPhi_Lyr2",
"Layer 2: #Delta res_{v} vs #phi", 200, -3.4, 3.4, 100, -200, 200);
189 h_DeltaResVPhi_Lyr3 =
new TH2F(
"h_DeltaResVPhi_Lyr3",
"Layer 3: #Delta res_{v} vs #phi", 200, -3.4, 3.4, 100, -1000, 1000);
192 h_DeltaResVPhi_Lyr4 =
new TH2F(
"h_DeltaResVPhi_Lyr4",
"Layer 4: #Delta res_{v} vs #phi", 200, -3.4, 3.4, 100, -1000, 1000);
195 h_DeltaResVPhi_Lyr5 =
new TH2F(
"h_DeltaResVPhi_Lyr5",
"Layer 5: #Delta res_{v} vs #phi", 200, -3.4, 3.4, 100, -1000, 1000);
198 h_DeltaResVPhi_Lyr6 =
new TH2F(
"h_DeltaResVPhi_Lyr6",
"Layer 6: #Delta res_{v} vs #phi", 200, -3.4, 3.4, 100, -1000, 1000);
202 h_DeltaResVz_Lyr1 =
new TH2F(
"h_DeltaResVz_Lyr1",
"Layer 1: #Delta res_{v} vs z", 100, -4, 8, 100, -200, 200);
205 h_DeltaResVz_Lyr2 =
new TH2F(
"h_DeltaResVz_Lyr2",
"Layer 2: #Delta res_{v} vs z", 100, -10, 15, 100, -200, 200);
208 h_DeltaResVz_Lyr3 =
new TH2F(
"h_DeltaResVz_Lyr3",
"Layer 3: #Delta res_{v} vs z", 250, -15, 20, 100, -1000, 1000);
211 h_DeltaResVz_Lyr4 =
new TH2F(
"h_DeltaResVz_Lyr4",
"Layer 4: #Delta res_{v} vs z", 250, -20, 25, 100, -1000, 1000);
214 h_DeltaResVz_Lyr5 =
new TH2F(
"h_DeltaResVz_Lyr5",
"Layer 5: #Delta res_{v} vs z", 250, -25, 35, 100, -1000, 1000);
217 h_DeltaResVz_Lyr6 =
new TH2F(
"h_DeltaResVz_Lyr6",
"Layer 6: #Delta res_{v} vs z", 250, -30, 45, 100, -1000, 1000);
221 for (
int i = 1; i < 5; i++) {
223 TString h_name_U =
"h_U_Cl1Cl2_" + std::to_string(i);
224 TString h_name_V =
"h_V_Cl1Cl2_" + std::to_string(i);
225 TString title_U =
"#Delta res_{u}: SVDClusterSize_1 x SVDClusterSize_2 = " + std::to_string(i);
226 TString title_V =
"#Delta res_{v}: SVDClusterSize_1 x SVDClusterSize_2 = " + std::to_string(i);
238 TDirectory* HMDir = oldDir->mkdir(
"HitMaps_VXDOverlaps");
241 for (
int i = 1; i <= 5; i++) {
242 for (
int j = 1; j <= 16; j++) {
243 TString h_name =
"h_6" + std::to_string(j) + std::to_string(i);
244 TString title =
"Layer:Ladder:Sensor = 6:" + std::to_string(j) +
":" + std::to_string(i);
245 h_Lyr6[j][i] =
new TH2F(h_name, title, 100, -2.88, 2.88, 100, -6.14, 6.14);
246 h_Lyr6[j][i]->GetXaxis()->SetTitle(
"u (cm)");
247 h_Lyr6[j][i]->GetYaxis()->SetTitle(
"v (cm)");
250 for (
int i = 1; i <= 4; i++) {
251 for (
int j = 1; j <= 12; j++) {
252 TString h_name =
"h_5" + std::to_string(j) + std::to_string(i);
253 TString title =
"Layer:Ladder:Sensor = 5:" + std::to_string(j) +
":" + std::to_string(i);
254 h_Lyr5[j][i] =
new TH2F(h_name, title, 100, -2.88, 2.88, 100, -6.14, 6.14);
255 h_Lyr5[j][i]->GetXaxis()->SetTitle(
"u (cm)");
256 h_Lyr5[j][i]->GetYaxis()->SetTitle(
"v (cm)");
259 for (
int i = 1; i <= 3; i++) {
260 for (
int j = 1; j <= 10; j++) {
261 TString h_name =
"h_4" + std::to_string(j) + std::to_string(i);
262 TString title =
"Layer:Ladder:Sensor = 4:" + std::to_string(j) +
":" + std::to_string(i);
263 h_Lyr4[j][i] =
new TH2F(h_name, title, 100, -2.88, 2.88, 100, -6.14, 6.14);
264 h_Lyr4[j][i]->GetXaxis()->SetTitle(
"u (cm)");
265 h_Lyr4[j][i]->GetYaxis()->SetTitle(
"v (cm)");
268 for (
int i = 1; i <= 2; i++) {
269 for (
int j = 1; j <= 7; j++) {
270 TString h_name =
"h_3" + std::to_string(j) + std::to_string(i);
271 TString title =
"Layer:Ladder:Sensor = 3:" + std::to_string(j) +
":" + std::to_string(i);
272 h_Lyr3[j][i] =
new TH2F(h_name, title, 100, -1.92, 1.92, 100, -6.14, 6.14);
273 h_Lyr3[j][i]->GetXaxis()->SetTitle(
"u (cm)");
274 h_Lyr3[j][i]->GetYaxis()->SetTitle(
"v (cm)");
277 for (
int i = 1; i <= 2; i++) {
278 for (
int j = 1; j <= 12; j++) {
279 TString h_name =
"h_2" + std::to_string(j) + std::to_string(i);
280 TString title =
"Layer:Ladder:Sensor = 2:" + std::to_string(j) +
":" + std::to_string(i);
281 h_Lyr2[j][i] =
new TH2F(h_name, title, 100, -0.625, 0.625, 100, -3.072, 3.072);
282 h_Lyr2[j][i]->GetXaxis()->SetTitle(
"u (cm)");
283 h_Lyr2[j][i]->GetYaxis()->SetTitle(
"v (cm)");
286 for (
int i = 1; i <= 2; i++) {
287 for (
int j = 1; j <= 8; j++) {
288 TString h_name =
"h_1" + std::to_string(j) + std::to_string(i);
289 TString title =
"Layer:Ladder:Sensor = 1:" + std::to_string(j) +
":" + std::to_string(i);
290 h_Lyr1[j][i] =
new TH2F(h_name, title, 100, -0.625, 0.625, 100, -2.24, 2.24);
291 h_Lyr1[j][i]->GetXaxis()->SetTitle(
"u (cm)");
292 h_Lyr1[j][i]->GetYaxis()->SetTitle(
"v (cm)");
296 TDirectory* TreeDir = oldDir->mkdir(
"Trees_VXDOverlaps");
299 t_PXD =
new TTree(
"t_PXD",
"Tree for PXD overlaps");
320 t_SVD_U =
new TTree(
"t_SVD_U",
"Tree for SVD u-overlaps");
392 t_SVD_V =
new TTree(
"t_SVD_V",
"Tree for SVD v-overlaps");
474 for (
const auto& trk : recoTracks) {
475 if (! trk.wasFitSuccessful()) {
478 const std::vector<PXDCluster* > pxdClusters = trk.getPXDHitList();
479 const std::vector<SVDCluster* > svdClusters = trk.getSVDHitList();
480 B2DEBUG(29,
"FITTED TRACK: NUMBER OF PXD HITS = " << pxdClusters.size() <<
" NUMBER OF SVD HITS = " << svdClusters.size());
482 for (
unsigned int i = 0; i < pxdClusters.size(); i++) {
488 const auto* hitTrackPoint_1 = trk.getCreatedTrackPoint(infoPXD_1);
489 const auto* fittedResult_1 = hitTrackPoint_1->getFitterInfo();
490 if (!fittedResult_1) {
497 for (
unsigned int l = i + 1; l < pxdClusters.size(); l++) {
503 const auto* hitTrackPoint_2 = trk.getCreatedTrackPoint(infoPXD_2);
504 const auto* fittedResult_2 = hitTrackPoint_2->getFitterInfo();
505 if (!fittedResult_2) {
512 if (pxd_Layer_1 == pxd_Layer_2 && ((pxd_Ladder_2 - pxd_Ladder_1) == -1.0 || (pxd_Ladder_2 - pxd_Ladder_1) == 7.0
513 || (pxd_Ladder_2 - pxd_Ladder_1) == 11.0)) {
514 B2DEBUG(29,
" ============= 2 hits in a PXD overlap ============= ");
515 const TVectorD resUnBias_PXD_1 = fittedResult_1->getResidual(0,
false).getState();
516 const TVectorD resUnBias_PXD_2 = fittedResult_2->getResidual(0,
false).getState();
521 const float over_U_PXD = res_U_2 - res_U_1;
522 const float over_V_PXD = res_V_2 - res_V_1;
523 const ROOT::Math::XYZVector pxdLocal_1(pxd_1->
getU(), pxd_1->
getV(), 0.);
524 const ROOT::Math::XYZVector pxdLocal_2(pxd_2->
getU(), pxd_2->
getV(), 0.);
527 const ROOT::Math::XYZVector& pxdGlobal_1 = pxdSensor_1.
pointToGlobal(pxdLocal_1);
528 const ROOT::Math::XYZVector& pxdGlobal_2 = pxdSensor_2.
pointToGlobal(pxdLocal_2);
529 double pxdPhi_1 = atan2(pxdGlobal_1.Y(), pxdGlobal_1.X());
530 double pxdPhi_2 = atan2(pxdGlobal_2.Y(), pxdGlobal_2.X());
531 double pxdZ_1 = pxdGlobal_1.Z();
532 double pxdZ_2 = pxdGlobal_2.Z();
533 B2DEBUG(29,
"PXD: difference of residuals " << over_U_PXD <<
" " << over_V_PXD);
563 if (pxd_Layer_1 == 1 && pxd_Layer_2 == 1) {
565 h_Lyr1[pxd_Ladder_1][pxd_Sensor_1]->Fill(pxd_1->
getU(), pxd_1->
getV());
566 h_Lyr1[pxd_Ladder_2][pxd_Sensor_2]->Fill(pxd_2->
getU(), pxd_2->
getV());
579 if (pxd_Layer_1 == 2 && pxd_Layer_2 == 2) {
581 h_Lyr2[pxd_Ladder_1][pxd_Sensor_1]->Fill(pxd_1->
getU(), pxd_1->
getV());
582 h_Lyr2[pxd_Ladder_2][pxd_Sensor_2]->Fill(pxd_2->
getU(), pxd_2->
getV());
609 ROOT::Math::BoostZ boost(3. / 11);
610 pStar = boost(pStar);
618 for (
unsigned int i = 0; i < svdClusters.size(); i++) {
628 const auto* hitTrackPoint_1 = trk.getCreatedTrackPoint(infoSVD_1);
629 const auto* fittedResult_1 = hitTrackPoint_1->getFitterInfo();
630 if (!fittedResult_1) {
637 for (
unsigned int l = i + 1; l < svdClusters.size(); l++) {
647 const auto* hitTrackPoint_2 = trk.getCreatedTrackPoint(infoSVD_2);
648 const auto* fittedResult_2 = hitTrackPoint_2->getFitterInfo();
649 if (!fittedResult_2) {
656 if (svd_Layer_1 == svd_Layer_2 && ((svd_Ladder_2 - svd_Ladder_1) == 1.0 || (svd_Ladder_2 - svd_Ladder_1) == -6.0
657 || (svd_Ladder_2 - svd_Ladder_1) == -9.0 || (svd_Ladder_2 - svd_Ladder_1) == -11.0 || (svd_Ladder_2 - svd_Ladder_1) == -15.0)) {
658 B2DEBUG(29,
" ============= 2 hits in a SVD overlap ============= ");
659 const TVectorD resUnBias_SVD_1 = fittedResult_1->getResidual(0,
false).getState();
660 const TVectorD resUnBias_SVD_2 = fittedResult_2->getResidual(0,
false).getState();
661 genfit::MeasuredStateOnPlane state_unbiased_1 = fittedResult_1->getFittedState(
false);
662 genfit::MeasuredStateOnPlane state_unbiased_2 = fittedResult_2->getFittedState(
false);
663 const TVectorD& svd_predIntersect_unbiased_1 = state_unbiased_1.getState();
664 const TVectorD& svd_predIntersect_unbiased_2 = state_unbiased_2.getState();
665 const TMatrixDSym& covMatrix_unbiased_1 = state_unbiased_1.getCov();
666 const TMatrixDSym& covMatrix_unbiased_2 = state_unbiased_2.getCov();
667 genfit::MeasuredStateOnPlane state_1 = trk.getMeasuredStateOnPlaneFromRecoHit(infoSVD_1);
668 genfit::MeasuredStateOnPlane state_2 = trk.getMeasuredStateOnPlaneFromRecoHit(infoSVD_2);
669 const TVectorD& svd_predIntersect_1 = state_1.getState();
670 const TVectorD& svd_predIntersect_2 = state_2.getState();
671 const TMatrixDSym& covMatrix_1 = state_1.getCov();
672 const TMatrixDSym& covMatrix_2 = state_2.getCov();
675 const int strips_1 = svd_1->
getSize();
677 const int strips_2 = svd_2->
getSize();
681 const float over_U_SVD = res_U_2 - res_U_1;
682 const ROOT::Math::XYZVector svdLocal_1(svd_1->
getPosition(), svd_predIntersect_1[4], 0.);
683 const ROOT::Math::XYZVector svdLocal_2(svd_2->
getPosition(), svd_predIntersect_2[4], 0.);
686 const ROOT::Math::XYZVector& svdGlobal_1 = svdSensor_1.
pointToGlobal(svdLocal_1);
687 const ROOT::Math::XYZVector& svdGlobal_2 = svdSensor_2.
pointToGlobal(svdLocal_2);
688 double svdPhi_1 = atan2(svdGlobal_1.Y(), svdGlobal_1.X());
689 double svdPhi_2 = atan2(svdGlobal_2.Y(), svdGlobal_2.X());
690 double svdZ_1 = svdGlobal_1.Z();
691 double svdZ_2 = svdGlobal_2.Z();
692 B2DEBUG(29,
"SVD: difference of u-residuals =========> " << over_U_SVD);
701 if (isMC && trueHit_1.
size() > 0)
727 float halfLength = 1.92;
741 B2ERROR(
" Inconsistency with cluster size! # recoDigits = " << theRecoDigits_1.
size() <<
" != " <<
svdSize_U_int <<
749 std::array<float, 6> Samples_1 = ShaperDigit_1->
getSamples();
752 double misalignedStripPos = svdSensor_1.
getUCellPosition(theRecoDigits_1[d]->getCellID());
762 if (isMC && trueHit_2.
size() > 0)
796 B2ERROR(
" Inconsistency with cluster size! # recoDigits = " << theRecoDigits_2.
size() <<
" != " <<
svdSize_U_ext <<
803 std::array<float, 6> Samples_2 = ShaperDigit_2->
getSamples();
806 double misalignedStripPos = svdSensor_2.
getUCellPosition(theRecoDigits_2[d]->getCellID());
819 if (svd_Layer_1 == 3 && svd_Layer_2 == 3) {
830 if (svd_Layer_1 == 4 && svd_Layer_2 == 4) {
841 if (svd_Layer_1 == 5 && svd_Layer_2 == 5) {
852 if (svd_Layer_1 == 6 && svd_Layer_2 == 6) {
866 const int strips_1 = svd_1->
getSize();
868 const int strips_2 = svd_2->
getSize();
872 const float over_V_SVD = res_V_2 - res_V_1;
873 const ROOT::Math::XYZVector svdLocal_1(svd_predIntersect_1[3], svd_1->
getPosition(), 0.);
874 const ROOT::Math::XYZVector svdLocal_2(svd_predIntersect_2[3], svd_2->
getPosition(), 0.);
877 const ROOT::Math::XYZVector& svdGlobal_1 = svdSensor_1.
pointToGlobal(svdLocal_1);
878 const ROOT::Math::XYZVector& svdGlobal_2 = svdSensor_2.
pointToGlobal(svdLocal_2);
879 double svdPhi_1 = atan2(svdGlobal_1.Y(), svdGlobal_1.X());
880 double svdPhi_2 = atan2(svdGlobal_2.Y(), svdGlobal_2.X());
881 double svdZ_1 = svdGlobal_1.Z();
882 double svdZ_2 = svdGlobal_2.Z();
883 B2DEBUG(29,
"SVD: difference of v-residuals =========> " << over_V_SVD);
892 if (isMC && trueHit_1.
size() > 0)
917 float pitch = 160e-4;
918 float halfLength = 6.144;
931 B2ERROR(
" Inconsistency with cluster size! # recoDigits = " << theRecoDigits_1.
size() <<
" != " <<
svdSize_V_int <<
938 std::array<float, 6> Samples_1 = ShaperDigit_1->
getSamples();
941 double misalignedStripPos = svdSensor_1.
getVCellPosition(theRecoDigits_1[d]->getCellID());
951 if (isMC && trueHit_2.
size() > 0)
985 B2ERROR(
" Inconsistency with cluster size! # recoDigits = " << theRecoDigits_2.
size() <<
" != " <<
svdSize_V_ext <<
992 std::array<float, 6> Samples_2 = ShaperDigit_2->
getSamples();
995 double misalignedStripPos = svdSensor_2.
getVCellPosition(theRecoDigits_2[d]->getCellID());
1009 if (svd_Layer_1 == 3 && svd_Layer_2 == 3) {
1020 if (svd_Layer_1 == 4 && svd_Layer_2 == 4) {
1031 if (svd_Layer_1 == 5 && svd_Layer_2 == 5) {
1042 if (svd_Layer_1 == 6 && svd_Layer_2 == 6) {
static const ChargedStable pion
charged pion particle
bool isMC() const
Do we have generated, not real data?
static Environment & Instance()
Static method to get a reference to the Environment instance.
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
void setDescription(const std::string &description)
Sets the description of the module.
float svdTrkQoP_V_int
V internal track q/p.
float svdTrkPosUnbiased_U_int
U internal unbiased track position.
TH2F * h_DeltaResVPhi_Lyr6
2D histogram of DeltaRes_v vs phi of VXD overlaps for layer 6
float svdTrkQoP_U_int
U internal track q/p.
TH1F * h_V_DeltaRes_SVD
Histogram of SVD v-coordinate differences of residuals.
float svdRes_U_int
U internal residual computed by genfit.
float svdTrkPosErr_U_int
U internal track position error.
std::vector< float > svdStrip6Samples_V_ext
V external 6 samples of the strips of the cluster.
std::vector< float > svdStripPosition_U_ext
U external position of the strips of the cluster.
TH2F * h_DeltaResVz_Lyr1
2D histogram of DeltaRes_v vs z of VXD overlaps for layer 1
float svdTrkQoPUnbiased_V_ext
V external unbiased track q/p.
TH2F * h_DeltaResUz_Lyr3
2D histogram of DeltaRes_u vs z of VXD overlaps for layer 3
float svdTrkPos_U_ext
U external track position.
float svdTruePos_V_int
V internal true position.
float svdClPhi_V_ext
V external cluster global phi.
float extResV_PXD
tree t_PXD branch extResV_PXD/F
float svdTrkPosUnbiased_V_ext
V external unbiased track position.
TH1F * h_U_DeltaRes_SVD_Lyr4
Histogram of SVD layer-4 u-coordinate differences of residuals.
std::vector< float > svdStripCharge_U_ext
U external charge of the strips of the cluster.
unsigned int svdLayer_U_ext
U external layer.
float svdTrkPrimeUnbiased_U_int
U internal unbiased tan of incident angle projected on u,w.
float extResU_PXD
tree t_PXD branch extResU_PXD/F
TH2F * h_DeltaResUPhi_Lyr2
2D histogram of DeltaRes_u vs phi of VXD overlaps for layer 2
TH2F * h_DeltaResUPhi_Lyr5
2D histogram of DeltaRes_u vs phi of VXD overlaps for layer 5
TH2F * h_DeltaResUPhi_Lyr3
2D histogram of DeltaRes_u vs phi of VXD overlaps for layer 3
float svdTrkPos_V_int
V internal track position.
TH1F * h_U_DeltaRes_PXD_Lyr1
Histogram of PXD layer-1 u-coordinate differences of residuals.
float svdTrkTraversedLength_V_int
V internal traversed length of the track in the sensor.
TH2F * h_DeltaResUz_Lyr2
2D histogram of DeltaRes_u vs z of VXD overlaps for layer 2
float svdTrkPosOS_V_ext
V external track position on the other side.
OverlapResidualsModule()
Constructor.
float svdClTime_V_ext
V external cluster time.
float svdRes_V_ext
V external residual computed by genfit.
float svdTrkPosOS_U_ext
U external track position on the other side.
float svdTrkPosErrUnbiased_V_int
V internal unbiased track position error.
float svdTrkPrimeOS_U_int
U internal tan of incident angle projected on v/u,w (other side)
std::vector< float > svdStripTime_V_ext
V external time of the strips of the cluster.
TH2F * h_DeltaResUPhi_Lyr1
2D Histogram of DeltaRes_u vs phi of VXD overlaps for layer 1
unsigned int svdLadder_U_ext
U external ladder.
TH2F * h_DeltaResVz_Lyr4
2D histogram of DeltaRes_v vs z of VXD overlaps for layer 4
int svdTrkPXDHits
number of PXD hits on the track
TH1F * h_U_DeltaRes_PXD
Histogram of PXD u-coordinate differences of residuals.
unsigned int extLayer_PXD
tree t_PXD branch extLayer_PXD/i
void initialize() override
Register input and output data.
TH2F * h_DeltaResVPhi_Lyr5
2D histogram of DeltaRes_v vs phi of VXD overlaps for layer 5
float svdTrkQoP_V_ext
V external track q/p.
float svdClIntStrPos_V_ext
V external cluster interstrip position.
std::vector< float > svdStrip6Samples_U_ext
U external 6 samples of the strips of the cluster.
float svdClSNR_V_int
V internal cluster SNR.
float svdTrkPrimeUnbiased_V_ext
V external unbiased tan of incident angle projected on u,w.
unsigned int svdLadder_V_ext
V external ladder.
TH2F * h_Lyr1[9][3]
Sensor hit-map for layer 1 from reconstructed u and v coordinates.
float svdClSNR_U_ext
U external cluster SNR.
unsigned int svdLadder_U_int
U internal ladder.
float svdClSNR_V_ext
V external cluster SNR.
unsigned int svdLayer_V_ext
V external layer.
float svdTrkQoPUnbiased_U_int
U internal unbiased track q/p.
float svdTrkPrimeUnbiased_U_ext
U external unbiased tan of incident angle projected on u,w.
void event() override
Compute the difference of coordinate residuals between two hits in overlapping sensors of a same VXD ...
TH2F * h_DeltaResVPhi_Lyr3
2D histogram of DeltaRes_v vs phi of VXD overlaps for layer 3
TH2F * h_DeltaResVPhi_Lyr4
2D histogram of DeltaRes_v vs phi of VXD overlaps for layer 4
TH1F * h_V_DeltaRes_PXD_Lyr1
Histogram of PXD layer-1 v-coordinate differences of residuals.
float extU_PXD
tree t_PXD branch extU_PXD/F
float svdTrkTraversedLength_U_ext
U external traversed length of the track in the sensor.
float extPhi_PXD
tree t_PXD branch extPhi/PXD/F
float svdClZ_U_int
U internal cluster global Z.
float svdTruePos_U_int
U internal true position.
TH2F * h_DeltaResVz_Lyr3
2D histogram of DeltaRes_v vs z of VXD overlaps for layer 3
float svdRes_U_ext
U external residual computed by genfit.
unsigned int extLadder_PXD
tree t_PXD branch extLadder_PXD/i
unsigned int svdSensor_V_int
V internal sensor.
float svdTruePos_V_ext
V external true position.
float svdClPos_U_int
U internal cluster position.
TH1F * h_U_DeltaRes_SVD_Lyr6
Histogram of SVD layer-6 u-coordinate differences of residuals.
TTree * t_SVD_V
Tree containing global information on SVD v-coordinate overlaps.
TH1F * h_V_DeltaRes_PXD
Histogram of PXD v-coordinate differences of residuals.
unsigned int intLayer_PXD
tree t_PXD branch intLayer_PXD/i
float svdTrkd0
d0 of the track
float svdClPosErr_U_ext
U external cluster position error.
TTree * t_SVD_U
Tree containing global information on SVD u-coordinate overlaps.
float svdTrkz0
z0 of the track
std::vector< float > svdStripCharge_V_int
V internal charge of the strips of the cluster.
float svdClCharge_U_int
U internal cluster charge.
float svdClCharge_U_ext
U external cluster charge.
std::vector< float > svdStrip6Samples_V_int
V internal 6 samples of the strips of the cluster.
TH2F * h_DeltaResUPhi_Lyr6
2D histogram of DeltaRes_u vs phi of VXD overlaps for layer 6
float svdClTime_U_int
U internal cluster time.
TH2F * h_DeltaResUz_Lyr5
2D histogram of DeltaRes_u vs z of VXD overlaps for layer 5
float svdTrkPosUnbiased_V_int
V internal unbiased track position.
float svdClIntStrPos_U_int
U internal cluster interstrip position.
float svdTrkQoPUnbiased_V_int
V internal unbiased track q/p.
float svdClTime_U_ext
U external cluster time.
std::vector< float > svdStripCharge_U_int
U internal charge of the strips of the cluster.
unsigned int svdLadder_V_int
V internal ladder.
unsigned int svdSize_V_int
V internal size.
TH2F * h_DeltaResVz_Lyr5
2D histogram of DeltaRes_v vs z of VXD overlaps for layer 5
unsigned int svdLayer_V_int
V internal layer.
float svdTrkPosErr_V_ext
V external track position error.
float svdTrkPrime_U_ext
U external tan of incident angle projected on u,w.
float svdDeltaRes_V
V difference between external and internal residual.
TH1F * h_U_Cl1Cl2_DeltaRes[5]
Histogram of SVD differences of u-coordinate residuals grouped by clusters sizes.
float svdTrkPosErrUnbiased_U_ext
U external unbiased track position error.
TH2F * h_DeltaResVz_Lyr6
2D histogram of DeltaRes_v vs z of VXD overlaps for layer 6
float extV_PXD
tree t_PXD branch extV_PXD/F
float svdTrkPosOS_U_int
U internal track position on the other side.
float svdTrkQoPUnbiased_U_ext
U external unbiased track q/p.
TH2F * h_Lyr4[11][4]
Sensor hit-map for layer 4 from reconstructed u and v coordinates.
TH1F * h_V_DeltaRes_SVD_Lyr6
Histogram of SVD layer-6 v-coordinate differences of residuals.
unsigned int svdSensor_V_ext
V external sensor.
float svdTrkpCM
pCM of the track
int svdTrkCDCHits
number of PXD hits on the track
float svdClPosErr_V_int
V internal cluster position error.
TH1F * h_V_DeltaRes_SVD_Lyr3
Histogram of SVD layer-3 v-coordinate differences of residuals.
TH1F * h_V_Cl1Cl2_DeltaRes[5]
Histogram of SVD differences of v-coordinate residuals grouped by clusters sizes.
float svdTrkPosErr_U_ext
U external track position error.
float svdTrkPrime_U_int
U internal tan of incident angle projected on u,w.
float svdRes_V_int
V internal residual computed by genfit.
float svdTrkPrimeOS_V_ext
V external tan of incident angle projected on v/u,w (other side)
TH1F * h_V_DeltaRes_PXD_Lyr2
Histogram of PXD layer-2 v-coordinate differences of residuals.
TH1F * h_U_DeltaRes_SVD_Lyr5
Histogram of SVD layer-5 u-coordinate differences of residuals.
float svdTrkPosErr_V_int
V internal track position error.
TH1F * h_V_DeltaRes_SVD_Lyr5
Histogram of SVD layer-5 v-coordinate differences of residuals.
float svdClPosErr_V_ext
V external cluster position error.
float deltaResU_PXD
tree t_PXD branch deltaResU/F
TH2F * h_Lyr2[13][3]
Sensor hit-map for layer 2 from reconstructed u and v coordinates.
float svdDeltaRes_U
U difference between external and internal residual.
float intU_PXD
tree t_PXD branch intU_PXD/F
unsigned int extSensor_PXD
tree t_PXD branch extSensor_PXD/i
std::vector< float > svdStripPosition_V_ext
V external position of the strips of the cluster.
float svdClIntStrPos_V_int
V internal cluster interstrip position.
float svdTrkPosErrUnbiased_U_int
U internal unbiased track position error.
TH1F * h_V_DeltaRes_SVD_Lyr4
Histogram of SVD layer-4 v-coordinate differences of residuals.
float svdTrkPosErrUnbiased_V_ext
V external unbiased track position error.
std::vector< float > svdStripCharge_V_ext
V external charge of the strips of the cluster.
std::vector< float > svdStripTime_U_ext
U external time of the strips of the cluster.
TH2F * h_DeltaResUPhi_Lyr4
2D histogram of DeltaRes_u vs phi of VXD overlaps for layer 4
float intZ_PXD
tree t_PXD branch intZ_PXD/F
float svdClPos_V_ext
V external cluster position.
float svdTrkPosErrOS_V_int
V internal track position error on the other side.
std::vector< float > svdStripPosition_U_int
U internal position of the strips of the cluster.
bool m_ExpertLevel
Expert level switch.
unsigned int svdSensor_U_int
U internal sensor.
std::vector< float > svdStrip6Samples_U_int
U internal 6 samples of the strips of the cluster.
float svdClPosErr_U_int
U internal cluster position error.
float svdClIntStrPos_U_ext
U external cluster interstrip position.
float svdClTime_V_int
V internal cluster time.
TH2F * h_DeltaResVPhi_Lyr2
2D histogram of DeltaRes_v vs phi of VXD overlaps for layer 2
TH1F * h_U_DeltaRes
Histogram of VXD ( PXD + SVD ) differences of u-coordinate residuals.
float svdTrkPrime_V_ext
V external tan of incident angle projected on u,w.
float svdTrkTraversedLength_U_int
U internal traversed length of the track in the sensor.
TH2F * h_DeltaResUz_Lyr4
2D histogram of DeltaRes_u vs z of VXD overlaps for layer 4
TH2F * h_Lyr5[13][5]
Sensor hit-map for layer 5 from reconstructed u and v coordinates.
TH1F * h_SVDstrips_Mult
Histogram of SVD strips multiplicity.
TH2F * h_DeltaResUz_Lyr6
2D histogram of DeltaRes_u vs z of VXD overlaps for layer 6
float extZ_PXD
tree t_PXD branch extZ_PXD/F
TH2F * h_Lyr3[8][3]
Sensor hit-map for layer 3 from reconstructed u and v coordinates.
float svdClZ_V_int
V internal cluster global Z.
float svdTrkPrime_V_int
V internal tan of incident angle projected on u,w.
float svdTrkTraversedLength_V_ext
V external traversed length of the track in the sensor.
float svdClCharge_V_ext
V external cluster charge.
unsigned int svdSize_U_int
U internal size.
TH2F * h_DeltaResVPhi_Lyr1
2D histogram of DeltaRes_v vs phi of VXD overlaps for layer 1
std::vector< float > svdStripTime_V_int
V internal time of the strips of the cluster.
float svdClPhi_U_int
U internal cluster global phi.
TH2F * h_DeltaResUz_Lyr1
2D histogram of DeltaRes_u vs z of VXD overlaps for layer 1
float svdClSNR_U_int
U internal cluster SNR.
unsigned int svdLayer_U_int
U internal layer.
float svdClCharge_V_int
V internal cluster charge.
float svdTrkpT
pT of the track
unsigned int svdSensor_U_ext
U external sensor.
float intV_PXD
tree t_PXD branch intV_PXD/F
TH2F * h_Lyr6[17][6]
Sensor hit-map for layer 6 from reconstructed u and v coordinates.
std::vector< float > svdStripPosition_V_int
V internal position of the strips of the cluster.
float svdTrkPrimeOS_U_ext
U external tan of incident angle projected on v/u,w (other side)
unsigned int intSensor_PXD
tree t_PXD branch intSensor_PXD/i
std::vector< float > svdStripTime_U_int
U internal time of the strips of the cluster.
float svdTrkPrimeUnbiased_V_int
V internal unbiased tan of incident angle projected on u,w.
TH2F * h_DeltaResVz_Lyr2
2D histogram of DeltaRes_v vs z of VXD overlaps for layer 2
unsigned int intLadder_PXD
tree t_PXD branch intLadder_PXD/i
float svdClPos_V_int
V internal cluster position.
std::string m_recoTracksStoreArrayName
StoreArray name of the input and output RecoTracks.
float svdTrkPos_V_ext
V external track position.
float svdClZ_U_ext
U external cluster global Z.
int svdTrkSVDHits
number of PXD hits on the track
float intPhi_PXD
tree t_PXD branch intPhi_PXD/F
float svdTrkPrimeOS_V_int
V internal tan of incident angle projected on v/u,w (other side)
float svdTrkPosErrOS_U_ext
U external track position error on the other side.
TTree * t_PXD
Tree containing global information on PXD overlaps.
float svdTrkPosErrOS_U_int
U internal track position error on the other side.
float svdTrkQoP_U_ext
U external track q/p.
float svdClZ_V_ext
V external cluster global Z.
float svdClPhi_V_int
V internal cluster global phi.
TH1F * h_V_DeltaRes
Histogram of VXD ( PXD + SVD ) differences of v-coordinate residuals.
float svdTrkPosOS_V_int
V internal track position on the other side.
unsigned int svdSize_V_ext
V external size.
float intResV_PXD
tree t_PXD branch intResV/PXD/F
TH1F * h_U_DeltaRes_SVD_Lyr3
Histogram of SVD layer-3 u-coordinate differences of residuals.
TH1F * h_U_DeltaRes_PXD_Lyr2
Histogram of PXD layer-2 u-coordinate differences of residuals.
float svdClPhi_U_ext
U external cluster global phi.
TH1F * h_U_DeltaRes_SVD
Histogram of SVD u-coordinate differences of residuals.
float svdClPos_U_ext
U external cluster position.
float svdTruePos_U_ext
U external true position.
float svdTrkPosErrOS_V_ext
V external track position error on the other side.
void defineHisto() override
Histogram definitions such as TH1(), TH2(), TNtuple(), TTree()....
float svdTrkPosUnbiased_U_ext
U external unbiased track position.
float svdTrkPos_U_int
U internal track position.
unsigned int svdSize_U_ext
U external size.
float intResU_PXD
tree t_PXD branch intResU_PXD/F
The PXD Cluster class This class stores all information about reconstructed PXD clusters The position...
float getV() const
Get v coordinate of hit position.
VxdID getSensorID() const
Get the sensor ID.
float getU() const
Get u coordinate of hit position.
Class for type safe access to objects that are referred to in relations.
size_t size() const
Get number of relations.
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
float getClsTime() const
Get average of waveform maximum times of cluster strip signals.
float getSNR() const
Get cluster SNR.
unsigned short getSize() const
Get cluster size.
float getCharge() const
Get collected charge.
VxdID getSensorID() const
Get the sensor ID.
bool isUCluster() const
Get the direction of strips.
float getPosition(double v=0) const
Get the coordinate of reconstructed hit.
float getPositionSigma() const
Get the error of the reconstructed hit coordinate.
The SVD ShaperDigit class.
APVFloatSamples getSamples() const
Get array of samples.
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::PxPyPzEVector get4Momentum() const
Getter for the 4Momentum at the closest approach of the track in the r/phi projection.
double getD0() const
Getter for d0.
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.
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
static GeoCache & getInstance()
Return a reference to the singleton instance.
Base class to provide Sensor Information for PXD and SVD.
double getVCellPosition(int vID) const
Return the position of a specific strip/pixel in v direction.
double getUCellPosition(int uID, int vID=-1) const
Return the position of a specific strip/pixel in u direction.
ROOT::Math::XYZVector pointToGlobal(const ROOT::Math::XYZVector &local, bool reco=false) const
Convert a point from local to global coordinates.
double getThickness() const
Return the thickness of the sensor.
Class to uniquely identify a any structure of the PXD and SVD.
baseType getSensorNumber() const
Get the sensor id.
baseType getLadderNumber() const
Get the ladder id.
baseType getLayerNumber() const
Get the layer id.
void addParam(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
static double convertValueToUnit(double value, const std::string &unitString)
Converts a floating point value from the standard framework unit to the given unit.
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.