How to run NTCAFIX on the QCD NTUPLES Author: Bob Hirosky Last Update: JUL, 24 1998 NTCAFIX seems to have been promoted from a tool used in the CAFIX 5.1 derivation. This document gives a brief introduction to it's use. I have written a simple example kumac and fortran file to demonstrate how to run CAFIX corrections on the QCD global ntuples. This note describes the necessary steps to get NTCAFIX working for your studies. This is not intended to be a piafserver tutorial, for more piaf server info consult the D0WEB pages under COMPUTING. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ A word on paw versions: I have personally tested this code on the official version of pawx11 on the alpha and fnald0 clusters and also on the current version of pawX11 available on the SGI/d0ch clusters When you run paw on a VMS node you should get this message: ****************************************************** * * * W E L C O M E to P A W * * * * Version 2.06/20 3 March 1995 * * * * Stage command modified for D0 at FNAL 1-Nov-95 * * * ****************************************************** IF YOU DON'T GET THIS VERSION YOU MAY HAVE PROBLEMS RUNNING THE CODE ON THE CHALLENGE. on Unix nodes: ****************************************************** * * * W E L C O M E to P A W * * * * Version 2.08/14 21 January 1997 * * * ****************************************************** +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ NTCAFIX provides nearly full CAFIX functionality for the uncorrected mpf ntuples used in the escale analysis. It provided an excellent testing ground for develpement of CAFIX5.1 and may also be used to recorrect jets in the qcd global ntuple to the 5.1 level. Advantages include: running CAFIX on the mpf ntuples in a few minutes! running CAFIX on the qcd_global ntups in < 1 hour! all standard library code + the newest cafix corrections are implimented It is completely RCP driven using CAFIX.RCP and QCD_JET_CORRECTION.RCP Limitations are as follows: MET is only corrected for changes to jets. This isn't a problem for the escale analysis, or qcd jets analyses, but any electron or photon + MET analysis should stick w/ standard cafix. A possible work around would be to uncorrect your jets and use the uncorrected jet vectors to remove the jet corrections from PNUT4 MET, then use this modified PNUT4 in your call to ntcafix. The only flags in CAFIX_RCP used by NTCAFIX are: DO_JET_CORRECTION DO_ZSP_CORRECTION DO_UND_CORRECTION DO_CONE_CORRECTION DO_MET_CORRECTION USE_JET_CORRECTION In CAFIX 5.1 EM clusters may be removed from jets and corrected separately from the rest of the jet. JNEP banks are generally not available in the ntuples, so this option is efectively always off. These jets are corrected like any other jet - therefore they are typically overcorrected relative to CAFIX w/ the remove option turned on. Otherwise the functionality is the same. For jets analysis this distinction is unimportant. ********************************************************************** The following example shows you how to run ntcafix on the qcd_global ntups: 1) setup of your area on D0CHA: this requires that you point to the cafix51 libraries I have made on the challenge: cd ~ ln -sf /new.proj1/qcd_group/service/piaf.setup_nodeb piaf.setup also link to the global qcd_ntuples: cd ~/piaf ln -sf /new.proj1/qcd_group/allcones1b/ allcones1b 2) copy my example files to your paw area: on the alpha: PRJ$ROOT349:[ECAL_3.CAFIX_51_1.NTCAFIX]CAF51_EZ_EXAMPLE.F CAF51_EZ_EXAMPLE.KUMAC ERRMSG_SETUP.RCP PRJ$ROOT349:[ECAL_3.CAFIX_51_1]CAFIX.RCP QCD_JET_CORRECTION.RCP (note: use MC_QCD_JET_CORRECTION.RCP or QCD_JET_CORRECTION51_630.RCP, if you want to use these data instead of the global qcd data in the example) 3) USAGE: exec CAF51_EZ_EXAMPLE you'll get a number of histograms both w/ caf50 and caf51 corrections * Some words on the code * CAF51_EZ_example.f is well docmented, so it should be self explanitory NT_CAFIX_EVINI: must be called for each event to setup the correction this feeds event info to NTCAFIX FAKE_JBANK: is called for each jet algorithm you want to correct this passes the uncorrected jet arrays to NTCAFIX NT_CAFIX: input original METX,Y corrected METX,Y are returned (if MET correction is on in cafix.rcp, otherwise they are unchanged) and all jet algorithms selected via FAKE_JBANK are corrected GET_COR_JETS: used to access corrected jet information GET_JET_QUANS: used to get detailed error and correction factor for each jet !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! One word of caution: NTCAFIX may not work forever. The current piaf server uses an old version of the SGI loader which predates the current software release. Due to technical features of memory management in the new loader it may not be possible to continue creating the necessary ZEBRA structures to support RCP file input, if a future SGI system release breaks the loader we are now using. But so far, so good...