1d / 28b
- get a decent recent LaTeX
- How to save paper
- c++filt - Demangle C++ and Java symbols
- extract images from a pdf file
- Search for bit shifting
- RootTreeWriter wishlisht
- Ganga (Scratch)
- Books I can recommend
CALICE Hcal Guide (DRAFT)
Disclaimer: This guide is not intended to be an introduction to Marlin and lcio et. al. Take a look at http://ilcsoft.desy.de/portal.
The most important inheritance structure you maybe need to know is the following:
You can find this structure in the doxygen docu as well.
The following picture shows the database inputs of the SiPmPropertiesProcessor.
The IntegratedHcalProcessor has even more.
A couple of processors take care of the reconstruction, see the following diagram.
The digitization looks like this.
See that the output of the IntegratedHcalDigitizationProcessor matches the input of the IntegratedHcalCalibrationProcessor.
things I could be asked for
Production of dummy Monte Carlo http://www.desy.de/~richters/thesis/mcfileimitator/
At the moment the calibrations (MIP, Gain, IC) are stored half-module-wise. This results in 38*2*3 = 228 lines in the ConditionsProcessor. We want do divide this number by 38*2...
An appropriate way to do so is to save not half-module-wise but just the whole calorimeter in one collection. The "class" saved could be the SimpleValue (userlib) which offers: (cell)id, value, error, status. The (cell)id can be the HcalTileIndex (userlib) encoding module, chip, channel, (SiPM-ID).
To get the calibration value for a specific cell one can fill a ConditionsMap (lccd). The ConditionsMap is a template class. For us it would map HcalTileIndices to SimpleValues. CM is a ConditionsMap holding MIP constants for example, col is an !LCCollection* pointing to the plain collection saved in the database.
lccd::ConditionsMap<int, &HcalTileIndex::getIndex()> CM; CM.conditionsChanged(col); float mip = CM.find(HcalTileIndex(module,chip,channel).getIndex()).getValue();
Temperatures slopes ware stored in the same way.
Short note about coarse/fine modules and chip/channel assignment:
future software changes
- No more explicit bit shifting, use CellID(En/De)coder instead.
- Use streamlog instead of std::cout everywhere.
- Change defaults to reasonably values.
Get rid of the FastCaliceHit.
rebase on new repositories
git clone /group/hcal/calice_soft/git_repo/calice_userlib calice_userlib_new git remote add myself ../calice_userlib git fetch myself git checkout -b devel myself/new_pro git rebase -i origin/devel in editor: pick e4edbd1 New html docu pick 3b73601 New latex docu pick f8a4179 New html docu pick 364e44d Revision 188.8.131.52 pulled onto this branch pick 0025bdc Revision 184.108.40.206 pulled onto this branch pick e75d4ce HcalTileIndex: << overloaded pick 8ce3ee6 EncodingStringHelper: make use of the stl bitset pick 637a629 FastCaliceHit: << operator added
remove lines with commits you don't want or which are misidentified as yours
Getting answers easily
Attention - holy war approaching!
The AHCAL has the IntegratedHcalProcessor which is inherited from the SiPmPropertiesProcessors. At the moment the IntegratedHcalCalibrationProcessor and the IntegratedHcalDigitizationProcessor are inherited from the IntegratedHcalProcessor to have, for example, easy access to calibration constants.
I see two main draw backs. The IntegratedHcalProcessor needs a lot of steering parameters, which could be cooked down, but it so some extent unavoidable. This itself is not the problem. "Constructors" are allowed to take a lot of arguments, too. However, since the Calibration and DigitizationProcessor hold "copies" of the "master" processor all the steering parameters are present two times. Furthermore all the work of the IntegratedHcalProcessor is done twice.
A possible solution to this problem is not to inherited from this processor but to have an instance of it. Every processor which wants to use functions of the master processor can get a pointer to it via:
marlin::ProcessorMgr* pmgr = marlin::ProcessorMgr::instance(); IntegratedHcalProcessor* IHP = dynamic_cast<IntegratedHcalProcessor*>(pmgr->getActiveProcessor("NameOfIntegratedHcalProcessorInstance"));
Now it's very easy to get answers to your itching questions.
float mip = IHP->getMIP(module,chip,channel); // wouldn't it be nice?
The vantages of this scheme are:
- Shorter steerings files
- Less computational resources
- A clean interface or at least one place to look for functions you need
and most important
- An easy answer to user requests: How do I get any information easily?
One would have to provide steerings for master processors for all detectors, but this should not be such a problem.
Set the enconding:
LCCollectionVec* col = new LCCollectionVec( LCIO::SIMCALORIMETERHIT ); std::string cellIDEncoding("I:16:8,J:8:8,K:0:8"); CellIDEncoder<SimCalorimeterHitImpl> myCellIDEncoder(cellIDEncoding, col ) ; SimCalorimeterHitImpl* newHit = new SimCalorimeterHitImpl; myCellIDEncoder["I"] = i; myCellIDEncoder["J"] = j; myCellIDEncoder["K"] = k; myCellIDEncoder.setCellID(newHit);
No more bit shifting!
CellIDDecoder<SimCalorimeterHit> myCellIDDecoder(col); ... i = myCellIDDecoder(Hit)["I"]
Explanation of the encoding string:
"I:16:8,J:8:8,K:0:8" ^ ^ ^ | | |_ width | |_ start bit |_ name
get a decent recent LaTeX
If you want to use a more recent LaTeX try:
$ ini texlive $ which latex /afs/desy.de/products/texlive/2008/bin/i386-linux/latex
This includes for example subfig and not only the old subfigure package.
How to save paper
pdf2ps bigdoc.pdf or pdftops psnup -2 bigdoc.ps bigdoc-2perSheet.ps
pdf2ps and pdftops are different programs. I encountered problems with pdf2ps; it produced a monstrous file...
c++filt - Demangle C++ and Java symbols
/afs/desy.de/user/r/richters/calice-devel/marlin-install/bin/Marlin: symbol lookup error: /afs/desy.de/user/r/richters/calice-devel/calice-install/lib/libPrivate.so: undefined symbol: _ZlsRSoRKN6CALICE13HcalTileIndexE
$ c++filt _ZlsRSoRKN6CALICE13HcalTileIndexE operator<<(std::basic_ostream<char, std::char_traits<char> >&, CALICE::HcalTileIndex const&)
Ah, the << is missing.
extract images from a pdf file
pdfimages -j foo.pdf bar
Search for bit shifting
Like "<< or >> $number:
grep "\(<<\|>>\)\([[:space:]]\|=\|\)[0-9]" *
- Engines should be disabled by default. (done)
- Prefix each branch with a steerable engine specific prefix. (engine can do this itself)
- Use vectors instead of arrays if possible. (it's root's fault)
- Suppress output of parameters if engine is disabled.
- The possibility to have multiple instances of the same engine. (done)
remove commented lines
If the comment symbol is #:
M-x query-replace-regexp or M-C-% Query replace regexp: ^#.*C-q C-j with: "nothing"
C-q C-j is the shortcut for newline.
remove empty lines
M-x query-replace-regexp or M-C-% Query replace regexp: ^[[:space:]]*C-q C-j with: "nothing"
cope with large labels
Draw graph with errors without errors
ini ganga508 ganga -g $EDITOR ~/.gangarc # sets the name of the grid virtual organisation VirtualOrganisation = calice
$ ganga *** Welcome to Ganga *** Version: Ganga-5-0-8 Documentation and support: http://cern.ch/ganga Type help() or help('index') for online help.
Although the path says LHCb it's the Reference Manual for Ganga Public Interface (GPI):
Books I can recommend
* Object-Oriented Analysis and Design - http://www.johndeacon.net/OOAandD/
* Thinking in C/C++/Java ... - http://www.mindview.net/Books - Free electronic versions, but they are worth buying them.
* (In german language) zsh - http://www.zshbuch.org