1 #if !defined(__CINT__) || defined(__MAKECINT__)
3 #include "AliTPCBuffer.h"
7 void AliTPCDDL(char* FileName,Int_t eth=0){
9 //Digits stored into a file have an amplitude value greater than eth
10 TFile *cf=TFile::Open(FileName);
11 // old geometry (3.07)
12 //AliTPCParamSR *param =(AliTPCParamSR *)cf->Get("75x40_100x60");
13 // if new geometry comment out the line above and uncomment the one below
14 AliTPCParamSR *param =(AliTPCParamSR *)cf->Get("75x40_100x60_150x60");
15 AliTPCDigitsArray *digarr=new AliTPCDigitsArray;
19 //sprintf(cname,"TreeD_75x40_100x60_%d",eventn);
20 // if new geometry comment out the line above and uncomment the one below
22 sprintf(cname,"TreeD_75x40_100x60_150x60_%d",eventn);
23 digarr->ConnectTree(cname);
24 AliTPCBuffer *b=new AliTPCBuffer("AliTPCDDL.dat");
25 Int_t nrows=Int_t(digarr->GetTree()->GetEntries());
26 cout<<"Number of entries "<<nrows<<endl;
29 for (Int_t n=0; n<nrows; n++) {
30 AliSimDigits *digrow=(AliSimDigits*)digarr->LoadEntry(n);
32 Int_t sec,row; // sector and row number (in the TPC)
33 param->AdjustSectorRow(digrow->GetID(),sec,row);
34 // cout<<sec<<" row "<<row<<endl;
43 //the whole row is written into the output file
44 b->WriteRowBinary(eth,digrow,0,0,0,sec,SubSec,row);
46 //only the pads in the range [37;48] are written into the output file
47 b->WriteRowBinary(eth,digrow,37,48,1,sec,SubSec,row);
49 //only the pads outside the range [37;48] are written into the output file
50 b->WriteRowBinary(eth,digrow,37,48,2,sec,SubSec,row);
54 //outer sector [36;71]
56 if((row!=27)&&(row!=76))
57 b->WriteRowBinary(eth,digrow,0,0,0,sec,SubSec,row);
60 //only the pads outside the range [43;46] are written into the output file
61 b->WriteRowBinary(eth,digrow,43,46,2,sec,SubSec,row);
63 //only the pads in the range [43;46] are written into the output file
64 b->WriteRowBinary(eth,digrow,43,46,1,sec,SubSec,row);
67 //only the pads outside the range [33;88] are written into the output file
68 b->WriteRowBinary(eth,digrow,33,88,2,sec,SubSec,row);
70 //only the pads in the range [33;88] are written into the output file
71 b->WriteRowBinary(eth,digrow,33,88,1,sec,SubSec,row);
77 cout<<"File created !"<<endl;
78 cout<<"Total number of digits: "<<b->GetDigNumber()<<endl;
81 }//end AliTPCDataChallenge