#include "AliMC.h"
ClassImp(AliPMDDigitizer)
-//
-// Constructor
-//
+
AliPMDDigitizer::AliPMDDigitizer()
{
// Default Constructor
//
// Member functions
//
-void AliPMDDigitizer::OpengAliceFile(Char_t *file, Option_t *option)
+void AliPMDDigitizer::OpengAliceFile(const char *file, Option_t *option)
{
// Loads galice.root file and corresponding header, kinematics
// hits and sdigits or digits depending on the option
//
- fRunLoader = AliRunLoader::Open(file,AliConfig::fgkDefaultEventFolderName,
- "UPDATE");
+ fRunLoader = AliRunLoader::Open(file,AliConfig::fgkDefaultEventFolderName);
if (!fRunLoader)
{
Float_t edep;
Float_t vx = -999.0, vy = -999.0, vz = -999.0;
-
+
ResetSDigit();
printf("Event Number = %d \n",ievt);
Int_t nparticles = fRunLoader->GetHeader()->GetNtrack();
printf("Number of Particles = %d \n", nparticles);
fRunLoader->GetEvent(ievt);
- fPArray = gAlice->GetMCApp()->Particles();
+ // fPArray = gAlice->GetMCApp()->Particles();
// ------------------------------------------------------- //
// Pointer to specific detector hits.
// Get pointers to Alice detectors and Hits containers
if (fPMD) fHits = fPMD->Hits();
// Start loop on tracks in the hits containers
-
+
for (Int_t track=0; track<ntracks;track++)
{
gAlice->ResetHits();
if (fPMD)
{
npmd = fHits->GetEntriesFast();
- cout << " npmd = " << npmd << endl;
for (int ipmd = 0; ipmd < npmd; ipmd++)
{
fPMDHit = (AliPMDhit*) fHits->UncheckedAt(ipmd);
trackno = fPMDHit->GetTrack();
-
// get kinematics of the particles
fParticle = gAlice->GetMCApp()->Particle(trackno);
trackpid = fParticle->GetPdgCode();
- cout << " trackno = " << trackno << " track = " << track << endl;
- //cout << " trackpid = " << trackpid << endl;
Int_t igatr = -999;
Int_t ichtr = -999;
Int_t igapid = -999;
Int_t idmo = -999;
TParticle* mparticle = fParticle;
- Int_t jjnu = mparticle->GetFirstMother();
- cout << " Coming to this step - step 0 jjnu = " << jjnu << endl;
-
Int_t tracknoOld=0, trackpidOld=0, statusOld = 0;
if (mparticle->GetFirstMother() == -1)
{
Float_t edep;
Float_t vx = -999.0, vy = -999.0, vz = -999.0;
-
ResetDigit();
printf("Event Number = %d \n",ievt);
Int_t nparticles = fRunLoader->GetHeader()->GetNtrack();
printf("Number of Particles = %d \n", nparticles);
fRunLoader->GetEvent(ievt);
- fPArray = gAlice->GetMCApp()->Particles();
+ // fPArray = gAlice->GetMCApp()->Particles();
// ------------------------------------------------------- //
// Pointer to specific detector hits.
// Get pointers to Alice detectors and Hits containers
//
}
-
-void AliPMDDigitizer::MeV2ADC(Float_t mev, Float_t & adc)
+void AliPMDDigitizer::MeV2ADC(Float_t mev, Float_t & adc) const
{
// This converts the simulated edep to ADC according to the
// Test Beam Data