Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

BesMdcSD.hh

Go to the documentation of this file.
00001 //---------------------------------------------------------------------------//
00002 //      BOOST --- BESIII Object_Oriented Simulation Tool                     //
00003 //---------------------------------------------------------------------------
00004 //Description: Sensitive detector definition for axial layers of MDC 
00005 //Author: Yuan Ye(yuany@mail.ihep.ac.cn)
00006 //Created: 4 Dec, 2003
00007 //Modified:
00008 //Comment: Used in "BesMdc"
00009 //---------------------------------------------------------------------------//
00010 
00011 #ifndef BesMdcSD_h
00012 #define BesMdcSD_h 1
00013 class TFile;
00014 class TH1F;
00015 class G4Svc;
00016 
00017 //#include "G4VSensitiveDetector.hh"
00018 #include "BesSensitiveDetector.hh"
00019 #include "BesMdcHit.hh"
00020 #include "BesMdcGeoParameter.hh"
00021 #include "BesMdcCalTransfer.hh"
00022 #include "MdcGeomSvc/MdcGeomSvc.h"
00023 #include "CalibDataSvc/CalibDataSvc.h"
00024 #include "DedxCurSvc/DedxCurSvc.h"
00025 #include "GaudiKernel/NTuple.h"
00026 #include "TF1.h"
00027 
00028 #include <vector>
00029 
00030 class G4Step;
00031 class G4HCofThisEvent;
00032 class BesSensitiveManager;
00033 class G4Svc;
00034 
00035 class BesMdcSD : public BesSensitiveDetector
00036 {
00037 public:
00038   BesMdcSD(G4String);
00039   ~BesMdcSD();
00040   
00041   void Initialize(G4HCofThisEvent*);
00042   G4bool ProcessHits(G4Step*, G4TouchableHistory*);
00043   void EndOfEvent(G4HCofThisEvent*);
00044 
00045   void BeginOfTruthEvent(const G4Event*);
00046   void EndOfTruthEvent(const G4Event*);
00047 
00048   G4double Distance(G4int, G4int,G4ThreeVector,G4ThreeVector,G4ThreeVector&,G4double&);
00049  
00050   void dedxFuncInti(void);
00051 
00052 private:
00053   G4int hitPointer[43][288],truthPointer[43][288];
00054   BesMdcHitsCollection* hitsCollection;
00055   BesMdcHitsCollection* truthCollection;
00056   BesMdcGeoParameter* mdcGeoPointer;
00057   BesMdcCalTransfer* mdcCalPointer;
00058   MdcGeomSvc* mdcGeomSvc;
00059   G4Svc* m_G4Svc;
00060   TF1 *dEdE_mylanfunc;
00061   
00063   CalibDataSvc* m_calibDataSvc;
00064   IDedxCurSvc* m_pDedxCurSvc;
00065   TH1F* m_dedx_hists;
00066   G4int m_numDedxHists;
00067   G4int m_numBg;
00068   std::vector<G4double> m_bgRange;
00069   std::vector<G4double> mdc_hit_length;
00070   G4int GetBetagammaIndex(G4double bg);
00071   G4int GetAngleIndex(G4double);
00072   G4int GetChargeIndex(G4int);
00073   G4double GetValDedxCurve(G4double bg, G4double charge);
00074   G4double dedxSample(G4double betagamma, G4double length, G4double theta);
00075   
00076   //dedx ntuple
00077   NTuple::Tuple* m_tupleMdc;
00078   NTuple::Item<double> m_betaGamma;
00079   NTuple::Item<double> m_fitval;
00080   NTuple::Item<double> m_random;
00081   NTuple::Item<double> m_dedx;
00082   NTuple::Item<double> m_de;
00083   //NTuple::Item<double> m_length;
00084   NTuple::Item<double> m_charge;
00085   NTuple::Item<double> m_costheta;
00087 };
00088 
00089 #endif
00090 

Generated on Wed Feb 2 15:42:02 2011 for BOSS6.5.5 by  doxygen 1.3.9.1