Belle II Software  release-05-01-25
SVDClusterEvaluationTrueInfoModule.cc
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Michael De Nuccio, Giulia Casarosa *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #include <svd/modules/svdPerformance/SVDClusterEvaluationTrueInfoModule.h>
12 #include <framework/datastore/StoreArray.h>
13 #include <mdst/dataobjects/MCParticle.h>
14 #include <svd/dataobjects/SVDShaperDigit.h>
15 #include <svd/dataobjects/SVDRecoDigit.h>
16 #include <svd/dataobjects/SVDCluster.h>
17 #include <svd/dataobjects/SVDTrueHit.h>
18 
19 #include <TCanvas.h>
20 #include <TFile.h>
21 #include <TGraphErrors.h>
22 #include <TText.h>
23 
24 #include <string>
25 
26 
27 using namespace Belle2;
28 
29 
30 REG_MODULE(SVDClusterEvaluationTrueInfo)
31 
32 
33 SVDClusterEvaluationTrueInfoModule::SVDClusterEvaluationTrueInfoModule() : Module()
34 {
35  setDescription("This modules generates performance plots on SVD clustering.");
36 
37  addParam("outputFileName", m_outputFileName, "output rootfile name", std::string("SVDClusterEvaluationTrueInfo.root"));
38  addParam("SVDEventInfo", m_svdEventInfoName, "Defines the name of the EventInfo", std::string(""));
39 }
40 
41 
42 SVDClusterEvaluationTrueInfoModule::~SVDClusterEvaluationTrueInfoModule()
43 {
44 }
45 
46 
48 {
49 
50  /* initialize useful store array */
51  StoreArray<SVDShaperDigit> SVDShaperDigits;
52  StoreArray<SVDRecoDigit> SVDRecoDigits;
53  StoreArray<SVDCluster> SVDClusters;
54  StoreArray<SVDTrueHit> SVDTrueHits;
55 
56  SVDShaperDigits.isRequired();
57  SVDRecoDigits.isRequired();
58  SVDClusters.isRequired();
59  SVDTrueHits.isRequired();
60  if (!m_storeSVDEvtInfo.isOptional(m_svdEventInfoName)) m_svdEventInfoName = "SVDEventInfoSim";
62 
63 
64  m_outputFile = new TFile(m_outputFileName.c_str(), "RECREATE");
65 
68  m_histoList_ClusterTimePull = new TList;
71  m_histo2DList_TresVsPosres = new TList;
75  m_histoList_THinCluster = new TList;
76  m_histoList_THinClusterTM = new TList;
79  m_graphList = new TList;
80  //Control List
81  m_histoList_Control = new TList;
82 
83  for (int i = 0; i < m_Nsets; i ++) {
84 
85  if (i % 2 == 0) { //even index, U side
86  NameOfHisto = "histo_ClusterUPositionResolution_" + IntExtFromIndex(i) + "_" + FWFromIndex(i);
87  TitleOfHisto = "U-Cluster Position Resolution (" + IntExtFromIndex(i) + ", " + FWFromIndex(i) + ")";
89  "U_reco - U_true (cm)",
91 
92  NameOfHisto = "histo_ClusterUPositionPull_" + IntExtFromIndex(i) + "_" + FWFromIndex(i);
93  TitleOfHisto = "U-Cluster Position Pull (" + IntExtFromIndex(i) + ", " + FWFromIndex(i) + ")";
95  "(U_reco - U_true)/U_sigma",
97  } else { //odd index, V side
98  NameOfHisto = "histo_ClusterVPositionResolution_" + IntExtFromIndex(i) + "_" + FWFromIndex(i);
99  TitleOfHisto = "V-Cluster Position Resolution (" + IntExtFromIndex(i) + ", " + FWFromIndex(i) + ")";
101  "V_reco - V_true (cm)", m_histoList_ClusterPositionResolution);
102 
103  NameOfHisto = "histo_ClusterVPositionPull_" + IntExtFromIndex(i) + "_" + FWFromIndex(i);
104  TitleOfHisto = "Cluster V Position Pull (" + IntExtFromIndex(i) + ", " + FWFromIndex(i) + ")";
106  "(V_reco- V_true)/V_sigma", m_histoList_ClusterPositionPull);
107  }
108 
109  NameOfHisto = "histo_StripTimeResolution_" + IntExtFromIndex(i) + "_" + FWFromIndex(i) + "_Side" + UVFromIndex(i);
110  TitleOfHisto = "Strip Time Resolution (" + IntExtFromIndex(i) + ", " + FWFromIndex(i) + ", side" + UVFromIndex(i) + ")";
111  m_histo_StripTimeResolution[i] = createHistogram1D(NameOfHisto, TitleOfHisto, 400, -100, 100, "t_reco - t_true (ns)",
113 
114  NameOfHisto = "histo_ClusterTimeResolution_" + IntExtFromIndex(i) + "_" + FWFromIndex(i) + "_Side" + UVFromIndex(i);
115  TitleOfHisto = "Cluster Time Resolution (" + IntExtFromIndex(i) + ", " + FWFromIndex(i) + ", side" + UVFromIndex(i) + ")";
116  m_histo_ClusterTimeResolution[i] = createHistogram1D(NameOfHisto, TitleOfHisto, 400, -100, 100, "t_reco - t_true (ns)",
118 
119  NameOfHisto = "histo_ClusterTimeResolution_bin1_" + IntExtFromIndex(i) + "_" + FWFromIndex(i) + "_Side" + UVFromIndex(i);
120  TitleOfHisto = "Cluster Time Resolution TriggerBin=1(" + IntExtFromIndex(i) + ", " + FWFromIndex(i) + ", side" + UVFromIndex(
121  i) + ")";
122  m_histo_ClusterTimeResolution_bin1[i] = createHistogram1D(NameOfHisto, TitleOfHisto, 400, -100, 100, "t_reco - t_true (ns)",
124  NameOfHisto = "histo_ClusterTimeResolution_bin2_" + IntExtFromIndex(i) + "_" + FWFromIndex(i) + "_Side" + UVFromIndex(i);
125  TitleOfHisto = "Cluster Time Resolution TriggerBin=2(" + IntExtFromIndex(i) + ", " + FWFromIndex(i) + ", side" + UVFromIndex(
126  i) + ")";
127  m_histo_ClusterTimeResolution_bin2[i] = createHistogram1D(NameOfHisto, TitleOfHisto, 400, -100, 100, "t_reco - t_true (ns)",
129  NameOfHisto = "histo_ClusterTimeResolution_bin3_" + IntExtFromIndex(i) + "_" + FWFromIndex(i) + "_Side" + UVFromIndex(i);
130  TitleOfHisto = "Cluster Time Resolution TriggerBin=3(" + IntExtFromIndex(i) + ", " + FWFromIndex(i) + ", side" + UVFromIndex(
131  i) + ")";
132  m_histo_ClusterTimeResolution_bin3[i] = createHistogram1D(NameOfHisto, TitleOfHisto, 400, -100, 100, "t_reco - t_true (ns)",
134  NameOfHisto = "histo_ClusterTimeResolution_bin4_" + IntExtFromIndex(i) + "_" + FWFromIndex(i) + "_Side" + UVFromIndex(i);
135  TitleOfHisto = "Cluster Time Resolution TriggerBin=4(" + IntExtFromIndex(i) + ", " + FWFromIndex(i) + ", side" + UVFromIndex(
136  i) + ")";
137  m_histo_ClusterTimeResolution_bin4[i] = createHistogram1D(NameOfHisto, TitleOfHisto, 400, -100, 100, "t_reco - t_true (ns)",
139 
140  NameOfHisto = "histo_ClusterTimePull_" + IntExtFromIndex(i) + "_" + FWFromIndex(i) + "_Side" + UVFromIndex(i);
141  TitleOfHisto = "Cluster Time Pull (" + IntExtFromIndex(i) + ", " + FWFromIndex(i) + ", side" + UVFromIndex(i) + ")";
142  m_histo_ClusterTimePull[i] = createHistogram1D(NameOfHisto, TitleOfHisto, 210, -10, 11, "(t_reco - t_true)/t_sigma",
144 
145  NameOfHisto = "histo2D_TresVsPosres_" + IntExtFromIndex(i) + "_" + FWFromIndex(i) + "_Side" + UVFromIndex(i);
146  TitleOfHisto = "Time Residuals Vs U/V Position Residuals (" + IntExtFromIndex(
147  i) + ", " + FWFromIndex(i) + ", side" + UVFromIndex(i) + ")";
148  m_histo2D_TresVsPosres[i] = createHistogram2D(NameOfHisto, TitleOfHisto, 200, -0.1, 0.1, "U/V_reco - U/V_true (cm)", 180, -120, 60,
149  "t_reco - t_true (ns)", m_histo2DList_TresVsPosres);
150 
151  NameOfHisto = "histo_PurityInsideTMCluster_" + IntExtFromIndex(i) + "_" + FWFromIndex(i) + "_Side" + UVFromIndex(i);
152  TitleOfHisto = "Fraction of Truth-Matched RecoDigits inside a Truth-Matched Cluster (" + IntExtFromIndex(i) + ", " + FWFromIndex(
153  i) + ", side" + UVFromIndex(i) + ")";
155  "number of TM recoDigits / cluster size",
157 
158  NameOfHisto = "histo2D_PurityInsideTMCluster_" + IntExtFromIndex(i) + "_" + FWFromIndex(i) + "_Side" + UVFromIndex(i);
159  TitleOfHisto = "Number of Truth-matched Recos vs Number of Recos inside a Truth-matched Cluster (" + IntExtFromIndex(
160  i) + ", " + FWFromIndex(i) + ", side" + UVFromIndex(i) + ")";
161  m_histo2D_PurityInsideTMCluster[i] = createHistogram2D(NameOfHisto, TitleOfHisto, 42, 0, 42, "cluster size", 42, 0, 42,
162  "number of TM recos", m_histo2DList_PurityInsideTMCluster);
163 
164  NameOfHisto = "histo_PurityInsideNOTMCluster_" + IntExtFromIndex(i) + "_" + FWFromIndex(i) + "_Side" + UVFromIndex(i);
165  TitleOfHisto = "Fraction of Truth-matched RecoDigits inside a NOT Truth-matched Cluster (" + IntExtFromIndex(
166  i) + ", " + FWFromIndex(
167  i) + ", side" + UVFromIndex(i) + ")";
169  "number of TM recoDigits / cluster size",
171 
172  NameOfHisto = "histo_THinCluster_" + IntExtFromIndex(i) + "_" + FWFromIndex(i) + "_Side" + UVFromIndex(i);
173  TitleOfHisto = "Number of True Hits inside a Cluster (" + IntExtFromIndex(i) + ", " + FWFromIndex(i) + ", side" + UVFromIndex(
174  i) + ")";
175  m_histo_THinCluster[i] = createHistogram1D(NameOfHisto, TitleOfHisto, 15, 0 , 15, "number of TH per cluster",
177 
178  NameOfHisto = "histo_THinClusterTM_" + IntExtFromIndex(i) + "_" + FWFromIndex(i) + "_Side" + UVFromIndex(i);
179  TitleOfHisto = "Number of True Hits inside a Truth-matched Cluster (" + IntExtFromIndex(i) + ", " + FWFromIndex(
180  i) + ", side" + UVFromIndex(i) + ")";
181  m_histo_THinClusterTM[i] = createHistogram1D(NameOfHisto, TitleOfHisto, 15, 0 , 15, "number of TH per TM cluster",
183 
184  NameOfHisto = "histo_GoodTHinClusterTM_" + IntExtFromIndex(i) + "_" + FWFromIndex(i) + "_Side" + UVFromIndex(i);
185  TitleOfHisto = "Number of Good True Hits inside a Truth-matched Cluster (" + IntExtFromIndex(i) + ", " + FWFromIndex(
186  i) + ", side" + UVFromIndex(i) + ")";
187  m_histo_GoodTHinClusterTM[i] = createHistogram1D(NameOfHisto, TitleOfHisto, 15, 0 , 15, "number of Good TH per TM cluster",
189 
190  NameOfHisto = "histo_GoodTHinClusterTMGood_" + IntExtFromIndex(i) + "_" + FWFromIndex(i) + "_Side" + UVFromIndex(i);
191  TitleOfHisto = "Number of Good True Hits inside a Good Truth-matched Cluster (" + IntExtFromIndex(i) + ", " + FWFromIndex(
192  i) + ", side" + UVFromIndex(i) + ")";
193  m_histo_GoodTHinClusterTMGood[i] = createHistogram1D(NameOfHisto, TitleOfHisto, 15, 0 , 15, "number of Good TH per Good TM cluster",
195  }
196 
197  //Control Histos
198  m_histoControl_MCcharge = createHistogram1D("m_histoControl_MCcharge", "m_histoControl_MCcharge", 5, -2, 3,
199  "charge of the first MC particle related to a True Hit", m_histoList_Control);
200  m_histoControl_MCisPrimary = createHistogram1D("m_histoControl_MCisPrimary", "m_histoControl_MCisPrimary", 2, 0, 2,
201  "isPrimary of the first MC particle related to a True Hit", m_histoList_Control);
202  m_histoControl_THToMCsize = createHistogram1D("m_histoControl_THToMCsize", "m_histoControl_THToMCsize", 10, -1, 9,
203  "size of the THToMC relation arrau", m_histoList_Control);
204 }
205 
206 
208 {
209 }
210 
211 
213 {
214 
215  SVDModeByte modeByte = m_storeSVDEvtInfo->getModeByte();
216 
217  StoreArray<SVDShaperDigit> SVDShaperDigits;
218  StoreArray<SVDRecoDigit> SVDRecoDigits;
219  StoreArray<SVDCluster> SVDClusters;
220  StoreArray<SVDTrueHit> SVDTrueHits;
221 
223  //STRIPS//
225 
226  //loop on ShaperDigits
227  for (const SVDShaperDigit& shape : SVDShaperDigits) {
228  indexForHistosAndGraphs = indexFromLayerSensorSide(shape.getSensorID().getLayerNumber() , shape.getSensorID().getSensorNumber() ,
229  shape.isUStrip());
230 
231  RelationVector<SVDRecoDigit> relatVectorShaperToReco = DataStore::getRelationsWithObj<SVDRecoDigit>(&shape);
232 
233  //efficiency shaper to reco
235  if (relatVectorShaperToReco.size() > 0)
237  }
238  //close loop on ShaperDigits
239 
240  //loop on RecoDigits
241  for (const SVDRecoDigit& reco : SVDRecoDigits) {
242  indexForHistosAndGraphs = indexFromLayerSensorSide(reco.getSensorID().getLayerNumber() , reco.getSensorID().getSensorNumber() ,
243  reco.isUStrip());
244 
245  RelationVector<SVDTrueHit> relatVectorRecoToTH = DataStore::getRelationsWithObj<SVDTrueHit>(&reco);
246 
247  //strip time resolution
248  if (relatVectorRecoToTH.size() > 0)
249  m_histo_StripTimeResolution[indexForHistosAndGraphs]->Fill(reco.getTime() - (relatVectorRecoToTH[0])->getGlobalTime());
250 
251  }
252  //close loop on RecoDigits
253 
255  //CLUSTERS//
257 
258  //loop on TrueHits
259  for (const SVDTrueHit& trhi : SVDTrueHits) {
260 
261  if (goodTrueHit(&trhi)) { //enter only if the TH is related to a primary and charged MC particle
262  indexForHistosAndGraphs = indexFromLayerSensorSide(trhi.getSensorID().getLayerNumber() , trhi.getSensorID().getSensorNumber() , 1);
263 
264  RelationVector<SVDCluster> relatVectorTHToClus = DataStore::getRelationsWithObj<SVDCluster>(&trhi);
265 
266  //efficiencies TH to cluster
269 
270  bool hasU = false;
271  bool hasV = false;
272 
273  for (int j = 0; j < (int) relatVectorTHToClus.size(); j ++) {
274  indexForHistosAndGraphs = indexFromLayerSensorSide(relatVectorTHToClus[j]->getSensorID().getLayerNumber() ,
275  relatVectorTHToClus[j]->getSensorID().getSensorNumber() , relatVectorTHToClus[j]->isUCluster());
276 
277  if (relatVectorTHToClus[j]->isUCluster() && ! hasU) {
279  hasU = true;
280  } else if (!relatVectorTHToClus[j]->isUCluster() && ! hasV) {
282  hasV = true;
283  }
284  }
285  }
286  }
287  //close loop on TrueHits
288 
289  //loop on Clusters
290  for (const SVDCluster& clus : SVDClusters) {
291  indexForHistosAndGraphs = indexFromLayerSensorSide(clus.getSensorID().getLayerNumber() , clus.getSensorID().getSensorNumber() ,
292  clus.isUCluster());
293 
294  RelationVector<SVDTrueHit> relatVectorClusToTH = DataStore::getRelationsWithObj<SVDTrueHit>(&clus);
295 
296  //purity "outside" clusters
298  if (relatVectorClusToTH.size() > 0)
300 
301  //fill the THinCluster histo with the number of TH a cluster is composed of
302  m_histo_THinCluster[indexForHistosAndGraphs]->Fill(relatVectorClusToTH.size());
303 
304  //loop on the TH related to the cluster
305  for (int q = 0; q < (int)relatVectorClusToTH.size(); q ++) {
306  //cluster time resolution and pull
307  m_histo_ClusterTimeResolution[indexForHistosAndGraphs]->Fill(clus.getClsTime() - (relatVectorClusToTH[q])->getGlobalTime());
308 
309  //get trigger bin
310  int triggerBin = 0;
311  triggerBin = (int)modeByte.getTriggerBin();
312 
313  if (triggerBin == 0)
314  m_histo_ClusterTimeResolution_bin1[indexForHistosAndGraphs]->Fill(clus.getClsTime() - (relatVectorClusToTH[q])->getGlobalTime());
315  else if (triggerBin == 1)
316  m_histo_ClusterTimeResolution_bin2[indexForHistosAndGraphs]->Fill(clus.getClsTime() - (relatVectorClusToTH[q])->getGlobalTime());
317  else if (triggerBin == 2)
318  m_histo_ClusterTimeResolution_bin3[indexForHistosAndGraphs]->Fill(clus.getClsTime() - (relatVectorClusToTH[q])->getGlobalTime());
319  else if (triggerBin == 3)
320  m_histo_ClusterTimeResolution_bin4[indexForHistosAndGraphs]->Fill(clus.getClsTime() - (relatVectorClusToTH[q])->getGlobalTime());
321 
322  m_histo_ClusterTimePull[indexForHistosAndGraphs]->Fill((clus.getClsTime() - (relatVectorClusToTH[q])->getGlobalTime()) /
323  (clus.getClsTimeSigma()));
324 
325  //cluster position resolution and pull, also correlation between time res and position res
326  if (clus.isUCluster()) {
327  m_histo_ClusterUPositionResolution[indexForHistosAndGraphs / 2]->Fill(clus.getPosition((relatVectorClusToTH[q])->getV()) -
328  (relatVectorClusToTH[q])->getU());
329  m_histo_ClusterUPositionPull[indexForHistosAndGraphs / 2]->Fill((clus.getPosition((relatVectorClusToTH[q])->getV()) -
330  (relatVectorClusToTH[q])->getU()) / (clus.getPositionSigma()));
331  m_histo2D_TresVsPosres[indexForHistosAndGraphs]->Fill((clus.getPosition((relatVectorClusToTH[q])->getV()) -
332  (relatVectorClusToTH[q])->getU()) , (clus.getClsTime() - (relatVectorClusToTH[q])->getGlobalTime()));
333  } else {
334  m_histo_ClusterVPositionResolution[(indexForHistosAndGraphs - 1) / 2]->Fill(clus.getPosition() - (relatVectorClusToTH[q])->getV());
335  m_histo_ClusterVPositionPull[(indexForHistosAndGraphs - 1) / 2]->Fill((clus.getPosition() - (relatVectorClusToTH[q])->getV()) /
336  (clus.getPositionSigma()));
337  m_histo2D_TresVsPosres[indexForHistosAndGraphs]->Fill((clus.getPosition() - (relatVectorClusToTH[q])->getV()) ,
338  (clus.getClsTime() - (relatVectorClusToTH[q])->getGlobalTime()));
339  }
340  }
341 
342  RelationVector<SVDRecoDigit> relatVectorClusToReco = DataStore::getRelationsWithObj<SVDRecoDigit>(&clus);
343  //enter only if the cluster is TM
344  if (relatVectorClusToTH.size() > 0) {
345 
346  //fill the THinCluster histo with the number of TH (and good TH) a TM cluster (and a Good TM cluster) is composed of
347  m_histo_THinClusterTM[indexForHistosAndGraphs]->Fill(relatVectorClusToTH.size());
348  int numberOfGoodTHInACluster = 0;
349  int numberOfGoodTHInAClusterGood = 0;
350  for (int k = 0; k < (int)(relatVectorClusToTH.size()); k ++) {
351  if (goodTrueHit(relatVectorClusToTH[k])) {
352  numberOfGoodTHInACluster ++;
353  numberOfGoodTHInAClusterGood ++;
354  }
355  }
356  m_histo_GoodTHinClusterTM[indexForHistosAndGraphs]->Fill(numberOfGoodTHInACluster);
357  if (numberOfGoodTHInAClusterGood > 0)
358  m_histo_GoodTHinClusterTMGood[indexForHistosAndGraphs]->Fill(numberOfGoodTHInAClusterGood);
359 
360  //count number of recodigit, composing the Truth-matched cluster, that are linked with a TH (internal purity)
362  for (int k = 0; k < (int)relatVectorClusToReco.size(); k++) { //loop on the recodigits composing the TM cluster
363  RelationVector<SVDTrueHit> relatVectorRecoFromClusToTH = DataStore::getRelationsWithObj<SVDTrueHit>(relatVectorClusToReco[k]);
364 
365  if (relatVectorRecoFromClusToTH.size() > 0)
367  }
368 
371 
372  }
373  //count number of recodigit, composing a NOT Truth-matched cluster, that are linked with a TH
374  else {
375 
377  for (int k = 0; k < (int)relatVectorClusToReco.size(); k++) { //loop on the recodigits composing the NOTM cluster
378  RelationVector<SVDTrueHit> relatVectorRecoFromClusToTH = DataStore::getRelationsWithObj<SVDTrueHit>(relatVectorClusToReco[k]);
379 
380  if (relatVectorRecoFromClusToTH.size() > 0)
382  }
383 
385 
386  }
387  }
388  //close loop on clusters
389 }
390 
391 
393 {
394 
395  //extract mean and sigma values from histos to plot them in graphs
396  for (int k = 0; k < m_Nsets; k ++) {
399 
402 
405 
406  m_mean_THinCluster[k] = m_histo_THinCluster[k]->GetMean();
407  m_RMS_THinCluster[k] = m_histo_THinCluster[k]->GetRMS() / sqrt(m_histo_THinCluster[k]->GetEntries());
408 
409  m_mean_THinClusterTM[k] = m_histo_THinClusterTM[k]->GetMean();
410  m_RMS_THinClusterTM[k] = m_histo_THinClusterTM[k]->GetRMS() / sqrt(m_histo_THinClusterTM[k]->GetEntries());
411 
413  m_RMS_GoodTHinClusterTM[k] = m_histo_GoodTHinClusterTM[k]->GetRMS() / sqrt(m_histo_GoodTHinClusterTM[k]->GetEntries());
414 
417  }
418  for (int k = 0; k < m_NsetsRed; k ++) {
421 
424  }
425 
426  //GRAPHS
427  createEfficiencyGraph("recoEff", "Strip Fit Efficiency ( RecoDigits / ShaperDigits )", m_NumberOfRecoDigit, m_NumberOfShaperDigit,
428  "set", "efficiency", m_graphList);
429 
430  createEfficiencyGraph("clusterEff", "Clustering Efficiency ( Truth-Matched Clusters / TrueHits )", m_NumberOfClustersRelatedToTH,
431  m_NumberOfTH, "set", "efficiency", m_graphList);
432 
433  createEfficiencyGraph("clusterPurity", "Purity of Clusters ( Truth-Matched Clusters / All Clusters )", m_NumberOfTMClusters,
434  m_NumberOfClusters, "set", "purity", m_graphList);
435 
436  //means-from-histos graphs
437  createArbitraryGraphErrorChooser("stripTime_Means", "Strip Time Resolution", m_OrderingVec, m_NullVec, m_mean_StripTimeResolution,
438  m_RMS_StripTimeResolution, "set", "time residuals (ns)", m_graphList, m_Nsets);
439 
440  createArbitraryGraphErrorChooser("clusterTime_Means", "Cluster Time Resolution", m_OrderingVec, m_NullVec,
442 
443  createArbitraryGraphErrorChooser("clusterUposition_Means", "Cluster U Position Resolution", m_OrderingVec, m_NullVec,
445  m_NsetsRed);
446 
447  createArbitraryGraphErrorChooser("clusterVposition_Means", "Cluster V Position Resolution", m_OrderingVec, m_NullVec,
449  m_NsetsRed);
450 
451  createArbitraryGraphErrorChooser("clusterInternalPurity_Means", "Fraction of Truth-matched Recos inside a Truth-matched Cluster",
453  "number of TM recos / cluster size", m_graphList, m_Nsets);
454 
455  createArbitraryGraphErrorChooser("THinCluster_Means", "Number of True Hits inside a Cluster", m_OrderingVec, m_NullVec,
456  m_mean_THinCluster, m_RMS_THinCluster, "set", "number of TH per cluster", m_graphList, m_Nsets);
457 
458  createArbitraryGraphErrorChooser("THinClusterTM_Means", "Number of True Hits inside a TM Cluster", m_OrderingVec, m_NullVec,
459  m_mean_THinClusterTM, m_RMS_THinClusterTM, "set", "number of TH per TM cluster", m_graphList, m_Nsets);
460 
461  createArbitraryGraphErrorChooser("goodTHinClusterTM_Means", "Number of Good True Hits inside a TM Cluster", m_OrderingVec,
462  m_NullVec,
463  m_mean_GoodTHinClusterTM, m_RMS_GoodTHinClusterTM, "set", "number of Good TH per TM cluster", m_graphList, m_Nsets);
464 
465  createArbitraryGraphErrorChooser("goodTHinClusterTMGood_Means", "Number of Good True Hits inside a Good TM Cluster", m_OrderingVec,
466  m_NullVec,
467  m_mean_GoodTHinClusterTMGood, m_RMS_GoodTHinClusterTMGood, "set", "number of Good TH per Good TM cluster", m_graphList, m_Nsets);
469  //WRITE HISTOS AND GRAPHS//
471 
472  if (m_outputFile != NULL) {
473  m_outputFile->cd();
474 
475  TDirectory* oldDir = gDirectory;
476  TObject* obj;
477 
478  TDirectory* dir_strtime = oldDir->mkdir("strip_time");
479  dir_strtime->cd();
480  TIter nextH_strtime(m_histoList_StripTimeResolution);
481  while ((obj = nextH_strtime()))
482  obj->Write();
483 
484  TDirectory* dir_cltime = oldDir->mkdir("cluster_time");
485  dir_cltime->cd();
486  TIter nextH_cltime(m_histoList_ClusterTimeResolution);
487  while ((obj = nextH_cltime()))
488  obj->Write();
489 
490  TDirectory* dir_cltimepull = oldDir->mkdir("cluster_time_pull");
491  dir_cltimepull->cd();
492  TIter nextH_cltimepull(m_histoList_ClusterTimePull);
493  while ((obj = nextH_cltimepull()))
494  obj->Write();
495 
496  TDirectory* dir_clpos = oldDir->mkdir("cluster_position");
497  dir_clpos->cd();
498  TIter nextH_clpos(m_histoList_ClusterPositionResolution);
499  while ((obj = nextH_clpos()))
500  obj->Write();
501 
502  TDirectory* dir_clpospull = oldDir->mkdir("cluster_position_pull");
503  dir_clpospull->cd();
504  TIter nextH_clpospull(m_histoList_ClusterPositionPull);
505  while ((obj = nextH_clpospull()))
506  obj->Write();
507 
508  TDirectory* dir_clpostime = oldDir->mkdir("cluster_timeVSposition");
509  dir_clpostime->cd();
510  TIter nextH_clpostime(m_histo2DList_TresVsPosres);
511  while ((obj = nextH_clpostime()))
512  obj->Write();
513 
514  TDirectory* dir_clinpurTM = oldDir->mkdir("intra_cluster_purity_TM");
515  dir_clinpurTM->cd();
516  TIter nextH_clinpurTM(m_histoList_PurityInsideTMCluster);
517  while ((obj = nextH_clinpurTM()))
518  obj->Write();
519 
520  TDirectory* dir_clinpurTM2D = oldDir->mkdir("intra_cluster_purity_TM2D");
521  dir_clinpurTM2D->cd();
522  TIter nextH_clinpurTM2D(m_histo2DList_PurityInsideTMCluster);
523  while ((obj = nextH_clinpurTM2D()))
524  obj->Write();
525 
526  TDirectory* dir_clinpurNOTM = oldDir->mkdir("intra_cluster_purity_NOTM");
527  dir_clinpurNOTM->cd();
528  TIter nextH_clinpurNOTM(m_histoList_PurityInsideNOTMCluster);
529  while ((obj = nextH_clinpurNOTM()))
530  obj->Write();
531 
532  TDirectory* dir_puddle = oldDir->mkdir("trueHits_in_cluster");
533  dir_puddle->cd();
534  TIter nextH_puddle(m_histoList_THinCluster);
535  while ((obj = nextH_puddle()))
536  obj->Write();
537 
538  TDirectory* dir_puddleTM = oldDir->mkdir("trueHits_in_TMcluster");
539  dir_puddleTM->cd();
540  TIter nextH_puddleTM(m_histoList_THinClusterTM);
541  while ((obj = nextH_puddleTM()))
542  obj->Write();
543 
544  TDirectory* dir_goodPuddleTM = oldDir->mkdir("goodTrueHits_in_TMcluster");
545  dir_goodPuddleTM->cd();
546  TIter nextH_GoodPuddleTM(m_histoList_GoodTHinClusterTM);
547  while ((obj = nextH_GoodPuddleTM()))
548  obj->Write();
549 
550  TDirectory* dir_goodPuddleTMGood = oldDir->mkdir("goodTrueHits_in_GoodTMcluster");
551  dir_goodPuddleTMGood->cd();
552  TIter nextH_GoodPuddleTMGood(m_histoList_GoodTHinClusterTMGood);
553  while ((obj = nextH_GoodPuddleTMGood()))
554  obj->Write();
555 
556  TDirectory* dir_graph = oldDir->mkdir("graphs");
557  dir_graph->cd();
558  TIter nextH_graph(m_graphList);
559  while ((obj = nextH_graph()))
560  obj->Write();
561 
562  TDirectory* dir_controlsMC = oldDir->mkdir("controlMC");
563  dir_controlsMC->cd();
564  TIter nextH_controlsMC(m_histoList_Control);
565  while ((obj = nextH_controlsMC()))
566  obj->Write();
567 
568  m_outputFile->Close();
569  }
570 }
571 
572 
574 {
575 }
576 
577 
579 //EXTRA FUNCTIONS//
581 
582 TH1F* SVDClusterEvaluationTrueInfoModule::createHistogram1D(const char* name, const char* title,
583  Int_t nbins, Double_t min, Double_t max,
584  const char* xtitle, TList* histoList)
585 {
586  TH1F* h = new TH1F(name, title, nbins, min, max);
587 
588  h->GetXaxis()->SetTitle(xtitle);
589 
590  if (histoList)
591  histoList->Add(h);
592 
593  return h;
594 }
595 
596 TH2F* SVDClusterEvaluationTrueInfoModule::createHistogram2D(const char* name, const char* title,
597  Int_t nbinsX, Double_t minX, Double_t maxX,
598  const char* titleX,
599  Int_t nbinsY, Double_t minY, Double_t maxY,
600  const char* titleY, TList* histoList)
601 {
602 
603  TH2F* h = new TH2F(name, title, nbinsX, minX, maxX, nbinsY, minY, maxY);
604 
605  h->GetXaxis()->SetTitle(titleX);
606  h->GetYaxis()->SetTitle(titleY);
607 
608  if (histoList)
609  histoList->Add(h);
610 
611  return h;
612 }
613 
614 int SVDClusterEvaluationTrueInfoModule::indexFromLayerSensorSide(int LayerNumber, int SensorNumber, int UVNumber)
615 {
616  int Index;
617 
618  if (LayerNumber == 3) { //L3
619  if (UVNumber) //U
620  Index = 0;
621  else //V
622  Index = 1;
623  } else { //L456
624  if (SensorNumber == 1) { //FW
625  if (UVNumber) //U
626  Index = 2;
627  else //V
628  Index = 3;
629  } else { //barrel
630  if (UVNumber) //U
631  Index = 4;
632  else //V
633  Index = 5;
634  }
635  }
636 
637  return Index;
638 }
639 
641 {
642  TString name = "";
643 
644  if (idx < 2)
645  name = "L3";
646  else
647  name = "L456";
648 
649  return name;
650 }
651 
653 {
654  TString name = "";
655 
656  if (idx == 2 || idx == 3)
657  name = "FWD";
658  else
659  name = "Barrel";
660 
661  return name;
662 }
663 
665 {
666  TString name = "";
667 
668  if (idx % 2 == 0)
669  name = "U";
670  else
671  name = "V";
672 
673  return name;
674 }
675 
676 void SVDClusterEvaluationTrueInfoModule::createEfficiencyGraph(const char* name, const char* title, int vNum[m_Nsets],
677  int vDen[m_Nsets],
678  TString xTitle, TString yTitle, TList* list)
679 {
680 
681  float ratio[m_Nsets];
682  float ratioErr[m_Nsets];
683  float x[m_Nsets];
684  float xErr[m_Nsets];
685 
686  for (int set = 0; set < m_Nsets; set++) {
687 
688  x[set] = set + 1;
689  xErr[set] = 0;
690 
691  if (vDen[set] > 0) {
692  ratio[set] = (float)vNum[set] / (float)vDen[set];
693  ratioErr[set] = sqrt(ratio[set] * (1 - ratio[set]) / (float)vDen[set]);
694  }
695 
696  }
697 
698  TCanvas* c = new TCanvas(name, title);
699  TGraphErrors* g = new TGraphErrors(m_Nsets, x, ratio, xErr, ratioErr);
700  g->SetName(name);
701  g->SetTitle(title);
702  g->GetXaxis()->SetTitle(xTitle.Data());
703  g->GetYaxis()->SetTitle(yTitle.Data());
704  g->GetYaxis()->SetRangeUser(0.00001, 1.10);
705  g->Draw("AP");
706  g->SetMarkerStyle(20);
707  g->SetMarkerSize(0.8);
708  TAxis* xAxis = g->GetXaxis();
709 
710  TText* t = new TText();
711  t->SetTextAlign(32);
712  t->SetTextSize(0.035);
713  t->SetTextFont(72);
714  TString labels[m_Nsets] = {"3U", "3V", "456FU", "456FV", "456BU", "456BV"};
715  for (Int_t i = 0; i < m_Nsets; i++) {
716  xAxis->SetBinLabel(xAxis->FindBin(i + 1) , labels[i].Data());
717  }
718 
719  if (list)
720  list->Add(c);
721 
722 }
723 
724 void SVDClusterEvaluationTrueInfoModule::createArbitraryGraphErrorChooser(const char* name, const char* title, float x[m_Nsets],
725  float xErr[m_Nsets], float y[m_Nsets], float yErr[m_Nsets], TString xTitle, TString yTitle, TList* list, int len)
726 {
727  if (len == m_NsetsRed)
728  createArbitraryGraphError_Red(name, title, x, xErr, y, yErr, xTitle, yTitle, list);
729  else if (len == m_Nsets)
730  createArbitraryGraphError_Std(name, title, x, xErr, y, yErr, xTitle, yTitle, list);
731  else
732  B2INFO("ERROR, WRONG LENGTH FOR MEANS TGRAPH CREATION!!!");
733 }
734 
735 void SVDClusterEvaluationTrueInfoModule::createArbitraryGraphError_Std(const char* name, const char* title, float x[m_Nsets],
736  float xErr[m_Nsets], float y[m_Nsets], float yErr[m_Nsets], TString xTitle, TString yTitle, TList* list)
737 {
738 
739  TCanvas* c = new TCanvas(name, title);
740  TGraphErrors* g = new TGraphErrors(m_Nsets, x, y, xErr, yErr);
741  g->SetName(name);
742  g->SetTitle(title);
743  g->GetXaxis()->SetTitle(xTitle.Data());
744  g->GetYaxis()->SetTitle(yTitle.Data());
745  g->Draw("AP");
746  g->SetMarkerStyle(20);
747  g->SetMarkerSize(0.8);
748  TAxis* xAxis = g->GetXaxis();
749 
750  TText* t = new TText();
751  t->SetTextAlign(32);
752  t->SetTextSize(0.035);
753  t->SetTextFont(72);
754  TString labels[m_Nsets] = {"3U", "3V", "456FU", "456FV", "456BU", "456BV"};
755  for (Int_t i = 0; i < m_Nsets; i++) {
756  xAxis->SetBinLabel(xAxis->FindBin(i + 1) , labels[i].Data());
757  }
758 
759  if (list)
760  list->Add(c);
761 
762 }
763 
764 void SVDClusterEvaluationTrueInfoModule::createArbitraryGraphError_Red(const char* name, const char* title, float x[m_NsetsRed],
765  float xErr[m_NsetsRed], float y[m_NsetsRed], float yErr[m_NsetsRed], TString xTitle, TString yTitle, TList* list)
766 {
767 
768  TCanvas* c = new TCanvas(name, title);
769  TGraphErrors* g = new TGraphErrors(m_NsetsRed, x, y, xErr, yErr);
770  g->SetName(name);
771  g->SetTitle(title);
772  g->GetXaxis()->SetTitle(xTitle.Data());
773  g->GetYaxis()->SetTitle(yTitle.Data());
774  g->Draw("AP");
775  g->SetMarkerStyle(20);
776  g->SetMarkerSize(0.8);
777  TAxis* xAxis = g->GetXaxis();
778 
779  TText* t = new TText();
780  t->SetTextAlign(32);
781  t->SetTextSize(0.035);
782  t->SetTextFont(72);
783  TString labels[m_NsetsRed] = {"3", "456F", "456B"};
784  for (Int_t i = 0; i < m_NsetsRed; i++) {
785  xAxis->SetBinLabel(xAxis->FindBin(i + 1) , labels[i].Data());
786  }
787 
788  if (list)
789  list->Add(c);
790 
791 }
792 
794 {
795 
796 
797  bool isGood = false;
798 
799  RelationVector<MCParticle> relatVectorTHToMC = thino->getRelationsFrom<MCParticle>();
800 
801  if (relatVectorTHToMC.size() > 0) {
802 
803  m_histoControl_THToMCsize->Fill(relatVectorTHToMC.size());
804 
805  float charge = relatVectorTHToMC[0]->getCharge();
806  bool primary = relatVectorTHToMC[0]->isPrimaryParticle();
807 
808  m_histoControl_MCcharge->Fill(charge);
809  m_histoControl_MCisPrimary->Fill(primary);
810 
811  if (charge != 0 && primary)
812  isGood = true;
813  }
814 
815  return isGood;
816 }
817 
818 
819 
820 
821 
822 
823 
824 
825 
826 
827 
828 
829 
830 
831 
832 
833 
834 
835 
836 
837 
838 
839 
840 
Belle2::RelationVector::size
size_t size() const
Get number of relations.
Definition: RelationVector.h:98
Belle2::SVDClusterEvaluationTrueInfoModule::m_NsetsRed
static const int m_NsetsRed
numbner of reduced sets
Definition: SVDClusterEvaluationTrueInfoModule.h:73
Belle2::SVDClusterEvaluationTrueInfoModule::m_OrderingVec
float m_OrderingVec[m_Nsets]
Vectors used to Draw the TGraphs (defined in the cc) depicting the averages and the means of the hist...
Definition: SVDClusterEvaluationTrueInfoModule.h:147
Belle2::SVDClusterEvaluationTrueInfoModule::m_mean_GoodTHinClusterTM
float m_mean_GoodTHinClusterTM[m_Nsets]
good true hits in cluster truth matched average
Definition: SVDClusterEvaluationTrueInfoModule.h:141
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo_GoodTHinClusterTM
TH1F * m_histo_GoodTHinClusterTM[m_Nsets]
Vector of histograms depicting Number of Good TH inside a TM Cluster.
Definition: SVDClusterEvaluationTrueInfoModule.h:122
Belle2::SVDClusterEvaluationTrueInfoModule::TitleOfHisto
TString TitleOfHisto
Strings to pass titles of the histos in the vectors of hitos.
Definition: SVDClusterEvaluationTrueInfoModule.h:88
Belle2::SVDModeByte::getTriggerBin
baseType getTriggerBin() const
Get the triggerBin id.
Definition: SVDModeByte.h:150
Belle2::SVDClusterEvaluationTrueInfoModule::m_storeSVDEvtInfo
StoreObjPtr< SVDEventInfo > m_storeSVDEvtInfo
Storage for SVDEventInfo object.
Definition: SVDClusterEvaluationTrueInfoModule.h:185
Belle2::Module::setDescription
void setDescription(const std::string &description)
Sets the description of the module.
Definition: Module.cc:216
Belle2::SVDClusterEvaluationTrueInfoModule::UVFromIndex
TString UVFromIndex(int idx)
Function returning "U" or "V" depending on the index.
Definition: SVDClusterEvaluationTrueInfoModule.cc:664
Belle2::SVDClusterEvaluationTrueInfoModule::beginRun
virtual void beginRun() override
Called when entering a new run.
Definition: SVDClusterEvaluationTrueInfoModule.cc:207
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo2D_PurityInsideTMCluster
TH2F * m_histo2D_PurityInsideTMCluster[m_Nsets]
Vector of 2D histograms depicting TM Reco Vs Total Reco inside a TM Cluster.
Definition: SVDClusterEvaluationTrueInfoModule.h:114
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo_ClusterTimeResolution
TH1F * m_histo_ClusterTimeResolution[m_Nsets]
Vector of histograms depicting Cluster Time Residuals.
Definition: SVDClusterEvaluationTrueInfoModule.h:93
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo_THinCluster
TH1F * m_histo_THinCluster[m_Nsets]
Vector of histograms depicting Number of TH inside a Cluster.
Definition: SVDClusterEvaluationTrueInfoModule.h:118
REG_MODULE
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:652
Belle2::SVDClusterEvaluationTrueInfoModule::NameOfHisto
TString NameOfHisto
Strings to pass names of the histos in the vectors of hitos.
Definition: SVDClusterEvaluationTrueInfoModule.h:86
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo_ClusterUPositionResolution
TH1F * m_histo_ClusterUPositionResolution[m_NsetsRed]
Vector of histograms depicting Cluster U Position Residual (Reduced length!)
Definition: SVDClusterEvaluationTrueInfoModule.h:102
Belle2::SVDClusterEvaluationTrueInfoModule::m_NumberOfRecoDigit
int m_NumberOfRecoDigit[m_Nsets]
number of reco digits
Definition: SVDClusterEvaluationTrueInfoModule.h:168
Belle2::SVDClusterEvaluationTrueInfoModule::m_histoList_PurityInsideNOTMCluster
TList * m_histoList_PurityInsideNOTMCluster
histo list not truth matched cluster purity
Definition: SVDClusterEvaluationTrueInfoModule.h:159
Belle2::SVDClusterEvaluationTrueInfoModule::m_RMS_GoodTHinClusterTM
float m_RMS_GoodTHinClusterTM[m_Nsets]
good true hits in cluster truth matched rms
Definition: SVDClusterEvaluationTrueInfoModule.h:142
Belle2::SVDTrueHit
Class SVDTrueHit - Records of tracks that either enter or leave the sensitive volume.
Definition: SVDTrueHit.h:35
Belle2::SVDClusterEvaluationTrueInfoModule::m_NumberOfShaperDigit
int m_NumberOfShaperDigit[m_Nsets]
Vectors used to compute the quantities depicted in Histos and Graphs.
Definition: SVDClusterEvaluationTrueInfoModule.h:167
Belle2::SVDClusterEvaluationTrueInfoModule::m_RMS_THinClusterTM
float m_RMS_THinClusterTM[m_Nsets]
true hits in truth matched cluster rms
Definition: SVDClusterEvaluationTrueInfoModule.h:140
Belle2::SVDClusterEvaluationTrueInfoModule::m_mean_ClusterVPositionResolution
float m_mean_ClusterVPositionResolution[m_Nsets]
average cl V position reosl
Definition: SVDClusterEvaluationTrueInfoModule.h:133
Belle2::SVDClusterEvaluationTrueInfoModule::m_svdEventInfoName
std::string m_svdEventInfoName
Name of the SVDEventInfo object.
Definition: SVDClusterEvaluationTrueInfoModule.h:80
Belle2::SVDClusterEvaluationTrueInfoModule::m_graphList
TList * m_graphList
histo list, TGraphs
Definition: SVDClusterEvaluationTrueInfoModule.h:164
Belle2::SVDModeByte
Class to store SVD mode information.
Definition: SVDModeByte.h:79
Belle2::SVDClusterEvaluationTrueInfoModule::indexFromLayerSensorSide
int indexFromLayerSensorSide(int LayerNumber, int SensorNumber, int UVNumber)
Function returning the index used for Histos.
Definition: SVDClusterEvaluationTrueInfoModule.cc:614
Belle2::SVDClusterEvaluationTrueInfoModule::createEfficiencyGraph
void createEfficiencyGraph(const char *name, const char *title, int vNum[m_Nsets], int vDen[m_Nsets], TString xTitle, TString yTitle, TList *list)
Function returning a TGraph with Y axis limited to 1 given numerator and denumerator vectors and plot...
Definition: SVDClusterEvaluationTrueInfoModule.cc:676
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo_ClusterTimeResolution_bin4
TH1F * m_histo_ClusterTimeResolution_bin4[m_Nsets]
TB4.
Definition: SVDClusterEvaluationTrueInfoModule.h:98
Belle2::SVDClusterEvaluationTrueInfoModule::m_RMS_ClusterTimeResolution
float m_RMS_ClusterTimeResolution[m_Nsets]
rms cluster time resid
Definition: SVDClusterEvaluationTrueInfoModule.h:130
Belle2::SVDClusterEvaluationTrueInfoModule::IntExtFromIndex
TString IntExtFromIndex(int idx)
Function returning "Internal" or "External" depending on the index.
Definition: SVDClusterEvaluationTrueInfoModule.cc:640
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo_ClusterTimeResolution_bin2
TH1F * m_histo_ClusterTimeResolution_bin2[m_Nsets]
TB2.
Definition: SVDClusterEvaluationTrueInfoModule.h:96
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo_ClusterUPositionPull
TH1F * m_histo_ClusterUPositionPull[m_NsetsRed]
Vector of histograms depicting Cluster U Position Pull (Reduced length!)
Definition: SVDClusterEvaluationTrueInfoModule.h:106
Belle2::SVDShaperDigit
The SVD ShaperDigit class.
Definition: SVDShaperDigit.h:46
Belle2::SVDClusterEvaluationTrueInfoModule::m_mean_ClusterTimeResolution
float m_mean_ClusterTimeResolution[m_Nsets]
average cl time resid
Definition: SVDClusterEvaluationTrueInfoModule.h:129
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo_ClusterTimeResolution_bin3
TH1F * m_histo_ClusterTimeResolution_bin3[m_Nsets]
TB3.
Definition: SVDClusterEvaluationTrueInfoModule.h:97
Belle2::Module
Base class for Modules.
Definition: Module.h:74
Belle2::SVDClusterEvaluationTrueInfoModule::m_histoList_THinClusterTM
TList * m_histoList_THinClusterTM
histo list true hits in clsuter truth match
Definition: SVDClusterEvaluationTrueInfoModule.h:161
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo_GoodTHinClusterTMGood
TH1F * m_histo_GoodTHinClusterTMGood[m_Nsets]
Vector of histograms depicting Number of Good TH inside a Good TM Cluster.
Definition: SVDClusterEvaluationTrueInfoModule.h:124
Belle2::SVDClusterEvaluationTrueInfoModule::m_RMS_ClusterUPositionResolution
float m_RMS_ClusterUPositionResolution[m_Nsets]
rms cl U position resol
Definition: SVDClusterEvaluationTrueInfoModule.h:132
Belle2::SVDClusterEvaluationTrueInfoModule::m_mean_ClusterUPositionResolution
float m_mean_ClusterUPositionResolution[m_Nsets]
average cl U position resol
Definition: SVDClusterEvaluationTrueInfoModule.h:131
Belle2::SVDClusterEvaluationTrueInfoModule::indexForHistosAndGraphs
int indexForHistosAndGraphs
Index used for the lists and for the vectors of histograms: it indicates the set of sensors we are lo...
Definition: SVDClusterEvaluationTrueInfoModule.h:83
Belle2::SVDClusterEvaluationTrueInfoModule::m_mean_PurityInsideTMCluster
float m_mean_PurityInsideTMCluster[m_Nsets]
cluster purity average
Definition: SVDClusterEvaluationTrueInfoModule.h:135
Belle2::SVDClusterEvaluationTrueInfoModule::m_RMS_ClusterVPositionResolution
float m_RMS_ClusterVPositionResolution[m_Nsets]
rms cl V position resol
Definition: SVDClusterEvaluationTrueInfoModule.h:134
Belle2::RelationVector
Class for type safe access to objects that are referred to in relations.
Definition: DataStore.h:38
Belle2::SVDClusterEvaluationTrueInfoModule::m_histoList_Control
TList * m_histoList_Control
control histo
Definition: SVDClusterEvaluationTrueInfoModule.h:180
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SVDClusterEvaluationTrueInfoModule::FWFromIndex
TString FWFromIndex(int idx)
Function returning "Forward" or "Backword" depending on the index.
Definition: SVDClusterEvaluationTrueInfoModule.cc:652
Belle2::SVDClusterEvaluationTrueInfoModule::m_histoList_PurityInsideTMCluster
TList * m_histoList_PurityInsideTMCluster
histo list truth matched cluster purity (2D)
Definition: SVDClusterEvaluationTrueInfoModule.h:157
Belle2::SVDClusterEvaluationTrueInfoModule::m_histoList_ClusterPositionResolution
TList * m_histoList_ClusterPositionResolution
histo list cluster position resolution
Definition: SVDClusterEvaluationTrueInfoModule.h:154
Belle2::SVDClusterEvaluationTrueInfoModule::createArbitraryGraphErrorChooser
void createArbitraryGraphErrorChooser(const char *name, const char *title, float x[m_Nsets], float xErr[m_Nsets], float y[m_Nsets], float yErr[m_Nsets], TString xTitle, TString yTitle, TList *list, int len)
Function choosing between the two following functions depending on the length of the provided arrays.
Definition: SVDClusterEvaluationTrueInfoModule.cc:724
Belle2::SVDClusterEvaluationTrueInfoModule::m_histoControl_MCisPrimary
TH1F * m_histoControl_MCisPrimary
control histo: MC is primary
Definition: SVDClusterEvaluationTrueInfoModule.h:178
Belle2::SVDClusterEvaluationTrueInfoModule::m_RMS_StripTimeResolution
float m_RMS_StripTimeResolution[m_Nsets]
rms of strip time residual
Definition: SVDClusterEvaluationTrueInfoModule.h:128
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo_PurityInsideNOTMCluster
TH1F * m_histo_PurityInsideNOTMCluster[m_Nsets]
Vector of histograms depicting TM Cluster Internal Purity (TM Recos over Reco inside a Cluster)
Definition: SVDClusterEvaluationTrueInfoModule.h:116
Belle2::RelationsInterface::getRelationsFrom
RelationVector< FROM > getRelationsFrom(const std::string &name="", const std::string &namedRelation="") const
Get the relations that point from another store array to this object.
Definition: RelationsObject.h:214
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo_ClusterTimeResolution_bin1
TH1F * m_histo_ClusterTimeResolution_bin1[m_Nsets]
Vector of histograms depicting Cluster Time Residuals, divided by TriggerBin.
Definition: SVDClusterEvaluationTrueInfoModule.h:95
Belle2::SVDClusterEvaluationTrueInfoModule::createHistogram2D
TH2F * createHistogram2D(const char *name, const char *title, Int_t nbinsX, Double_t minX, Double_t maxX, const char *titleX, Int_t nbinsY, Double_t minY, Double_t maxY, const char *titleY, TList *histoList)
Function returning TH2F.
Definition: SVDClusterEvaluationTrueInfoModule.cc:596
Belle2::SVDClusterEvaluationTrueInfoModule::m_NumberOfTMClusters
int m_NumberOfTMClusters[m_Nsets]
number of truth matched clusters
Definition: SVDClusterEvaluationTrueInfoModule.h:172
Belle2::SVDClusterEvaluationTrueInfoModule::m_histoList_StripTimeResolution
TList * m_histoList_StripTimeResolution
Lists used to easily Draw the corresponding histos; last one is used to draw the TGraphs.
Definition: SVDClusterEvaluationTrueInfoModule.h:151
Belle2::SVDClusterEvaluationTrueInfoModule::m_outputFile
TFile * m_outputFile
output file
Definition: SVDClusterEvaluationTrueInfoModule.h:76
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo2DList_PurityInsideTMCluster
TList * m_histo2DList_PurityInsideTMCluster
histo list truth matched cluster purity (2D)
Definition: SVDClusterEvaluationTrueInfoModule.h:158
Belle2::SVDClusterEvaluationTrueInfoModule::endRun
virtual void endRun() override
This method is called if the current run ends.
Definition: SVDClusterEvaluationTrueInfoModule.cc:392
Belle2::SVDClusterEvaluationTrueInfoModule::m_histoList_ClusterTimeResolution
TList * m_histoList_ClusterTimeResolution
histo list cluster time resolution
Definition: SVDClusterEvaluationTrueInfoModule.h:152
Belle2::SVDClusterEvaluationTrueInfoModule::event
virtual void event() override
This method is the core of the SVDClusterEvaluationTrueInfo.
Definition: SVDClusterEvaluationTrueInfoModule.cc:212
Belle2::SVDClusterEvaluationTrueInfoModule::m_RMS_PurityInsideTMCluster
float m_RMS_PurityInsideTMCluster[m_Nsets]
cluster purity rms
Definition: SVDClusterEvaluationTrueInfoModule.h:136
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo2DList_TresVsPosres
TList * m_histo2DList_TresVsPosres
histo list ime tresol VS position resol
Definition: SVDClusterEvaluationTrueInfoModule.h:156
Belle2::SVDClusterEvaluationTrueInfoModule::m_mean_THinCluster
float m_mean_THinCluster[m_Nsets]
true hits in cluster average
Definition: SVDClusterEvaluationTrueInfoModule.h:137
Belle2::SVDClusterEvaluationTrueInfoModule::m_RMS_GoodTHinClusterTMGood
float m_RMS_GoodTHinClusterTMGood[m_Nsets]
good true hits in cluster truth match good rms
Definition: SVDClusterEvaluationTrueInfoModule.h:144
Belle2::SVDCluster
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition: SVDCluster.h:38
Belle2::SVDClusterEvaluationTrueInfoModule::createArbitraryGraphError_Red
void createArbitraryGraphError_Red(const char *name, const char *title, float x[m_NsetsRed], float xErr[m_NsetsRed], float y[m_NsetsRed], float yErr[m_NsetsRed], TString xTitle, TString yTitle, TList *list)
Function returning an arbitrarly defined TGraph with arrays length equal to m_NsetsRed.
Definition: SVDClusterEvaluationTrueInfoModule.cc:764
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo_PurityInsideTMCluster
TH1F * m_histo_PurityInsideTMCluster[m_Nsets]
Vector of histograms depicting Cluster Internal Purity (TM Recos over Reco inside a Cluster)
Definition: SVDClusterEvaluationTrueInfoModule.h:112
Belle2::Module::addParam
void addParam(const std::string &name, T &paramVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module.
Definition: Module.h:562
Belle2::SVDClusterEvaluationTrueInfoModule::m_histoList_ClusterPositionPull
TList * m_histoList_ClusterPositionPull
histo list cluster position pull
Definition: SVDClusterEvaluationTrueInfoModule.h:155
Belle2::SVDClusterEvaluationTrueInfoModule::m_NumberOfTMRecoInTMCluster
int m_NumberOfTMRecoInTMCluster
numnber of true match reco digit in truth match cluster
Definition: SVDClusterEvaluationTrueInfoModule.h:173
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo_StripTimeResolution
TH1F * m_histo_StripTimeResolution[m_Nsets]
Vector of histograms depicting Strip Time Residuals.
Definition: SVDClusterEvaluationTrueInfoModule.h:91
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo_THinClusterTM
TH1F * m_histo_THinClusterTM[m_Nsets]
Vector of histograms depicting Number of TH inside a TM Cluster.
Definition: SVDClusterEvaluationTrueInfoModule.h:120
Belle2::SVDClusterEvaluationTrueInfoModule::m_outputFileName
std::string m_outputFileName
output file name
Definition: SVDClusterEvaluationTrueInfoModule.h:77
Belle2::SVDClusterEvaluationTrueInfoModule::m_Nsets
static const int m_Nsets
number of sets: L3-barrel-U, L3-barrel-V, L456-barrel-U, L456-barrel-V, L456-slanted-U,...
Definition: SVDClusterEvaluationTrueInfoModule.h:71
Belle2::SVDClusterEvaluationTrueInfoModule::m_NumberOfClustersRelatedToTH
int m_NumberOfClustersRelatedToTH[m_Nsets]
number of clusters related to true hits
Definition: SVDClusterEvaluationTrueInfoModule.h:170
Belle2::SVDClusterEvaluationTrueInfoModule::m_mean_THinClusterTM
float m_mean_THinClusterTM[m_Nsets]
true hits in truth matched cluster average
Definition: SVDClusterEvaluationTrueInfoModule.h:139
Belle2::SVDClusterEvaluationTrueInfoModule::m_NullVec
float m_NullVec[m_Nsets]
null vector
Definition: SVDClusterEvaluationTrueInfoModule.h:148
Belle2::SVDClusterEvaluationTrueInfoModule::m_histoList_GoodTHinClusterTMGood
TList * m_histoList_GoodTHinClusterTMGood
histo list goo true hits in cluster truth match good
Definition: SVDClusterEvaluationTrueInfoModule.h:163
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo_ClusterVPositionPull
TH1F * m_histo_ClusterVPositionPull[m_NsetsRed]
Vector of histograms depicting Cluster U Position Pull (Reduced length!)
Definition: SVDClusterEvaluationTrueInfoModule.h:108
Belle2::SVDClusterEvaluationTrueInfoModule::m_histoControl_MCcharge
TH1F * m_histoControl_MCcharge
Control Histos and List to check if the function used to define a TH as "good" is working fine.
Definition: SVDClusterEvaluationTrueInfoModule.h:177
Belle2::SVDClusterEvaluationTrueInfoModule::terminate
virtual void terminate() override
This method is called at the end of the event processing.
Definition: SVDClusterEvaluationTrueInfoModule.cc:573
Belle2::SVDClusterEvaluationTrueInfoModule::initialize
virtual void initialize() override
Initialize the SVDClusterEvaluationTrueInfo.
Definition: SVDClusterEvaluationTrueInfoModule.cc:47
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo_ClusterVPositionResolution
TH1F * m_histo_ClusterVPositionResolution[m_NsetsRed]
Vector of histograms depicting Cluster V Position Residual (Reduced length!)
Definition: SVDClusterEvaluationTrueInfoModule.h:104
Belle2::MCParticle
A Class to store the Monte Carlo particle information.
Definition: MCParticle.h:43
Belle2::StoreArray
Accessor to arrays stored in the data store.
Definition: ECLMatchingPerformanceExpertModule.h:33
Belle2::SVDClusterEvaluationTrueInfoModule::m_NumberOfClusters
int m_NumberOfClusters[m_Nsets]
number of clusters
Definition: SVDClusterEvaluationTrueInfoModule.h:171
Belle2::SVDRecoDigit
The SVD RecoDigit class.
Definition: SVDRecoDigit.h:54
Belle2::SVDClusterEvaluationTrueInfoModule::m_mean_StripTimeResolution
float m_mean_StripTimeResolution[m_Nsets]
Vectors of floats containing the mean and the RMS from the corresponding histo.
Definition: SVDClusterEvaluationTrueInfoModule.h:127
Belle2::SVDClusterEvaluationTrueInfoModule::createHistogram1D
TH1F * createHistogram1D(const char *name, const char *title, Int_t nbins, Double_t min, Double_t max, const char *xtitle, TList *histoList)
Function returning a TH1F.
Definition: SVDClusterEvaluationTrueInfoModule.cc:582
Belle2::SVDClusterEvaluationTrueInfoModule::m_mean_GoodTHinClusterTMGood
float m_mean_GoodTHinClusterTMGood[m_Nsets]
good true hits in cluster truth match good average
Definition: SVDClusterEvaluationTrueInfoModule.h:143
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo_ClusterTimePull
TH1F * m_histo_ClusterTimePull[m_Nsets]
Vector of histograms depicting Cluster Time Pull.
Definition: SVDClusterEvaluationTrueInfoModule.h:100
Belle2::SVDClusterEvaluationTrueInfoModule::m_NumberOfTMRecoInNOTMCluster
int m_NumberOfTMRecoInNOTMCluster
number of truth matched reco digits in not truth matched clusters
Definition: SVDClusterEvaluationTrueInfoModule.h:174
Belle2::SVDClusterEvaluationTrueInfoModule::m_RMS_THinCluster
float m_RMS_THinCluster[m_Nsets]
true hits in cluster rms
Definition: SVDClusterEvaluationTrueInfoModule.h:138
Belle2::SVDClusterEvaluationTrueInfoModule::m_histoList_ClusterTimePull
TList * m_histoList_ClusterTimePull
histo list cluster time pull
Definition: SVDClusterEvaluationTrueInfoModule.h:153
Belle2::SVDClusterEvaluationTrueInfoModule::goodTrueHit
bool goodTrueHit(const SVDTrueHit *thino)
Function defining if a TH is good (based on charge and primaryness)
Definition: SVDClusterEvaluationTrueInfoModule.cc:793
Belle2::SVDClusterEvaluationTrueInfoModule::m_histo2D_TresVsPosres
TH2F * m_histo2D_TresVsPosres[m_Nsets]
Vector of 2D histograms depicting Time Residuals Vs Position (U/V) Residuals for Histos.
Definition: SVDClusterEvaluationTrueInfoModule.h:110
Belle2::SVDClusterEvaluationTrueInfoModule::createArbitraryGraphError_Std
void createArbitraryGraphError_Std(const char *name, const char *title, float x[m_Nsets], float xErr[m_Nsets], float y[m_Nsets], float yErr[m_Nsets], TString xTitle, TString yTitle, TList *list)
Function returning an arbitrarly defined TGraph with arrays length equal to m_Nsets.
Definition: SVDClusterEvaluationTrueInfoModule.cc:735
Belle2::SVDClusterEvaluationTrueInfoModule::m_histoList_GoodTHinClusterTM
TList * m_histoList_GoodTHinClusterTM
histo list good true hits in cluster truth matched
Definition: SVDClusterEvaluationTrueInfoModule.h:162
Belle2::SVDClusterEvaluationTrueInfoModule::m_histoControl_THToMCsize
TH1F * m_histoControl_THToMCsize
control histo: true hit to mc size
Definition: SVDClusterEvaluationTrueInfoModule.h:179
Belle2::SVDClusterEvaluationTrueInfoModule::m_NumberOfTH
int m_NumberOfTH[m_Nsets]
numner of true hits
Definition: SVDClusterEvaluationTrueInfoModule.h:169
Belle2::SVDClusterEvaluationTrueInfoModule::m_histoList_THinCluster
TList * m_histoList_THinCluster
histo list true hits in cluster
Definition: SVDClusterEvaluationTrueInfoModule.h:160