Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
trackSummaryAnalysis.C File Reference
#include <bitset>
#include <fstream>
#include <iostream>
#include <limits>
#include <map>
#include <string>
#include <vector>
#include <TCanvas.h>
#include <TChain.h>
#include <TF1.h>
#include <TFile.h>
#include <TH1F.h>
#include <TH2F.h>
#include <TH3F.h>
#include <TLegend.h>
#include <TMath.h>
#include <TStyle.h>
#include <TTree.h>
#include <TVectorF.h>
#include "CommonUtils.h"
#include "TreeReader.h"
+ Include dependency graph for trackSummaryAnalysis.C:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int trackSummaryAnalysis (const std::vector< std::string > &inFiles, const std::string &inTree, const std::string &outFile, const std::string &inConfig="", const std::string &outConfig="", unsigned long nEntries=0, unsigned int nPeakEntries=0, float pullRange=6., unsigned int nHistBins=61, unsigned int nPhiBins=10, const std::array< float, 2 > &phiRange={-M_PI, M_PI}, unsigned int nEtaBins=10, const std::array< float, 2 > &etaRange={-3, 3}, const std::vector< double > &ptBorders={0., std::numeric_limits< double >::infinity()}, const std::bitset< 7 > &residualPulls=std::bitset< 7 >{"1111111"}, const std::bitset< 5 > &auxiliary=std::bitset< 5 >{"11111"})
 

Function Documentation

int trackSummaryAnalysis ( const std::vector< std::string > &  inFiles,
const std::string &  inTree,
const std::string &  outFile,
const std::string &  inConfig = "",
const std::string &  outConfig = "",
unsigned long  nEntries = 0,
unsigned int  nPeakEntries = 0,
float  pullRange = 6.,
unsigned int  nHistBins = 61,
unsigned int  nPhiBins = 10,
const std::array< float, 2 > &  phiRange = {-M_PI, M_PI},
unsigned int  nEtaBins = 10,
const std::array< float, 2 > &  etaRange = {-3, 3},
const std::vector< double > &  ptBorders = {0., std::numeric_limits<double>::infinity()},
const std::bitset< 7 > &  residualPulls = std::bitset<7>{"1111111"},
const std::bitset< 5 > &  auxiliary = std::bitset<5>{"11111"} 
)

This ROOT script will plot the residual and pull of perigee track parameters (d0, z0, phi, theta, q/p, pT, t) from root file produced by the RootTrajectorySummaryWriter

Parameters
inFilesthe list of input files
inTreethe name of the input tree
outFilethe name of the output file
inConfigthe (optional) input configuration JSON file
outConfigthe (optional) output configuration JSON file
residualPullsthe bitset of the parameters set
Note
A lot of this could be done with creating appropriate TH3F histograms and chose the relevant projections, but this would need one loop through the entries per parameter and would create a very long analysis turn-around. That's why the data/histograms are prepared in handles and then filled in a single event analysis loop.

Helper method to handle range without possibility to read in

Parameters
handlethe parameter handle in question
handleTagthe unique tangle tag
peakEntriesthe number of entries used for range peaking

Preparation of handles / acceptance range

Helper method to analyse bins

Parameters
residualPullsMatrixthe 2D matrix of handles
auxiliaryMatrixthe 2D matrix of the auxiliary handles
matrixTagthe identification tag for the matrix
outputBordersthe border vector for the outer bins
innerBordersthe border vector for the inner bins
fXTitlethe title of the x axis of the first projection
sXTitlethe title of the x axis of the second projection
Note
this is a void function

Write out the projection histogram

Parameters
h2the 2D histogram as source for the projects
fXTitlethe title of the x axis of the first projection
fYTitlethe title of the y axis of the first projection
sXTitlethe title of the x axis of the second projection
sYTitlethe title of the y axis of the second projection

Definition at line 53 of file trackSummaryAnalysis.C.

View newest version in sPHENIX GitHub at line 53 of file trackSummaryAnalysis.C

Referenced by main().

+ Here is the caller graph for this function: