Go to the source code of this file.
|
| int | main (int argc, char *argv[]) |
| |
◆ CHECK
◆ HIST_INIT
| #define HIST_INIT |
( |
|
NAME, |
|
|
|
AXIS_LABEL, |
|
|
|
AXIS_N, |
|
|
|
AXIS_XL, |
|
|
|
AXIS_XH |
|
) |
| |
Value: do{ \
h_##NAME =
new TH2F(#NAME, #NAME
";#eta;" AXIS_LABEL, 50,-2.5,2.5, \
AXIS_N, AXIS_XL, AXIS_XH); \
} while (false)
◆ TrkSelTool
◆ main()
| int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
Definition at line 69 of file InDetTrackSelectionToolTester.cxx.
73 #define CHECK( ARG ) do {ASG_CHECK_SA( APP_NAME, ARG );} while (false)
89 StatusCode::enableFailure();
96 unique_ptr< TFile >
ifile( TFile::Open(
fileName.data(),
"READ" ) );
97 StatusCode gotFile =
ifile.get()!=
nullptr ? StatusCode::SUCCESS : StatusCode::FAILURE;
106 Long64_t
entries =
event.getEntries();
108 const Long64_t
e = atoll(
argv[ 2 ] );
114 unique_ptr< TFile >
outFile(
new TFile(
"IDTrackSelectionToolTestOut.root",
"RECREATE"));
117 const vector<string> cutNames = {
"NoCut",
"Loose",
"LoosePrimary",
"TightPrimary",
"LooseMuon",
"LooseElectron",
"MinBias",
"HILoose",
"HITight",
"HILooseOptimized",
"HITightOptimized"};
118 const vector<string> otherCutNames = {
"IP",
"IPSigma",
"IPSignificance"};
119 std::map<string, unique_ptr<TrkSelTool> > selToolMap;
120 std::map<string, unique_ptr<HistFamily> > histFamilyMap;
121 for (
const auto&
cut : cutNames) {
122 selToolMap[
cut] = unique_ptr<TrkSelTool>(
new TrkSelTool( (
cut+
"TrackSelection") ));
127 selToolMap[
"IP"] = unique_ptr<TrkSelTool>(
new TrkSelTool(
"IPTrackSelection"));
131 histFamilyMap[
"IP"] = unique_ptr<HistFamily>(
new HistFamily(
"IP"));
132 selToolMap[
"IPSigma"] = unique_ptr<TrkSelTool>(
new TrkSelTool(
"IPSigmaTrackSelection"));
136 histFamilyMap[
"IPSigma"] = unique_ptr<HistFamily>(
new HistFamily(
"IPSigma"));
137 selToolMap[
"IPSignificance"] = unique_ptr<TrkSelTool>(
new TrkSelTool(
"IPSignificanceTrackSelection"));
138 CHECK( selToolMap[
"IPSignificance"]->
setProperty(
"maxD0overSigmaD0", 3.0 ) );
139 CHECK( selToolMap[
"IPSignificance"]->
setProperty(
"maxZ0SinThetaoverSigmaZ0SinTheta", 3.0 ) );
141 histFamilyMap[
"IPSignificance"] = unique_ptr<HistFamily>(
new HistFamily(
"IPSignificance"));
155 const auto it_pv = std::find_if(vertices->
cbegin(), vertices->
cend(),
157 {return vtx->vertexType() == xAOD::VxType::PriVtx;});
158 const xAOD::Vertex* primaryVertex = (it_pv == vertices->
cend()) ?
nullptr : *it_pv;
159 if (primaryVertex ==
nullptr) Warning(
APP_NAME,
"No primary vertex found." );
162 if (
track ==
nullptr) {
166 for (
const auto&
cut : cutNames) {
169 for (
const auto&
cut : otherCutNames) {
177 for (
const auto& selTool : selToolMap)
CHECK( selTool.second->finalize() );
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
outFile
Comment Out Those You do not wish to run.
Class describing a TrackParticle.