// Display a 3D histogram using GL (box option).
//Author: Timur Pocheptsov
void glh3c()
{
gStyle->SetCanvasPreferGL(kTRUE);
TGLTH3Composition * comp = new TGLTH3Composition;
TH3F * h1 = new TH3F("h1", "h1", 10, -1., 1., 10, -1., 1., 10, -1., 1.);
h1->FillRandom("gaus");
h1->SetFillColor(kRed);
TH3F * h2 = new TH3F("h2", "h2", 10, -1., 1., 10, -1., 1., 10, -1., 1.);
h2->FillRandom("landau");
h2->SetFillColor(kGreen);
TH3F * h3 = new TH3F("h3", "h3", 10, -1., 1., 10, -1., 1., 10, -1., 1.);
h3->FillRandom("gaus");
h3->SetFillColor(kBlue);
comp->AddTH3(h1);
comp->AddTH3(h2, TGLTH3Composition::kSphere);
comp->AddTH3(h3);
comp->Draw();
TPaveLabel *title = new TPaveLabel(0.04, 0.86, 0.96, 0.98,
"TH3 composition.");
title->SetFillColor(32);
title->Draw();
}
(cfr recent posts about the tiny scheme things ... )
//macro illustrating how to animate a picture using a Timer
//Author: Rene Brun
#include "TStyle.h"
#include "TCanvas.h"
#include "TF2.h"
#include "TTimer.h"
Double_t pi;
TF2 *f2;
Float_t t = 0;
Float_t phi = 30;
void anim()
{
gStyle->SetCanvasPreferGL(true);
gStyle->SetFrameFillColor(42);
TCanvas *c1 = new TCanvas("c1");
c1->SetFillColor(17);
pi = TMath::Pi();
f2 = new TF2("f2","sin(2*x)*sin(2*y)*[0]",0,pi,0,pi);
f2->SetParameter(0,1);
f2->SetNpx(15);
f2->SetNpy(15);
f2->SetMaximum(1);
f2->SetMinimum(-1);
f2->Draw("glsurf1");
TTimer *timer = new TTimer(20);
timer->SetCommand("Animate()");
timer->TurnOn();
}
void Animate()
{
//just in case the canvas has been deleted
if (!gROOT->GetListOfCanvases()->FindObject("c1")) return;
t += 0.05*pi;
f2->SetParameter(0,TMath::Cos(t));
phi += 2;
gPad->SetPhi(phi);
gPad->Modified();
gPad->Update();
}
Is that a Higgs-Boson?
// Model of a nucleus built from TGeo classes.
//
// Author: Otto Schaile
void nucleus(Int_t nProtons = 40,Int_t nNeutrons = 60)
{
Double_t NeutronRadius = 60,
ProtonRadius = 60,
NucleusRadius,
distance = 60;
Double_t vol = nProtons + nNeutrons;
vol = 3 * vol / (4 * TMath::Pi());
NucleusRadius = distance * TMath::Power(vol, 1./3.);
// cout << "NucleusRadius: " << NucleusRadius << endl;
TGeoManager * geom = new TGeoManager("nucleus", "Model of a nucleus");
geom->SetNsegments(40);
TGeoMaterial *matEmptySpace = new TGeoMaterial("EmptySpace", 0, 0, 0);
TGeoMaterial *matProton = new TGeoMaterial("Proton" , .938, 1., 10000.);
TGeoMaterial *matNeutron = new TGeoMaterial("Neutron" , .935, 0., 10000.);
TGeoMedium *EmptySpace = new TGeoMedium("Empty", 1, matEmptySpace);
TGeoMedium *Proton = new TGeoMedium("Proton", 1, matProton);
TGeoMedium *Neutron = new TGeoMedium("Neutron",1, matNeutron);
// the space where the nucleus lives (top container volume)
Double_t worldx = 200.;
Double_t worldy = 200.;
Double_t worldz = 200.;
TGeoVolume *top = geom->MakeBox("WORLD", EmptySpace, worldx, worldy, worldz);
geom->SetTopVolume(top);
TGeoVolume * proton = geom->MakeSphere("proton", Proton, 0., ProtonRadius);
TGeoVolume * neutron = geom->MakeSphere("neutron", Neutron, 0., NeutronRadius);
proton->SetLineColor(kRed);
neutron->SetLineColor(kBlue);
Double_t x, y, z, dummy;
Int_t i = 0;
while ( i< nProtons) {
gRandom->Rannor(x, y);
gRandom->Rannor(z,dummy);
if ( TMath::Sqrt(x*x + y*y + z*z) < 1) {
x = (2 * x - 1) * NucleusRadius;
y = (2 * y - 1) * NucleusRadius;
z = (2 * z - 1) * NucleusRadius;
top->AddNode(proton, i, new TGeoTranslation(x, y, z));
i++;
}
}
i = 0;
while ( i < nNeutrons) {
gRandom->Rannor(x, y);
gRandom->Rannor(z,dummy);
if ( TMath::Sqrt(x*x + y*y + z*z) < 1) {
x = (2 * x - 1) * NucleusRadius;
y = (2 * y - 1) * NucleusRadius;
z = (2 * z - 1) * NucleusRadius;
top->AddNode(neutron, i + nProtons, new TGeoTranslation(x, y, z));
i++;
}
}
geom->CloseGeometry();
geom->SetVisLevel(4);
top->Draw("ogl");
}
(http://www.oxygenbasic.org/forum/index.php?action=dlattach;topic=1202.0;attach=3348;image)
Is that a Higgs-Boson?
Nope, that's a Womans-Bosom.
The SFT (Software for Experiments) group is part of CERN (European Organization for Nuclear Research, http://www.cern.ch), and focuses on providing common software for its experiments. CERN is one of the world’s largest and most exciting centers for fundamental physics research. Experiments at CERN have probed the fundamental nature of matter and the forces which affect it. CERN is also the birthplace of the World Wide Web (http://info.cern.ch), invented by Tim Berners-Lee. The SFT group's efforts, like most of CERN's current activities, are directed towards the world’s highest-energy elementary particle accelerator - the Large Hadron Collider (LHC, http://public.web.cern.ch/public/en/lhc/lhc-en.html) and its experiments. There are four large experiments at the LHC (ALICE, ATLAS, CMS, LHCb) which seek to expand the frontiers of knowledge and complete our understanding of the constituents of matter and their interactions, of the conditions in the first instants after the Big Bang and of the differences between matter and anti-matter. During 2012, ATLAS and CMS announced the discovery of a new boson, which has been confirmed recently to have the properties of a Higgs boson - similar to the one required by the Standard Model of Particle Physics.
NOTE: The vast majority of our GSoC projects do not require any physics knowledge.
Operating the LHC and running each experiment requires a large amount of software. A large part of this software is common and open source. The open source software spans the range from system software to more specialized physics-oriented tools and toolkits.
The Root system (http://root.cern.ch/) is used to handle, store and analyze the data of all LHC experiments. The experiments store both their raw data and intermediate, processed results using Root, as it offers an open source format and is very compact. Having the data defined as a set of objects, it is possible to get access separately to particular attributes of the selected objects, without touching the remaining attributes. Root includes many tools for analysis of data, from histograming methods in an arbitrary number of dimensions, curve fitting, function evaluation, minimization, graphics and visualization. It includes also a built-in C++ interpreter the command language which is used as a scripting, or macro language.
The CERN Virtual Machine (CernVM, http://cernvm.cern.ch) is an R&D project established in the Software group of CERN’s Physics Department (PH/SFT) to investigate how virtualization technologies can be used to improve and simplify the daily interaction of physicists with experiment software frameworks and the Grid infrastructure. CernVM maintains a Virtual Software Appliance designed to provide a complete and portable environment for developing and running LHC data analysis applications on any end user computer (laptop, desktop) as well as on the Grid and on Clouds.
The Geant4 toolkit (http://cern.ch/geant4) is a key component of the common physics software. It simulates the interactions of radiation with material in any setup, including the detectors of the LHC or other High Energy Physics (HEP) experiments. Uses in other fields including medical diagnostics and to satellite engineering and planetary science. One use is assessing the effects of radiation on the electronics of satellites. Another is in designing improved medical detectors with specialised applications such as the Geant4 Application for Tomographic Emission GATE (http://www.opengatecollaboration.org). LHC experiments use Geant4 to compare the signatures of events from new physics (such as the Higgs boson and particles which are candidates for dark matter) to the signatures of events coming from known interactions which could mimic them. Geant4 is created by the Geant4 collaboration (http://geant4.org) of over 100 physicists and engineers from around the world, bringing together teams at leading High Energy Physics laboratories such as CERN (Geneva, Switzerland), Fermilab (Batavia, IL), KEK (Tsukuba, Japan), SLAC (Stanford, CA) and Triumf (Vancouver, Canada), as well as many universities and institutions. The toolkit continues to be developed to improve its precision and scope of application, and to better utilise current and emerging computer architectures.
CERN (European Organization for Nuclear Research) is one of the world’s largest and most exciting centers for fundamental physics research.
I hear nuclear physics does have a negative effect on man's abilities.