test beam 2002

24
November 16, 200 4 Nov/2004 J. Conrad, SPD general Me eting Jan Conrad CERN 1 Paul Nilsson, SPD Group Meeting , August 26, 2003 Test Beam 2002 Analysis Test Beam 2002 ITS beam test: offline software Jan Conrad (CERN, Pixel Group) SPD general meeting November, 2004

Upload: nate

Post on 12-Jan-2016

33 views

Category:

Documents


1 download

DESCRIPTION

Test Beam 2002. ITS beam test: offline software. Paul Nilsson, SPD Group Meeting , August 26, 2003. Jan Conrad (CERN, Pixel Group) SPD general meeting November, 2004. Test Beam 2002 Analysis. Contents. Introduction From Raw Data to Digits 1) Decoding, AliRoot structures - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

1

Paul Nilsson, SPD Group Meeting , August 26, 2003

Test Beam 2002 Analysis

Test Beam 2002ITS beam test: offline software

Jan Conrad (CERN, Pixel Group)

SPD general meeting November, 2004

Page 2: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

2

Contents IntroductionIntroduction From Raw Data to DigitsFrom Raw Data to Digits1)1)

Decoding, AliRoot structuresDecoding, AliRoot structuresAccessing the digits, example Accessing the digits, example

applicationsapplications Files (where,what, how ?)Files (where,what, how ?) Beyond DigitsBeyond Digits1) “digits” are the aliroot name for the raw detector information

(row, column, anode signal etc …) “Digitizer”

Page 3: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

3

Introduction

Beam TestBeam Test AnalysisAnalysis

Offline Software (AliRoot)Offline Software (AliRoot)

Page 4: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

4

People working on Digitizer: digitizer base class development: digitizer base class development: E. Crescio, J. C.E. Crescio, J. C. subdetector responsible: subdetector responsible: E. Crescio (SDD) , J. C. (SPD), E. Crescio (SDD) , J. C. (SPD), E. Fragiacomo (SSD)E. Fragiacomo (SSD) date-decodingdate-decoding T. Kuhr (I. Cali, J.C., E. Fragiacomo)T. Kuhr (I. Cali, J.C., E. Fragiacomo)

Page 5: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

5

Classes: Digitization of each detector as a sub-task of the task Digitization of each detector as a sub-task of the task

ITS digitization (TTask)ITS digitization (TTask) AliITSBeamTest: defines general set up (number of AliITSBeamTest: defines general set up (number of

SXDs modules etc …. later geometry)SXDs modules etc …. later geometry) AliITSBeamTestDigitizer: executes task, sets raw AliITSBeamTestDigitizer: executes task, sets raw

reader (for DATE format), sets file names etc.reader (for DATE format), sets file names etc. AliITSBeamTestDigAliITSBeamTestDig

AliITSBeamTestDigSXD:AliITSBeamTestDigSXD: Reads header info, calls decoder, fills Reads header info, calls decoder, fills

digits digits treetree AliITSRawStreamSXDAliITSRawStreamSXD

Decodes dataDecodes data

Page 6: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

6

Info extracted/Files produced Run info (number of events, event header info, Run info (number of events, event header info,

pointer to Digits file name)pointer to Digits file name) galice.rootgalice.root

Digits Row and Column coordinates Digits Row and Column coordinates stored in stored in ITS.Digits.rootITS.Digits.root

DDL header: Status info, event counters etcDDL header: Status info, event counters etc A) AliHeader (Event Tree of AliRoot) A) AliHeader (Event Tree of AliRoot)

galice.rootgalice.root B) ITS container (new file B) ITS container (new file ITS.Event.rootITS.Event.root))

Page 7: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

7

