240 likes | 404 Views
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
E N D
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 J. Conrad, SPD general MeetingJan Conrad CERN
Contents • Introduction • From Raw Data to Digits1) • Decoding, AliRoot structures • Accessing the digits, example applications • Files (where,what, how ?) • Beyond Digits • “digits” are the aliroot name for the raw detector information • (row, column, anode signal etc …) “Digitizer” J. Conrad, SPD general MeetingJan Conrad CERN
Introduction Offline Software (AliRoot) Beam TestAnalysis J. Conrad, SPD general MeetingJan Conrad CERN
People working on Digitizer: • digitizer base class development: E. Crescio, J. C. • subdetector responsible: E. Crescio (SDD) , J. C. (SPD), E. Fragiacomo (SSD) • date-decoding T. Kuhr (I. Cali, J.C., E. Fragiacomo) J. Conrad, SPD general MeetingJan Conrad CERN
Classes: • Digitization of each detector as a sub-task of the task ITS digitization (TTask) • AliITSBeamTest: defines general set up (number of SXDs modules etc …. later geometry) • AliITSBeamTestDigitizer: executes task, sets raw reader (for DATE format), sets file names etc. • AliITSBeamTestDig • AliITSBeamTestDigSXD: Reads header info, calls decoder, fills digits tree AliITSRawStreamSXD Decodes data J. Conrad, SPD general MeetingJan Conrad CERN
Info extracted/Files produced • Run info (number of events, event header info, pointer to Digits file name) • galice.root • Digits Row and Column coordinates • stored in ITS.Digits.root • DDL header: Status info, event counters etc • A) AliHeader (Event Tree of AliRoot) • galice.root • B) ITS container (new file ITS.Event.root) J. Conrad, SPD general MeetingJan Conrad CERN
Example: AliITSBeamTestDigSPD AliRawReaderDate obj Void AliITSbeamtestDigSPD::Exec(){ //Reads raw data for SPD, fill SPD digits tree AliITSRawStreamSPD str(fReaderDate); UChar_t BlockAttributes = fReaderDate>GetBlockAttributes(); Int_t row = str.GetRow(); Int_t col = str.GetColumn(); Int_t modID = str.GetModuleID(); const Int_t dgt[3] = {row,col,1} new ((*newdigits[modID])[idig[modID]]) AliITSdigitSPD(dgt); …….. fAliHeader->SetOrbitNumber(0,OrbitNumber); branch->Fill(); fTreeD->AutoSave(); DDL Header info DDL Header info J. Conrad, SPD general MeetingJan Conrad CERN
Example: Digitization Macro • Int_t DigitizeBeamTest( AliITSbeamtestDigitizer* dig = new AliITSbeamtestDigitizer( …); dig->SetDigitsFileName(digitfile); • dig->SetRawDataFileName(rawfile); dig->SetNumberOfEventsPerFile(10000); dig->SetStopEventNumber(10000); dig->SelectEvents(7); dig->ExecDigitization(); J. Conrad, SPD general MeetingJan Conrad CERN
How does the AliRoot structure look ? • galice.root • ITS.Digits.Root Event n TreeD ITSDigitSDD ITSDigitSPD.fCoord1 ITSDigitSSD ITSDigitSPD.fCoord2 ITSDigitSPD.fSignal ITSDigitSPD ……. J. Conrad, SPD general MeetingJan Conrad CERN
Accessing the digits: • In AliRoot access to data is provided by Loaders: • AliRunLoader: run info • contained in file: galice.root • AliITSLoader: ITS info • contained in file: ITS.Digits.root • ITS.RawCl.root …….. J. Conrad, SPD general MeetingJan Conrad CERN
Accessing digits cont’d • Access digits via branch ITSDigitsSPD and TClonesArray of AliITSDigitSPD objects • Row and Columns are accessed via Getter functions in AliITSDigitSPD • GetRow(), GetColumn(); J. Conrad, SPD general MeetingJan Conrad CERN
A complete example Load Run info rl = AliRunLoader::Open("galice.root"); rl->LoadgAlice(); itsl = (AliITSLoader*)rl->GetLoader("ITSLoader"); itsl->LoadDigits("read"); for(Int_t nev=0;nev<fEvMax;nev++){ rl->GetEvent(nev); TTree* treec = (TTree*)itsl->TreeD(); TClonesArray* digitsSPD = TClonesArray("AliITSdigitSPD",1000); TBranch* brSPD = treec->GetBranch("ITSDigitSPD"); brSPD->SetAddress(&digitsSPD); Load Digit Tree Select event J. Conrad, SPD general MeetingJan Conrad CERN
A complete example: cont’d Select module for(Int_t i=0;i<nspd;i++){ brSPD->GetEvent(i); Int_t en=digitsSPD->GetEntries(); for(Int_t nd=0;nd<en;nd++){ AliITSdigitSPD* dig = (AliITSdigitSPD*)digitsSPD->At(nd); row = digGetRow(); col = digGetColumn(); } // end digit loop } // end module loop } // end event loop Retrieve coordinates J. Conrad, SPD general MeetingJan Conrad CERN
Correlations: SPD plane0 / plane1 Row Plane 0 Row Plane 1 J. Conrad, SPD general MeetingJan Conrad CERN
SPD/SDD correlation SPD Plane 0 SDD Plane 0 (Time) J. Conrad, SPD general MeetingJan Conrad CERN
Example: dissynchronisation due to SDD multi-event buffer SPD Plane 0 SDD Plane 0 (Time) J. Conrad, SPD general MeetingJan Conrad CERN
Example Macro • /home/apixel/fast_look/correlationSPD.C 1) • correlates plane 0 and plane 1 of SPD • /home/its/fast_look/correlationITS.C • correlates SPD and SDD • http://alice-project-spd-testbeam.web.cern.ch/alice-project-spd-testbeam/testbeam2004/index.asp ANALYSIS SOFTWARE 1) by Fadmar Osmic J. Conrad, SPD general MeetingJan Conrad CERN
Where is what ? • raw data files: ITS: /castor/cern.ch/alice/testbeam/its - e.g run # ~ 70: threshold scan for different angles - e.g. run # > 297 target runs (some with FO trigger) SPD: /castor/cern.ch/alice/testbeam/spd_no_cdr • Electronic Logbook: epaitbeam03:/local/its_site/DAQ/logFiles/logBook - general info about run (n. triggers, missing events etc) given by DAQ. - if lucky, comment by operator http://alice-project-spd-testbeam.web.cern.ch/alice-project-spd-testbeam/testbeam2004/index.asp J. Conrad, SPD general MeetingJan Conrad CERN
Automatic Digitization • PERL scripts for file processing: • AutoDigitize: fetches Raw files and digitizes them, running permanently in background planned to used during TB, but too unstable conditions J. Conrad, SPD general MeetingJan Conrad CERN
Beyond digits • The aim is to use existing AliRoot routines • AliITSPreProcessing (see Paul) AliITSCalibration • AliITSClusterFinder (existing, see if it works) • AliITSTrackingSA (existing, see if it works) J. Conrad, SPD general MeetingJan Conrad CERN
AliITSPreprocessorSPD StatusPål Nilsson Noisy channel finder implemented in new AliITSPreprocessorSPD class • Two versions of the algorithm • Optimized for data (noisy channels mixed with real hits) • Optimized for calibration data (i.e. data taken without beam) • Both versions scan the 2D histograms containing the digits (one histogram per SPD module) • Algorithm 1 compares each bin with the surrounding channels (if the bin content > n times the average neighborhood, it is considered “noisy”) • Algorithm 2 assumes only noisy channels present (everything above a threshold is per definition “noisy”) • Identified noisy channels are so far only stored in a tree (work in progress) Test Beam 2002 Analysis J. Conrad, SPD general MeetingJan Conrad CERN P. Nilsson
AliITSPreprocessorSPD Status // 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 Test Beam 2002 Analysis J. Conrad, SPD general MeetingJan Conrad CERN P. Nilsson
AliITSPreprocessorSPD Status Data taken last week Test Beam 2004 data – Hits in SPD module 1 Not real maximum Test Beam 2002 Analysis Row Row Column Column Raw data before noisy channel removal After noisy channel removal J. Conrad, SPD general MeetingJan Conrad CERN P. Nilsson
Conclusions • Under test beam: offline very useful for data format check and correlation and synchronization • ex: SDD multi event buffer problem • first step in reconstruction completed (Raw2AliRoot + PreProcessing), next steps have to be organized J. Conrad, SPD general MeetingJan Conrad CERN