From eea114ea6e35e9157b63149c6b33fb57c3481a23 Mon Sep 17 00:00:00 2001 From: Benjamin Linnik Date: Fri, 11 Sep 2015 14:59:23 +0200 Subject: [PATCH] Run analyzer: cleaned up tabs in MAPC.c --- MABS_run_analyzer/MAPS.c | 1784 +++++++++++++++++++------------------- 1 file changed, 890 insertions(+), 894 deletions(-) diff --git a/MABS_run_analyzer/MAPS.c b/MABS_run_analyzer/MAPS.c index 225eb52..6efd43b 100644 --- a/MABS_run_analyzer/MAPS.c +++ b/MABS_run_analyzer/MAPS.c @@ -14,11 +14,11 @@ using namespace std; MAPS::MAPS() { - + }; MAPS::MAPS(Run* runp) { - run = runp; + run = runp; error = initMapsRun(); if (!error) { @@ -57,7 +57,7 @@ Bool_t MAPS::initNewRootFile() { fHitTree->Branch("frame" , &fFrameInfo.frame , "frame/i" , 32000); fHitTree->Branch("hits" , &fFrameInfo.hits , "hits/i" , 32000); fHitTree->Branch("pixel" , &fFrameInfo.pixel[0] , "pixel[hits]/i" , 32000); - fHitTree->Branch("pixelRaw" , &fFrameInfo.pixelRaw[0] , "pixelRaw[hits]/i" , 32000); + fHitTree->Branch("pixelRaw" , &fFrameInfo.pixelRaw[0] , "pixelRaw[hits]/i" , 32000); fHitTree->Branch("pixelthreshold", &fFrameInfo.pixelthreshold[0],"pixelthreshold[hits]/i", 32000); for(int i=0; i<25; i++) { fHitTree->Branch( Form("p%i",i+1) , &fFrameInfo.p[i][0] , Form("p%i [hits]/F",i+1) , 32000); @@ -115,36 +115,36 @@ MAPS::~MAPS(void) { if(fSave && fOk) { fOutputFile->cd(); - + fHitTree->Write("",TObject::kOverwrite); fNoiseTree->Write("",TObject::kOverwrite); fDynNoiseTree->Write("",TObject::kOverwrite); - + hint1->Write("",TObject::kOverwrite); hint2->Write("",TObject::kOverwrite); - + fOutputFile->Save(); fOutputFile->Close(); - + cout<Close(); cout<<"...finished!"<ProcessLine("new TBrowser;"); - -// delete[] fOutputFile; -// delete[] fHitNtup; -// delete[] fNoiseNtup; -// delete[] fMeanNoiseNtup; -// delete[] hint1; -// delete[] hint2; + // TFile::Open(FILENAME); + // gROOT->ProcessLine("new TBrowser;"); + + // delete[] fOutputFile; + // delete[] fHitNtup; + // delete[] fNoiseNtup; + // delete[] fMeanNoiseNtup; + + // delete[] hint1; + // delete[] hint2; } - + for(Int_t i=0; istorepathRAWLinux; fOutDir = run->storepathOutLinux; // default ouput directory is input directory - - fRunNumber = run->labbook.runnumber; + + fRunNumber = run->labbook.runnumber; fRows = run->sensorinfocur.rows; fColumns = run->sensorinfocur.columns; - fPixels = fRows*fColumns; - fMatrix = run->labbook.matrix; - fOrderCode = run->labbook.chipGen; - fSystem = run->labbook.system; + fPixels = fRows*fColumns; + fMatrix = run->labbook.matrix; + fOrderCode = run->labbook.chipGen; + fSystem = run->labbook.system; fConfigFile = fInDir+Form("/RUN_%i_i.rz",fRunNumber); fRootFile = fOutDir+Form("/RUN_%i_i.root",fRunNumber); - + cout<<"================================================================="< Load default config file ..."<50) -// { -// cout<<"Expected Nr of Files is too big: " << MaxFiles << " ! Nr of Files reduced to 50!"<50) + // { + // cout<<"Expected Nr of Files is too big: " << MaxFiles << " ! Nr of Files reduced to 50!"< Wrong Number of Pixels: ( "<< count-count_tmp-29 <<" ) in Framenr: "< Wrong Number of Pixels: ( "<< count-count_tmp-29 <<" ) in Framenr: "< ",fRunNumber,FileNr)<= 1) { -// printf("%6.2f TB ", (Float_t)(End/(TMath::Power(2,40))) ); -// } -// else if (End/(TMath::Power(2,30)) >= 1) { -// printf("%6.2f GB ", (Float_t)(End/(TMath::Power(2,30))) ); -// } -// else if (End/(TMath::Power(2,20)) >= 1) { -// printf("%6.2f MB ", (Float_t)(End/(TMath::Power(2,20))) ); -// } -// else if (End/(TMath::Power(2,10)) >= 1) { -// printf("%6.2f kB ", (Float_t)(End/(TMath::Power(2,10))) ); -// } -// else { -// printf("%6.2f B ", (Float_t)(End)); -// } -// -// cout< ",fRunNumber,FileNr)<= 1) { + // printf("%6.2f TB ", (Float_t)(End/(TMath::Power(2,40))) ); + // } + // else if (End/(TMath::Power(2,30)) >= 1) { + // printf("%6.2f GB ", (Float_t)(End/(TMath::Power(2,30))) ); + // } + // else if (End/(TMath::Power(2,20)) >= 1) { + // printf("%6.2f MB ", (Float_t)(End/(TMath::Power(2,20))) ); + // } + // else if (End/(TMath::Power(2,10)) >= 1) { + // printf("%6.2f kB ", (Float_t)(End/(TMath::Power(2,10))) ); + // } + // else { + // printf("%6.2f B ", (Float_t)(End)); + // } + // + // cout<= 20000) cout << colorred << "Run could be corrupted, number of events in file doesn't match configuration! ("<< Frames << " != " << FileEvNbInConfig << ")" << endlr; -// cout<GetXaxis()->SetRangeUser(0, fColumns); hint1->GetYaxis()->SetRangeUser(0, fRows); hint1->GetXaxis()->SetTitle("column"); hint1->GetYaxis()->SetTitle("row"); hint1->GetZaxis()->SetTitle("Signal [ADC]"); - + hint2->GetXaxis()->SetRangeUser(0, fColumns); hint2->GetYaxis()->SetRangeUser(0, fRows); hint2->GetXaxis()->SetTitle("column"); @@ -589,89 +589,89 @@ void MAPS::initHistograms() { //#################################################################### bool MAPS::getFrame(UInt_t FrameNumber) { - + fFrameNumber = FrameNumber; - + if(fFrameNumber fEventsSum ) { + Frames = fEventsSum; + printf("Changed 'Number Frames' to: %u\n", Frames ); + } + if( Frames+Start > fEventsSum ) { + Start = fEventsSum-Frames; + printf("Changed 'First Event' to: %u\n", Start ); + } + // Get fPixels and allocate array + Float_t *ARR = new Float_t[Frames*fPixels]; + Float_t PEDESTAL; + Float_t NOISE; + Int_t PIXEL; + + for(UInt_t i=Start; i fEventsSum ) { - Frames = fEventsSum; - printf("Changed 'Number Frames' to: %u\n", Frames ); - } - if( Frames+Start > fEventsSum ) { - Start = fEventsSum-Frames; - printf("Changed 'First Event' to: %u\n", Start ); + ARR[(i-Start)*fPixels+j] = fCdsmatrix[j]; } -// Get fPixels and allocate array - Float_t *ARR = new Float_t[Frames*fPixels]; - Float_t PEDESTAL; - Float_t NOISE; - Int_t PIXEL; - - for(UInt_t i=Start; iReset(); + fNoiseTree->Branch("pixel" , &PIXEL , "pixel/i" , 32000); + fNoiseTree->Branch("noise" , &NOISE , "noise/F" , 32000); + fNoiseTree->Branch("pedestal" , &PEDESTAL , "pedestal/F" , 32000); + } + + for(Int_t i=0; iReset(); - fNoiseTree->Branch("pixel" , &PIXEL , "pixel/i" , 32000); - fNoiseTree->Branch("noise" , &NOISE , "noise/F" , 32000); - fNoiseTree->Branch("pedestal" , &PEDESTAL , "pedestal/F" , 32000); + NOISE+=TMath::Power(ARR[j*fPixels+i]-PEDESTAL,2); } - - for(Int_t i=0; iFill(); - } + + NOISE = TMath::Sqrt(NOISE/(Frames-1)); + + fNoise[i] = NOISE; + fPedestals[i] = PEDESTAL; + PIXEL = i; + + if(fSave) { + fNoiseTree->Fill(); } - - cout<<"-----------------------"<[fPixels](); CDSlastframes = new std::queue[fPixels](); - + /// number of frames cut away in second noise estimate (propably hit frames) Int_t* nframescutawaysecondnoiseestimate = new Int_t[fPixels](); Int_t npixelscutawaysecondnoiseestimate=0; /// number of frames cut away in third noise estimate (hopefully hit frames) Int_t* nframescutawaythirdnoiseestimate = new Int_t[fPixels](); Int_t npixelscutawaythirdnoiseestimate=0; - - - - -// fDynNoiseTree->Branch("frame" , &fFrameNumber , "frame/i" , 32000); -// fDynNoiseTree->Branch("noise" , &fNoiseMean , "noise/F" , 32000); -// fDynNoiseTree->Branch("pedestal" , &fPedestalsMean , "pedestal/F" , 32000); - + + + + + // fDynNoiseTree->Branch("frame" , &fFrameNumber , "frame/i" , 32000); + // fDynNoiseTree->Branch("noise" , &fNoiseMean , "noise/F" , 32000); + // fDynNoiseTree->Branch("pedestal" , &fPedestalsMean , "pedestal/F" , 32000); + // check if all RAW data files are OK if(fOk) { @@ -819,8 +819,8 @@ bool MAPS::InitialDynNoise(Int_t startframe, Int_t frames) { for(Int_t framei=startframe; framei " << 5.*fNoise[pixeli] << endl; + // cout << "frame: " << framei << " pixel: " << pixeli << " CDS: " << fCdsmatrix[pixeli] << endl; + // cout << 1.*fCdsmatrix[pixeli] << " > " << 5.*fNoise[pixeli] << endl; nframescutawaysecondnoiseestimate[pixeli]++; } } @@ -892,7 +892,7 @@ bool MAPS::InitialDynNoise(Int_t startframe, Int_t frames) { } npixelscutawaysecondnoiseestimate = SumOverArray(nframescutawaysecondnoiseestimate, fPixels); cout << "In second estimate of dynamic noise, cutted away " << npixelscutawaysecondnoiseestimate << " pixels, in " << frames << " frames. (" << (npixelscutawaysecondnoiseestimate*100./fPixels/frames) << " %)" << endl; - + // third estimate // cut away pixels with cds - pedestial > 5 * sigma of noise value from second estimate // sum up over all frames every CDS value, pixelwise @@ -917,7 +917,7 @@ bool MAPS::InitialDynNoise(Int_t startframe, Int_t frames) { } else { -// cout << "Pixel: " << pixeli << ": " << 1.*fCdsmatrix[pixeli] << " - " << fPedestals[pixeli] << " > " << 3.*pixelnoise2[pixeli] << endl; + // cout << "Pixel: " << pixeli << ": " << 1.*fCdsmatrix[pixeli] << " - " << fPedestals[pixeli] << " > " << 3.*pixelnoise2[pixeli] << endl; nframescutawaythirdnoiseestimate[pixeli]++; } } @@ -968,17 +968,17 @@ bool MAPS::InitialDynNoise(Int_t startframe, Int_t frames) { fNoiseTree->Branch("pixel" , &PIXEL , "pixel/i" , 32000); fNoiseTree->Branch("noise" , &NOISE , "noise/F" , 32000); fNoiseTree->Branch("pedestal" , &PEDESTAL , "pedestal/F" , 32000); + + for(Int_t pixeli=0; pixeli 0) - fNoiseTree->Fill(); - } -// getNoise(startframe, frames); + if (NOISE > 0) + fNoiseTree->Fill(); + } + // getNoise(startframe, frames); } fNoiseOk = true; @@ -1049,14 +1049,14 @@ bool MAPS::regetDynNoise(Int_t Frames) { fPedestalhighFrames++; pedestalhighinthisframe=true; } -// cout<<"\rFrame: "< Pedestal suspiciously high!"<(fCdsmatrix , fPixels, fColumns, 1, 20); -// cout<<" Pedestial of sensor: "; -// debugStream<>(fPedestals , fPixels, fColumns, 1, 20); -// cout<<" Hitted Pixel discriminator matrix: "; -// debugStream<>(fHittedPixel, fPixels, fColumns, 1, 1); -// exit(1); + // cout<<"\rFrame: "< Pedestal suspiciously high!"<(fCdsmatrix , fPixels, fColumns, 1, 20); + // cout<<" Pedestial of sensor: "; + // debugStream<>(fPedestals , fPixels, fColumns, 1, 20); + // cout<<" Hitted Pixel discriminator matrix: "; + // debugStream<>(fHittedPixel, fPixels, fColumns, 1, 1); + // exit(1); } if (abs(fNoise[pixeli])>20) { @@ -1066,27 +1066,27 @@ bool MAPS::regetDynNoise(Int_t Frames) { noisehighinthisframe=true; } // cout << colorred << fFrameNumber << endlr; -// if (fFrameNumber==15683 || fFrameNumber==15684) -// { -// cout <<"\rFrame: "< Noise suspiciously high! "<(fCdsmatrix , fPixels, fColumns, 0, 20); -// cout<<" Noise of sensor: "; -// debugStream<>(fNoise , fPixels, fColumns, 0, 20); -// cout<<" Hitted Pixel discriminator matrix: "; -// debugStream<>(fHittedPixel, fPixels, fColumns, 0, 1); -// } + // if (fFrameNumber==15683 || fFrameNumber==15684) + // { + // cout <<"\rFrame: "< Noise suspiciously high! "<(fCdsmatrix , fPixels, fColumns, 0, 20); + // cout<<" Noise of sensor: "; + // debugStream<>(fNoise , fPixels, fColumns, 0, 20); + // cout<<" Hitted Pixel discriminator matrix: "; + // debugStream<>(fHittedPixel, fPixels, fColumns, 0, 1); + // } } } else { -// cout << "Skipped pixel " << pixeli << " for noise calc in frame " << fFrameNumber << ", because fHittedPixel: " << fHittedPixel[pixeli] << endl; + // cout << "Skipped pixel " << pixeli << " for noise calc in frame " << fFrameNumber << ", because fHittedPixel: " << fHittedPixel[pixeli] << endl; } } -// if (pedestalhighinthisframe) -// cout<<"\rFrame: "< Pedestal suspiciously high!"< Noise suspiciously high!"< Pedestal suspiciously high!"< Noise suspiciously high!"<Fill(); } RefilledNoiseBranch = true; -// for(Int_t pixeli=0; pixeliFill(); -// } -// -// cout << fNoiseMean << endl; -// fNoiseMean = TMath::Mean((const int)fPixels, fNoise); -// fPedestalsMean = TMath::Mean((const int)fPixels, fPedestals); -// fDynNoiseTree->Fill(); + // for(Int_t pixeli=0; pixeliFill(); + // } + // + // cout << fNoiseMean << endl; + // fNoiseMean = TMath::Mean((const int)fPixels, fNoise); + // fPedestalsMean = TMath::Mean((const int)fPixels, fPedestals); + // fDynNoiseTree->Fill(); } } - -// debug -// if ( fFrameNumber%10000==0) -// { -// debugStream<>(fNoise, fPixels, fColumns, 2, 5); -// } + + // debug + // if ( fFrameNumber%10000==0) + // { + // debugStream<>(fNoise, fPixels, fColumns, 2, 5); + // } return true; } @@ -1152,29 +1152,29 @@ bool MAPS::loadNoise( TString filename) { } else { - - TTree *noiseTree = (TNtuple*) f->Get("noise"); - - UInt_t PIXEL; - Float_t NOISE, PEDESTAL; - - noiseTree->SetBranchAddress("pixel" , &PIXEL ); + + TTree *noiseTree = (TNtuple*) f->Get("noise"); + + UInt_t PIXEL; + Float_t NOISE, PEDESTAL; + + noiseTree->SetBranchAddress("pixel" , &PIXEL ); cout<<"Noise/Pedestals loaded from:"<< filename << "!"<SetBranchAddress("noise" , &NOISE ); - noiseTree->SetBranchAddress("pedestal" , &PEDESTAL ); - - Int_t entries = noiseTree->GetEntries(); - + noiseTree->SetBranchAddress("noise" , &NOISE ); + noiseTree->SetBranchAddress("pedestal" , &PEDESTAL ); + + Int_t entries = noiseTree->GetEntries(); + for(Int_t i=0; iGetEntry(i); - - fNoise[i] = NOISE; - fPedestals[i] = PEDESTAL; + + fNoise[i] = NOISE; + fPedestals[i] = PEDESTAL; } cout<<"-----------------------"<(fCdsmatrix, fPixels, fColumns, 2, 20); - // cout<<"Pedestals"<(fPedestals, fPixels, fColumns, 2, 20); + cdsMatrixSum+=fCdsmatrix[i]; + // cout<(fCdsmatrix, fPixels, fColumns, 2, 20); + // cout<<"Pedestals"<(fPedestals, fPixels, fColumns, 2, 20); for(Int_t i=0; i (50.) ) + // if( (float)(1.*fCdsmatrix[i]-fPedestals[i]) > (50.) ) if( (float)(1.*fCdsmatrix[i]-fPedestals[i]) > (5.*fNoise[i]) ) { HITNR++; @@ -1278,11 +1275,11 @@ void MAPS::hitana() { for(Int_t i=0; i(fHittedPixel, fPixels, fColumns, 1, 1); + // cout<<"Hitted pixel discriminator matrix:"<(fHittedPixel, fPixels, fColumns, 1, 1); fHittedPixel[rechargePixellist[rechargingpixeli]] = -4; } } - + //Begin: loop over all potential seed pixels: //Determine 'hit-vicinity': @@ -1420,10 +1417,10 @@ void MAPS::hitana() { // Consider boundaries => Remove hits where the seed pixel is within 2 pixels beside the edge // Hitlist[hit]%fColumn = x-coordinate of the seed pixel, Hitlist[hit]/fColumns = y-coordinate of the seed pixel -// if (Hitlist[hit]%fColumns < 2 || Hitlist[hit]%fColumns > fColumns-3 || Hitlist[hit]/fColumns < 2 || Hitlist[hit]/fColumns > fRows-3) -// continue; - - + // if (Hitlist[hit]%fColumns < 2 || Hitlist[hit]%fColumns > fColumns-3 || Hitlist[hit]/fColumns < 2 || Hitlist[hit]/fColumns > fRows-3) + // continue; + + //Provide 5x5 clusters with CDS - content: for(Int_t row=0; row<5; row++) { @@ -1432,28 +1429,28 @@ void MAPS::hitana() { // wenn erste Reihe des Clusters gefüllt werden soll // und das Seed Pixel am Rand - in erster oder zweiten Reihe des Matrix liegt if ( (row==0) && (A<2) ) { -// cout << "WARNING: Clusters are filled with dummy values, please check MAPS.c hitana() cluster fill procedure." << endl; + // cout << "WARNING: Clusters are filled with dummy values, please check MAPS.c hitana() cluster fill procedure." << endl; pixelchargeincluster[(row*5)+column]=DUMMY; noiseincluster[(row*5)+column]=DUMMY; } // wenn zweite Reihe des Clusters gefüllt werden soll // und das Seed Pixel am Rand - in erster Reihe des Matrix liegt else if ( (row==1) && (A<1) ) { -// cout << "WARNING: Clusters are filled with dummy values, please check MAPS.c hitana() cluster fill procedure." << endl; + // cout << "WARNING: Clusters are filled with dummy values, please check MAPS.c hitana() cluster fill procedure." << endl; pixelchargeincluster[(row*5)+column]=DUMMY; noiseincluster[(row*5)+column]=DUMMY; } // wenn vierte Reihe des Clusters gefüllt werden soll // und das Seed Pixel am Rand - in letzter Reihe des Matrix liegt else if ( (row==3) && (A>= (fRows-1)) ) { -// cout << "WARNING: Clusters are filled with dummy values, please check MAPS.c hitana() cluster fill procedure." << endl; + // cout << "WARNING: Clusters are filled with dummy values, please check MAPS.c hitana() cluster fill procedure." << endl; pixelchargeincluster[(row*5)+column]=DUMMY; noiseincluster[(row*5)+column]=DUMMY; } // wenn vierte Reihe des Clusters gefüllt werden soll // und das Seed Pixel am Rand - in vorletzter Reihe des Matrix liegt else if ( (row==4) && (A>= (fRows-2)) ) { -// cout << "WARNING: Clusters are filled with dummy values, please check MAPS.c hitana() cluster fill procedure." << endl; + // cout << "WARNING: Clusters are filled with dummy values, please check MAPS.c hitana() cluster fill procedure." << endl; pixelchargeincluster[(row*5)+column]=DUMMY; noiseincluster[(row*5)+column]=DUMMY; } @@ -1462,28 +1459,28 @@ void MAPS::hitana() { // wenn erste Spalte des Clusters gefüllt werden soll // und das Seed Pixel am Rand - in erster oder zweiten Spalte des Matrix liegt if ( (column==0) && (B<2) ) { -// cout << "WARNING: Clusters are filled with dummy values, please check MAPS.c hitana() cluster fill procedure." << endl; + // cout << "WARNING: Clusters are filled with dummy values, please check MAPS.c hitana() cluster fill procedure." << endl; pixelchargeincluster[(row*5)+column]=DUMMY; noiseincluster[(row*5)+column]=DUMMY; } // wenn zweite Spalte des Clusters gefüllt werden soll // und das Seed Pixel am Rand - in erster Spalte der Matrix liegt else if ( (column==1) && (B==0) ) { -// cout << "WARNING: Clusters are filled with dummy values, please check MAPS.c hitana() cluster fill procedure." << endl; + // cout << "WARNING: Clusters are filled with dummy values, please check MAPS.c hitana() cluster fill procedure." << endl; pixelchargeincluster[(row*5)+column]=DUMMY; noiseincluster[(row*5)+column]=DUMMY; } // wenn dritte Spalte des Clusters gefüllt werden soll // und das Seed Pixel am Rand - in letzter Spalte der Matrix liegt else if ( (column==3) && (B==fColumns-1)) { -// cout << "WARNING: Clusters are filled with dummy values, please check MAPS.c hitana() cluster fill procedure." << endl; + // cout << "WARNING: Clusters are filled with dummy values, please check MAPS.c hitana() cluster fill procedure." << endl; pixelchargeincluster[(row*5)+column]=DUMMY; noiseincluster[(row*5)+column]=DUMMY; } // wenn letzte Spalte des Clusters gefüllt werden soll // und das Seed Pixel am Rand - in vorletzter Spalte der Matrix liegt else if ( (column==4) && (B>fColumns-3)) { -// cout << "WARNING: Clusters are filled with dummy values, please check MAPS.c hitana() cluster fill procedure." << endl; + // cout << "WARNING: Clusters are filled with dummy values, please check MAPS.c hitana() cluster fill procedure." << endl; pixelchargeincluster[(row*5)+column]=DUMMY; noiseincluster[(row*5)+column]=DUMMY; } @@ -1491,60 +1488,60 @@ void MAPS::hitana() { noiseincluster[(row*5)+column] = fNoise[Hitlist[hit]+(row-2)*fColumns+(column-2)]; pixelchargeincluster[(row*5)+column] = 1.*fCdsmatrix [Hitlist[hit]+(row-2)*fColumns+(column-2)] - fPedestals [Hitlist[hit]+(row-2)*fColumns+(column-2)]; noisesumincluster+=TMath::Power(noiseincluster[(row*5)+column],2); - //noisesumincluster+=noiseincluster[(row*5)+column]; //Mathematicabug reconstructed + //noisesumincluster+=noiseincluster[(row*5)+column]; //Mathematicabug reconstructed chargesumincluster+=pixelchargeincluster[(row*5)+column]; } } } } - int index[25]; - TMath::Sort(25,pixelchargeincluster,index,1); - // for(int i=0;i<25;i++) - // cout<(cdsMatrixMinusPedestal, fPixels, fColumns, 0, 20); + int index[25]; + TMath::Sort(25,pixelchargeincluster,index,1); + // for(int i=0;i<25;i++) + // cout<(cdsMatrixMinusPedestal, fPixels, fColumns, 0, 20); // cout << colorred << "Noise für Cluster: " << noisesumincluster << endlr; // cout << colorred << "ChargeSum für Cluster: " << chargesumincluster <<"WholeMatrix:"< pixelchargeincluster[12]) ) { CHANCE=0; -// cout << "kill cluster: " << Hitlist[hit] << " with ADC: " << pixelchargeincluster[12] << endl; + // cout << "kill cluster: " << Hitlist[hit] << " with ADC: " << pixelchargeincluster[12] << endl; break; } // maybe this is unnecessary, if upper if clause is a >= comparison @@ -1577,20 +1574,20 @@ void MAPS::hitana() { //Begin: loop evaluate true seeds: if(CHANCE==100) { - if(fOrderCode=="FSBB") - { - if (B < 2 || B > fColumns-3 || A < 1 || A > fRows-2) - bordercluster = true; - else - bordercluster = false; - } - else //if not FSBB - { - if (B < 2 || B > fColumns-3 || A < 2 || A > fRows-3) - bordercluster = true; - else - bordercluster = false; - } + if(fOrderCode=="FSBB") + { + if (B < 2 || B > fColumns-3 || A < 1 || A > fRows-2) + bordercluster = true; + else + bordercluster = false; + } + else //if not FSBB + { + if (B < 2 || B > fColumns-3 || A < 2 || A > fRows-3) + bordercluster = true; + else + bordercluster = false; + } for(Int_t row=0; row<5; row++) { for(Int_t column=0; column<5; column++) @@ -1611,74 +1608,74 @@ void MAPS::hitana() { } } } - // cout<<"Hitted pixel discriminator matrix:"<(fHittedPixel, fPixels, fColumns, 1, 1); + // cout<<"Hitted pixel discriminator matrix:"<(fHittedPixel, fPixels, fColumns, 1, 1); if (bordercluster) fHittedPixel[Hitlist[hit]] = -2; else { fHittedPixel[Hitlist[hit]] = 2; - + //Fill hit TTree: fFrameInfo.pixel[fHits] = Hitlist[hit]; for(int clupos=0; clupos<25; clupos++) { fFrameInfo.p [clupos][fHits] = pixelchargeincluster[clupos]; } - // for(Int_t row=0; row<5; row++) - // { - // for(Int_t column=0; column<5; column++) - // { + // for(Int_t row=0; row<5; row++) + // { + // for(Int_t column=0; column<5; column++) + // { // std::cout.width(10); // std::cout << std::fixed; // std::cout << std::left << std::setprecision(2) << pixelchargeincluster[row*5+column]; - // } - // cout << endl; - // } - // cout << endl; + // } + // cout << endl; + // } + // cout << endl; // if cluster charge > clusternoise * const - if(fOrderCode=="FSBB") - { - if (1.0*chargesumincluster4 > noisesumincluster4*6.0) - fFrameInfo.pixelthreshold[fHits] = Hitlist[hit]; - else - fFrameInfo.pixelthreshold[fHits] = 0; - } - else - { - if (1.0*chargesumincluster > noisesumincluster*2.0) - fFrameInfo.pixelthreshold[fHits] = Hitlist[hit]; - else - fFrameInfo.pixelthreshold[fHits] = 0; - } + if(fOrderCode=="FSBB") + { + if (1.0*chargesumincluster4 > noisesumincluster4*6.0) + fFrameInfo.pixelthreshold[fHits] = Hitlist[hit]; + else + fFrameInfo.pixelthreshold[fHits] = 0; + } + else + { + if (1.0*chargesumincluster > noisesumincluster*2.0) + fFrameInfo.pixelthreshold[fHits] = Hitlist[hit]; + else + fFrameInfo.pixelthreshold[fHits] = 0; + } if(fSave) { hint1->Fill( Hitlist[hit]%fColumns, (int)(Hitlist[hit]/fColumns) ); } // if(fFrameInfo.pixelthreshold[fHits]!=0) - // { - // cout<<"Charge"<(fHittedPixel, fPixels, fColumns, 1, 1); - // for(Int_t row=0; row<5; row++) - // { - // for(Int_t column=0; column<5; column++) - // { - // std::cout.width(10); - // std::cout << std::fixed; - // std::cout << std::left << std::setprecision(2) << pixelchargeincluster[row*5+column]; - // } - // cout << endl; - // } - // cout << endl; - // debugStream<>(cdsmatrixCorrPed, fPixels, fColumns, 1, 10); - // } - fHits++; + // { + // cout<<"Charge"<(fHittedPixel, fPixels, fColumns, 1, 1); + // for(Int_t row=0; row<5; row++) + // { + // for(Int_t column=0; column<5; column++) + // { + // std::cout.width(10); + // std::cout << std::fixed; + // std::cout << std::left << std::setprecision(2) << pixelchargeincluster[row*5+column]; + // } + // cout << endl; + // } + // cout << endl; + // debugStream<>(cdsmatrixCorrPed, fPixels, fColumns, 1, 10); + // } + fHits++; } } } //End: loop evaluate true seeds: //End: loop over all potential seed pixels: - + if(fSave) { for(Int_t i=0; iSetBinContent(i%fColumns, (int)(i/fColumns), fHittedPixel[i]); fADCHitmatrix->SetBinContent(i%fColumns, (int)(i/fColumns), fCdsmatrix[i]); - // cout<<"HITHERE"< Common Mode suspiciously high! "<(fCdsmatrix, fPixels, fColumns, 1, 20); + debugStream<>(fCdsmatrix, fPixels, fColumns, 1, 20); debugStream<>(Arr, fColumns, fColumns, 1, 20); } @@ -1745,10 +1742,6 @@ void MAPS::filterCommonMode() { fCdsmatrix[ row*fColumns+column ] -= CommonModeInRow; } } -// if ( fFrameNumber%10000==0) -// { -// debugStream<>(fPedestals, fPixels, fColumns, 2); -// } } //#################################################################### @@ -1762,14 +1755,14 @@ void MAPS::plotFrame(Int_t FrameNumber) { cout <(fCdsmatrix, fPixels, fColumns, 0, 39); - Float_t cdsmatrixCorrPed[fPixels]; - for(Int_t i=0; i(cdsmatrixCorrPed, fPixels, fColumns, 0, 10); - // cout<(cdsmatrixCorrPed, fPixels, fColumns, 0, 10); + // cout<(fHittedPixel, fPixels, fColumns, 1, 1); @@ -1780,63 +1773,63 @@ void MAPS::plotFrame(Int_t FrameNumber) { gStyle->SetCanvasColor(0); gStyle->SetFrameFillColor(10); gStyle->SetOptStat(0); - - TH2F *h1 = new TH2F("CDS matrix", "CDS matrix", fColumns, 0, fColumns, fRows, 0, fRows); - TH2F *h2 = new TH2F("Frame 0 matrix", "Frame 0 matrix", fColumns, 0, fColumns, fRows, 0, fRows); - TH2F *h3 = new TH2F("Frame 1 matrix", "Frame 1 matrix", fColumns, 0, fColumns, fRows, 0, fRows); - TH1F *h4 = new TH1F("Frame 0 histo", "Frame 0 histo", 2*16384, -16384, 16384); - TH1F *h5 = new TH1F("Frame 1 histo", "Frame 1 histo", 2*16384, -16384, 16384); - + + TH2F *h1 = new TH2F("CDS matrix", "CDS matrix", fColumns, 0, fColumns, fRows, 0, fRows); + TH2F *h2 = new TH2F("Frame 0 matrix", "Frame 0 matrix", fColumns, 0, fColumns, fRows, 0, fRows); + TH2F *h3 = new TH2F("Frame 1 matrix", "Frame 1 matrix", fColumns, 0, fColumns, fRows, 0, fRows); + TH1F *h4 = new TH1F("Frame 0 histo", "Frame 0 histo", 2*16384, -16384, 16384); + TH1F *h5 = new TH1F("Frame 1 histo", "Frame 1 histo", 2*16384, -16384, 16384); + Int_t column; Int_t row; Float_t F0,F1,CDS; - + for(Int_t i=0; iFill(column,row,CDS); h2->Fill(column,row,F0); h3->Fill(column,row,F1); h4->Fill(F0); h5->Fill(F1); } - + cm1->cd(1); h1->Draw("colz"); h1->GetXaxis()->SetTitle("column"); h1->GetYaxis()->SetTitle("row"); h1->GetZaxis()->SetTitle("Signal [ADC]"); - + cm1->cd(2); h1->Draw("surf2z"); h1->GetXaxis()->SetTitle("column"); h1->GetYaxis()->SetTitle("row"); h1->GetZaxis()->SetTitle("Signal [ADC]"); - + cm1->cd(3); h2->Draw("surf2z"); h2->GetXaxis()->SetTitle("column"); h2->GetYaxis()->SetTitle("row"); h2->GetZaxis()->SetTitle("Signal [ADC]"); - + cm1->cd(4); h3->Draw("surf2z"); h3->GetXaxis()->SetTitle("column"); h3->GetYaxis()->SetTitle("row"); h3->GetZaxis()->SetTitle("Signal [ADC]"); - + cm1->cd(5); h4->Draw(); h4->GetXaxis()->SetTitle("Signal [ADC]"); h4->GetYaxis()->SetTitle("Counts"); - + cm1->cd(6); h5->Draw(); h5->GetXaxis()->SetTitle("Signal [ADC]"); @@ -1855,12 +1848,11 @@ void MAPS::plotFrame(Int_t FrameNumber) { //#################################################################### void MAPS::plotNoise() { - if(!fNoiseOk) { cout<<"Noise/Pedestals not calculated/set!"<Divide(2,2); @@ -1869,52 +1861,52 @@ void MAPS::plotNoise() { gStyle->SetCanvasColor(0); gStyle->SetFrameFillColor(10); gStyle->SetOptStat(1); - - TH1F *h1 = new TH1F("noisee", "noise", 2000, 0, 200); - TH1F *h2 = new TH1F("pedestal", "pedestal", 1000, -50, 50); - TH2F *h3 = new TH2F("noise matrix", "noise matrix", fColumns, 0, fColumns, fRows, 0, fRows); - TH2F *h4 = new TH2F("pedestal matrix", "pedestal matrix", fColumns, 0, fColumns, fRows, 0, fRows); - + + TH1F *h1 = new TH1F("noisee", "noise", 2000, 0, 200); + TH1F *h2 = new TH1F("pedestal", "pedestal", 1000, -50, 50); + TH2F *h3 = new TH2F("noise matrix", "noise matrix", fColumns, 0, fColumns, fRows, 0, fRows); + TH2F *h4 = new TH2F("pedestal matrix", "pedestal matrix", fColumns, 0, fColumns, fRows, 0, fRows); + Int_t column; Int_t row; Float_t NOISE,PEDESTAL; - + for(Int_t i=0; iFill(NOISE); h2->Fill(PEDESTAL); h3->Fill(column,row,NOISE); h4->Fill(column,row,PEDESTAL); } - + cm2->cd(1); h3->Draw("colz"); h3->GetXaxis()->SetTitle("column"); h3->GetYaxis()->SetTitle("row"); h3->GetZaxis()->SetTitle("Noise [ADC]"); - + cm2->cd(2); h4->Draw("colz"); h4->GetXaxis()->SetTitle("column"); h4->GetYaxis()->SetTitle("row"); h4->GetZaxis()->SetTitle("Pedstals [ADC]"); - + cm2->cd(3); h1->Draw(); h1->GetXaxis()->SetTitle("Noise [ADC]"); h1->GetYaxis()->SetTitle("Counts"); - + cm2->cd(4); h2->Draw(); h2->GetXaxis()->SetTitle("Pedestal [ADC]"); h2->GetYaxis()->SetTitle("Counts"); - + cm2->DrawClone(); cm2->Close(); cm2->Update(); @@ -1929,12 +1921,12 @@ void MAPS::plotHitDis(UInt_t Start, UInt_t Frames) { if(fOk) { -//Check availabilty of Frames - if( Frames > fEventsSum ) { + //Check availabilty of Frames + if( Frames > fEventsSum ) { Frames = fEventsSum; printf("Changed 'Number Frames' to: %u\n", Frames ); } - if( Frames+Start > fEventsSum ) { + if( Frames+Start > fEventsSum ) { Start = fEventsSum-Frames; printf("Changed 'First Event' to: %u\n", Start ); } @@ -1947,42 +1939,42 @@ void MAPS::plotSignal(UInt_t Start, UInt_t Frames) { if(fOk) { -//Check availabilty of Frames - if( Frames > fEventsSum ) { + //Check availabilty of Frames + if( Frames > fEventsSum ) { Frames = fEventsSum; printf("Changed 'Number Frames' to: %u\n", Frames ); } - if( Frames+Start > fEventsSum ) { + if( Frames+Start > fEventsSum ) { Start = fEventsSum-Frames; printf("Changed 'First Event' to: %u\n", Start ); } - - TH2F *h1 = new TH2F("Frames 0 " , "Frame 0" , fPixels, 0, fPixels, 2*16384, -16384, 16384); - TH2F *h2 = new TH2F("Frames 1" , "Frame 1" , fPixels, 0, fPixels, 2*16384, -16384, 16384); - TH2F *h3 = new TH2F("CDS" , "CDS" , fPixels, 0, fPixels, 2*16384, -16384, 16384); - - TH1F *h4 = new TH1F("Frames 0 histo" , "Frames 0 histo" , 2*16384, -16384, 16384); - TH1F *h5 = new TH1F("Frames 1 histo" , "Frames 1 histo" , 2*16384, -16384, 16384); - TH1F *h6 = new TH1F("CDS histo" , "CDS histo" , 2*16384, -16384, 16384); - + + TH2F *h1 = new TH2F("Frames 0 " , "Frame 0" , fPixels, 0, fPixels, 2*16384, -16384, 16384); + TH2F *h2 = new TH2F("Frames 1" , "Frame 1" , fPixels, 0, fPixels, 2*16384, -16384, 16384); + TH2F *h3 = new TH2F("CDS" , "CDS" , fPixels, 0, fPixels, 2*16384, -16384, 16384); + + TH1F *h4 = new TH1F("Frames 0 histo" , "Frames 0 histo" , 2*16384, -16384, 16384); + TH1F *h5 = new TH1F("Frames 1 histo" , "Frames 1 histo" , 2*16384, -16384, 16384); + TH1F *h6 = new TH1F("CDS histo" , "CDS histo" , 2*16384, -16384, 16384); + for(UInt_t i=Start; iFill(j,fF0matrix [j]); - h2->Fill(j,fF1matrix [j]); - h3->Fill(j,fCdsmatrix [j]); - - h4->Fill(fF0matrix [j]); - h5->Fill(fF1matrix [j]); - h6->Fill(fCdsmatrix [j]); + h1->Fill(j,fF0matrix [j]); + h2->Fill(j,fF1matrix [j]); + h3->Fill(j,fCdsmatrix [j]); + + h4->Fill(fF0matrix [j]); + h5->Fill(fF1matrix [j]); + h6->Fill(fCdsmatrix [j]); } } } - - + + TCanvas* cm11; cm11 = new TCanvas("cm11","Signal",50,100,1200,800); cm11->Divide(3,2); @@ -1991,37 +1983,37 @@ void MAPS::plotSignal(UInt_t Start, UInt_t Frames) { gStyle->SetCanvasColor(0); gStyle->SetFrameFillColor(10); gStyle->SetOptStat(0); - + cm11->cd(1); h1->Draw("colz"); h1->GetXaxis()->SetTitle("Pixel#"); h1->GetYaxis()->SetTitle("Signal"); - + cm11->cd(2); h2->Draw("colz"); h2->GetXaxis()->SetTitle("Pixel#"); h2->GetYaxis()->SetTitle("Signal"); - + cm11->cd(3); h3->Draw("colz"); h3->GetXaxis()->SetTitle("Pixel#"); h3->GetYaxis()->SetTitle("Signal"); - + cm11->cd(4); h4->Draw(); h4->GetXaxis()->SetTitle("Signal [ADC]"); h4->GetYaxis()->SetTitle("Counts"); - + cm11->cd(5); h5->Draw(); h5->GetXaxis()->SetTitle("Signal [ADC]"); h5->GetYaxis()->SetTitle("Counts"); - + cm11->cd(6); h6->Draw(); h6->GetXaxis()->SetTitle("Signal [ADC]"); h6->GetYaxis()->SetTitle("Counts"); - + cm11->DrawClone(); cm11->Close(); cm11->Update(); @@ -2036,7 +2028,7 @@ void MAPS::plotPixSignal(UInt_t Start, UInt_t Frames, Int_t Pixel) { if(fOk) { -//Check availabilty of Frames + //Check availabilty of Frames TCanvas* cm4; cm4 = new TCanvas("cm4","PixelSignal",50,100,1200,800); cm4->Divide(3,2); @@ -2045,24 +2037,24 @@ void MAPS::plotPixSignal(UInt_t Start, UInt_t Frames, Int_t Pixel) { gStyle->SetCanvasColor(0); gStyle->SetFrameFillColor(10); gStyle->SetOptStat(0); - - if( Frames > fEventsSum ) { + + if( Frames > fEventsSum ) { Frames = fEventsSum; printf("Changed 'Number Frames' to: %u\n", Frames ); } - if( Frames+Start > fEventsSum ) { + if( Frames+Start > fEventsSum ) { Start = fEventsSum-Frames; printf("Changed 'First Event' to: %u\n", Start ); } - - TH2F *h1 = new TH2F("Frame 0 vs T" , "Frame 0 vs T" , Frames, Start, Start+Frames, 2*16384, -16384, 16384); - TH2F *h2 = new TH2F("Frame 1 vs T" , "Frame 1 vs T" , Frames, Start, Start+Frames, 2*16384, -16384, 16384); - TH2F *h3 = new TH2F("CDS vs T" , "CDS vs T" , Frames, Start, Start+Frames, 2*16384, -16384, 16384); - - TH1F *h4 = new TH1F("Frames 0 phisto" , "Frames 0 phisto" , 2*16384, -16384, 16384); - TH1F *h5 = new TH1F("Frames 1 phisto" , "Frames 1 phisto" , 2*16384, -16384, 16384); - TH1F *h6 = new TH1F("CDS phisto" , "CDS phisto" , 2*16384, -16384, 16384); - + + TH2F *h1 = new TH2F("Frame 0 vs T" , "Frame 0 vs T" , Frames, Start, Start+Frames, 2*16384, -16384, 16384); + TH2F *h2 = new TH2F("Frame 1 vs T" , "Frame 1 vs T" , Frames, Start, Start+Frames, 2*16384, -16384, 16384); + TH2F *h3 = new TH2F("CDS vs T" , "CDS vs T" , Frames, Start, Start+Frames, 2*16384, -16384, 16384); + + TH1F *h4 = new TH1F("Frames 0 phisto" , "Frames 0 phisto" , 2*16384, -16384, 16384); + TH1F *h5 = new TH1F("Frames 1 phisto" , "Frames 1 phisto" , 2*16384, -16384, 16384); + TH1F *h6 = new TH1F("CDS phisto" , "CDS phisto" , 2*16384, -16384, 16384); + for(UInt_t i=Start; iFill( i,fF0matrix[Pixel]) ; h2->Fill( i,fF1matrix[Pixel]) ; h3->Fill( i,fCdsmatrix[Pixel] ); - + h4->Fill( fF0matrix[Pixel] ); h5->Fill( fF1matrix[Pixel] ); h6->Fill( fCdsmatrix[Pixel] ); } } - + cm4->cd(1); h1->Draw("colz"); h1->GetXaxis()->SetTitle("Frame#"); h1->GetYaxis()->SetTitle("Signal"); - + cm4->cd(2); h2->Draw("colz"); h2->GetXaxis()->SetTitle("Frame#"); h2->GetYaxis()->SetTitle("Signal"); - + cm4->cd(3); h3->Draw("colz"); h3->GetXaxis()->SetTitle("Frame#"); h3->GetYaxis()->SetTitle("Signal"); - + cm4->cd(4); h4->Draw(); h4->GetXaxis()->SetTitle("Signal [ADC]"); h4->GetYaxis()->SetTitle("Counts"); - + cm4->cd(5); h5->Draw(); h5->GetXaxis()->SetTitle("Signal [ADC]"); h5->GetYaxis()->SetTitle("Counts"); - + cm4->cd(6); h6->Draw(); h6->GetXaxis()->SetTitle("Signal [ADC]"); h6->GetYaxis()->SetTitle("Counts"); - -// cm4->DrawClone(); -// cm4->Update(); -// cm4->Close(); + + // cm4->DrawClone(); + // cm4->Update(); + // cm4->Close(); cout<<"\rPIXELSIGNALS plotted! "<=28 && (count%1053)<28+64*16 && countframes==11) -// if( (count%1053)>=28 && (count%1053)<28+64*16) -// { -// y = ((count%1053)-28)%64; -// x = ((count%1053)-28)/64; +// if(1) +// // if(count==count_tmp+13) +// { +// // cout<=28 && (count%1053)<28+64*16 && countframes==11) +// if( (count%1053)>=28 && (count%1053)<28+64*16) +// { +// y = ((count%1053)-28)%64; +// x = ((count%1053)-28)/64; // -// z1 = a1; -// z2 = a2; -// z3 = a1-a2; +// z1 = a1; +// z2 = a2; +// z3 = a1-a2; // -// histo1[0]->Fill(z1); -// histo1[1]->Fill(z2); -// histo1[2]->Fill(z3); +// histo1[0]->Fill(z1); +// histo1[1]->Fill(z2); +// histo1[2]->Fill(z3); // -// histo2[0]->Fill(x,y,z1); -// histo2[1]->Fill(x,y,z2); -// histo2[2]->Fill(x,y,z3); +// histo2[0]->Fill(x,y,z1); +// histo2[1]->Fill(x,y,z2); +// histo2[2]->Fill(x,y,z3); // -// // cout<< (count%1053)-28 <<"\t"<=1050 && count<1053+50)) -// // if( count%1053==13 ) -// { -// cout<> (7-i)) & 1); -// } -// if(1) {cout<<" ";} -// } -// // cout<<" "; -// // cout<=1050 && count<1053+50)) +// // if( count%1053==13 ) +// { +// cout<> (7-i)) & 1); +// } +// if(1) {cout<<" ";} +// } +// // cout<<" "; +// // cout<Divide(3,2); -// gStyle->SetOptFit(1011); -// gStyle->SetPalette(1); -// gStyle->SetCanvasColor(0); -// gStyle->SetFrameFillColor(10); -// gStyle->SetOptStat(1); +// TCanvas* cm; +// cm = new TCanvas("cc2","Matrix",50,100,1200,800); +// cm->Divide(3,2); +// gStyle->SetOptFit(1011); +// gStyle->SetPalette(1); +// gStyle->SetCanvasColor(0); +// gStyle->SetFrameFillColor(10); +// gStyle->SetOptStat(1); // -// cm->cd(1); -// histo1[0]->Draw(); -// histo1[0]->GetXaxis()->SetTitle("Signal [ADC]"); -// histo1[0]->GetYaxis()->SetTitle("Entries"); -// cm->Update(); -// cm->cd(2); -// histo1[1]->Draw(); -// histo1[1]->GetXaxis()->SetTitle("Signal [ADC]"); -// histo1[1]->GetYaxis()->SetTitle("Entries"); -// cm->Update(); -// cm->cd(3); -// histo1[2]->Draw(); -// histo1[2]->GetXaxis()->SetTitle("Signal [ADC]"); -// histo1[2]->GetYaxis()->SetTitle("Entries"); -// cm->Update(); +// cm->cd(1); +// histo1[0]->Draw(); +// histo1[0]->GetXaxis()->SetTitle("Signal [ADC]"); +// histo1[0]->GetYaxis()->SetTitle("Entries"); +// cm->Update(); +// cm->cd(2); +// histo1[1]->Draw(); +// histo1[1]->GetXaxis()->SetTitle("Signal [ADC]"); +// histo1[1]->GetYaxis()->SetTitle("Entries"); +// cm->Update(); +// cm->cd(3); +// histo1[2]->Draw(); +// histo1[2]->GetXaxis()->SetTitle("Signal [ADC]"); +// histo1[2]->GetYaxis()->SetTitle("Entries"); +// cm->Update(); // -// cm->cd(4); -// histo2[0]->Draw("colz"); -// histo2[0]->GetXaxis()->SetTitle("column"); -// histo2[0]->GetYaxis()->SetTitle("row"); -// histo2[0]->GetZaxis()->SetTitle("Signal [ADC]"); -// cm->Update(); -// cm->cd(5); -// histo2[1]->Draw("colz"); -// histo2[1]->GetXaxis()->SetTitle("column"); -// histo2[1]->GetYaxis()->SetTitle("row"); -// histo2[1]->GetZaxis()->SetTitle("Signal [ADC]"); -// cm->Update(); -// cm->cd(6); -// histo2[2]->Draw("colz"); -// histo2[2]->GetXaxis()->SetTitle("column"); -// histo2[2]->GetYaxis()->SetTitle("row"); -// histo2[2]->GetZaxis()->SetTitle("Signal [ADC]"); -// cm->Update(); +// cm->cd(4); +// histo2[0]->Draw("colz"); +// histo2[0]->GetXaxis()->SetTitle("column"); +// histo2[0]->GetYaxis()->SetTitle("row"); +// histo2[0]->GetZaxis()->SetTitle("Signal [ADC]"); +// cm->Update(); +// cm->cd(5); +// histo2[1]->Draw("colz"); +// histo2[1]->GetXaxis()->SetTitle("column"); +// histo2[1]->GetYaxis()->SetTitle("row"); +// histo2[1]->GetZaxis()->SetTitle("Signal [ADC]"); +// cm->Update(); +// cm->cd(6); +// histo2[2]->Draw("colz"); +// histo2[2]->GetXaxis()->SetTitle("column"); +// histo2[2]->GetYaxis()->SetTitle("row"); +// histo2[2]->GetZaxis()->SetTitle("Signal [ADC]"); +// cm->Update(); } //#################################################################### //#################################################################### UInt_t MAPS::littleEndian32(char* RawData, Int_t Pos) { - -// for(int j=3;j>=0;j--) -// { -// char a = RawData[j+Pos]; -// -// int n=CHAR_BIT*sizeof(a); -// -// cout<<" | "; -// for (int i=0;i=0;j--) + // { + // char a = RawData[j+Pos]; + // + // int n=CHAR_BIT*sizeof(a); + // + // cout<<" | "; + // for (int i=0;istringToNumber((string)fMatrix); - + if( matrixNumber>5 ) // TODO { cerr<<"ERROR: "<