Thursday, August 9, 2007

The recipe vanilla (131HLT6)

# to get it working in 131_HLT6 #
scramv1 p -n vanilla131_HLT6 CMSSW CMSSW_1_3_1_HLT6
cd vanilla131_HLT6/src
eval `scramv1 ru -csh`
project CMSSW

# the code: checkout the following packages:
--- Tag --- -------- Package --------
V00-01-00 CondCore/EgammaPlugins
V00-01-10 CondFormats/BTauObjects
V02-06-02 CondFormats/DataRecord
V00-01-00 CondFormats/EgammaObjects
V00-05-00 DataFormats/EgammaReco
V00-00-04 EgammaAnalysis/ElectronIDAlgos
V00-00-01 EgammaAnalysis/ElectronIDESSources
V00-00-01 HiggsAnalysis/HiggsToWW2e
shr-8aug07 PhysicsTools/StatPatternRecognition
V00-03-04 RecoEcal/EgammaClusterAlgos
V00-05-07 RecoEcal/EgammaClusterProducers
V00-03-00 RecoEcal/EgammaCoreTools
V00-05-06 SimCalorimetry/CaloSimAlgos
---------------------------------------
cvs co -r V00-05-01 RecoEcal/EgammaClusterProducers/data/geometryForClustering.cff

# Claude's bug fixes for 131:
cp /afs/cern.ch/user/c/charlot/scratch0/CMSSW_1_3_1_bugfix/src/Egamma131Fixes.tar.gz .
tar xzvf Egamma131Fixes.tar.gz

# Chiara's fix for NAN in particle time of flight
addpkg SimCalorimetry/CaloSimAlgos
edit SimCalorimetry/CaloSimAlgos/src/CaloHitResponse.cc
and add [see the head, in case] in 'run'
// check the hit time makes sense
if ( isnan(((*hitItr).time())) ) { continue; }

# building
scramv1 b

# running interactively
cd HiggsAnalysis/HiggsToWW2e/test/
cmsRun HWW2eAnalysis.cfg

# running in batch
HiggsAnalysis/HiggsToWW2e/scripts/run.pl -h

# running with CRAB
see howto here:
http://welectrons.blogspot.com/2007/06/per-usare-crab.html

Saturday, August 4, 2007

The strange case of crash in HLTX

Hi all,

the old recipes for set-up the analysis code failed at runtime for a segmentation fault
in 131_HLTX releases because of the different version of DataFormats and RecoEcal/EgammaCoreTools used in 131.
Now I have updated them.
The new recipe for 131_HLTX releases, including the bug fixes by Claude for electrons, is:

# set up the release
scramv1 project -n HtoWW131_HLT6 CMSSW CMSSW_1_3_1_HLT6
cd HtoWW131_HLT6/src
project CMSSW

# download the core code
cvs co HiggsAnalysis/HiggsToWW2e

# fix for NAN in particle time of flight
cvs co -r CMSSW_1_3_1_HLT6 SimCalorimetry/CaloSimAlgos

edit SimCalorimetry/CaloSimAlgos/src/CaloHitResponse.cc
and add [see the head, in case] in 'run'

// check the hit time makes sense
if ( isnan(((*hitItr).time())) ) { continue; }


# to use new variables for shower shape:
source cvs_setup_pietro
cvs co -r edm-HLT6 DataFormats/EgammaReco
cvs co -r edm-HLT6 RecoEcal/EgammaCoreTools
cvs co -r edm-HLT6 PhysicsTools

# this is necessary in HLTX releases
project CMSSW
cvs co -r CMSSW_1_3_1_HLT6 RecoEcal/EgammaClusterProducers

# and finally download the likelihood code:
source cvs_setup_pietro
cvs co HtoWWElectrons/HtoWWLHAlgo
cvs co HtoWWElectrons/HtoWWLHESSource
cvs co HtoWWElectrons/HtoWWLHRecord

1) edit HiggsAnalysis/HiggsToWW2e/src/CmsEleIDTreeFiller.cc
uncomment
// #include "HtoWWElectrons/HtoWWLHRecord/interface/PidLHElectronRecord.h"
// #include "HtoWWElectrons/HtoWWLHAlgo/interface/PidLHElectronAlgo.h"
// #include "HtoWWElectrons/HtoWWLHESSource/interface/PidLHElectronESSource.h"
and uncomment
// edm::ESHandle likelihood;
// iSetup.getData( likelihood );
// privateData_->eleLik->push_back(likelihood->getLHRatio (electron,iEvent,iSetup) );
and comment
privateData_->eleLik->push_back( -1. );

2) edit HiggsAnalysis/HiggsToWW2e/src/CmsTreeFiller.cc
and uncomment
//privateData_->lat->push_back(sClShape->lat());
and comment
privateData_->lat->push_back(-1.);

uncomment
// privateData_->a00->push_back(sClShape->zernike00());
// privateData_->a11->push_back(sClShape->zernike11());
// privateData_->a20->push_back(sClShape->zernike20());
// privateData_->a22->push_back(sClShape->zernike22());
// privateData_->a42->push_back(sClShape->zernike42());
and comment
privateData_->a00->push_back(-1.);
privateData_->a11->push_back(-1.);
privateData_->a20->push_back(-1.);
privateData_->a22->push_back(-1.);
privateData_->a42->push_back(-1.);

3) edit HiggsAnalysis/HiggsToWW2e/test/HWW2eAnalysis.cfg
and uncomment
# include "HtoWWElectrons/HtoWWLHESSource/data/configuration.cfi"

4) add the libs of the likelihood in the HiggsAnalysis/HiggsToWW2e/BuildFile:
cp ~emanuele/public/BuildFile
HiggsAnalysis/HiggsToWW2e/BuildFile


# other bug fixes in 131 (by Claude)
cp /afs/cern.ch/user/c/charlot/scratch0/CMSSW_1_3_1_bugfix/src/Egamma131Fixes.tar.gz .
tar xzvf Egamma131Fixes.tar.gz