Commit 5578d4a3 authored by Norbert Herrmann's avatar Norbert Herrmann
Browse files

save current state of macros

parent c817c7d2
......@@ -22,7 +22,8 @@ void ana_digi_cal_all(Int_t nEvents = 10000000,
//TString logLevel = "DEBUG3";
FairLogger::GetLogger();
gLogger->SetLogScreenLevel(logLevel);
gLogger->SetLogVerbosityLevel("VERYHIGH");
//gLogger->SetLogVerbosityLevel("VERYHIGH");
gLogger->SetLogVerbosityLevel("MEDIUM");
TString workDir = gSystem->Getenv("VMCWORKDIR");
/*
......
......@@ -36,7 +36,7 @@ void ana_digi_cal(Int_t nEvents = 10000000,
TString InputFile = paramDir + "data/" + cFileId + ".root";
// TString InputFile = "./data/" + cFileId + ".root";
TString OutputFile =
paramDir + "data/digidev_" + cFileId
paramDir + "data/TofHits_" + cFileId
+ Form("_%09d_%03d_%02.0f_Cal", iCalSet, iSel2, dDeadtime) + cCalId
+ ".out.root";
......
......@@ -22,7 +22,8 @@ void ana_digi_cal_all(Int_t nEvents = 10000000,
//TString logLevel = "DEBUG3";
FairLogger::GetLogger();
gLogger->SetLogScreenLevel(logLevel);
gLogger->SetLogVerbosityLevel("VERYHIGH");
//gLogger->SetLogVerbosityLevel("VERYHIGH");
gLogger->SetLogVerbosityLevel("MEDIUM");
TString workDir = gSystem->Getenv("VMCWORKDIR");
/*
......@@ -36,7 +37,7 @@ void ana_digi_cal_all(Int_t nEvents = 10000000,
TString InputFile = paramDir + "data/" + cFileId + ".root";
// TString InputFile = "./data/" + cFileId + ".root";
TString OutputFile =
paramDir + "data/digidev_" + cFileId
paramDir + "data/TofHits_" + cFileId
+ Form("_%09d_%03d_%02.0f_Cal", iCalSet, iSel2, dDeadtime) + cCalId
+ ".out.root";
......
......@@ -36,7 +36,7 @@ void ana_digi_cali(Int_t nEvents = 10000000,
TString InputFile = paramDir + "data/" + cFileId + ".root";
// TString InputFile = "./data/" + cFileId + ".root";
TString OutputFile =
paramDir + "data/digidev_" + cFileId
paramDir + "data/TofHits_" + cFileId
+ Form("_%09d_%03d_%02.0f_Cal", iCalSet, iSel2, dDeadtime) + cCalId
+ ".out.root";
......
......@@ -33,7 +33,7 @@ void ana_trks(Int_t nEvents = 10000,
TString ParFile = paramDir + "/data/" + cFileId.Data() + ".params.root";
TString InputFile = paramDir + "/data/" + cFileId.Data() + ".root";
TString InputDigiFile = paramDir + "/data/digidev_" + cFileId.Data()
TString InputDigiFile = paramDir + "/data/TofHits_" + cFileId.Data()
+ Form("_%s_%02.0f_Cal", cSet.Data(), dDeadtime)
+ cCalId + ".out.root";
if (iMc == 1) {
......@@ -41,7 +41,7 @@ void ana_trks(Int_t nEvents = 10000,
InputDigiFile = paramDir + "/data/" + cFileId.Data() + ".rec.root";
iRun = 700;
}
TString OutputFile = paramDir + "/data/hits_" + cFileId.Data()
TString OutputFile = paramDir + "/data/TofTrks_" + cFileId.Data()
+ Form("_%s_%06d_%03d", cSet.Data(), iSel, iSel2)
+ ".out.root";
TString cHstFile =
......
......@@ -33,7 +33,7 @@ void ana_trks_eval(Int_t nEvents = 10000,
TString ParFile = paramDir + "/data/" + cFileId.Data() + ".params.root";
TString InputFile = paramDir + "/data/" + cFileId.Data() + ".root";
TString InputDigiFile = paramDir + "/data/digidev_" + cFileId.Data()
TString InputDigiFile = paramDir + "/data/TofHits_" + cFileId.Data()
+ Form("_%s_%02.0f_Cal", cSet.Data(), dDeadtime)
+ cCalId + ".out.root";
if (iMc == 1) {
......@@ -41,7 +41,7 @@ void ana_trks_eval(Int_t nEvents = 10000,
InputDigiFile = paramDir + "/data/" + cFileId.Data() + ".rec.root";
iRun = 700;
}
TString InputTrklFile = paramDir + "/data/hits_" + cFileId.Data()
TString InputTrklFile = paramDir + "/data/TofTrks_" + cFileId.Data()
+ Form("_%s_%06d_%03d", cSet.Data(), iSel, iSel2)
+ ".out.root";
TString OutputFile = paramDir + "/data/ana_" + cFileId.Data()
......@@ -517,8 +517,8 @@ void ana_trks_eval(Int_t nEvents = 10000,
tofAnaTestbeam->SetDYMean(0.);
tofAnaTestbeam->SetDTMean(0.); // in ns
tofAnaTestbeam->SetDXWidth(0.5);
tofAnaTestbeam->SetDYWidth(1.0);
tofAnaTestbeam->SetDTWidth(0.1); // in ns
tofAnaTestbeam->SetDYWidth(0.8);
tofAnaTestbeam->SetDTWidth(0.08); // in ns
tofAnaTestbeam->SetCalParFileName(cAnaFile);
Double_t dScalFacA = 0.9; // dScalFac is used for tracking
tofAnaTestbeam->SetPosY4Sel(
......@@ -650,8 +650,15 @@ void ana_trks_eval(Int_t nEvents = 10000,
break;
case 31:
if (iMc == 0) {
//tofAnaTestbeam->SetSel2TOff(-0.55); // Shift Sel2 time peak to 0
tofAnaTestbeam->SetSel2TOff(0.3); // Shift Sel2 time peak to 0
switch (iRun) {
case 717:
tofAnaTestbeam->SetTShift(6.5); // Shift DTD4 to 0
tofAnaTestbeam->SetSel2TOff(0.6); // Shift Sel2 time peak to 0
break;
default: // 714
// tofAnaTestbeam->SetSel2TOff(-1.3); // Shift Sel2 time peak to 0
tofAnaTestbeam->SetSel2TOff(0.3); // Shift Sel2 time peak to 0
}
} else { // MC
tofAnaTestbeam->SetSel2TOff(-1.3); // Shift Sel2 time peak to 0
}
......
......@@ -32,7 +32,7 @@ void ana_trksi(Int_t nEvents = 10000,
TString paramDir = ".";
TString ParFile = paramDir + "/data/" + cFileId.Data() + ".params.root";
TString InputFile = paramDir + "/data/" + cFileId.Data() + ".root";
TString InputDigiFile = paramDir + "/data/digidev_" + cFileId.Data()
TString InputDigiFile = paramDir + "/data/TofHits_" + cFileId.Data()
+ Form("_%s_%02.0f_Cal", cSet.Data(), dDeadtime)
+ cCalId + ".out.root";
if (iMc == 1) {
......@@ -40,7 +40,7 @@ void ana_trksi(Int_t nEvents = 10000,
InputDigiFile = paramDir + "/data/" + cFileId.Data() + ".rec.root";
iRun = 700;
}
TString OutputFile = paramDir + "/data/hits_" + cFileId.Data()
TString OutputFile = paramDir + "/data/TofTrks_" + cFileId.Data()
+ Form("_%s_%06d_%03d", cSet.Data(), iSel, iSel2)
+ ".out.root";
TString cHstFile =
......@@ -460,7 +460,7 @@ void ana_trksi(Int_t nEvents = 10000,
tofAnaTestbeam->SetHitDistMin(30.); // initialization
tofAnaTestbeam->SetEnableMatchPosScaling(kTRUE);
tofAnaTestbeam->SetSpillDuration(3.);
tofAnaTestbeam->SetStartSpillTime(-100.);
tofAnaTestbeam->SetStartSpillTime(0.);
if (iMc == 1) {
tofAnaTestbeam->SetSpillDuration(0.);
tofAnaTestbeam->SetSpillBreak(0.);
......@@ -592,15 +592,21 @@ void ana_trksi(Int_t nEvents = 10000,
case 901041:
switch (iRSelin) {
case 500:
tofAnaTestbeam->SetTShift(0.8); // Shift DTD4 to 0
tofAnaTestbeam->SetTOffD4(11.); // Shift DTD4 to physical value
tofAnaTestbeam->SetTShift(-12.); // Shift DTD4 to 0
tofAnaTestbeam->SetTOffD4(15.); // Shift DTD4 to physical value
switch (iSel2in) {
case 30:
tofAnaTestbeam->SetSel2TOff(-0.3); // Shift Sel2 time peak to 0
break;
case 31:
tofAnaTestbeam->SetSel2TOff(0.); // Shift Sel2 time peak to 0
switch (iRun) {
case 717:
tofAnaTestbeam->SetTShift(6.5); // Shift DTD4 to 0
tofAnaTestbeam->SetSel2TOff(0.6); // Shift Sel2 time peak to 0
break;
default: //714
tofAnaTestbeam->SetSel2TOff(0.3); // Shift Sel2 time peak to 0
}
break;
case 600:
tofAnaTestbeam->SetSel2TOff(-0.2); // Shift Sel2 time peak to 0
......
......@@ -34,7 +34,7 @@ void dis_trks(Int_t nEvents = 10,
TString paramDir = "./";
TString ParFile = paramDir + "/data/" + cFileId.Data() + ".params.root";
TString InputFile = paramDir + "/data/" + cFileId.Data() + ".root";
TString InputDigiFile = paramDir + "/data/digidev_" + cFileId.Data()
TString InputDigiFile = paramDir + "/data/TofHits_" + cFileId.Data()
+ Form("_%s_%02.0f_Cal", cSet.Data(), dDeadtime)
+ cCalId + ".out.root";
if (iMc == 1) {
......@@ -42,7 +42,7 @@ void dis_trks(Int_t nEvents = 10,
InputDigiFile = paramDir + "/data/" + cFileId.Data() + ".rec.root";
iRun = 700;
}
TString OutputFile = paramDir + "/data/hits_" + cFileId.Data()
TString OutputFile = paramDir + "/data/distrks_" + cFileId.Data()
+ Form("_%s_%06d_%03d", cSet.Data(), iSel, iSel2)
+ ".out.root";
TString cHstFile =
......
......@@ -85,6 +85,11 @@ dDeadtime=50
#./gen_digi.sh $cRun $iCalSet $iSel2 $Deadtime $CalIdMode CalIdSet
cd $wdir
echo look for calfile: ls -1 ${cCalId}*set${cCalRef}_93_1tofClust.hst.root
digiCalFile=`ls -1 ./${cCalId}*set${cCalRef}_93_1tofClust.hst.root`
DigiCalFile=`pwd`/$digiCalFile
echo DigiCalFile=$DigiCalFile
if [ ! -e ${cRun} ]; then
mkdir $cRun
fi
......@@ -92,22 +97,20 @@ cd ${cRun}
mkdir Ana_${cSet}_${iSel}_${cSel2}_${iTraSetup}
cp ../rootlogon.C Ana_${cSet}_${iSel}_${cSel2}_${iTraSetup}/
cp ../.rootrc Ana_${cSet}_${iSel}_${cSel2}_${iTraSetup}/
echo look for calfile: ls -1 ${cCalId}*set${cCalRef}_93_1tofClust.hst.root
digiCalFile=`ls -1 ${cCalId}*set${cCalRef}_93_1tofClust.hst.root`
cd Ana_${cSet}_${iSel}_${cSel2}_${iTraSetup}
rm -v *AnaTestBeam.hst.root
cp -v ../../${cCalId}_tofFindTracks.hst.root .
echo create symbolic link to digiCalFile $digiCalFile in `pwd`
echo create symbolic link to DigiCalFile $DigiCalFile in `pwd`
rm -v ./$digiCalFile
ln -s -v ../$digiCalFile ./$digiCalFile
ln -s -v $DigiCalFile ./$digiCalFile
while [[ $dDTres > 0 ]]; do
for iCal in 1 2 3 5 6 7 8 1
do
root -b -q '../../ana_trks_eval.C('$nEvt','$iSel',-1,"'$cRun'","'$cSet'",'$iSel2','$iTraSetup','$fRange1','$fRange2','$dDeadtime',"'$cCalId'",'$iCal',0,'$iCalSet',1,'$iMc')'
root -b -q '../../ana_trks_eval.C('$nEvt','$iSel',-1,"'$cRun'","'$cSet'",'$iSel2','$iTraSetup','$fRange1','$fRange2','$dDeadtime',"'$cCalId'",'$iCal',0,'$iCalSet',0,'$iMc')'
mv -v tofAnaTestBeam.hst.root ${cRun}_TrkAnaTestBeam.hst.root
rm all_*
......@@ -134,7 +137,7 @@ done
# final action -> scan full statistics
iCal=1
root -b -q '../../ana_trks_eval.C(-1,'$iSel',-1,"'$cRun'","'$cSet'",'$iSel2','$iTraSetup','$fRange1','$fRange2','$dDeadtime',"'$cCalId'",'$iCal',0,'$iCalSet',0,'$iMc')'
root -b -q '../../ana_trks_eval.C(-1,'$iSel',-1,"'$cRun'","'$cSet'",'$iSel2','$iTraSetup','$fRange1','$fRange2','$dDeadtime',"'$cCalId'",'$iCal',0,'$iCalSet',1,'$iMc')'
rm all_*
cd ../..
......
......@@ -16,13 +16,12 @@ void mtof_reco(Int_t nEvents = 100, // number of Timeslices
// Adjust this part according to your requirements
// --- Logger settings ----------------------------------------------------
TString logLevel = "INFO";
TString logLevel = "DEBUG";
TString logVerbosity = "VERYHIGH";
// ------------------------------------------------------------------------
Int_t iTofCluMode = 1;
// ----- Environment --------------------------------------------------
TString myName = "mtof_reco"; // this macro's name for screen output
TString srcDir = gSystem->Getenv("VMCWORKDIR"); // top source directory
......@@ -72,7 +71,7 @@ void mtof_reco(Int_t nEvents = 100, // number of Timeslices
pSetup->GetGeoTag(ECbmModuleId::kTof, geoTag);
TObjString* tofBdfFile =
new TObjString(srcDir + "/parameters/tof/" + geoTag + ".digibdf.par");
new TObjString(srcDir + "/parameters/tof/tof_" + geoTag + ".digibdf.par");
parFileList->Add(tofBdfFile);
std::cout << "-I- " << myName << ": Using parameter file "
<< tofBdfFile->GetString() << std::endl;
......
......@@ -80,19 +80,8 @@ else
CalFile=${CalIdMode}_set${CalIdSet}_93_1tofClust.hst.root
fi
echo trk_cal_digi for $cRun with iDut=$iDut, iRef=$iRef, iSet=$iCalSet, iSel2=$iSel2, iBRef=$iBRef, Deadtime=$Deadtime, CalFile=$CalFile
if [[ $iShLev = "" ]]; then
iShLev=0
nEvt=20000
dDTres=100000
dDTRMSres=100000
dL0DTRMSres=100000
else
(( iShLev += 1 ))
fi
if [ -e /lustre/cbm ]; then
source /lustre/cbm/users/nh/CBM/cbmroot/trunk/build/config.sh
wdir=/lustre/cbm/users/nh/CBM/cbmroot/trunk/macro/beamtime/mcbm2020
......@@ -112,11 +101,19 @@ cp ../rootlogon.C .
echo Execute in `pwd` at shell level $iShLev: ./trk_cal_digi.sh $1 $2 $3 $4 $5 $6 $7 $8
if [[ $iShLev = "" ]]; then
iShLev=0
nEvt=200000
dDTres=100000
dDTRMSres=100000
dL0DTRMSres=100000
# get initial digi calibration
#cp -v ./I*/${CalFile} .
cp -v ./I*/${CalFile} .
# get latest tracker offsets
# cp -v ../${cRun}_tofFindTracks.hst.root .
else
(( iShLev += 1 ))
fi
rm -v TCalib.res
nEvtMax=0
......@@ -247,10 +244,10 @@ done
(( iShLev -= 1 ))
cd $wdir/$cRun
echo Finishing with ShLev $iShLev, Iter = $iIter
# generate full statistics digi file
# generate full statistics CalDigi / Hit file
if [[ $iShLev -eq 0 ]]; then
# root -b -q '../ana_digi_cal.C(-1,93,1,'$iRef',1,"'$cRun'",'$iCalSet',1,'$iSel2','$Deadtime',"'$CalIdMode'") '
root -b -q '../ana_digi_cal.C(1000000,93,1,'$iRef',1,"'$cRun'",'$iCalSet',1,'$iSel2','$Deadtime',"'$CalIdMode'") '
root -b -q '../ana_digi_cal_all.C(1000000,93,1,'$iRef',1,"'$cRun'",'$iCalSet',1,'$iSel2','$Deadtime',"'$CalIdMode'") '
cd $wdir
mv -v slurm-${SLURM_JOB_ID}.out ${outdir}/TrkCalDigi_${cRun}_${iCalSet}_${iSel2}_${CalIdMode}.out
fi
......
......@@ -44,7 +44,8 @@ const TString FileNameInfo = fileTag + "_mcbm.geo.info";
// TOF_Z_Front corresponds to front cover of outer super module towers
const Float_t TOF_Z_Front_Stand = 247.2; // = z=298 mCBM@SIS18
const Float_t TOF_Z_Front = 0; // = z=298 mCBM@SIS18
const Float_t TOF_X_Front_Stand = 0.; // = z=298 mCBM@SIS18
const Float_t TOF_Z_Front = 0.; // = z=298 mCBM@SIS18
//const Float_t TOF_Z_Front = 130; // = z=225 mCBM@SIS18
//const Float_t TOF_Z_Front = 250; // SIS 100 hadron
//const Float_t TOF_Z_Front = 450; // SIS 100 hadron
......@@ -68,7 +69,7 @@ const TString ElectronicsMedium = "carbon";
// Counters:
// 0 MRPC3a
// 1 MRPC3b
// 2
// 2 USTC
// 3
// 4 Diamond
//
......@@ -79,14 +80,14 @@ const Int_t NumberOfDifferentCounterTypes = 9;
const Float_t Glass_X[NumberOfDifferentCounterTypes] =
{32., 52., 32., 32., 0.2, 32., 28.8, 20., 2.4};
const Float_t Glass_Y[NumberOfDifferentCounterTypes] =
{26.9, 53., 20., 10., 0.2, 10., 6., 20., 2.4};
{27.0, 53., 26.8, 10., 0.2, 10., 6., 20., 2.4};
const Float_t Glass_Z[NumberOfDifferentCounterTypes] =
{0.1, 0.1, 0.1, 0.1, 0.01, 0.1, 0.1, 0.1, 0.1};
const Float_t GasGap_X[NumberOfDifferentCounterTypes] =
{32., 52., 32., 32., 0.2, 32., 28.8, 20., 2.4};
const Float_t GasGap_Y[NumberOfDifferentCounterTypes] =
{26.9, 53., 20., 10., 0.2, 10., 6., 20., 2.4};
{27.0, 53., 26.8, 10., 0.2, 10., 6., 20., 2.4};
const Float_t GasGap_Z[NumberOfDifferentCounterTypes] =
{0.025, 0.025, 0.025, 0.025, 0.01, 0.02, 0.02, 0.02, 0.025};
......@@ -133,18 +134,18 @@ const Float_t MeanTheta = 0.;
//Type of Counter for module
const Int_t CounterTypeInModule[NofModuleTypes] =
{0, 0, 1, 2, 3, 4, 6, 7, 8, 0};
{0, 0, 1, 2, 3, 4, 6, 7, 8, 2};
const Int_t NCounterInModule[NofModuleTypes] = {5, 5, 3, 5, 5, 1, 2, 1, 8, 2};
// Placement of the counter inside the module
const Float_t CounterXStartPosition[NofModuleTypes] =
{-58.5, -66.0, -56.0, -60.0, -60.0, 0.0, 0., 0., -7., 0.};
{-60.1, -66.0, -56.0, -60.0, -60.0, 0.0, 0., 0., -7., 0.};
const Float_t CounterXDistance[NofModuleTypes] =
{29.0, 32.0, 51.0, 30.0, 30.0, 0.0, 0., 0., 2., 0.};
{29.3, 32.0, 51.0, 30.0, 30.0, 0.0, 0., 0., 2., -1.};
const Float_t CounterYStartPosition[NofModuleTypes] =
{0.0, 0.0, 0.0, 0.0, 0.0, 0., 0., -4., -1.3, 0.};
const Float_t CounterYDistance[NofModuleTypes] =
{0.0, 0.0, 0.0, 0.0, 0.0, 0., 0., 8., 0., 0.};
{0.0, 0.0, 0.0, 0.0, 0.0, 0., 0., 8., 0., 1.};
const Float_t CounterZDistance[NofModuleTypes] =
{-2.5, 0.0, 0.0, 2.5, 2.5, 0., 6., 0., 0.1, 4.};
const Float_t CounterZStartPosition[NofModuleTypes] =
......@@ -313,14 +314,25 @@ void Create_TOF_Geometry_v20a_mcbm() {
TGeoVolume* tofstand = new TGeoVolumeAssembly(geoVersionStand);
// Mar 2020 run
TGeoTranslation* stand_trans_local =
new TGeoTranslation("", TOF_X_Front_Stand, 0., 0.);
TGeoTranslation* stand_trans =
new TGeoTranslation("", 0., 0., TOF_Z_Front_Stand);
TGeoRotation* stand_rot = new TGeoRotation();
stand_rot->RotateY(-3.0);
new TGeoTranslation("", 0., 0., TOF_Z_Front_Stand);
TGeoCombiTrans* stand_combi_trans =
new TGeoCombiTrans(*stand_trans, *stand_rot);
new TGeoCombiTrans(*stand_trans, *tof_rotation);
// Nov 2019 run
// TGeoTranslation* stand_trans = new TGeoTranslation("", 12., 0., TOF_Z_Front_Stand);
// TGeoTranslation* stand_trans = new TGeoTranslation("", 0., 0., TOF_Z_Front_Stand);
TGeoRotation* stand_rot = new TGeoRotation();
stand_rot->RotateY(0.55);
//stand_rot->RotateY(1.0);
TGeoCombiTrans* stand_combi_trans_local =
new TGeoCombiTrans(*stand_trans_local, *stand_rot);
//tof->AddNode(tofstand, 1, stand_combi_trans);
tof->AddNode(tofstand, 1);
tof->AddNode(tofstand, 1, stand_combi_trans_local);
//tof->AddNode(tofstand, 1);
for (Int_t counterType = 0; counterType < NumberOfDifferentCounterTypes;
counterType++) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment