Added to repository
This commit is contained in:
88
geant4/LEMuSR/include/LEMuSRCryoSD.hh
Normal file
88
geant4/LEMuSR/include/LEMuSRCryoSD.hh
Normal file
@ -0,0 +1,88 @@
|
||||
#ifndef LEMuSRCryoSD_h
|
||||
#define LEMuSRCryoSD_h 1
|
||||
|
||||
|
||||
|
||||
#include "G4VSensitiveDetector.hh"
|
||||
|
||||
#include "LEMuSRCryoHit.hh"
|
||||
#include "G4RunManager.hh"
|
||||
#include "G4Run.hh"
|
||||
|
||||
// root histogram classes
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "TROOT.h"
|
||||
#include "TFile.h"
|
||||
#include "TH1.h"
|
||||
#include "TRandom.h"
|
||||
#include "TTree.h"
|
||||
#include "TBranch.h"
|
||||
#include "TClonesArray.h"
|
||||
#include "TStopwatch.h"
|
||||
#include "LEMuSRCryoHit.hh"
|
||||
|
||||
|
||||
|
||||
class G4Step;
|
||||
class G4HCofThisEvent;
|
||||
class G4TouchableHistory;
|
||||
|
||||
class LEMuSRCryoSD : public G4VSensitiveDetector
|
||||
{
|
||||
public:
|
||||
|
||||
LEMuSRCryoSD(G4String name);
|
||||
~LEMuSRCryoSD();
|
||||
|
||||
void Initialize (G4HCofThisEvent* HCE);
|
||||
G4bool ProcessHits(G4Step* aStep, G4TouchableHistory*ROhist);
|
||||
void EndOfEvent (G4HCofThisEvent* HCE);
|
||||
void clear();
|
||||
void DrawAll();
|
||||
void PrintAll();
|
||||
|
||||
void BookRoot();
|
||||
void FillRoot();
|
||||
void WriteRoot();
|
||||
|
||||
TFile *myFile;
|
||||
TTree *myTree;
|
||||
TTree *tree;
|
||||
|
||||
// HIT datas
|
||||
|
||||
G4String p_name, vname;
|
||||
G4double spin, edep, toten, kinen, tof, globaltime, proptime;
|
||||
G4ThreeVector hitpos, hitmom;
|
||||
G4int ID;
|
||||
|
||||
G4bool condition;
|
||||
|
||||
G4bool CheckCondition(const G4Step* aStep);
|
||||
|
||||
void GetDatas(const G4Step* aStep);
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Float_t kenergy, tenergy, edeposit;
|
||||
Float_t localtime, globaltime, proptime;
|
||||
Float_t positionx, positiony,positionz;
|
||||
Float_t momdirx,momdiry,momdirz, foil;
|
||||
Int_t muon,positron,gamma, runid;
|
||||
} cryoHit ;
|
||||
|
||||
cryoHit theHit;
|
||||
void getHit();
|
||||
|
||||
private:
|
||||
LEMuSRCryoHitsCollection *CryoCollection;
|
||||
|
||||
G4double positionResolution;
|
||||
G4int mu,e,g;
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user