Changeset 261 in Idarraga


Ignore:
Timestamp:
Nov 21, 2011, 7:07:58 PM (13 years ago)
Author:
idarraga
Message:
 
Location:
allpix
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • allpix/allpix.cc

    r260 r261  
    138138        // Hits ! --> Ntuple to store hits
    139139        // creates AllPixRun to analyze hits at the end of event
    140         TString dataset = "AllPix";
     140        TString dataset = "allPix";
    141141        TString tempdir = "";
    142142        AllPixRunAction * run_action = new AllPixRunAction(detector, dataset, tempdir,
  • allpix/include/AllPixDetectorConstruction.hh

    r257 r261  
    4242#include "G4Colour.hh"
    4343#include "G4PVDivision.hh"
     44#include "G4VSolid.hh"
    4445
    4546#include "AllPixTrackerSD.hh"
     
    110111  void SetOutputFilePrefix(G4String);
    111112  G4String GetOutputFilePrefix(){return m_outputFilePrefix;};
     113
     114  G4VSolid * GetVSolidDetector (G4int detId) {
     115          // Check first if the detId is good
     116          // otherwise return null pointer
     117          return m_Box_log[detId]->GetSolid();
     118  };
    112119
    113120        // Specific EUTelescope
  • allpix/include/AllPixRun.hh

    r260 r261  
    3131class WriteToNtuple;
    3232class SimpleHits;
     33class AllPixDetectorConstruction;
    3334
    3435#ifdef _EUTELESCOPE
     
    4041public:
    4142
    42   AllPixRun(TString, TString, TString);
     43  AllPixRun(AllPixDetectorConstruction *, TString, TString, TString);
    4344  virtual ~AllPixRun();
    4445
     
    5455private:
    5556
     57  AllPixDetectorConstruction * m_detectorPtr;
    5658  AllPixTrackerHitsCollection * m_hitsCollection;
    5759
  • allpix/macros/oneDetector_Inventor_vis.in

    r260 r261  
    9898/gps/source/list
    9999
    100 /run/beamOn 2
     100/run/beamOn 1
    101101
    102102# video
  • allpix/macros/telescope1_Inventor_vis.in

    r260 r261  
    162162#/vis/open OGLIQt
    163163#/vis/open OGLSQt
    164 #/vis/open OIX
    165 /vis/open OGLIX 1024x768-100+100
     164/vis/open OIX
     165#/vis/open OGLIX 1024x768-100+100
    166166#/vis/open OGLSXm
    167167#/vis/open DAWNFILE
  • allpix/src/AllPixRun.cc

    r260 r261  
    99#include "G4SDManager.hh"
    1010#include "G4DigiManager.hh"
     11#include "G4Trajectory.hh"
    1112
    1213// digits, frames
     
    2930 * This constructor is called once per run
    3031 */
    31 AllPixRun::AllPixRun(TString ofp, TString dataset, TString tempDir){
     32AllPixRun::AllPixRun(AllPixDetectorConstruction * det, TString ofp, TString dataset, TString tempDir){
     33
     34        m_detectorPtr = det;
    3235
    3336        // Call for an instance to write.  Need to know how
     
    387390        *m_lciobridge_dut_f << "R " << GetRunID() << endl;
    388391
     392        // check event for information about the track
     393        //G4TrajectoryContainer * tC = evt->GetTrajectoryContainer();
     394        //G4Trajectory * tr;
     395        G4TrajectoryContainer * tC = evt->GetTrajectoryContainer();
     396        G4cout << "Trajectories : " << tC->GetVector()->size() << G4endl;
     397        TrajectoryVector * tV = tC->GetVector();
     398        TrajectoryVector::iterator tI = tV->begin();
     399        TrajectoryVector::iterator tIE = tV->end();
     400
     401        G4Trajectory * tr;
     402        G4TrajectoryPoint* tP;
     403        for ( ; tI != tIE ; tI++ ) {
     404                tr = static_cast<G4Trajectory*>(*tI);
     405                //G4cout << "    " << tr->GetPDGEncoding() << G4endl;
     406                //G4cout << "       " << tr->GetPointEntries() << G4endl;
     407                tP = static_cast<G4TrajectoryPoint*>((*tI)->GetPoint(0));
     408
     409                // Check which of the points is at the interior of the sensor
     410                // Use the G4VSolid::Inside(const G4ThreeVector& p)
     411                // Find first the Silicon G4VSolids (sensors).
     412
     413
     414                //G4VSolid * sol = m_detectorPtr->GetVSolidDetector(100);
     415                //G4cout << "       " << tP->GetPosition().z()/mm << G4endl;
     416/*
     417                if(sol->Inside(tP->GetPosition()) == kInside){
     418                        G4cout << "       inside !!" << G4endl;
     419                } else {
     420                        G4cout << "       outside !!" << G4endl;
     421                }
     422*/
     423        }
     424
    389425        // Ok, I have to match the right detector m_frames with the digit collection
    390426        for (G4int i = 0 ; i < nDC ; i++) {
  • allpix/src/AllPixRunAction.cc

    r260 r261  
    8383G4Run * AllPixRunAction::GenerateRun(){
    8484
    85         m_AllPixRun = new AllPixRun(m_detectorPtr->GetOutputFilePrefix(), m_dataset, m_tempdir); // keep this pointer
     85        m_AllPixRun = new AllPixRun(m_detectorPtr, m_detectorPtr->GetOutputFilePrefix(), m_dataset, m_tempdir); // keep this pointer
    8686        m_AllPixRun->SetLCIOBridgeFileDsc(m_lciobridge_f, m_lciobridge_dut_f);
    8787
Note: See TracChangeset for help on using the changeset viewer.