/************************************************************************** * Copyright(c) 1998-2000, 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. * **************************************************************************/ #include #include #include #include #include #include #include "AliFMDDigitizer.h" #include "AliFMD.h" #include "AliFMDSDigitizer.h" #include "AliFMDhit.h" #include "AliFMDdigit.h" #include "AliRunDigitizer.h" #include "AliRun.h" #include "AliPDG.h" #include #include #include ClassImp(AliFMDDigitizer) //___________________________________________ AliFMDDigitizer::AliFMDDigitizer() :AliDigitizer() { // Default ctor - don't use it ; } //___________________________________________ AliFMDDigitizer::AliFMDDigitizer(AliRunDigitizer* manager) :AliDigitizer(manager) { cout<<"AliFMDDigitizer::AliFMDDigitizer"<2) // cerr<<"AliFMDDigitizer::AliFMDDigitizer" // <<"(AliRunDigitizer* manager) was processed"<SDigits2Digits start...\n"; #endif // cout<<" FMD "<GetDetector("FMD") ; // Loop over files to digitize Int_t nFiles=GetManager()->GetNinputs(); for (Int_t inputFile=0; inputFileGetOutputEventNr()<Hits (); TH = fManager->GetInputTreeH(inputFile); brHits = TH->GetBranch("FMD"); if (brHits) { fFMD->SetHitsAddressBranch(brHits); }else{ cerr<<"EXEC Branch FMD hit not found"<GetEntries(); for (Int_t track = 0; track < ntracks; track++) { brHits->GetEntry(track); Int_t nhits = FMDhits->GetEntries (); for (hit = 0; hit < nhits; hit++) { fmdHit = (AliFMDhit *) FMDhits->UncheckedAt (hit); volume = fmdHit->Volume (); sector = fmdHit->NumberOfSector (); ring = fmdHit->NumberOfRing (); e = fmdHit->Edep (); de[volume][sector][ring] += e; } //hit loop } //track loop } //if FMD // Put noise and make ADC signal Float_t I = 1.664 * 0.04 * 2.33 / 22400; // = 0.69e-6; for ( ivol=1; ivol<=5; ivol++){ for ( iSector=1; iSector<=NumberOfSectors[ivol-1]; iSector++){ for ( iRing=1; iRing<=NumberOfRings[ivol-1]; iRing++){ digit[0]=ivol; digit[1]=iSector; digit[2]=iRing; charge = Int_t (de[ivol][iSector][iRing] / I); digit[3]=PutNoise(charge); if(digit[3]<= 500) digit[3]=500; //dynamic range from MIP(0.155MeV) to 30MIP(4.65MeV) //1024 ADC channels Float_t channelWidth=(22400*50)/1024; digit[4]=Int_t(digit[3]/channelWidth); if (digit[4]>1024) digit[4]=1024; fFMD->AddDigit(digit); } //ivol } //iSector } //iRing TTree* treeD = fManager->GetTreeD(); treeD->Clear(); treeD->Reset(); fFMD->MakeBranchInTreeD(treeD); treeD->Fill(); fManager->GetTreeD()->Write(0,TObject::kOverwrite); gAlice->ResetDigits(); } }