From a39f39263a35d189b9297525e82ec8d3e7f48239 Mon Sep 17 00:00:00 2001 From: alla Date: Thu, 6 Mar 2003 13:45:26 +0000 Subject: [PATCH] code clean --- FMD/AliFMDReconstruction.cxx | 169 ++++++++++++++++++++--------------- FMD/AliFMDReconstruction.h | 31 ++++--- FMD/AliFMDv0.cxx | 16 +--- FMD/FMDLinkDef.h | 2 - FMD/libFMD.pkg | 2 +- 5 files changed, 122 insertions(+), 98 deletions(-) diff --git a/FMD/AliFMDReconstruction.cxx b/FMD/AliFMDReconstruction.cxx index a1ccba883da..dd5222ee3b8 100644 --- a/FMD/AliFMDReconstruction.cxx +++ b/FMD/AliFMDReconstruction.cxx @@ -76,34 +76,43 @@ AliFMDReconstruction::~AliFMDReconstruction() void AliFMDReconstruction::Exec(Option_t *option) { - //Collects all digits in the same active volume into number of particles + /* + Reconstruct nember of particles + in given group of pads for given FMDvolume + determine by numberOfVolume , + numberOfMinSector,numberOfMaxSector, + numberOfMinRing, numberOgMaxRing + Reconstruction method choose dependence on number of empty pads + */ + + cout<<"\nStart AliFMDReconstruction::Exec(...)"<GetDetector("FMD"); - TClonesArray *fReconParticles=FMD->ReconParticles(); + AliFMD * fFMD = (AliFMD *) gAlice->GetDetector("FMD"); + TClonesArray *fReconParticles=fFMD->ReconParticles(); if(fNevents == 0) fNevents=(Int_t)gAlice->TreeE()->GetEntries(); cout<<" fNevents "<GetEvent(ievent) ; if(gAlice->TreeH()==0) return; if(gAlice->TreeD()==0) return; @@ -115,92 +124,92 @@ void AliFMDReconstruction::Exec(Option_t *option) if(gAlice->TreeR()==0) gAlice->MakeTree("R"); //Make branches - FMD->MakeBranch("R"); + fFMD->MakeBranch("R"); Int_t zeroADC=1; AliFMDdigit *fmdDigit; - if (FMD) + if (fFMD) { gAlice->TreeD()->GetEvent(0); - TClonesArray *FMDdigits=FMD->Digits(); - Int_t nDigits=FMDdigits->GetEntries(); + TClonesArray *fFMDdigits=fFMD->Digits(); + Int_t nDigits=fFMDdigits->GetEntries(); cout<<" nDigits "<UncheckedAt(digit); + fmdDigit=(AliFMDdigit*)fFMDdigits->UncheckedAt(digit); ivol=fmdDigit->Volume(); iSector=fmdDigit->NumberOfSector(); iRing=fmdDigit->NumberOfRing(); pedestal=Int_t(gRandom->Gaus(500,250)); - PadADC[ivol-1][iSector-1][iRing-1]= + padADC[ivol-1][iSector-1][iRing-1]= fmdDigit->ADCsignal() -Int_t(Float_t(pedestal)/channelWidth); - if (PadADC[ivol-1][iSector-1][iRing-1]<0) - PadADC[ivol-1][iSector-1][iRing-1]=0; + if (padADC[ivol-1][iSector-1][iRing-1]<0) + padADC[ivol-1][iSector-1][iRing-1]=0; } //digit loop - Int_t Rmin=0; Int_t Rmax=0; //To avoid warning - Int_t Smin=0; Int_t Smax=0; //To avoid warning + Int_t rmin=0; Int_t rmax=0; //To avoid warning + Int_t smin=0; Int_t smax=0; //To avoid warning AliHeader *header = gAlice->GetHeader(); AliGenEventHeader* genHeader = header->GenEventHeader(); TArrayF *o = new TArrayF(3); genHeader->PrimaryVertex(*o); Float_t zVertex=o->At(2); - for (ivol=0; ivol0.1 ||(ivol==2||ivol==4)) - RecParticles[5]= - Determination_by_Poisson - (PadADC,ivol+1,Rmin,Rmax,Smin,Smax); + (Float_t)zeroPads/(Float_t)numberOfPads; + recParticles[0]=ivol; + recParticles[1]=smin; + recParticles[2]=smax; + recParticles[3]=rmin; + recParticles[4]=rmax; + if (zerosRatio>0.1 ) + recParticles[5]= + DeterminationByPoisson + (padADC,ivol+1,rmin,rmax,smin,smax); else - RecParticles[5]= - Determination_by_thresholds - (PadADC,ivol+1,Rmin,Rmax,Smin,Smax); + recParticles[5]= + DeterminationByThresholds + (padADC,ivol+1,rmin,rmax,smin,smax); new((*fReconParticles)[nRecPart++]) - AliFMDReconstParticles(RecParticles); + AliFMDReconstParticles(recParticles); } // eta } // volume @@ -213,10 +222,16 @@ void AliFMDReconstruction::Exec(Option_t *option) }; //------------------------------------------------------------ -Int_t AliFMDReconstruction::Determination_by_thresholds -(Int_t PadADC[][50][800],Int_t volume, Int_t Rmin, Int_t Rmax, - Int_t Smin, Int_t Smax) +Int_t AliFMDReconstruction::DeterminationByThresholds +(Int_t padAdc[][50][800],Int_t volume, Int_t rmin, Int_t rmax, + Int_t smin, Int_t smax) { + /* + reconstruct number of particles by + energy deposited threshold method + Using if number of empty pads less then 10% + +*/ cout<<"\nStart threshold method\n"; Int_t thresholdInner[30]={ @@ -238,51 +253,59 @@ Int_t AliFMDReconstruction::Determination_by_thresholds if(volume==1||volume==3||volume==5) threshold[it]=thresholdInner[it]; if(volume==2||volume==4) threshold[it]=thresholdOuter[it]; } - Int_t threshold_array_size = 30; - Int_t NumPart=0; + Int_t thresholdArraySize = 30; + Int_t numPart=0; //Inner Si - for (Int_t iring=Rmin; iringthreshold[i] - &&PadADC[volume-1][isector][iring]<=threshold[i+1]) + if(padAdc[volume-1][isector][iring]>threshold[i] + &&padAdc[volume-1][isector][iring]<=threshold[i+1]) { - NumPart+=i; + numPart+=i; break; }; // if in threshol interval }; //threshold_array_size }; //iring }; //sector cout<<"\nEnd threshol method"< #include #include +#include #include #include "AliFMDv0.h" #include "AliRun.h" @@ -118,7 +119,6 @@ void AliFMDv0::CreateGeometry() printf(name,nameSi); zfmd=TMath::Abs(z[ifmd]); - printf("zfmd %f z[ifmd] %f",zfmd,z[ifmd]); AliFMD::Eta2Radius(etain[ifmd],zfmd,&rin[ifmd]); AliFMD::Eta2Radius(etaout[ifmd],zfmd,&rout[ifmd]); @@ -126,11 +126,9 @@ void AliFMDv0::CreateGeometry() par[1]=rout[ifmd]; par[2]=zFMD/2; gMC->Gsvolu(name,"TUBE", idtmed[3], par, 3); - // par[2]=zDet/2; gMC->Gsvolu(nameSi,"TUBE", idtmed[1], par, 0); - printf ("rin %f rout %f ZFMD %f\n",par[0],par[1],z[ifmd]); - if (z[ifmd] < 0){ + if (z[ifmd] < 0){ gMC->Gspos(name,1,"ALIC",0,0,z[ifmd],0, "ONLY");} else { gMC->Gspos(name,1,"ALIC",0,0,z[ifmd],idrotm[901], "ONLY");} @@ -138,14 +136,8 @@ void AliFMDv0::CreateGeometry() par[2]=zDet/2; zpos=zFMD/2 -par[2]; gMC->Gsposp(nameSi,ifmd+1,name,0,0,zpos,0, "ONLY",par,3); - cout<<" Si "<Gsdvn(nameSector, nameSi , fSectorsSi2, 2); gMC->Gsdvn(nameRing, nameSector, fRingsSi2, 1); diff --git a/FMD/FMDLinkDef.h b/FMD/FMDLinkDef.h index da61666fe9c..223f991e3e5 100644 --- a/FMD/FMDLinkDef.h +++ b/FMD/FMDLinkDef.h @@ -16,8 +16,6 @@ #pragma link C++ class AliFMDdigit+; #pragma link C++ class AliFMDReconstruction+; #pragma link C++ class AliFMDReconstParticles+; -#pragma link C++ class AliFMDMerger+; #pragma link C++ class AliFMDDigitizer+; -#pragma link C++ class AliFMDSDigitizer+; #endif diff --git a/FMD/libFMD.pkg b/FMD/libFMD.pkg index 7f9f652f86a..14329554f53 100644 --- a/FMD/libFMD.pkg +++ b/FMD/libFMD.pkg @@ -1,4 +1,4 @@ -SRCS= AliFMD.cxx AliFMDv0.cxx AliFMDv1.cxx AliFMDv2.cxx AliFMDhit.cxx AliFMDdigit.cxx AliFMDMerger.cxx AliFMDReconstruction.cxx AliFMDReconstParticles.cxx AliFMDDigitizer.cxx AliFMDSDigitizer.cxx +SRCS= AliFMD.cxx AliFMDv0.cxx AliFMDv1.cxx AliFMDv2.cxx AliFMDhit.cxx AliFMDdigit.cxx AliFMDReconstruction.cxx AliFMDReconstParticles.cxx AliFMDDigitizer.cxx HDRS= $(SRCS:.cxx=.h) -- 2.43.0