General information

The two main goals for the InDetDiMuonMonitoring package are:

  • monitoring data quality on a run-by-run basis
  • validation of new alignment.

These goals are accomplished by producing and monitoring the Z and J/Psi invariant mass and/or width in bins of the following quantities:

  • eta of Z/Psi candidate, eta of positive muon, eta of negative muon, eta of muons (2 per candidate),
  • phi of Z/Psi candidate, phi of positive muon, phi of negative muon, phi of muons (2 per candidate),
  • pT of Z/Psi candidate, pT of positive muon, pT of negative muon, pT of muons (2 per candidate),
  • sum of eta of the positive and negative muon,
  • sum of phi of the positive and negative muon,
  • difference between eta of the positive and negative muon,
  • difference between phi of the positive and negative muon,
  • difference between inverse pT of the positive and negative muon.
Note: the package can also output the distributions of each of the above variables.

Detector regions: The plots can be produced using all muons as well as using only muons that belong to one of Barrel, EndcapA or EndcapC. (For a muon to be considered in the barrel, it is required that both muons for the Z/Psi candidate belong to the barrel region. Same definition is used for EndcapA and EndcapC muons.)

Candidate selection: The Z/Psi candidates are selected by combining any pair of oppositely charged muons that fall within a specified invariant mass window. In addition, each muon satisfies the following additional requirements:

  • is combined muon with an ID track,
  • is qualified as good by the Muon Combined Working Group recommendations,
  • track isolation (TrkIsoPt40/Pt < 0.2),
  • eta < 2.5,
  • pT > 4GeV (J/Psi) or pT > 20GeV (Z)

Trigger: The plots are produced both with no trigger requirement and with express stream dedicated triggers. Currently, EF_2mu4T_Jpsimumu_IDNoTrkCut (J/Psi) and EF_2mu10 (Z)

Online plots: For the purpose of data quality monitoring, a priori selected subset of the package output is displayed in the DQWebDisplay. The current list of displayed histograms is:

  • Shifter level (in Barrel/EndcapA/EndcapC separately):
    • Z/Psi invariant mass,
    • Z/Psi invariant mass VS. eta of positive muon (barrel and endcaps shown together),
    • Z/Psi invariant mass VS. eta of negative muon (barrel and endcaps shown together),
    • Z/Psi invariant mass VS. phi of positive muon,
    • Z/Psi invariant mass VS. phi of negative muon,
    • Z/Psi invariant mass VS. difference between eta of positive and negative muon (sensitive to twist misalignment),
    • Z/Psi invariant mass VS. difference between inverse pT of positive and negative muon (sensitive to curl misalignment),
    • pT distribution of all muons (barel and endcaps together).

  • Expert level (in Barrel/EndcapA/EndcapC separately):
    • Z/Psi invariant mass VS. sum of eta of positive and negative muon (sensitive to telescope misalignment, barrel only),
    • Z/Psi invariant mass VS. phi of the Z/Psi candidate (sensitive to elliptical misalignment),
    • Z/Psi width VS. phi of the Z/Psi candidate (sensitive to elliptical misalignment),

Package structure

Histogram structures: A C++ map associates each invariant mass distribution to the detector region to which the muon tracks belong:

std::map< std::string, TH1D* > m_invmass;

Nested maps associate each 2Dinvmass histogram to a variable from the list and then to a detector region.

std::map< std::string, std::map< std::string, TH2D*> > m_2DinvmassVSx;
std::map< std::string, std::map< std::string, TH1D*> > m_invmassVSx;
std::map< std::string, std::map< std::string, TH1D*> > m_widthVSx;
std::map< std::string, std::map< std::string, TH1D*> > m_xDistr;

For a certain variable x, the invmass vs the value of x (e.g. positive muon eta) are first filled in a 2D histogram, m_2DinvmassVSx[regionName][xName]. Each bin of x is then projected, resulting in a invmass distribution for that bin. The distribution is fit. The mean and width resulting from the fit are then filled in the corresponding bin of m_invmassVSx[regionName][xName] and m_widthVSx[regionName][xName], respectively.

