Message: hit question Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question hit question 

Keywords: hit question
Forum: Hits, Digitization and Pileup
Date: 24 Aug, 2004
From: Taylan Yetkin <tyetkin@fnal.gov>

How can I use Tracker-like and Calorimeter-like hits at the same time? In CaloHit class we define SetEdep() and AddEdep() methods, but AddEdep() adds the edep as in the example novice/N05/. However I need to collect information of the positons let's say, how to do this?

// CaloHit
   inline void SetEdep(G4double de)
      { edep = de; };
   inline void AddEdep(G4double de)
      { edep += de; };
   inline G4double GetEdep()
      { return edep; };

//CaloSD

 if(CellID[copyID]==-1){
   ExN05CalorimeterHit* calHit =
   new ExN05CalorimeterHit(physVol->GetLogicalVolume());
   calHit->SetEdep( edep );
   calHit->SetPos(pos);
 }else{
    (*CalCollection)[CellID[copyID]]->AddEdep( edep );
     (*CalCollection)[CellID[copyID]]->SETPos(pos); ?????
 }

However I don't want to add (new+=pos) to the positions, I want to get individual positions as

//CaloEventAction
 if(CaloHC){ 
   int n_hit = CaloHC->entries();
   for(int i=0;i<n_hit;i++){
    CaloHit* aHit = (*CaloHC)[i];
    double a = aHit->GetEdep();
    double b = aHit->GetPos();
   }
  } 

 

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

 Add Message Add Message
to: "hit question"

 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 ]