1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
17 ///////////////////////////////////////////////////////////////////////////////
19 /// This class provides access to beam test ITS SSD digits in raw data.
20 // Modified by Enrico Fragiacomo, October 2004, for beamtest analysis
22 ///////////////////////////////////////////////////////////////////////////////
24 #include "AliITSRawStreamSSDv1.h"
25 #include "AliRawReader.h"
27 ClassImp(AliITSRawStreamSSDv1)
30 AliITSRawStreamSSDv1::AliITSRawStreamSSDv1(AliRawReader* rawReader) :
31 AliITSRawStreamSSD(rawReader)
33 // create an object to read ITS SSD raw digits
37 fRawReader->Select(3);
38 fRawReader->SelectEquipment(17,102,102);
42 Bool_t AliITSRawStreamSSDv1::Next()
44 // read the next raw digit
45 // returns kFALSE if there is no digit left
49 fPrevModuleID = fModuleID;
51 if (!fRawReader->ReadNextInt(fData)) return kFALSE;
53 fADModule = (fData >> 27) & 0x0000000F;
54 fADC = (fData >> 23) & 0x0000000F;
56 // seq 0 (first 768 strips) or 1 are obtained from fCoord2
57 fCoord2 = (fData >> 12) & 0x000007FF;
58 seq = (fCoord2 >= 768) ? 1 : 0;
59 if(seq) fCoord2 = 1535 - fCoord2;
61 if((fCoord2<0)||(fCoord2>=768)) return kFALSE;
63 // ADModule 2 -> layer 5
64 // fCoord1 is set according to the cabling map
66 if ((fADC==0)&&(seq==0)) {fModuleID = 10; fCoord1=1;}
67 else if ((fADC==0)&&(seq==1)) {fModuleID = 11; fCoord1=1;}
68 else if ((fADC==1)&&(seq==0)) {fModuleID = 11; fCoord1=0;}
69 else if ((fADC==1)&&(seq==1)) {fModuleID = 10; fCoord1=0;}
71 // ADModule 6 -> layer 6
72 // fCoord1 is set according to the cabling map
73 else if(fADModule==6) {
74 if ((fADC==0)&&(seq==0)) {fModuleID = 12; fCoord1=0;}
75 else if ((fADC==0)&&(seq==1)) {fModuleID = 13; fCoord1=0;}
76 else if ((fADC==1)&&(seq==0)) {fModuleID = 13; fCoord1=1;}
77 else if ((fADC==1)&&(seq==1)) {fModuleID = 12; fCoord1=1;}
80 fSignal = (fData & 0x00000FFF);
82 if(fSignal>=2048) fSignal-=4096;