/************************************************************************** * 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" #include // --- Standard library --- #include // --- AliRoot header files --- #include "AliFMDdigit.h" #include "AliFMDReconstParticles.h" #include "AliFMD.h" #include "AliFMDv1.h" #include "AliFMDReconstruction.h" #include "AliRun.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) { printf (" AliFMDReconstruction starting \n"); //Collects all digits in the same active volume into number of particles Int_t const NumVolums=5; Int_t const NumSectors=40; Int_t const NumRings=768; Int_t PadADC[10][50][800]; Int_t ivol, iSector, iRing; Int_t Ne1; //Int_t NumberOfRings[5]= {256,128,256,128,256}; Int_t NumberOfSectors[5]= {20,40,20,40,20}; // number of ring for boundary 0.1 eta Int_t EtaIntervalInner []= {0, 55, 110, 165, 221, 276, 331, 386, 442, 497, 552, 607, 663, 718, 767 }; /* {0, 18, 36, 55, 73, 92, 110, 128, 147, 165, 184, 202, 221, 239, 255};*/ Int_t EtaIntervalOuter []= //{0, 21, 43, 65, 86, 108, 127}; {0, 65, 130, 195, 260, 325, 383}; Int_t EtaInterval[20]; Int_t size_EtaIntervalInner=sizeof (EtaIntervalInner)/sizeof(EtaIntervalInner[0]); Int_t size_EtaIntervalOuter=sizeof (EtaIntervalOuter)/sizeof(EtaIntervalOuter[0]); AliFMD * FMD = (AliFMD *) gAlice->GetDetector("FMD"); TClonesArray *fReconParticles=FMD->ReconParticles(); if(fNevents == 0) fNevents=(Int_t)gAlice->TreeE()->GetEntries(); for(Int_t ievent=0;ieventGetEvent(ievent) ; if(gAlice->TreeH()==0) return; if(gAlice->TreeR()==0) gAlice->MakeTree("R"); //Make branches AliFMDdigit *fmdDigit; FMD->MakeBranch("R"); Int_t zeroADC=1; // Int_t threshold_array_size=30; // cout<<" AliFMDdigit "<TreeD()->GetEvent(0); TClonesArray *FMDdigits=FMD->Digits(); Int_t nDigits=FMDdigits->GetEntries(); Int_t RecParticles[6]; Int_t nRecPart=0 ; Int_t ZeroPads=0; Int_t NumberOfPads=0; //To avoid warning Int_t pedestal; Float_t channelWidth=(22400*50)/1024; for (Int_t digit=0;digitUncheckedAt(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 for (ivol=1; ivol<=NumVolums; ivol++) { if (ivol==1||ivol==3||ivol==5) { Ne1=size_EtaIntervalInner; for(Int_t ieta=0; ietaTreeR()->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"<