The jobOptions then contain four types of lists for each resonance: regions, varsVSmean, varsVSwidth and varDistr. Based on the contents of these lists the requested histograms are booked and filled. E.g., if the user wanted to produce all available histograms for the J/Psi, the lists would be as follows :

regionsJpsi = [“All”,”BB”,”EAEA”,”ECEC”]
varsVSmeanJpsi = [“eta”,”etaAll”,”etaPos”,”etaNeg”,”phi”,”phiAll”,”phiPos”,”phiNeg”,”pt”,”ptAll”,”ptPos”,”ptNeg”,”etaDiff”,”etaSumm”,”phiDiff”,”phiSumm”,”crtDiff”]
varsVSwidthJpsi = [“eta”,”etaAll”,”etaPos”,”etaNeg”,”phi”,”phiAll”,”phiPos”,”phiNeg”,”pt”,”ptAll”,”ptPos”,”ptNeg”,”etaDiff”,”etaSumm”,”phiDiff”,”phiSumm”,”crtDiff”]
varDistrJpsi = [“eta”,”etaAll”,”etaPos”,”etaNeg”,”phi”,”phiAll”,”phiPos”,”phiNeg”,”pt”,”ptAll”,”ptPos”,”ptNeg”,”etaDiff”,”etaSumm”,”phiDiff”,”phiSumm”,”crtDiff”]
If either or both the 1D invmass and width histograms are requested the corresponding 2D histogram will be booked and filled and then fitted to produce the 1D histograms.

Backbone: The package consists of a single class which inherits from the ManagedMonitorToolBase as required for all monitoring algorithms. The three main methods are:

  • bookHistograms() - here two types of folders are created - one for shifter and one for expert histograms; then, all histograms satisfying the jobOptions are booked.
  • fillHistograms() - the candidates are selected and the 2D histograms of 2DinvmassVSx are filled, where x is any of the variables listed in the general description above.
  • procHistograms() - projections of each bin of each 2D histogram (the projections being the invariant mass distributions in a certain X bin) are fitted and the results of the fits are filled in the 1D histograms of widthVSx and invmassVSx requested in the jobOtpions.

An instance of the algorithm runs for each requested resonance and each trigger.

Trigger: The events satisfying the selected trigger are passed to the algorithm by the ManagedMonitorToolBase class. This action is prompted by including the following option in the jobOptions

JpsiMon_XpressTrig.TriggerChain = “EF_2mu4T_Jpsimumu_IDTrkNoCut”
where JpsiMon_XpressTrig is a particular instance of the InDetDiMuonMonitoring algorithm

Steps for using the package for assessing alignment performance

Check out and compile package:

cmt co InnerDetector/InDetMonitoring/InDetDiMuonMonitoring
cd InnerDetector/InDetMonitoring/InDetDiMuonMonitoring/cmt
cmt config
source setup.sh
cmt make
or for a specific tag, e.g.:
 cmt co -r InDetDiMuonMonitoring-00-00-10 InnerDetector/InDetMonitoring/InDetDiMuonMonitoring 

Copy jobOptions from share/DiMuMon_jobOptions.py to working directory and modify as needed:

  • REQUIRED: enable output!
       DiMuMonDoROOTFile = True
       
  • enable resonances of interest, e.g:
       doJpsi = False
       doZmumu = True
       
  • if running on a single file, i.e. there will be no merging to be performed later, enable fitting:
       doFits = True
       # set to true to print all fits to ps files. One ps file per 2D histogram requeste
       doSaveFits = False 
       
  • enable regions of interest (out of [“All”,”BB”,”EAEA”,”ECEC”]) for each resonance, e.g.:
       regionsZmumu = [“BB”,”EAEA”]
       
  • enable variables to plot for each resonance. The full list of available variables is:=[“eta”,”etaAll”,”etaPos”,”etaNeg”,”phi”,”phiAll”,”phiPos”,”phiNeg”,”pt”,”ptAll”,”ptPos”,”ptNeg”,”etaDiff”,”etaSumm”,”phiDiff”,”phiSumm”,”crtDiff”]=. E.g. setup for Zmumu:
