ATLAS Offline Software
Loading...
Searching...
No Matches
PlotCalibrationGains.EmPartitionPlots Class Reference
Collaboration diagram for PlotCalibrationGains.EmPartitionPlots:

Public Member Functions

 __init__ (self, name, nbins=40, minimum=0., maximum=2., XaxisTitle="", YaxisTitle="")
 get_partition_number (self, eta_bin)
 Fill (self, eta_bin, gain)

Public Attributes

int nPartitions = 5
list ext = ["all","00_15","15_25","25_32","32_50"]
list name = ["all","EMB","EMEC outer","EMEC Inner","FCAL 1"]
list his_partitions = []

Static Public Attributes

int Counter = 0

Detailed Description

Definition at line 517 of file PlotCalibrationGains.py.

Constructor & Destructor Documentation

◆ __init__()

PlotCalibrationGains.EmPartitionPlots.__init__ ( self,
name,
nbins = 40,
minimum = 0.,
maximum = 2.,
XaxisTitle = "",
YaxisTitle = "" )

Definition at line 519 of file PlotCalibrationGains.py.

519 def __init__(self,name,nbins=40,minimum=0.,maximum=2.,XaxisTitle="",YaxisTitle=""):
520
521 self.nPartitions=5
522 self.ext = ["all","00_15","15_25","25_32","32_50"]
523 self.name = ["all","EMB","EMEC outer","EMEC Inner","FCAL 1"]
524
525 # Maintain a counter of instances to assign unique histogram names
526 EmPartitionPlots.Counter += 1
527 self.his_partitions = []
528
529 for i_em_partition in range(0,self.nPartitions):
530 hname = ("GainTTEm_%d"%EmPartitionPlots.Counter) + self.ext[i_em_partition]
531 htitle = name+" for "+self.name[i_em_partition]
532 self.his_partitions.append(ROOT.TH1F(hname,htitle,nbins,minimum,maximum))
533
534 setAxisTitles( self.his_partitions, XaxisTitle, YaxisTitle )
535 setAxisSizes( self.his_partitions, 0.05, 0.04 )
536

Member Function Documentation

◆ Fill()

PlotCalibrationGains.EmPartitionPlots.Fill ( self,
eta_bin,
gain )

Definition at line 553 of file PlotCalibrationGains.py.

553 def Fill(self,eta_bin,gain):
554 partition=self.get_partition_number(eta_bin)
555
556 if partition > 0:
557 self.his_partitions[0].Fill(gain)
558 self.his_partitions[partition].Fill(gain)
559 else:
560 print ("Warning in EmPartitionPlots, nonexisting partition!" )
561

◆ get_partition_number()

PlotCalibrationGains.EmPartitionPlots.get_partition_number ( self,
eta_bin )

Definition at line 537 of file PlotCalibrationGains.py.

537 def get_partition_number(self,eta_bin):
538 indem = -1
539 if ( -9 <= eta_bin and eta_bin <= 8):
540 indem = 1
541 elif ((eta_bin>8 and eta_bin<=14) or (eta_bin>=-15 and eta_bin<-9)):
542 #elif ((eta_bin>8 and eta_bin<14) or (eta_bin>-15 and eta_bin<-9)): # cut out overlap
543 indem = 1
544 elif ((eta_bin>14 and eta_bin<=24) or (eta_bin>=-25 and eta_bin<-15)):
545 indem = 2
546 elif ((eta_bin>24 and eta_bin<=31) or (eta_bin>=-32 and eta_bin<-25)):
547 indem = 3
548 elif ((eta_bin>31) or (eta_bin<-32)):
549 indem = 4
550
551 return indem
552

Member Data Documentation

◆ Counter

int PlotCalibrationGains.EmPartitionPlots.Counter = 0
static

Definition at line 518 of file PlotCalibrationGains.py.

◆ ext

list PlotCalibrationGains.EmPartitionPlots.ext = ["all","00_15","15_25","25_32","32_50"]

Definition at line 522 of file PlotCalibrationGains.py.

◆ his_partitions

PlotCalibrationGains.EmPartitionPlots.his_partitions = []

Definition at line 527 of file PlotCalibrationGains.py.

◆ name

list PlotCalibrationGains.EmPartitionPlots.name = ["all","EMB","EMEC outer","EMEC Inner","FCAL 1"]

Definition at line 523 of file PlotCalibrationGains.py.

◆ nPartitions

PlotCalibrationGains.EmPartitionPlots.nPartitions = 5

Definition at line 521 of file PlotCalibrationGains.py.


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