| theme | _class | backgroundColor | marp | footer | tags |
|---|---|---|---|---|---|
gaia |
lead |
true |
Daniel Brandenburg | 07142020 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Document file="StarVMC/Geometry/StgmGeo/StgmGeo1.xml"> | |
| <Replace match="GeV">*1.0E+0;</Replace> | |
| <Replace match="MeV">*1.0E-3;</Replace> | |
| <Replace match="keV">*1.0E-6;</Replace> | |
| <Module name="StgmGeo1" comment="Forward Tracking System Geometry / developed for the sTGC tracker"> | |
| <Created date="08/19/2021" /> | |
| <Author name="Daniel Brandenburg" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ifstream infile( starlight.c_str() ); | |
| int iEvent =0; | |
| while (infile) { | |
| string sEvent, sVertex, sTrack1, sTrack2; | |
| if (!getline( infile, sEvent )) break; | |
| if (!getline( infile, sVertex )) break; | |
| if (!getline( infile, sTrack1 )) break; | |
| if (!getline( infile, sTrack2 )) break; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static const Int_t nrp = 200; // number of R nodes in the map | |
| static const Int_t nzp = 800; // number of Z nodes in the map | |
| static const Float_t zm = 800.0; // map max length | |
| static const Float_t rm = 400.0; // map max radius | |
| static const Int_t nphi = 36; | |
| //________________________________________________________________________________ | |
| void Agufld(const Char_t *field = "FieldOn") { | |
| // if ( gClassTable->GetID("TGiant3") >= 0) { // root4star | |
| // gROOT->LoadMacro("bfc.C"); | |
| // bfc(-1,"MagF,nodefault",0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| TLatex tl; | |
| TString label = ""; | |
| TString klabel = ""; | |
| TH1* sliceFit(TH2 * h2, TString _klabel){ | |
| TF1 * fgyRes = new TF1( "fgyRes", "gaus" ); | |
| fgyRes->SetRange( -0.5, 0.5 ); | |
| h2->RebinX(4); | |
| h2->FitSlicesY( fgyRes ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Globals | |
| TGeoManager *geom; | |
| TGeoElementTable *table; | |
| // Materials | |
| TGeoMedium *mediumAir; | |
| TGeoMedium *mediumG10; | |
| TGeoMedium *mediumNPC02; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "TFile.h" | |
| #include "TH1F.h" | |
| #include "TH1D.h" | |
| #include "TH2F.h" | |
| #include "TH3F.h" | |
| #include "TCanvas.h" | |
| #include "TMath.h" | |
| #include "TVector3.h" | |
| #include "TLegend.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Author: Daniel Brandenburg | |
| # | |
| # This program is free software: you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation, either version 3 of the License, or | |
| # (at your option) any later version. | |
| # | |
| # This program is distributed in the hope that it will be useful, | |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cstdio> | |
| #include <iostream> | |
| #include <memory> | |
| #include <stdexcept> | |
| #include <string> | |
| #include <array> | |
| // credit : https://stackoverflow.com/users/58008/waqas | |
| // from : https://stackoverflow.com/questions/478898/how-do-i-execute-a-command-and-get-output-of-command-within-c-using-posix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //usr/bin/env root -l -b -q "$0( $1, \"$2\" )"; exit $? | |
| /* Calculate the nth moment of a distribution | |
| * | |
| * int n : order of the moment to calculate | |
| * TString filehist : | |
| */ | |
| double moment( int n = 1, TString filehist = "", float x1=0, float x2=-1 ){ | |
| cout << "Calculating moment " << n << " on " << filehist << endl; |