/************************************************************************** * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * * * * Author: The ALICE Off-line Project. * * Contributors are mentioned in the code where appropriate. * * * * Permission to use, copy, modify and distribute this software and its * * documentation strictly for non-commercial purposes is hereby granted * * without fee, provided that the above copyright notice appears in all * * copies and that both the copyright notice and this permission notice * * appear in the supporting documentation. The authors make no claims * * about the suitability of this software for any purpose. It is * * provided "as is" without express or implied warranty. * **************************************************************************/ //_________________________________________________________________________ // This is a TTask that constructs ReconstParticles (reconstructed particles) // out of Digits // //-- Authors: Evgeny Karpechev(INR) and Alla Maevsksia ////////////////////////////////////////////////////////////////////////////// // --- ROOT system --- #include "TTask.h" #include "TTree.h" #include "TSystem.h" #include "TFile.h" #include "TROOT.h" #include "TFolder.h" // --- Standard library --- #include #include "Riostream.h" // --- AliRoot header files --- #include "AliFMDdigit.h" #include "AliFMDhit.h" #include "AliFMDReconstParticles.h" #include "AliFMD.h" #include "AliFMDv1.h" #include "AliFMDReconstruction.h" #include "AliRun.h" #include "AliHeader.h" #include "AliGenEventHeader.h" ClassImp(AliFMDReconstruction) //____________________________________________________________________________ AliFMDReconstruction::AliFMDReconstruction():TTask("AliFMDReconstruction","") { fNevents = 0 ; // Number of events to rreconnstraction, 0 means all events in current file // add Task to //root/Tasks folder TTask * roottasks = (TTask*)gROOT->GetRootFolder()->FindObject("Tasks") ; roottasks->Add(this) ; } //____________________________________________________________________________ AliFMDReconstruction::AliFMDReconstruction(char* HeaderFile, char *ReconstParticlesFile):TTask("AliFMDReconstruction","") { fNevents = 0 ; // Number of events to rreconnstraction, 0 means all events in current file fReconstParticlesFile=ReconstParticlesFile ; fHeadersFile=HeaderFile ; //add Task to //root/Tasks folder TTask * roottasks = (TTask*)gROOT->GetRootFolder()->FindObject("Tasks") ; roottasks->Add(this) ; } //____________________________________________________________________________ AliFMDReconstruction::~AliFMDReconstruction() { } //---------------------------------------------------------------------------- void AliFMDReconstruction::Exec(Option_t *option) { //Collects all digits in the same active volume into number of particles cout<<"\nStart AliFMDReconstruction::Exec(...)"<GetDetector("FMD"); TClonesArray *fReconParticles=FMD->ReconParticles(); if(fNevents == 0) fNevents=(Int_t)gAlice->TreeE()->GetEntries(); cout<<" fNevents "<GetEvent(ievent) ; if(gAlice->TreeH()==0) return; if(gAlice->TreeD()==0) return; brDigits=gAlice->TreeD()->GetBranch("FMD"); if (!brDigits){ cerr<<"EXEC Branch FMD digits not found"<TreeR()==0) gAlice->MakeTree("R"); //Make branches FMD->MakeBranch("R"); Int_t zeroADC=1; AliFMDdigit *fmdDigit; if (FMD) { gAlice->TreeD()->GetEvent(0); TClonesArray *FMDdigits=FMD->Digits(); Int_t nDigits=FMDdigits->GetEntries(); cout<<" nDigits "<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]= 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; } //digit loop 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); else RecParticles[5]= Determination_by_thresholds (PadADC,ivol+1,Rmin,Rmax,Smin,Smax); new((*fReconParticles)[nRecPart++]) AliFMDReconstParticles(RecParticles); } // eta } // volume }//if FMD gAlice->TreeR()->Reset(); gAlice->TreeR()->Fill(); gAlice->TreeR()->Write(0,TObject::kOverwrite); } //event loop cout<<"\nAliFMDReconstruction::Exec finished"<threshold[i] &&PadADC[volume-1][isector][iring]<=threshold[i+1]) { NumPart+=i; break; }; // if in threshol interval }; //threshold_array_size }; //iring }; //sector cout<<"\nEnd threshol method"<