From c2b0eaa42c805fb1812232dcadc5b4de3f2f5404 Mon Sep 17 00:00:00 2001 From: kowal2 Date: Mon, 7 Oct 2002 07:18:32 +0000 Subject: [PATCH] Updated macro by J. Belikov --- TPC/AliTPCComparison.C | 11 +------- TPC/AliTPCDisplayClusters.C | 25 +++++++++++++++-- TPC/AliTPCDisplayDigits.C | 55 +++++++++++++++++++++++++------------ TPC/AliTPCFindClusters.C | 15 ++++------ TPC/AliTPCFindTracks.C | 4 +++ TPC/AliTPCPropagateBack.C | 4 +++ TPC/AliTPCtest.C | 12 +++++--- 7 files changed, 82 insertions(+), 44 deletions(-) diff --git a/TPC/AliTPCComparison.C b/TPC/AliTPCComparison.C index d29d11eca45..00d5c15f1c0 100644 --- a/TPC/AliTPCComparison.C +++ b/TPC/AliTPCComparison.C @@ -291,16 +291,7 @@ Int_t good_tracks_tpc(GoodTrackTPC *gt, const Int_t max, const Int_t event) { Int_t ver = TPC->IsVersion(); cerr<<"TPC version "<Get("75x40_100x60"); - if(digp){ - cerr<<"2 pad-lenght geom hits with 3 pad-length geom digits...\n"; - delete digp; - digp = new AliTPCParamSR(); - } - else - { - digp =(AliTPCParamSR *)gDirectory->Get("75x40_100x60_150x60"); - } + AliTPCParamSR *digp=(AliTPCParamSR*)file->Get("75x40_100x60_150x60"); if (!digp) { cerr<<"TPC parameters have not been found !\n"; exit(6); } TPC->SetParam(digp); diff --git a/TPC/AliTPCDisplayClusters.C b/TPC/AliTPCDisplayClusters.C index 2663f53d0e4..11e89633875 100644 --- a/TPC/AliTPCDisplayClusters.C +++ b/TPC/AliTPCDisplayClusters.C @@ -1,3 +1,23 @@ +/**************************************************************************** + * Origin: I.Belikov, CERN, Jouri.Belikov@cern.ch * + ****************************************************************************/ + +#ifndef __CINT__ +#include +#include +#include +#include +#include +#include +#include +#include + +#include "AliTPCParam.h" +#include "AliTPCClustersArray.h" +#include "AliTPCClustersRow.h" +#include "AliTPCcluster.h" +#endif + Int_t AliTPCDisplayClusters(Int_t eventn=0, Int_t noiseth=15) { cerr<<"Displaying clusters...\n"; @@ -7,7 +27,7 @@ Int_t AliTPCDisplayClusters(Int_t eventn=0, Int_t noiseth=15) { TFile *cf=TFile::Open("AliTPCclusters.root"); if (!cf->IsOpen()){cerr<<"Can't open AliTPCclusters.root !\n"; return 3;} - AliTPCParam *dig=(AliTPCParam *)cf->Get("75x40_100x60"); + AliTPCParam *dig=(AliTPCParam *)cf->Get("75x40_100x60_150x60"); if (!dig) {cerr<<"TPC parameters have not been found !\n"; return 2;} TCanvas *c1=new TCanvas("cdisplay", "Cluster display",0,0,700,730); @@ -50,8 +70,7 @@ Int_t AliTPCDisplayClusters(Int_t eventn=0, Int_t noiseth=15) { cf->Close(); TGeometry *geom=(TGeometry*)file->Get("AliceGeom"); - TList *list = geom->GetListOfNodes(); - TNode * main = (geom->GetListOfNodes())->First(); + TNode * main = (TNode*)((geom->GetListOfNodes())->First()); TIter next(main->GetListOfNodes()); TNode *module=0; while((module = (TNode*)next())) { diff --git a/TPC/AliTPCDisplayDigits.C b/TPC/AliTPCDisplayDigits.C index 771165e998b..6acd064c542 100644 --- a/TPC/AliTPCDisplayDigits.C +++ b/TPC/AliTPCDisplayDigits.C @@ -1,3 +1,19 @@ +/**************************************************************************** + * Origin: I.Belikov, CERN, Jouri.Belikov@cern.ch * + ****************************************************************************/ + +#ifndef __CINT__ +#include +#include +#include +#include +#include +#include + +#include "AliTPCParam.h" +#include "AliSimDigits.h" +#endif + Int_t AliTPCDisplayDigits(Int_t eventn, int sec, int row, int lab=-1, int max_t_chan=500, float min_t=0., float max_t=500., int max_p_chan=150, float min_p=0., float max_p=150.) @@ -10,36 +26,41 @@ Int_t AliTPCDisplayDigits(Int_t eventn, int sec, int row, int lab=-1, - AliTPCParam *par=(AliTPCParam *)f->Get("75x40_100x60"); + AliTPCParam *par=(AliTPCParam *)f->Get("75x40_100x60_150x60"); + if (!par) { cerr<<"TPC parameters have not been found !\n"; return 2; } - char s[80]; + Char_t s[80]; sprintf(s,"Sector %d Row %d\n",sec,row); TH2F *h = new TH2F("h",s,max_t_chan,min_t,max_t,max_p_chan,min_p,max_p); - char name[100]; - sprintf(name,"TreeD_75x40_100x60_%d",eventn); + Char_t name[100]; + sprintf(name,"TreeD_75x40_100x60_150x60_%d",eventn); TTree *t=(TTree*)f->Get(name); + if (!t) { cerr<<"TPC digits have not been found !\n"; return 3; } AliSimDigits dummy, *digit=&dummy; t->GetBranch("Segment")->SetAddress(&digit); - for (int i=0; iGetEntries(); i++) { - t->GetEvent(i); - int ss,rr; - par->AdjustSectorRow(digit->GetID(),ss,rr); - if (ss==sec && rr==row) goto ok; + Int_t sbr=(Int_t)t->GetEntries(); + for (Int_t i=0; iGetEvent(i)) continue; + Int_t s,r; + par->AdjustSectorRow(digit->GetID(),s,r); + if (s==sec && r==row) goto ok; } - return 2; - + return 4; + ok: - int imax=0, jmax=0, qmax=0; + + Int_t imax=0, jmax=0, qmax=0; digit->First(); do { - Short_t dig=digit->CurrentDigit(); - int i=digit->CurrentRow(), j=digit->CurrentColumn(); + //Short_t dig=digit->CurrentDigit(); + Int_t i=digit->CurrentRow(), j=digit->CurrentColumn(); + Short_t dig=digit->GetDigit(i,j); if (lab >= 0) { - int lab0=digit->GetTrackID(i,j,0); - int lab1=digit->GetTrackID(i,j,1); - int lab2=digit->GetTrackID(i,j,2); + Int_t lab0=digit->GetTrackID(i,j,0); + Int_t lab1=digit->GetTrackID(i,j,1); + Int_t lab2=digit->GetTrackID(i,j,2); if (lab0!=lab) if (lab1!=lab) if (lab2!=lab) continue; if (dig>qmax) {imax=i; jmax=j; qmax=dig;} cerr< #include "AliRun.h" @@ -26,16 +30,7 @@ Int_t AliTPCFindClusters(Int_t n=1) { Int_t ver = TPC->IsVersion(); cerr<<"TPC version "<Get("75x40_100x60"); - if(dig){ - cerr<<"2 pad-length geom hits with 3 pad-lengths geom digits\n"; - delete dig; - dig = new AliTPCParamSR(); - } - else - { - dig=(AliTPCParamSR *)gDirectory->Get("75x40_100x60_150x60"); - } + AliTPCParam *dig=(AliTPCParam *)in->Get("75x40_100x60_150x60"); if (!dig) {cerr<<"TPC parameters have not been found !\n"; return 4;} TStopwatch timer; diff --git a/TPC/AliTPCFindTracks.C b/TPC/AliTPCFindTracks.C index 4c3d32ed2bc..c636c54b46b 100644 --- a/TPC/AliTPCFindTracks.C +++ b/TPC/AliTPCFindTracks.C @@ -1,3 +1,7 @@ +/**************************************************************************** + * Origin: I.Belikov, CERN, Jouri.Belikov@cern.ch * + ****************************************************************************/ + #ifndef __CINT__ #include #include "AliTPCParam.h" diff --git a/TPC/AliTPCPropagateBack.C b/TPC/AliTPCPropagateBack.C index 746bdd91921..72e5ecb198b 100644 --- a/TPC/AliTPCPropagateBack.C +++ b/TPC/AliTPCPropagateBack.C @@ -1,3 +1,7 @@ +/**************************************************************************** + * Origin: I.Belikov, CERN, Jouri.Belikov@cern.ch * + ****************************************************************************/ + #ifndef __CINT__ #include #include "AliTPCtracker.h" diff --git a/TPC/AliTPCtest.C b/TPC/AliTPCtest.C index 20a95f63839..a2b76cc035c 100644 --- a/TPC/AliTPCtest.C +++ b/TPC/AliTPCtest.C @@ -1,3 +1,7 @@ +/**************************************************************************** + * Origin: I.Belikov, CERN, Jouri.Belikov@cern.ch * + ****************************************************************************/ + Int_t AliTPCtest() { Int_t rc=0; @@ -21,8 +25,8 @@ AliKalmanTrack::SetConvConst(1000/0.299792458/gAlice->Field()->SolenoidField()); gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCHits2Digits.C"); if (rc=AliTPCHits2Digits()) return rc; - // gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCDisplayDigits.C"); - // if (rc=AliTPCDisplayDigits(1,1)) return rc; + //gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCDisplayDigits.C"); + //if (rc=AliTPCDisplayDigits(1,1)) return rc; } @@ -30,8 +34,8 @@ AliKalmanTrack::SetConvConst(1000/0.299792458/gAlice->Field()->SolenoidField()); gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCFindClusters.C"); if (rc=AliTPCFindClusters()) return rc; - // gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCDisplayClusters.C"); - // if (rc=AliTPCDisplayClusters()) return rc; + //gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCDisplayClusters.C"); + //if (rc=AliTPCDisplayClusters()) return rc; gROOT->LoadMacro("$(ALICE_ROOT)/TPC/AliTPCFindTracks.C"); if (rc=AliTPCFindTracks()) return rc; -- 2.43.0