Difference: CASTOROpenData2010 (1 vs. 11)

Revision 112019-08-09 - HansVanHaevermaet

Line: 1 to 1
 
META TOPICPARENT name="CMS.CASTORDataPreservation"

Analysis recipe to use CASTOR objects with 2010 CMS OpenData

Line: 26 to 26
 

Installation and setup

Before you can analyse data taken with the CASTOR calorimeter you'll need install a few extra packages into the CMSSW software.
Changed:
<
<
1) Install the CERN OpenData VM for 2010 data, for instructions see here: http://opendata.cern.ch/docs/cms-virtual-machine-2010. The recipe below is validated in version 'CMS-OpenData-1.1.2'.
>
>
1) Install the CERN OpenData VM for 2010 data, for instructions see here: http://opendata.cern.ch/docs/cms-virtual-machine-2010. The recipe below is validated in version 'CMS-OpenData-1.1.2'.
 2) Start up your VM and open the 'CMS shell'.
3) Install the correct version of CMSSW and activate it:
Line: 40 to 40
 tar -xvf Commissioning10_additional_packages.tar scram b
Changed:
<
<
Note that following directories should appear in the CMSSW_4_2_8_lowpupatch1/src directory: RecoLocalCalo, RecoJets, data. If this is not the case then something went wrong when downloading/extracting the packages.
>
>
Note that following directories should appear in the CMSSW_4_2_8_lowpupatch1/src directory: RecoLocalCalo, RecoJets, data. If this is not the case then something went wrong when downloading/extracting the packages.
 

Usage

Once the above steps are executed you are basically ready to analyse CASTOR objects. Here we will specify what configuration snippets you will need to apply inside your typical 'demoanalyzer_cfg.py' file when you are coding an analyser in CMSSW.
Changed:
<
<
First important step is to include a 'global tag' into your configuration file. To do this, please follow the instructions on this CMS OpenData page: http://opendata.cern.ch/docs/cms-guide-for-condition-database and follow the steps in section 'For 2010 collision data' to include the 'FT_R_42_V10A::All' global tag when you run on data.
>
>
First important step is to include a 'global tag' into your configuration file. To do this, please follow the instructions on this CMS OpenData page: http://opendata.cern.ch/docs/cms-guide-for-condition-database and follow the steps in section 'For 2010 collision data' to include the 'FT_R_42_V10A::All' global tag when you run on data.
 When you want to run on a Monte Carlo simulation sample, please make sure to follow the proper steps to include the 'START42_V17B::All' global tag in the configuration file.

Running on data

Line: 118 to 118
 The demo code applies first some 'online' selections in the python configuration file (physics declared, remove beam background, remove CASTOR invalid data, trigger selection) and in the C++ class a further offline event selection is included that selects nondiffractive minimum bias events by requiring: exactly one good primary vertex, HF AND activity, and CASTOR activity. This event selection is the same as applied in the FWD-11-003 analysis (arXiv:1302.2394).

Validation plots

Changed:
<
<
After running the demo analyser on the 7 TeV data samples you can plot the histograms stored in the output ROOT files. In this attachment you can find validation plots, if you get the same results your framework is working as expected.
>
>
After running the demo analyser on the 7 TeV data samples you can plot the histograms stored in the output ROOT files. In this attachment you can find validation plots, if you get the same results your framework is working as expected.
 

Information valid for all 2010 data

Examples to access all objects and their properties

Line: 204 to 204
  }
Changed:
<
<

Jet calibration factors

Below you can find a piece of code to be used when calibrating jets in CASTOR that are identified as coming from a hadronic shower in the calorimeter.
>
>

Jet calibration factors for Commissioning10 data

Below you can find the formulas to be used when calibrating jets in CASTOR that are identified as coming from a hadronic shower in the calorimeter.
 The important functions are:
// for jets in sector 5 for Commissioning10 data 
Line: 220 to 220
 Ecal = myJETenergy*(1.8 + 0.0037*log(1 + myJETenergy)); // data or MC (SL) Ecal = myJETenergy*(1.5 + 0.0024*log(1 + myJETenergy)); // MC (FS)
Changed:
<
<
The functions marked to be used with Shower Library (SL) need to be applied to data and to MC samples using SL, such as the official public ones. Functions marked with Full Simulation (FS) can be used with special MC samples simulated at displaced sensor locations. These latter samples are not public (for the moment).
>
>
The functions marked to be used with Shower Library (SL) need to be applied to data and to MC samples using SL, such as the official public ones. Functions marked with Full Simulation (FS) can only be used with special MC samples simulated at displaced sensor locations. These latter samples are not public (for the moment).
 

Full code as in the demo analyser that first identifies electromagnetic or hadronic showers using the JetID variables, and then properly calibrates the hadronic-like jets:
Line: 279 to 279
  double Ecal = 0.0; if (basicjet.phi() > 4*(myPI/8) && basicjet.phi() < 5*(myPI/8)) { // include different sectors 5 for Commissioning10 data were first channels are removed
Changed:
<
<
/*if ( iEvent.eventAuxiliary().isRealData())*/ Ecal = myJETenergy*(1.3 + 0.23*log(-149 + myJETenergy)); // data (SL) //if (iEvent.eventAuxiliary().isRealData()) Ecal = myJETenergy*(0.9 + 0.25*log(-149 + myJETenergy)); // MC (FS)
>
>
Ecal = myJETenergy*(1.3 + 0.23*log(-149 + myJETenergy)); // data (SL)
  } else if (basicjet.phi() > 5*(myPI/8) && basicjet.phi() < 6*(myPI/8)) { // include different sectors 6 for Commissioning10 data were first channels are removed
Changed:
<
<
/*if ( iEvent.eventAuxiliary().isRealData())*/ Ecal = myJETenergy*(1.4 + 0.21*log(-149 + myJETenergy)); // data (SL) //if (iEvent.eventAuxiliary().isRealData()) Ecal = myJETenergy*(-5.8 + 1.3*log(144 + myJETenergy)); // MC (FS)
>
>
Ecal = myJETenergy*(1.4 + 0.21*log(-149 + myJETenergy)); // data (SL)
  } else {
Changed:
<
<
/*if ( iEvent.eventAuxiliary().isRealData())*/ Ecal = myJETenergy*(1.8 + 0.0037*log(1 + myJETenergy)); // data (SL) good sectors //if (iEvent.eventAuxiliary().isRealData()) Ecal = myJETenergy*(1.5 + 0.0024*log(1 + myJETenergy)); // MC (FS) good sectors

>
>
Ecal = myJETenergy*(1.8 + 0.0037*log(1 + myJETenergy)); // data (SL) good sectors
  } hJet_calenergy->Fill(Ecal); // fill with calibrated HAD jet } else {

Revision 102019-08-07 - HansVanHaevermaet

Line: 1 to 1
 
META TOPICPARENT name="CMS.CASTORDataPreservation"

Analysis recipe to use CASTOR objects with 2010 CMS OpenData

Line: 7 to 7
 

Commissioning10 data period

Introduction

This section is valid for 900 GeV and 7 TeV datasets taken during the Commissioning10 period in 2010.
Changed:
<
<
More specifically for data:
>
>
More specifically for data (OpenData records here):
 
/MinimumBias/Commissioning10-07JunReReco_900GeV/RECO
/MinimumBias/Commissioning10-May19ReReco-v1/RECO
Line: 22 to 22
 /MinBias_Tune4C_900GeV_pythia8_cff_py_GEN_SIM_START311_V2_Dec11_v2/hvanhaev-MinBias_Tune4C_900GeV_pythia8_cff_py_Step3_START42_V11_Dec11_v2-04745fc182f9123f750cb5f7764a36c5/USER /MinBias_Tune4C_7TeV_pythia8_cff_py_GEN_SIM_START311_V2_Dec11_v1/hvanhaev-MinBias_Tune4C_7TeV_pythia8_cff_py_Step3_START42_V11_Dec11_v1-86bcdbe9c73956c342e477ba771c41c7/USER
Added:
>
>
The OpenData records can be found in this list
 

Installation and setup

Before you can analyse data taken with the CASTOR calorimeter you'll need install a few extra packages into the CMSSW software.

Revision 92019-08-06 - HansVanHaevermaet

Line: 1 to 1
 
META TOPICPARENT name="CMS.CASTORDataPreservation"

Analysis recipe to use CASTOR objects with 2010 CMS OpenData

Line: 117 to 117
 The demo code applies first some 'online' selections in the python configuration file (physics declared, remove beam background, remove CASTOR invalid data, trigger selection) and in the C++ class a further offline event selection is included that selects nondiffractive minimum bias events by requiring: exactly one good primary vertex, HF AND activity, and CASTOR activity. This event selection is the same as applied in the FWD-11-003 analysis (arXiv:1302.2394).

Validation plots

Changed:
<
<
After running the demo analyser you can plot the histograms stored in the output ROOT files. In this attachment you can find validation plots, if you get the same results your framework is working as expected.
>
>
After running the demo analyser on the 7 TeV data samples you can plot the histograms stored in the output ROOT files. In this attachment you can find validation plots, if you get the same results your framework is working as expected.
 

Information valid for all 2010 data

Examples to access all objects and their properties

Revision 82019-05-16 - HansVanHaevermaet

Line: 1 to 1
 
META TOPICPARENT name="CMS.CASTORDataPreservation"

Analysis recipe to use CASTOR objects with 2010 CMS OpenData

Line: 35 to 35
  4) When in CMSSW_4_2_8_lowpupatch1/src directory, download the additional necessary packages and compile them:
Changed:
<
<
wget https://twiki.cern.ch/twiki/pub/CMSPublic/CASTOROpenData2010/Commissioning10_additional_packages.tar
>
>
wget --no-check-certificate https://twiki.cern.ch/twiki/pub/CMSPublic/CASTOROpenData2010/Commissioning10_additional_packages.tar
 tar -xvf Commissioning10_additional_packages.tar scram b
Line: 44 to 44
 

Usage

Once the above steps are executed you are basically ready to analyse CASTOR objects. Here we will specify what configuration snippets you will need to apply inside your typical 'demoanalyzer_cfg.py' file when you are coding an analyser in CMSSW.
Changed:
<
<
First important step is to include a 'global tag' into your configuration file. To do this, please follow the instructions on this CMS OpenData page: http://opendata.cern.ch/docs/cms-guide-for-condition-database and follow the steps in section 'For 2010 collision data' to include the 'FT_R_42_V10A::All' global tag.
>
>
First important step is to include a 'global tag' into your configuration file. To do this, please follow the instructions on this CMS OpenData page: http://opendata.cern.ch/docs/cms-guide-for-condition-database and follow the steps in section 'For 2010 collision data' to include the 'FT_R_42_V10A::All' global tag when you run on data. When you want to run on a Monte Carlo simulation sample, please make sure to follow the proper steps to include the 'START42_V17B::All' global tag in the configuration file.
 

Running on data

1) Add the following lines to the cfg file:
Line: 103 to 104
 

DemoAnalyzer class

A demo analyser C++ class can be downloaded by:
Changed:
<
<
wget https://twiki.cern.ch/twiki/pub/CMSPublic/CASTOROpenData2010/DemoAnalyzer.cc
>
>
wget --no-check-certificate https://twiki.cern.ch/twiki/pub/CMSPublic/CASTOROpenData2010/DemoAnalyzer.cc
  It contains code to read out all objects and make basic validation histograms. You can run it with the following python configuration files:
Changed:
<
<
wget https://twiki.cern.ch/twiki/pub/CMSPublic/CASTOROpenData2010/demoanalyzer_cfg_Commissioning10.py.txt wget https://twiki.cern.ch/twiki/pub/CMSPublic/CASTOROpenData2010/demoanalyzer_cfg_Comm10MC.py.txt
>
>
wget --no-check-certificate https://twiki.cern.ch/twiki/pub/CMSPublic/CASTOROpenData2010/demoanalyzer_cfg_Commissioning10.py.txt wget --no-check-certificate https://twiki.cern.ch/twiki/pub/CMSPublic/CASTOROpenData2010/demoanalyzer_cfg_Comm10MC.py.txt
  The first one is used with data, the second with MC samples. Before using remove the .txt file extension.

Revision 72019-04-02 - HansVanHaevermaet

Line: 1 to 1
 
META TOPICPARENT name="CMS.CASTORDataPreservation"

Analysis recipe to use CASTOR objects with 2010 CMS OpenData

Line: 25 to 25
 

Installation and setup

Before you can analyse data taken with the CASTOR calorimeter you'll need install a few extra packages into the CMSSW software.
Changed:
<
<
1) Install the CERN OpenData VM for 2010 data, for instructions see here: http://opendata.cern.ch/docs/cms-virtual-machine-2010. The recipe below are validated in version 'CMS-OpenData-1.1.2'.
>
>
1) Install the CERN OpenData VM for 2010 data, for instructions see here: http://opendata.cern.ch/docs/cms-virtual-machine-2010. The recipe below is validated in version 'CMS-OpenData-1.1.2'.
 2) Start up your VM and open the 'CMS shell'.
3) Install the correct version of CMSSW and activate it:
Line: 35 to 35
  4) When in CMSSW_4_2_8_lowpupatch1/src directory, download the additional necessary packages and compile them:
Changed:
<
<
wget https://twiki.cern.ch/twiki/pub/CMS/CASTOROpenData2010/Commissioning10_additional_packages.tar
>
>
wget https://twiki.cern.ch/twiki/pub/CMSPublic/CASTOROpenData2010/Commissioning10_additional_packages.tar
 tar -xvf Commissioning10_additional_packages.tar scram b
Line: 44 to 44
 

Usage

Once the above steps are executed you are basically ready to analyse CASTOR objects. Here we will specify what configuration snippets you will need to apply inside your typical 'demoanalyzer_cfg.py' file when you are coding an analyser in CMSSW.
Changed:
<
<
First important step is to include a 'global tag' into your configuration file. To do this, please follow the instructions this CMS OpenData page: http://opendata.cern.ch/docs/cms-guide-for-condition-database and follow the steps in section 'For 2010 collision data' to include the 'FT_R_42_V10A::All' global tag.
>
>
First important step is to include a 'global tag' into your configuration file. To do this, please follow the instructions on this CMS OpenData page: http://opendata.cern.ch/docs/cms-guide-for-condition-database and follow the steps in section 'For 2010 collision data' to include the 'FT_R_42_V10A::All' global tag.
 

Running on data

1) Add the following lines to the cfg file:
Line: 103 to 103
 

DemoAnalyzer class

A demo analyser C++ class can be downloaded by:
Changed:
<
<
wget https://twiki.cern.ch/twiki/pub/CMS/CASTOROpenData2010/DemoAnalyzer.cc
>
>
wget https://twiki.cern.ch/twiki/pub/CMSPublic/CASTOROpenData2010/DemoAnalyzer.cc
  It contains code to read out all objects and make basic validation histograms. You can run it with the following python configuration files:
Changed:
<
<
wget https://twiki.cern.ch/twiki/pub/CMS/CASTOROpenData2010/demoanalyzer_cfg_Commissioning10.py.txt wget https://twiki.cern.ch/twiki/pub/CMS/CASTOROpenData2010/demoanalyzer_cfg_Comm10MC.py.txt
>
>
wget https://twiki.cern.ch/twiki/pub/CMSPublic/CASTOROpenData2010/demoanalyzer_cfg_Commissioning10.py.txt wget https://twiki.cern.ch/twiki/pub/CMSPublic/CASTOROpenData2010/demoanalyzer_cfg_Comm10MC.py.txt
  The first one is used with data, the second with MC samples. Before using remove the .txt file extension.

Changed:
<
<
The demo code applies first some 'online' selections in the python configuration file (physics declared, remove beam background, remove CASTOR invalid data, trigger selection) and in the C++ class a further offline event selection is included that selects nondiffractive minimum bias events by requiring: exactly one good primary vertex, HF AND activity, and CASTOR activity. This event selection is the same as applied in the FWD-11-003 analysis.
>
>
The demo code applies first some 'online' selections in the python configuration file (physics declared, remove beam background, remove CASTOR invalid data, trigger selection) and in the C++ class a further offline event selection is included that selects nondiffractive minimum bias events by requiring: exactly one good primary vertex, HF AND activity, and CASTOR activity. This event selection is the same as applied in the FWD-11-003 analysis (arXiv:1302.2394).
 

Validation plots

Changed:
<
<
After running the demo analyser you can plot the histograms stored in the output ROOT files. In this attachment you can find validation plots, if you get the same results than your framework is working as expected.

Run2010B data period

Introduction

These instructions are valid to use with Run2010B OpenData datasets. e.g. http://opendata.cern.ch/record/8

Installation and setup

Before you can analyse data taken with the CASTOR calorimeter you'll need install a few extra packages into the CMSSW software.
1) Install the CERN OpenData VM for 2010 data, for instructions see here: http://opendata.cern.ch/docs/cms-virtual-machine-2010. The recipe below are validated in version 'CMS-OpenData-1.1.2'.
2) Start up your VM and open the 'CMS shell'.
3) Install the correct version of CMSSW and activate it:
cmsrel CMSSW_4_2_8_lowpupatch1
cd CMSSW_4_2_8_lowpupatch1/src
cmsenv
4) When in CMSSW_4_2_8_lowpupatch1/src directory, download the additional necessary packages and compile them:
wget https://twiki.cern.ch/twiki/pub/CMS/CASTOROpenData2010/Run2010B_additional_packages.tar
tar -xvf Run2010B_additional_packages.tar
scram b
Note that following directories should appear in the CMSSW_4_2_8_lowpupatch1/src directory: RecoLocalCalo and RecoJets. If this is not the case then something went wrong when downloading/extracting the packages.

Usage

Once the above steps are executed you are basically ready to analyse CASTOR objects. Here we will specify what configuration snippets you will need to apply inside your typical 'demoanalyzer_cfg.py' file when you are coding an analyser in CMSSW.

First important step is to include a 'global tag' into your configuration file. To do this, please follow the instructions this CMS OpenData page: http://opendata.cern.ch/docs/cms-guide-for-condition-database and follow the steps in section 'For 2010 collision data' to include the 'FT_R_42_V10A::All' global tag.

Running on data

1) Add the following lines to the cfg file:
# import correct treatment of CASTOR objects
process.load('RecoLocalCalo.Castor.ReReco_data_cff')

# filter bad data
process.castorInvalidDataFilter = cms.EDFilter("CastorInvalidDataFilter")

2) If process.demo is the actual process that executes your analysis code, then you need to extend the cms.Path() that contains it until you have the following:

cms.Path(process.castorInvalidDataFilter*process.CastorReReco*process.demo)
It is important that process.demo is at the end of the path, and that the order of the path is respected. Note that the above 2 extensions in the cfg file of the analyser are always needed when analysing CASTOR objects in Run2010B data.

Running on Monte Carlo samples

NOTE: check if bad channels need to be excluded manually from MC, depends on what GT is used.
1) Add the following lines to the cfg file:
# import correct treatment of CASTOR objects
process.load('RecoLocalCalo.Castor.ReReco_MC_cff')

2) If process.demo is the actual process that executes your analysis code, then you need to extend the cms.Path() that contains it until you have the following:

cms.Path(process.CastorReReco*process.demo)
It is important that process.demo is at the end of the path, and that the order of the path is respected. Note that the above 2 extensions in the cfg file of the analyser are always needed when analysing CASTOR objects in 2010 Monte Carlo samples.

Demo analysis

With this demo analysis you'll be able to cross check that everything is behaving as intended
>
>
After running the demo analyser you can plot the histograms stored in the output ROOT files. In this attachment you can find validation plots, if you get the same results your framework is working as expected.
 

Information valid for all 2010 data

Examples to access all objects and their properties

Line: 280 to 218
 Ecal = myJETenergy*(1.8 + 0.0037*log(1 + myJETenergy)); // data or MC (SL) Ecal = myJETenergy*(1.5 + 0.0024*log(1 + myJETenergy)); // MC (FS)
Changed:
<
<
The functions marked to be used with Shower Library (SL) need to be applied to data and to MC samples using SL, such as the official public ones. Functions marked with Full Sim (FS) can be used with special MC samples simulated at displaced sensor locations. These latter samples are not public (for the moment).
>
>
The functions marked to be used with Shower Library (SL) need to be applied to data and to MC samples using SL, such as the official public ones. Functions marked with Full Simulation (FS) can be used with special MC samples simulated at displaced sensor locations. These latter samples are not public (for the moment).
 

Changed:
<
<
Full code as in a demo analyser that first identifies electromagnetic or hadronic showers using the JetID variables, and then properly calibrates the hadronic-like jets:
>
>
Full code as in the demo analyser that first identifies electromagnetic or hadronic showers using the JetID variables, and then properly calibrates the hadronic-like jets:
 
// access the CASTOR jets
  edm::Handle<edm::View< reco::BasicJet > > basicjetcoll;  //-- uncorrected jets
Line: 365 to 303
 -- HansVanHaevermaet - 2018-09-10

META FILEATTACHMENT attachment="Commissioning10_additional_packages.tar" attr="" comment="Commissioning10 additional packages" date="1537193571" name="Commissioning10_additional_packages.tar" path="Commissioning10_additional_packages.tar" size="542720" user="hvanhaev" version="2"
Deleted:
<
<
META FILEATTACHMENT attachment="Run2010B_additional_packages.tar" attr="" comment="Run2010B additional packages" date="1537194824" name="Run2010B_additional_packages.tar" path="Run2010B_additional_packages.tar" size="532480" user="hvanhaev" version="1"
 
META FILEATTACHMENT attachment="demoanalyzer_cfg_Comm10MC.py.txt" attr="" comment="Demo analyser code and python cfg files for Commissioning10" date="1545055621" name="demoanalyzer_cfg_Comm10MC.py.txt" path="demoanalyzer_cfg_Comm10MC.py.txt" size="3139" user="hvanhaev" version="1"
META FILEATTACHMENT attachment="demoanalyzer_cfg_Commissioning10.py.txt" attr="" comment="Demo analyser code and python cfg files for Commissioning10" date="1545055621" name="demoanalyzer_cfg_Commissioning10.py.txt" path="demoanalyzer_cfg_Commissioning10.py.txt" size="5865" user="hvanhaev" version="1"
META FILEATTACHMENT attachment="DemoAnalyzer.cc" attr="" comment="Demo analyser code and python cfg files for Commissioning10" date="1545055621" name="DemoAnalyzer.cc" path="DemoAnalyzer.cc" size="19671" user="hvanhaev" version="1"

Revision 62019-04-01 - HansVanHaevermaet

Line: 1 to 1
Changed:
<
<
META TOPICPARENT name="CASTORDataPreservation"
>
>
META TOPICPARENT name="CMS.CASTORDataPreservation"
 

Analysis recipe to use CASTOR objects with 2010 CMS OpenData

Commissioning10 data period

Introduction

Changed:
<
<
This section is valid for 900 GeV and 7 TeV datasets taken during the Commissioning10 period in 2010.
>
>
This section is valid for 900 GeV and 7 TeV datasets taken during the Commissioning10 period in 2010.
 More specifically for data:
/MinimumBias/Commissioning10-07JunReReco_900GeV/RECO
Line: 282 to 282
  The functions marked to be used with Shower Library (SL) need to be applied to data and to MC samples using SL, such as the official public ones. Functions marked with Full Sim (FS) can be used with special MC samples simulated at displaced sensor locations. These latter samples are not public (for the moment).

Changed:
<
<
Full code as in a demo analyser that first identifies electromagnetic or hadronic showers using the JetID variables, and then properly calibrates the hadronic-like jets:
>
>
Full code as in a demo analyser that first identifies electromagnetic or hadronic showers using the JetID variables, and then properly calibrates the hadronic-like jets:
 
// access the CASTOR jets
  edm::Handle<edm::View< reco::BasicJet > > basicjetcoll;  //-- uncorrected jets
Line: 372 to 372
 
META FILEATTACHMENT attachment="OpenData_CASTORValidationplots_Commissioning10_v1.pdf" attr="" comment="Commissioning10 demo validation plots" date="1545060383" name="OpenData_CASTORValidationplots_Commissioning10_v1.pdf" path="OpenData_CASTORValidationplots_Commissioning10_v1.pdf" size="1681659" user="hvanhaev" version="1"
META FILEATTACHMENT attachment="Commissioning10-May19ReReco_7TeV.json" attr="" comment="JSON files" date="1548062855" name="Commissioning10-May19ReReco_7TeV.json" path="Commissioning10-May19ReReco_7TeV.json" size="609" user="hvanhaev" version="1"
META FILEATTACHMENT attachment="Commissioning10-May19ReReco_900GeV.json" attr="" comment="JSON files" date="1548062855" name="Commissioning10-May19ReReco_900GeV.json" path="Commissioning10-May19ReReco_900GeV.json" size="125" user="hvanhaev" version="1"
Added:
>
>
META TOPICMOVED by="hvanhaev" date="1554123421" from="CMS.CASTOROpenData2010" to="CMSPublic.CASTOROpenData2010"

Revision 52019-01-21 - HansVanHaevermaet

Line: 1 to 1
 
META TOPICPARENT name="CASTORDataPreservation"

Analysis recipe to use CASTOR objects with 2010 CMS OpenData

Line: 12 to 12
 /MinimumBias/Commissioning10-07JunReReco_900GeV/RECO /MinimumBias/Commissioning10-May19ReReco-v1/RECO
Added:
>
>
with JSON file run selection specifically for usage with CASTOR data (note: these contain less runs):
https://twiki.cern.ch/twiki/pub/CMSPublic/CASTOROpenData2010/Commissioning10-May19ReReco_900GeV.json
https://twiki.cern.ch/twiki/pub/CMSPublic/CASTOROpenData2010/Commissioning10-May19ReReco_7TeV.json

 And for MC:
/MinBias_TuneZ2_900GeV_pythia6_cff_py_GEN_SIM_START311_V2_Dec11_v2/hvanhaev-MinBias_TuneZ2_900GeV_pythia6_cff_py_Step3_START42_V11_Dec11_v3-04745fc182f9123f750cb5f7764a36c5/USER
Line: 367 to 370
 
META FILEATTACHMENT attachment="demoanalyzer_cfg_Commissioning10.py.txt" attr="" comment="Demo analyser code and python cfg files for Commissioning10" date="1545055621" name="demoanalyzer_cfg_Commissioning10.py.txt" path="demoanalyzer_cfg_Commissioning10.py.txt" size="5865" user="hvanhaev" version="1"
META FILEATTACHMENT attachment="DemoAnalyzer.cc" attr="" comment="Demo analyser code and python cfg files for Commissioning10" date="1545055621" name="DemoAnalyzer.cc" path="DemoAnalyzer.cc" size="19671" user="hvanhaev" version="1"
META FILEATTACHMENT attachment="OpenData_CASTORValidationplots_Commissioning10_v1.pdf" attr="" comment="Commissioning10 demo validation plots" date="1545060383" name="OpenData_CASTORValidationplots_Commissioning10_v1.pdf" path="OpenData_CASTORValidationplots_Commissioning10_v1.pdf" size="1681659" user="hvanhaev" version="1"
Added:
>
>
META FILEATTACHMENT attachment="Commissioning10-May19ReReco_7TeV.json" attr="" comment="JSON files" date="1548062855" name="Commissioning10-May19ReReco_7TeV.json" path="Commissioning10-May19ReReco_7TeV.json" size="609" user="hvanhaev" version="1"
META FILEATTACHMENT attachment="Commissioning10-May19ReReco_900GeV.json" attr="" comment="JSON files" date="1548062855" name="Commissioning10-May19ReReco_900GeV.json" path="Commissioning10-May19ReReco_900GeV.json" size="125" user="hvanhaev" version="1"

Revision 42018-12-17 - HansVanHaevermaet

Line: 1 to 1
 
META TOPICPARENT name="CASTORDataPreservation"

Analysis recipe to use CASTOR objects with 2010 CMS OpenData

Line: 113 to 113
 The demo code applies first some 'online' selections in the python configuration file (physics declared, remove beam background, remove CASTOR invalid data, trigger selection) and in the C++ class a further offline event selection is included that selects nondiffractive minimum bias events by requiring: exactly one good primary vertex, HF AND activity, and CASTOR activity. This event selection is the same as applied in the FWD-11-003 analysis.

Validation plots

Changed:
<
<
After running the demo analyser you can plot the histograms stored in the output ROOT files. In this attachment you can find validation plots, if you get the same results than your framework is working as expected.
>
>
After running the demo analyser you can plot the histograms stored in the output ROOT files. In this attachment you can find validation plots, if you get the same results than your framework is working as expected.
 
Line: 262 to 262
 

Jet calibration factors

Changed:
<
<
The idea would be to download them here with instructions on how to apply them
>
>
Below you can find a piece of code to be used when calibrating jets in CASTOR that are identified as coming from a hadronic shower in the calorimeter. The important functions are:
// for jets in sector 5 for Commissioning10 data 
Ecal = myJETenergy*(1.3 + 0.23*log(-149 + myJETenergy)); // data or MC (SL) 
Ecal = myJETenergy*(0.9 + 0.25*log(-149 + myJETenergy)); // MC (FS) 

// for jets in sector 6 for Commissioning10 data 
Ecal = myJETenergy*(1.4 + 0.21*log(-149 + myJETenergy)); // data or MC (SL) 
Ecal = myJETenergy*(-5.8 + 1.3*log(144 + myJETenergy)); // MC (FS)  
                       
// for other good sectors for Commissioning10 data
Ecal = myJETenergy*(1.8 + 0.0037*log(1 + myJETenergy)); // data or MC (SL) 
Ecal = myJETenergy*(1.5 + 0.0024*log(1 + myJETenergy)); // MC (FS)
The functions marked to be used with Shower Library (SL) need to be applied to data and to MC samples using SL, such as the official public ones. Functions marked with Full Sim (FS) can be used with special MC samples simulated at displaced sensor locations. These latter samples are not public (for the moment).

Full code as in a demo analyser that first identifies electromagnetic or hadronic showers using the JetID variables, and then properly calibrates the hadronic-like jets:
// access the CASTOR jets
  edm::Handle<edm::View< reco::BasicJet > > basicjetcoll;  //-- uncorrected jets
  edm::Handle<reco::CastorJetIDValueMap> jetIdMap;

  iEvent.getByLabel("ak5BasicJets",basicjetcoll);
  iEvent.getByLabel("ak5CastorJetID",jetIdMap);

  if(basicjetcoll.isValid()) {

    for(edm::View<reco::BasicJet>::const_iterator ibegin = basicjetcoll->begin(), iend = basicjetcoll->end(), ijet = ibegin; ijet != iend; ++ijet) {

      unsigned int idx = ijet - ibegin;
      const BasicJet & basicjet = (*basicjetcoll)[idx];
      
      double myJETenergy = basicjet.energy();
     
      hJet_energy->Fill(myJETenergy);
      hJet_phi->Fill(basicjet.phi());

      edm::RefToBase<reco::BasicJet> jetRef = basicjetcoll->refAt(idx);
      reco::CastorJetID const & jetId = (*jetIdMap)[jetRef];

      hJet_fem->Fill(jetId.fem);
      hJet_eem->Fill(jetId.emEnergy);
      hJet_ehad->Fill(jetId.hadEnergy);

      hJet_width->Fill(jetId.width*(180/myPI)); // convert from radians to degrees
      hJet_depth->Fill(jetId.depth);
      hJet_fhot->Fill(jetId.fhot);
      hJet_sigmaz->Fill(jetId.sigmaz);
      hJet_ntower->Fill(jetId.nTowers);
      
      // perform jet noncompensation calibration
      // select hadronic jet
      bool HAD = true;
      if (jetId.depth > -14450 && myJETenergy < 175) HAD = false;
      if (jetId.depth > -14460 && myJETenergy > 175) HAD = false;
      if (jetId.fem > 0.95) HAD = false;
      
      // select EM jet
      bool EM = true;
      if (jetId.fhot < 0.45) EM = false;
      if (jetId.fem < 0.90) EM = false;
      if (jetId.sigmaz > 30 && myJETenergy < 75) EM = false;
      if (jetId.sigmaz > 40 && myJETenergy > 75) EM = false;
      if (jetId.width*(180/myPI) > 11.5) EM = false; // convert from radians to degrees
      if (jetId.depth < -14450 && myJETenergy < 125) EM = false;
      if (jetId.depth < -14460 && myJETenergy > 125) EM = false;     
      
      // calibrate only hadronic jets
      if (HAD) {
      // apply calibration factors
      double Ecal = 0.0;
      if (basicjet.phi() > 4*(myPI/8) && basicjet.phi() < 5*(myPI/8)) {
         // include different sectors 5 for Commissioning10 data were first channels are removed
         /*if ( iEvent.eventAuxiliary().isRealData())*/ Ecal = myJETenergy*(1.3 + 0.23*log(-149 + myJETenergy)); // data (SL) 
         //if (!iEvent.eventAuxiliary().isRealData()) Ecal = myJETenergy*(0.9 + 0.25*log(-149 + myJETenergy)); // MC (FS) 
      } else if (basicjet.phi() > 5*(myPI/8) && basicjet.phi() < 6*(myPI/8)) {
         // include different sectors 6 for Commissioning10 data were first channels are removed
         /*if ( iEvent.eventAuxiliary().isRealData())*/ Ecal = myJETenergy*(1.4 + 0.21*log(-149 + myJETenergy)); // data (SL) 
         //if (!iEvent.eventAuxiliary().isRealData()) Ecal = myJETenergy*(-5.8 + 1.3*log(144 + myJETenergy)); // MC (FS)  
      } else {
         /*if ( iEvent.eventAuxiliary().isRealData())*/ Ecal = myJETenergy*(1.8 + 0.0037*log(1 + myJETenergy)); // data (SL) good sectors
         //if (!iEvent.eventAuxiliary().isRealData()) Ecal = myJETenergy*(1.5 + 0.0024*log(1 + myJETenergy)); // MC (FS) good sectors
         
      }
      hJet_calenergy->Fill(Ecal); // fill with calibrated HAD jet
     } else {
      hJet_calenergy->Fill(myJETenergy); // fill with other jets
     }

    }
  }

  -- HansVanHaevermaet - 2018-09-10
Line: 271 to 366
 
META FILEATTACHMENT attachment="demoanalyzer_cfg_Comm10MC.py.txt" attr="" comment="Demo analyser code and python cfg files for Commissioning10" date="1545055621" name="demoanalyzer_cfg_Comm10MC.py.txt" path="demoanalyzer_cfg_Comm10MC.py.txt" size="3139" user="hvanhaev" version="1"
META FILEATTACHMENT attachment="demoanalyzer_cfg_Commissioning10.py.txt" attr="" comment="Demo analyser code and python cfg files for Commissioning10" date="1545055621" name="demoanalyzer_cfg_Commissioning10.py.txt" path="demoanalyzer_cfg_Commissioning10.py.txt" size="5865" user="hvanhaev" version="1"
META FILEATTACHMENT attachment="DemoAnalyzer.cc" attr="" comment="Demo analyser code and python cfg files for Commissioning10" date="1545055621" name="DemoAnalyzer.cc" path="DemoAnalyzer.cc" size="19671" user="hvanhaev" version="1"
Added:
>
>
META FILEATTACHMENT attachment="OpenData_CASTORValidationplots_Commissioning10_v1.pdf" attr="" comment="Commissioning10 demo validation plots" date="1545060383" name="OpenData_CASTORValidationplots_Commissioning10_v1.pdf" path="OpenData_CASTORValidationplots_Commissioning10_v1.pdf" size="1681659" user="hvanhaev" version="1"

Revision 32018-12-17 - HansVanHaevermaet

Line: 1 to 1
 
