Skip to content
Snippets Groups Projects
Commit 49a3356a authored by adrien-matta's avatar adrien-matta
Browse files

* Fixing Barrel analysis

parent 43ec40c2
No related branches found
No related tags found
No related merge requests found
...@@ -71,11 +71,10 @@ void TTiaraBarrelPhysics::BuildPhysicalEvent(){ ...@@ -71,11 +71,10 @@ void TTiaraBarrelPhysics::BuildPhysicalEvent(){
unsigned int sizeU = m_PreTreatedData->GetFrontUpstreamEMult(); unsigned int sizeU = m_PreTreatedData->GetFrontUpstreamEMult();
unsigned int sizeD = m_PreTreatedData->GetFrontDownstreamEMult(); unsigned int sizeD = m_PreTreatedData->GetFrontDownstreamEMult();
unsigned int sizeB = m_EventData->GetBackEMult(); unsigned int sizeB = m_PreTreatedData->GetBackEMult();
for(unsigned int k = 0 ; k < sizeB ; k++){ for(unsigned int k = 0 ; k < sizeB ; k++){
for(unsigned int i = 0 ; i < sizeU ; i++){ for(unsigned int i = 0 ; i < sizeU ; i++){
if(m_PreTreatedData->GetFrontUpstreamEDetectorNbr(i) == m_PreTreatedData->GetBackEDetectorNbr(k)) if(m_PreTreatedData->GetFrontUpstreamEDetectorNbr(i) == m_PreTreatedData->GetBackEDetectorNbr(k))
for(unsigned int j = 0 ; j < sizeD ; j++){ for(unsigned int j = 0 ; j < sizeD ; j++){
// same detector, same strip // same detector, same strip
if( m_PreTreatedData->GetFrontUpstreamEDetectorNbr(i) if( m_PreTreatedData->GetFrontUpstreamEDetectorNbr(i)
...@@ -93,18 +92,18 @@ void TTiaraBarrelPhysics::BuildPhysicalEvent(){ ...@@ -93,18 +92,18 @@ void TTiaraBarrelPhysics::BuildPhysicalEvent(){
double POS = double POS =
CalibrationManager::getInstance() CalibrationManager::getInstance()
->ApplyResistivePositionCalibration("TIARABARREL/B" ->ApplyResistivePositionCalibration("TIARABARREL/B"
+itoa(m_EventData->GetFrontUpstreamEDetectorNbr(i)) +itoa(m_PreTreatedData->GetFrontUpstreamEDetectorNbr(i))
+"_STRIP"+itoa(m_EventData->GetFrontUpstreamEStripNbr(i)) +"_STRIP"+itoa(m_PreTreatedData->GetFrontUpstreamEStripNbr(i))
+"_POS",(ED-EU)/(EU+ED)); +"_POS",(ED-EU)/(EU+ED));
Strip_Pos.push_back(POS); Strip_Pos.push_back(POS);
Strip_N.push_back(m_EventData->GetFrontUpstreamEStripNbr(i)); Strip_N.push_back(m_PreTreatedData->GetFrontUpstreamEStripNbr(i));
DetectorNumber.push_back(m_EventData->GetFrontUpstreamEDetectorNbr(i)); DetectorNumber.push_back(m_PreTreatedData->GetFrontUpstreamEDetectorNbr(i));
double E = (EU+ED) / CalibrationManager::getInstance() double E = (EU+ED) / CalibrationManager::getInstance()
->ApplyCalibration("TIARABARREL/BALLISTIC_B" ->ApplyCalibration("TIARABARREL/BALLISTIC_B"
+ itoa(m_EventData->GetFrontDownstreamEDetectorNbr(i)) + itoa(m_PreTreatedData->GetFrontDownstreamEDetectorNbr(i))
+ "_STRIP" + "_STRIP"
+ itoa(m_EventData->GetFrontDownstreamEStripNbr(i)), + itoa(m_PreTreatedData->GetFrontDownstreamEStripNbr(i)),
POS); POS);
Strip_E.push_back(E); Strip_E.push_back(E);
} }
......
...@@ -4,15 +4,14 @@ NPSIM = NPSimulation ...@@ -4,15 +4,14 @@ NPSIM = NPSimulation
all: $(DELFILES) $(COPYFILES) $(NPSIM) all: $(DELFILES) $(COPYFILES) $(NPSIM)
CopyIncSrcFiles:
./scripts/copyfiles.sh
DelIncSrcFiles: DelIncSrcFiles:
./scripts/deletefiles.sh ./scripts/deletefiles.sh
NPSimulation: CopyIncSrcFiles: DelIncSrcFiles
make -j 10 -f Makefile.geant4 ./scripts/copyfiles.sh
NPSimulation: DelIncSrcFiles CopyIncSrcFiles
make -f Makefile.geant4
clean: clean:
./scripts/deletefiles.sh ./scripts/deletefiles.sh
......
This diff is collapsed.
...@@ -42,7 +42,7 @@ do ...@@ -42,7 +42,7 @@ do
# only copy files associated to defined detector libraries # only copy files associated to defined detector libraries
if echo "$detectorlibs" | grep -q "$ldir" ; then if echo "$detectorlibs" | grep -q "$ldir" ; then
# print informations # print informations
echo " + Copying files from $ldir directory..." # echo " + Copying files from $ldir directory..."
# enter directory # enter directory
cd $dir cd $dir
# loop on files in directory # loop on files in directory
......
...@@ -139,23 +139,20 @@ DetectorConstruction::~DetectorConstruction(){ ...@@ -139,23 +139,20 @@ DetectorConstruction::~DetectorConstruction(){
//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo...... //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
G4VPhysicalVolume* DetectorConstruction::Construct(){ G4VPhysicalVolume* DetectorConstruction::Construct(){
//------------------------------------------------------ materials //------------------------------------------------------ materials
G4double a; // atomic mass G4double a; // atomic mass
G4double z; // atomic number G4double z; // atomic number
G4double density; G4double density;
G4Element* N = new G4Element("Nitrogen", "N", z = 7., a = 14.01 * g / mole); G4Element* N = new G4Element("Nitrogen", "N", z = 7., a = 14.01 * g / mole);
G4Element* O = new G4Element("Oxygen" , "O", z = 8., a = 16.00 * g / mole); G4Element* O = new G4Element("Oxygen" , "O", z = 8., a = 16.00 * g / mole);
// Vacuum // Vacuum
density = 0.000000001 * mg / cm3; density = 0.000000001 * mg / cm3;
G4Material* Vacuum = new G4Material("Vacuum", density, 2); G4Material* Vacuum = new G4Material("Vacuum", density, 2);
Vacuum->AddElement(N, .7); Vacuum->AddElement(N,.7);
Vacuum->AddElement(O, .3); Vacuum->AddElement(O,.3);
//------------------------------world volume //------------------------------world volume
G4double world_x = 10.0 * m; G4double world_x = 10.0 * m;
G4double world_y = 10.0 * m; G4double world_y = 10.0 * m;
G4double world_z = 10.0 * m; G4double world_z = 10.0 * m;
...@@ -164,10 +161,9 @@ G4VPhysicalVolume* DetectorConstruction::Construct(){ ...@@ -164,10 +161,9 @@ G4VPhysicalVolume* DetectorConstruction::Construct(){
= new G4Box("world_box", world_x, world_y, world_z); = new G4Box("world_box", world_x, world_y, world_z);
world_log = new G4LogicalVolume(world_box, Vacuum, "world_log", 0, 0, 0); world_log = new G4LogicalVolume(world_box, Vacuum, "world_log", 0, 0, 0);
world_phys = new G4PVPlacement(0, G4ThreeVector(), world_log, "world", 0, false, 0); world_phys = new G4PVPlacement(0, G4ThreeVector(), world_log, "world", 0, false, 0);
// G4VisAttributes* VisAtt = new G4VisAttributes(G4Colour(0.2, 0.2, 0.2)); //G4VisAttributes* VisAtt = new G4VisAttributes(G4Colour(0.2, 0.2, 0.2));
G4VisAttributes* VisAtt = new G4VisAttributes(G4VisAttributes::Invisible); G4VisAttributes* VisAtt = new G4VisAttributes(G4VisAttributes::Invisible);
world_log->SetVisAttributes(VisAtt); world_log->SetVisAttributes(VisAtt);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment