Belle II Software  release-08-01-10
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 45 of file validatePhase2Cosmics.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self)
Initialize the module

Definition at line 49 of file validatePhase2Cosmics.py.

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

Member Function Documentation

◆ beginRun()

def beginRun (   self)
Do nothing

Definition at line 118 of file validatePhase2Cosmics.py.

◆ event()

def event (   self)
 Fill histograms 

Definition at line 121 of file validatePhase2Cosmics.py.

◆ terminate()

def terminate (   self)
Close & write output files

Definition at line 247 of file validatePhase2Cosmics.py.

Member Data Documentation

◆ ADCCountOverNumberOfHitsInCDC

ADCCountOverNumberOfHitsInCDC

Histogram with ADC count vs.

number of hits in CDC

Definition at line 110 of file validatePhase2Cosmics.py.

◆ ADCCountOverNumberOfHitsInCDCVsMomentum

ADCCountOverNumberOfHitsInCDCVsMomentum

Profile with ADC count vs.

number of hits vs. momentum

Definition at line 112 of file validatePhase2Cosmics.py.

◆ HitsVsLayer

HitsVsLayer

Histogram with number of hits vs.

layer

Definition at line 94 of file validatePhase2Cosmics.py.

◆ HitsVsSensor

HitsVsSensor

Histogram with number of hits vs.

sensor

Definition at line 96 of file validatePhase2Cosmics.py.

◆ LayerVsSensor

LayerVsSensor

Histogram with hitted layer vs.

sensor

Definition at line 98 of file validatePhase2Cosmics.py.

◆ MomentumVsADCCountOverNumberOfHitsInCDC

MomentumVsADCCountOverNumberOfHitsInCDC

Profile with ADC count vs.

number of hits

Definition at line 115 of file validatePhase2Cosmics.py.


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