varsVSmeanZmumu = [“eta”,”etaAll”,”etaPos”,”etaNeg”,”phi”,”phiAll”,”phiPos”,”phiNeg”,”pt”,”ptAll”,”ptPos”,”ptNeg”,”etaDiff”,”etaSumm”,”phiDiff”,”phiSumm”,”crtDiff”]
varsVSwidthZmumu = [“etaAll”,”phiAll”,”ptAll”,”etaDiff”,”phiDiff”,”crtDiff”]
varsDistrZmumu = [“etaAll”,”etaPos”,”etaNeg”,”phiAll”,”phiPos”,”phiNeg”,”ptAll”,”ptPos”,”ptNeg”]
  • To use different trigger, modify the trigger chain name in this line:
ZmumuMon_XpressTrig.TriggerChain = “EF_2mu10”
  • To change invariant mass window, number of mass bins, number of variable bins, pt/eta cuts modify each instance of the algorithm, e.g. for Zmumu with no trigger:
ZmumuMon_NoTrig = DiMuMon (name = “ZmumuMon_NoTrig”,
                                   resonName = “Zmumu”,
                                   muonCollection = “StacoMuonCollection”
                                   minInvmass = 60.,
                                   maxInvmass = 120.,
                                   ptCut = 20.,
                                   etaCut = 2.5,
                                   nMassBins = 60,
                                   nVarBins = 10, # decrease this number when running on less data
                                   triggerChainName = “NoTrig”,
                                   regions = regionsZmumu,
                                   varsVSmean = varsVSmeanZmumu,
                                   varsVSwidth = varsVSwidthZmumu,
                                   varsDistr = varsDistrZmumu,
                                   doFits = doFits,
                                   doSaveFits = doSaveFits)

Create a file job.py with the following contents:

include(“RecExCommon/RecExCommon_topOptions.py”)

if not ‘InDetKeys’ in dir():
        print “InDetRec_jobOptions: InDetKeys not set - setting to defaults”
        from InDetRecExample.InDetKeys import InDetKeys
InDetFlags.doPrintConfigurables=True

from TrigDecisionTool.TrigDecisionToolConf import Trig__TrigDecisionTool
monTrigDecTool = Trig__TrigDecisionTool(“monTrigDecTool”)
ToolSvc += monTrigDecTool

include(“DiMuMon_jobOptions.py”)

To run a job locally, e.g.:

Reco_trf.py --omitvalidation=ALL inputAODFile=data11_7TeV.00183462.physics_Muons.recon.DAOD_ZMUMU.f385_m716_v34._00 outputTAGFile=tag.pool.root preInclude=job.py maxEvents=-1

and on the grid, e.g.:

pathena --trf “Reco_trf.py outputTAGFile=%OUT.TAG.root preInclude=job.py inputAODFile=%IN” --individualOutDS --inDS=data11_7TeV.periodL2.physics_Muons.PhysCont.DAOD_ZMUMU.t0pro09_v01/ --outDS=user.JaneDoe.DiMuMon.periodL1.rel17 --extOutFile=“DiMuMon.root” --dbRelease=LATEST --nGBPerJob=MAX

Pull the dataset containing the DiMuMon.root from dq2. For the above example:

dq2-get user.JaneDoe.DiMuMon.periodL1.rel17_EXT0/

If the result is multiple files, run post processing to merge and refit:

DQHistogramMerge.py fileList.txt DiMuMon.merged.root 1
where fileList.txt is the path to files to be merged (one file per line).

-- AnaOvcharova - 16-Oct-2011

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r4 - 2014-02-20 - AnaOvcharova
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback