AliRoot Core  ee782a0 (ee782a0)
AliTPCCmpNG.C File Reference
#include "iostream.h"
#include <stdio.h>
#include <string.h>
#include "Rtypes.h"
#include "TFile.h"
#include "TTree.h"
#include "TString.h"
#include "TBenchmark.h"
#include "TStopwatch.h"
#include "TParticle.h"
#include "AliRun.h"
#include "AliStack.h"
#include "AliTPCtrack.h"
#include "AliSimDigits.h"
#include "AliTPCParam.h"
#include "AliTPC.h"
#include "AliDetector.h"
#include "AliTrackReference.h"
#include "TSystem.h"
#include "TTimer.h"
#include "AliTPCTracking.C"
#include "Getline.h"
#include "TChain.h"
Include dependency graph for AliTPCCmpNG.C:

Go to the source code of this file.

Classes

class  TPCGenInfo
 
class  digitRow
 
class  TPCFindGenTracks
 
class  TPCCmpTr
 

Functions

void WaitForReturn ()
 
Bool_t ImportgAlice (TFile *file)
 
TFile * OpenAliceFile (char *fn, Bool_t importgAlice=kFALSE, char *mode="read")
 
Int_t Chain (TString baseDir, TString subDirNameMask, TString fn, TChain &chain)
 

Variables

const Int_t kgRowBytes = 32
 

Detailed Description

version: 1.0 description: define a class TPCGenTrack save TPC related properties of tracks into a single tree

input: Int_t nEvents ... nr of events to process Int_t firstEventNr ... first event number (starts from 0) char* fnRecTracks .. name of file with reconstructed tracks char* fnHits ... name of file with hits and Kine Tree char* fnDigits ... name of file with digits char* fnTracks .. output file name, default genTracks.root

How to use: Typical usage: .L AliTPCCmpNG.C+ TPCFindGenTracks *t = new TPCFindGenTracks("galice.root","tpc.digits.root") t->Exec(); .q aliroot .L AliTPCCmpNG.C+ TPCCmpTr *t2 = new TPCCmpTr("tpc.tracks.root","genTracks.root","cmpTracks.root"); t2->Exec();

Details:

Step 1 - summurize information from simulation

Compile macro with ACLIC: .L AliTPCCmpNG.C+ create an object TPCFindGenTracks, which processes information from simulations. As input it needs: object gAlice: to get magnetic field TreeK: to get parameters of generated particles TreeTR: to get track parameters at the TPC entry TreeD: to get number of digits and digits pattern for a given track in TPC These input objects can be in different files, gAlice, TreeK and TreeTR are in the file fnHits, TreeD in the file fnDigits (can be the same as fnHits. Output is written to the file fnRes ("genTracks.root" by default). Use can specify number of events to process and the first event number: TPCFindGenTracks *t = new TPCFindGenTracks("galice.root","tpc.digits.root","genTracks.root",1,0) The filenames in the example on previous line are defaults, user can specify just the file name with gAlice object (and TreeTR and TreeK), so equivalent shorter initialization is: TPCFindGenTracks *t = new TPCFindGenTracks("galice.root") The task is done by calling Exec() method: t->Exec(); User can set different debug levels by invoking: t->SetDebug(debugLevel) Number of events to process and the first event number can be specified as parameters to Exec: t->Exec(nEvents, firstEvent) Then you have to quit root to get rid of problems with deleting gAlice object (it is not deleted, but read again in the following step):

Step 2 - compare reconstructed tracks with simulated

Load (and compile) the macro: .L AliTPCCmpNG.C+ Create object TPCCmpTr, which does the comparison. As input it requires name of the file with reconstructed TPC tracks. You can specify name of the file with genTrack tree (summarized info about simulation), file with gAlice object, output file name, number of events to process and first event number: TPCCmpTr *t2 = new TPCCmpTr("tpc.tracks.root","genTracks.root","cmpTracks.root","galice.root",1,0); The interface is quite similar to the TPCFindGenTracks class. Then just invoke Exec() method: t2->Exec();

Step 3 - study the results

Load the outoput TTree and you can do Draw(), Scan() or other usual things to do with TTree: TFile f = new TFile("cmpTracks.root") TTree *t = (TTree)f->Get("TPCcmpTracks") t->Draw("fVDist[3]","fReconstructed")

History:

24.09.02 - first version 24.01.03 - v7, before change from TPC Special Hits to TrackReferences 26.01.03 - change from TPC Special Hits to TrackReferences (loop over TreeTR instead of TreeH) 28.01.03 - v8 last version before removing TPC special point 28.01.03 - remove TPC special point, loop over TreeH store TParticle and AliTrack 29.01.03 - v9 last version before moving the loop over rec. tracks into separate step 03.02.03 - rename to AliTPCCmpNG.C, remove the part with rec. tracks (will be addded in a macro AliTPCCmpTr.C

Author
Jiri Chudoba
Date
24.09.2002

Definition in file AliTPCCmpNG.C.

Function Documentation

Int_t Chain ( TString  baseDir,
TString  subDirNameMask,
TString  fn,
TChain &  chain 
)

chain all files fn in the subdirectories which match subDirName return number of chained files

Definition at line 182 of file AliTPCCmpNG.C.

Bool_t ImportgAlice ( TFile *  file)

read in gAlice object from the file

Definition at line 212 of file AliTPCCmpNG.C.

Referenced by OpenAliceFile(), and AliSimulation::RunDigitization().

TFile * OpenAliceFile ( char *  fn,
Bool_t  importgAlice = kFALSE,
char *  mode = "read" 
)

Definition at line 220 of file AliTPCCmpNG.C.

Referenced by TPCFindGenTracks::Exec(), and TPCCmpTr::Exec().

void WaitForReturn ( )

wait until user press return;

Definition at line 161 of file AliTPCCmpNG.C.

Variable Documentation