Belle II Software  release-05-01-25
CosmicAnalysis Class Reference
Inheritance diagram for CosmicAnalysis:
Collaboration diagram for CosmicAnalysis:

Public Member Functions

def __init__ (self)
 
def beginRun (self)
 
def event (self)
 
def terminate (self)
 

Public Attributes

 rootfile
 Input root file.
 
 tree_track
 Tree with track data.
 
 tree_DEDX
 Tree with dE/dx data.
 
 trackData
 struct with track data
 
 dedxData
 struct with dE/dx data
 
 TotalNumberOfHits
 Histogram with total number of hits on track.
 
 HitsVsLayer
 Histogram with number of hits vs. More...
 
 HitsVsSensor
 Histogram with number of hits vs. More...
 
 LayerVsSensor
 Histogram with hitted layer vs. More...
 
 PXDClusterSize
 Histogram with PXD cluster size.
 
 Chi2
 Histogram with track Chi2.
 
 NDF
 Histogram with track NDF.
 
 Chi2OverNDF
 Histogram with track Chi2/NDF.
 
 Momentum
 Histogram with track momentum.
 
 ADCCountOverNumberOfHitsInCDC
 Histogram with ADC count vs. More...
 
 ADCCountOverNumberOfHitsInCDCVsMomentum
 Profile with ADC count vs. More...
 
 MomentumVsADCCountOverNumberOfHitsInCDC
 Profile with ADC count vs. More...
 

Detailed Description

A module to analyse residuals in overlaps of ladders.

Definition at line 40 of file validatePhase2Cosmics.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)
Initialize the module

Definition at line 44 of file validatePhase2Cosmics.py.

44  def __init__(self):
45  """Initialize the module"""
46 
47  super(CosmicAnalysis, self).__init__()
48 
49 
50  self.rootfile = ROOT.TFile('cosmicAnalysis.root', 'recreate')
51 
52  self.tree_track = ROOT.TTree('track', '')
53 
54  self.tree_DEDX = ROOT.TTree('dedx', '')
55 
56  ROOT.gStyle.Reset()
57  ROOT.gStyle.SetCanvasColor(0)
58  ROOT.gStyle.SetStatBorderSize(1)
59  ROOT.gStyle.SetStatColor(0)
60  ROOT.gStyle.SetTitleColor(1)
61  ROOT.gStyle.SetCanvasColor(0)
62  ROOT.gStyle.SetPadColor(0)
63  ROOT.gStyle.SetPadBorderMode(0)
64  ROOT.gStyle.SetCanvasBorderMode(0)
65  ROOT.gStyle.SetFrameBorderMode(0)
66  ROOT.gStyle.SetOptStat(0)
67 
68 
69  self.trackData = TrackData()
70  # Declare tree branches
71  for key in TrackData.__dict__:
72  if '__' not in key:
73  formstring = '/F'
74  if isinstance(self.trackData.__getattribute__(key), int):
75  formstring = '/I'
76  self.tree_track.Branch(key, AddressOf(self.trackData, key), key + formstring)
77 
78  self.dedxData = DEDXData()
79  # Declare tree branches
80  for key in DEDXData.__dict__:
81  if '__' not in key:
82  formstring = '/F'
83  if isinstance(self.dedxData.__getattribute__(key), int):
84  formstring = '/I'
85  self.tree_DEDX.Branch(key, AddressOf(self.dedxData, key), key + formstring)
86 
87  self.TotalNumberOfHits = ROOT.TH1F('TotalNumberOfHits', '', 6, 0.5, 6.5)
88 
89  self.HitsVsLayer = ROOT.TH2F('HitsVsLayer', '', 6, 0.5, 6.5, 6, 0.5, 6.5)
90 
91  self.HitsVsSensor = ROOT.TH2F('HitsVsSensor', '', 6, 0.5, 6.5, 5, 0.5, 5.5)
92 
93  self.LayerVsSensor = ROOT.TH2F('LayerVsSensor', '', 6, 0.5, 6.5, 5, 0.5, 5.5)
94 
95  self.PXDClusterSize = ROOT.TH1F('PXDClusterSize', '', 20, 0.5, 20.5)
96 
97  self.Chi2 = ROOT.TH1F('Chi2', '', 300, 0.0, 500)
98 
99  self.NDF = ROOT.TH1F('NDF', '', 200, 0.0, 200)
100 
101  self.Chi2OverNDF = ROOT.TH1F('Chi2OverNDF', '', 300, 0.0, 5)
102 
103  self.Momentum = ROOT.TH1F('Momentum', '', 500, 0.0, 1000)
104 
105  self.ADCCountOverNumberOfHitsInCDC = ROOT.TH1F('ADCCountOverNumberOfHitsInCDC', '', 200, 0.0, 300)
106 
107  self.ADCCountOverNumberOfHitsInCDCVsMomentum = ROOT.TProfile(
108  'ADCCountOverNumberOfHitsInCDCVsMomentum', '', 200, 0.0, 300, 0.0, 1000)
109 
110  self.MomentumVsADCCountOverNumberOfHitsInCDC = ROOT.TProfile(
111  'MomentumVsADCCountOverNumberOfHitsInCDC', '', 100, 0.0, 100, 0.0, 1000)
112 

Member Function Documentation

◆ beginRun()

def beginRun (   self)
Do nothing

Definition at line 113 of file validatePhase2Cosmics.py.

◆ event()

def event (   self)
Fill histograms 

Definition at line 116 of file validatePhase2Cosmics.py.

◆ terminate()

def terminate (   self)
Close & write output files

Definition at line 246 of file validatePhase2Cosmics.py.

Member Data Documentation

◆ ADCCountOverNumberOfHitsInCDC

ADCCountOverNumberOfHitsInCDC

Histogram with ADC count vs.

number of hits in CDC

Definition at line 105 of file validatePhase2Cosmics.py.

◆ ADCCountOverNumberOfHitsInCDCVsMomentum

ADCCountOverNumberOfHitsInCDCVsMomentum

Profile with ADC count vs.

number of hits vs. momentum

Definition at line 107 of file validatePhase2Cosmics.py.

◆ HitsVsLayer

HitsVsLayer

Histogram with number of hits vs.

layer

Definition at line 89 of file validatePhase2Cosmics.py.

◆ HitsVsSensor

HitsVsSensor

Histogram with number of hits vs.

sensor

Definition at line 91 of file validatePhase2Cosmics.py.

◆ LayerVsSensor

LayerVsSensor

Histogram with hitted layer vs.

sensor

Definition at line 93 of file validatePhase2Cosmics.py.

◆ MomentumVsADCCountOverNumberOfHitsInCDC

MomentumVsADCCountOverNumberOfHitsInCDC

Profile with ADC count vs.

number of hits

Definition at line 110 of file validatePhase2Cosmics.py.


The documentation for this class was generated from the following file: