Saturday, September 29, 2007

The recipe vanilla (160)

This is the recipe to run H->WW analysis in CMSSW 160

Test Release based on: CMSSW_1_6_0
Base Release in: /afs/cern.ch/cms/sw/slc4_ia32_gcc345/cms/cmssw/CMSSW_1_6_0
Your Test release in: /afs/cern.ch/user/e/emanuele/scratch0/higgs160
--- Tag --- -------- Package --------
V00-01-01 CondCore/EgammaPlugins
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
NoTag HiggsAnalysis/HiggsToWW2e
shr-8aug07 PhysicsTools/StatPatternRecognition
V00-05-07 RecoEcal/EgammaClusterProducers
V00-03-00 RecoEcal/EgammaCoreTools
---------------------------------------
total packages: 10

Since the SQLite DB file is only available in releases >170_pre5, use a local file. Change, in EgammaAnalysis/ElectronIDESSources/data/likelihoodPdfsDB.cfi

replace CondDBCommon.connect = "sqlite_file:/afs/cern.ch/user/e/emanuele/scratch0/vanilla131HLT6/src/EgammaAnalysis/ElectronIDAlgos/test/electronlikelihood.db"   
replace CondDBCommon.catalog = "file:/afs/cern.ch/user/e/emanuele/scratch0/vanilla131HLT6/src/EgammaAnalysis/ElectronIDAlgos/test/mycatalog.xml"

with:

replace CondDBCommon.connect = "sqlite_file:/afs/cern.ch/user/e/emanuele/public/electronLikelihoodDb160/electronIdLikelihood.db"   
replace CondDBCommon.catalog = "file:/afs/cern.ch/user/e/emanuele/public/electronLikelihoodDb160/likelihoodcatalog.xml"



refer to the previous post to run in batch and with CRAB.

emanuele

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

Sunday, July 22, 2007

Saturday, July 21, 2007

etaLAT test

Dear All,

after running on a sample of electrons at pt 35 as signal and QCD samples (pt_20-30 + pt_30-50, weighthed by the cross sections), I tried and calculate the best selection possible on the normalized distributions, for the lateral moment LAT and for the eta and phi lateral moments.
Results are summarized as follows:





























variable selection signal/sqrt(bkg) eff signal eff bkg
LAT 0.285 1.38391 0.673745 0.237015
eta LAT 0.145 1.52133 0.759894 0.249493
phi LAT 0.185 1.14436 0.63236 0.305356


official CMSSW repository filling

Dear All,

Emanuele and me committed part of th analysis code in the CMSSW HiggsAnalysis/HiggsToWW2e repository.
The likelihood implementation is missing, since it is going to be integrated in the EgammaAnalysis package, nevertheless the dumper contains already some commented lines waiting for the likelihood information.
The code is compiling and has been tested in the CMSSW_1_3_1_HLT6 release and up to now is just staying in the HEAD of the repository.
The need of a custom ObjectSelector has been temporarly solved by adding it to the plugins folder.

Emanuele and Pietro

Wednesday, July 11, 2007

bug fix for hits NAN: correction

Ciao,
in the post with the list of things to do to setup the machinery I wrote

# fix for NAN in particle time of flight
cvs co -r CMSSW_1_3_1 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; }

this is OK, but the head version CAN not be used, otherwise there are problems with the calo digitization. The checkout has to be done from HLT5, the head can only be taken as a reference to know where the fix has to be put.

Chiara

Tuesday, July 10, 2007

Tag and Probe with Z/W as a control sample for likelihood

Hi Carole and Ozana,

this is just a brief message to outline the tag and probe strategy and its specialized usage for the electron identification stuff.

We have developed an algorithm which, given an object reconstructed as an "electron" in the CMS detect, returns the probability for it to be a real electron or a fake (typically pions or kaons inside a QCD jet).

This algorithm has been tuned and studied on MC samples of "pure" electrons and "pure" QCD jets used as background.
It is necessary to setup a working strategy to control the setup and the performances of this algorithm with the data (when we will have them). So you need to find what is called a "control sample", i.e. a sample on data which is made of electrons (for signal category) or pions (fo background category) with high purity where check that the output of your algorithm is what you expect from Monte Carlo simulation.

While it is quite easy to have control sample for QCD jets (you have a lot of them from minimum bias events which contains a negligible fraction of leptons), more difficult is find a pure sample of electrons.
A method has been studied, called tag & probe.
It is based o the fact that you will produce a lot of Z bosons which decay in e+e-. This will produce a lot of electrons also in the early stage of the experiment.
Since you have two electrons, you define your signal (an electron) as follows:

a) you look for a well reconstructed electrons which satisfy a number of quality requests.
You define this "electron" as "tag".
b) then you look simply for a cluster in the electromagnetic calorimeter and this is your
"probe" electron.
You don't require any electron identification request on this because you want to test the likelihood algorithm on this.
The only request you do on this is uncorrelated with the "electron properties" of the e.m. cluster: i.e. you require that combining it with the "tag" electron its invariant mass is consistent with Z mass.
This should reduce a lot the background.

What you could do is to apply the recently developed likelihood algorithm on the "probe" candidates and look at the performances of the algorithm.
This is a fundamental test because it is a test you do on data in order not to rely on Monte Carlo simulation which could not reproduce perfectly the data.

There are people already working on it and they defined the criteria to select the "tag" and "probe" electron candidates.
Take a look to this presentation:

http://indico.cern.ch/getFile.py/access?contribId=5&resId=1&materialId=slides&confId=12396

you could try to reproduce their selections to define the "tag" & "probe" samples.

Then a further step could be this.
After having selected the "probe" samples, you have a hopely very high purity. But still there will be background events which smear the distributions of the discriminating variables which are the inputs of the likelihood algorithm.

One idea could be to do a background subtraction based on the di-electron invariant mass.
This is a statistical technique, and could be done in different ways. A smart way of doing it could be to fit the di-electron invariant mass with a model for the signal and a model for the combinatorial background. This will provide a event-by-event probability for the event to be "signal". You could then weight the event with the likelihood to be signal and this will provide
automatically a "background-subtracted" distribution for the discriminating variables.
A reference for this can be this:

http://arxiv.org/abs/physics/0402083

One target for us can be to set up an automatic tool to do this. This is complicated by the fact that
we have to do things for the different classes, for barrel and endcap, for different pt's, etc.
For spin reasons, for example, you can find very few events of Z decays at eta~0 and low Pt's,
so there are a number of challenges to face.
You could enjoy them ;)

We will talk about this when we are all together at CERN (next days).
Ciao!


emanuele

ElectronID e Likelihood

una preliminare versione dell'algoritmo di likelihood coerente con il framework di electron ID sta nella mia public folder, la parte algoritmica si chiama EgammaAnalysis_V7.tar.gz, mentre i plugin che li utilizzano stanno in HtoWWElectrons_V7.tar.gz, sempre nella mia public.
Con Emanuele abbiamo inserito il trait necessario alla lettura del ESSource direttamente con l'ObjectSelector.

A preliminary version of the likelihood algo is in my public folder

~govoni/public/EgammaAnalysis_V7.tar.gz

used in

~govoni/public/toWWElectrons_V7.tar.gz

Monday, July 9, 2007

How to set up the analysis machinery

Hi all!

with Emanuele, we tried to summarize the steps which are needed to setup the machinery for the analysis. Here is a (hopefully) working recipe:

scramv1 project CMSSW CMSSW_1_3_1_HLT5
cd CMSSW_1_3_1_HLT5/src
eval `scramv1 ru -csh`
project CMSSW

# extra tags for the trigger
cvs co -r V00-01-44 HLTrigger/Configuration
cvs co -r V00-00-20-09 L1Trigger/RegionalCaloTrigger
cvs co -r V01-00-14 L1Trigger/L1ExtraFromDigis
cvs co -r V00-00-38 RecoEgamma/EgammaHLTProducers
cvs co -r V00-01-10 Utilities/ReleaseScripts
cvs co -r V00-05-02-02 RecoMuon/L2MuonProducer
cvs co -r V00-00-53 HLTrigger/Egamma
cvs co -r V00-01-50 HLTrigger/Muon
cvs co -r V00-00-87 HLTrigger/btau
cvs co -r V00-00-49 HLTrigger/xchannel
cvs co -r V00-00-07-18 HLTrigger/JetMET
cvs co -r V01-03-26 HLTrigger/HLTcore
cvs co -r V00-01-44 HLTrigger/Configuration
cvs co -r V04-01-00-01 CalibTracker/SiStripConnectivity
cvs co -r V01-00-00-02 CommonTools/SiStripClusterization
cvs co -r V03-04-02 DataFormats/SiStripCluster
cvs co -r V03-05-02-01 DataFormats/SiStripCommon
cvs co -r V01-02-05-00 DataFormats/TrackerRecHit2D
cvs co -r V02-00-00-05 EventFilter/SiStripRawToDigi
cvs co -r V01-04-04-01 RecoLocalTracker/SiStripRecHitConverter
cvs co -r V05-00-40-01 RecoTracker/MeasurementDet
cvs co -r V01-02-01-00 RecoTracker/TransientTrackingRecHit


# bug fix in 131 for electron reconstruction:
cvs co -r CMSSW_1_3_1 DataFormats/EgammaCandidates
edit DataFormats/EgammaCandidates/src/PixelMatchGsfElectron.cc
and replace line 196 hadOverEm_*=newEnergy/superClusterEnergy_;
with hadOverEm_*=superClusterEnergy_/newEnergy


# fix for NAN in particle time of flight
cvs co -r CMSSW_1_3_1 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 V01-01 DataFormats/EgammaReco
cvs co -r V01-01 RecoEcal/EgammaCoreTools
cvs co -r V131_HLT5 PhysicsTools

# and finally download the code:
cvs co HtoWWElectrons


Ciao!
Chiara

Thursday, July 5, 2007

HWWEleAmbiguityResolve

Ciao,

con Pietro abbiamo committato un ambiguity resolver che ha passato il test.
Ciao!

sguardo "plug & play" al trigger

Ciao,

uno snapshot del trigger su eventi Z->e+e- rispetto a quello "offline"
che facevamo prima.
Ricordo che il trigger "offline" e' semplicemente:
1) singleEle, pT > 26.0 GeV oppure
2) doubleEle, pT > 14.5 GeV

--- Single || Double Electrons ---




--- Single Relaxed || Double Relaxed Electron ---
Electrons ---



--- Single || Double photon ---



--- Single Pho || Double Relaxed ---




Alessio, e' tutto tuo...
Abbiamo prodotto per ora solo Z->e+e- e W->e nu, che ci saranno utili per il tag & probe della
likelihood.
I files sono in:
/castor/cern.ch/user/e/emanuele/Data/ElectronID131HLT5/NoIso/

Friday, June 29, 2007

compilare HiggsAnalysisTools

Per riuscire a compilare HiggsAnalysisTools su lxplus a 64 bit (per sapere se un lxplus e' a 64 bit, ho fatto "uname -a" e ci ho visto scritti dei 64) ho avuto bisogno del root giusto:

export ROOTSYS=/afs/cern.ch/sw/lcg/external/root/5.15.08/slc4_amd64_gcc34/root

Thursday, June 28, 2007

variabili LAT 2

con le stesse configurazioni del post precedente (qui), ho cambiato l'algoritmo per calcolare etaLat e phiLat. Mentre prima anche il raggio di moliere era pesato per la direzione della posizione dei due cristalli piu' energetici, ora e' lasciato costante.

LAT

ETA LAT

PHI LAT


Le modifiche sono state committate ed un test di esempio per leggere le nuove variabili di LAT sta in HtoWWElectrons/ElectronIDAnalyzer, con nome testlat.

per leggere il trigger


  • In HtoWWTreeDumper abbiamo aggiunto due classi per propagare l'informazione del trigger fino al dumper, che abbiamo modificato perche' aggiunga le info al tree (prefix e suffix sono temporalei!)

  • Il config file da usare si chiama hToWWAnalysisTriggerPlugins.cfg NON contiene l'include a Reconstruction.cff per via di un conflitto

  • il modulo del treeDumper non e' nel cfg file dell'analisi, perche' va messo nell'endpath del trigger in modo da essere sicuri che venga girato dopo i trigger. per farlo:

    • scramv1 project CMSSW CMSSW_1_3_1_HLT5

    • cd CMSSW_1_3_1_HLT5/src

    • project CMSSW

    • cvs co -r V00-01-44 HLTrigger/Configuration

    • edit HLTrigger/Configuration/data/common/HLTEndpath.cff

    • aggiungere in fondo al file:

      include "HtoWWElectrons/HtoWWTreeDumper/data/treeDumper.cfi"
      replace treeDumper.nameFile = "default.root"
      endpath endl1hlt = {hltMSO & l1tTR & hltTR & myTimer & pts & treeDumper}




Wednesday, June 27, 2007

per usare Crab

Ciao,
ecco alcune istruzioni per usare CRAB una volta avuto/abilitato/settato il certificato
[io questo l'ho sempre fatto da SLC3]:

source /afs/cern.ch/cms/LCG/LCG-2/UI/cms_ui_env.csh
source /afs/cern.ch/cms/ccs/wm/scripts/Crab/crab.csh
voms-proxy-init -voms cms

dalla directory dentro CMSSW
eval `scramv1 runtime -csh`
crab -create -submit -cfg ilMioCrab.cfg --> per creare e sottomettere i job

crab -status --> per conoscere lo stato dei job
crab -getoutput --> per riprendersi l'output dei job

una cosa: se si creano le directory su castor con rfmkdir crab non
riconosce l'utente e dice di non avere i permessi per scriverci. Vanno
create (ad esempio) cosi':
edg-gridftp-mkdir gsiftp://castorgrid.cern.ch/castor/cern.ch/user/c/crovelli/LaMiaDirectory

Metto nella mia public alcuni esempi di cfg x crab:
/afs/cern.ch/user/c/crovelli/public/crabCfg

Ciao,
Chiara

Tuesday, June 26, 2007

variabili LAT

ho provato ad aggiungere il computo delle variabili lat al codice di analisi.
Ecco qualche primo plot:

il verde corrisponde a :
"/store/mc/2006/12/21/mc-physval-120-DiEle-Pt35/0000/50545055-4A98-DB11-AAF6-00093D139EE5.root"

la linea rossa corrisponde a :
"/store/mc/2006/12/21/mc-onsel-120_QCD_pt_30_50/0018/123194E5-B19A-DB11-835C-001731AF66FF.root"

le variabili etaLat e phiLat sono calcolate utilizzando la componente parallela o perpendicolare alla direzione del fascio del raggio trasverso.

Gli istogrammi sono normalizzati al proprio integrale.
Il numero di entry utilizzate e' di 5006 per i dielettroni, 210 per il sample QCD.


LAT

ETA LAT

PHI LAT

Saturday, June 23, 2007

Ricetta per la catena completa con i plugins

Tutta la catena completa e' ora funzionante con i plugin e il nuovo setup per la Likelihood.
La ricetta e':

1) create the working area
> scramv1 project -n HtoWW131 CMSSW CMSSW_1_3_1

2) setup environment
> cd HtoWW131/src/
> eval `scramv1 ru -csh`
> project CMSSW

3) checkout some cfg to patch
> cvs co RecoMET/METProducers/test/CaloCandidatesFromDigis.cfi
> cvs co Configuration/StandardSequences/data/Reconstruction.cff
> cp ~emanuele/public/patches/1_3_1/CaloCandidatesFromDigis.cfi RecoMET/METProducers/test/CaloCandidatesFromDigis.cfi
> cp ~emanuele/public/patches/1_3_1/Reconstruction.cff Configuration/StandardSequences/data/Reconstruction.cff

4) setup CVSROOT to Pietro repository and checkout the package:
> source ~emanuele/public/cvs_setup_htoww.csh
> cvs co -P HtoWWElectrons
> cvs co -r V01-00 PhysicsTools
> cvs co -r V01-00 DataFormats
> cvs co -r V01-00 RecoEcal

6) build cmsRun
scramv1 b

7) run it:
> cmsRun HtoWWElectrons/HtoWWTreeDumper/test/hToWWAnalysisPlugins.cfg

this will produce the tree "default.root" in the current dir (and also some monitoring ROOT files with histograms)

8) If you want to do an extensive production use "run.pl" tool:
http://welectrons.blogspot.com/2007/05/script-to-do-batch-production.html

---> ElectronID: in the hToWWAnalysisPlugins.cfg the electron ID by cuts is OFF.
To turn on it, just change:

InputTag src = ambSolving
# InputTag src = eleIdentifying

in

# InputTag src = ambSolving
InputTag src = eleIdentifying

in the HtoWWEleCloner module. This will pass to the dumper the cut-ID electron
candidate collection (NB: in this way the likelihood is very biased)

This is preliminary. The aim is to have the mapped electron collection
with different algo (cut/LH) and purities.



emanuele & pietro

Friday, June 22, 2007

Likelihood nel framework "ESetup"

Per ora gira, ma secondo un primo test mi pare che ci sia ancora qualcosina che non va (un po' di -1 che non ci dovrebbero essere)
Per girarlo (per ora abbiamo fatto un analyzer standalone dalla nostra analisi):

cvs co HtoWWElectrons/HtoWWLHRecord
cvs co HtoWWElectrons/HtoWWLHESSource
cvs co HtoWWElectrons/HtoWWLHAlgo
cvs co HtoWWElectrons/ElectronIDAnalyzer

scramv1 b

cmsRun HtoWWElectrons/ElectronIDAnalyzer/test/electronid.cfg

Monday, June 18, 2007

plugins

Ho aggiunto in /HtoWWElectrons/HtoWWEleProducer/src un cloner HtoWWEleCloner che clona GSF electrons in candidates, da utilizzare nella 131 in attesa di quello ufficiale della 15X.

In /HtoWWElectrons/HtoWWEleProducer/plugins ci sono bugfix per HWWEleId e HWWEleAmbiguityResolve.

In /HtoWWElectrons/HtoWWTreeDumper/test c'e' testPluginDumper.cfg per provare a lanciare la catenza di analisi completa con i plugin.

Friday, June 8, 2007

Primo sguardo alla catena completa

Ciao,

1) con il tag:
> cvs co -r edm-09062007 HiggsAnalysisTools
si puo' girare la catena completa dell'analisi.
Per ora electron-ID e tracker- e hcal- isolation sono fatti qui per debug
(sopratutto, l'isolamento e' ancora dubbio).

Con il set di tagli "storici" su un campione H(160 GeV):

*****************************************
* EVENT EFFICIENCIES
*****************************************
* MCtruth: 0.110 +/- 0.001
* trigger: 0.782 +/- 0.005
* nRecoEle: 0.775 +/- 0.006
* twoGoodRec: 0.876 +/- 0.005
* eleID: 0.665 +/- 0.008
* trackerIsol: 0.888 +/- 0.007
* hcalIsol: 1.000 +/- 0.000
* jetVeto: 0.809 +/- 0.009
* maxPtEle: 0.505 +/- 0.013
* minPtEle: 0.929 +/- 0.009
* MET: 0.708 +/- 0.017
* deltaPhi: 0.821 +/- 0.017
* eleInvMass: 0.620 +/- 0.024
* final: 0.043 +/- 0.003
*******************************************

dove MC-truth e' la frazione di eventi con H->2e2nu
(il MC contiene 2e2nu + 2mu2nu + 1e1nu1mu1nu)
---> final = eventi(sel)/eventi(generati 2e2nu)

E questo e' il dettaglio dell'electron-ID (N.B. l'eff dell'evento
e' quella richiedendo che ambedue gli elettroni ricostruiti siano
identificati).

*****************************************
* ELE-ID EFFICIENCIES
*****************************************
* hOverE: 0.964 +/- 0.002
* s9s25: 0.970 +/- 0.002
* deta: 0.974 +/- 0.002
* dphiIn: 0.990 +/- 0.001
* dphiOut: 0.956 +/- 0.003
* covEtaEta: 0.950 +/- 0.003
* eOverPout: 0.995 +/- 0.001
* Fisher: 1.000 +/- 0.000 <--- spento
* finalEleID: 0.815 +/- 0.005
*****************************************

------------------------------------------------------------------
2) Nei config files ci sono anche i tagli sul Fisher con i quali si ha la stessa efficienza sul segnale (classe per classe). Per accenderlo:

> nano electronIDSwitches.txt

cambiare gli switch:
s9s25 1
covEtaEta 1
Fisher 0

in:
s9s25 0
covEtaEta 0
Fisher 1

non abbiamo ancora prodotto campioni di W+jets e Z+jets a sufficienza.
Su campioni di puri elettroni (pt=35 GeV)
con questi tagli a parita' di efficienza sul segnale
(~92% su ECAL barrel e ~87% su ECAL endcap)
vs. puri jets (pt=30-50 GeV)
si ottiene una riduzione del ~25% del fake rate
(da ~4% a ~3% su entrambi barrel e endcap).

----------------------------------------------------------------------
3) Nei config files, allo stesso modo, ci sono i tagli sulla Likelihood
con cui si ha la stessa efficienza sul segnale (classe per classe).
Si accende analogamente a prima:

> nano electronIDSwitches.txt

s9s25 0
....
Fisher 0
Likelihood 1

A parita' di efficienza sul segnale della selezione precedente
si ottiene una riduzione di ~60% del fake rate (??? sistematiche ???)
rispetto ai tagli standard (~50% di quello con i tagli col Fisher)
(da 4% a ~ 1.6%)




P.S. I campioni sono ancora statisticamente limitati

P.P.S La dipendenza delle PDF (ma anche delle eff dei tagli) dall'energia
e' da indagare (ad un primo sguardo, le PDF, compresa la cluster shape,
sembrano ~indipendenti da E tranne che per E<= 10 GeV)

Thursday, June 7, 2007

developing CMSSW sw

pagina del wiki dove si spiega come fare sw developement in CMSSW, fra le altre cose si puo' committare codice personale nel CVS di CMSSW.

Developing CMSSW Software

Wednesday, June 6, 2007

primi test dei plugin

ho aggiunto in /HtoWWElectrons/HtoWWEleProducer/test i config file:

testAmbResolver.cfg <-- test dell'ambiguity resolver
testEleId.cfg <-- test dell'electron ID
testChain.cfg <-- test dei due plugin concatenati

il primo dei tre gira, il secondo ha un crash dopo pochi eventi, il terzo gira.
I test sono soltanto tecnici, non di fatto.
L'ultimo config file contiene anche il treeDumper.
Nel caso in cui il treeDumper non venga incluso, non ci sono problemi; se viene incluso, c'e' un crash.

Lista di tags e nuova ricetta

Ciao, questa e' la nuova ricetta per girare il nostro pacchetto:

1) create the working area
> scramv1 project CMSSW CMSSW_1_3_1

2) setup environment
> cd CMSSW_1_3_1/src/
> eval `scramv1 ru -csh`
> project CMSSW

3) checkout some cfg to patch
> cvs co RecoMET/METProducers/test/CaloCandidatesFromDigis.cfi
> cvs co Configuration/StandardSequences/data/Reconstruction.cff
> cp ~emanuele/public/patches/1_3_1/CaloCandidatesFromDigis.cfi RecoMET/METProducers/test/CaloCandidatesFromDigis.cfi
> cp ~emanuele/public/patches/1_3_1/Reconstruction.cff Configuration/StandardSequences/data/Reconstruction.cff

4) setup CVSROOT to Pietro repository and checkout the package:
> source ~emanuele/public/cvs_setup_htoww.csh
> cvs co -r V01-00 HtoWWElectrons
> cvs co -r V01-00 DataFormats
> cvs co -r V01-00 RecoEcal

6) build cmsRun
scramv1 b

7) run it:
> cmsRun HtoWWElectrons/HtoWWTreeDumper/test/hToWWAnalysis.cfg

this will produce the tree "default.root" in the current dir (and also some monitoring ROOT files with histograms)

8) If you want to do an extensive production use "run.pl" tool:
http://welectrons.blogspot.com/2007/05/script-to-do-batch-production.html

DataFormats and RecoEcal nel CVS di Pietro

Ciao,

ho aggiunto al CVS di Pietro i pacchetti

DataFormats
RecoEcal

questi corrispondono ai relativi pacchetti di CMSSW_1_3_1,
ma in cui ho modificato il file in cui c'e' l'algoritmo di Cluster Shape
per aggiungere le nuove variabili
(RecoEcal/EgammaCoreTools/src/ClusterShapeAlgo.cc)
poi ho anche modificato
DataFormats/EgammaReco/src/ClusterShape.cc
per rendere accessibili le variabili dall'oggetto clusterShape.

gia' che c'ero ho anche committato il bug fix di Chiara in
DataFormats/EgammaCandidates/src/PixelMatchGsfElectron.cc


emanuele

Monday, June 4, 2007

isolation in CMSSW

generic isolation in the reference manual

annunciato cosi':

according to a discussion had with all the people who are contributing
with isolation tools development, I made the following rearrangement of
Francesco Fabozzi's Generic Isolation module:

* the isolation algorithm(s) with no dependency
on Framework are in the new package:

PhysicsTools/IsolationUtils

* the isolation generic producer module(s)
goes in the new package:

PhysicsTools/IsolationAlgos

In this way, it will be possible to add Reflex dictionaries to
algorithms in PhysicsTools/IsolationUtils for FWLite use of isolation.

The old package PhysicsTools/LeptonIsolation will be removed in next
releases (nightly + next 1.5.0).

plugin di analisi

ho committato in /HtoWWElectrons/HtoWWEleProducer/ la cartella plugins, che contiene un primo tentativo di traduzione di passaggi dell'analisi in plugin di CMSSW:

HWWEleAmbiguityResolve.cc
HWWEleAmbiguityResolve.h
HWWEleId.cc
HWWEleId.h
PluginTemplate.cc
PluginTemplate.h
SealModule.cc

La terza coppia e' il modello che ho utilizzato per fare gli altri due.

Sunday, June 3, 2007

isolamento adronico

Ciao,

ho committato alcuni bug fix x le correzioni all'energia degli elettroni
+ una prima versione dell'isolamento adronico (vorrei prendere i cluster in hcal ma non
ci riesco, per ora e' fatta con i rechits). inoltre ho messo alcune variabili utili x studiare
i tagli di isolamento nel tree.

Per usare il tutto si segue la ricetta postata da Emanuele.
In piu':
- per usare le variabili di shape meglio prendere la v02 dal repository di Emanuele
- bug fix per H/E: bisogna modificare
DataFormats/EgammaCandidates/src/PixelMatchGsfElectron.cc
sostituendo
hadOverEm_ *=superClusterEnergy_/newEnergy
alla line 196

Ciao,
Chiara

Friday, June 1, 2007

Likelihood per l'electron ID

Ciao a tutti,

ho aggiunto un modulo che calcola la likelihood
per l'electron-ID.
E' nel tag edm-01062007 di HtoWWElectrons.

Sta tutto in HtoWWEleProducer.
La classe che la costruisce e' GsfLHSelector.


Pensieri sparsi in liberta':

1) La likelihood e' fatta con le seguenti variabili:
deltaPhi @ Calo
deltaEta @ Calo
E/P_out
H/E
cluster shape (discriminante di Fisher)

2) Il discriminante di Fisher e' fatto con alcune variabili di cluster
shape, scelte per essere sotto controllo e con una correlazione < 30%
tra di loro. Questo permette di includere gran parte delle
informazioni relative alla cluster shape che non potrebbero essere
usate tutte insieme nella likelihood fattorizzata (a meno di fare PDF
n-dim. brrr...)

I coefficienti del discriminante di Fisher sono stati calcolati
separatamente per barrel e endcap.
La formula e' la seguente:

---> EB: clusterShapeF = 42.0238-3.38943*s9s25-794.092*sigmaEtaEta-15.3449*lat-31.1032*a20
http://emanuele.web.cern.ch/emanuele/ElectronID/linearFisher.eps

---> EE: clusterShapeF = 27.2967+2.97453*s9s25-169.219*sigmaEtaEta-17.0445*lat-24.8542*a20
http://emanuele.web.cern.ch/emanuele/ElectronID/linearFisherEE.eps

i coefficienti sono calcolati per
sig: eventi e+e-, pt=35 GeV
bkg: qcd jets, pt=30-50 GeV

(nota: studiare l'andamento in energia. Non dovrebbero dipendere molto,
perche' le variabili sono tutti rapporti, vedi:
http://emanuele.web.cern.ch/emanuele/ElectronID/electronID_allclasses.ps )


3) Si fanno due likelihood separate, per EB e EE

4) La shape delle pdf di segnale e' dipendente dalla classe ("GsfClass")
dell'elettrone. Quindi le PDF del segnale sono splittate per classe.
Le PDF del fondo non sono splittate.
(Nota: le frazioni di classe si possono giudicare dal MC,
per ora ho messo 1. (sbagliato))

5) Le pdf sono istogrammi letti da 2 ROOT files (uno per EB, uno per EE)

6) Le frazioni (probabilita' a priori) delle varie specie (ipotesi di
ele, jet @ pt=35, pt=50...) sono da settare (per ora ho messo 1.)
dalle sezioni d'urto?

7) i ROOT files con le PDF sono in:
~emanuele/public/EBpdfs.root
~emanuele/public/EEpdfs.root

da mettere in HtoWWElectrons/HtoWWEleProducer/data/
(dove metterle nel futuro? non si puo' committare un ROOT file in CVS
di CMSSW)

Nota: il binning non e' ottimale

8) Un ulteriore passo e' quello di PDF parametriche.
Dovrebbe essere semplice implementare una nuova classe GsfParametricPdf
da sostituire a GsfPdf in GsfLikelihood


9) Il likelihood ratio L(ele)/L(tot) e' calcolato e messo nel tree-ridotto
dal modulo CmsEleIDTreeFiller.cc



emanuele

Wednesday, May 16, 2007

TFile Service

TFileService is a CMSSW Framework Service that allows one to create histograms in multiple modules and store those histograms in the same ROOT file.
link al Twiki

Monday, May 14, 2007

dumping new clusterShape variables: recipe

Ciao,

I added some more Cluster Shape variable in the default tree
in the Ecal block.
(in HtoWWElectrons/HtoWWTreeDumper/src/CmsRecoTreeFiller.cc)

in order to compile there are some steps to follow:

(1) setup the private CVS:
> source ~/public/cvs_setup_emanuele.csh
(replacing "emanuele@lxplus..." with "@lxplus..."

(2) add the extra tags:
> cvs co -r V01 DataFormats/EgammaReco
> cvs co -r V01 RecoEcal/EgammaCoreTools
> cvs co -r V01 RecoEcal/EgammaClusterProducers

(3) update the tree dumper:
> cvs co -r edm-14052007 HtoWWElectrons/HtoWWTreeDumper

this should work...


emanuele

Friday, May 11, 2007

nuovo commit del tester dei getti e del relativo test.cfg, per un bugfix

Tuesday, May 8, 2007

nuovo commit per le sequenze dei getti, introdotto il trivialmatcher per fare il match in DR con la verita' montecarlo

pacchetto per analizzare i tree

Ciao,

nel mio cvs temporaneo (che si setta in modo analogo a quello di Pietro con l'indirizzo:
"/afs/cern.ch/user/e/emanuele/scratch0/cvsroot"
vedi le istruzioni in:
http://welectrons.blogspot.com/2007/04/repository-temporaneo.html)

c'e' il pacchetto "HiggsAnalysisTools".
E' basato sul codice di analisi di Chiara:
~crovelli/public/4Emanuele/CutAnaHiggs_2e2nu.cpp
e fa la tabellina delle efficienze e qualche istogramma.

c'e' anche un utilissimo README ;)
Magari se volete possiamo cominciare a riscriverlo in FWLite...
Ciao,

chiara & emanuele

Wednesday, May 2, 2007

analisi dei getti

Ho aggiunto al repository il pacchetto HtoWWJetProducer che contiene un producer "dummy" per girare sui getti, che compila e non e' mai stato utilizzato.
Inoltre, in HtoWWJetProducer/data/jetProducerSequence.cfi c'e' un config file per clonare i getti generati (MC) e ricostruiti in Candidate, da utilizzare per l'analisi globale.

Recipe to run HtoWWElectrons reconstruction

Hi all,

this is a recipe to get the reconstruction from digis to a ROOT tree with high-level quantities:

1) create the working area
> scramv1 project CMSSW CMSSW_1_3_1

2) setup environment
> cd CMSSW_1_3_1/src/
> eval `scramv1 ru -csh`
> project CMSSW

3) checkout some cfg to patch
> cvs co RecoMET/METProducers/test/CaloCandidatesFromDigis.cfi
> cvs co Configuration/StandardSequences/data/Reconstruction.cff
> cp ~emanuele/public/patches/1_3_1/CaloCandidatesFromDigis.cfi RecoMET/METProducers/test/CaloCandidatesFromDigis.cfi
> cp ~emanuele/public/patches/1_3_1/Reconstruction.cff Configuration/StandardSequences/data/Reconstruction.cff

4) setup CVSROOT to Pietro repository and checkout the package:
> source ~emanuele/public/cvs_setup_htoww.csh
> cvs co HtoWWElectrons

6) build cmsRun
scramv1 b

7) run it:
> cmsRun HtoWWElectrons/HtoWWTreeDumper/test/hToWWAnalysis.cfg

this will produce the tree "default.root" in the current dir (and also some monitoring ROOT files with histograms)

8) If you want to do an extensive production use "run.pl" tool:
http://welectrons.blogspot.com/2007/05/script-to-do-batch-production.html

Ciao

emanuele

Tuesday, May 1, 2007

script to do batch production

Ciao,

the script: "HtoWWTreeDumper/scripts/run.pl"
in the tag: "HtoWWTreeDumper edm-01052007"
can be used to create cfg files and submit jobs to batch queue starting from the output of DBS discovery page.

Short README:

1) go to: http://cmsdbs.cern.ch/discovery/
choose the dataset you want. You will get a list of files on castor.
2) copy it on a plain text file. Ex: higgsDatasets.txt:
/store/mc/2006/12/21/mc-onsel-120_qqH160_WW/0000/1AF3299E-63A8-DB11-A649-00E08129008B.root
/store/mc/2006/12/21/mc-onsel-120_qqH160_WW/0000/40DB08AB-15A7-DB11-8BE7-0013D3DE2633.root
...
3) run the script on it:
HtoWWTreeDumper/scripts/run.pl -d datasets/qqH160.txt -c HtoWWTreeDumper/test/hToWWAnalysis.cfg -w /afs/cern.ch/user/e/emanuele/work/HtoWWAnalysis/src/ -g 2 -b qqH160 -q 1nh -s ~/scratch0/Production

this will submit jobs with 2 collections/job, writing:

a) cfg files in ~/scratch0/Production/conf
b) script files in ~/scratch0/Production/script
c) log files in ~/scratch0/Production/log
d) root files with tree in ~/scratch0/Production/output

try run.pl -h for the options.
Enjoy ;)


emanuele

Added met correction

Ciao,

I added the met corrections (type1 - corMetType1Icone5).
still to check the effect.
They are in the tag:
"HtoWWMetProducer edm-01052007"


Ciao,

emanuele

Sunday, April 29, 2007

New tag edm-29042007 for the package

Hi all,

I made a new tag for the whole HtoWWElectrons package:
HtoWWElectrons edm-29042007
in this version I removed from the treeDumper the new variables for the cluster
shape which are not on the official RecoEcal, so this should compile and run.

I also created the subdirs "data" for "HtoWWEleProducer", "HtoWWMetProducer",
"HtoWWTreeDumper" in which the specific sequences are created.
The test cfg file should look more modular:

HtoWWTreeDumper/test/hToWWAnalysis.cfg

Ciao ciao

emanuele

Tuesday, April 24, 2007

prima versione del Tree Dumper

Ciao a tutti,

ho creato un tag per il pacchetto
"HtoWWTreeDumper V01-01"

in cui c'e' la prima versione del dumpatore di tree.
In questa versione sono funzionanti
1) dump della cinematica dei candidati
2) dump di alcuni attributi di Ecal
3) dump dell'albero MC truth
4) MC match tra candidati ricostruiti e verita' MC

4) e' ancora preliminare, usa il modulo "MCTruthDeltaRMatcher", che, parlando con Luca,
ha ancora qualche bug fix da fare.

Per l'uso (per esempio per aggiungere i mu, con i loro attributi), ho aggiunto un README in:
"HtoWWTreeDumper/doc/README"
e un esemio di tree in uscita e' in:
"/afs/cern.ch/user/e/emanuele/public/analysisNtuple.root"

sicuramente avro' dimenticato qualcosa, se lo provate ditemi...
Ciao!

emanuele

Sunday, April 8, 2007

HtoWWMetProducer: new tag edm-08042007

1) Il producer produce, oltre alle MET collections, anche due CandidateCollections, una per Gen, una per Reco

2) l'instance name del prodotto e' stabilita da parametro

3) nel POOL output vengono tenuti solo i prodotti del processo "HtoWWMet"

Friday, April 6, 2007

HtoWWMetProducer: new tag edm-06042007

1) la MET di generatore viene scritta nell'event0.
Sono escluse le particelle invisibili:
come in "RecoMET/METProducers/data/GenMET.cfi":

vstring excludeList = {"nu_e", "nu_mu", "nu_tau", "mu-",
"~chi_10",
"~nu_eR", "~nu_muR", "~nu_tauR",
"Graviton", "~Gravitino",
"nu_Re", "nu_Rmu", "nu_Rtau",
"nu*_e0", "Graviton*"

2) aggiunti nuovi monitoring histograms (il range di ET significance e' da aggiustare)

http://emanuele.web.cern.ch/emanuele/Analysis/HtoWW/MET/distrRecoMET_MET.eps
http://emanuele.web.cern.ch/emanuele/Analysis/HtoWW/MET/distrGenMET_MET.eps

http://emanuele.web.cern.ch/emanuele/Analysis/HtoWW/MET/distrRecoMET_sig.eps
http://emanuele.web.cern.ch/emanuele/Analysis/HtoWW/MET/distrGenMET_sig.eps

3)
Le correzioni alla MET sono ancora da aggiungere

Wednesday, April 4, 2007

HtoWWMetProducer: tag edm-04042006

Ciao,

e' una prima versione del modulo che compila e gira senza crashare su una collezione MC.
Da verificare l'output.

Prossimi step:

1) scrivere nell'evento la MET di generatore
2) aggiungere le MET corrections
3) aggiungere i monitoring histograms per le MET corrections

emanuele

Tuesday, April 3, 2007

Ciao,
ho committato un primo schema del filtro per elettroni
nel pacchetto HtoWWEleProducer

Chiara

repository temporaneo

Cari tutti,

insieme ad Emanuele ho creato un repository CVS per l'attivita' del primo periodo, vale a dire fintanto che non abbiamo deciso esattamente dove e come mettere le varie cose in CMSSW.
Per poterlo utilizzare, e' sufficiente che impostiate da lxplus la seguente variabile d'ambiente:

setenv CVSROOT "VOSTRO_USERNAME@lxplus.cern.ch:/afs/cern.ch/user/g/govoni/cvsroot" # per tcsh
export CVSROOT=VOSTRO_UTENTE@lxplus.cern.ch:/afs/cern.ch/user/g/govoni/cvsroot # per bash

e poi fare

cvs co HtoWWElectrons

nella cartella "src" del CMSSW.
La struttura e' pensata per contenere diversi sub-package, ciascuno per i diversi sotto-task che ci servono.

PURTROPPO c'e' un problema AFS che non riesco a risolvere, per cui pare che per ora solamente Emanuele ed io riusciamo a committare. Ora cerco una scorciatoia, mentre aspetto la risposta dell'helpdesk.
Altrimenti, si puo' fare che uno di voi crea il repository sulla propria home e magari ci va meglio (non sto a spiegare i dettagli).

Avete suggerimenti? ciao,
p