Skip to content
Snippets Groups Projects
Commit 699f9eeb authored by Jure Bericic's avatar Jure Bericic Committed by GitHub
Browse files

Merge pull request #64 from pooser/pooser-kpp-work

Pooser kpp work
parents 01967e4a ca3e7a53
No related branches found
No related tags found
No related merge requests found
# See $ANALYZER/examples/output_example.def for examples
#
#block T.hms.*
block H.dc.*
block H.tr.*
#block H.hod.*
#block H.cer.*
#block H.cal.*
block H.gtr.*
TH1D hhdc_resid_1 '' H.dc.residual[0] 200 -1.0 1.0
TH1D hhdc_resid_2 '' H.dc.residual[1] 200 -1.0 1.0
TH1D hhdc_resid_3 '' H.dc.residual[2] 200 -1.0 1.0
TH1D hhdc_resid_4 '' H.dc.residual[3] 200 -1.0 1.0
TH1D hhdc_resid_5 '' H.dc.residual[4] 200 -1.0 1.0
TH1D hhdc_resid_6 '' H.dc.residual[5] 200 -1.0 1.0
TH1D hhdc_resid_7 '' H.dc.residual[6] 200 -1.0 1.0
TH1D hhdc_resid_8 '' H.dc.residual[7] 200 -1.0 1.0
TH1D hhdc_resid_9 '' H.dc.residual[8] 200 -1.0 1.0
TH1D hhdc_resid_10 '' H.dc.residual[9] 200 -1.0 1.0
TH1D hhdc_resid_11 '' H.dc.residual[10] 200 -1.0 1.0
TH1D hhdc_resid_12 '' H.dc.residual[11] 200 -1.0 1.0
\ No newline at end of file
Block: RawDecode
Pedestal_event 0
RawDecode_master 1
Block: Decode
Decode_master 1
Block: CoarseTracking
CoarseTracking_master 1
Block: CoarseReconstruct
CourseReconstruct 0
# See $ANALYZER/examples/output_example.def for examples
#
block T.shms.*
block P.ngcer.*
block P.dc.*
block P.tr.*
block P.hod.*
block P.hgcer.*
block P.aero.*
block P.cal.*
#block P.gtr.*
\ No newline at end of file
Block: RawDecode
Pedestal_event 0
RawDecode_master 1
Block: Decode
Decode_master 1
Block: CoarseTracking
CoarseTracking_master 1
Block: CoarseReconstruct
CourseReconstruct 0
This diff is collapsed.
This diff is collapsed.
hmin_hit = 4, 4
hmin_combos = 3, 3
hstub_max_xpdiff = 0.5
hsingle_stub = 1
hxloscin = 1, 1
hxhiscin = 16, 16
hyloscin = 1, 1
hyhiscin = 10, 10
htrack_eff_test_num_scin_planes = 2
hdc_tdc_min_win = -55000,-55000,-55000,-55000,-55000,-55000
-55000,-55000,-55000,-55000,-55000,-55000
hdc_tdc_max_win = 55000,55000,55000,55000,55000,55000
55000,55000,55000,55000,55000,55000
; hms pattern recognition and tracking code parameters
; hmax_pr_hits is the maximum number of decoded hits allowed in a chamber for
; pattern recognition to proceed. This protexts against unusual
; kami kaze events which hang the analyzer to a long time.
;
hmax_pr_hits = 35, 35
; maximum number of possible focal plane tracks, must be <= 20
hntracks_max_fp = 10
; if h_remove_sppt_if_one_y_plane=1 then remove space point if space point
; contains only one y plane.
; Recommend h_remove_sppt_if_one_y_plane=0.
h_remove_sppt_if_one_y_plane=0
; hminhit(i) minimum number of hits in each space point (one for each chamber)
hmin_hit = 5, 5
; hmin_combos(i) minimum number of pairs in each space point ( one per chamber)
; should be 3/3 for 4/6 tracking, and 4/4 for 5/6 tracking (JRA)
hmin_combos = 4, 4
; hspace_point_criterion(i) minimum separation of distinct space points
; recommended value for hspace_point_criterion ( based on meeting
; Feb 2003)
hspace_point_criterion = 1.0, 1.0
; Maximum number of hits allowed in chambers for pattern recognition to proceed (one for each chamber)
hmax_pr_hits = 35, 35
; Maximum number of possible focal plane tracks, must be <= 20
hntracks_max_fp = 10
; Remove space point if space point contains only one y plane (0 recommended)
h_remove_sppt_if_one_y_plane = 0
; Minimum number of hits in each space point (one per chamber)
hmin_hit = 5, 5
; Minimum number of pairs in each space point (one per chamber)
; Should be 3/3 for 4/6 tracking, and 4/4 for 5/6 tracking
hmin_combos = 4, 4
; Minimum separation of distinct space points
hspace_point_criterion = 1.0, 1.0
; Maximum difference between xp returned by stub and expected xp
hstub_max_xpdiff = .05
hstub_max_xpdiff = .05
;
; The following four criteria are applied to the stub fit results at the
; focal plane position to link stubs to tracks
......
void replay_hms(Int_t RunNumber=0, Int_t MaxEvent=0) {
// Get RunNumber and MaxEvent if not provided.
if(RunNumber == 0) {
cout << "Enter a Run Number (-1 to exit): ";
cin >> RunNumber;
if( RunNumber<=0 ) return;
}
if(MaxEvent == 0) {
cout << "\nNumber of Events to analyze: ";
cin >> MaxEvent;
if(MaxEvent == 0) {
cerr << "...Invalid entry\n";
exit;
}
}
// Create file name patterns.
const char* RunFileNamePattern = "raw/hms_all_%05d.dat";
const char* ROOTFileNamePattern = "ROOTfiles/hms_replay_%d.root";
// Add variables to global list.
gHcParms->Define("gen_run_number", "Run Number", RunNumber);
gHcParms->AddString("g_ctp_database_filename", "DBASE/standard.database");
// Load varibles from files to global list.
gHcParms->Load(gHcParms->GetString("g_ctp_database_filename"), RunNumber);
// g_ctp_parm_filename and g_decode_map_filename should now be defined.
gHcParms->Load(gHcParms->GetString("g_ctp_kinematics_filename"), RunNumber);
gHcParms->Load(gHcParms->GetString("g_ctp_parm_filename"));
// Load params for HMS trigger configuration
gHcParms->Load("PARAM/TRIG/thms.param");
// Load custom tracking params
gHcParms->Load("PARAM/HMS/GEN/hgoldtrack.param");
// Load the Hall C style detector map
gHcDetectorMap = new THcDetectorMap();
gHcDetectorMap->Load("MAPS/HMS/DETEC/hms_stack.map");
// Add trigger apparatus
THaApparatus* TRG = new THcTrigApp("T", "TRG");
gHaApps->Add(TRG);
// Add trigger detector to trigger apparatus
THcTrigDet* hms = new THcTrigDet("hms", "HMS Trigger Information");
TRG->AddDetector(hms);
// Set up the equipment to be analyzed.
THaApparatus* HMS = new THcHallCSpectrometer("H", "HMS");
gHaApps->Add(HMS);
// Add drift chambers to HMS apparatus
THcDC* dc = new THcDC("dc", "Drift Chambers");
HMS->AddDetector(dc);
// Add hodoscope to HMS apparatus
THcHodoscope* hod = new THcHodoscope("hod", "Hodoscope");
HMS->AddDetector(hod);
// Add Cherenkov to HMS apparatus
THcCherenkov* cer = new THcCherenkov("cer", "Heavy Gas Cherenkov");
HMS->AddDetector(cer);
// Add calorimeter to HMS apparatus
THcShower* cal = new THcShower("cal", "Calorimeter");
HMS->AddDetector(cal);
// Include golden track information
THaGoldenTrack* gtr = new THaGoldenTrack("H.gtr", "HMS Golden Track", "H");
gHaPhysics->Add(gtr);
// Set up the analyzer - we use the standard one,
// but this could be an experiment-specific one as well.
// The Analyzer controls the reading of the data, executes
// tests/cuts, loops over Acpparatus's and PhysicsModules,
// and executes the output routines.
THcAnalyzer* analyzer = new THcAnalyzer;
// A simple event class to be output to the resulting tree.
// Creating your own descendant of THaEvent is one way of
// defining and controlling the output.
THaEvent* event = new THaEvent;
// Define the run(s) that we want to analyze.
// We just set up one, but this could be many.
char RunFileName[100];
sprintf(RunFileName, RunFileNamePattern, RunNumber);
THaRun* run = new THaRun(RunFileName);
// Eventually need to learn to skip over, or properly analyze
// the pedestal events
run->SetEventRange(1, MaxEvent); // Physics Event number, does not
// include scaler or control events.
run->SetNscan(1);
run->SetDataRequired(0x7);
run->Print();
// Define the analysis parameters
TString ROOTFileName = Form(ROOTFileNamePattern, RunNumber);
analyzer->SetCountMode(2); // 0 = counter is # of physics triggers
// 1 = counter is # of all decode reads
// 2 = counter is event number
analyzer->SetEvent(event);
analyzer->SetCrateMapFileName("MAPS/db_cratemap.dat");
analyzer->SetOutFile(ROOTFileName.Data());
analyzer->SetOdefFile("DEF-files/HMS/GEN/hstackana.def");
analyzer->SetCutFile("DEF-files/HMS/GEN/hstackana_cuts.def"); // optional
// File to record cuts accounting information
//analyzer->SetSummaryFile("summary_example.log"); // optional
// Start the actual analysis.
analyzer->Process(run);
// Create report file from template.
//analyzer->PrintReport( // optional
// "TEMPLATES/dcana.template",
// Form("REPORT_OUTPUT/replay_hms_%05d.report", RunNumber)
//);
}
void replay_shms(Int_t RunNumber=0, Int_t MaxEvent=0) {
// Get RunNumber and MaxEvent if not provided.
if(RunNumber == 0) {
cout << "Enter a Run Number (-1 to exit): ";
cin >> RunNumber;
if( RunNumber<=0 ) return;
}
if(MaxEvent == 0) {
cout << "\nNumber of Events to analyze: ";
cin >> MaxEvent;
if(MaxEvent == 0) {
cerr << "...Invalid entry\n";
exit;
}
}
// Create file name patterns.
const char* RunFileNamePattern = "raw/shms_all_%05d.dat";
const char* ROOTFileNamePattern = "ROOTfiles/shms_replay_%d.root";
// Add variables to global list.
gHcParms->Define("gen_run_number", "Run Number", RunNumber);
gHcParms->AddString("g_ctp_database_filename", "DBASE/standard.database");
// Load varibles from files to global list.
gHcParms->Load(gHcParms->GetString("g_ctp_database_filename"), RunNumber);
// g_ctp_parm_filename and g_decode_map_filename should now be defined.
gHcParms->Load(gHcParms->GetString("g_ctp_kinematics_filename"), RunNumber);
gHcParms->Load(gHcParms->GetString("g_ctp_parm_filename"));
// Load params for SHMS trigger configuration
gHcParms->Load("PARAM/TRIG/tshms.param");
// Load custom tracking params
//gHcParms->Load("PARAM/SHMS/GEN/hgoldtrack.param");
// Load the Hall C style detector map
gHcDetectorMap = new THcDetectorMap();
gHcDetectorMap->Load("MAPS/SHMS/DETEC/shms_stack.map");
// Add trigger apparatus
THaApparatus* TRG = new THcTrigApp("T", "TRG");
gHaApps->Add(TRG);
// Add trigger detector to trigger apparatus
THcTrigDet* shms = new THcTrigDet("shms", "SHMS Trigger Information");
TRG->AddDetector(shms);
// Set up the equipment to be analyzed.
THaApparatus* SHMS = new THcHallCSpectrometer("P", "SHMS");
gHaApps->Add(SHMS);
// Add Noble Gas Cherenkov to SHMS apparatus
THcCherenkov* ngcer = new THcCherenkov("ngcer", "Noble Gas Cherenkov");
SHMS->AddDetector(ngcer);
// Add drift chambers to SHMS apparatus
THcDC* dc = new THcDC("dc", "Drift Chambers");
SHMS->AddDetector(dc);
// Add hodoscope to SHMS apparatus
THcHodoscope* hod = new THcHodoscope("hod", "Hodoscope");
SHMS->AddDetector(hod);
// Add Heavy Gas Cherenkov to SHMS apparatus
THcCherenkov* hgcer = new THcCherenkov("hgcer", "Heavy Gas Cherenkov");
SHMS->AddDetector(hgcer);
// Add Heavy Gas Cherenkov to SHMS apparatus
THcAerogel* aero = new THcAerogel("aero", "Aerogel");
SHMS->AddDetector(aero);
// Add calorimeter to SHMS apparatus
THcShower* cal = new THcShower("cal", "Calorimeter");
SHMS->AddDetector(cal);
// Include golden track information
THaGoldenTrack* gtr = new THaGoldenTrack("P.gtr", "SHMS Golden Track", "P");
gHaPhysics->Add(gtr);
// Set up the analyzer - we use the standard one,
// but this could be an experiment-specific one as well.
// The Analyzer controls the reading of the data, executes
// tests/cuts, loops over Acpparatus's and PhysicsModules,
// and executes the output routines.
THcAnalyzer* analyzer = new THcAnalyzer;
// A simple event class to be output to the resulting tree.
// Creating your own descendant of THaEvent is one way of
// defining and controlling the output.
THaEvent* event = new THaEvent;
// Define the run(s) that we want to analyze.
// We just set up one, but this could be many.
char RunFileName[100];
sprintf(RunFileName, RunFileNamePattern, RunNumber);
THaRun* run = new THaRun(RunFileName);
// Eventually need to learn to skip over, or properly analyze
// the pedestal events
run->SetEventRange(1, MaxEvent); // Physics Event number, does not
// include scaler or control events.
run->SetNscan(1);
run->SetDataRequired(0x7);
run->Print();
// Define the analysis parameters
TString ROOTFileName = Form(ROOTFileNamePattern, RunNumber);
analyzer->SetCountMode(2); // 0 = counter is # of physics triggers
// 1 = counter is # of all decode reads
// 2 = counter is event number
analyzer->SetEvent(event);
analyzer->SetCrateMapFileName("MAPS/db_cratemap.dat");
analyzer->SetOutFile(ROOTFileName.Data());
analyzer->SetOdefFile("DEF-files/SHMS/GEN/pstackana.def");
analyzer->SetCutFile("DEF-files/SHMS/GEN/pstackana_cuts.def"); // optional
// File to record cuts accounting information
//analyzer->SetSummaryFile("summary_example.log"); // optional
// Start the actual analysis.
analyzer->Process(run);
// Create report file from template.
//analyzer->PrintReport( // optional
// "TEMPLATES/dcana.template",
// Form("REPORT_OUTPUT/replay_shms_%05d.report", RunNumber)
//);
}
protorootfile ../ROOTfiles/shms_replay_XXXXX.root
guicolor lightblue
#canvassize 1600 800
canvassize 800 800
newpage 3 3
title Trigger Times
macro Macros/kpp_analysis.C("h_p1X_tdc")
macro Macros/kpp_analysis.C("h_p1Y_tdc")
macro Macros/kpp_analysis.C("h_p2X_tdc")
macro Macros/kpp_analysis.C("h_p2Y_tdc")
macro Macros/kpp_analysis.C("h_p1T_tdc")
macro Macros/kpp_analysis.C("h_p2T_tdc")
macro Macros/kpp_analysis.C("h_pT1_tdc")
macro Macros/kpp_analysis.C("h_pT2_tdc")
macro Macros/kpp_analysis.C("h_pT3_tdc")
newpage 4 3
title DC Reference Times
macro Macros/kpp_analysis.C("h_pDCREF1_tdc")
macro Macros/kpp_analysis.C("h_pDCREF2_tdc")
macro Macros/kpp_analysis.C("h_pDCREF3_tdc")
macro Macros/kpp_analysis.C("h_pDCREF4_tdc")
macro Macros/kpp_analysis.C("h_pDCREF5_tdc")
macro Macros/kpp_analysis.C("h_pDCREF6_tdc")
macro Macros/kpp_analysis.C("h_pDCREF7_tdc")
macro Macros/kpp_analysis.C("h_pDCREF8_tdc")
macro Macros/kpp_analysis.C("h_pDCREF9_tdc")
macro Macros/kpp_analysis.C("h_pDCREF10_tdc")
newpage 4 3
title Hodoscope Plane Reference Times
macro Macros/kpp_analysis.C("h_p1XmpT2_tdc")
macro Macros/kpp_analysis.C("h_p1YmpT2_tdc")
macro Macros/kpp_analysis.C("h_p2XmpT2_tdc")
macro Macros/kpp_analysis.C("h_p2YmpT2_tdc")
macro Macros/kpp_analysis.C("h_p1XmpT3_tdc")
macro Macros/kpp_analysis.C("h_p1YmpT3_tdc")
macro Macros/kpp_analysis.C("h_p2XmpT3_tdc")
macro Macros/kpp_analysis.C("h_p2YmpT3_tdc")
macro Macros/kpp_analysis.C("h_p1TmpT2_tdc")
macro Macros/kpp_analysis.C("h_p1TmpT3_tdc")
macro Macros/kpp_analysis.C("h_p2TmpT2_tdc")
macro Macros/kpp_analysis.C("h_p2TmpT3_tdc")
newpage 2 2
title Focal Plane Times
macro Macros/kpp_analysis.C("h_p1X_fpTime")
macro Macros/kpp_analysis.C("h_p1Y_fpTime")
macro Macros/kpp_analysis.C("h_p2X_fpTime")
macro Macros/kpp_analysis.C("h_p2Y_fpTime")
newpage 2 2 logz
title Negative Hodoscope Corrected TDC Times
macro Macros/kpp_analysis.C("h2_p1X_negTdcCorr")
macro Macros/kpp_analysis.C("h2_p1Y_negTdcCorr")
macro Macros/kpp_analysis.C("h2_p2X_negTdcCorr")
macro Macros/kpp_analysis.C("h2_p2Y_negTdcCorr")
newpage 2 2 logz
title Positive Hodoscope Corrected TDC Times
macro Macros/kpp_analysis.C("h2_p1X_posTdcCorr")
macro Macros/kpp_analysis.C("h2_p1Y_posTdcCorr")
macro Macros/kpp_analysis.C("h2_p2X_posTdcCorr")
macro Macros/kpp_analysis.C("h2_p2Y_posTdcCorr")
newpage 2 2 logz
title Negative Hodoscope Pulse Time - TDC Time
macro Macros/kpp_analysis.C("h2_p1Xneg_pt_tt_diff")
macro Macros/kpp_analysis.C("h2_p1Yneg_pt_tt_diff")
macro Macros/kpp_analysis.C("h2_p2Xneg_pt_tt_diff")
macro Macros/kpp_analysis.C("h2_p2Yneg_pt_tt_diff")
newpage 2 2 logz
title Positive Hodoscope Pulse Time - TDC Time
macro Macros/kpp_analysis.C("h2_p1Xpos_pt_tt_diff")
macro Macros/kpp_analysis.C("h2_p1Ypos_pt_tt_diff")
macro Macros/kpp_analysis.C("h2_p2Xpos_pt_tt_diff")
macro Macros/kpp_analysis.C("h2_p2Ypos_pt_tt_diff")
newpage 2 2 logz
title Hodoscope Corrected TDC Time Differences
macro Macros/kpp_analysis.C("h2_p1X_tdcCorrDiff")
macro Macros/kpp_analysis.C("h2_p1Y_tdcCorrDiff")
macro Macros/kpp_analysis.C("h2_p2X_tdcCorrDiff")
macro Macros/kpp_analysis.C("h2_p2Y_tdcCorrDiff")
newpage 2 2
title Plane Times
macro Macros/kpp_analysis.C("h_p1X_plTime")
macro Macros/kpp_analysis.C("h_p1Y_plTime")
macro Macros/kpp_analysis.C("h_p2X_plTime")
macro Macros/kpp_analysis.C("h_p2Y_plTime")
newpage 3 2 logz
title Aerogel ADC Pulse Times
macro Macros/kpp_analysis.C("h2_paero_negPulseTime_pT1_diff")
macro Macros/kpp_analysis.C("h2_paero_posPulseTime_pT1_diff")
macro Macros/kpp_analysis.C("h2_paero_negPulseTime_pT2_diff")
macro Macros/kpp_analysis.C("h2_paero_posPulseTime_pT2_diff")
macro Macros/kpp_analysis.C("h2_paero_negPulseTime_pT3_diff")
macro Macros/kpp_analysis.C("h2_paero_posPulseTime_pT3_diff")
newpage 3 2 logz
title Pre-Shower ADC Pulse Times
macro Macros/kpp_analysis.C("h2_ppshwr_negPulseTime_pT1_diff")
macro Macros/kpp_analysis.C("h2_ppshwr_posPulseTime_pT1_diff")
macro Macros/kpp_analysis.C("h2_ppshwr_negPulseTime_pT2_diff")
macro Macros/kpp_analysis.C("h2_ppshwr_posPulseTime_pT2_diff")
macro Macros/kpp_analysis.C("h2_ppshwr_negPulseTime_pT3_diff")
macro Macros/kpp_analysis.C("h2_ppshwr_posPulseTime_pT3_diff")
newpage 3 1 logz
title Shower ADC Pulse Times
macro Macros/kpp_analysis.C("h2_pshwr_pulseTime_pT1_diff")
macro Macros/kpp_analysis.C("h2_pshwr_pulseTime_pT2_diff")
macro Macros/kpp_analysis.C("h2_pshwr_pulseTime_pT3_diff")
newpage 3 1 logz
title Heavy Gas ADC Pulse Times
macro Macros/kpp_analysis.C("h2_phgc_pulseTime_pT1_diff")
macro Macros/kpp_analysis.C("h2_phgc_pulseTime_pT2_diff")
macro Macros/kpp_analysis.C("h2_phgc_pulseTime_pT3_diff")
newpage 3 1 logz
title Noble Gas ADC Pulse Times
macro Macros/kpp_analysis.C("h2_pngc_pulseTime_pT1_diff")
macro Macros/kpp_analysis.C("h2_pngc_pulseTime_pT2_diff")
macro Macros/kpp_analysis.C("h2_pngc_pulseTime_pT3_diff")
This diff is collapsed.
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