1 /////////////////////////////////////////
2 // Class for SSD raw2digits conv //
4 // Author: Enrico Fragiacomo //
5 // Date: October 2004 //
6 ////////////////////////////////////////
8 #include "AliITSgeom.h"
9 #include "AliITSdigitSSD.h"
10 #include "AliRawReader.h"
11 #include "AliITSRawStreamSSDv1.h"
12 #include "AliITSBeamTestDigSSD.h"
16 ClassImp(AliITSBeamTestDigSSD)
18 //_____________________________________________________________
19 AliITSBeamTestDigSSD::AliITSBeamTestDigSSD(): AliITSBeamTestDig(),
27 //_____________________________________________________________
28 AliITSBeamTestDigSSD::AliITSBeamTestDigSSD(const Text_t* name, const Text_t* title): AliITSBeamTestDig(name,title),
35 //__________________________________________________________________
36 AliITSBeamTestDigSSD::~AliITSBeamTestDigSSD() {
42 //_______________________________________________________________________
43 void AliITSBeamTestDigSSD::Exec(Option_t* /*opt*/) {
44 //Reads raw data for SSD, fill SSD digits tree, returns 1 if real data,
45 //returns 2 if calibration (injector) data, returns 3 if calibration (test pul //se) event
47 TBranch* branch = fTreeD->GetBranch("ITSDigitsSSD");
49 Error("Exec","fITSgeom is null!");
56 for(Int_t nlay=1;nlay<=fITSgeom->GetNlayers();nlay++){
57 for(Int_t nlad=1;nlad<=fITSgeom->GetNladders(nlay);nlad++){
58 for(Int_t ndet=1;ndet<=fITSgeom->GetNdetectors(nlay);ndet++){
59 Int_t index=fITSgeom->GetModuleIndex(nlay,nlad,ndet);
60 if(fITSgeom->GetModuleTypeName(index)=="kSPD") nspd++;
61 if(fITSgeom->GetModuleTypeName(index)=="kSDD") nsdd++;
62 if(fITSgeom->GetModuleTypeName(index)=="kSSD") nssd++;
66 Int_t maxn=nspd+nsdd+nssd;
68 TClonesArray** newdigits = new TClonesArray*[maxn];
70 Int_t* idig = new Int_t[maxn];
72 for (Int_t idet =0; idet <maxn;idet++) {
73 newdigits[idet] = new TClonesArray("AliITSdigitSSD");
77 // this constructor sets the flag to select SSD data only
78 // the Next method below will then jump to SSD data for this event
79 AliITSRawStreamSSDv1 str(fReader);
81 // no selection of equipment
82 //fReader->SelectEquipment(-1);
83 //fReader->SelectEquipment(17,102,102);
87 //if((str.GetADModule()!=2)&&(str.GetADModule()!=6)) continue;
89 Int_t side = str.GetSideFlag();
90 Int_t strip = str.GetStrip();
91 Int_t signal = str.GetSignal();
92 Int_t module = str.GetModuleID();
93 Int_t module1= module-10+nsdd+nspd;
94 if( (module<10) || (module>13) ) continue;
95 if(module1>7) continue;
96 const Int_t kdgt[3]={side,strip,signal};
97 // SSD modules 10, 11, 12 and 13
98 new ( (*newdigits[module1])[idig[module1]] ) AliITSdigitSSD(kdgt);
102 for(Int_t n=0;n<maxn;n++){
103 branch->SetAddress(&newdigits[n]);
107 fTreeD->SetEntries(maxn);
113 for(Int_t n=0;n<maxn;n++){