Accessing to the instantaneous luminosity information in your analysis


The instantaneous luminosity information is available in most recent versions of the thumbnails and of the CAF trees both for data and for Montecarlo events (for Montecarlo events the instantaneous luminosity of the overlaid zero bias event is used). The user can access the instantaneous luminosity by tick (typically a number in the 0-8 cm-2 s-1 range), the average instantaneous luminosity (this is the sum of the luminosity of the 36 ticks and has values in the 0-300 cm-2 s-1 range) and the luminosity block number.

Accessing the instantaneous luminosity information from the thumbnails.

The following code can be used to access the instantaneous luminosity information while analyzing thumbnails
(this code has been extracted from tmb_tree_maker/src/TMBGlobMaker.cpp).


#include "run_config_fwk/TMBTriggerChunk.hpp"
#include "lumi_chunk/LumiInfoChunk.hpp"
#include "prod_history/HistorySelector.hpp"
#include "pileup_evt/MinBiasChunk.hpp"


   int ticknum = -1;    // tick number
   int lumblk = -1;      // luminosity block number

   // Use the TMBTriggerChunk to extract the current luminosity
   // block number and the tick number corresponding to the current event.
   edm::TKey<TMBTriggerChunk> trgkey;
   edm::THandle<TMBTriggerChunk> trgchunk=trgkey.find(event);
   if (trgchunk.isValid()){
     const thumbnail::Global& global=trgchunk->global();
     ticknum=global.get_ticknum();
     lumblk=global.get_lumblk();
   }

   // For Montecarlo events extract the luminosity block
   // number and the tick number from the overlayed zero bias event.
   if(fwk::HistorySelector::is_monte_carlo(event)) {
     edm::TKey<MinBiasChunk> mbiaskey;
     edm::THandle<MinBiasChunk> mbiaschunk = mbiaskey.find(event);
     if(mbiaschunk.isValid()) {
       lumblk = mbiaschunk->overlayLumblk();
       ticknum = mbiaschunk->overlayTick();
     }
   }

   float instlum = -999.;     // instantaneous luminosity
   float avglum  = -999.;     // average instantaneous luminosity for the 36 ticks

   // Extract the instantaneous luminosity information from the LumiInfoChunk.
   edm::TKey<fwk::LumiInfoChunk> lumiKey;
   edm::THandle<fwk::LumiInfoChunk> lumiChunk = lumiKey.find(event);
   if(lumiChunk.isValid() && ticknum>0) {
     instlum = lumiChunk->get_lumi_ticknum(ticknum);
     avglum  = lumiChunk->get_tick0_lumi();
   }

Accessing the instantaneous luminosity information from the CAF trees.

In the CAF trees the instantaneous luminosity by tick, the average luminosity and the luminosity block number are  available as part of the TMBGlobal object using the instlum(), avglum() and lumblk() member functions (the first two functions return a float number, the third one returns an integer).

Last update 21 May, 2008, by Marco Verzocchi