diff --git a/AnalysisSys/CMakeLists.txt b/AnalysisSys/CMakeLists.txt index 86817ad2d88a3fa81f235ec469ed303122a9cf5c..a5168b86cf93befb16c90e28542972ab6a59fce7 100644 --- a/AnalysisSys/CMakeLists.txt +++ b/AnalysisSys/CMakeLists.txt @@ -34,7 +34,6 @@ gaudi_depends_on_subdirs(Analysis/PyAna Phys/LoKiPhysMC Phys/Particle2MCTruth Phys/ParticleMakerChecker - Phys/TrackSmearing Phys/VertexFitCheck Phys/CommonMCParticles Rich/RichPIDQC diff --git a/Phys/TrackSmearing/CMakeLists.txt b/Phys/TrackSmearing/CMakeLists.txt deleted file mode 100644 index c7545c6374a23ae678f7ceed0e6572918cebb965..0000000000000000000000000000000000000000 --- a/Phys/TrackSmearing/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -################################################################################ -# Package: TrackSmearing -################################################################################ -gaudi_subdir(TrackSmearing v1r6p1) - -gaudi_depends_on_subdirs(Event/LinkerEvent - Phys/DaVinciKernel) - -find_package(Boost) -find_package(ROOT) -include_directories(SYSTEM ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}) - -gaudi_add_module(TrackSmearing - src/*.cpp - LINK_LIBRARIES LinkerEvent DaVinciKernelLib) - diff --git a/Phys/TrackSmearing/cmt/requirements b/Phys/TrackSmearing/cmt/requirements deleted file mode 100644 index 370a62961849534a42991b828ceb0b8bb2196429..0000000000000000000000000000000000000000 --- a/Phys/TrackSmearing/cmt/requirements +++ /dev/null @@ -1,34 +0,0 @@ -#============================================================================ -# Created : 2011-04-12 -# Maintainer : Alexander Shires -#============================================================================ -package TrackSmearing -version v1r6p1 - -#============================================================================ -# Structure, i.e. directories to process. -#============================================================================ -branches cmt doc src options -#============================================================================ -# Used packages. Specify the version, * at the end specifies 'any revision' -# Put as many lines as needed, with all packages, without the '#' -#============================================================================ -# use Package v1r* Hat - -use DaVinciKernel v* Phys -use LinkerEvent v* Event - - - -include_path none -#============================================================================ -# Component library building rule -#============================================================================ -library TrackSmearing ../src/*.cpp -#============================================================================ -# define component library link options -#============================================================================ -apply_pattern component_library library=TrackSmearing - -macro_append TrackSmearing_shlibflags "-lHist" \ - WIN32 "libHist.lib" diff --git a/Phys/TrackSmearing/doc/release.notes b/Phys/TrackSmearing/doc/release.notes deleted file mode 100644 index 830b66cd6b97a5e17f7d2f3eff439363288599ac..0000000000000000000000000000000000000000 --- a/Phys/TrackSmearing/doc/release.notes +++ /dev/null @@ -1,63 +0,0 @@ -!----------------------------------------------------------------------------- -! Package : Phys/TrackSmearing -! Responsible : Sascha Stahl -! Purpose : -!----------------------------------------------------------------------------- - -!========================= TrackSmearing v1r6p1 2013-06-13 ========================= - -! 2013-05-17 - Chris Jones - - Remove unused data members, to fix clang32 warnings. - -!========================= TrackSmearing v1r6 2013-04-05 ========================= - -! 2013-04-03 - Sascha Stahl - - Fixed setting up the settings for different years. - -! 2013-03-27 - Chris Jones - - Fix compilation with -std=c++11 - - Other minor improvements - -! 2013-02-27 - Chris Jones - - Fix -pedantic compilation warnings - -!========================= TrackSmearing v1r5 2012-11-30 ========================= - -! 2012-11-27 Sascha Stahl - - Added the I.P. improver tool for upgrade studies. - -! 2012-11-29 - Marco Clemencic - - Added CMake configuration file. - -!========================= TrackSmearing v1r4 2012-10-04 ========================= - -! 2012-09-14 Sascha Stahl - - Switched from DVAlgorithm to DaVinciAlgorithm - - Added option to set 2012 data - MC12 tuning, on by default. - Set Settings to something different than "2012" to switch it off - -!========================= TrackSmearing v1r3 2012-06-28 ========================= - -! 2012-05-23 - - Realized that I screwed up the commit in March. I had committed an old version. - This is now undone including but the latest fixes are included. - -! 2012-05-06 Sascha Stahl - - Fixed potential memory leaks. - -!========================= TrackSmearing v1r2 2012-03-29 ========================= - -! 2012-03-23 Sascha Stahl - - Made MC11/Stripping 17 parameters default - -!========================= TrackSmearing v1r1 2012-03-01 ========================= - -! 2011-05-01 - Alex Shires - - Added protection to phi bin calculation in getSigma method - to avoid 2*PI rounding up out of range - -! 2011-04-23 - - Cleaned the code, you have now three choices how to smear - -! 2011-04-20 - Sascha Stahl - - first release of the track smearing tool diff --git a/Phys/TrackSmearing/options/MakeMyParticles.py b/Phys/TrackSmearing/options/MakeMyParticles.py deleted file mode 100644 index 6e3c14225eca868f8c12bbf7bff9dd61b93649ff..0000000000000000000000000000000000000000 --- a/Phys/TrackSmearing/options/MakeMyParticles.py +++ /dev/null @@ -1,212 +0,0 @@ -from Configurables import ChargedProtoParticleMaker, CombinedParticleMaker, NoPIDsParticleMaker, BestPIDParticleMaker, DataOnDemandSvc, UnpackTrack, DelegatingTrackSelector, TrackSelector, GaudiSequencer, TrackToDST, ChargedPP2MC, TrackAssociator, EventNodeKiller, DaVinci, TrackSmeared -from Configurables import MuonIDAlg -from MuonID import ConfiguredMuonIDs -from Configurables import ProtoParticleMUONFilter,ProtoParticleCALOFilter - -########### -##This file is useless when using smearBest -########### - - - -# kill all links -initseq=GaudiSequencer("AnalysisInitSeq") -evtnodekiller = EventNodeKiller("KillLinks") -evtnodekiller.Nodes = ["Link/Rec"] -initseq.Members += [ evtnodekiller ]; -#TrackSmeared().OutputLevel = 0 -#ChargedProtoParticleMaker().OutputLevel = 0 -#NoPIDsParticleMaker().OutputLevel = 0 - -#MyOptions = [ "MC" ] -print "OPTIONS OF MAKEMYPARTICLES" -#print MyOptions - -def makeMyProtoP(trackcont): - unpacker = UnpackTrack(trackcont+"UnpackTrack") - unpacker.InputName="pRec/Track/"+trackcont - unpacker.OutputName="Rec/Track/"+trackcont - smeartracks = TrackSmeared(trackcont+"TrackSmeared") - smeartracks.InputLocation = "Rec/Track/"+trackcont - outputLocation = "Smeared" - smeartracks.OutputLocation = outputLocation - smeartracks.smearCopied = True - smeartracks.smear = 1 - #smeartracks.makePlots = 1 - #smeartracks.OutputLevel = 2 - protoseq = GaudiSequencer(trackcont+"ProtoPSeq") - protos = ChargedProtoParticleMaker(trackcont+"ProtoPMaker") - protos.InputTrackLocation = ["Rec/Track/"+outputLocation] - protos.OutputProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - protos.addTool( DelegatingTrackSelector, name="TrackSelector" ) - #protos.OutputLevel = 0 - tracktypes = [ "Long","Upstream","Downstream","Ttrack","Velo","VeloR" ] - protos.TrackSelector.TrackTypes = tracktypes - selector = protos.TrackSelector - for tsname in tracktypes: - selector.addTool(TrackSelector,name=tsname) - ts = getattr(selector,tsname) - # Set Cuts - ts.TrackTypes = [tsname] - - # Add PID information - idalg = MuonIDAlg("BestIDalg") - #idalg.OutputLevel = 5 - cm=ConfiguredMuonIDs.ConfiguredMuonIDs(data=DaVinci().getProp("DataType")) - cm.configureMuonIDAlg(idalg) - idalg.TrackLocation = "Rec/Track/"+outputLocation - idalg.MuonIDLocation = "Rec/Muon/MuonPID/"+outputLocation - - - - from Configurables import ( ChargedProtoParticleAddRichInfo, - ChargedProtoParticleAddMuonInfo, - ChargedProtoParticleAddEcalInfo, - ChargedProtoParticleAddBremInfo, - ChargedProtoParticleAddHcalInfo, - ChargedProtoParticleAddPrsInfo, - ChargedProtoParticleAddSpdInfo, - ChargedProtoParticleAddVeloInfo, - ChargedProtoCombineDLLsAlg - ) - addmuonpid = ChargedProtoParticleAddMuonInfo("Bestaddmuoninfo") - addmuonpid.InputMuonPIDLocation = "Rec/Muon/MuonPID/"+outputLocation - addmuonpid.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - addrichpid = ChargedProtoParticleAddRichInfo("Bestaddrichinfo") - addrichpid.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - # The rich pid is added to the track in TrackSmeared, thus only kaon pion pid is consistent - # the others are not implemented. The modes smearBest and smearProto don't have the problems - #addcalopid = ChargedProtoParticleAddCaloInfo("Bestaddcaloinfo") - #addcalopid.InputRichCALOLocation = "Rec/Rich/"+outputLocation - #addcalopid.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - #ecal = ChargedProtoParticleAddEcalInfo("ChargedProtoPAddEcal") - #ecal.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - #brem = ChargedProtoParticleAddBremInfo("ChargedProtoPAddBrem") - #brem.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - #hcal = ChargedProtoParticleAddHcalInfo("ChargedProtoPAddHcal") - #hcal.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - #prs = ChargedProtoParticleAddPrsInfo("ChargedProtoPAddPrs") - #prs.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - #spd = ChargedProtoParticleAddSpdInfo("ChargedProtoPAddSpd") - #spd.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - #velo = ChargedProtoParticleAddVeloInfo("ChargedProtoPAddVeloDEDX") - #velo.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - combinedll = ChargedProtoCombineDLLsAlg("BestCombineDLL") - combinedll.ProtoParticleLocation ="Rec/ProtoP/"+trackcont+"ProtoPMaker" - - #set up associators - assoctr = TrackAssociator(trackcont+"AssocTr") - assoctr.TracksInContainer = "Rec/Track/"+outputLocation - assocpp=ChargedPP2MC(trackcont+"AssocPP") - assocpp.TrackLocations = [ "Rec/Track/"+outputLocation ] - assocpp.InputData = [ "Rec/ProtoP/"+trackcont+"ProtoPMaker" ] - assocpp.OutputTable = "Relations/Rec/ProtoP/"+trackcont+"ProtoPMaker" - # DST post treatment - TrackToDST(trackcont+"TrackToDST").TracksInContainer = "Rec/Track/"+trackcont - if not DaVinci().Simulation: - protoseq.Members += [ TrackToDST(trackcont+"TrackToDST"), protos] - protoseq.Members += [ ecal,brem,hcal,prs,spd,velo,addrichpid,addmuonpid,combinedll ] - DataOnDemandSvc().AlgMap.update( { - "/Event/Rec/Track/"+trackcont : unpacker.getFullName(), - "/Event/Rec/Track/"+outputLocation : smeartracks.getFullName(), - "/Event/Rec/Rich/"+outputLocation: protoseq.getFullName(), - "/Event/Rec/Muon/MuonPID/"+outputLocation : idalg.getFullName(), - "/Event/Rec/ProtoP/"+trackcont+"ProtoPMaker" : protoseq.getFullName(), - "/Event/Relations/Rec/ProtoP/"+trackcont+"ProtoPMaker" : protoseq.getFullName() - } ) - else: - if ( DaVinci().Simulation ) : - protoseq.Members += [ TrackToDST(trackcont+"TrackToDST"), assoctr, protos] - #protoseq.Members += [ ecal,brem,hcal,prs,spd,velo,addrichpid,addmuonpid,combinedll,assocpp ] - protoseq.Members += [ idalg,addmuonpid,addrichpid,combinedll,assocpp ] - DataOnDemandSvc().AlgMap.update( { - "/Event/Rec/Track/"+trackcont : unpacker.getFullName(), - "/Event/Rec/Track/"+outputLocation : smeartracks.getFullName(), - "/Event/Rec/Rich/"+outputLocation: protoseq.getFullName(), - "/Event/Rec/Muon/MuonPID/"+outputLocation : idalg.getFullName(), - "/Event/Rec/ProtoP/"+trackcont+"ProtoPMaker" : protoseq.getFullName(), - "/Event/Relations/Rec/ProtoP/"+trackcont+"ProtoPMaker" : protoseq.getFullName() - } ) - -from CommonParticles.Utils import * - - -#Here the particles are defined. For examples look also in $COMMONPARTICLESROOT -#The important thing is the input location. -#Can also be used with the option smearProto -def makeMyParticles(name, trackcont, particle): - # set up particle maker - #particleMaker = NoPIDsParticleMaker(name , Particle = particle) - particleMaker = CombinedParticleMaker(name , Particle = particle) -# particleMaker.OutputLevel = 0 - particleMaker.Input = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - selector = trackSelector ( particleMaker ) - # protoparticle filter: - fltr = protoFilter ( particleMaker , ProtoParticleCALOFilter, 'Pion' ) - fltr.Selection = [ "" ] - DataOnDemandSvc().AlgMap.update( { - "/Event/Phys/" + particleMaker.name() + '/Particles' : particleMaker.getFullName(), - "/Event/Phys/" + particleMaker.name() + '/Vertices' : particleMaker.getFullName() } ) - -def makeMyKaons(name, trackcont, particle): - # set up particle maker - #particleMaker = NoPIDsParticleMaker(name , Particle = particle) - particleMaker = CombinedParticleMaker(name , Particle = particle) - #particleMaker = BestPIDParticleMaker(name , Particle = particle) - #particleMaker.addTool(ProtoParticleCALOFilter(Selection = ["RequiresDet='RICH' CombDLL(k-pi)>'-5.0'"],name="muon")) - #particleMaker.Particles = [ "kaon" ] - particleMaker.Input = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - #particleMaker.OutputLevel = 0 - selector = trackSelector ( particleMaker ) - # protoparticle filter: - fltr =protoFilter ( particleMaker , ProtoParticleCALOFilter, 'Kaon' ) - fltr.Selection = [ "RequiresDet='RICH' CombDLL(k-pi)>'-5.0'" ] - #fltr = protoFilter ( particleMaker , ProtoParticleCALOFilter, 'Kaon' ) - #fltr.Selection = [ "RequiresDet='RICH' CombDLL(k-pi)>'-5.0'" ] - DataOnDemandSvc().AlgMap.update( { - "/Event/Phys/" + particleMaker.name() + '/Particles' : particleMaker.getFullName(), - "/Event/Phys/" + particleMaker.name() + '/Vertices' : particleMaker.getFullName() } ) - -def makeAllParticles(name,trackcont,particle): - particleMaker = NoPIDsParticleMaker(name , Particle = particle) - particleMaker.Input = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - DataOnDemandSvc().AlgMap.update( { - "/Event/Phys/" + particleMaker.name() + '/Particles' : particleMaker.getFullName(), - "/Event/Phys/" + particleMaker.name() + '/Vertices' : particleMaker.getFullName() } ) - -#def makeMyParticles(name, trackcont, particle): -# # set up particle maker -# particleMaker = BestPIDParticleMaker(name , Particle = particle) -# particleMaker.addTool(ProtoParticleMUONFilter(Selection = ["RequiresDet='MUON' IsMuon=True"]),name="muon") -# particleMaker.Particles = [ "muon" ] -# particleMaker.Input = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - #particleMaker.OutputLevel = 0 -# DataOnDemandSvc().AlgMap.update( { -# "/Event/Phys/" + particleMaker.name() + '/Particles' : particleMaker.getFullName(), -# "/Event/Phys/" + particleMaker.name() + '/Vertices' : particleMaker.getFullName() } ) - -# define protoparticle containers and register them with DataOnDemandSvc -makeMyProtoP("Best") -#makeMyProtoP("Downstream") -#makeMyProtoP("Forward") -#makeMyProtoP("Match") -#makeMyProtoP("VeloTT") -#makeMyProtoP("Seed") -#makeMyProtoP("Velo") - -# define particlemakers and register them with DataOnDemandSvc -makeMyKaons("SmrdLooseKaons", "Best", "kaon") -makeMyParticles("SmrdLoosePions", "Best", "pion") -makeAllParticles("SmrdBestPions", "Best", "pion") -#makeMyParticles("MyNoPIDBestProtons", "Best", "proton") -#makeMyParticles("MyNoPIDDownstreamPions", "Downstream", "pion") -#makeMyParticles("MyNoPIDDownstreamProtons", "Downstream", "proton") - -#makeMyParticles("MyNoPIDForwardPions", "Forward", "pion") -#makeMyParticles("MyNoPIDMatchPions", "Match", "pion") -#makeMyParticles("MyNoPIDForwardProtons", "Forward", "proton") -#makeMyParticles("MyNoPIDMatchProtons", "Match", "proton") - -#makeMyParticles("MyNoPIDUpstreamPions", "VeloTT", "pion") -#makeMyParticles("MyNoPIDTtrackPions", "Seed", "pion") -#makeMyParticles("MyNoPIDVeloPions", "Velo", "pion") diff --git a/Phys/TrackSmearing/options/MakeMyParticles2.py b/Phys/TrackSmearing/options/MakeMyParticles2.py deleted file mode 100644 index 424bb7a449d683387f88d141d0b1fe86e373a988..0000000000000000000000000000000000000000 --- a/Phys/TrackSmearing/options/MakeMyParticles2.py +++ /dev/null @@ -1,174 +0,0 @@ -from Configurables import ChargedProtoParticleMaker, CombinedParticleMaker, NoPIDsParticleMaker, BestPIDParticleMaker, DataOnDemandSvc, UnpackTrack, DelegatingTrackSelector, TrackSelector, GaudiSequencer, TrackToDST, ChargedPP2MC, TrackAssociator, EventNodeKiller, DaVinci, TrackSmeared -from Configurables import ChargedProtoParticleAddMuonInfo, MuonIDAlg,ChargedProtoParticleAddRichInfo -from MuonID import ConfiguredMuonIDs -from Configurables import ProtoParticleMUONFilter, ChargedProtoCombineDLLsAlg,ProtoParticleCALOFilter - - -# kill all links -initseq=GaudiSequencer("AnalysisInitSeq") -evtnodekiller = EventNodeKiller("KillLinks") -evtnodekiller.Nodes = ["Link/Rec"] -initseq.Members += [ evtnodekiller ]; -#TrackSmeared().OutputLevel = 0 -#ChargedProtoParticleMaker().OutputLevel = 0 -#NoPIDsParticleMaker().OutputLevel = 0 - -#MyOptions = [ "MC" ] -print "OPTIONS OF MAKEMYPARTICLES" -#print MyOptions - -def makeMyProtoP(trackcont): - unpacker = UnpackTrack(trackcont+"UnpackTrack") - unpacker.InputName="pRec/Track/"+trackcont - unpacker.OutputName="Rec/Track/"+trackcont - refitter = TrackSmeared(trackcont+"TrackSmeared") - refitter.InputLocation = "Rec/Track/"+trackcont - refitter.OutputLocation = "Refit" - refitter.smear = 1 - #refitter.makePlots = 1 - #refitter.OutputLevel = 2 - #idalg = MuonIDAlg("BestIDalg") - #idalg.OutputLevel = 0 - #cm=ConfiguredMuonIDs.ConfiguredMuonIDs(data=DaVinci().getProp("DataType")) - #cm.configureMuonIDAlg(idalg) - #idalg.TrackLocation = "Rec/Track/Refit" - #idalg.MuonIDLocation = "Rec/Muon/MuonPID/Refit" - downprotoseq = GaudiSequencer(trackcont+"ProtoPSeq") - downprotos = ChargedProtoParticleMaker(trackcont+"ProtoPMaker") - downprotos.InputTrackLocation = ["Rec/Track/Refit"] - downprotos.OutputProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - downprotos.addTool( DelegatingTrackSelector, name="TrackSelector" ) - #downprotos.OutputLevel = 0 - tracktypes = [ "Long","Upstream","Downstream","Ttrack","Velo","VeloR" ] - downprotos.TrackSelector.TrackTypes = tracktypes - selector = downprotos.TrackSelector - for tsname in tracktypes: - selector.addTool(TrackSelector,name=tsname) - ts = getattr(selector,tsname) - # Set Cuts - ts.TrackTypes = [tsname] - #set up associators - #addmuonpid = ChargedProtoParticleAddMuonInfo("Bestaddmuoninfo") - #addmuonpid.InputMuonPIDLocation = "Rec/Muon/MuonPID/Refit" - #addmuonpid.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - #addmuonpid.OutputLevel = 0 - addrichpid = ChargedProtoParticleAddRichInfo("Bestaddrichinfo") - addrichpid.InputRichPIDLocation = "Rec/Rich/Refit" - #addrichpid.InputRichPIDLocation = "Rec/Rich/"+trackcont - addrichpid.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - #addcalopid = ChargedProtoParticleAddCaloInfo("Bestaddcaloinfo") - #addcalopid.InputRichCALOLocation = "Rec/Rich/Refit" - #addcalopid.ProtoParticleLocation = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - combinedll = ChargedProtoCombineDLLsAlg("BestCombineDLL") - combinedll.ProtoParticleLocation ="Rec/ProtoP/"+trackcont+"ProtoPMaker" - assoctr = TrackAssociator(trackcont+"AssocTr") - #assoctr.TracksInContainer = "Rec/Track/"+trackcont - assoctr.TracksInContainer = "Rec/Track/Refit" - assocpp=ChargedPP2MC(trackcont+"AssocPP") - #assocpp.TrackLocations = [ "Rec/Track/"+trackcont ] - assocpp.TrackLocations = [ "Rec/Track/Refit" ] - assocpp.InputData = [ "Rec/ProtoP/"+trackcont+"ProtoPMaker" ] - #assocpp.InputData = [ "Rec/ProtoP/Refit" ] - assocpp.OutputTable = "Relations/Rec/ProtoP/"+trackcont+"ProtoPMaker" - # DST post treatment - TrackToDST(trackcont+"TrackToDST").TracksInContainer = "Rec/Track/"+trackcont - #downprotoseq.Members += [ TrackToDST(trackcont+"TrackToDST"), assoctr, downprotos, assocpp,addrichpid,combinedll ] - - if not DaVinci().Simulation: - downprotoseq.Members += [ TrackToDST(trackcont+"TrackToDST"), downprotos, addrichpid,combinedll ] - DataOnDemandSvc().AlgMap.update( { - "/Event/Rec/Track/"+trackcont : unpacker.getFullName(), - "/Event/Rec/Track/Refit" : refitter.getFullName(), - "/Event/Rec/Rich/Refit": downprotoseq.getFullName(), - "/Event/Rec/ProtoP/"+trackcont+"ProtoPMaker" : downprotoseq.getFullName(), - "/Event/Relations/Rec/ProtoP/"+trackcont+"ProtoPMaker" : downprotoseq.getFullName() - } ) - else: - if ( DaVinci().Simulation ) : - downprotoseq.Members += [ TrackToDST(trackcont+"TrackToDST"), assoctr, downprotos, addrichpid,combinedll,assocpp ] - DataOnDemandSvc().AlgMap.update( { - "/Event/Rec/Track/"+trackcont : unpacker.getFullName(), - "/Event/Rec/Track/Refit" : refitter.getFullName(), - "/Event/Rec/Rich/Refit": downprotoseq.getFullName(), - "/Event/Rec/ProtoP/"+trackcont+"ProtoPMaker" : downprotoseq.getFullName(), - "/Event/Relations/Rec/ProtoP/"+trackcont+"ProtoPMaker" : downprotoseq.getFullName() - } ) - -from CommonParticles.Utils import * - -def makeMyParticles(name, trackcont, particle): - # set up particle maker - #particleMaker = NoPIDsParticleMaker(name , Particle = particle) - particleMaker = CombinedParticleMaker(name , Particle = particle) -# particleMaker.OutputLevel = 0 - particleMaker.Input = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - selector = trackSelector ( particleMaker ) - # protoparticle filter: - fltr = protoFilter ( particleMaker , ProtoParticleCALOFilter, 'Pion' ) - fltr.Selection = [ "" ] - DataOnDemandSvc().AlgMap.update( { - "/Event/Phys/" + particleMaker.name() + '/Particles' : particleMaker.getFullName(), - "/Event/Phys/" + particleMaker.name() + '/Vertices' : particleMaker.getFullName() } ) - -def makeMyKaons(name, trackcont, particle): - # set up particle maker - #particleMaker = NoPIDsParticleMaker(name , Particle = particle) - particleMaker = CombinedParticleMaker(name , Particle = particle) - #particleMaker = BestPIDParticleMaker(name , Particle = particle) - #particleMaker.addTool(ProtoParticleCALOFilter(Selection = ["RequiresDet='RICH' CombDLL(k-pi)>'-5.0'"],name="muon")) - #particleMaker.Particles = [ "kaon" ] - particleMaker.Input = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - #particleMaker.OutputLevel = 0 - selector = trackSelector ( particleMaker ) - # protoparticle filter: - fltr =protoFilter ( particleMaker , ProtoParticleCALOFilter, 'Kaon' ) - fltr.Selection = [ "RequiresDet='RICH' CombDLL(k-pi)>'-5.0'" ] - #fltr = protoFilter ( particleMaker , ProtoParticleCALOFilter, 'Kaon' ) - #fltr.Selection = [ "RequiresDet='RICH' CombDLL(k-pi)>'-5.0'" ] - DataOnDemandSvc().AlgMap.update( { - "/Event/Phys/" + particleMaker.name() + '/Particles' : particleMaker.getFullName(), - "/Event/Phys/" + particleMaker.name() + '/Vertices' : particleMaker.getFullName() } ) - -def makeAllParticles(name,trackcont,particle): - particleMaker = NoPIDsParticleMaker(name , Particle = particle) - particleMaker.Input = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - DataOnDemandSvc().AlgMap.update( { - "/Event/Phys/" + particleMaker.name() + '/Particles' : particleMaker.getFullName(), - "/Event/Phys/" + particleMaker.name() + '/Vertices' : particleMaker.getFullName() } ) - -#def makeMyParticles(name, trackcont, particle): -# # set up particle maker -# particleMaker = BestPIDParticleMaker(name , Particle = particle) -# particleMaker.addTool(ProtoParticleMUONFilter(Selection = ["RequiresDet='MUON' IsMuon=True"]),name="muon") -# particleMaker.Particles = [ "muon" ] -# particleMaker.Input = "Rec/ProtoP/"+trackcont+"ProtoPMaker" - #particleMaker.OutputLevel = 0 -# DataOnDemandSvc().AlgMap.update( { -# "/Event/Phys/" + particleMaker.name() + '/Particles' : particleMaker.getFullName(), -# "/Event/Phys/" + particleMaker.name() + '/Vertices' : particleMaker.getFullName() } ) - -# define protoparticle containers and register them with DataOnDemandSvc -#makeMyProtoP("Best") -#makeMyProtoP("Downstream") -#makeMyProtoP("Forward") -#makeMyProtoP("Match") -#makeMyProtoP("VeloTT") -#makeMyProtoP("Seed") -#makeMyProtoP("Velo") - -# define particlemakers and register them with DataOnDemandSvc -#makeMyKaons("MyLooseKaons", "Best", "kaon") -#makeMyParticles("MyLoosePions", "Best", "pion") -#makeAllParticles("MyBestPions", "Best", "pion") -#makeMyParticles("MyNoPIDBestProtons", "Best", "proton") -#makeMyParticles("MyNoPIDDownstreamPions", "Downstream", "pion") -#makeMyParticles("MyNoPIDDownstreamProtons", "Downstream", "proton") - -#makeMyParticles("MyNoPIDForwardPions", "Forward", "pion") -#makeMyParticles("MyNoPIDMatchPions", "Match", "pion") -#makeMyParticles("MyNoPIDForwardProtons", "Forward", "proton") -#makeMyParticles("MyNoPIDMatchProtons", "Match", "proton") - -#makeMyParticles("MyNoPIDUpstreamPions", "VeloTT", "pion") -#makeMyParticles("MyNoPIDTtrackPions", "Seed", "pion") -#makeMyParticles("MyNoPIDVeloPions", "Velo", "pion") diff --git a/Phys/TrackSmearing/options/MyLoosePions.py b/Phys/TrackSmearing/options/MyLoosePions.py deleted file mode 100755 index 10d40f85ea8cb77721bb817b2dbd776cce3c09ce..0000000000000000000000000000000000000000 --- a/Phys/TrackSmearing/options/MyLoosePions.py +++ /dev/null @@ -1,60 +0,0 @@ -#!/usr/bin/env python -# ============================================================================= -# $Id: StdLoosePions.py,v 1.4 2009-07-01 18:42:29 jonrob Exp $ -# ============================================================================= -## @file CommonParticles/StdLoosePions.py -# configuration file for 'Standard Loose Pions' -# @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl -# @date 2009-01-14 -# ============================================================================= -""" -Configuration file for 'Standard Loose Pions' -""" -__author__ = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl" -__version__ = "CVS tag $Name: not supported by cvs2svn $, version $Revision: 1.4 $" -# ============================================================================= -__all__ = ( - 'MyLoosePions' , - 'locations' - ) -# ============================================================================= -from Gaudi.Configuration import * -from Configurables import CombinedParticleMaker -from Configurables import ProtoParticleCALOFilter - - -from CommonParticles.Utils import * - -## create the algorithm -algorithm = CombinedParticleMaker ( 'MyLoosePions' , - Particle = 'pion' ) - -# configure the track selector -selector = trackSelector ( algorithm ) - -## add this line, -## this corresonds to the output of the smearing tool 'Rec/ProtoP/' is hard coded -algorithm.Input = 'Rec/ProtoP/Smeared' -## - -# protoparticle filter: -fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Pion' ) -fltr.Selection = [ "" ] - -## configure Data-On-Demand service -locations = updateDoD ( algorithm ) - -## finally: define the symbol -MyLoosePions = algorithm - -## ============================================================================ -if '__main__' == __name__ : - - print __doc__ - print __author__ - print __version__ - print locationsDoD ( locations ) - -# ============================================================================= -# The END -# ============================================================================= diff --git a/Phys/TrackSmearing/options/PionsFromData.py b/Phys/TrackSmearing/options/PionsFromData.py deleted file mode 100644 index 5fff71e2d4492e9133b3c0c24c48b583cddc8256..0000000000000000000000000000000000000000 --- a/Phys/TrackSmearing/options/PionsFromData.py +++ /dev/null @@ -1,342 +0,0 @@ -from Gaudi.Configuration import * - -from PhysSelPython.Wrappers import Selection , SelectionSequence, DataOnDemand - - - -Data = False - -################################################# -from Configurables import CombineParticles, FilterDesktop - - -#DaVinci v28 -#_pions = DataOnDemand(Location='Phys/StdLoosePions/Particles') -#DaVinci v26 -####################################### -# pions -_pions = DataOnDemand(Location='Phys/StdLoosePions') -_filter = FilterDesktop("filterPions", Code = "TRCHI2DOF<4") -_selPions = Selection("SelFilterPions", - Algorithm = _filter, - RequiredSelections = [_pions]) -_seqPions = SelectionSequence("SeqFilterPions", TopSelection = _selPions) - -####################################### -# kaons -_kaons = DataOnDemand(Location='Phys/StdLooseKaons') -_filterkaons = FilterDesktop("filterKaons", Code = "TRCHI2DOF<4") -_selKaons = Selection("SelFilterKaons", - Algorithm = _filterkaons, - RequiredSelections = [_kaons]) -_seqKaons = SelectionSequence("SeqFilterKaons", TopSelection = _selKaons) - -_muons = DataOnDemand(Location='Phys/StdLooseMuons') -_filtermuons = FilterDesktop("filterMuons", Code = "TRCHI2DOF<4") -_selMuons = Selection("SelFilterMuons", - Algorithm = _filtermuons, - RequiredSelections = [_muons]) -_seqMuons = SelectionSequence("SeqFilterMuons", TopSelection = _selMuons) - - -if not Data: - ####################################### - # pions - _pions2 = DataOnDemand(Location='Phys/SmrdLoosePions') - _filter2 = FilterDesktop("filterPions2", Code = "TRCHI2DOF<4") - _selPions2 = Selection("SelFilterPions2", - Algorithm = _filter2, - RequiredSelections = [_pions2]) - _seqPions2 = SelectionSequence("SeqFilterPions2", TopSelection = _selPions2) - - ####################################### - # kaons - _kaons2 = DataOnDemand(Location='Phys/SmrdLooseKaons') - _kaonsfilter2 = FilterDesktop("filterKaons2", Code = "TRCHI2DOF<4") - _selKaons2 = Selection("SelFilterKaons2", - Algorithm = _kaonsfilter2, - RequiredSelections = [_kaons2]) - _seqKaons2 = SelectionSequence("SeqFilterKaons2", TopSelection = _selKaons2) - - ####################################### - # muons - _muons2 = DataOnDemand(Location='Phys/SmrdLooseMuons') - _filtermuons2 = FilterDesktop("filterMuons2", Code = "TRCHI2DOF<4") - _selMuons2 = Selection("SelFilterMuons2", - Algorithm = _filtermuons, - RequiredSelections = [_muons]) - _seqMuons2 = SelectionSequence("SeqFilterMuons2", TopSelection = _selMuons2) - - -####################################################################### -# -# Decay Tree tuple -# - -from Configurables import DecayTreeTuple -decaytuple = DecayTreeTuple("OriginalPionsTuple") -decaytuple.InputLocations = [_seqPions.outputLocation() ] -decaytuple.ToolList += [ - "TupleToolGeometry" - , "TupleToolKinematic" - , "TupleToolTrackInfo" - , "TupleToolPid" - ] -decaytuple.Decay = "[pi+]cc" -from Configurables import TupleToolTrigger -decaytuple.addTool( TupleToolTrigger, name='TupleToolTrigger' ) -decaytuple.TupleToolTrigger.Verbose = True -decaytuple.TupleToolTrigger.UseAutomaticTriggerList = False -decaytuple.TupleToolTrigger.TriggerList =[ -"Hlt1MBNoBiasDecision", -"Hlt1MBMicroBiasRZVeloDecision", -"Hlt1MBMicroBiasTStationDecision", -] -decaytuple.ToolList += [ "TupleToolTrigger" ] - - - -decaytuple4 = DecayTreeTuple("OriginalKaonsTuple") -decaytuple4.InputLocations = [_seqKaons.outputLocation() ] -decaytuple4.ToolList += [ - "TupleToolGeometry" - , "TupleToolKinematic" - , "TupleToolTrackInfo" - , "TupleToolPid" - ] -decaytuple4.Decay = "[K-]cc" -from Configurables import TupleToolTrigger -decaytuple4.addTool( TupleToolTrigger, name='TupleToolTrigger' ) -decaytuple4.TupleToolTrigger.Verbose = True -decaytuple4.TupleToolTrigger.UseAutomaticTriggerList = False -decaytuple4.TupleToolTrigger.TriggerList =[ -"Hlt1MBNoBiasDecision", -"Hlt1MBMicroBiasRZVeloDecision", -"Hlt1MBMicroBiasTStationDecision", -] -decaytuple4.ToolList += [ "TupleToolTrigger" ] - -decaytuple5 = DecayTreeTuple("OriginalMuonsTuple") -decaytuple5.InputLocations = [_seqMuons.outputLocation() ] -decaytuple5.ToolList += [ - "TupleToolGeometry" - , "TupleToolKinematic" - , "TupleToolTrackInfo" - , "TupleToolPid" - ] -decaytuple5.Decay = "[mu-]cc" -from Configurables import TupleToolTrigger -decaytuple5.addTool( TupleToolTrigger, name='TupleToolTrigger' ) -decaytuple5.TupleToolTrigger.Verbose = True -decaytuple5.TupleToolTrigger.UseAutomaticTriggerList = False -decaytuple5.TupleToolTrigger.TriggerList =[ -"Hlt1MBNoBiasDecision", -"Hlt1MBMicroBiasRZVeloDecision", -"Hlt1MBMicroBiasTStationDecision", -] -decaytuple5.ToolList += [ "TupleToolTrigger" ] - -if not Data: - decaytuple2 = DecayTreeTuple("SmearedPionsTuple") - decaytuple2.InputLocations = [_seqPions2.outputLocation() ] - decaytuple2.ToolList += [ - "TupleToolGeometry" - , "TupleToolKinematic" - , "TupleToolTrackInfo" - , "TupleToolPid" - ] - decaytuple2.Decay = "[pi+]cc" - decaytuple2.addTool( TupleToolTrigger, name='TupleToolTrigger' ) - decaytuple2.TupleToolTrigger.Verbose = True - decaytuple2.TupleToolTrigger.UseAutomaticTriggerList = False - decaytuple2.TupleToolTrigger.TriggerList =[ - "Hlt1MBNoBiasDecision", - "Hlt1MBMicroBiasRZVeloDecision", - "Hlt1MBMicroBiasTStationDecision", - ] - decaytuple2.ToolList += [ "TupleToolTrigger" ] - #decaytuple2.Branches = { "piplus2" : "[pi+]cc" } - - - decaytuple3 = DecayTreeTuple("SmearedKaonsTuple") - decaytuple3.InputLocations = [_seqKaons2.outputLocation() ] - decaytuple3.ToolList += [ - "TupleToolGeometry" - , "TupleToolKinematic" - , "TupleToolTrackInfo" - , "TupleToolPid" - ] - decaytuple3.Decay = "[K-]cc" - decaytuple3.addTool( TupleToolTrigger, name='TupleToolTrigger' ) - decaytuple3.TupleToolTrigger.Verbose = True - decaytuple3.TupleToolTrigger.UseAutomaticTriggerList = False - decaytuple3.TupleToolTrigger.TriggerList =[ - "Hlt1MBNoBiasDecision", - "Hlt1MBMicroBiasRZVeloDecision", - "Hlt1MBMicroBiasTStationDecision", - ] - decaytuple3.ToolList += [ "TupleToolTrigger" ] - -#from Configurables import TupleToolSmearedIP -#decaytuple.addTool( TupleToolSmearedIP, name = "TupleToolSmearedIP" ) -#decaytuple.TupleToolSmearedIP.runOnData = Data -#decaytuple.TupleToolSmearedIP.myMessages = False -#decaytuple.TupleToolSmearedIP.veloResolution = 0.05 -#decaytuple.ToolList += [ "TupleToolSmearedIP" ] - - -####################################################################### -# -# Configure the application -# - -#remove the welcome message -from Configurables import LoKiSvc -LoKiSvc().Welcome = False - -from Configurables import EventSelector -EventSelector().PrintFreq = 500 - - -from Configurables import DaVinci - -if Data: DaVinci().TupleFile = "DataPions.root" -else: DaVinci().TupleFile = "MCPions.root" -DaVinci().EvtMax = 1000 -DaVinci().HistogramFile = "DVHistos.root" -DaVinci().DataType = '2010' -DaVinci().Simulation = True -if Data: DaVinci().Simulation = False - -# MC Options -if not Data: - DaVinci().DDDBtag = 'head-20101206' - DaVinci().CondDBtag = "sim-20101210-vc-md100" - - -if not Data: - #importOptions("$User_release_area/DaVinci_v26r3p2/TrackSmearing/TrackSmearing/options/MakeMyParticles.py") - #from MakeMyParticles import * - #makeMyProtoP("Best") - #makeMyParticles("SmrdLoosePions", "Best", "pion") - #makeMyKaons("SmrdLooseKaons", "Best", "kaon") - #makeAllParticles("SmrdNoPIDPions", "Best", "pion") - #makeAllParticles("SmrdNoPIDKaons", "Best", "kaon") - from Configurables import TrackSmeared - TrackSmeared("TrackSmearing").InputLocation = "Rec/Track/Best" - #TrackSmeared("TrackSmearing").OutputLocation = "Best" - TrackSmeared("TrackSmearing").smear = True - TrackSmeared("TrackSmearing").makePlots = True - TrackSmeared("TrackSmearing").OutputLevel = 3 - TrackSmeared("TrackSmearing").smearBest = True - TrackSmeared("TrackSmearing").smearProto = True - TrackSmearingSeq = GaudiSequencer("TrackSmearingSeq") - TrackSmearingSeq.Members = [ TrackSmeared("TrackSmearing") ] - - - - - -DaVinci().UserAlgorithms += [ TrackSmearingSeq, - _seqPions.sequence() - ,decaytuple - ,_seqKaons.sequence() - ,decaytuple4 - ,_seqMuons.sequence() - ,decaytuple5 - ] - -#if not Data: -# DaVinci().UserAlgorithms += [ -# _seqPions2.sequence() -# ,decaytuple2 -# ,_seqKaons2.sequence() -# ,decaytuple3 -# ,_seqMuons2.sequence() -# ] - - -DaVinci().MainOptions = "" - - - - -if Data: #MiniBias DATA - EventSelector().Input = [ -"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000094_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000697_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000528_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000390_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000005_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000664_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000084_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000067_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000535_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000390_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000546_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000382_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000613_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000418_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000026_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000029_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000597_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000606_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000105_1.minibias.dst' TYP='POOL_ROOTTREE' OPT='READ'" -] - - -else: #MiniBias MC - EventSelector().Input = ["DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/MC/MC10/ALLSTREAMS.DST/00008895/0000/00008895_00000025_1.allstreams.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/MC/MC10/ALLSTREAMS.DST/00008895/0000/00008895_00000471_1.allstreams.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/MC/MC10/ALLSTREAMS.DST/00008895/0000/00008895_00000013_1.allstreams.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/MC/MC10/ALLSTREAMS.DST/00009368/0000/00009368_00000402_1.allstreams.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/MC/MC10/ALLSTREAMS.DST/00008895/0000/00008895_00000002_1.allstreams.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/MC/MC10/ALLSTREAMS.DST/00008895/0000/00008895_00000009_1.allstreams.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/MC/MC10/ALLSTREAMS.DST/00009368/0000/00009368_00000312_1.allstreams.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/MC/MC10/ALLSTREAMS.DST/00009368/0000/00009368_00000353_1.allstreams.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/MC/MC10/ALLSTREAMS.DST/00008895/0000/00008895_00000029_1.allstreams.dst' TYP='POOL_ROOTTREE' OPT='READ'" -,"DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/MC/MC10/ALLSTREAMS.DST/00009368/0000/00009368_00000217_1.allstreams.dst' TYP='POOL_ROOTTREE' OPT='READ'" -] - -# MC MAG DOWN -# '/lhcb/MC/MC10/ALLSTREAMS.DST/00008895/0000/00008895_00000025_1.allstreams.dst' -#, '/lhcb/MC/MC10/ALLSTREAMS.DST/00009368/0000/00009368_00000471_1.allstreams.dst' -#, '/lhcb/MC/MC10/ALLSTREAMS.DST/00009368/0000/00009368_00000013_1.allstreams.dst' -#, '/lhcb/MC/MC10/ALLSTREAMS.DST/00009368/0000/00009368_00000402_1.allstreams.dst' -#, '/lhcb/MC/MC10/ALLSTREAMS.DST/00008895/0000/00008895_00000002_1.allstreams.dst' -#, '/lhcb/MC/MC10/ALLSTREAMS.DST/00008895/0000/00008895_00000009_1.allstreams.dst' -#, '/lhcb/MC/MC10/ALLSTREAMS.DST/00009368/0000/00009368_00000312_1.allstreams.dst' -#, '/lhcb/MC/MC10/ALLSTREAMS.DST/00009368/0000/00009368_00000353_1.allstreams.dst' -#, '/lhcb/MC/MC10/ALLSTREAMS.DST/00008895/0000/00008895_00000029_1.allstreams.dst' -#, '/lhcb/MC/MC10/ALLSTREAMS.DST/00009368/0000/00009368_00000217_1.allstreams.ds - -# DATA MAG DOWN -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000094_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000697_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000528_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000259_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000005_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000664_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000220_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000084_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000067_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000535_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000390_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000546_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000382_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000613_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000418_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000026_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000029_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000597_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000606_1.minibias.dst -#/lhcb/data/2010/MINIBIAS.DST/00008378/0000/00008378_00000105_1.minibias.dst - - -#DATA MAG UP -#['/lhcb/data/2010/MINIBIAS.DST/00008392/0000/00008392_00000747_1.minibias.dst' , '/lhcb/data/2010/MINIBIAS.DST/00008392/0000/00008392_00000704_1.minibias.dst' , '/lhcb/data/2010/MINIBIAS.DST/00008392/0000/00008392_00000484_1.minibias.dst' , '/lhcb/data/2010/MINIBIAS.DST/00008392/0000/00008392_00000140_1.minibias.dst' , '/lhcb/data/2010/MINIBIAS.DST/00008392/0000/00008392_00000089_1.minibias.dst' , '/lhcb/data/2010/MINIBIAS.DST/00008392/0000/00008392_00000701_1.minibias.dst' , '/lhcb/data/2010/MINIBIAS.DST/00008392/0000/00008392_00000614_1.minibias.dst' , '/lhcb/data/2010/MINIBIAS.DST/00008392/0000/00008392_00000202_1.minibias.dst' , '/lhcb/data/2010/MINIBIAS.DST/00008392/0000/00008392_00000925_1.minibias.dst' , '/lhcb/data/2010/MINIBIAS.DST/00008392/0000/00008392_00000568_1.minibias.dst' ] - -#MC MAG UP -#['/lhcb/MC/MC10/ALLSTREAMS.DST/00009365/0000/00009365_00000418_1.allstreams.dst', '/lhcb/MC/MC10/ALLSTREAMS.DST/00009365/0000/00009365_00000243_1.allstreams.dst' ,'/lhcb/MC/MC10/ALLSTREAMS.DST/00009365/0000/00009365_00000146_1.allstreams.dst' ,'/lhcb/MC/MC10/ALLSTREAMS.DST/00009365/0000/00009365_00000138_1.allstreams.dst' ,'/lhcb/MC/MC10/ALLSTREAMS.DST/00008545/0000/00008545_00000023_1.allstreams.dst' ,'/lhcb/MC/MC10/ALLSTREAMS.DST/00008545/0000/00008545_00000029_1.allstreams.dst' ,'/lhcb/MC/MC10/ALLSTREAMS.DST/00009365/0000/00009365_00000235_1.allstreams.dst' ,'/lhcb/MC/MC10/ALLSTREAMS.DST/00009365/0000/00009365_00000364_1.allstreams.dst' ,'/lhcb/MC/MC10/ALLSTREAMS.DST/00009365/0000/00009365_00000129_1.allstreams.dst' ,'/lhcb/MC/MC10/ALLSTREAMS.DST/00009365/0000/00009365_00000414_1.allstreams.dst' ] - - diff --git a/Phys/TrackSmearing/options/SmearBest.py b/Phys/TrackSmearing/options/SmearBest.py deleted file mode 100644 index d1722cdf291d66c4f9c213f6eaad90b3f2c677e7..0000000000000000000000000000000000000000 --- a/Phys/TrackSmearing/options/SmearBest.py +++ /dev/null @@ -1,12 +0,0 @@ -from Configurables import GaudiSequencer -from Configurables import TrackSmeared -# file to smear proto particles and their associated track -smear = TrackSmeared("TrackSmeared") -#smear.InputLocation = "Rec/Track/Best" -#smear.Scale = 1.0 -smear.smearBest = True -#smear.OutputLevel = 2 -smearBest = GaudiSequencer("SmearBest") -smearBest.Members += [ smear ] - - diff --git a/Phys/TrackSmearing/options/SmearCopied.py b/Phys/TrackSmearing/options/SmearCopied.py deleted file mode 100644 index 199041094ad239866e6b5cf3ee03e789fd1dfecd..0000000000000000000000000000000000000000 --- a/Phys/TrackSmearing/options/SmearCopied.py +++ /dev/null @@ -1,9 +0,0 @@ -#Configuration file to smear copied tracks -#which can then be used to make protoparticles and particles -from Gaudi.Configuration import * -from Configurables import TrackSmeared -#smear = TrackSmeared("TrackSmeared") -#smear.InputLocation = "Rec/Track/Best" -#smear.smearCopied = True -#set the path right -importOptions("$TRACKSMEARINGROOT/options/MakeMyParticles.py") diff --git a/Phys/TrackSmearing/options/SmearProtos.py b/Phys/TrackSmearing/options/SmearProtos.py deleted file mode 100644 index da94e7cbee27630456b35dc205c07eca384ca747..0000000000000000000000000000000000000000 --- a/Phys/TrackSmearing/options/SmearProtos.py +++ /dev/null @@ -1,29 +0,0 @@ -from Configurables import GaudiSequencer -from Configurables import TrackSmeared - - -# file to smear proto particles and their associated track -smear = TrackSmeared("TrackSmeared") -#smear.InputLocation = "Rec/Track/Best" -output = "Smeared" -smear.OutputLocation = output -#smear.Scale = 1.0 -smear.smearProto = True -#smear.OutputLevel = 2 - -#get MC association back -from Configurables import TrackToDST, ChargedPP2MC, TrackAssociator -output="Smeared" -assoctr = TrackAssociator(output+"AssocTr") -assoctr.TracksInContainer = "Rec/Track/"+output -assocpp=ChargedPP2MC(output+"AssocPP") -assocpp.TrackLocations = [ "Rec/Track/"+output ] -assocpp.InputData = [ "Rec/ProtoP/"+output+"ProtoPMaker" ] -assocpp.OutputTable = "Relations/Rec/ProtoP/"+output+"ProtoPMaker" - -# add smearProto to a DaVinci sequence before you make the selection -smearProto = GaudiSequencer("SmearProto") -smearProto.Members += [ smear,assoctr,assocpp ] - - -#importOptions("$TRACKSMEARINGROOT/MyLoosePions.py") diff --git a/Phys/TrackSmearing/options/SmearedPions.py b/Phys/TrackSmearing/options/SmearedPions.py deleted file mode 100644 index 8b1d7b3d4e9a0e0bc8219ba25d9715ddf3da0643..0000000000000000000000000000000000000000 --- a/Phys/TrackSmearing/options/SmearedPions.py +++ /dev/null @@ -1,156 +0,0 @@ -from Gaudi.Configuration import * -from PhysSelPython.Wrappers import Selection , SelectionSequence, DataOnDemand -from Configurables import CombineParticles, FilterDesktop - - -#from MakeMyParticles import * -#makeMyProtoP("Best") -#makeMyParticles("SmrdLoosePions", "Best", "pion") -#makeMyKaons("SmrdLooseKaons", "Best", "kaon") -#makeAllParticles("SmrdNoPIDPions", "Best", "pion") -#makeAllParticles("SmrdNoPIDKaons", "Best", "kaon") - -from Configurables import TrackSmeared -output = "Smeared" #/Rec/Track/Smeared -TrackSmeared("TrackSmearing").OutputLocation = output -TrackSmeared("TrackSmearing").smear = True -TrackSmeared("TrackSmearing").makePlots = True -TrackSmeared("TrackSmearing").OutputLevel = 2 -TrackSmeared("TrackSmearing").smearProto = True -TrackSmearingSeq = GaudiSequencer("TrackSmearingSeq") - -#Preserve MC -from Configurables import TrackToDST, ChargedPP2MC, TrackAssociator -assoctr = TrackAssociator(output+"AssocTr") -assoctr.TracksInContainer = "Rec/Track/"+output -assocpp=ChargedPP2MC(output+"AssocPP") -assocpp.TrackLocations = [ "Rec/Track/"+output ] -assocpp.InputData = [ "Rec/ProtoP/"+output+"ProtoPMaker" ] -assocpp.OutputTable = "Relations/Rec/ProtoP/"+output+"ProtoPMaker" - -TrackSmearingSeq.Members = [ TrackSmeared("TrackSmearing") , assoctr, assocpp ] -from Configurables import CombinedParticleMaker -from CommonParticles.Utils import * -from Configurables import ProtoParticleCALOFilter -## create the algorithm -algorithm = CombinedParticleMaker ( 'SmrdLoosePions' , - Particle = 'pion' ) - -# configure the track selector -selector = trackSelector ( algorithm ) -## add this line, -## this corresonds to the output of the smearing tool 'Rec/ProtoP/' is hard coded -algorithm.Input = 'Rec/ProtoP/Smeared' -### protoparticle filter: -fltr = protoFilter ( algorithm , ProtoParticleCALOFilter, 'Pion' ) -fltr.Selection = [ "" ] -## configure Data-On-Demand service -locations = updateDoD ( algorithm ) -## finally: define the symbol -SmrdLoosePions = algorithm - - -#Truth matching -matchpion = "(mcMatch('[^pi-]CC'))" -#matchpion = "ALL" - -####################################### -# pions -_pions = DataOnDemand(Location='Phys/StdLoosePions') -_filter = FilterDesktop("filterPions", Code = matchpion) -_filter.Preambulo = [ - "from LoKiPhysMC.decorators import *" , - "from PartProp.Nodes import CC" - ] -_selPions = Selection("SelFilterPions", - Algorithm = _filter, - RequiredSelections = [_pions]) -_seqPions = SelectionSequence("SeqFilterPions", TopSelection = _selPions) - -####################################### -# pions -_pions2 = DataOnDemand(Location='Phys/SmrdLoosePions') -_filter2 = FilterDesktop("filterPions", Code = matchpion) -_filter2.Preambulo = [ - "from LoKiPhysMC.decorators import *" , - "from PartProp.Nodes import CC" - ] -_selPions2 = Selection("SelFilterPions2", - Algorithm = _filter2, - RequiredSelections = [_pions2]) -_seqPions2 = SelectionSequence("SeqFilterPions2", TopSelection = _selPions2) - - -####################################################################### -# -# Decay Tree tuple -# - -from Configurables import DecayTreeTuple -decaytuple = DecayTreeTuple("OriginalPionsTuple") -decaytuple.InputLocations = [_seqPions.outputLocation() ] -decaytuple.ToolList += [ - "TupleToolGeometry" - , "TupleToolKinematic" - , "TupleToolTrackInfo" - , "TupleToolPid" - ] -decaytuple.Decay = "[pi+]cc" - -decaytuple2 = DecayTreeTuple("SmearedPionsTuple") -decaytuple2.InputLocations = [_seqPions2.outputLocation() ] -decaytuple2.ToolList += [ - "TupleToolGeometry" - , "TupleToolKinematic" - , "TupleToolTrackInfo" - , "TupleToolPid" - ] -decaytuple2.Decay = "[pi+]cc" - - -####################################################################### -# -# Configure the application -# - -#remove the welcome message -from Configurables import LoKiSvc -LoKiSvc().Welcome = False - -from Configurables import EventSelector -EventSelector().PrintFreq = 500 - - -from Configurables import DaVinci - - -DaVinci().TupleFile = "SmrdPions.root" -DaVinci().EvtMax = 10 -DaVinci().HistogramFile = "DVHistos.root" -DaVinci().DataType = '2010' -DaVinci().Simulation = True - - -# MC Options -DaVinci().DDDBtag = 'head-20101206' -DaVinci().CondDBtag = "sim-20101210-vc-md100" - - - - - - -DaVinci().UserAlgorithms += [ - TrackSmearingSeq - ,SmrdLoosePions - ,_seqPions.sequence() - ,decaytuple - ,_seqPions2.sequence() - ,decaytuple2 - ] - - -DaVinci().MainOptions = "" - -EventSelector().Input = ["DATAFILE='PFN:castor:/castor/cern.ch/grid/lhcb/MC/MC10/ALLSTREAMS.DST/00008895/0000/00008895_00000025_1.allstreams.dst' TYP='POOL_ROOTTREE' OPT='READ'"] - diff --git a/Phys/TrackSmearing/src/IpImprover.cpp b/Phys/TrackSmearing/src/IpImprover.cpp deleted file mode 100644 index 060e571569caef8d96c75b80187cc10b7199f5d4..0000000000000000000000000000000000000000 --- a/Phys/TrackSmearing/src/IpImprover.cpp +++ /dev/null @@ -1,253 +0,0 @@ -// Include files - -// from Gaudi -#include "GaudiKernel/AlgFactory.h" -#include <boost/assign/list_of.hpp> -// track interfaces -//#include "Event/Track.h" - -#include "TrackInterfaces/ITrackManipulator.h" -#include "GaudiKernel/ToStream.h" - -//mc linker -#include <Linker/LinkedTo.h> -#include "Event/MCParticle.h" - -// local -#include "IpImprover.h" - -//----------------------------------------------------------------------------- -// Implementation file for class : IpImprover -// -// 2012-11-26 : Sascha Stahl -//----------------------------------------------------------------------------- - -// Declaration of the Algorithm Factory -DECLARE_ALGORITHM_FACTORY( IpImprover ) - -//============================================================================= -// Standard constructor, initializes variables -//============================================================================= -IpImprover::IpImprover( const std::string& name, - ISvcLocator* pSvcLocator) - : DaVinciAlgorithm ( name , pSvcLocator ), - m_trackLocations( 1, LHCb::TrackLocation::Default ) -{ - declareProperty( "TrackLocations", m_trackLocations ); - - // Workaround for boost compilation errors with -std=c++11 - const std::vector<unsigned int> tmpTypes = boost::assign::list_of - (LHCb::Track::Long)(LHCb::Track::Velo)(LHCb::Track::Upstream); - declareProperty("types", m_types = tmpTypes ); - - declareProperty("Improvement",m_improvement = -1.0); // set to bigger 0, - // if one wants only one overall correction - declareProperty("MomImprovement",m_pImprovement = 0.0); - - declareProperty( "xpar1_mc",m_xpar1_mc = 11.); - declareProperty( "xpar2_mc",m_xpar2_mc = 25.); - declareProperty( "xpar1_upgrade",m_xpar1_upgrade = 7. ); - declareProperty( "xpar2_upgrade",m_xpar2_upgrade = 13. ); - - // currently the code uses only one parametrization - // but in principle that can be changed - declareProperty( "ypar1_mc",m_ypar1_mc = 11.); - declareProperty( "ypar2_mc",m_ypar2_mc = 25.); - declareProperty( "ypar1_upgrade",m_ypar1_upgrade = 7. ); - declareProperty( "ypar2_upgrade",m_ypar2_upgrade = 13. ); - - - m_funcx_upgrade = new TF1("funcx_upgrade","[0]/1000.0+[1]*x",0.0,1.0); - m_funcx_upgrade->SetParameter(0,m_xpar1_upgrade); - m_funcx_upgrade->SetParameter(1,m_xpar2_upgrade); - - m_funcx_mc = new TF1("funcx_mc","[0]/1000.0+[1]*x",0.0,1.0); - m_funcx_mc->SetParameter(0,m_xpar1_mc); - m_funcx_mc->SetParameter(1,m_xpar2_mc); - - m_funcy_upgrade = new TF1("funcy_upgrade","[0]/1000.0+[1]*x",0.0,1.0); - m_funcy_upgrade->SetParameter(0,m_ypar1_upgrade); - m_funcy_upgrade->SetParameter(1,m_ypar2_upgrade); - - m_funcy_mc = new TF1("funcy_mc","[0]/1000.0+[1]*x",0.0,1.0); - m_funcy_mc->SetParameter(0,m_ypar1_mc); - m_funcy_mc->SetParameter(1,m_ypar2_mc); - -} -//============================================================================= -// Destructor -//============================================================================= -IpImprover::~IpImprover() { - delete m_funcx_upgrade; - delete m_funcx_mc; - - delete m_funcy_upgrade; - delete m_funcy_mc; - - -} - -//============================================================================= -// Initialization -//============================================================================= -StatusCode IpImprover::initialize() { - StatusCode sc = DaVinciAlgorithm::initialize(); - if ( sc.isFailure() ) return sc; - - if ( msgLevel(MSG::DEBUG) ) debug() << "==> Initialize" << endmsg; - //std::vector<unsigned int>::const_iterator iterT = m_types.begin(); - //for (; iterT != m_types.end(); ++iterT){ - // LHCb::Track::Types type = LHCb::Track::Types(*iterT); - // std::string aName = Gaudi::Utils::toString(type); - //ITrackManipulator* aTool = tool<ITrackManipulator>(m_improverToolName, - // aName+"_improveTool", this ); - - // m_toolMap[type] = aTool; - //} // iterT - - - return StatusCode::SUCCESS; -} - -double IpImprover::getImprovement(double pt, bool isX = true) -{ - - double inversept = pt > 0 ? 1.0/pt : 0.0; - double improvement = 0; - - if (isX){ - improvement = (m_funcx_mc->Eval(inversept) - m_funcx_upgrade->Eval(inversept) )/ m_funcx_mc->Eval(inversept); - }else{ - improvement = (m_funcy_mc->Eval(inversept) - m_funcy_upgrade->Eval(inversept) )/ m_funcy_mc->Eval(inversept); - - } - - - return improvement; - -} - - - -StatusCode IpImprover::improveTrack(LHCb::Track& aTrack,const LHCb::MCParticle* mcp ) -{ - - LHCb::State * state = aTrack.stateAt( LHCb::State::ClosestToBeam ); - if (state==NULL){ - return Warning("no state found",StatusCode::SUCCESS); - } - - - - - - double z = state->z(); - const Gaudi::XYZPoint origin = mcp->originVertex()->position(); - //const Gaudi::LorentzVector momentum = mcp->momentum(); - - double improvement = getImprovement(mcp->momentum().pt()); - if (m_improvement > 0.){ - improvement = m_improvement; - } - - - double tx = mcp->momentum().x()/ mcp->momentum().z(); - double ty = mcp->momentum().y()/ mcp->momentum().z(); - - //double alpha = atan(tx); - //double gamma = atan(ty); - - - double trueX = origin.x()+(z-origin.z())*tx; - double trueY = origin.y()+(z-origin.z())*ty; - - double recX = state->x(); - double recY = state->y(); - - double diffX = recX-trueX; - double diffY = recY-trueY; - - double correctionX = -1*improvement * diffX; - double correctionY = -1*improvement * diffY; - - - - double newX = recX + correctionX; - double newY = recY + correctionY; - - - state->setX(newX); - state->setY(newY); - - // do we want to improve the slope as well? - double recTx = state->tx(); - double recTy = state->ty(); - double newTx = improvement*tx+(1-improvement)*recTx; - double newTy = improvement*ty+(1-improvement)*recTy; - - state->setTx(newTx); - state->setTy(newTy); - - - - if ( m_pImprovement>0){ - double trueMomentum = mcp->p(); - double recMomentum = state->p(); - - double newMomentum = m_pImprovement*trueMomentum+(1-trueMomentum)*recMomentum; - double q = state->qOverP()>0? 1. : -1.; - state->setQOverP(q/newMomentum); - } - - return StatusCode::SUCCESS; - -} - - -//============================================================================= -// Main execution -//============================================================================= -StatusCode IpImprover::execute() { - - if ( msgLevel(MSG::DEBUG) ) debug() << "==> Execute" << endmsg; - - // code goes here - std::vector<std::string>::const_iterator iterI = m_trackLocations.begin(); - for (; iterI != m_trackLocations.end(); ++iterI){ - - LHCb::Tracks* tracks = getIfExists<LHCb::Tracks*>(*iterI) ; - LinkedTo<LHCb::MCParticle, LHCb::Track> directLink( evtSvc(), msgSvc(), *iterI ); - - if (NULL==tracks) { - continue; - } - // loop over Track Container - for (LHCb::Tracks::iterator iterT = tracks->begin(); iterT != tracks->end(); ++iterT) { - unsigned int type = (*iterT)->type(); - if (std::find(m_types.begin(), m_types.end(),type) != m_types.end()){ - - const LHCb::MCParticle* mcp = directLink.first(*iterT); - if(mcp) improveTrack(**iterT,mcp); - - //m_toolMap[type]->execute(**iterT).ignore(); - } - } // iterT - }//iterI - - - - setFilterPassed(true); // Mandatory. Set to true if event is accepted. - return StatusCode::SUCCESS; -} - -//============================================================================= -// Finalize -//============================================================================= -StatusCode IpImprover::finalize() { - - if ( msgLevel(MSG::DEBUG) ) debug() << "==> Finalize" << endmsg; - - return DaVinciAlgorithm::finalize(); -} - -//============================================================================= diff --git a/Phys/TrackSmearing/src/IpImprover.h b/Phys/TrackSmearing/src/IpImprover.h deleted file mode 100644 index 4b4ab4c3a677b11691c000835175852d9e959436..0000000000000000000000000000000000000000 --- a/Phys/TrackSmearing/src/IpImprover.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef IPIMPROVER_H -#define IPIMPROVER_H 1 - -// Include files -// from DaVinci, this is a specialized GaudiAlgorithm -#include "Kernel/DaVinciAlgorithm.h" -#include <string> -#include <vector> -#include <map> -#include "Event/Track.h" -#include "Event/MCParticle.h" -#include <TF1.h> - -//class ITrackManipulator; -//class LHCb::Track; -//class LHCb::MCParticle; - - -/** @class IpImprover IpImprover.h - * - * - * @author Sascha Stahl - * @date 2012-11-26 - */ -class IpImprover : public DaVinciAlgorithm -{ - -public: - - /// Standard constructor - IpImprover( const std::string& name, ISvcLocator* pSvcLocator ); - - virtual ~IpImprover( ); ///< Destructor - - StatusCode initialize() override; ///< Algorithm initialization - StatusCode execute () override; ///< Algorithm execution - StatusCode finalize () override; ///< Algorithm finalization - -private: - - std::vector<unsigned int> m_types; - std::vector<std::string> m_trackLocations; - double m_improvement; - double m_pImprovement; - - TF1* m_funcx_upgrade; - TF1* m_funcx_mc; - TF1* m_funcy_upgrade; - TF1* m_funcy_mc; - - double m_xpar1_mc; - double m_xpar2_mc; - double m_xpar1_upgrade; - double m_xpar2_upgrade; - double m_ypar1_mc; - double m_ypar2_mc; - double m_ypar1_upgrade; - double m_ypar2_upgrade; - -private: - - StatusCode improveTrack(LHCb::Track& aTrack, const LHCb::MCParticle* mcp); - - double getImprovement(double pt, bool isX); - -}; - -#endif // IPIMPROVER_H diff --git a/Phys/TrackSmearing/src/TrackSmeared.cpp b/Phys/TrackSmearing/src/TrackSmeared.cpp deleted file mode 100644 index 793c941e214686eaad6a939e6c50ae27af7f0612..0000000000000000000000000000000000000000 --- a/Phys/TrackSmearing/src/TrackSmeared.cpp +++ /dev/null @@ -1,450 +0,0 @@ -// $Id: $ -// Include files - -// from Gaudi -#include "GaudiKernel/AlgFactory.h" -#include "TrackInterfaces/ITrackFitter.h" - -// local -#include "TrackSmeared.h" -#include <boost/foreach.hpp> -#include <boost/lexical_cast.hpp> -#include <boost/assign/list_of.hpp> -#include <TRandom3.h> - - -//----------------------------------------------------------------------------- -// Implementation file for class : TrackSmeared -// -// 2010-08-27 : Sascha Stahl -//----------------------------------------------------------------------------- - -// Declaration of the Algorithm Factory -DECLARE_ALGORITHM_FACTORY( TrackSmeared ) - -//============================================================================= -// Standard constructor, initializes variables -//============================================================================= - TrackSmeared::TrackSmeared( const std::string& name, - ISvcLocator* pSvcLocator) - : DaVinciAlgorithm ( name , pSvcLocator ) -{ - declareProperty( "InputLocation",m_trackLocation = LHCb::TrackLocation::Default); - declareProperty( "OutputLocation",m_outputLocation = "Smeared"); - declareProperty( "ProtoLocation",m_protoLocation = LHCb::ProtoParticleLocation::Charged); - declareProperty( "Seed",m_seed = 4357); - declareProperty( "xpar1_mc",m_xpar1_mc = 7.6); - declareProperty( "xpar2_mc",m_xpar2_mc = 24.8); - declareProperty( "xpar1_data",m_xpar1_data = 9.2 ); - declareProperty( "xpar2_data",m_xpar2_data = 28.3 ); - declareProperty( "ypar1_mc",m_ypar1_mc = 8.0); - declareProperty( "ypar2_mc",m_ypar2_mc = 24.4); - declareProperty( "ypar1_data",m_ypar1_data = 9.0 ); - declareProperty( "ypar2_data",m_ypar2_data = 27.6 ); - declareProperty( "makePlots",m_plots = false ); - declareProperty( "smear",m_smear = true); - declareProperty( "Scale",m_scale = 1.0); - declareProperty( "usePhi",m_usePhi = true ); - declareProperty( "smearBest", m_smearBest = false); - declareProperty( "smearProto", m_smearProto = false ); - declareProperty( "smearCopied", m_smearCopied = false ); - declareProperty( "Settings", m_settings = "2012" ); - - // Parameters for MC10 and Reco12 - /* - declareProperty( "paramsx_data",m_paramsx_data= - boost::assign::list_of< std::pair<double,double> > - (7.39663,25.375)(11.9523,30.8468)(12.1657,31.0318)(6.80381,26.2239) - (6.31307,26.1924)(12.0715,30.4908)(13.968,29.4501)(8.58082,24.9248) ); - declareProperty( "paramsy_data",m_paramsy_data= - boost::assign::list_of< std::pair<double,double> > - (11.3659,23.9497)(9.61021,29.9749)(7.62483,31.652)(9.04329,26.1887) - (10.1667,24.9057)(10.4476,28.463)(7.64104,30.8264)(12.5512,23.7025) ); - declareProperty( "paramsx_mc",m_paramsx_mc= - boost::assign::list_of< std::pair<double,double> > - (5.94179,19.298)(10.4385,29.5275)(9.38674,30.6793)(6.45098,19.2148) - (7.05916,18.8357)(9.35444,29.9623)(8.79601,30.6255)(6.60782,18.9007) ); - declareProperty( "paramsy_mc",m_paramsy_mc= - boost::assign::list_of< std::pair<double,double> > - (9.85327,19.1644)(6.61456,28.2261)(6.21135,29.2543)(10.0675,19.4316) - (9.74202,19.0929)(6.13729,28.6578)(5.31868,29.8177)(10.6302,18.7859) ); - */ - - declareProperty( "paramsx_data",m_paramsx_data ); - declareProperty( "paramsy_data",m_paramsy_data ); - declareProperty( "paramsx_mc",m_paramsx_mc ); - declareProperty( "paramsy_mc",m_paramsy_mc ); - -} - -//============================================================================= -// Destructor -//============================================================================= -TrackSmeared::~TrackSmeared() {} - -//============================================================================= -// Initialization -//============================================================================= -StatusCode TrackSmeared::initialize() -{ - StatusCode sc = DaVinciAlgorithm::initialize(); - if ( sc.isFailure() ) return sc; - - - - if ( "2012" == m_settings ) - { - const DPairVector tmp1 = boost::assign::list_of<DPair> - (18.1363 , 21.151 )(19.4728 , 25.755 )(19.5616 , 25.6784 )(17.0959 , 21.3326 ) - (17.5133 , 20.9126 )(20.0083 , 24.678 )(21.3094 , 25.1192 )(18.7363 , 20.945 ); - m_paramsx_data = tmp1; - - const DPairVector tmp2 = boost::assign::list_of<DPair> - (16.8973 , 21.3073 )(20.9937 , 24.8285 )(20.3615 , 24.5534 )(16.7094 , 21.2874 ) - (16.8174 , 21.0898 )(21.8155 , 23.2996 )(22.415 , 24.2684 )(16.652 , 21.662 ); - m_paramsy_data = tmp2; - - const DPairVector tmp3 = boost::assign::list_of<DPair> - (12.0798 + 2.23 , 16.419 )(14.2948 + 2.45, 26.1166 )(14.2859 + 2.44, 26.5871 )(12.1948 + 2.07 , 16.6805 ) - (12.153 + 2.24 , 16.5793 )(14.5924 +2.47 , 25.8522 )(14.8085 + 2.7 , 26.277 )(12.0577 + 2.6, 16.6684 ); - m_paramsx_mc = tmp3; - - const DPairVector tmp4 = boost::assign::list_of<DPair> - (14.0701 + 2.0 , 16.828 )(12.6155 + 2.98 , 24.5925 )(12.8974 + 2.70, 25.0376 )(14.3956 + 1.9 , 16.9418 ) - (14.1787 + 1.69 , 16.7516 )(12.4779 + 3.26, 24.5073 )(13.0426 + 3.0, 24.5692 )(14.6289 + 1.61, 16.5893 ); - m_paramsy_mc = tmp4; - } - else - { - // Parameters for MC11 and Stripping17, don't mix them as the method to exctract them was changed. - const DPairVector tmp1 = boost::assign::list_of<DPair> - (15.8007 , 21.5995 )(17.083 , 26.8743 )(17.188 , 26.9004 )(15.2431 , 21.8942 ) - (15.3789 , 21.6944 )(17.3643 , 26.0733 )(18.1501 , 26.4945 )(15.9901 , 21.751 ); - m_paramsx_data=tmp1; - - const DPairVector tmp2 = boost::assign::list_of<DPair> - (15.4397 , 22.0227 )(17.2131 , 25.725 )(17.3457 , 25.8134 )(15.1637 , 22.3395 ) - (15.4863 , 21.9516 )(17.8457 , 24.7536 )(17.6028 , 25.6401 )(15.5212 , 22.0329 ); - m_paramsy_data=tmp2; - - const DPairVector tmp3 = boost::assign::list_of<DPair> - (12.241 , 16.793 )(15.4021 , 26.2156 )(15.0332 , 26.9101 )(12.4106 , 17.1177 ) - (12.9271 , 16.7202 )(14.9721 , 26.2175 )(15.4448 , 26.4068 )(12.0711 , 17.2668 ); - m_paramsx_mc=tmp3; - - const DPairVector tmp4 = boost::assign::list_of<DPair> - (14.7947 , 17.0342 )(12.9836 , 25.0856 )(12.7721 , 25.6032 )(15.0134 , 17.299 ) - (14.652 , 17.3152 )(13.187 , 24.8611 )(12.8251 , 25.2981 )(14.0403 , 17.3576 ); - m_paramsy_mc=tmp4; - - } - - - m_funcsy_mc.reserve(m_paramsy_mc.size()); - m_funcsx_mc.reserve(m_paramsx_mc.size()); - m_funcsy_data.reserve(m_paramsy_data.size()); - m_funcsx_data.reserve(m_paramsx_data.size()); - - info()<< "==> Initialize" << endmsg; - info()<< "++++++++++++++++" << endmsg; - info()<< "smear: "<< m_smear << endmsg; - info()<< "scale factor: "<< m_scale << endmsg; - info()<< "Random seed: "<< m_seed << endmsg; - info()<< "use Phi dependency: " << m_usePhi << endmsg; - info()<< "smear Tracks in Best Container: "<< m_smearBest << endmsg; - info()<< "smear Proto particles: "<< m_smearProto << endmsg; - info()<< "smear copied tracks: "<< m_smearCopied << endmsg; - info()<< "++++++++++++++++" << endmsg; - - m_funcx_data = new TF1("funcx_data","[0]/1000.0+[1]*x",0.0,1.0); - m_funcx_data->SetParameter(0,m_xpar1_data); - m_funcx_data->SetParameter(1,m_xpar2_data); - - m_funcx_mc = new TF1("funcx_mc","[0]/1000.0+[1]*x",0.0,1.0); - m_funcx_mc->SetParameter(0,m_xpar1_mc); - m_funcx_mc->SetParameter(1,m_xpar2_mc); - - m_funcy_data = new TF1("funcy_data","[0]/1000.0+[1]*x",0.0,1.0); - m_funcy_data->SetParameter(0,m_ypar1_data); - m_funcy_data->SetParameter(1,m_ypar2_data); - - m_funcy_mc = new TF1("funcy_mc","[0]/1000.0+[1]*x",0.0,1.0); - m_funcy_mc->SetParameter(0,m_ypar1_mc); - m_funcy_mc->SetParameter(1,m_ypar2_mc); - - m_rnd=new TRandom3(); - m_rnd->SetSeed(m_seed); - if(m_paramsx_data.size()!= m_paramsy_data.size() || m_paramsx_mc.size()!= m_paramsy_mc.size() || - m_paramsx_mc.size()!= m_paramsx_data.size() || m_paramsy_mc.size()!= m_paramsy_data.size() || - m_paramsx_data.size()!= m_paramsy_mc.size() || m_paramsx_mc.size()!= m_paramsy_data.size() ) - return StatusCode::FAILURE; - for(unsigned int i = 0; i< m_paramsx_data.size(); i++){ - m_funcsx_mc.push_back(new TF1(Form("funcx%d_mc",i),"[0]/1000.0+[1]*x",0.0,1.0)); - m_funcsx_mc[i]->SetParameter(0,m_paramsx_mc[i].first); - m_funcsx_mc[i]->SetParameter(1,m_paramsx_mc[i].second); - - m_funcsy_mc.push_back( new TF1(Form("funcy%d_mc",i),"[0]/1000.0+[1]*x",0.0,1.0)); - m_funcsy_mc[i]->SetParameter(0,m_paramsy_mc[i].first); - m_funcsy_mc[i]->SetParameter(1,m_paramsy_mc[i].second); - - m_funcsx_data.push_back( new TF1(Form("funcx%d_data",i),"[0]/1000.0+[1]*x",0.0,1.0)); - m_funcsx_data[i]->SetParameter(0,m_paramsx_data[i].first); - m_funcsx_data[i]->SetParameter(1,m_paramsx_data[i].second); - - - m_funcsy_data.push_back( new TF1(Form("funcy%d_data",i),"[0]/1000.0+[1]*x",0.0,1.0)); - m_funcsy_data[i]->SetParameter(0,m_paramsy_data[i].first); - m_funcsy_data[i]->SetParameter(1,m_paramsy_data[i].second); - - } - - return sc; -} - -double TrackSmeared::getSigmax( LHCb::State* state) -{ - double pt = state->pt(); - double inversept = pt > 0 ? 1.0/pt : 0.0; - double sigma2 = m_funcx_data->Eval(inversept)*m_funcx_data->Eval(inversept)- - m_funcx_mc->Eval(inversept)*m_funcx_mc->Eval(inversept); - return sigma2>0 ? m_scale*std::sqrt(sigma2) : 0.0; - -} - -double TrackSmeared::getSigmay( LHCb::State* state) -{ - double pt = state->pt(); - double inversept = pt > 0 ? 1.0/pt : 0.0; - double sigma2 = m_funcy_data->Eval(inversept)*m_funcy_data->Eval(inversept)- - m_funcy_mc->Eval(inversept)*m_funcy_mc->Eval(inversept); - return sigma2>0 ? m_scale*std::sqrt(sigma2) : 0.0; -} - -double TrackSmeared::getSigma( LHCb::State* state, - const std::vector<TF1*>& funcs_data, - const std::vector<TF1*>& funcs_mc) -{ - double pt = state->pt(); - double phi = state->momentum().phi() >= 0.0 ? state->momentum().phi() : state->momentum().phi() + 2.0*M_PI; - double inversept = pt > 0 ? 1.0/pt : 0.0; - int phiBin = (int)(phi/(2*M_PI)*funcs_data.size()); - //debug() << "phi " << state->momentum().phi() << '\t' << phi << " bin " << phiBin << " vector sizes" << funcs_data.size() << '\t' << funcs_mc.size() << endmsg; - //debug() << phi - 2.0*M_PI << endmsg; - TF1* func_data = funcs_data[phiBin]; - TF1* func_mc = funcs_mc[phiBin]; - double sigma2 = func_data->Eval(inversept)*func_data->Eval(inversept)- - func_mc->Eval(inversept)*func_mc->Eval(inversept); - return sigma2>0 ? m_scale*std::sqrt(sigma2) : 0.0; -} - - -void TrackSmeared::smearStates( const std::vector< LHCb::State * > & states ) -{ - - //double pt = states[0]->pt(); - //double inversept = pt > 0 ? 1.0/pt : 0.0; - const double tx = states[0]->tx(); - const double alpha = atan(tx); - const double ty = states[0]->ty(); - const double gamma = atan(ty); - //const double z = states[0]->z(); - //const double phi = states[0]->momentum().phi(); - double xrand = 0.0; - double yrand = 0.0; - //double zrand = 0.0; - debug()<<"smear: "<<m_smear<<endmsg; - double sigmax = m_usePhi ? getSigma(states[0],m_funcsx_data,m_funcsx_mc) : getSigmax(states[0]); - double sigmay = m_usePhi ? getSigma(states[0],m_funcsy_data,m_funcsy_mc) : getSigmay(states[0]); - - if (m_smear) - { - xrand = m_rnd->Gaus(0.0,sigmax)/(cos(alpha)*cos(alpha)); - yrand = m_rnd->Gaus(0.0,sigmay)/(cos(gamma)*cos(gamma)); - debug()<<"rnd: "<<xrand<<" "<<yrand<<endmsg; - } - BOOST_FOREACH(LHCb::State* st ,states){ - const double x = st->x(); - const double y = st->y(); - st->setX(x+xrand); - st->setY(y+yrand); - } - - -} - - - -StatusCode TrackSmeared::smearProto(){ - if (!exist<LHCb::ProtoParticle::Container>(LHCb::ProtoParticleLocation::Charged)) return StatusCode::FAILURE; - LHCb::ProtoParticles* pp = get< LHCb::ProtoParticles >(LHCb::ProtoParticleLocation::Charged) ; - LHCb::ProtoParticles* newProtos = new LHCb::ProtoParticles(); - LHCb::Tracks* newTracks = new LHCb::Tracks(); - put(newTracks, "Rec/Track/"+m_outputLocation); - put(newProtos, "Rec/ProtoP/"+m_outputLocation); - - BOOST_FOREACH(const LHCb::ProtoParticle* proto, *pp){ - // copy protoparticle - LHCb::ProtoParticle* smearedProto = proto->clone(); - debug()<<"######"<<endmsg; - debug()<<"proto before p:"<<proto->track()->states()[0]->p()<<".x: "<< proto->track()->states()[0]->x()<<endmsg; - // copy track associated to protoparicle - LHCb::Track* smearedtrack = new LHCb::Track(); - smearedtrack->copy(*(smearedProto->track())); - const std::vector< LHCb::State * > & states = smearedtrack->states(); - - debug()<<"smeared track before p:"<<smearedtrack->states()[0]->p()<<".x: "<< smearedtrack->states()[0]->x()<<endmsg; - smearStates(states); - // save smeared track and set to protoparticle - debug()<<"smeared track after p:"<<smearedtrack->states()[0]->p()<<".x: "<< smearedtrack->states()[0]->x()<<endmsg; - smearedProto->setTrack(smearedtrack); - debug()<<"proto after p:"<<smearedProto->track()->states()[0]->p()<<".x: "<< smearedProto->track()->states()[0]->x()<<endmsg; - debug()<<"######"<<endmsg; - newProtos->add(smearedProto); - newTracks->add(smearedtrack); - - } - - setFilterPassed(true); // Mandatory. Set to true if event is accepted. - return StatusCode::SUCCESS; - -} - -StatusCode TrackSmeared::smearBest(){ - if (m_trackLocation!=LHCb::TrackLocation::Default){ - debug()<<"You know what you are doing? Smearing a different container "<<endmsg; - } - - if (!exist<LHCb::Track::Range>(m_trackLocation)) return StatusCode::FAILURE; - LHCb::Track::Range tracks = get<LHCb::Track::Range>(m_trackLocation) ; - // loop over Best Track Container - BOOST_FOREACH(const LHCb::Track* tr ,tracks){ - if (!tr->type() || (LHCb::Track::Long != tr->type() && LHCb::Track::Upstream!= tr->type()) ){ - debug()<< "No Long or Upstream track! Not smeared!" <<endmsg; - } else { - debug()<<"Ok smear the track!"<<endmsg; - // smear state - const std::vector< LHCb::State * > & states = tr->states(); - if (states.size()>0){ - debug()<<"old x position "<<states[0]->x()<<endmsg; - debug()<<"old y position "<<states[0]->y()<<endmsg; - debug()<<"old z position "<<states[0]->z()<<endmsg; - smearStates(states); - debug()<<"new x position "<<states[0]->x()<<endmsg; - debug()<<"new y position "<<states[0]->y()<<endmsg; - debug()<<"new z position "<<states[0]->z()<<endmsg; - } - } - } - setFilterPassed(true); // Mandatory. Set to true if event is accepted. - return StatusCode::SUCCESS; -} - -StatusCode TrackSmeared::smearCopied() -{ - - if (!exist<LHCb::Track::Range>(m_trackLocation)) return StatusCode::FAILURE; - if (!exist<LHCb::RichPIDs>(LHCb::RichPIDLocation::Offline)) return StatusCode::FAILURE; - LHCb::Track::Range tracks = get<LHCb::Track::Range>(m_trackLocation) ; - LHCb::RichPIDs* richids = get<LHCb::RichPIDs>(LHCb::RichPIDLocation::Offline); - LHCb::Tracks* newTracks = new LHCb::Tracks(); - LHCb::RichPIDs* newRichIDs = new LHCb::RichPIDs(); - put(newTracks, "Rec/Track/"+m_outputLocation); - put(newRichIDs,"Rec/Rich/"+m_outputLocation); - - BOOST_FOREACH(const LHCb::Track* tr ,tracks) - { - LHCb::Track* smearedtrack = new LHCb::Track(); - smearedtrack->copy(*tr); - - // restore RICH information - LHCb::RichPID* myid = 0 ; - - BOOST_FOREACH(LHCb::RichPID* pid , *richids) { - if (pid->track() == tr) { - myid = pid; - break; - } - } - LHCb::RichPID* neueid = myid; - if (neueid!=0){ - neueid->setTrack(smearedtrack); - newRichIDs->add(neueid); - } - - if (!tr->type() || LHCb::Track::Long != tr->type() ){ - debug()<< "No Long track! Not smeared!" <<endmsg; - newTracks->add(smearedtrack); - } else { - // smear state - const std::vector< LHCb::State * > & states = smearedtrack->states(); - debug()<<"old x position "<<states[0]->x()<<endmsg; - debug()<<"old y position "<<states[0]->y()<<endmsg; - debug()<<"old z position "<<states[0]->z()<<endmsg; - - if (states.size()>0){ - smearStates(states); - } - debug()<<"new x position "<<states[0]->x()<<endmsg; - debug()<<"new y position "<<states[0]->y()<<endmsg; - debug()<<"new z position "<<states[0]->z()<<endmsg; - newTracks->add(smearedtrack); - } - } - - debug() << "adding Container to TES " <<"Rec/Track/"<<m_outputLocation<< endmsg; - - - setFilterPassed(true); // Mandatory. Set to true if event is accepted. - return StatusCode::SUCCESS; -} - - - -//============================================================================= -// Main execution -//============================================================================= -StatusCode TrackSmeared::execute() -{ - - debug()<<"==> Execute! "<<endmsg; - if ((m_smearBest && m_smearCopied) || (m_smearBest && m_smearProto) || (m_smearProto && m_smearCopied)){ - always()<<"OK, if you want to do this, you have to change the following lines and maybe some output containers"<<endmsg; - return StatusCode::FAILURE; - } - if (m_smearBest){ - return smearBest(); - }else if (m_smearProto){ - return smearProto(); - }else if (m_smearCopied){ - return smearCopied(); - } - always()<<"YOU HAVE TO DECIDE!!!"<<endmsg; - return StatusCode::FAILURE; -} - -//============================================================================= -// Finalize -//============================================================================= -StatusCode TrackSmeared::finalize() { - - if ( msgLevel(MSG::DEBUG) ) debug() << "==> Finalize" << endmsg; - - delete m_funcx_data; - delete m_funcx_mc; - delete m_funcy_data; - delete m_funcy_mc; - delete m_rnd; - - - for(unsigned int i = 0; i< m_paramsx_data.size(); i++){ - - delete m_funcsx_mc[i]; - delete m_funcsy_mc[i]; - delete m_funcsx_data[i]; - delete m_funcsy_data[i]; - } - - return DaVinciAlgorithm::finalize(); -} - -//============================================================================= diff --git a/Phys/TrackSmearing/src/TrackSmeared.h b/Phys/TrackSmearing/src/TrackSmeared.h deleted file mode 100644 index 9d2cbd6dda903dc3988e322cf6f5f7bc2b8409ee..0000000000000000000000000000000000000000 --- a/Phys/TrackSmearing/src/TrackSmeared.h +++ /dev/null @@ -1,92 +0,0 @@ -// $Id: $ -#ifndef TRACKSMEARED_H -#define TRACKSMEARED_H 1 - -// from DaVinci -#include "Kernel/DaVinciAlgorithm.h" - -// ROOT -#include <TF1.h> -#include <TRandom3.h> - -/** @class TrackSmeared TrackSmeared.h - * - * - * @author Sascha Stahl - * @date 2010-08-27 - */ -class TrackSmeared : public DaVinciAlgorithm -{ - -public: - - /// Standard constructor - TrackSmeared( const std::string& name, ISvcLocator* pSvcLocator ); - - virtual ~TrackSmeared( ); ///< Destructor - - StatusCode initialize() override; ///< Algorithm initialization - StatusCode execute () override; ///< Algorithm execution - StatusCode finalize () override; ///< Algorithm finalization - -private: - - void smearStates( const std::vector< LHCb::State * > & states ); - - double getSigma( LHCb::State* state, - const std::vector<TF1*>& funcs_data, - const std::vector<TF1*>& funcs_mc); - double getSigmax(LHCb::State* state); - double getSigmay(LHCb::State* state); - - StatusCode smearProto(); - StatusCode smearBest(); - StatusCode smearCopied(); - -private: - - typedef std::pair<double,double> DPair; - typedef std::vector<DPair> DPairVector; - -private: - - std::string m_trackLocation; - std::string m_outputLocation; - std::string m_protoLocation; - std::string m_settings; - - TF1* m_funcx_data; - TF1* m_funcx_mc; - TF1* m_funcy_data; - TF1* m_funcy_mc; - std::vector<TF1*> m_funcsx_mc; - std::vector<TF1*> m_funcsy_mc; - std::vector<TF1*> m_funcsx_data; - std::vector<TF1*> m_funcsy_data; - DPairVector m_paramsx_data; - DPairVector m_paramsx_mc; - DPairVector m_paramsy_data; - DPairVector m_paramsy_mc; - double m_xpar1_mc; - double m_xpar2_mc; - double m_xpar1_data; - double m_xpar2_data; - double m_ypar1_mc; - double m_ypar2_mc; - double m_ypar1_data; - double m_ypar2_data; - double m_seed; - double m_scale; - bool m_smear; - bool m_plots; - bool m_usePhi; - bool m_smearBest; - bool m_smearProto; - bool m_smearCopied; - TRandom3* m_rnd; - - - - -}; -#endif // TRACKSMEARED_H