Skip to content
Snippets Groups Projects
Commit 6fc9415d authored by Michel De Cian's avatar Michel De Cian Committed by Alex Pearce
Browse files

Commit latest try for neutral association in TurboSP

parent 8e646c9a
No related branches found
No related tags found
No related merge requests found
......@@ -224,19 +224,21 @@ class Tesla(LHCbConfigurableUser):
assocdigits = CaloDigit2MCLinks2Table("TurboDigitAssoc")
return
def _configureClustersAndProtosTruth(self,digits,clusters,protos) :
def _configureClustersAndProtosTruth(self,digits,clusters,protos, protoTabLoc = "Relations/Turbo/NeutralPP2MC" ) :
retSeq = GaudiSequencer("NeutralTruth")
clusterTabLoc = self.base + "Relations/CaloClusters"
assoccluster = CaloClusterMCTruth("TurboClusterAssoc")
assoccluster.OutputLevel = self.getProp('OutputLevel')
assoccluster.Input = digits
assoccluster.Output = clusterTabLoc
assoccluster.Clusters+=clusters
#assoccluster.OutputLevel = self.getProp('OutputLevel')
#assoccluster.OutputLevel = 1
assoccluster.Input = digits
assoccluster.Output = clusterTabLoc
#assoccluster.Clusters += clusters
assoccluster.Clusters += [ "/Event/Turbo/PID/Calo/EcalClusters", "/Event/Turbo/PID/Calo/EcalSplitClusters", "/Event/Turbo/PID/Calo/CaloClusters" ]
# When filtering MC, the relations table cloners will copy the tables
# to /Event/Turbo for us. Otherwise we create them there directly
protoTabLoc = "Relations/Turbo/NeutralPP2MC"
#protoTabLoc = "Relations/Turbo/NeutralPP2MC"
if not self.getProp("FilterMC"):
protoTabLoc = os.path.join(self.base, protoTabLoc)
assocneutral = NeutralPP2MC("TurboNeutralPP2MC")
......@@ -476,6 +478,7 @@ class Tesla(LHCbConfigurableUser):
assocdigits.OutputLevel = self.getProp('OutputLevel')
outputiDigiLoc = tesROOT + "Relations/CaloDigits"
assocdigits.Output = outputDigiLoc
## Add the cluster associator
## Finally configure the neutral PP2MC associator
......@@ -606,6 +609,7 @@ class Tesla(LHCbConfigurableUser):
assocpp.OutputLevel = self.getProp('OutputLevel')
#assocpp.OutputLevel = 1
assocpp.VetoEmpty=True
#assocpp.RootInTES = '/Event/Turbo'
# Make all track -> MCParticle linker tables
for loc in track_locs:
truthSeq = self._configureTrackTruth(assocpp,loc)
......@@ -621,13 +625,52 @@ class Tesla(LHCbConfigurableUser):
relationsLocations = [ loc.replace('/Event', '/Event/Relations') for loc in proto_locs ]
print relationsLocations
print "++++++++++++++++"
#relationsLocations = [ "/Event/Relations/Turbo/Long/Protos" ]
filterMCSeq = self._filterMCParticlesSequence(relationsLocations)
ChargedProtoSeq.Members += [filterMCSeq]
return ChargedProtoSeq
# NEUTRAL STUFF ################################################################
NeutralProtoSeq = GaudiSequencer("NeutralTruthSequencer")
## Add the digits associator
assocdigits = CaloDigit2MCLinks2Table("TurboDigitAssoc")
#assocdigits.OutputLevel = self.getProp('OutputLevel')
#assocdigits.OutputLevel = 1
outputDigiLoc = self.base+"Relations/CaloDigits"
assocdigits.Output = outputDigiLoc
assocdigits.Inputs = [ "Turbo/Raw/Ecal/Digits", "Turbo/Raw/Hcal/Digits"]
## Finally configure the neutral PP2MC associator
NeutralProtoSeq.Members+=[assocdigits]
# Gather all protos and clusters
neutralClustersTot=[]
neutralProtosTot=[]
print " ------> Neutral stuff <-------------"
print self.base
print " ------> Neutral stuff <-------------"
# Add standard Turbo
#neutralClustersTot+=[self.base+"Hlt2/Rec/Neutral/CaloClusters"]
neutralClustersTot+=[self.base+"CaloClusters"]
neutralProtosTot+=[self.base+"Protos"]
print " ------> Neutral stuff <-------------"
print neutralClustersTot
print " ------> Neutral stuff <-------------"
# Configure
self._configureDigitsTruth()
protoneutral, retSeq = self._configureClustersAndProtosTruth(outputDigiLoc,neutralClustersTot,neutralProtosTot, "Turbo/Relations/NeutralPP2MC")
NeutralProtoSeq.Members+=[retSeq]
return NeutralProtoSeq
def _configureOutputStream(self, stream, lines_dict):
......@@ -814,6 +857,7 @@ class Tesla(LHCbConfigurableUser):
for name in decoder_names:
from DAQSys.Decoders import DecoderDB
decoder = DecoderDB[name].setup()
#decoder.OutputLevel = 1
decoders_seq.Members.append(decoder)
DecodeRawEvent().DataOnDemand = False
......@@ -826,6 +870,9 @@ class Tesla(LHCbConfigurableUser):
prpacking = PersistRecoConf.PersistRecoPacking(datatype)
prunpackers = prpacking.unpackers()
#for p in prunpackers:
# p.OutputLevel = 1
unpackers_seq = GaudiSequencer('TeslaUnpackers')
# Need to run the packers in reverse order, due to object dependencies
unpackers_seq.Members += prunpackers[::-1]
......@@ -1212,7 +1259,7 @@ class Tesla(LHCbConfigurableUser):
#
if self.getProp('Mode') is "Online":
self.setProp('WriteFSR',True)
self._configureLumi()
#self._configureLumi()
else:
DecodeRawEvent().DataOnDemand=True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment