# Presentation: 803074

## MET Update

**What is wrong with MET?**
**New met_analyze package**
**Old vs New MET variable sets**
**Rough sketch of new MET object**
**MET reference plots (p10.11.00)**

**Alan L. Stone - Louisiana Tech University**

## Why Change MET?

**It’s a **_**Hack**_**!**
**More Fortran & C-like than object-based**
**At least 8 “authors” in five years**
**Different & uncoordinated style**
**Need to modify *****jetanalyze***** to capture changes to MissingET object...**
**Only one object is used!**
**Structure is too rigid**
**PMCS copy constructor**
**Adding variable(s) ********too complicated**
**Confusing variable names**
**What does ****METNE**** or ****MEyWE**** mean?**
**More variables needed for analyses**

## New met_analyze packageOld design:  		JetAnalyze.cppCalorimeter	Jets	MissingET	EvtInfo			 “special” runmissinget.rcpNew design:	Break away		

**jetanalyze**

- analyze                 bcjet_analyze
- bphys_analyze           caep_analyze
- cal_nada_analyze        calanalyze
- chpart_analyze          d0_analyze
- em_analyze              fe_crate_analyze
- fps_analyze             gtr_analyze
- jetanalyze              l1cal_analyze
- l1frm_analyze           l1ft_analyze
- l1muo_analyze           l2calem_analyze
- l2caljet_analyze        l2calmet_analyze
- l2cps_analyze           l2cttcft_analyze
- l2gbl_analyze           l2gblem_analyze
- l2mu_analyze            l2stt_analyze
- l3fanalyze              l3fsmtanalyze
- l3fvertex_analyze       l3prop_analyze
- mc_analyze              mccomb_analyze
- met_analyze             muo_analyze
- nada_analyze            prop_analyze
- reco_analyze            semanalyze
- smt_analyze             tau_analyze
- trig_jetanalyze         trigsim_analyze
- vertex_analyze          wz_analyze

