Skip to content

Instantly share code, notes, and snippets.

@f-ilic
f-ilic / dqmgui cmds
Last active March 27, 2017 12:31
dqmgui misc command
# FIND RUNNING SERVERS
ps aux | grep -v grep | grep monGui
# STOP
/data/yichen/TempGUI/current/config/dqmgui/manage -f online stop "I did read documentation"
# RESTART
/data/yichen/TempGUI/current/config/dqmgui/manage -f online restart "I did read documentation"
# SOURCE
@f-ilic
f-ilic / TProfile2Poly_Tutorial.md
Last active May 3, 2017 14:17
TProfile2Poly Tutorials

TProfile2Poly Tutorial 1

We will present how to use the TProfile2Poly class to create polygonal bins that simulate particle detector panels which are being hit by charged particles. The goal is to measure differences in charge if one or more such panels are malfunctioning.

Description

The geometry of the CMS Pixel end cap is stored as x,y coordinate triplet rows where where one triplet defines a detector panel.

The script generates numEvents (script argument) were their x,y coordinates are Gaussian distributed with 0 mean, but different sigmas. Each event also has a value (in our interpretation charge) associated with it.

using Pixel = vector<float>;
class Patch {
Patch(int x, int y, float* img, int img_width, int patchsize);
Pixel at(int x, int y) {
return getRow(y)[x];
}
vector<Pixel> getRow(int row_idx) {

TProfile2Poly

Addition of TProfile2Poly class. It is analogous to TH2D/TProfile2D; except it allows the creation of profiles of histograms that have polygonal bins. Just for a quick recap some of the functionality includes:

  • Creatation of bins that allow filling with Fill()
  • Setting the error being calculated as either kERRORSPREAD or kERRORMEAN
  • Setting the bin content to either the Average or Error in Z for plotting purposes (SetContentToAverage() / SetContentToAverage())
  • Merging whole Profile2Polys
@f-ilic
f-ilic / GuiPlotTool.md
Last active June 12, 2017 11:54
ROOT / CMS GuiPlotTool How-To manual

Goal

This tool is ment to Merge and Superimpose plots from DQMData.

UI Overview

UI Overview

UI Overview

@f-ilic
f-ilic / init.lua
Last active December 25, 2017 16:28
local function pressFn(mods, key)
if key == nil then
key = mods
mods = {}
end
return function() hs.eventtap.keyStroke(mods, key, 1000) end
end
local function remap(mods, key, pressFn)
@f-ilic
f-ilic / main.py
Last active August 23, 2017 15:59
fb friend addition/removal plot
import matplotlib.pyplot as plt
import datetime as td
# In case anyone wants to try this themselves:
# Download your facebook zipped facebook history.
# There you'll find a file named fiends.html
# Format the paragraph with "added friends" / "deleted friends" to look like
# replacing </li><li> with newline
"""
@f-ilic
f-ilic / gist:6a2f510e95ffe52161b04c4ef592b808
Last active September 26, 2017 10:45
Davix, Alessandro share
void test() {
TString configfeatures = gROOT->GetConfigFeatures();
if (configfeatures.Contains("davix"))
cout << "[ OK ] compiled correctly" << endl;
string cert = "/afs/cern.ch/user/f/filic/.globus/usercert.pem";
string key = "/afs/cern.ch/user/f/filic/.globus/userkey.pem";
gEnv->SetValue("Davix.GSI.UserCert",cert.c_str());
gEnv->SetValue("Davix.GSI.UserKey",key.c_str());
@f-ilic
f-ilic / README.MD
Last active November 25, 2023 18:29
Remaping keyboard files

Remapping keys

  • Download .zip file, unzip, and cd into extracted
  • Run setup.sh
  • changes the US layout option to 21st century keyboard navigation
  • tldr; Capslock disabled, Capslock used as new modifier key
  • navigation with
    • caps + j, k, l, i = arrows in arrow layout
    • caps + u, o = home, end
  • caps + h, ; = backspace, delete
@f-ilic
f-ilic / README.md
Last active September 5, 2022 10:59
Desktop entry for whatsapp

What is dis

  • create .desktop entry for whatsapp
  • achieved by using webwhatsapp but starting it as chrome instance that looks like standalone appication
  • all thats left to do, is download this zip, and run setup.sh