ATLAS Offline Software
Loading...
Searching...
No Matches
hotSpotInTAG Namespace Reference

Functions

 analyzeTree ()

Variables

 parser = argparse.ArgumentParser()
 type
 int
 dest
 default
 help
 action
 float
 args = parser.parse_args()
 run = args.runNumber
 lowerLumiBlock = args.lowerLB
 upperLumiBlock = args.upperLB
 stream = args.stream
 tag = args.tag
 amiTag = args.amiTag
 etaSpot = args.etaSpot
 phiSpot = args.phiSpot
 thresholdE = args.thresholdE
 deltaSpot = args.deltaSpot
 objectType = args.objectType
 minInLB = args.minInLB
 tagDirectory = args.fileDirectory
 tree = TChain("POOLCollectionTree")
 listOfFiles = pathExtract.returnEosTagPath(run,stream,amiTag,tag)
 entries = tree.GetEntries()
int nLB = 2500
list nbHitInHot = [0] * nLB
list cumEnergInHot = [0] * nLB
list nbNoiseBurstVeto = [0] * nLB
list nbLArNoisyRO_Std = [0] * nLB
list nbLArNoisyRO_SatTight = [0] * nLB
 h0map = TH1D("map","General map of %s with MET > %d MeV"%(objectType,thresholdE),64,-3.14,3.14)
 h0mapClean = TH1D("mapClean","General map of %s with MET > %d MeV - LArFlags != ERROR"%(objectType,thresholdE),64,-3.14,3.14)
 nb = tree.GetEntry( jentry )
list nLB_offending = []
int lowerLB = 2500
int upperLB = 0
str suffix = "NO LArFlags cut"
 c0 = TCanvas()
 h0Evol = TH1I("h0Evol","Nb of hits in a region of %.2f around (%.2f,%.2f) and Et/Pt > %d MeV - %s"%(deltaSpot,etaSpot,phiSpot,thresholdE,suffix),upperLB-lowerLB+1,lowerLB-0.5,upperLB+0.5)
 h0Evol_E = TH1I("h0Evol_E","Mean E/pt in a region of %.2f around (%.2f,%.2f) and Et/Pt > %d MeV - %s"%(deltaSpot,etaSpot,phiSpot,thresholdE,suffix),upperLB-lowerLB+1,lowerLB-0.5,upperLB+0.5)
 c0_2 = TCanvas()
 c0_3 = TCanvas()
list canvas = []
int iCurrent = len(canvas)-1
str cutC = "1"

Function Documentation

◆ analyzeTree()

hotSpotInTAG.analyzeTree ( )

Definition at line 32 of file hotSpotInTAG.py.

