Message: RE: Can I fill histograms with energy deposit per event using EndOfEvent() method of G4VSensitiveDetector? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None RE: Can I fill histograms with energy deposit per event using EndOfEvent() method of G4VSensitiveDetector? 

Forum: Hits, Digitization and Pileup
Re: Question Can I fill histograms with energy deposit per event using EndOfEvent() method of G4VSensitiveDetector? (Victor_Makarov)
Re: None RE: Can I fill histograms with energy deposit per event using EndOfEvent() method of G4VSensitiveDetector? (Makoto Asai)
Date: 08 Jun, 2007
From: Victor_Makarov <Victor_Makarov>

I receive an error.

<aTrackerSD/tCollection> is not found. Seems that I can't give an exact name of my collection/detector.
But I checked and found no mistakes. Maybe You can see them:

My Detector construction block:

//------------------------------------------------ 
  // Sensitive detectors
  //------------------------------------------------ 

  G4SDManager* SDman = G4SDManager::GetSDMpointer();
  G4String trackerChamberSDname;
  TrackerSD* aTrackerSD = new TrackerSD(trackerChamberSDname="/aTrackerSD");
  SDman->AddNewDetector( aTrackerSD );
  logicBox->SetSensitiveDetector( aTrackerSD );

My TrackerSD block:

TrackerSD::TrackerSD(G4String name)
:G4VSensitiveDetector(name)
{
  G4String HCname;
  collectionName.insert(HCname="tCollection");
}

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

TrackerSD::~TrackerSD(){ }

//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......

void TrackerSD::Initialize(G4HCofThisEvent* HCE)
{
  trackerCollection = new TrackerHitsCollection
                          (SensitiveDetectorName,collectionName[0]); 
  G4int HCID = -1;
  if(HCID<0)
  { HCID = G4SDManager::GetSDMpointer()->GetCollectionID(trackerCollection); }
  HCE->AddHitsCollection( HCID, trackerCollection ); 
}

My block in EventAction:

EventAction::EventAction(RunAction* run)
:Run(run),drawFlag("none"),printModulo(10000),eventMessenger(NULL)
{

  G4String colName;
  G4SDManager* SDman = G4SDManager::GetSDMpointer();
  HHC1ID = SDman->GetCollectionID(colName="aTrackerSD/tCollection");
  eventMessenger = new EventActionMessenger(this);
}

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: RE: Can I fill histograms with energy deposit per event using EndOfEvent() method of G4VSensitiveDetector?   (Makoto Asai - 08 Jun, 2007)
(_ None: RE: Can I fill histograms with energy deposit per event using EndOfEvent() method of G4VSensitiveDetector?   (Victor - 09 Jun, 2007)
 Add Message Add Message
to: "RE: Can I fill histograms with energy deposit per event using EndOfEvent() method of G4VSensitiveDetector?"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]