- Date: Thu, 06 Dec 2001 13:31:55 -0600
- From: Alan M Jonckheere <jonckheere@fnal.gov>
- Subject: Re: Package request: met_analyze
- done. NOTE: to have an exe stay around after a release is "frozen", you need to ask that
- it be saved (we get rid of >10GB of "junk" per build (5/10 builds per week) by cleaning
- out unasked for exes. I need: exe name *exact* + short (< 1 line) description of what it does.
- Alan
- > Hi Alan,
- >
- > Package name: met_analyze
- > Package purpose: METAnalyze would be the framework package that produces an Ntuple for
- >       missingET.  This is currently done in JetAnalyze.  The Jets/MET convenors and I have
- >       agreed that it makes sense to separate missingET from JetAnalyze.
- > Authors: Alan L. Stone  - alstone@fnal.gov
- >          Joe Steele     - steele@fnal.gov
- >          Lee Sawyer     - sawyer@fnal.gov
- > thanks, alan

**jetanalyze**

**met_analyze**

- MET
- objects

## METOLD block (during the transition period)

******Calculated from towers in CalData chunk**
**MET               Missing Et Calorimeter only**
**METx             x component of MET – Cal only (can be negative)**
**METy             y component of MET – Cal only (can be negative)**
**MEphi            METx/METy   **
**SET                Scalar ET **
**METNE         Same as MET with threshold of 200 MeV/tower**
**METNEx       Same as METx w/threshold of 200 MeV/tower**
**METNEy       Same as METy w/threshold of 200 MeV/tower**
**MEphiNE       METNEx/METNEy   **
**SETNE           Same as SET w/threshold of 200 MeV/tower**
**METWE        Same as METNE with |i********|<33**
**METWEx****	****      Same as METNEx with |i********|<33**
**METWEy      Same as METNEy with |i********|<33**
**MEphiWE      METWEx/METWEy   **
**SETWE          Same as SETNE with |i********|<33**
**Zvtx                primary reconstructed Z position of vertex**
**SMuX             px sum  of the "good muons"**
**SMuY             py sum  of the "good muons"**
**SMuPt           Transverse momentum of the “good muons”**

## New MET Variable Scheme

- Only one MET object is needed - instantiated several times
- Towers
- Cal + ICD
- Cal only
- eta limits
- tower energy thresholds
- Cells
- Cal + ICD
- ICD only
- eta limits
- cell energy thresholds
- NADA

- Separate object for muon info
- Separate object for PMCS
- Separate object for Rings
- Missing ET RECO gets list or vector of MET objects
- met_analyze  new variables are filled
- muon correction done here

## Date: Mon, 19 Nov 2001 23:00:25 +0100 (CET)

**From: Gregorio Bernardi <gregorio@in2p3.fr>**
**To: d0jetmet@fnal.gov**
**Subject: Upgrade of the MET Block/scheme.**
**SET: scalar ET obtained as the sum of  cell energy*abs(sin(theta)).**
**     ****a cell with negative energy will give a NEGATIVE contribution to SET**
**VETx: x of vect. ET obtained as the sum of the cell energy*sin(th)*cos(ph)**
**VETy: y of vect. ET obtained as the sum of the cell energy*sin(th)*sin(ph)**
**VETz: z of vect. ET obtained as the sum of the cell energy*cos(th)**
**      ****(in these 3 variables the energy can be positive or negative)**
**VET=sqrt(VETx**2+VETy**2)**
**the x and y component of the Missing ET (METx, METy) are simply:**
**METx=-VETx**
**METy=-VETy**
**the missing transverse energy is obtained by**
**MET=sqrt(METx**2+METy**2) , and of course MET=VET.**
**in the detailed variables, we use VETx, VETy, VETz in order to have a**
**symmetric (same sign) treatment of calorimeter and muons:**
**e.g. VETx=+VETCALOx+VETMUONx,  etc..**

## Structure of the future MET block

**Global variables:**
**-----------------**
**SETT    Scalar  Et  constructed from Cal-ICD Towers    (=+SETTAS +SETTBS )**
**METTx   x component constructed from Cal-ICD Towers    (=-VETTASx-VETTBSx)**
**METTy   y component constructed from Cal-ICD Towers    (=-VETTASy-VETTBSy)**
**METT    Missing Et  constructed from Cal-ICD Towers**
**METTM   Scalar  Et  constructed from Cal-ICD Towers&Muon (+SETT +SETMUON )**
**METTMx  x component constructed from Cal-ICD Towers&Muon (-VETTx-VETMUONx)**
**METTMy  y component constructed from Cal-ICD Towers&Muon (-VETTy-VETMUONy)**
**METTM   Missing Et  constructed from Cal-ICD Towers&Muon**
**SETC    Scalar  Et  constructed from Cal-ICD Cells      (+SETCAS +SETCBS )**
**METCx   x component constructed from Cal-ICD Cells      (-VETCASx-VETCBSx)**
**METCy   y component constructed from Cal-ICD Cells      (-VETCASy-VETCBSy)**
**METC    Missing Et  constructed from Cal-ICD Cells**
**SETCM   Scalar  Et  constructed from Cal-ICD Cells&Muon  (+SETC +SETMUON )**
**METCMx  x component constructed from Cal-ICD Cells&Muon  (-VETCx-VETMUONx)**
**METCMy  y component constructed from Cal-ICD Cells&Muon  (-VETCy-VETMUONy)**
**METCM   Missing Et  constructed from Cal-ICD Cells&Muon**

## TOWERS

**VETTASx  Vectorial sum of Towers Above eta limit and E_tow > twr-thresh.**
**         ****(the x,y,z components are given, same for all variables below)**
**SETTBS   Scalar    sum of Towers Below eta limit and E_tow > twr-thresh.**
**VETTBSx  Vectorial sum of Towers Below eta limit and E_tow > twr-thresh.**
**           **
**SETTAN   Scalar    sum of Towers Above eta limit and E_tow < twr-thresh.**
**VETTANx  Vectorial sum of Towers Above eta limit and E_tow < twr-thresh.**
**SETTBN   Scalar    sum of Towers Below eta limit and E_tow < twr-thresh.**
**VETTBNx  Vectorial sum of Towers Below eta limit and E_tow < twr-thresh.**
**----------------------**
**SETCAS   Scalar    sum of Cells Above eta limit and E_cell > cel-thresh.**
**VETCASx  Vectorial sum of Cells Above eta limit and E_cell > cel-thresh.**
**SETCBS   Scalar    sum of Cells Below eta limit and E_cell > cel-thresh.**
**VETCBSx  Vectorial sum of Cells Below eta limit and E_cell > cel-thresh.             **
**SETCAN   Scalar    sum of Cells Above eta limit and E_cell < cel-thresh.**
**VETCANx  Vectorial sum of Cells Above eta limit and E_cell < cel-thresh.**
**SETCBN   Scalar    sum of Cells Below eta limit and E_cell < cel-thresh.**
**VETCBNx  Vectorial sum of Cells Below eta limit and E_cell < cel-thresh.**

**TOWERS**

**CELLS**

## Standalone part

**---------------**
**SETICD    Scalar    sum of ICD  cells only**
**VETICDx   Vectorial sum of ICD  cells only**
**SETNADAx  Scalar    sum of NADA cells**
**VETNADAx  Vectorial sum of NADA cells**
**SETMUONx  Scalar    sum of MUONs**
**VETMUONx  Vectorial sum of MUONs**
**The .....N,ICD,NADA, quantities are given for systematic studies.**
**They are not used explicitely in the global MET/SET calculations done in**
**this block, since the ICD is already included in the Tower and Cells**
**variables, and since NADA hot cells have already been suppressed.**
**However, if NADA is ran in shadow mode then the NADA quantities can be**
**used to obtain a NADA corrected missing/Scalar ET. Conversely, if NADA**
**has been run in killing mode, the non-NADA corrected MET can be trivially**
**restored using the detailed NADA variables.**
**The revertexing block corresponds to the VETTAS+VETTBS quantities.**
**(i.e the total vectorial E_T obtained from towers above tower threshold).**
**The WE/NE concept of the old MET block is implemented in this scheme**
**by the 2 complementary quantities:**
**SETTAS (towers above eta limits) SETTBS (towers below eta limit),**
**i.e. SETT=SETTAS+SETTBS (similary for VETx,y,MET).**

## Rough Sketch of New MissingET[thanks to Laurent Duflot & Harry Melanson]

-               *ptr

- _Looper_
-      flag: towers
-               cells

- _MET_
-   MEx
-   MEy
-   Scalar
-   MET
-   ID

- CALDATA

- Thresholds
- (rcp)

**list <MET> loop (caldata*)**

****** ****Only loop over cells or towers once**
****** ****Calorimeter cell occupancy is about 5% per event (Total  #Cells ~47k)**
****** ****Calorimeter Event Readout : #Cells ~ 2x #Towers**

## reco_all_0000142646_001.raw._p10.11.00_000

**reco_all_0000142646_001.raw._p10.11.00_000**

## reco_all_0000142646_001.raw._p10.11.00_000

## reco_all_0000142646_001.raw._p10.11.00_000

## reco_all_0000142646_001.raw._p10.11.00_000

## What’s Next?

- Add new MET block to ***met_analyze***
- Keep METOLD block for transition period
- Write algorithms to calculate MET objects
- Use old MissingET class initially
- Important to make new variables available and correct in root-tuple & to facilitate analyses
- Create, test & release new MET classes
- In theory very few people should notice when old MissingET code is broken as the MET chunk will be unchanged
- Strip METOLD block from jetanalyze and met_analyze
- Determine if MET calculated from towers **AND **cells is necessary

## Reco_all_0000142646_001.raw_p10.11.00_000

** ****Sum cell METx = 4.38234**
** ****Sum cell METy = -5.36484**
** ****Sum cell SET = 198.872**
** ****Sum cell MET = 6.92722**
** ****Number towers in CalDataChunk = 1290**
** ****Sum tower METx = 4.25232**
** ****Sum tower METy = -5.49278**
** ****Sum tower SET = 190.834**
** ****Sum tower MET = 6.94643**
-  **Number cells in CalDataChunk = 2517**
** ****Sum cell METx = -0.699711**
** ****Sum cell METy = -2.25492**
** ****Sum cell SET = 180.589**
** ****Sum cell MET = 2.36099**
** ****Number towers in CalDataChunk = 1142**
** ****Sum tower METx = -1.51435**
** ****Sum tower METy = -2.18183**
** ****Sum tower SET = 174.576**
** ****Sum tower MET = 2.65587**

-  **Number cells in CalDataChunk = 1792**
** ****Sum cell METx = 9.92163**
** ****Sum cell METy = -7.81163**
** ****Sum cell SET = 97.138**
** ****Sum cell MET = 12.6278**
** ****Number towers in CalDataChunk = 787**
** ****Sum tower METx = 10.042**
** ****Sum tower METy = -7.92104**
** ****Sum tower SET = 88.8408**
** ****Sum tower MET = 12.7901**
-  **Number cells in CalDataChunk = 2524**
** ****Sum cell METx = 14.0922**
** ****Sum cell METy = 4.2117**
** ****Sum cell SET = 121.14**
** ****Sum cell MET = 14.7081**
** ****Number towers in CalDataChunk = 1094**
** ****Sum tower METx = 14.274**
** ****Sum tower METy = 4.11661**
** ****Sum tower SET = 113.853**
** ****Sum tower MET = 14.8558**

**Number cells in CalDataChunk = 2077**
** ****Sum cell METx = 5.55966**
** ****Sum cell METy = 7.82454**
** ****Sum cell SET = 135.817**
** ****Sum cell MET = 9.59861**
** ****Number towers in CalDataChunk = 1023**
** ****Sum tower METx = 5.11913**
** ****Sum tower METy = 7.47021**
** ****Sum tower SET = 130.597**
** ****Sum tower MET = 9.05591**
** ****Number cells in CalDataChunk = 1661**
** ****Sum cell METx = 9.35186**
** ****Sum cell METy = 8.37252**
** ****Sum cell SET = 113.495**
** ****Sum cell MET = 12.5521**
** ****Number towers in CalDataChunk = 821**
** ****Sum tower METx = 9.08361**
** ****Sum tower METy = 8.56578**
** ****Sum tower SET = 106.381**
** ****Sum tower MET = 12.4854**

**Reco_all_0000142646_001.raw_p10.11.00_000**