32def analyzeTree():
33 global nbHitInHot
34 global cumEnergInHot
35 global nbLArNoisyRO_Std
36 global nbLArNoisyRO_SatTight
37
38 if (tree.LArFlags & 8):nbNoiseBurstVeto[tree.LumiBlockN] = nbNoiseBurstVeto[tree.LumiBlockN] + 1
39 # Fill the list of coordinates depending on the object type
40 if ("TopoCluster" in objectType):
41 coordEnergy = [[tree.TopoClusterEt1,tree.TopoClusterEta1,tree.TopoClusterPhi1]]
42 if ("Jet" in objectType):
43 coordEnergy = [[tree.JetPt1,tree.JetEta1,tree.JetPhi1],[tree.JetPt2,tree.JetEta2,tree.JetPhi2],[tree.JetPt3,tree.JetEta3,tree.JetPhi3],[tree.JetPt4,tree.JetEta4,tree.JetPhi4],[tree.JetPt5,tree.JetEta5,tree.JetPhi5],[tree.JetPt6,tree.JetEta6,tree.JetPhi6]]
44 if ("LoosePhoton" in objectType):
45 coordEnergy = [[tree.LoosePhotonPt1,tree.LoosePhotonEta1,tree.LoosePhotonPhi1],[tree.LoosePhotonPt2,tree.LoosePhotonEta2,tree.LoosePhotonPhi2]]
46 if ("LooseElectron" in objectType):
47 coordEnergy = [[tree.LooseElectronPt1,tree.LooseElectronEta1,tree.LooseElectronPhi1],[tree.LooseElectronPt2,tree.LooseElectronEta2,tree.LooseElectronPhi2],[tree.LooseElectronPt3,tree.LooseElectronEta3,tree.LooseElectronPhi3],[tree.LooseElectronPt4,tree.LooseElectronEta4,tree.LooseElectronPhi4]]
48 if ("Tau" in objectType):
49 coordEnergy = [[tree.TauJetPt1,tree.TauJetEta1,tree.TauJetPhi1],[tree.TauJetPt2,tree.TauJetEta2,tree.TauJetPhi2]]
50 if ("MET" in objectType):
51 coordEnergy = [[tree.CellMissingET,0,tree.CellMissingETPhi]]
52 # Loop on the list of coordinates to analyze them
53 for iCE in coordEnergy:
54 if (iCE[0] > thresholdE):
55 if ("MET" in objectType): # Fill general map
56 h0map.Fill(iCE[2])
57 if not (tree.LArFlags & 8):
58 h0mapClean.Fill(iCE[2])
59 else:
60 h0map.Fill(iCE[1],iCE[2])
61 if not (tree.LArFlags & 8):
62 h0mapClean.Fill(iCE[1],iCE[2])
63 if not ((not args.larcleaning) and tree.LArFlags & 8): # Explicit cut LArEventInfo != ERROR to remove noise bursts is larcleaning is false
64 if (fabs(iCE[1]-etaSpot)<deltaSpot and fabs(iCE[2]-phiSpot)<deltaSpot): # A candidate has been found in suspicious region - Explict cut LArEventInfo != ERROR to remove noise bursts
65# if (fabs(iCE[1]-etaSpot)<deltaSpot and fabs(iCE[2]-phiSpot)<deltaSpot and not (tree.LArFlags & 8)): # A candidate has been found in suspicious region - Explict cut LArEventInfo != ERROR to remove noise bursts
66 nbHitInHot[tree.LumiBlockN]=nbHitInHot[tree.LumiBlockN] + 1
67 cumEnergInHot[tree.LumiBlockN]=cumEnergInHot[tree.LumiBlockN]+iCE[0]
68 if (tree.LArFlags & 1): nbLArNoisyRO_Std[tree.LumiBlockN] = nbLArNoisyRO_Std[tree.LumiBlockN] + 1
69 if (tree.LArFlags & 4): nbLArNoisyRO_SatTight[tree.LumiBlockN] = nbLArNoisyRO_SatTight[tree.LumiBlockN] + 1
70
71 return
72
73
74# Main===========================================================================================================

Variable Documentation

◆ action

hotSpotInTAG.action

Definition at line 76 of file hotSpotInTAG.py.

◆ amiTag

hotSpotInTAG.amiTag = args.amiTag

Definition at line 101 of file hotSpotInTAG.py.

◆ args

hotSpotInTAG.args = parser.parse_args()

Definition at line 92 of file hotSpotInTAG.py.

◆ c0

hotSpotInTAG.c0 = TCanvas()

Definition at line 191 of file hotSpotInTAG.py.

◆ c0_2

hotSpotInTAG.c0_2 = TCanvas()

Definition at line 210 of file hotSpotInTAG.py.

◆ c0_3

hotSpotInTAG.c0_3 = TCanvas()

Definition at line 216 of file hotSpotInTAG.py.

◆ canvas

list hotSpotInTAG.canvas = []

Definition at line 224 of file hotSpotInTAG.py.

◆ cumEnergInHot

list hotSpotInTAG.cumEnergInHot = [0] * nLB

Definition at line 147 of file hotSpotInTAG.py.

◆ cutC

str hotSpotInTAG.cutC = "1"

Definition at line 230 of file hotSpotInTAG.py.

◆ default

hotSpotInTAG.default

Definition at line 76 of file hotSpotInTAG.py.

◆ deltaSpot

hotSpotInTAG.deltaSpot = args.deltaSpot

Definition at line 105 of file hotSpotInTAG.py.

◆ dest

hotSpotInTAG.dest

Definition at line 76 of file hotSpotInTAG.py.

◆ entries

hotSpotInTAG.entries = tree.GetEntries()

Definition at line 143 of file hotSpotInTAG.py.

◆ etaSpot

int hotSpotInTAG.etaSpot = args.etaSpot

Definition at line 102 of file hotSpotInTAG.py.

◆ float

hotSpotInTAG.float

Definition at line 82 of file hotSpotInTAG.py.

◆ h0Evol

hotSpotInTAG.h0Evol = TH1I("h0Evol","Nb of hits in a region of %.2f around (%.2f,%.2f) and Et/Pt > %d MeV - %s"%(deltaSpot,etaSpot,phiSpot,thresholdE,suffix),upperLB-lowerLB+1,lowerLB-0.5,upperLB+0.5)

Definition at line 192 of file hotSpotInTAG.py.

◆ h0Evol_E

hotSpotInTAG.h0Evol_E = TH1I("h0Evol_E","Mean E/pt in a region of %.2f around (%.2f,%.2f) and Et/Pt > %d MeV - %s"%(deltaSpot,etaSpot,phiSpot,thresholdE,suffix),upperLB-lowerLB+1,lowerLB-0.5,upperLB+0.5)

Definition at line 194 of file hotSpotInTAG.py.

◆ h0map

hotSpotInTAG.h0map = TH1D("map","General map of %s with MET > %d MeV"%(objectType,thresholdE),64,-3.14,3.14)

Definition at line 153 of file hotSpotInTAG.py.

◆ h0mapClean

hotSpotInTAG.h0mapClean = TH1D("mapClean","General map of %s with MET > %d MeV - LArFlags != ERROR"%(objectType,thresholdE),64,-3.14,3.14)

Definition at line 154 of file hotSpotInTAG.py.

◆ help

hotSpotInTAG.help

Definition at line 76 of file hotSpotInTAG.py.

◆ iCurrent

int hotSpotInTAG.iCurrent = len(canvas)-1

Definition at line 227 of file hotSpotInTAG.py.

◆ int

hotSpotInTAG.int

Definition at line 76 of file hotSpotInTAG.py.

◆ listOfFiles

hotSpotInTAG.listOfFiles = pathExtract.returnEosTagPath(run,stream,amiTag,tag)

Definition at line 125 of file hotSpotInTAG.py.

◆ lowerLB

hotSpotInTAG.lowerLB = 2500

Definition at line 174 of file hotSpotInTAG.py.

◆ lowerLumiBlock

hotSpotInTAG.lowerLumiBlock = args.lowerLB

Definition at line 97 of file hotSpotInTAG.py.

◆ minInLB

hotSpotInTAG.minInLB = args.minInLB

Definition at line 107 of file hotSpotInTAG.py.

◆ nb

hotSpotInTAG.nb = tree.GetEntry( jentry )

Definition at line 163 of file hotSpotInTAG.py.

◆ nbHitInHot

list hotSpotInTAG.nbHitInHot = [0] * nLB

Definition at line 146 of file hotSpotInTAG.py.

◆ nbLArNoisyRO_SatTight

list hotSpotInTAG.nbLArNoisyRO_SatTight = [0] * nLB

Definition at line 150 of file hotSpotInTAG.py.

◆ nbLArNoisyRO_Std

list hotSpotInTAG.nbLArNoisyRO_Std = [0] * nLB

Definition at line 149 of file hotSpotInTAG.py.

◆ nbNoiseBurstVeto

list hotSpotInTAG.nbNoiseBurstVeto = [0] * nLB

Definition at line 148 of file hotSpotInTAG.py.

◆ nLB

int hotSpotInTAG.nLB = 2500

Definition at line 145 of file hotSpotInTAG.py.

◆ nLB_offending

list hotSpotInTAG.nLB_offending = []

Definition at line 173 of file hotSpotInTAG.py.

◆ objectType

hotSpotInTAG.objectType = args.objectType

Definition at line 106 of file hotSpotInTAG.py.

◆ parser

hotSpotInTAG.parser = argparse.ArgumentParser()

Definition at line 75 of file hotSpotInTAG.py.

◆ phiSpot

hotSpotInTAG.phiSpot = args.phiSpot

Definition at line 103 of file hotSpotInTAG.py.

◆ run

hotSpotInTAG.run = args.runNumber

Definition at line 96 of file hotSpotInTAG.py.

◆ stream

hotSpotInTAG.stream = args.stream

Definition at line 99 of file hotSpotInTAG.py.

◆ suffix

str hotSpotInTAG.suffix = "NO LArFlags cut"

Definition at line 185 of file hotSpotInTAG.py.

◆ tag

hotSpotInTAG.tag = args.tag

Definition at line 100 of file hotSpotInTAG.py.

◆ tagDirectory

hotSpotInTAG.tagDirectory = args.fileDirectory

Definition at line 108 of file hotSpotInTAG.py.

◆ thresholdE

hotSpotInTAG.thresholdE = args.thresholdE

Definition at line 104 of file hotSpotInTAG.py.

◆ tree

hotSpotInTAG.tree = TChain("POOLCollectionTree")

Definition at line 123 of file hotSpotInTAG.py.

◆ type

hotSpotInTAG.type

Definition at line 76 of file hotSpotInTAG.py.

◆ upperLB

hotSpotInTAG.upperLB = 0

Definition at line 175 of file hotSpotInTAG.py.

◆ upperLumiBlock

hotSpotInTAG.upperLumiBlock = args.upperLB

Definition at line 98 of file hotSpotInTAG.py.