// $Id: AliHLTTPCCAPerformanceBase.cxx,v 1.11 2010/08/26 15:05:50 ikulakov Exp $ // ************************************************************************** // This file is property of and copyright by the ALICE HLT Project * // ALICE Experiment at CERN, All rights reserved. * // * // Primary Authors: Sergey Gorbunov * // Ivan Kisel * // for The ALICE HLT Project. * // * // Developed by: Igor Kulakov * // Maksym Zyzak * // * // Permission to use, copy, modify and distribute this software and its * // documentation strictly for non-commercial purposes is hereby granted * // without fee, provided that the above copyright notice appears in all * // copies and that both the copyright notice and this permission notice * // appear in the supporting documentation. The authors make no claims * // about the suitability of this software for any purpose. It is * // provided "as is" without express or implied warranty. * // * //*************************************************************************** #ifdef DO_TPCCATRACKER_EFF_PERFORMANCE #include "AliHLTTPCCounters.h" #include "AliHLTTPCParticlePerformanceBase.h" #include "AliHLTTPCPerformanceBase.h" #include "AliHLTTPCCAGBHit.h" #include "AliHLTTPCCAMCTrack.h" #ifndef HLTCA_STANDALONE #include "AliHLTTPCCAMCPoint.h" #endif #include "AliHLTTPCCAOutTrack.h" #include "AliHLTTPCCAGBTrack.h" #include "AliHLTTPCCAGBTracker.h" #include "AliHLTTPCCATracker.h" #include "AliHLTTPCCATracklet.h" #include "AliHLTTPCCADisplay.h" #include "TMath.h" #include "TROOT.h" #include "Riostream.h" #include "TFile.h" #include "TH1.h" #include "TH2.h" #include "TProfile.h" #include "TStyle.h" AliHLTTPCParticlePerformanceBase::AliHLTTPCParticlePerformanceBase() { const int NHisto_tmp = NTrackPulls + NTrackPullsAtProdVertex + NVertexPulls; NHisto = NHisto_tmp; fHistosInfo = new THistoInfo[NHisto]; fHistos = new TH1*[NHisto]; const float coeff1 = 10; const THistoInfo tmp[NHisto_tmp]= { THistoInfo( "resX", "track X resolution [cm]", 30, -0.25, 0.25 ), THistoInfo( "resY", "track Y resolution [cm]", 30, -0.25, 0.25 ), THistoInfo( "resZ", "track Z resolution [cm]", 30, -0.7, 0.7 ), THistoInfo( "resPx", "track Px resolution", 30, -0.3, 0.3 ), THistoInfo( "resPy", "track Py resolution", 30, -0.3, 0.3 ), THistoInfo( "resPz", "track Pz resolution", 30, -0.3, 0.3 ), THistoInfo( "pullX", "track X pull", 30, -7., 7. ), THistoInfo( "pullY", "track Y pull", 30, -7., 7. ), THistoInfo( "pullZ", "track Z pull", 30, -7., 7. ), THistoInfo( "pullPx", "track Px pull", 30, -7., 7. ), THistoInfo( "pullPy", "track Py pull", 30, -7., 7. ), THistoInfo( "pullPz", "track Pz pull", 30, -7., 7. ), THistoInfo( "resAtProdPointX", "track X resolution at prodaction point [cm]", 30, -0.25*coeff1, 0.25*coeff1 ), THistoInfo( "resAtProdPointY", "track Y resolution at prodaction point [cm]", 30, -0.25*coeff1, 0.25*coeff1 ), THistoInfo( "resAtProdPointZ", "track Z resolution at prodaction point [cm]", 30, -0.7*coeff1, 0.7*coeff1 ), THistoInfo( "resAtProdPointPx", "track Px resolution at prodaction point", 30, -0.3*coeff1, 0.3*coeff1 ), THistoInfo( "resAtProdPointPy", "track Py resolution at prodaction point", 30, -0.3*coeff1, 0.3*coeff1 ), THistoInfo( "resAtProdPointPz", "track Pz resolution at prodaction point", 30, -0.3*coeff1, 0.3*coeff1 ), THistoInfo( "pullAtProdPointX", "track X pull at prodaction point", 30, -7., 7. ), THistoInfo( "pullAtProdPointY", "track Y pull at prodaction point", 30, -7., 7. ), THistoInfo( "pullAtProdPointZ", "track Z pull at prodaction point", 30, -7., 7. ), THistoInfo( "pullAtProdPointPx", "track Px pull at prodaction point", 30, -7., 7. ), THistoInfo( "pullAtProdPointPy", "track Py pull at prodaction point", 30, -7., 7. ), THistoInfo( "pullAtProdPointPz", "track Pz pull at prodaction point", 30, -7., 7. ), THistoInfo( "resVertexX", "vertex X resolution [cm]", 30, -0.25, 0.25 ), THistoInfo( "resVertexY", "vertex Y resolution [cm]", 30, -0.25, 0.25 ), THistoInfo( "resVertexZ", "vertex Z resolution [cm]", 30, -0.7, 0.7 ), THistoInfo( "pullVertexX", "vertex X pull", 30, -7., 7. ), THistoInfo( "pullVertexY", "vertex Y pull", 30, -7., 7. ), THistoInfo( "pullVertexZ", "vertex Z pull", 30, -7., 7. ) }; for (int iHisto = 0; iHisto < NHisto; iHisto++){ fHistosInfo[iHisto] = tmp[iHisto]; } for( int i=0; i < NHisto; i++ ){ fHistos[i] = 0; } } void AliHLTTPCParticlePerformanceBase::CreateHistos(string histoDir, TFile* outFile) { TDirectory *curdir = gDirectory; if ( (histoDir != "") && outFile) { // create in file outFile->cd(); fHistoDir = outFile->mkdir( TString(histoDir) ); fHistoDir->cd(); gDirectory->mkdir( "TrackInput" ); gDirectory->cd( "TrackInput" ); int ih = 0; // i of Histo for( int i = 0; i < NTrackPulls; i++, ih++ ){ fHistos[ih] = new TH1D(fHistosInfo[ih].name, fHistosInfo[ih].title, fHistosInfo[ih].nx, fHistosInfo[ih].left, fHistosInfo[ih].right); } gDirectory->cd( ".." ); gDirectory->mkdir( "TrackAtVertex" ); gDirectory->cd( "TrackAtVertex" ); for( int i = 0; i < NTrackPullsAtProdVertex; i++, ih++ ){ fHistos[ih] = new TH1D(fHistosInfo[ih].name, fHistosInfo[ih].title, fHistosInfo[ih].nx, fHistosInfo[ih].left, fHistosInfo[ih].right); } gDirectory->cd( ".." ); gDirectory->mkdir( "Vertex" ); gDirectory->cd( "Vertex" ); for( int i = 0; i < NVertexPulls; i++, ih++ ){ fHistos[ih] = new TH1D(fHistosInfo[ih].name, fHistosInfo[ih].title, fHistosInfo[ih].nx, fHistosInfo[ih].left, fHistosInfo[ih].right); } gDirectory->cd( ".." ); curdir->cd(); } else{ // create not in file static int iaddName = 0; // haven't any subfolders so create with different names TString addName = TString(iaddName); int ih = 0; // i of Histo for( int i = 0; i < NTrackPulls + NTrackPullsAtProdVertex + NVertexPulls; i++, ih++, addName = TString(iaddName++) ){ fHistos[ih] = new TH1D(fHistosInfo[ih].name+addName, fHistosInfo[ih].title, fHistosInfo[ih].nx, fHistosInfo[ih].left, fHistosInfo[ih].right); } for( int i = 0; i < NHisto; i++ ){ fHistos[i]->SetDirectory(0); } } SetHistoCreated(); } void AliHLTTPCParticlePerformanceBase::FillHistos() { } // void AliHLTTPCParticlePerformanceBase::FillHistos() #endif //DO_TPCCATRACKER_EFF_PERFORMANCE