FrontPage

Basic Alignment Wiki page

https://twiki.cern.ch/twiki/bin/view/Atlas/InDetAlignment

https://twiki.cern.ch/twiki/bin/view/Atlas/GlobalChi2Approach

12.0.0でグローバルChi2を動かそうとしたがSCT_ModuleConditionsToolがないとなる。->doMonitoring=True でこれはOK。

Not found DLL InDet::InDetCTBTracking。->above change introduces doTrackSegments=True that means TRT should run -> doTrackSegments part changed

#ref(): File not found: "globalChi.pdf" at page "GeometryAlignment"

アラインメントの状況を強調して表示するツールviewerがある。 この実行はrootで.x align_view.cxx とする。

Alignment Workshop@CERN

http://physics.syr.edu/%7Elhcb/public/alignment/LHCAlignmentWorkshop/

HepAlignableTransform

InDetDetDscr/InDetReadoutGeometryを通じて変更する。Identifier Searchで引っかかるパッケージをチェックする。

データベースを使ってずれを入れた例はInDetRecExampleの11.0.3の所に残っている。11.2.0のcosmicでもやったはずだが、例が残っていない。Book keepingが不十分だった。

New Tracking EDM の Residual plot 作成

以下の文書は Trk::Trackクラスの解説。

https://uimon.cern.ch/twiki/bin/view/Atlas/TrkTrack

さて、displacement fileの作り方はわかったので、次にこれからresidualをプロットする必要が有る。やり方としては、nominal position のESDファイルを読んで、displacementファイルで測定器の場所をセットしたときの読みのずれをプロットするのをためしてみたい。良くわからないがChi2AlignAlgs.cxxを使ってみた。エラーが出たのでみてみると、作ったdisplacement fileに中身がなかった。

GeoAlignableTransformとはVolumeに付加されるデータで、以下のデータ要素を保持しているもの。最後のvectorで最初のワールド座標へ戻る道筋が示される。

mutable unsigned short int _count;//RCBase.h
HepTransform3D _transform; //GeoTransform.h
HepTransform3D *_delta;//GeoAlignableTransform.h
std::vector<GeoGraphNode *>  _parentList;//GeoAlignableTransform.h

GeoAlignableTransformのメソッドにvoid setDelta(const HepTransform3D & Delta)がある。Identifier search で探すとInnerDetector/InDetDetDescr/InDetReadoutGeometry/src/SiDetectorManager.cxxなどで呼ばれる。setAlignableTransformLocalDeltaやsetAlignableTransformGlobalDeltaがよんでいる。これが使われるのはどこでしょう?

Identifier searchで探したが見付からなかった?ということはまだ出来てない?

こうなったらアルゴリズムを作って動かす方がよさそう。ESD解析ということで10.0.2のエド・モイスのtutorialあたりでやってみよう。10.5.0はInDetRecExampleのスクリプトがだいぶ変わっている。

コンパイルエラーが出るのでなおしましょう。

#ref(): File not found: "InDetSoftwareTutorial.h.Hit" at page "GeometryAlignment"

#ref(): File not found: "InDetSoftwareTutorial.cxx.Hit" at page "GeometryAlignment"

#ref(): File not found: "requirementsHit" at page "GeometryAlignment"

元のプログラムのようにHitLoop()をつくって、いくつかの変更の後動いた。結果をlxatlにrsyncし関係者が見れるようにした。printout があるので残差はすぐ出ると思ってたら、コードの上でのTrackPaparametersが純粋仮想クラスであるのに気がつかづまごまごしている。実体化するときにはAtaPlaneクラスになる。なるほどこれがポリモーフィッククラスといわれるわけですね。

RIO_OnTrackつまりヒットデータについての残差分布をとってみた。40muのところに山があるのは何故か良くわからない。lxatlのInDetExample/10.0.4/InnerDetector/InDetExampleをrsyncした。

#ref(): File not found: "stripResidual.eps" at page "GeometryAlignment"

RIO_OnTrackのdumpではclusterとなっているのでhitはクラスターであるにもかかわらず最初のストリップの場所とのによる残差をとったことによるミス。クラスターサイズをとって計算しなおす必要がある。SCT_ClusterOnTrack.hはInnerDetector/InDetRecEvent/InDetRIO_OnTrackにある。結局このデータではストリップの数にアクセスできなかった。ストリップの数が入っているデータを作る必要がある。

考えてみるとInDetRIO_OnTrackクラスはSCT_Clusterクラスをポインターで指しているが、これがrootに書かれたときにどうなるかが良くわからない。結局、reconstructionの時点が解析に最善のときのような気がしてきた。 Tracking/TrkEventTrkEventCnv/CnvToolsがどうもポインターのリカバーをするものらしい。これを動かせば、リカバーが出来るかも。と思ったがソースがないところを見ると出来てないみみたい。ESD解析ツールはまだ出来てないと言うことか。もういちど測定器をずらすのに挑戦しよう。

ESDの段階でずれを入れてもResidualの計算をローカル座標でやっている限り、ずれの効果は見えない。結局reconstructionの時にずらしておかないと、ずれの効果を直接見れない。

10.5.0でInDetRecExampleのjobOptions.pyを変更して、ずれを入れてresidualの図が出るようにした。コードはlxatl:~ryuichi/InDetAlignAlgs/10.5.0にrsyncで入れた。

#ref(): File not found: "residual80umBl2.eps" at page "GeometryAlignment"

#ref(): File not found: "residualNoDisp.eps" at page "GeometryAlignment"

#ref(): File not found: "AlignmentExercise.ppt" at page "GeometryAlignment"

#ref(): File not found: "AlignmentExercise2.ppt" at page "GeometryAlignment"

Chi2AlignAlg を動かす

以前動かしていた時使ったInDetRec_xKalman.pool.rootだとログファイルがどんどん増えるのでキャンセル。

scp lxplus.cern.ch:/afs/cern.ch/atlas/maxidisk/d173/ESD/InDetESD_Zee1of4.root ./

として今使っているらしいファイルを持ってきて、jobOption ファイルを変えるともっともらしいことをやっているようにも見える。でも途中に出てくる90度回したみたいなメッセージはなんのことなのか?いちおう動いたが見方がよくわからない。misalignment file:NominalAlignment.rootの作り方を見るためにInDetAlignAlgs-00-00-40をチェックアウトした。どう作ったかの情報がないので、自分で作った方がよさそう。この説明Wikiが最近できた。パッケージの説明も添付する。levelと言う変数が意味不明。DispModeも不明。

https://uimon.cern.ch/twiki/bin/view/Atlas/InDetAlignHowTo

#ref(): File not found: "InDetAlignWrt.txt" at page "GeometryAlignment"

このほかにInDetAlignAlgsのREADMEによさそうなコメントが有ったのでためしてみた。システマティックにrphi方向に80μmだけB5を移動してみた。InDetRecExampleを使う。InDetAlignAlgs/example/alignjobOptions.pyを実行してみている。

InDetAlignWrt                    INFO InDetAlignWrt::initialize() called
ToolSvc                         ERROR Factory for Tool InDetAlignDBTool not found
InDetAlignWrt                   FATAL InDetAlignDBTool not found
AthenaEventLoopMgr              ERROR Unable to initialize Algorithm: InDetAlignWrt
AthenaEventLoopMgr              ERROR Failed to initialize base class MinimalEventLoopMgr
ServiceManager                  ERROR Unable to initialize Service: AthenaEventLoopMgr
ApplicationMgr                  FATAL Invalid initial state
Appl icationMgr                   INFO Application Manager Terminated successfully

writeDBS.pyを見ると少し違っているので修正したらいちおう正常終了した。このファイルを使ってChi2Alignを動かすとわかりやすいのではないか?

#ref(): File not found: "alignjobOptions.py" at page "GeometryAlignment"

#ref(): File not found: "takaWritePool.py" at page "GeometryAlignment"

上のファイルのwriteはTrueでないとだめ。プログラムの中身を読まないとフラグ設定は出来ない。streamも変更しないとダメ。10.5.0で中身のあるrootファイルが出来たので、ESD解析も10.5.0に移行する。 ずれのrootファイルデータ作成はToolSvc.InDetAlignDBToolのINFOをみてチェックできる。今のところずれのファイルがまともでない。

ずれが思ったように入ったrootファイルが出来た。layer3の一個ずつのずれ80μmにするのはDispMode を3にする。出来たファイルはTBrowerでチェックできた。

alignment displacement file

TFile *file = TFile::Open("NominalAlignment.root")
file->ls()
POOLContainer_AlignableTransform->Scan()

多分defaultのWriteの結果。DispRphi=0.08、DispR=0.1、DispZ=0.1

alingnment 再開 kit 使用

mkdir SiRobustAlign
cd SiRobustAlign; cp ../scratch/105setup.sh ./
. setup.sh; mkdir 10.5.0; cd 10.5.0/
cp ../../scratch/10.5.0/requirements ./
cmt config
. setup.sh
cmt co -r SiRobustAlign-00-00-23 InnerDetector/InDetAlignment/SiRobustAlign
cd InnerDetector/InDetAlignment/SiRobustAlign/*/cmt
cmt config; . setup.sh; gmake

CVSのところのREADMEファイル

#ref(): File not found: "SiRobustAlignREADME" at page "GeometryAlignment"

Tracking Howto

まずEDMを理解する。

https://uimon.cern.ch/twiki/bin/view/Atlas/TrackingEDM

この文書で通常のヘリックスパラメータをペリジーPerigee(Closest approach)と呼んでいる。このパラメータはz軸にヘリックスが最も近付く点を基準に角度パラメータを決める。&mimetex(\(locX, LocY, \phi, \theta, q/p\));の角度定義の意味が良く分らないが、多分測定器基準系に対するその地点での角度だと思われる。(?)トラックパラメータについての文献で私が使っているのは古いCDFノート1790。

そのつぎはMCTruth

https://uimon.cern.ch/twiki/bin/view/Atlas/MCTruthSuggestions

TrkPrepRawData contains the "prepared raw data" (also known as RIOs - Reconstruction Input Objects) for the Tracking EDM. 

MCTruthで良く使うのはバーテックスと発生粒子だけ。となるとレッスン2のInDetPriVxCBNTなるコードでバッーテックスのtruthを見ているところを使うことになる。あとは粒子のtruthの取り方を探すことにする。

Generators/GeneratorObjects/GeneratorObjects/
Generators/GenAnalysisTools/TruthExamples

ZmumuにHistSampleを入れてみたが、500イベントで66しかZなし。HepMCを調べることにする。Simulation/HepMCというのもある。

http://mdobbs.home.cern.ch/mdobbs/HepMC/

あとRecExCommon関係もみとかないとけない。

https://uimon.cern.ch/twiki/bin/view/Atlas/ReconstructionDocumentation

code reading

RobustAlingmentのChi2AlignAlg.cxxを読むと、const DataVector<Trk::Track>* trks;がヒットの情報を持っているので、これを回してtrackパラメータを調べるのはUK勉強会の例題と同じ。内側のセンサーの座標を基準にしているのは、勘違いではないか?内側センサーの中心のストリップを基準に残差を計算してるようだ。内側を基準座標にするのではなく、アキシャルストリップを持つウエファーとするべきだと思う。レイヤーごとに内側、外側が交互にアキシャルストリップになってる。これはバレルもフォワードも。

http://kkuatx.hep.kyokyo-u.ac.jp/~ryuichi/doxygen/SiRobustAlign/10.1.0/html/index.html

https://uimon.cern.ch/twiki/bin/view/Atlas/TrackingPackageDocumentation

05 May ソフトウエアワークショップ

https://uimon.cern.ch/twiki/bin/view/Atlas/UkInnerDetectorSoftwareTutorial

#ref(): File not found: "InDetSoftwareTutorial.cxx" at page "GeometryAlignment"

アラインメントでは自前のデータが必要。そこでIan HinchliffのOpening Pleanayでも10.0.1を使えば全部できるとあるので、10.0.2やってみたら、ESDまでできた。AtlasG4Sim, Digitization, InDetRecExampleに順にできたPool.rootファイルを渡してESDを作る。ほぼOut of Boxでできる。simulationはminbiasでlxplusでは30イベントが限度。物理イベントはバッチでないとだめ。

アラインメントではRoland HaertelがESDからアラインメントをするパッケージを作っている。それは新しいTrk::Trackクラスを使っているので、今後の参考になる。UKで最近将来のDeveloperの卵向けにtutorialをEd Moyseがやったようだ。InnerDetectorのページにWikiのリンクがある。それの2までをLXRで例を探してやってみた。これもESDを使っているようである。プライマリバーテックスを求めて、インパクトパラメータをだしている。添付したのは2.3までの例。

2.4 はそのまま4行コピーすれば動く。でもerrorMatrixの部分はどこからとってくるのか不明。

課題3のピクセルのID helperを取ってくるところで、コンパイルエラーになる。またまたLXRでサーチしたら、

AtlasTest/DetDescrTest/IdDictTest/src/IdDictTest.cxx

というのがあった。これを参考にすればできそう。他にサマリー何とかというのも見ろとなっている。ヘルパーのポインタをクラスのメンバにしたのは失敗。

3.3のb-layerをはずして再フィットするのはコンパイルできた。コンテナクラスvectorとDatavectorの関係を調べよう。多分継承してるんでしょう。 IdHelperのポインターをクラスのメンバーにしてしまったので、前方参照する必要が有る。前方参照は独習C++のp99に説明有り。

#ref(): File not found: "ReFitTrack.cxx" at page "GeometryAlignment"

#ref(): File not found: "ReFitTrack.h" at page "GeometryAlignment"

Si-Softレポート

自分の計算機で解析

CVSでは新しいのは10.1.0でSiRobustAlignをするように書いてある。pacmanでathenaをいれた。AtlasG4Simのminbiasは20イベントできた。lxplusではEvtMaxをどう選んでも2004イベントでこける。よくわからないのでdata fileをcastorからコピーしている。中村君のページにやり方が書いてある。とりあえず

[atx13] /home/ryuichi/data/SiRobust > ssh lxplus.cern.ch "rfcat
/castor/cern.ch/user/h/haertel/ESD/InDetESD_Zee_4963events.root" >
InDetESD_Zee_4963events.root;date

とした。

結局READMEファイルにも或るとおり、2GB以上メモリーがないと動かないようだ。4963イベントを越えても動き続けて、1.2Gを越えた。1.5Gしかメモリーがないので止めた。

どうも1.5倍のイベント数を解析するようなので3000イベントにすると1.2Gぐらいで終わってくれた。plotChi2AlignHistos.cxxを使うと図がたくさん出てくるが、意味がよくわからない。

このほかAtlasG4SimのjobOptions_Geo2G4_Pythia.pyをやって20イベントmin-biasイベントを作ってみた。その後、Digitizationをcoして、DC2となってたのでseg fault. Rome-Initialにしてやりなおし。Digitはできた。

alignment program

To look at the alignment codes CVS areas, follow the following links: Robust Alignment:

http://isscvs.cern.ch/cgi-bin/viewcvs-all.cgi/offline/InnerDetector/InDetAlignment/SiRobustAlign/?cvsroot=3Datlas

Global Chi2 Alignment:

http://isscvs.cern.ch/cgi-bin/viewcvs-all.cgi/offline/InnerDetector/InDetAlignment/SiAlignment/?cvsroot=3Datlas

For the Global Chi2 Alignment, I just freshly added the stuff (the old prototype code is also there in src/proto for archiving). Most of the technical functionalities are tested. But there is still testing needed on the check of numbers, etc...

In particular, the output has not been tested yet, and there is still developement going on for the format of the output, the interaction with the Databases in the future, etc...

So you can run the program on events, produce bigvector/bigmatrix and/or do the solving but as I said the output has not been tested on a reasonable sample. Only detailed intermediate steps debugging has been performed for the ingredients.

I'll prepare some notes about problems I have observed and for which we should be aware.

Cheers,

Adlene.

Cosmic run Wiki Page

https://uimon.cern.ch/twiki/bin/view/Atlas/InDetCommissioning

Engineering Drawing の見つけ方

まずhpglのviewerをインストールします。

#ref(): File not found: "hpglview-530_Win95_NT_CERN.zip" at page "GeometryAlignment"

それからEDMSのNavigatorページに飛んで、図面を探します。Atlas Detector->Inner Detector->Semi Conductor Tracker->PBS-Barrel SCT->SCT-Barrels->Barrel 3 のなかに"ATLAS SCT BARREL - MOD ARRANG.B3+BARREL ENDS(TA11?)"というアッセンブリーの図面がありますが、この図面はCDDをクリックし、Visualize Drawingの項目のpre-visualizeをクリックすると見ることができます。

https://edms.cern.ch/cedar/plsql/cedarw.home?cookie=3287703&project=ATLAS

Oxford大学でのバレルのアッセンブリーの写真

http://natsci.kyokyo-u.ac.jp/~takasima/picture/zpOxford/index.html

アッセンブリーの本家オックスフォード大学のページ

http://www-pnp.physics.ox.ac.uk/~viehhaus

Calibration and Alignment page

http://atlas.web.cern.ch/Atlas/GROUPS/DATABASE/project/calib/

GeoModelではGeoAlignableTransformというのでGeometryの変換行列を作ってやると、あとでそこにDeltaというずれの行列を足せるようだ。ずれを変換行列どの順番のところで入れるのかはよくわからない。HepTransform3DはOpenGLと同様の回転のあと平行移動する4行4列の変換行列。このDeltaを作成するのはInnerDetector/InDetAlignment/InDetAlignAlgsで基本的にIOVSvcのパッケージを使う。MySQLで読めるはずだが、まだ高嶋は成功してない。PoolのデータとしてDeltaを書くのもあるようだがよくわからない。

Simulation on lxatl

SUSYの勉強もしないといけないので、東大のlxatlでEvent Generationをしてみた。まずは そのまま動かす。電子3イベント。でも最近はトップのページが元のmacroで動くものに戻っている。このG4AtlasAppsはgeant4をpythonで動かすもので将来のもの。

http://atlas.web.cern.ch/Atlas/GROUPS/SOFTWARE/OO/simulation/geant4/G4AtlasApps/doc/index.html

mkdir -p SimExample/10.0.1
. cmt.sh
copy requirements
cd SimExample/10.0.1; cmt config; . setup.sh -tag=opt
source xxx/AtlasRelease-10-00-01/cmt/setup.sh
mkdir run
cd run; get_files PDGTABLE.MeV; get_files G4AtlasApps/jobOptions.G4Atlas_Sim.py
athena.py jobOptions.G4Atlas_Sim.py >& JO1.log &
tail -f JO1.log

このあと、muonにして100イベント作った。これはヒット。Digitizeの時は、DC2とするかRome-Initialとするか選ばないと当然失敗する。

InDetRecExampleの使いかた

Wikiをたどると、これをやれとなっている。以下の操作でrootファイルができる。

login on lxplus
mkdir -p InDetRecExample/10.0.1
source /afs/cern.ch/sw/contrib/CMT/v1r16p20040901/mgr/setup.sh
cd InDetRecExample/10.0.1
copy requirement file and set version 10.0.1
cmt config
. setup.sh -tag=opt
cmt co -r InDetRecExample-00-27-01 InnerDetector/InDetExample/InDetRecExample
cd InnerDetector/InDetExample/InDetRecExample/*/cmt
cmt config
gmake
. setup.sh
. ../share/POOL_Setup.sh
cd ../run
get_files -symlink -data PDGTABLE.MeV
athena.py jopOptions.py

rootファイルはできたけど、dictionaryがないというエラーがでて読めない。結局ダメでないですか。

misalignment simulation

R. Hawkins package jump

mkdir InDetAlignAlgs
cd InDetAlignAlgs
source /afs/cern.ch/sw/contrib/CMT/v1r16p20040901/mgr/setup.sh
mkdir 9.3.0
cd 9.3.0
cp typical requirement to create work area
cmt config
. setup.sh
cmt co -r iPatRecExample-00-19-04 Reconstruction/iPat/iPatRecExample
cmt co -r InDetAlignAlgs-00-00-23 InnerDetector/InDetAlignment/InDetAlignAlgs
cd Reconstruction/iPat/iPatRecExample/*/cmt
cmt config
gmake
. setup.sh
cd ../run
cp ../share/* ./
. ../share/iPatSetup.sh

以下は試しに対話的にするとき

athena.py -i jobOptions.py
athena> theApp.initialize()
athena> theApp.nextEvent()
 ...
athena> theApp.exit()

イベントを走らせてヒストグラムを作るときは

cp jobOptions.py myJobOptions.py
Histogram のところを探してコメントを外した後
theApp.initialize()
for ievent in range(100):
 theApp.nextEvent()
theApp.exit()
をたす。
athena.py myJobOptions.py >& myJobOptions.log &
tail -f myJobOptions.log
ls *.root
root

アラインメントの ntupleをつくるには

myJobOptions.pyのtheApp.initialize()のまえに
include( "InDetAlignAlgs/WriteSiNtuple.py" )
をいれる。
このままだとHbookのものができるので、あとでIDから
バレルのレイヤーをとってきたりする細かいことがやりにくいので
InDetAlignAlgs/shareのWriteSiNtuple.pyのところをRootに変えておく。
今度は500イベントとした。
athena.py myJobOptions.py
できたidalign.rootを手近なところにコピー。
root
TFile *file = TFile::Open("idalign.root")
file.ls()
file.cd("IDAL")
file.ls()
100->MakeClass("IDAL") 

別のやりかた

TFile *file = TFile::Open("idalign.root")
TTree *ttree=(TTree*)file->Get("IDAL/100")
ttree->Print()
ttree->MakeClass("IDAL")
とすると、IDAL.h と IDAL.C ができるので詳細な解析が可能となる。

以下のファイルを使ってとりあえずデータを見る。

#ref(): File not found: "idalign.root" at page "GeometryAlignment"

root
.L IDAL.C
IDAL t
t.GetEntry(12) //12 イベント目を見る。
t.Show()
TFile *file = TFile::Open("idalign.root")
TTree *ttreeID=(TTree*)file->Get("IDAL/110") //indexよりmoduleの情報を得る。
ttreeID->GetEntry(1) //index 1のモジュールをさす。
ttreeID->Show()      //表示する。
というわけで、どういう風にプログラムを書くかわかったのであとは書くだけ

このntupleの残差はスペースポイントのものでないようだ。これだと意味が良く分らないので、やっぱりwikiを辿っていくと書いてあるInDetRecExampleをためしてみようと思う。 いちおう軸方向から見たイベントを表示するプログラムをMakeClassから作ったものを少し変えて、作った。.q idalint.Cとして、やめるときはCtl-C。intはinteractiveのつもり。TChainというのは、rootファイルが何個もある時に、連続解析するもの、ここではいらないがひとのを真似たので残っている。

#ref(): File not found: "IDAL.h" at page "GeometryAlignment"

#ref(): File not found: "IDALint.C" at page "GeometryAlignment"

#ref(): File not found: "idalint.C" at page "GeometryAlignment"

Oracle data base

http://atlas-php.web.cern.ch/atlas-php/DDDB/node_tag_browser.php

CLHEP 1.8.0.0 のdoxygen file

http://natsci.kyokyo-u.ac.jp/~takasima/doxy/CLHEP1800/html/index.html

RobustAlign のdoxygen file

Robust Alignmentは注目するモジュールの位置のみをパラメータとしてカイ2乗の最小化を行うもの。これをすべてのモジュールについて個別に行い、その繰り返しを行ってアライメントする。このプログラムはアテナを使うものではない。このほかに全モジュールの位置と飛跡のパラメータをすべてパラメータとし、一度にカイ2乗の最小化を行ってアラインメントを行う方法も検討されている。

http://natsci.kyokyo-u.ac.jp/~takasima/doxy/SiRobustAlign/html/index.html

ダニエル ヒンソンのページ

http://www-pnp.physics.ox.ac.uk/~hindson/

FrontPage


トップ   一覧 単語検索 最終更新   ヘルプ   最終更新のRSS