META TOPICPARENT name="CASTORDataPreservation"

Analysis recipe to use CASTOR objects with 2010 CMS OpenData

Line: 6 to 6
 

Commissioning10 data period

Introduction

Changed:
<
<
This section is valid for 900 GeV and 7 TeV datasets taken during the Commissioning10 period in 2010. More specifically /MinimumBias/Commissioning10-07JunReReco_900GeV/RECO, /MinimumBias/Commissioning10-May19ReReco-v1/RECO.
>
>
This section is valid for 900 GeV and 7 TeV datasets taken during the Commissioning10 period in 2010.
More specifically for data:
/MinimumBias/Commissioning10-07JunReReco_900GeV/RECO
/MinimumBias/Commissioning10-May19ReReco-v1/RECO
And for MC:
/MinBias_TuneZ2_900GeV_pythia6_cff_py_GEN_SIM_START311_V2_Dec11_v2/hvanhaev-MinBias_TuneZ2_900GeV_pythia6_cff_py_Step3_START42_V11_Dec11_v3-04745fc182f9123f750cb5f7764a36c5/USER
/MinBias_TuneZ2_7TeV_pythia6_cff_py_GEN_SIM_START311_V2_Dec11_v2/hvanhaev-MinBias_TuneZ2_7TeV_pythia6_cff_py_Step3_START42_V11_Dec11_v2-86bcdbe9c73956c342e477ba771c41c7/USER
/MinBias_Tune4C_900GeV_pythia8_cff_py_GEN_SIM_START311_V2_Dec11_v2/hvanhaev-MinBias_Tune4C_900GeV_pythia8_cff_py_Step3_START42_V11_Dec11_v2-04745fc182f9123f750cb5f7764a36c5/USER
/MinBias_Tune4C_7TeV_pythia8_cff_py_GEN_SIM_START311_V2_Dec11_v1/hvanhaev-MinBias_Tune4C_7TeV_pythia8_cff_py_Step3_START42_V11_Dec11_v1-86bcdbe9c73956c342e477ba771c41c7/USER
 

Installation and setup

Before you can analyse data taken with the CASTOR calorimeter you'll need install a few extra packages into the CMSSW software.
Line: 85 to 97
 

Demo analysis

With this demo analysis you'll be able to cross check that everything is behaving as intended
Added:
>
>

DemoAnalyzer class

A demo analyser C++ class can be downloaded by:
wget https://twiki.cern.ch/twiki/pub/CMS/CASTOROpenData2010/DemoAnalyzer.cc
It contains code to read out all objects and make basic validation histograms. You can run it with the following python configuration files:
wget https://twiki.cern.ch/twiki/pub/CMS/CASTOROpenData2010/demoanalyzer_cfg_Commissioning10.py.txt
wget https://twiki.cern.ch/twiki/pub/CMS/CASTOROpenData2010/demoanalyzer_cfg_Comm10MC.py.txt
The first one is used with data, the second with MC samples. Before using remove the .txt file extension.

The demo code applies first some 'online' selections in the python configuration file (physics declared, remove beam background, remove CASTOR invalid data, trigger selection) and in the C++ class a further offline event selection is included that selects nondiffractive minimum bias events by requiring: exactly one good primary vertex, HF AND activity, and CASTOR activity. This event selection is the same as applied in the FWD-11-003 analysis.

Validation plots

After running the demo analyser you can plot the histograms stored in the output ROOT files. In this attachment you can find validation plots, if you get the same results than your framework is working as expected.

 

Run2010B data period

Introduction

These instructions are valid to use with Run2010B OpenData datasets. e.g. http://opendata.cern.ch/record/8
Line: 236 to 268
 
META FILEATTACHMENT attachment="Commissioning10_additional_packages.tar" attr="" comment="Commissioning10 additional packages" date="1537193571" name="Commissioning10_additional_packages.tar" path="Commissioning10_additional_packages.tar" size="542720" user="hvanhaev" version="2"
META FILEATTACHMENT attachment="Run2010B_additional_packages.tar" attr="" comment="Run2010B additional packages" date="1537194824" name="Run2010B_additional_packages.tar" path="Run2010B_additional_packages.tar" size="532480" user="hvanhaev" version="1"
Added:
>
>
META FILEATTACHMENT attachment="demoanalyzer_cfg_Comm10MC.py.txt" attr="" comment="Demo analyser code and python cfg files for Commissioning10" date="1545055621" name="demoanalyzer_cfg_Comm10MC.py.txt" path="demoanalyzer_cfg_Comm10MC.py.txt" size="3139" user="hvanhaev" version="1"
META FILEATTACHMENT attachment="demoanalyzer_cfg_Commissioning10.py.txt" attr="" comment="Demo analyser code and python cfg files for Commissioning10" date="1545055621" name="demoanalyzer_cfg_Commissioning10.py.txt" path="demoanalyzer_cfg_Commissioning10.py.txt" size="5865" user="hvanhaev" version="1"
META FILEATTACHMENT attachment="DemoAnalyzer.cc" attr="" comment="Demo analyser code and python cfg files for Commissioning10" date="1545055621" name="DemoAnalyzer.cc" path="DemoAnalyzer.cc" size="19671" user="hvanhaev" version="1"

Revision 22018-09-17 - HansVanHaevermaet

Line: 1 to 1
 
META TOPICPARENT name="CASTORDataPreservation"

Analysis recipe to use CASTOR objects with 2010 CMS OpenData

Line: 27 to 27
 Note that following directories should appear in the CMSSW_4_2_8_lowpupatch1/src directory: RecoLocalCalo, RecoJets, data. If this is not the case then something went wrong when downloading/extracting the packages.

Usage

Changed:
<
<
Once the above steps are executed you are basically ready to analyse CASTOR objects. Here we will specify what configuration snippets you will need to apply inside your typical 'demoanalyzer_cfg.py' file when you are coding an analyser in CMSSW.
>
>
Once the above steps are executed you are basically ready to analyse CASTOR objects. Here we will specify what configuration snippets you will need to apply inside your typical 'demoanalyzer_cfg.py' file when you are coding an analyser in CMSSW.

First important step is to include a 'global tag' into your configuration file. To do this, please follow the instructions this CMS OpenData page: http://opendata.cern.ch/docs/cms-guide-for-condition-database and follow the steps in section 'For 2010 collision data' to include the 'FT_R_42_V10A::All' global tag.

Running on data

 1) Add the following lines to the cfg file:
Changed:
<
<
# load latest ChannelQuality conditions to remove the bad channels during tower reconstruction
>
>
# load latest ChannelQuality conditions to remove the bad channels
 process.es_ascii = cms.ESSource("CastorTextCalibrations", input = cms.VPSet( cms.PSet(
Line: 41 to 45
 ) process.es_prefer_castor = cms.ESPrefer('CastorTextCalibrations','es_ascii')
Changed:
<
<
# import Castor tower and jet reconstruction process.load('RecoLocalCalo.Castor.Castor_cff')
>
>
# import correct treatment of CASTOR objects process.load('RecoLocalCalo.Castor.ReReco_data_cff')
 
Changed:
<
<
# construct the module which executes the RechitCorrector process.rechitcorrector = cms.EDProducer("RecHitCorrector", rechitLabel = cms.InputTag("castorreco","","RECO"), # choose the original RecHit collection isData = cms.bool(True) # perform 42X data corrections for 53X RECO input )
>
>
# filter bad data process.castorInvalidDataFilter = cms.EDFilter("CastorInvalidDataFilter")
 
Changed:
<
<
# tell to the CastorTower reconstruction that he should use the new corrected rechits process.CastorTowerReco.inputprocess = "rechitcorrector"
>
>
2) If process.demo is the actual process that executes your analysis code, then you need to extend the cms.Path() that contains it until you have the following:
cms.Path(process.castorInvalidDataFilter*process.CastorReReco*process.demo)
It is important that process.demo is at the end of the path, and that the order of the path is respected. Note that the above 2 extensions in the cfg file of the analyser are always needed when analysing CASTOR objects in Commissioning10 data.
 
Changed:
<
<
# include filter to remove bad events process.castorInvalidDataFilter = cms.EDFilter("CastorInvalidDataFilter")
>
>

Running on Monte Carlo samples

1) Add the following lines to the cfg file:
# load latest ChannelQuality conditions to remove the bad channels
process.es_ascii = cms.ESSource("CastorTextCalibrations",
    input = cms.VPSet(
                cms.PSet(
                    object = cms.string('ChannelQuality'),
                    file = cms.FileInPath('./data/castor_db2013/DumpCastorCondChannelQuality_Run135059.txt')
                ),
    )
)
process.es_prefer_castor = cms.ESPrefer('CastorTextCalibrations','es_ascii')
 
Changed:
<
<
# add extra CastorJet collections process.load('RecoJets.JetProducers.ak5CastorJets_cfi') process.load('RecoJets.JetProducers.ak5CastorJetID_cfi')
>
>
# import correct treatment of CASTOR objects process.load('RecoLocalCalo.Castor.ReReco_MC_cff')
 
Added:
>
>
 2) If process.demo is the actual process that executes your analysis code, then you need to extend the cms.Path() that contains it until you have the following:
Changed:
<
<
cms.Path(process.castorInvalidDataFilter*process.rechitcorrector*process.CastorFullReco*process.ak5BasicJets*process.ak5CastorJetID*process.demo)
>
>
cms.Path(process.CastorReReco*process.demo)
 
Changed:
<
<
It is important that process.demo is at the end of the path, and that the order of the path is respected. Note that the above 2 extensions in the cfg file of the analyser are always needed when analysing Commissioning10 data.
>
>
It is important that process.demo is at the end of the path, and that the order of the path is respected. Note that the above 2 extensions in the cfg file of the analyser are always needed when analysing CASTOR objects in 2010 Monte Carlo samples.
 

Demo analysis

With this demo analysis you'll be able to cross check that everything is behaving as intended
Line: 75 to 90
 These instructions are valid to use with Run2010B OpenData datasets. e.g. http://opendata.cern.ch/record/8

Installation and setup

Changed:
<
<
Before you can analyse data taken with the CASTOR calorimeter you'll need install a few extra packages into the CMSSW software.
>
>
Before you can analyse data taken with the CASTOR calorimeter you'll need install a few extra packages into the CMSSW software.
1) Install the CERN OpenData VM for 2010 data, for instructions see here: http://opendata.cern.ch/docs/cms-virtual-machine-2010. The recipe below are validated in version 'CMS-OpenData-1.1.2'.
2) Start up your VM and open the 'CMS shell'.
3) Install the correct version of CMSSW and activate it:
cmsrel CMSSW_4_2_8_lowpupatch1
cd CMSSW_4_2_8_lowpupatch1/src
cmsenv
4) When in CMSSW_4_2_8_lowpupatch1/src directory, download the additional necessary packages and compile them:
wget https://twiki.cern.ch/twiki/pub/CMS/CASTOROpenData2010/Run2010B_additional_packages.tar
tar -xvf Run2010B_additional_packages.tar
scram b
Note that following directories should appear in the CMSSW_4_2_8_lowpupatch1/src directory: RecoLocalCalo and RecoJets. If this is not the case then something went wrong when downloading/extracting the packages.

Usage

Once the above steps are executed you are basically ready to analyse CASTOR objects. Here we will specify what configuration snippets you will need to apply inside your typical 'demoanalyzer_cfg.py' file when you are coding an analyser in CMSSW.

First important step is to include a 'global tag' into your configuration file. To do this, please follow the instructions this CMS OpenData page: http://opendata.cern.ch/docs/cms-guide-for-condition-database and follow the steps in section 'For 2010 collision data' to include the 'FT_R_42_V10A::All' global tag.

Running on data

1) Add the following lines to the cfg file:
# import correct treatment of CASTOR objects
process.load('RecoLocalCalo.Castor.ReReco_data_cff')

# filter bad data
process.castorInvalidDataFilter = cms.EDFilter("CastorInvalidDataFilter")

2) If process.demo is the actual process that executes your analysis code, then you need to extend the cms.Path() that contains it until you have the following:

cms.Path(process.castorInvalidDataFilter*process.CastorReReco*process.demo)
It is important that process.demo is at the end of the path, and that the order of the path is respected. Note that the above 2 extensions in the cfg file of the analyser are always needed when analysing CASTOR objects in Run2010B data.

Running on Monte Carlo samples

NOTE: check if bad channels need to be excluded manually from MC, depends on what GT is used.
1) Add the following lines to the cfg file:
# import correct treatment of CASTOR objects
process.load('RecoLocalCalo.Castor.ReReco_MC_cff')

2) If process.demo is the actual process that executes your analysis code, then you need to extend the cms.Path() that contains it until you have the following:

cms.Path(process.CastorReReco*process.demo)
It is important that process.demo is at the end of the path, and that the order of the path is respected. Note that the above 2 extensions in the cfg file of the analyser are always needed when analysing CASTOR objects in 2010 Monte Carlo samples.
 

Demo analysis

With this demo analysis you'll be able to cross check that everything is behaving as intended

Information valid for all 2010 data

Examples to access all objects and their properties

Changed:
<
<
Examples here...
>
>

Access RecHits

  // acces the CASTOR rechits
  Handle<CastorRecHitCollection> rechitcoll;
  iEvent.getByLabel("rechitcorrector",rechitcoll);

  //-- loop over the rechit collection
  if(rechitcoll.isValid()) {
       for(size_t i = 0; i < rechitcoll->size(); ++i) {
         const CastorRecHit & rh = (*rechitcoll)[i];
         HcalCastorDetId castorid = rh.id();
         
         hRecHit_map->Fill(castorid.sector(),castorid.module());
         hRecHit_module->Fill(castorid.module(),rh.energy());
         hRecHit_sector->Fill(castorid.sector(),rh.energy());
                        int rh_channel = 16*(castorid.module()-1) + castorid.sector();
         hRecHit_channel->Fill(rh_channel,rh.energy());
         hRecHit_energy->Fill(rh.energy());
     }
  }

Access CastorTowers

// access the CASTOR towers
edm::Handle<CastorTowerCollection> towercoll;
iEvent.getByLabel("CastorTowerReco",towercoll);

  if(towercoll.isValid()) {

    hTower_multi->Fill(towercoll->size());
    for(unsigned int i=0;i<towercoll->size();i++) {
      const CastorTower & castortower = (*towercoll)[i];
      hTower_energy->Fill(castortower.energy());
      hTower_phi->Fill(castortower.phi());
      hTower_fem->Fill(castortower.fem());
      hTower_eem->Fill(castortower.emEnergy());
      hTower_ehad->Fill(castortower.hadEnergy());
      hTower_depth->Fill(castortower.depth());
      hTower_fhot->Fill(castortower.fhot());
      hTower_ncell->Fill(castortower.rechitsSize());
         
    }
  }

Access CastorJets

  // access the CASTOR jets
  edm::Handle<edm::View< reco::BasicJet > > basicjetcoll;  //-- uncorrected jets
  edm::Handle<reco::CastorJetIDValueMap> jetIdMap;

  iEvent.getByLabel("ak5BasicJets",basicjetcoll);
  iEvent.getByLabel("ak5CastorJetID",jetIdMap);

  if(basicjetcoll.isValid()) {

    for(edm::View<reco::BasicJet>::const_iterator ibegin = basicjetcoll->begin(), iend = basicjetcoll->end(), ijet = ibegin; ijet != iend; ++ijet) {

      unsigned int idx = ijet - ibegin;
      const BasicJet & basicjet = (*basicjetcoll)[idx];
     
      hJet_energy->Fill(basicjet.energy());
      hJet_phi->Fill(basicjet.phi());

      edm::RefToBase<reco::BasicJet> jetRef = basicjetcoll->refAt(idx);
      reco::CastorJetID const & jetId = (*jetIdMap)[jetRef];

      hJet_fem->Fill(jetId.fem);
      hJet_eem->Fill(jetId.emEnergy);
      hJet_ehad->Fill(jetId.hadEnergy);

      hJet_width->Fill(jetId.width);
      hJet_depth->Fill(jetId.depth);
      hJet_fhot->Fill(jetId.fhot);
      hJet_sigmaz->Fill(jetId.sigmaz);
      hJet_ntower->Fill(jetId.nTowers);

    }
  }
 

Jet calibration factors

The idea would be to download them here with instructions on how to apply them

-- HansVanHaevermaet - 2018-09-10

Changed:
<
<
META FILEATTACHMENT attachment="Commissioning10_additional_packages.tar" attr="" comment="Commissioning10 additional packages" date="1536590226" name="Commissioning10_additional_packages.tar" path="Commissioning10_additional_packages.tar" size="440320" user="hvanhaev" version="1"
>
>
META FILEATTACHMENT attachment="Commissioning10_additional_packages.tar" attr="" comment="Commissioning10 additional packages" date="1537193571" name="Commissioning10_additional_packages.tar" path="Commissioning10_additional_packages.tar" size="542720" user="hvanhaev" version="2"
META FILEATTACHMENT attachment="Run2010B_additional_packages.tar" attr="" comment="Run2010B additional packages" date="1537194824" name="Run2010B_additional_packages.tar" path="Run2010B_additional_packages.tar" size="532480" user="hvanhaev" version="1"

Revision 12018-09-10 - HansVanHaevermaet

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="CASTORDataPreservation"

Analysis recipe to use CASTOR objects with 2010 CMS OpenData

Commissioning10 data period

Introduction

This section is valid for 900 GeV and 7 TeV datasets taken during the Commissioning10 period in 2010. More specifically /MinimumBias/Commissioning10-07JunReReco_900GeV/RECO, /MinimumBias/Commissioning10-May19ReReco-v1/RECO.

Installation and setup

Before you can analyse data taken with the CASTOR calorimeter you'll need install a few extra packages into the CMSSW software.
1) Install the CERN OpenData VM for 2010 data, for instructions see here: http://opendata.cern.ch/docs/cms-virtual-machine-2010. The recipe below are validated in version 'CMS-OpenData-1.1.2'.
2) Start up your VM and open the 'CMS shell'.
3) Install the correct version of CMSSW and activate it:
cmsrel CMSSW_4_2_8_lowpupatch1
cd CMSSW_4_2_8_lowpupatch1/src
cmsenv
4) When in CMSSW_4_2_8_lowpupatch1/src directory, download the additional necessary packages and compile them:
wget https://twiki.cern.ch/twiki/pub/CMS/CASTOROpenData2010/Commissioning10_additional_packages.tar
tar -xvf Commissioning10_additional_packages.tar
scram b
Note that following directories should appear in the CMSSW_4_2_8_lowpupatch1/src directory: RecoLocalCalo, RecoJets, data. If this is not the case then something went wrong when downloading/extracting the packages.

Usage

Once the above steps are executed you are basically ready to analyse CASTOR objects. Here we will specify what configuration snippets you will need to apply inside your typical 'demoanalyzer_cfg.py' file when you are coding an analyser in CMSSW.
1) Add the following lines to the cfg file:
# load latest ChannelQuality conditions to remove the bad channels during tower reconstruction
process.es_ascii = cms.ESSource("CastorTextCalibrations",
    input = cms.VPSet(
                cms.PSet(
                    object = cms.string('ChannelQuality'),
                    file = cms.FileInPath('./data/castor_db2013/DumpCastorCondChannelQuality_Run135059.txt')
                ),
    )
)
process.es_prefer_castor = cms.ESPrefer('CastorTextCalibrations','es_ascii')

# import Castor tower and jet reconstruction
process.load('RecoLocalCalo.Castor.Castor_cff')

# construct the module which executes the RechitCorrector
process.rechitcorrector = cms.EDProducer("RecHitCorrector",
       rechitLabel = cms.InputTag("castorreco","","RECO"), # choose the original RecHit collection
       isData = cms.bool(True) # perform 42X data corrections for 53X RECO input
)

# tell to the CastorTower reconstruction that he should use the new corrected rechits
process.CastorTowerReco.inputprocess = "rechitcorrector"

# include filter to remove bad events
process.castorInvalidDataFilter = cms.EDFilter("CastorInvalidDataFilter")

# add extra CastorJet collections
process.load('RecoJets.JetProducers.ak5CastorJets_cfi')
process.load('RecoJets.JetProducers.ak5CastorJetID_cfi')
2) If process.demo is the actual process that executes your analysis code, then you need to extend the cms.Path() that contains it until you have the following:
cms.Path(process.castorInvalidDataFilter*process.rechitcorrector*process.CastorFullReco*process.ak5BasicJets*process.ak5CastorJetID*process.demo)
It is important that process.demo is at the end of the path, and that the order of the path is respected. Note that the above 2 extensions in the cfg file of the analyser are always needed when analysing Commissioning10 data.

Demo analysis

With this demo analysis you'll be able to cross check that everything is behaving as intended

Run2010B data period

Introduction

These instructions are valid to use with Run2010B OpenData datasets. e.g. http://opendata.cern.ch/record/8

Installation and setup

Before you can analyse data taken with the CASTOR calorimeter you'll need install a few extra packages into the CMSSW software.

Demo analysis

With this demo analysis you'll be able to cross check that everything is behaving as intended

Information valid for all 2010 data

Examples to access all objects and their properties

Examples here...

Jet calibration factors

The idea would be to download them here with instructions on how to apply them

-- HansVanHaevermaet - 2018-09-10

META FILEATTACHMENT attachment="Commissioning10_additional_packages.tar" attr="" comment="Commissioning10 additional packages" date="1536590226" name="Commissioning10_additional_packages.tar" path="Commissioning10_additional_packages.tar" size="440320" user="hvanhaev" version="1"
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback