10 Float_t raderror,phierror;
15 Float_t timepos,padpos,timesigma,padsigma;
16 Float_t peakheight, charge;
18 Int_t padlength,timelength;
28 Float_t temperature,pressure;
33 void listPadOcc(
const Char_t *fileName=
"filelist.txt")
42 gStyle->SetTitleOffset(1.25);
43 gStyle->SetCanvasBorderMode(0);
44 gStyle->SetPadBorderMode(0);
45 gStyle->SetPadColor(0);
46 gStyle->SetCanvasColor(0);
47 gStyle->SetTitleColor(0);
48 gStyle->SetStatColor(0);
49 gStyle->SetPalette(1);
50 gStyle->SetOptStat(1111);
56 Int_t PadEntries[2][60][160];
59 for (
int isec=0;isec<60;isec++){
60 for (
int irow=0;irow<2;irow++){
61 for (
int ipad=0;ipad<160;ipad++){
62 PadEntries[irow][isec][ipad]=0;
70 char **fList =
new char[200][256];
72 ifstream fin(fileName);
75 cout <<
"Input file " << fileName <<
" found." << endl;
76 for (Int_t i=0;i<200;i++){
77 char *line =
new char[256];
81 cout <<
" Added file : " << fList[j] << endl;
90 for (Int_t ifile=0;ifile<nfile;ifile++) {
91 TString eingabe = fList[ifile];
97 TTree *dtree=(TTree*) f.Get(
"cl");
98 TBranch *bcluster=dtree->GetBranch(
"cluster");
99 bcluster->SetAddress(&cluster);
100 TBranch *bevent=dtree->GetBranch(
"event");
101 bevent->SetAddress(&event);
105 Int_t CurrentEvent =
event.nevent;
107 maxentries=bcluster->GetEntries();
110 for (
int i=0;i<=maxentries;i++) {
112 if (event.nevent != CurrentEvent){
114 CurrentEvent =
event.nevent;
117 bcluster->GetEntry(i);
119 if ((cluster.padlength>=3&&cluster.padlength<=6) &&
120 (cluster.timelength>=4&&cluster.timelength<=8)){
122 PadEntries[cluster.row-1][cluster.sec-1][cluster.pad-1]++;
127 cout<<nevents<<
" Events analyzed"<<endl;
130 cout<<
" Pad occupancy for all clusters in all sectors which passed the cuts (3<=padlength<=6 and 4<=timelength<=8) for a 'good' cluster:"<<endl;
136 for (
int irow=0;irow<2;irow++){
137 cout<<
"Padrow "<<irow+1<<endl;
139 for (
int isec=0;isec<6;isec++){
140 for (
int ipad=0;ipad<160;ipad++){
142 cout<<irow+1<<
" "<<isec+1<<
" "<<npad<<
" ("<<ipad+1<<
") "<<PadEntries[irow][isec][ipad]<<endl;
149 for (
int irow=0;irow<2;irow++){
150 cout<<
"Padrow "<<irow+3<<endl;
152 for (
int isec=6;isec<12;isec++){
153 for (
int ipad=0;ipad<160;ipad++){
155 cout<<irow+1<<
" "<<isec+1<<
" "<<npad<<
" ("<<ipad+1<<
") "<<PadEntries[irow][isec][ipad]<<endl;
162 for (
int irow=0;irow<2;irow++){
163 cout<<
"Padrow "<<irow+5<<endl;
165 for (
int isec=12;isec<18;isec++){
166 for (
int ipad=0;ipad<160;ipad++){
168 cout<<irow+1<<
" "<<isec+1<<
" "<<npad<<
" ("<<ipad+1<<
") "<<PadEntries[irow][isec][ipad]<<endl;
175 for (
int irow=0;irow<2;irow++){
176 cout<<
"Padrow "<<irow+7<<endl;
178 for (
int isec=18;isec<24;isec++){
179 for (
int ipad=0;ipad<160;ipad++){
181 cout<<irow+1<<
" "<<isec+1<<
" "<<npad<<
" ("<<ipad+1<<
") "<<PadEntries[irow][isec][ipad]<<endl;
188 for (
int irow=0;irow<2;irow++){
189 cout<<
"Padrow "<<irow+9<<endl;
191 for (
int isec=24;isec<30;isec++){
192 for (
int ipad=0;ipad<160;ipad++){
194 cout<<irow+1<<
" "<<isec+1<<
" "<<npad<<
" ("<<ipad+1<<
") "<<PadEntries[irow][isec][ipad]<<endl;