Example: AliITSBeamTestDigSPD Void AliITSbeamtestDigSPD::Exec(){Void AliITSbeamtestDigSPD::Exec(){ //Reads raw data for SPD, fill SPD digits tree//Reads raw data for SPD, fill SPD digits tree AliITSRawStreamSPD str(fReaderDate);AliITSRawStreamSPD str(fReaderDate); UChar_t BlockAttributes = fReaderDate>GetBlockAttributes(); UChar_t BlockAttributes = fReaderDate>GetBlockAttributes(); Int_t row = str.GetRow();Int_t row = str.GetRow(); Int_t col = str.GetColumn();Int_t col = str.GetColumn(); Int_t modID = str.GetModuleID();Int_t modID = str.GetModuleID(); const Int_t dgt[3] = {row,col,1}const Int_t dgt[3] = {row,col,1} new ((*newdigits[modID])[idig[modID]]) AliITSdigitSPD(dgt);new ((*newdigits[modID])[idig[modID]]) AliITSdigitSPD(dgt); …… …….. .. fAliHeader->SetOrbitNumber(0,OrbitNumber);fAliHeader->SetOrbitNumber(0,OrbitNumber); branch->Fill(); branch->Fill();

fTreeD->AutoSave();fTreeD->AutoSave();

AliRawReaderDate obj

DDL Header info

DDL Header info

Page 8: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

8

Example: Digitization Macro

Int_t DigitizeBeamTest(Int_t DigitizeBeamTest( AliITSbeamtestDigitizer* dig = new AliITSbeamtestDigitizer* dig = new

AliITSbeamtestDigitizer( …);AliITSbeamtestDigitizer( …); dig->SetDigitsFileName(digitfile); dig->SetDigitsFileName(digitfile); dig->SetRawDataFileName(rawfile);dig->SetRawDataFileName(rawfile); dig->SetNumberOfEventsPerFile(10000);dig->SetNumberOfEventsPerFile(10000); dig->SetStopEventNumber(10000);dig->SetStopEventNumber(10000); dig->SelectEvents(7);dig->SelectEvents(7); dig->ExecDigitization();dig->ExecDigitization();

Page 9: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

9

How does the AliRoot structure look ?

galice.rootgalice.root ITS.Digits.RootITS.Digits.Root

Event n

TreeD

ITSDigitSDD

ITSDigitSSD

ITSDigitSPD

ITSDigitSPD.fCoord1ITSDigitSPD.fCoord2ITSDigitSPD.fSignal

…….

Page 10: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

10

Accessing the digits:

In AliRoot access to data is provided by Loaders:In AliRoot access to data is provided by Loaders: AliRunLoader: run info AliRunLoader: run info

contained in file: galice.rootcontained in file: galice.root AliITSLoader: ITS infoAliITSLoader: ITS info

contained in file: ITS.Digits.rootcontained in file: ITS.Digits.root ITS.RawCl.rootITS.RawCl.root

…… ……....

Page 11: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

11

Accessing digits cont’d

Access digits via branch ITSDigitsSPD and Access digits via branch ITSDigitsSPD and TClonesArray of AliITSDigitSPD objectsTClonesArray of AliITSDigitSPD objects

Row and Columns are accessed via Getter Row and Columns are accessed via Getter functions in AliITSDigitSPDfunctions in AliITSDigitSPD GetRow(), GetColumn();GetRow(), GetColumn();

Page 12: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

12

A complete example

rl = AliRunLoader::Open("galice.root"); rl = AliRunLoader::Open("galice.root"); rl->LoadgAlice();rl->LoadgAlice(); itsl = (AliITSLoader*)rl->GetLoader("ITSLoader"); itsl = (AliITSLoader*)rl->GetLoader("ITSLoader"); itsl->LoadDigits("read");itsl->LoadDigits("read"); for(Int_t nev=0;nev<fEvMax;nev++){for(Int_t nev=0;nev<fEvMax;nev++){ rl->GetEvent(nev);rl->GetEvent(nev); TTree* treec = (TTree*)itsl->TreeD();TTree* treec = (TTree*)itsl->TreeD(); TClonesArray* digitsSPD = TClonesArray* digitsSPD =

TClonesArray("AliITSdigitSPD",1000);TClonesArray("AliITSdigitSPD",1000); TBranch* brSPD = treec->GetBranch("ITSDigitSPD");TBranch* brSPD = treec->GetBranch("ITSDigitSPD"); brSPD->SetAddress(&digitsSPD); brSPD->SetAddress(&digitsSPD);

Load Run info

Load Digit Tree

Select event

Page 13: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

13

A complete example: cont’dfor(Int_t i=0;i<nspd;i++){for(Int_t i=0;i<nspd;i++){ brSPD->GetEvent(i);brSPD->GetEvent(i); Int_t en=digitsSPD->GetEntries();Int_t en=digitsSPD->GetEntries(); for(Int_t nd=0;nd<en;nd++){for(Int_t nd=0;nd<en;nd++){ AliITSdigitSPD* dig = AliITSdigitSPD* dig = (AliITSdigitSPD*)digitsSPD->At(nd);(AliITSdigitSPD*)digitsSPD->At(nd); row = digrow = digGetRow();GetRow(); col = digcol = digGetColumn();GetColumn(); } // end digit loop} // end digit loop } // end module loop} // end module loop} // end event loop} // end event loop

Select module

Retrieve coordinates

Page 14: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

14

Correlations: SPD plane0 / plane1

Row Plane 1

Row

Pla

ne 0

Page 15: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

15

SPD/SDD correlation

SDD Plane 0 (Time)

SP

D P

lane

0

Page 16: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

16

Example: dissynchronisation due to SDD multi-event buffer

SDD Plane 0 (Time)

SP

D P

lane

0

Page 17: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

17

Example Macro /home/apixel/fast_look/correlationSPD.C /home/apixel/fast_look/correlationSPD.C 1)1)

correlates plane 0 and plane 1 of SPD correlates plane 0 and plane 1 of SPD /home/its/fast_look/correlationITS.C/home/its/fast_look/correlationITS.C

correlates SPD and SDDcorrelates SPD and SDD http://alice-project-spd-testbeam.web.cern.ch/alice-project-http://alice-project-spd-testbeam.web.cern.ch/alice-project-

spd-testbeam/testbeam2004/index.asp spd-testbeam/testbeam2004/index.asp ANALYSIS ANALYSIS SOFTWARESOFTWARE

1) by Fadmar Osmic

Page 18: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

18

Where is what ? raw data files: raw data files:

ITS: /castor/cern.ch/alice/testbeam/itsITS: /castor/cern.ch/alice/testbeam/its- e.g run # ~ 70: threshold scan for different angles- e.g run # ~ 70: threshold scan for different angles- e.g. run # > 297 target runs (some with FO trigger)- e.g. run # > 297 target runs (some with FO trigger)

SPD: /castor/cern.ch/alice/testbeam/spd_no_cdrSPD: /castor/cern.ch/alice/testbeam/spd_no_cdr Electronic Logbook:Electronic Logbook:

epaitbeam03:/local/its_site/DAQ/logFiles/logBookepaitbeam03:/local/its_site/DAQ/logFiles/logBook- general info about run (n. triggers, - general info about run (n. triggers,

missing events etc) given by DAQ.missing events etc) given by DAQ.- if lucky, comment by operator- if lucky, comment by operator

http://alice-project-spd-testbeam.web.cern.ch/alice-project-http://alice-project-spd-testbeam.web.cern.ch/alice-project-spd-testbeam/testbeam2004/index.aspspd-testbeam/testbeam2004/index.asp

Page 19: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

19

Automatic Digitization

PERL scripts for file processing:PERL scripts for file processing:AutoDigitize: fetches Raw files and AutoDigitize: fetches Raw files and

digitizes them, running permanently in digitizes them, running permanently in backgroundbackground

planned to used during TB, but too planned to used during TB, but too unstable conditionsunstable conditions

Page 20: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

20

Beyond digits

The aim is to use existing AliRoot routinesThe aim is to use existing AliRoot routines AliITSPreProcessing (see Paul)AliITSPreProcessing (see Paul)

AliITSCalibrationAliITSCalibration AliITSClusterFinder (existing, see if it AliITSClusterFinder (existing, see if it

works)works) AliITSTrackingSA (existing, see if it AliITSTrackingSA (existing, see if it

works)works)

Page 21: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

21

Test Beam 2002 Analysis

AliITSPreprocessorSPD StatusPål Nilsson

P. Nilsson

Noisy channel finder implemented in new AliITSPreprocessorSPD classNoisy channel finder implemented in new AliITSPreprocessorSPD class Two versions of the algorithmTwo versions of the algorithm

1.1. Optimized for data (noisy channels mixed with real hits)Optimized for data (noisy channels mixed with real hits)2.2. Optimized for calibration data (i.e. data taken without beam)Optimized for calibration data (i.e. data taken without beam)

Both versions scan the 2D histograms containing the digits (one histogram per Both versions scan the 2D histograms containing the digits (one histogram per SPD module)SPD module)

Algorithm 1 compares each bin with the surrounding channels (Algorithm 1 compares each bin with the surrounding channels (if the bin content > if the bin content > nn times the times the average neighborhood, it is considered “noisy”average neighborhood, it is considered “noisy”))

Algorithm 2 assumes only noisy channels present (Algorithm 2 assumes only noisy channels present (everything above a threshold is per everything above a threshold is per definition “noisy”definition “noisy”))

Identified noisy channels are so far only stored in a tree (work in progress)Identified noisy channels are so far only stored in a tree (work in progress)

Page 22: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

22

Test Beam 2002 Analysis

AliITSPreprocessorSPD Status

P. Nilsson

// Example of how to run the preprocessor for the SPD{ // Instantiate the preprocessor AliITSPreprocessorSPD prepSPD("run_its_189_5k.root");

// Select a geometry (either kALICEGeometry or kTestBeamGeometry) prepSPD.SetGeometryMode(AliITSPreprocessorSPD::kTestBeamGeometry);

// Select the noisy channel finder algorithm (either kOptimizedForRealData or // kOptimizedForCalibrationData, real data is default) prepSPD.SelectAlgorithm(AliITSPreprocessorSPD::kOptimizedForRealData);

// Set the minimum number of times a channel must have fired to be called noisy (default is 10.) prepSPD.SetThreshold(20.);

// Set the current bin content to average neighborhood ratio (default is 5.) prepSPD.SetThresholdRatio(5.);

// Set the number of events (default is all available events) prepSPD.SetMaximumNumberOfEvents(5000);

// Find the noisy channels prepSPD.FindNoisyChannels();

// Print out the found noisy channels (dump to standard output) prepSPD.PrintNoisyChannels();

// Remove the found noisy channels prepSPD.RemoveNoisyChannels();}

A noisy channel has to fire at least 20 times, 5 times the average of the neighbors

Page 23: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

23

Test Beam 2002 Analysis

AliITSPreprocessorSPD Status

P. Nilsson

Test Beam 2004 data – Hits in SPD module 1Test Beam 2004 data – Hits in SPD module 1

Raw data before noisy channelRaw data before noisy channelremovalremoval

After noisy channel removalAfter noisy channel removal

Data taken last week

Column

Row Row

Column

Not real m

aximum

Page 24: Test Beam 2002

November 16, 2004 Nov/2004

J. Conrad, SPD general MeetingJan Conrad CERN

24

Conclusions

Under test beam: offline very useful for Under test beam: offline very useful for data format check and correlation and data format check and correlation and synchronizationsynchronizationex: SDD multi event buffer problemex: SDD multi event buffer problem

first step in reconstruction completed first step in reconstruction completed (Raw2AliRoot + PreProcessing), next steps (Raw2AliRoot + PreProcessing), next steps have to be organizedhave to be organized