Skip to content
Snippets Groups Projects
Commit 18de3c3c authored by Marco Clemencic's avatar Marco Clemencic
Browse files

updated to match v19r1 tag in svn

parent 236ac228
No related branches found
No related tags found
No related merge requests found
Showing
with 130 additions and 151 deletions
......@@ -5,7 +5,7 @@ Purpose: LHCb reconstruction packages.
This project groups together all the reconstruction packages needed
by one or more LHCb applications.
 
</PRE><H1><A NAME=v19r1>2016-03-18 RecSys v19r1</A></H1><PRE>
</PRE><H1><A NAME=v19r1>2016-03-23 RecSys v19r1</A></H1><PRE>
This version uses Gaudi v27r1, LHCb v40r1 and Lbcom v18r1 (and ROOT 6.06.02)
 
- Packages modified: Calo/CaloPIDs v5r22, Calo/CaloReco v5r28,
......@@ -195,6 +195,8 @@ This version uses Gaudi v27r1, LHCb v40r1 and Lbcom v18r1 (and ROOT 6.06.02)
CK rings in MassHypothesisRingCreator.
 
- In Rich/RichRecTrackTools v1r42
. Only set the average photon energy in SegmentCreator if the value determined
is valid (greater than 0).
. Speed up the ExpectedTrackSignal::hasRichInfo by limiting it on only
checking the lightest hypothesis (largest CK ring).
. Adapt to removal of typedefs in RichDet.
......@@ -254,6 +256,8 @@ This version uses Gaudi v27r1, LHCb v40r1 and Lbcom v18r1 (and ROOT 6.06.02)
. Add a missing override qualifier
 
- In Tf/TrackSys v9r13
. RecoTrackingRun2: Activate SimplifiedGeometry in TrackStateProvider by default.
Can be overwritten by ExpertOptions. See https://its.cern.ch/jira/browse/LHCBPS-1499
. Remove calculation of TrackLikelihood from 2016 on per default
 
- In Tr/TrackExtrapolators v2r41
......@@ -275,6 +279,7 @@ This version uses Gaudi v27r1, LHCb v40r1 and Lbcom v18r1 (and ROOT 6.06.02)
. Follow const-ification of Tr/TrackInterfaces
 
- In Tr/TrackMonitors v2r13
. Change histogram range in TrackVertexMonitor and TrackPV2HalfMonitor
. Code style fix for STEfficiency.cpp (coverity fix)
. Fixed a bug in STEfficiency.cpp for TT sectors (Efficiency was filled several
times for some sectors)
......
......@@ -25,8 +25,8 @@ importOptions("$L0TCK/L0DUConfig.opts")
# For 2015 data
importOptions("$APPCONFIGOPTS/Brunel/DataType-2015.py")
LHCbApp().DDDBtag = "dddb-20150724"
LHCbApp().CondDBtag = "cond-20150828"
LHCbApp().DDDBtag = "dddb-20150526"
LHCbApp().CondDBtag = "cond-20150625"
# Aerogel Sub Tiles
#CondDB().LocalTags["LHCBCOND"] = ["rich1-20110624"]
......
......@@ -46,9 +46,9 @@ def initialise():
#LHCbApp().DDDBtag = "head-20110303"
#LHCbApp().CondDBtag = "head-20110524"
#DDDBConf(DataType = "2010")
#LHCbApp().DDDBtag = "head-20110721"
#LHCbApp().CondDBtag = "cond-20140328"
DDDBConf(DataType = "2010")
LHCbApp().DDDBtag = "head-20110721"
LHCbApp().CondDBtag = "cond-20140328"
#DDDBConf(DataType = "2011")
#LHCbApp().DDDBtag = "head-20110722"
......@@ -58,10 +58,6 @@ def initialise():
#LHCbApp().DDDBtag = "dddb-20120831"
#LHCbApp().CondDBtag = "cond-20121025"
DDDBConf(DataType = "2015")
LHCbApp().DDDBtag = "dddb-20150526"
LHCbApp().CondDBtag = "cond-20150625"
# Set message level to info and above only
msgSvc().setOutputLevel(3)
......@@ -138,7 +134,7 @@ def loadDict(filename):
def fillDB(calibration,db,runsTimes,rad):
# Create DB paths for the conditions
path = "/Conditions/Online/"+rad+"/Environment/Gas.xml"
path = "/Conditions/"+rad+"/Environment/Gas.xml"
db.createNode(path)
# Add a null entry covering all periods
......@@ -164,10 +160,9 @@ def fillDB(calibration,db,runsTimes,rad):
dStartTime = runsTimes["RunTimes"][run]["Start"]
#dStopTime = runsTimes["RunTimes"][run]["Stop"]
#dStopTime = runsTimes["GlobalStopTime"]
#dStopTime = datetime.datetime( 2010, 12, 31, 23, 59, 59 )
dStopTime = datetime.datetime( 2010, 12, 31, 23, 59, 59 )
#dStopTime = datetime.datetime( 2011, 12, 31, 23, 59, 59 )
#dStopTime = datetime.datetime( 2100, 12, 31, 23, 59, 59 )
dStopTime = datetime.datetime( 2015, 12, 31, 23, 59, 59 )
startTime = correctStartTime( run, getUNIXTime(dStartTime) )
stopTime = getUNIXTime( dStopTime )
......@@ -203,7 +198,7 @@ def getRunTimes(calibrations):
if run in runTimeCache.keys():
res = runTimeCache[run]
else:
from LHCbDIRAC.BookkeepingSystem.Client.BookkeepingClient import BookkeepingClient
from LHCbDIRAC.NewBookkeepingSystem.Client.BookkeepingClient import BookkeepingClient
res = BookkeepingClient().getRunInformations(int(run))
if len(res.keys()) > 0 and res.has_key('OK') :
if res['OK']:
......@@ -238,7 +233,7 @@ rootName = str(args[0])
# Open a new DB
dbFileName = "results/"+rootName+"-"+dateString()+".db"
if os.path.exists(dbFileName) : os.remove(dbFileName)
db = CondDBUI.CondDB( "sqlite_file:"+dbFileName+"/CALIBOFF",
db = CondDBUI.CondDB( "sqlite_file:"+dbFileName+"/LHCBCOND",
create_new_db=True, readOnly=False )
print "Opened DB file", dbFileName
......
......@@ -41,7 +41,7 @@ elif 2012 == year :
elif 2013 == year :
ConfigV = ['Collision13','Protonion13','Ionproton13','Ionsmog']
elif 2015 == year :
ConfigV = ['Collision15','Collision15em','Protonhelium15','Protonneon15']
ConfigV = ['Collision15','Collision15em']
else:
print 'Unknown year', year
DIRAC.exit(2)
......
......@@ -9,7 +9,6 @@ importOptions("CommonOptions.py")
#CondDB().addLayer(CondDBAccessSvc("ResetHPDAlign-13062015",ConnectionString="sqlite_file:databases/ResetHPDAlign-13062015.db/LHCBCOND",DefaultTAG="HEAD"))
#CondDB().addLayer(CondDBAccessSvc("2015-MirrorAlign-V2-It3-15062015",ConnectionString="sqlite_file:databases/2015-MirrorAlign-V2-It3-15062015.db/LHCBCOND",DefaultTAG="HEAD"))
CondDB().addLayer(CondDBAccessSvc("2015-refscale-V1",ConnectionString="sqlite_file:databases/2015-refscale-V1.db/CALIBOFF",DefaultTAG="HEAD"))
# For testing only
#CondDB().IgnoreHeartBeat = True
......@@ -18,6 +17,7 @@ CondDB().addLayer(CondDBAccessSvc("2015-refscale-V1",ConnectionString="sqlite_fi
#importOptions("/usera/jonesc/MyDataOptions/Collisions11/Raw/RUN_97487_PFNs.py")
importOptions("/usera/jonesc/MyDataOptions/Collisions15em/Raw/RUN_154873_PFNs.py")
from Configurables import Brunel
Brunel().EvtMax = 100
......
......@@ -52,7 +52,7 @@ proxy location to your normal work, to isolate it. You can do this with
You must run 'SetupProject Ganga' after this, to pick up the new setting
- Start ganga using something like
> ganga -o[Configuration]gangadir=/var/nwork/pclx/jonesc/gangadir-calibration
> ganga -o[Configuration]gangadir=/r02/lhcb/jonesc/gangadir-calibration
The file has a series of methods to submit the calibration jobs, and analyse the
results. For submission just run at the ganga prompt
......
......@@ -186,7 +186,7 @@ def submitRecoJobs(name,BrunelVer,pickledRunsList,jobType):
#dbFiles += { "2015RootFiles-RunAligned-Sobel-Smoothed1.0hours-HPDAlign-20062015" : "LHCBCOND" }
#dbFiles["2015RootFiles-RunAligned-Sobel-Smoothed1.0hours-HPDAlign-22062015"] = "LHCBCOND"
# New mirror alignment
#dbFiles["2015-MirrorAlign-50ns-V1-20072015"] = "LHCBCOND"
dbFiles["2015-MirrorAlign-50ns-V1-20072015"] = "LHCBCOND"
# Only for Calibration jobs only
if jobType == "RefInCalib" :
......@@ -195,9 +195,11 @@ def submitRecoJobs(name,BrunelVer,pickledRunsList,jobType):
# For verification jobs only, use custom DB Slice for n-1 corrections
if jobType == "RefInVerify" :
#pass
#dbFiles["2015-refscale-V1"] = "CALIBOFF"
dbFiles["2015-refscale-V2"] = "CALIBOFF"
pass
#dbFiles += ["RefInCalib-2010RePro-V1_BR-v45r1-15052014"]
#dbFiles += ["2010RePro-RootFiles-V1-RunAligned-Sobel-Smoothed1.0hours-HPDAlign-15052014"]
#dbFiles += ["2010RePro-RootFiles-V1-RunAligned-Sobel-Smoothed0.5hours-HPDOcc-16052014"]
#dbFiles += ["2010MirrorAlign-28052014"]
# Configure additional DBs
for dbFile,dbType in dbFiles.iteritems() :
......@@ -205,18 +207,13 @@ def submitRecoJobs(name,BrunelVer,pickledRunsList,jobType):
dbopts += ["CondDB().addLayer(CondDBAccessSvc(\""+dbFile+"\",ConnectionString=\"sqlite_file:"+dbFile+".db/"+dbType+"\",DefaultTAG=\"HEAD\"))\n"]
# Upload to LFNs
lfnname = "LFN:/lhcb/user/j/jonrob/DBs/"+dbFile+".db"
#if not uploadFile("databases/"+dbFile+".db",lfnname) : return False
if not uploadFile("databases/"+dbFile+".db",lfnname) : return False
# Add to LFNs sandbox
mySandBoxLFNs += [lfnname]
# Add the real file to the sandbox
#mySandBox += ["databases/"+dbFile+".db"]
# minimum run number
minRun = 0
# maximum number of jobs to submit (for debugging)
maxJobs = 99999999
# Loop over the list of pickled run data files
print "Submitting jobs for RunData", pickledRunsList
for pickedRuns in pickledRunsList :
......@@ -232,15 +229,14 @@ def submitRecoJobs(name,BrunelVer,pickledRunsList,jobType):
# Count jobs
nJob += 1
if nJob > maxJobs : return
# LFNs for this run
lfns = sorted(RunLFNs[run])
if len(lfns) > 0 :
if len(lfns)>0 :
# Construct the job name
jobname = basejobname + "_Run-"+str(run)
# is this job already submitted ?
if run < minRun or jobExists(jobname):
......@@ -328,7 +324,7 @@ def submitRecoJobs(name,BrunelVer,pickledRunsList,jobType):
print "Submitting Job", j.name, "( #", nJob, "of", len(sortedRuns), ")", time.strftime("%c")
print " -> Using", nFiles, "data file(s), max", nFilesPerJob, \
"file(s) per subjob,", nEventsPerJob, "events per job"
#for f in j.inputdata.files : print " ->", f.lfn
for f in j.inputdata.files : print " ->", f.lfn
# Submit now
#submitJob(j)
......@@ -376,7 +372,7 @@ def makeAllColumnFits(jobs,rad='Rich1Gas',polarity=''):
for n in [0,1,2,3,4,5,6,7,8]:
refractiveIndexCalib(jobs,rad,polarity,'Rich2-'+panel+'-Col'+str(n))
def refractiveIndexCalib(jobs,rads=['Rich1Gas','Rich2Gas'],polarity='',pdCol='',bckOnly=False) :
def refractiveIndexCalib(jobs,rads=['Rich1Gas','Rich2Gas'],polarity='',pdCol='') :
from ROOT import TFile, TGraphErrors, TF1, TH1, TH1F, gROOT, gStyle, TText, TLatex
from Ganga.GPI import Job
......@@ -452,16 +448,15 @@ def refractiveIndexCalib(jobs,rads=['Rich1Gas','Rich2Gas'],polarity='',pdCol='',
gStyle.SetOptFit(1011)
# Fits
fitResultRes = fitCKThetaHistogram(rootfile,run,rad,resPlot,5,bckOnly)
fitResultRaw = fitCKThetaHistogram(rootfile,run,rad,'thetaRec',-1,bckOnly)
fitResultRes = fitCKThetaHistogram(rootfile,run,rad,resPlot)
fitResultRaw = fitCKThetaHistogram(rootfile,run,rad,'thetaRec',-1)
fitResultExp = fitCKExpectedHistogram(rootfile,run,rad)
if fitResultRes['OK'] and fitResultRaw['OK'] and fitResultExp['OK'] :
scale = nScaleFromShift(fitResultRes,rad)
if scale[0] < minMaxScale[0] : minMaxScale[0] = scale[0]
if scale[0] > minMaxScale[1] : minMaxScale[1] = scale[0]
calibrations[run] = { "ScaleFactor" : scale,
"ThetaShift" : fitResultRes['Mean'] }
calibrations[run] = { "ScaleFactor" : scale, "ThetaShift" : fitResultRes['Mean'] }
ckmeans[run] = fitResultRes['Mean']
cksigmas[run] = fitResultRes['Sigma']
ckraws[run] = fitResultRaw['Mean']
......@@ -859,30 +854,15 @@ def uploadDBs(dbFiles=[]):
def addToJobTree(j,dir):
from Ganga.GPI import jobtree
base = "/RichCalibration"
fulldir = base+"/"+dir
if not jobtree.exists(base) : jobtree.mkdir(base)
fulldir = "/RichCalibration/"+dir
if not jobtree.exists(fulldir) : jobtree.mkdir(fulldir)
jobtree.cd(fulldir)
jobtree.add(j,fulldir)
def jobExists(jobname):
from Ganga.GPI import jobs
import time
#print "Checking if job", jobname, "exists", time.strftime("%c")
slice = jobs.select(name=jobname)
res = len(slice) > 0
#print "... Done", res
return res
def findJobsForRuns(runs=[]):
from Ganga.GPI import jobs
seljobs = []
for j in jobs :
for run in runs :
if 'Run-'+str(run) in j.name :
seljobs += [j]
return seljobs
return len(slice) > 0
def getInfoFromJob(j,info='Run'):
run = 0
......@@ -1034,15 +1014,17 @@ def getControlJobList(name="",BrunelVer="v47r9",statuscodes=['completed'],
def nScaleFromShift(shift,rad='Rich1Gas'):
# Shift test V1
#slope = 38.1
#if rad == 'Rich2Gas': slope = 65.25
# As of RICH S/W meeting 3/9/2010
#slope = 38.2388535346
#if rad == 'Rich2Gas': slope = 68.2
# Shift test V2
slope = 38.058
if rad == 'Rich2Gas': slope = 65.315
# 2011-NewTkRichAlign-V1
#slope = 38.0
#if rad == 'Rich2Gas': slope = 68.5
#print rad, "using scale slope", slope
# Final tuning for 2011 repro
slope = 38.1
if rad == 'Rich2Gas': slope = 65.25
# Compute the scale factor and its error
result = 1.0 + (shift['Mean'][0]*slope)
......@@ -1199,10 +1181,10 @@ def fitCKForFile(filename,plot='ckResAll',outfile="CKFit.pdf"):
file.Close()
def checkCKThetaStats(hist,minEntries=100000):
def checkCKThetaStats(hist,minEntries=5000):
return hist.GetEntries() >= minEntries
def fitCKThetaHistogram(rootfile,run,rad='Rich1Gas',plot='ckResAll',nPolFull=4,bckOnly=False):
def fitCKThetaHistogram(rootfile,run,rad='Rich1Gas',plot='ckResAll',nPolFull=4):
from ROOT import TH1F, TF1, TH1, TText, gROOT
......@@ -1241,9 +1223,6 @@ def fitCKThetaHistogram(rootfile,run,rad='Rich1Gas',plot='ckResAll',nPolFull=4,b
xPeak = hist.GetBinCenter(hist.GetMaximumBin())
#print "Mooo", xPeak
# Maximum y Value
yMax = hist.GetBinContent(hist.GetMaximumBin())
# Pre Fitting range
delta = 0.0025
if rad == 'Rich2Gas' : delta = 0.00105
......@@ -1262,13 +1241,18 @@ def fitCKThetaHistogram(rootfile,run,rad='Rich1Gas',plot='ckResAll',nPolFull=4,b
preFitF.SetParameter(2,0.0007)
# Do the pre fit with just a Gaussian
if not bckOnly : hist.Fit(preFitF,"QRS0")
hist.Fit(preFitF,"QRS0")
#print "Baaa", preFitF.GetParameter(1)
# Full Fitting range
if rad == 'Rich1Gas' :
## fitMax = xPeak+0.0069
## fitMin = xPeak-0.0088
fitMax = 0.0075
fitMin = -0.0075
else:
## fitMax = xPeak+0.0036
## fitMin = xPeak-0.0044
fitMax = 0.0035
fitMin = -0.0039
......@@ -1279,42 +1263,26 @@ def fitCKThetaHistogram(rootfile,run,rad='Rich1Gas',plot='ckResAll',nPolFull=4,b
fitOK = True
if nPolFull>0 :
for nPol in xrange(1,nPolFull+1):
if not bckOnly :
fFuncType = "gaus(0)+pol"+str(nPol)+"(3)"
fFitF = TF1(rad+"FitF"+str(nPol),fFuncType,fitMin,fitMax)
fFitF.SetLineColor(fullFitColor)
fFitF.SetParName(0,"Gaus Constant")
fFitF.SetParName(1,"Gaus Mean")
fFitF.SetParName(2,"Gaus Sigma")
nParamsToSet = 3
if nPol > 1 : nParamsToSet = 3+nPol
for p in xrange(0,nParamsToSet) :
fFitF.SetParameter(p,lastFitF.GetParameter(p))
else:
fFuncType = "pol"+str(nPol)+""
fFitF = TF1(rad+"FitF"+str(nPol),fFuncType,fitMin,fitMax)
fFitF.SetLineColor(fullFitColor)
nParamsToSet = 0
if nPol > 1 : nParamsToSet = nPol
for p in xrange(0,nParamsToSet) :
fFitF.SetParameter(p,lastFitF.GetParameter(p))
fFuncType = "gaus(0)+pol"+str(nPol)+"(3)"
fFitF = TF1(rad+"FitF"+str(nPol),fFuncType,fitMin,fitMax)
fFitF.SetLineColor(fullFitColor)
fFitF.SetParName(0,"Gaus Constant")
fFitF.SetParName(1,"Gaus Mean")
fFitF.SetParName(2,"Gaus Sigma")
nParamsToSet = 3
if nPol > 1 : nParamsToSet = 3+nPol
for p in xrange(0,nParamsToSet) :
fFitF.SetParameter(p,lastFitF.GetParameter(p))
hist.Fit(fFitF,"MQRSE0")
#hist.Fit(fFitF,"MRSE0")
lastFitF = fFitF
# Fit OK ?
maxErrorForOK = 1e-3
maxResForOK = 3e-3
# gMinuit = gROOT.GetGlobal( "gMinuit", 1 )
# print gMinuit.GetStatus()
if not bckOnly :
fitOK = ( fFitF.GetParError(1) < maxErrorForOK and
fFitF.GetParError(2) < maxErrorForOK and
fFitF.GetParameter(2) < maxResForOK )
else :
fitOK = True # To Do ...
fitOK = ( fFitF.GetParError(1) < maxErrorForOK and
fFitF.GetParError(2) < maxErrorForOK and
fFitF.GetParameter(2) < maxResForOK )
if fitOK :
bestFitF = fFitF
bestNPol = nPol
......@@ -1328,7 +1296,6 @@ def fitCKThetaHistogram(rootfile,run,rad='Rich1Gas',plot='ckResAll',nPolFull=4,b
if nPol > 1 : break
# Draw the histogram
if bckOnly : hist.SetMaximum(1.15*yMax)
hist.Draw()
# Draw the full fit
......@@ -1345,11 +1312,8 @@ def fitCKThetaHistogram(rootfile,run,rad='Rich1Gas',plot='ckResAll',nPolFull=4,b
# Add Run number to plot
if bestNPol > 0 :
if not bckOnly :
addRunToPlot(run,[ ("Signal+Bkg Fit",fullFitColor),
("Bkg pol"+str(bestNPol),bkgColor) ] )
else:
addRunToPlot(run,[ ("Bkg Fit",fullFitColor) ] )
addRunToPlot(run,[ ("Signal+Bkg Fit",fullFitColor),
("Bkg pol"+str(bestNPol),bkgColor) ] )
else:
addRunToPlot(run)
......@@ -1544,8 +1508,7 @@ def filesPerJob(nFiles):
if nFiles == 12 : return 4
if nFiles == 18 : return 6
if nFiles < 20 : return 5
if nFiles < 50 : return 8
if nFiles < 100 : return 10
if nFiles < 100 : return 6
return 10
def removeCalibrationDataSet(name,BrunelVer="v47r9"):
......
No preview for this file type
......@@ -81,7 +81,7 @@ StatusCode PIDMerge::execute()
{
// Insert new cloned PID object with the same key as original
// As this is based on the underlying track key, which should be unique
// across all PID containers, all keys should be unique...
// accross all PID containers, all keys should be unique...
mergedPIDs->insert( new LHCb::RichPID(*pid), pid->key() );
}
}
......
......@@ -146,7 +146,7 @@ PixelCreatorFromSignalRawBuffer::trackedMCPs() const
return m_trackedMCPs;
}
void PixelCreatorFromSignalRawBuffer::InitNewEvent()
void PixelCreatorFromSignalRawBuffer::InitNewEvent() const
{
// Initialise data for new event
PixelCreatorBase::InitNewEvent();
......
......@@ -59,21 +59,21 @@ namespace Rich
const IInterface* parent );
/// Destructor
virtual ~PixelCreatorFromSignalRawBuffer(){}
virtual ~PixelCreatorFromSignalRawBuffer() { }
// Initialize method
StatusCode initialize();
StatusCode initialize() override;
protected: // methods
/// Build a new RichRecPixel from an Rich::HPDPixelCluster
virtual LHCb::RichRecPixel * buildPixel ( const Rich::HPDPixelCluster& cluster ) const;
virtual LHCb::RichRecPixel * buildPixel( const Rich::HPDPixelCluster& cluster ) const override;
/// Build a new RichRecPixel from a single LHCb::RichSmartID
virtual LHCb::RichRecPixel * buildPixel( const LHCb::RichSmartID & id ) const;
virtual LHCb::RichRecPixel * buildPixel( const LHCb::RichSmartID & id ) const override;
/// Initialise for a new event. Re-implmented from base class version.
virtual void InitNewEvent();
virtual void InitNewEvent() const override;
private: // methods
......
......@@ -4,7 +4,11 @@
! Purpose : Utility tracks tools for RICH reconstruction algorithms
!-----------------------------------------------------------------------------
!========================= RichRecTrackTools v1r42 2016-03-18 ========================
!========================= RichRecTrackTools v1r42 2016-03-23 ========================
! 2016-03-23 - Chris Jones
- Only set the average photon energy in SegmentCreator if the value determined
is valid (greater than 0).
! 2016-03-18 - Chris Jones
- Make FinishEvent and InitEvent methods const.
......
......@@ -117,8 +117,9 @@ SegmentCreator::newSegment( LHCb::RichTrackSegment* segment,
(LHCb::RichRecSegment::FloatType)(m_detParams->minPhotonEnergy(segment->radiator())),
(LHCb::RichRecSegment::FloatType)(m_detParams->maxPhotonEnergy(segment->radiator()))
);
// Set the average photon energy
segment->setAvPhotonEnergy( m_signal->avgSignalPhotEnergy(seg) );
// Set the average photon energy (if meaningful)
const auto avPhotEn = m_signal->avgSignalPhotEnergy(seg);
if ( avPhotEn > 0 ) { segment->setAvPhotonEnergy(avPhotEn); }
}
return seg;
}
......
......@@ -147,7 +147,8 @@ namespace Rich
<< " RichRecSegments : Aerogel="
<< m_segCount[Rich::Aerogel]-m_segCountLast[Rich::Aerogel]
<< " Rich1Gas=" << m_segCount[Rich::Rich1Gas]-m_segCountLast[Rich::Rich1Gas]
<< " Rich2Gas=" << m_segCount[Rich::Rich2Gas]-m_segCountLast[Rich::Rich2Gas] << endmsg;
<< " Rich2Gas=" << m_segCount[Rich::Rich2Gas]-m_segCountLast[Rich::Rich2Gas]
<< endmsg;
}
}
}
......
......@@ -4,7 +4,11 @@
! Purpose : Defines the global Track set of packages, for tracking.
!-----------------------------------------------------------------------------
!========================= TrackSys v9r13 2016-03-17 =========================
!========================= TrackSys v9r13 2016-03-24 =========================
! 2016-03-23 - Sascha Stahl
- RecoTrackingRun2: Activate SimplifiedGeometry in TrackStateProvider by default.
Can be overwritten by ExpertOptions. See https://its.cern.ch/jira/browse/LHCBPS-1499
! 2016-03-03 - Michel De Cian
- Remove calculation of TrackLikelihood from 2016 on per default (in Configuration.py).
......@@ -1109,4 +1113,4 @@ APE=0.0 on MC
- modify option files to work for Tf framework
! 2007-10-09 - Stephanie Hansmann-Menzemer
- import Tf/TrackSys from Tr/TrackSys, for former release notes see Tr/TrackSys
- import Tf/TrackSys from Tr/TrackSys, for former release notes see Tr/TrackSys
\ No newline at end of file
......@@ -52,7 +52,6 @@ def DecodeTracking(trackAlgs, ExcludedLayers = []):
d.Properties["TimeWindow"] = ( -999.0*ns, 999.0*ns )
#ensure the public tool is configured and marked as used
d.setup()
def RecoTrackingHLT1(exclude=[], simplifiedGeometryFit = True, liteClustersFit = True):
'''Function that defines the pattern recognition algorithms for the HLT1 sequence of the Run 2 offline tracking'''
......@@ -82,38 +81,40 @@ def RecoTrackingHLT1(exclude=[], simplifiedGeometryFit = True, liteClustersFit =
from STTools import STOfflineConf
STOfflineConf.DefaultConf().configureTools()
## Make sure the default extrapolator and interpolator use simplified material
from Configurables import TrackMasterExtrapolator, TrackInterpolator, SimplifiedMaterialLocator, DetailedMaterialLocator
if TrackSys().simplifiedGeometry() and ('SimpleGeom' not in exclude):
from Configurables import TrackMasterExtrapolator, TrackInterpolator
TrackMasterExtrapolator().MaterialLocator = 'SimplifiedMaterialLocator'
TrackInterpolator().addTool( TrackMasterExtrapolator( MaterialLocator = 'SimplifiedMaterialLocator' ), name='Extrapolator')
### This configures public tools to use the new multiple scattering description without the log term
from Configurables import TrackMasterExtrapolator, DetailedMaterialLocator, StateThickMSCorrectionTool
from Configurables import StateThickMSCorrectionTool
me = TrackMasterExtrapolator()
me.addTool(DetailedMaterialLocator(), name="MaterialLocator")
me.MaterialLocator.addTool( StateThickMSCorrectionTool, name= "StateMSCorrectionTool")
me.MaterialLocator.StateMSCorrectionTool.UseRossiAndGreisen = True
from Configurables import TrackInterpolator
ti = TrackInterpolator()
ti.addTool( me )
from Configurables import TrackStateProvider
tsp = TrackStateProvider()
tsp.addTool( TrackInterpolator, name = "TrackInterpolator" )
tsp.TrackInterpolator.addTool( TrackMasterExtrapolator, name='TrackMasterExtrapolator')
tsp.TrackInterpolator.TrackMasterExtrapolator.addTool(DetailedMaterialLocator, name = "MaterialLocator" )
tsp.TrackInterpolator.TrackMasterExtrapolator.MaterialLocator.addTool( StateThickMSCorrectionTool, name= "StateMSCorrectionTool")
tsp.TrackInterpolator.TrackMasterExtrapolator.MaterialLocator.StateMSCorrectionTool.UseRossiAndGreisen = True
tsp.addTool(TrackInterpolator, name = "Interpolator" )
tsp.addTool(TrackMasterExtrapolator,name="Extrapolator")
tsp.Interpolator.addTool( TrackMasterExtrapolator, name='Extrapolator')
if simplifiedGeometryFit or ( TrackSys().simplifiedGeometry() and ('SimpleGeom' not in exclude)):
tsp.Extrapolator.addTool(SimplifiedMaterialLocator, name="MaterialLocator")
tsp.Interpolator.Extrapolator.addTool(SimplifiedMaterialLocator, name = "MaterialLocator" )
else:
tsp.Extrapolator.addTool(DetailedMaterialLocator, name="MaterialLocator")
tsp.Interpolator.Extrapolator.addTool(DetailedMaterialLocator, name = "MaterialLocator" )
tsp.Extrapolator.MaterialLocator.addTool( StateThickMSCorrectionTool, name= "StateMSCorrectionTool" )
tsp.Extrapolator.MaterialLocator.StateMSCorrectionTool.UseRossiAndGreisen = True
tsp.Interpolator.Extrapolator.MaterialLocator.addTool( StateThickMSCorrectionTool, name= "StateMSCorrectionTool")
tsp.Interpolator.Extrapolator.MaterialLocator.StateMSCorrectionTool.UseRossiAndGreisen = True
###
## Velo tracking
## Why is Velo not in the tracking sequence?
if "FastVelo" in trackAlgs :
......
......@@ -4,7 +4,10 @@
! Purpose : Package for track data quality monitoring algorithms
!-----------------------------------------------------------------------------
!========================= TrackMonitors v2r13 2016-03-17 =========================
!========================= TrackMonitors v2r13 2016-03-18 =========================
! 2016-03-18 - Silvia Borghi
- Change histogram range in TrackVertexMonitor and TrackPV2HalfMonitor
! 2016-07-03 - Komarov Ilya
- Code style fix for STEfficiency.cpp
......
......@@ -61,11 +61,11 @@ TrackPV2HalfAlignMonitor::TrackPV2HalfAlignMonitor( const std::string& name,
{
declareProperty( "TrackContainer", m_trackContainerName = LHCb::TrackLocation::Default );
declareProperty( "MinNumTrPerPV", m_PV_trackmin = 5 ) ;
declareProperty( "limPx",m_limpvx=1.*Gaudi::Units::mm ) ;
declareProperty( "limPx",m_limpvx=2.*Gaudi::Units::mm ) ;
declareProperty( "limPy",m_limpvy=1.*Gaudi::Units::mm ) ;
declareProperty( "limPz", m_limpvz=150.*Gaudi::Units::mm ) ;
declareProperty( "limDPx",m_limdpvx=0.5*Gaudi::Units::mm ) ;
declareProperty( "limDPy",m_limdpvy=0.5*Gaudi::Units::mm ) ;
declareProperty( "limDPx",m_limdpvx=0.2*Gaudi::Units::mm ) ;
declareProperty( "limDPy",m_limdpvy=0.2*Gaudi::Units::mm ) ;
declareProperty( "limDPz",m_limdpvz=1.*Gaudi::Units::mm ) ;
declareProperty( "limChi2",m_limchi2=10.);
declareProperty( "MinZPV", m_zpvmin = -20*Gaudi::Units::cm ) ;
......
......@@ -37,7 +37,8 @@ private:
double m_ipmax ;
double m_ipmaxprof ;
double m_dzmax ;
double m_rpvmax ;
double m_xpvmax ;
double m_ypvmax ;
double m_zpvmin ;
double m_zpvmax ;
double m_zpvmin_wide ;
......@@ -102,7 +103,8 @@ TrackVertexMonitor::TrackVertexMonitor( const std::string& name,
declareProperty( "MaxIP", m_ipmax = 0.5*Gaudi::Units::mm ) ;
declareProperty( "MaxIPProfile", m_ipmaxprof = 0.1*Gaudi::Units::mm ) ;
declareProperty( "MaxDz", m_dzmax = 5*Gaudi::Units::mm ) ;
declareProperty( "MaxRPV", m_rpvmax = 1*Gaudi::Units::mm ) ;
declareProperty( "MaxXPV", m_xpvmax = 2*Gaudi::Units::mm ) ;
declareProperty( "MaxYPV", m_ypvmax = 1*Gaudi::Units::mm ) ;
declareProperty( "MinZPV", m_zpvmin = -20*Gaudi::Units::cm ) ;
declareProperty( "MaxZPV", m_zpvmax = 20*Gaudi::Units::cm ) ;
declareProperty( "MinZPV_Wide", m_zpvmin_wide = -150*Gaudi::Units::cm , "Wide z window for PV plot" ) ;
......@@ -276,15 +278,15 @@ StatusCode TrackVertexMonitor::execute()
// position with crap hack for vertices at exactly 0
if(std::abs(pv->position().x()) > 0.00001 && std::abs(pv->position().y()) > 0.00001 ){
//info() << "pvx " << pv->position().x() << endmsg;
plot( pv->position().x(), "PV x position",-m_rpvmax,m_rpvmax) ;
plot( pv->position().y(), "PV y position",-m_rpvmax,m_rpvmax) ;
plot( pv->position().x(), "PV x position",-m_xpvmax,m_xpvmax,200) ;
plot( pv->position().y(), "PV y position",-m_ypvmax,m_ypvmax) ;
plot( pv->position().z(), "PV z position", m_zpvmin,m_zpvmax) ;
plot( pv->position().z(), "PV z position (wide)", m_zpvmin_wide,m_zpvmax_wide) ;
}
if( std::abs( pv->position().y() ) < m_rpvmax )
if( std::abs( pv->position().y() ) < m_ypvmax )
profile1D( pv->position().z(), pv->position().y(),"PV y versus z",m_zpvmin,m_zpvmax,m_nprbins) ;
if( std::abs( pv->position().x() ) < m_rpvmax )
if( std::abs( pv->position().x() ) < m_xpvmax )
profile1D( pv->position().z(), pv->position().x(),"PV x versus z",m_zpvmin,m_zpvmax,m_nprbins) ;
// refit the primary vertex with only the long tracks
......@@ -301,22 +303,22 @@ StatusCode TrackVertexMonitor::execute()
auto leftvertex = std::unique_ptr<LHCb::RecVertex>(m_vertexer->fit( lefttracks ) );
if( leftvertex ) {
plot( leftvertex->position().x(), "PV left x",-m_rpvmax,m_rpvmax) ;
plot( leftvertex->position().y(), "PV left y",-m_rpvmax,m_rpvmax) ;
plot( leftvertex->position().x(), "PV left x",-m_xpvmax,m_xpvmax,200) ;
plot( leftvertex->position().y(), "PV left y",-m_ypvmax,m_ypvmax) ;
plot( leftvertex->position().z(), "PV left z", m_zpvmin,m_zpvmax) ;
if( leftSensor ) {
plot( -(leftSensor->globalToVeloHalfBox(leftvertex->position())).x(), "PV left-Left half x",-m_rpvmax/2,m_rpvmax/2) ;
plot( -(leftSensor->globalToVeloHalfBox(leftvertex->position())).y(), "PV left-Left half y",-m_rpvmax/2,m_rpvmax/2) ;
plot( -(leftSensor->globalToVeloHalfBox(leftvertex->position())).x(), "PV left-Left half x",-m_xpvmax/4,m_xpvmax/4) ;
plot( -(leftSensor->globalToVeloHalfBox(leftvertex->position())).y(), "PV left-Left half y",-m_ypvmax/2,m_ypvmax/2) ;
}
}
auto rightvertex = std::unique_ptr<LHCb::RecVertex>(m_vertexer->fit( righttracks ));
if( rightvertex) {
plot( rightvertex->position().x(), "PV right x",-m_rpvmax,m_rpvmax) ;
plot( rightvertex->position().y(), "PV right y",-m_rpvmax,m_rpvmax) ;
plot( rightvertex->position().x(), "PV right x",-m_xpvmax,m_xpvmax,200) ;
plot( rightvertex->position().y(), "PV right y",-m_ypvmax,m_ypvmax) ;
plot( rightvertex->position().z(), "PV right z", m_zpvmin,m_zpvmax) ;
if( rightSensor ) {
plot( -(rightSensor->globalToVeloHalfBox(rightvertex->position())).x(), "PV right-Right half x",-m_rpvmax/2,m_rpvmax/2) ;
plot( -(rightSensor->globalToVeloHalfBox(rightvertex->position())).y(), "PV right-Right half y",-m_rpvmax/2,m_rpvmax/2) ;
plot( -(rightSensor->globalToVeloHalfBox(rightvertex->position())).x(), "PV right-Right half x",-m_xpvmax/4,m_xpvmax/4) ;
plot( -(rightSensor->globalToVeloHalfBox(rightvertex->position())).y(), "PV right-Right half y",-m_ypvmax/2,m_ypvmax/2) ;
}
}
if( leftvertex && rightvertex) {
......
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