Wednesday, May 30, 2007

Research:D0:cafe:top_cafe: topology variables in top_cafe package

We have lots of topological variables used: I have to remember them all :-(

00055   double TopTopologicalVariables::Centrality() const 
00056 {
00057 return Ht()/H();
00058 } // Centrality()
00059
00061 double TopTopologicalVariables::Aplanarity() const
00062 {
00063 ensurePV();
00064 return 1.5 * (*_pv)[2]; // alternative syntax: ... * _pv->operator[](2)
00065 } // Aplanarity()
00066
00068 double TopTopologicalVariables::Sphericity() const
00069 {
00070 ensurePV();
00071 return 1.5 * ( (*_pv)[2] + (*_pv)[1] );
00072 } // Sphericity()

Monday, May 28, 2007

Research:WestGrid:Reprocessing: sam cannot find the name zhiyil

When I submit jobs (d0 data p20 reprocessing) to westgrid, once my keberos expired, I have to type my password again to re-create keberos certificate. However, even I type correct password, I was still given the following error: zhiyil cannot be found.

The solution should be:
kdestroy
and
remove the file /tmp/PROXY_zhiyil

But sometimes they are not working. Confused....
==============
Traceback (most recent call last):
File "/export/D0_products/ups/prd/jim_client/NULL/v3_0_1/bin/samg", line 179, in ?
sys.exit(main(sys.argv))
File "/export/D0_products/ups/prd/jim_client/NULL/v3_0_1/bin/samg", line 175, in main
command_function(arguments)
File "samg_submit.py", line 262, in samg_submit
File "samg_submit.py", line 133, in translate
File "samg_submit.py", line 157, in translateDoc
File "/export/D0_products/ups/prd/jim_client/NULL/v3_0_1/lib/jim_client/mergejob.py", line 862, in checkSemantic
samgjob.Doc.checkSemantic(self)
File "/home/parag/wspace/samgrid/V7/JIMSUITE/jim_client/lib/jim_client/samgjob.py", line 828, in checkSemantic
File "/export/D0_products/ups/prd/jim_client/NULL/v3_0_1/lib/jim_client/mergejob.py", line 887, in createAttribute
attr = Attribute.factory(token, self.context)
File "/export/D0_products/ups/prd/jim_client/NULL/v3_0_1/lib/jim_client/mergejob.py", line 515, in factory
newDefname,snapId=context.createDatasetfromDimension(tokenValue)
File "/export/D0_products/ups/prd/jim_client/NULL/v3_0_1/lib/jim_client/mergejob.py", line 326, in createDatasetfromDimension
sam_user = jim_client_util.getUserName()
File "/home/parag/wspace/samgrid/V7/JIMSUITE/jim_client/lib/jim_client/jim_client_util.py", line 177, in getUserName
File "sam_common_pylibSamCommand/BlessedCommandInterfacePlaceHolder.py", line 81, in __call__
File "sam_common_pylibSamCommand/CommandInterface.py", line 251, in __call__
File "sam_common_pylibSamCommand/SamCommandInterface.py", line 243, in apiWrapper
File "sam_user_pyapi/src/samUtility.py", line 317, in implementation
File "sam_common_pylibSamCorba/SamServerProxy.py", line 257, in _callRemoteMethod
File "sam_common_pylibSamCorba/SamServerProxyRetryHandler.py", line 266, in handleCall
SamException.SamExceptions.PersonNotFound: GridSubject with name '/DC=gov/DC=fnal/O=Fermilab/OU=People/CN=Zhiyi Liu/USERID=zhiyil' not found.

Saturday, May 26, 2007

Research:D0:caf_util: about processor EMJetMatching

The processor EMJetMatching doesn't throw any events away, basically, it just tries to loop all EM objects which may be in the cone with a jet. Here if EM and Jet are in the jet cone, then label this JET as EM, say, change flag isEM() true, if not, label isEM() as false. Why? Since we isEM() is set as reconstructing, so it may not be right.

The processor EMJetMatching is based on the class SelectUserObjects. The latter has documentation as below.

/**
* Select objects based on a user defined cut.
*
* The cut is supplied by the user by overriding the
* virtual selectObject(const T& obj) method.
*
* To use this class, inherit from it, passing the desired
* object type to the base class:
*
* class MySelector : public SelectUserObjects {
*
* Then override the selectObject(const TMBJet& obj) method.
* The user can also override two more methods (which do nothing
* by default):
*
* void before(Collection& from);
* void after(Collection& accepted, Collection& rejected);
*
* Configuration options:
*
* - .From: OldBranchname [required]
* - .To: NewBranchName [required]
* - .RejectedBranch: NewBranchName for the rejected objects [default none]
* - .Tree: OutputTreeName[default: name()]
* - .Variables: Member variable list [default: all]
*
* - .LoadAll: Load whole object before it is copied [default: 1]
* You should probably never change this if you don't know exactly
* what you are doing.
*
* \ingroup cafe
*/

Monday, May 21, 2007

D0:software:network: my laptop is blocked

Fnal has a network policy, and my laptop is blocked since I open X window without certificates. The method to solve it is to import certificate to my browser. Follow the instruction on the given link. but I don't have kx509 installed. I cannot find any on network (since links are dead), so I find there is kx509 installed and copy it and its corresponding libs to my local laptop. and run the script get-cert.sh with -i, works.

Sunday, May 20, 2007

D0:MET: how to get access to right MET

In D0 framework, MET issue is very tricky. I am sick of how to get access to it and always spent lots of time on it. Here, I would try my best to clarify it:

- MET has several components: CH, JES, MU, Bad Jets. Based on your study, you could choose different configuration, usually, we use:

CH+JES+EM+MU

-However, for JES, we have corrJet, corrmuJet, smear_corrJet, smear_corrmuJET etc, here Jet is JCCA or JCCB. For MU, we have MU or CALOMU.

- But a point making things more complicated is: in JES, sometime we apply muon correction which may be counted later in MET, in order to avoid double contributions from muon correction, we should keep in mind it!!

Friday, May 18, 2007

英文标点符号翻译大全

+ plus 加号;正号
  - minus 减号;负号
  ± plus or minus 正负号
  × is multiplied by 乘号
  ÷ is divided by 除号
  = is equal to 等于号
  ≠ is not equal to 不等于号
  ≡ is equivalent to 全等于号
  ≌ is equal to or approximately equal to 等于或约等于号
  ≈ is approximately equal to 约等于号

  < is less than 小于号
  > is more than 大于号
  ≮ is not less than 不小于号
  ≯ is not more than 不大于号
  ≤ is less than or equal to 小于或等于号
  ≥ is more than or equal to 大于或等于号
  % per cent 百分之...
  ‰ per mill 千分之...
  ∞ infinity 无限大号
  ∝ varies as 与...成比例

  √ (square) root 平方根
  ∵ since; because 因为
  ∴ hence 所以
  ∷ equals, as (proportion) 等于,成比例
  ∠ angle 角
  ⌒ semicircle 半圆
  ⊙ circle 圆
  ○ circumference 圆周
  π pi 圆周率
  △ triangle 三角形

  ⊥ perpendicular to 垂直于
  ∪ union of 并,合集
  ∩ intersection of 交,通集
  ∫ the integral of ...的积分
  ∑ (sigma) summation of 总和
  ° degree 度
  ′ minute 分
  ″ second 秒
  ℃ Celsius system 摄氏度

  { open brace, open curly 左花括号
  } close brace, close curly 右花括号
  ( open parenthesis, open paren 左圆括号
  ) close parenthesis, close paren 右圆括号
  () brakets/ parentheses 括号
  [ open bracket 左方括号
  ] close bracket 右方括号
  [] square brackets 方括号
  . period, dot 句号,点
  | vertical bar, vertical virgule 竖线

  & ampersand, and, reference, ref 和,引用
  * asterisk, multiply, star, pointer 星号,乘号,星,指针
  / slash, divide, oblique 斜线,斜杠,除号
  // slash-slash, comment 双斜线,注释符
  # pound 井号
  \ backslash, sometimes
  escape 反斜线转义符,有时表示转义符或续行符
  ~ tilde 波浪符

  . full stop 句号
  , comma 逗号
  : colon 冒号
  ; semicolon 分号
  ? question mark 问号
  ! exclamation mark (英式英语) exclamation point (美式英语)
  ' apostrophe 撇号
  - hyphen 连字号
  -- dash 破折号
  ... dots/ ellipsis 省略号

  " single quotation marks 单引号
  "" double quotation marks 双引号
  ‖ parallel 双线号
  & ampersand = and
  ~ swung dash 代字号
  § section; division 分节号
  → arrow 箭号;参见号

Saturday, May 12, 2007

Linux: installation: how to solve the problem: autochk program not found-------skipping autochk

Today I help my girlfriend to install the 2nd operating system since she is always bothered by virus under Windows xp. So I decide to help her to install Mandriva 2007 which is the easy-going distribution in the Linux world for a beginner. I ever installed double systems many times and have some ideas how to avoid tricky things like problems caused by partitions.

Now I will briefly describe the entire steps for other people's reference. First, in windows, I learned partitions by PartitionMagic and try to release a space for Linux installation. This is pretty simple, but I would strongly recommend to backup the table before you may do unrecovered and dangerous things. Okay, thus a space has been built for Linux with the format ex3. And then restart. Insert Mandriva DVD installtion disk to start install as usual. Make sure to pay more attention on partition part! You could use existing partition which just was released from Windows by PartitionMargic or you use 'custom mode' (note: even use this mode, you have to build a free space before doing that since Linux can destroy your data). Okay, thus we have a new system! But a tricky problem is comming as transfering to Windows! The problem is: when I try to start Windows XP, after flashing Windows startup bar, I was given a blue screen with words: program autochk.exe not found ===== skipping authochk and then restart to new loop. Calm down and try to search internet for useful stuff. This can be solved. At last, I think I find the answer. The source is from the partition of Windows has been hidden. What you do is just to unhidden it! The method here is a bit different from the useful message below (I got the basic idea from it).

1. In the terminal of Linux, type as a rooter:
fdisk -l /dev/hda
(thus you are given a partition table, you should see the windows partition as hidden, please copy the table for backup in case of making mistakes), then run:
fdisk /dev/hda
type t to enter a mode to change ID from 17 to 7. Then done! I don't have too much time to write it down. Please refer to Chinese version from other body.
=============================================
WinXP下安装Linux9.0实战
摘自 精彩奇讯 开化党 2005-04-28 13:07
http://www.sun126.com/bbs/ccb/index.cgi

暑 假正是我们这些计算机迷学习实战经验的最好时机,所以我选择了一只想要学习的RedHatLinux9.0作为这个暑假的学习重点。但是在安装Linux 的过程中,我先后遇到了很多棘手的问题,我翻阅了一些相关书籍,上网查找资料,经过了一整天的努力,终于实现了WinXP和Linux的双系统。而且最重 要的是,对以前的WinXP系统没有什么影响。现在,我就将我安装过程中总结出来的经验分享给大家。

我的硬盘是 40G的,分为CDEF四个分区,WinXP就安装在C盘里面。我的D盘为8G,正好可以安装Linux。于是我将D盘的资料移动到F盘里面,并用分区工 具PartitionMagic8.0把D盘改成主分区。由于Linux需要一个相当于内存的两倍大小的swap分区,而且越*近硬盘前面的主面就越好, 因此我用分区工具在刚才删除掉的D盘的空闲空间的前面部分分出一个256M的LinuxSwap分区(因为我的内存为128M)。然后将剩余的空闲空间格 式化成Linux可以用的ext3文件系统。这样,分区准备工作就完成了。

接着,我就开始用 RedHatLinux9.0的安装盘安装Linux,在分区的时候,选择手动分区,这是只要将以前分好的ext3挂在"/"目录就可以继续安装了。安装 的时候要记住管理员的密码,特别注意的是管理员的账号是root,而不是我们平常Windows里面的Administrator或者Admin。至于多 系统引导,我采用的是简单的GRUB。由于Linux9.0采用了简体中文图形安装界面,安装过程还是比较简单的。

安装 完以后就能顺利进入Linux操作系统了。但是,这时候我发现位于硬盘第一个分区(hda1)的WinXP不能启动了,启动过程中会出现autochk program not found-------skipping autochk的字样,然后就自动重启,而且总是重复这样的现象,就连安全模式都进不去。

在查阅相关资料以后,发现应该 是第一个分区被隐藏掉了(Hidden)。于是,我用root账户进入了Linux,修改/boot/grub目录里面的grub.conf文件,在 Title WindowsXP下面加上了一句Unhide (hd0,0)。可是重新启动以后还是出现不能启动的问题。在经过多次尝试后,我打算换一种方法。

于是我想到了 Linux安装盘中的救援模式(Linux Rescue Mode),我把第一张安装盘放到光驱里面,从光盘启动,键入linux rescue后回车,进入了救援模式。用fdisk -l /dev/hda命令发现hda1的System为(Hidden)HPFS/NTFS,只要把这个改成HPFS/NTFS就可以了。用fdisk /dev/hda命令开启fdisk模式。用t命令选择hda1后输入7然后回车(7在这里就是代表的HPFS/NTFS,而以前的(Hidden) HPFS/NTFS的ID为17)。紧接着,输入w保存当前硬盘分区信息,再输入exit就可以退出救援模式了。同时,系统也重新启动(记得这时候将安装 盘拿出来,或者在Bios设置里面把第一项Boot改为硬盘启动)。而且我已经能够进入WinXP了。

可是,我发现这时候的WinXP只有4种颜色,而且在桌面设置里面只有800*600一种分辨率,不过,这只是小问题,只要将显卡的驱动程序重新安装一遍就可以了。

至此,可以说是大功告成,在没有影响到以前的WinXP的情况下,我安装上了Linux操作系统。希望我的这些经验能够给将要安装学习Linux的朋友们一些帮助。也希望有越来越多的人加入到学习Linux的行列中来。




Monday, May 7, 2007

Linux:ssh: how to use ssh command remotely

Usually, when you want to run a command on a remote computer, you have to log in first. If you have ssh, you can use remote-command way:

ssh your.remote.computer.com yourCommandHere

For example,
ssh smart.phys.sfu.ca date

Friday, May 4, 2007

Research:D0:Triggers: how to get report of certain triggers or trigger list

Now D0 users don't need so-called authentication to get trigger report. The basic approach is

  1. visit D0 work page: http://www-d0.fnal.gov/atwork/index.html
  2. Click TriggerMeister
  3. Click Trigger Database
Here click "report", then you are given the page to input username and password, Database: production, Role: guest, thus DB username and password can be none! Enjoy trigger database!

Locations of visitors to this page