13.12.2011 Kamil Sedlak
musrSim: 1) implemented volume type "boxbox" (box with a box hole) 2) suppressing optical photon output in case optical photons are not simulated musrSimAna: 3) musrWriteDump modified (needed only for a dump-file creation)
This commit is contained in:
parent
a8c93b1b8c
commit
1b6ebb06c0
@ -64,7 +64,7 @@ void musrWriteDump::send_to_dump(unsigned int channel, Long64_t tdcBin, int flus
|
|||||||
it5 = it4; it5++;
|
it5 = it4; it5++;
|
||||||
it6 = it5; it6++;
|
it6 = it5; it6++;
|
||||||
double prob = (float)rand()/RAND_MAX;
|
double prob = (float)rand()/RAND_MAX;
|
||||||
std::cout<<"IIIIIIIIIIIIIIII prob= "<<prob<<"; MAX_TIME_JITTER= "<<MAX_TIME_JITTER<<std::endl;
|
// std::cout<<"IIIIIIIIIIIIIIII prob= "<<prob<<"; MAX_TIME_JITTER= "<<MAX_TIME_JITTER<<std::endl;
|
||||||
if ( ((it2->first)-(it1->first)) <= MAX_TIME_JITTER) { if (prob<0.6) {it = it2;} }
|
if ( ((it2->first)-(it1->first)) <= MAX_TIME_JITTER) { if (prob<0.6) {it = it2;} }
|
||||||
if ( ((it3->first)-(it1->first)) <= MAX_TIME_JITTER) { if (prob<0.5) {it = it3;} }
|
if ( ((it3->first)-(it1->first)) <= MAX_TIME_JITTER) { if (prob<0.5) {it = it3;} }
|
||||||
if ( ((it4->first)-(it1->first)) <= MAX_TIME_JITTER) { if (prob<0.4) {it = it4;} }
|
if ( ((it4->first)-(it1->first)) <= MAX_TIME_JITTER) { if (prob<0.4) {it = it4;} }
|
||||||
@ -86,6 +86,7 @@ void musrWriteDump::send_to_dump(unsigned int channel, Long64_t tdcBin, int flus
|
|||||||
write_to_dump(ch_num, tdcDifference, false);
|
write_to_dump(ch_num, tdcDifference, false);
|
||||||
// std::cout<<"Setrideno: ch="<<it->first<<", "<<it->second<<std::endl;
|
// std::cout<<"Setrideno: ch="<<it->first<<", "<<it->second<<std::endl;
|
||||||
kamilHitMultimap.erase(it);
|
kamilHitMultimap.erase(it);
|
||||||
|
if (tdcDifference<=MAX_TIME_JITTER) tdcBin0 -= TDC_BIT_RANGE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -490,6 +490,19 @@ G4VPhysicalVolume* musrDetectorConstruction::Construct() {
|
|||||||
G4Tubs* solidOuterDetTube2 = new G4Tubs("SolidOuterDetTube2",x4*mm,x5*mm,x6*mm,x7*deg,x8*deg);
|
G4Tubs* solidOuterDetTube2 = new G4Tubs("SolidOuterDetTube2",x4*mm,x5*mm,x6*mm,x7*deg,x8*deg);
|
||||||
solid = new G4SubtractionSolid(solidName, solidOuterDetTube2, solidInnerDetBox2);
|
solid = new G4SubtractionSolid(solidName, solidOuterDetTube2, solidInnerDetBox2);
|
||||||
}
|
}
|
||||||
|
else if (strcmp(tmpString2,"boxbox")==0){
|
||||||
|
// Create a box, from which center a box is cut out.
|
||||||
|
// x1,x2,x3=box half-widths of the inner box (opening); x4,x5,x6 define the big box.
|
||||||
|
sscanf(&line[0],"%*s %*s %*s %s %lf %lf %lf %lf %lf %lf %s",
|
||||||
|
name,&x1,&x2,&x3,&x4,&x5,&x6,material);
|
||||||
|
sscanf(&line[0],"%*s %*s %*s %*s %*g %*g %*g %*g %*g %*g %*s %lf %lf %lf %s %s %s %d %s",
|
||||||
|
&posx,&posy,&posz,mothersName,rotMatrix,sensitiveDet,&volumeID,actualFieldName);
|
||||||
|
solidName+=name;
|
||||||
|
G4double roundingErr=0.01*mm; // to avoid some displaying problems of the subtracted volumes
|
||||||
|
G4Box* solidInnerDetBox = new G4Box("SolidInnerDetBox",x1*mm+roundingErr,x2*mm+roundingErr,x3*mm+roundingErr);
|
||||||
|
G4Box* solidOuterDetBox = new G4Box("SolidOuterDetBox",x4*mm,x5*mm,x6*mm);
|
||||||
|
solid = new G4SubtractionSolid(solidName, solidOuterDetBox, solidInnerDetBox);
|
||||||
|
}
|
||||||
else if (strcmp(tmpString2,"GPSforward")==0){
|
else if (strcmp(tmpString2,"GPSforward")==0){
|
||||||
// Create a box, from which a cone is cut out:
|
// Create a box, from which a cone is cut out:
|
||||||
// x1, x2, x3 = box half-widths;
|
// x1, x2, x3 = box half-widths;
|
||||||
|
@ -232,9 +232,11 @@ void musrRootOutput::BeginOfRunAction() {
|
|||||||
if (store_posIniMomX) {rootTree->Branch("posIniMomX",&posIniMomx,"posIniMomX/D");}
|
if (store_posIniMomX) {rootTree->Branch("posIniMomX",&posIniMomx,"posIniMomX/D");}
|
||||||
if (store_posIniMomY) {rootTree->Branch("posIniMomY",&posIniMomy,"posIniMomY/D");}
|
if (store_posIniMomY) {rootTree->Branch("posIniMomY",&posIniMomy,"posIniMomY/D");}
|
||||||
if (store_posIniMomZ) {rootTree->Branch("posIniMomZ",&posIniMomz,"posIniMomZ/D");}
|
if (store_posIniMomZ) {rootTree->Branch("posIniMomZ",&posIniMomz,"posIniMomZ/D");}
|
||||||
|
if (musrParameters::boolG4OpticalPhotons) {
|
||||||
if (store_nOptPhot) {rootTree->Branch("nOptPhot",&nOptPhot,"nOptPhot/I");}
|
if (store_nOptPhot) {rootTree->Branch("nOptPhot",&nOptPhot,"nOptPhot/I");}
|
||||||
if (store_nOptPhotDet) {rootTree->Branch("nOptPhotDet",&nOptPhotDet,"nOptPhotDet/I");}
|
if (store_nOptPhotDet) {rootTree->Branch("nOptPhotDet",&nOptPhotDet,"nOptPhotDet/I");}
|
||||||
if (store_phot_time) {rootTree->Branch("phot_time",&phot_time,"phot_time[nOptPhotDet]/D");}
|
if (store_phot_time) {rootTree->Branch("phot_time",&phot_time,"phot_time[nOptPhotDet]/D");}
|
||||||
|
}
|
||||||
// if (store_globalTime) {rootTree->Branch("globalTime",&globalTime,"globalTime/D");}
|
// if (store_globalTime) {rootTree->Branch("globalTime",&globalTime,"globalTime/D");}
|
||||||
// if (store_fieldValue) {rootTree->Branch("fieldValue",&fieldValue,"fieldValue/D");}
|
// if (store_fieldValue) {rootTree->Branch("fieldValue",&fieldValue,"fieldValue/D");}
|
||||||
if (store_fieldNomVal) {
|
if (store_fieldNomVal) {
|
||||||
@ -297,6 +299,7 @@ void musrRootOutput::BeginOfRunAction() {
|
|||||||
rootTree->Branch("save_polz",&save_polz,"save_polz[save_n]/D");
|
rootTree->Branch("save_polz",&save_polz,"save_polz[save_n]/D");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (musrParameters::boolG4OpticalPhotons) {
|
||||||
if (store_odet_ID || store_odet_nPhot || store_odet_nPhotPrim || store_odet_timeFirst || store_odet_timeSecond ||
|
if (store_odet_ID || store_odet_nPhot || store_odet_nPhotPrim || store_odet_timeFirst || store_odet_timeSecond ||
|
||||||
store_odet_timeThird || store_odet_timeA || store_odet_timeB || store_odet_timeC || store_odet_timeD ||
|
store_odet_timeThird || store_odet_timeA || store_odet_timeB || store_odet_timeC || store_odet_timeD ||
|
||||||
store_odet_timeMean || store_odet_timeLast || store_odet_timeCFD || store_odet_amplCFD || store_odet_timeC1)
|
store_odet_timeMean || store_odet_timeLast || store_odet_timeCFD || store_odet_amplCFD || store_odet_timeC1)
|
||||||
@ -424,7 +427,7 @@ void musrRootOutput::BeginOfRunAction() {
|
|||||||
rootTree->Branch("odet_timeC39",&odet_timeC39,"odet_timeC39[odet_n]/D");
|
rootTree->Branch("odet_timeC39",&odet_timeC39,"odet_timeC39[odet_n]/D");
|
||||||
rootTree->Branch("odet_timeC40",&odet_timeC40,"odet_timeC40[odet_n]/D");
|
rootTree->Branch("odet_timeC40",&odet_timeC40,"odet_timeC40[odet_n]/D");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// htest1 = new TH1F("htest1","The debugging histogram 1",50,-4.,4.);
|
// htest1 = new TH1F("htest1","The debugging histogram 1",50,-4.,4.);
|
||||||
// htest2 = new TH1F("htest2","The debugging histogram 2",50,0.,3.142);
|
// htest2 = new TH1F("htest2","The debugging histogram 2",50,0.,3.142);
|
||||||
htest1 = new TH2F("htest1","x, y",50,-200.,200.,50,-200.,200.);
|
htest1 = new TH2F("htest1","x, y",50,-200.,200.,50,-200.,200.);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user