|
@@ -639,7 +639,7 @@ void setup_sc_residuals(TrackingDataSet& tds){
|
|
const std::function<bool(int)>& pcheck){
|
|
const std::function<bool(int)>& pcheck){
|
|
vector<float> residuals;
|
|
vector<float> residuals;
|
|
vector<float> etas;
|
|
vector<float> etas;
|
|
- for(const SuperCluster& super_cluster : super_clusters){ // loop over all supser-clusters
|
|
|
|
|
|
+ for(const SuperCluster& super_cluster : super_clusters){ // loop over all super-clusters
|
|
float dRz, dPhi;
|
|
float dRz, dPhi;
|
|
int ladder_blade;
|
|
int ladder_blade;
|
|
unsigned int nSeeds = super_cluster.charge.size();
|
|
unsigned int nSeeds = super_cluster.charge.size();
|
|
@@ -671,11 +671,9 @@ void setup_sc_residuals(TrackingDataSet& tds){
|
|
|
|
|
|
std::function<bool(int)> even = [](const int& t){ return !(t%2); };
|
|
std::function<bool(int)> even = [](const int& t){ return !(t%2); };
|
|
std::function<bool(int)> odd = [](const int& t){ return (t%2); };
|
|
std::function<bool(int)> odd = [](const int& t){ return (t%2); };
|
|
- std::function<bool(int)> both = [](const int&){ return true; };
|
|
|
|
|
|
|
|
sc_value_hists_for_lb(tds, even, "even");
|
|
sc_value_hists_for_lb(tds, even, "even");
|
|
sc_value_hists_for_lb(tds, odd, "odd");
|
|
sc_value_hists_for_lb(tds, odd, "odd");
|
|
- sc_value_hists_for_lb(tds, both, "either");
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -752,6 +750,7 @@ void setup_residual_cross_corrolations(TrackingDataSet& tds){
|
|
|
|
|
|
auto v_dz1 = constant("dz1", Res::dz1);
|
|
auto v_dz1 = constant("dz1", Res::dz1);
|
|
auto v_dz2 = constant("dz2", Res::dz2);
|
|
auto v_dz2 = constant("dz2", Res::dz2);
|
|
|
|
+ auto v_dPhi1 = constant("dPhi1", Res::dPhi1);
|
|
auto v_dPhi2 = constant("dPhi2", Res::dPhi2);
|
|
auto v_dPhi2 = constant("dPhi2", Res::dPhi2);
|
|
|
|
|
|
auto sc_dphi2_v_dz1_L1_L2 = fv::tup_apply(sc_cross_correlations,
|
|
auto sc_dphi2_v_dz1_L1_L2 = fv::tup_apply(sc_cross_correlations,
|
|
@@ -760,17 +759,83 @@ void setup_residual_cross_corrolations(TrackingDataSet& tds){
|
|
auto sc_dz2_v_dz1_L1_L2 = fv::tup_apply(sc_cross_correlations,
|
|
auto sc_dz2_v_dz1_L1_L2 = fv::tup_apply(sc_cross_correlations,
|
|
fv::tuple(super_clusters, BPIX_L1, BPIX_L2, v_dz2, v_dz1), "sc_dz2_v_dz1_L1_L2");
|
|
fv::tuple(super_clusters, BPIX_L1, BPIX_L2, v_dz2, v_dz1), "sc_dz2_v_dz1_L1_L2");
|
|
|
|
|
|
- TH2Params hist_params;
|
|
|
|
- hist_params = {"$\\Delta \\phi_2$(rad)", 100, -.01, .01,
|
|
|
|
- "$\\Delta z_1$(cm)", 100, -.01, .01};
|
|
|
|
|
|
+ auto sc_dphi2_v_dphi1_L1_L2 = fv::tup_apply(sc_cross_correlations,
|
|
|
|
+ fv::tuple(super_clusters, BPIX_L1, BPIX_L2, v_dPhi2, v_dPhi1), "sc_dphi1_v_dphi1_L1_L2");
|
|
|
|
+
|
|
|
|
+ auto sc_dz2_v_dphi1_L1_L2 = fv::tup_apply(sc_cross_correlations,
|
|
|
|
+ fv::tuple(super_clusters, BPIX_L1, BPIX_L2, v_dz2, v_dPhi1), "sc_dz2_v_dphi1_L1_L2");
|
|
|
|
+
|
|
|
|
+ TH2Params hist_params = TH2Params::lookup("sc_dphi2_v_dz1_L1_L2");
|
|
tds.register_container<ContainerTH2Many<float>>("sc_dphi2_v_dz1_L1_L2",
|
|
tds.register_container<ContainerTH2Many<float>>("sc_dphi2_v_dz1_L1_L2",
|
|
sc_dphi2_v_dz1_L1_L2,
|
|
sc_dphi2_v_dz1_L1_L2,
|
|
"sc_dphi2_v_dz1_L1_L2", hist_params);
|
|
"sc_dphi2_v_dz1_L1_L2", hist_params);
|
|
- hist_params = {"$\\Delta z_2$(cm)", 100, -.01, .01,
|
|
|
|
- "$\\Delta z_1$(cm)", 100, -.01, .01};
|
|
|
|
|
|
+ hist_params = TH2Params::lookup("sc_dz2_v_dz1_L1_L2");
|
|
tds.register_container<ContainerTH2Many<float>>("sc_dz2_v_dz1_L1_L2",
|
|
tds.register_container<ContainerTH2Many<float>>("sc_dz2_v_dz1_L1_L2",
|
|
sc_dz2_v_dz1_L1_L2,
|
|
sc_dz2_v_dz1_L1_L2,
|
|
"sc_dz2_v_dz1_L1_L2", hist_params);
|
|
"sc_dz2_v_dz1_L1_L2", hist_params);
|
|
|
|
+ hist_params = TH2Params::lookup("sc_dphi2_v_dphi1_L1_L2");
|
|
|
|
+ tds.register_container<ContainerTH2Many<float>>("sc_dphi2_v_dphi1_L1_L2",
|
|
|
|
+ sc_dphi2_v_dphi1_L1_L2,
|
|
|
|
+ "sc_dphi2_v_dphi1_L1_L2", hist_params);
|
|
|
|
+ hist_params = TH2Params::lookup("sc_dz2_v_dphi1_L1_L2");
|
|
|
|
+ tds.register_container<ContainerTH2Many<float>>("sc_dz2_v_dphi1_L1_L2",
|
|
|
|
+ sc_dz2_v_dphi1_L1_L2,
|
|
|
|
+ "sc_dz2_v_dphi1_L1_L2", hist_params);
|
|
|
|
+
|
|
|
|
+ hist_params = TH2Params::lookup("sc_dz2_v_dz1_L1_L2_zoom");
|
|
|
|
+ tds.register_container<ContainerTH2Many<float>>("sc_dz2_v_dz1_L1_L2_zoom",
|
|
|
|
+ sc_dz2_v_dz1_L1_L2,
|
|
|
|
+ "sc_dz2_v_dz1_L1_L2_zoom", hist_params);
|
|
|
|
+ hist_params = TH2Params::lookup("sc_dz2_v_dphi1_L1_L2_zoom");
|
|
|
|
+ tds.register_container<ContainerTH2Many<float>>("sc_dz2_v_dphi1_L1_L2_zoom",
|
|
|
|
+ sc_dz2_v_dphi1_L1_L2,
|
|
|
|
+ "sc_dz2_v_dphi1_L1_L2_zoom", hist_params);
|
|
|
|
+ hist_params = TH2Params::lookup("sc_dphi2_v_dphi1_L1_L2_zoom");
|
|
|
|
+ tds.register_container<ContainerTH2Many<float>>("sc_dphi2_v_dphi1_L1_L2_zoom",
|
|
|
|
+ sc_dphi2_v_dphi1_L1_L2,
|
|
|
|
+ "sc_dphi2_v_dphi1_L1_L2_zoom", hist_params);
|
|
|
|
+
|
|
|
|
+ auto sc_dphi2_v_dz1_L1_L3 = fv::tup_apply(sc_cross_correlations,
|
|
|
|
+ fv::tuple(super_clusters, BPIX_L1, BPIX_L3, v_dPhi2, v_dz1), "sc_dphi1_v_dz1_L1_L3");
|
|
|
|
+
|
|
|
|
+ auto sc_dz2_v_dz1_L1_L3 = fv::tup_apply(sc_cross_correlations,
|
|
|
|
+ fv::tuple(super_clusters, BPIX_L1, BPIX_L3, v_dz2, v_dz1), "sc_dz2_v_dz1_L1_L3");
|
|
|
|
+
|
|
|
|
+ auto sc_dphi2_v_dphi1_L1_L3 = fv::tup_apply(sc_cross_correlations,
|
|
|
|
+ fv::tuple(super_clusters, BPIX_L1, BPIX_L3, v_dPhi2, v_dPhi1), "sc_dphi1_v_dphi1_L1_L3");
|
|
|
|
+
|
|
|
|
+ auto sc_dz2_v_dphi1_L1_L3 = fv::tup_apply(sc_cross_correlations,
|
|
|
|
+ fv::tuple(super_clusters, BPIX_L1, BPIX_L3, v_dz2, v_dPhi1), "sc_dz2_v_dphi1_L1_L3");
|
|
|
|
+
|
|
|
|
+ hist_params = TH2Params::lookup("sc_dphi2_v_dz1_L1_L2");
|
|
|
|
+ tds.register_container<ContainerTH2Many<float>>("sc_dphi2_v_dz1_L1_L3",
|
|
|
|
+ sc_dphi2_v_dz1_L1_L3,
|
|
|
|
+ "sc_dphi2_v_dz1_L1_L3", hist_params);
|
|
|
|
+ hist_params = TH2Params::lookup("sc_dz2_v_dz1_L1_L2");
|
|
|
|
+ tds.register_container<ContainerTH2Many<float>>("sc_dz2_v_dz1_L1_L3",
|
|
|
|
+ sc_dz2_v_dz1_L1_L3,
|
|
|
|
+ "sc_dz2_v_dz1_L1_L3", hist_params);
|
|
|
|
+ hist_params = TH2Params::lookup("sc_dphi2_v_dphi1_L1_L2");
|
|
|
|
+ tds.register_container<ContainerTH2Many<float>>("sc_dphi2_v_dphi1_L1_L3",
|
|
|
|
+ sc_dphi2_v_dphi1_L1_L3,
|
|
|
|
+ "sc_dphi2_v_dphi1_L1_L3", hist_params);
|
|
|
|
+ hist_params = TH2Params::lookup("sc_dz2_v_dphi1_L1_L2");
|
|
|
|
+ tds.register_container<ContainerTH2Many<float>>("sc_dz2_v_dphi1_L1_L3",
|
|
|
|
+ sc_dz2_v_dphi1_L1_L3,
|
|
|
|
+ "sc_dz2_v_dphi1_L1_L3", hist_params);
|
|
|
|
+
|
|
|
|
+ hist_params = TH2Params::lookup("sc_dz2_v_dz1_L1_L2_zoom");
|
|
|
|
+ tds.register_container<ContainerTH2Many<float>>("sc_dz2_v_dz1_L1_L3_zoom",
|
|
|
|
+ sc_dz2_v_dz1_L1_L3,
|
|
|
|
+ "sc_dz2_v_dz1_L1_L3_zoom", hist_params);
|
|
|
|
+ hist_params = TH2Params::lookup("sc_dz2_v_dphi1_L1_L2_zoom");
|
|
|
|
+ tds.register_container<ContainerTH2Many<float>>("sc_dz2_v_dphi1_L1_L3_zoom",
|
|
|
|
+ sc_dz2_v_dphi1_L1_L3,
|
|
|
|
+ "sc_dz2_v_dphi1_L1_L3_zoom", hist_params);
|
|
|
|
+ hist_params = TH2Params::lookup("sc_dphi2_v_dphi1_L1_L2_zoom");
|
|
|
|
+ tds.register_container<ContainerTH2Many<float>>("sc_dphi2_v_dphi1_L1_L3_zoom",
|
|
|
|
+ sc_dphi2_v_dphi1_L1_L3,
|
|
|
|
+ "sc_dphi2_v_dphi1_L1_L3_zoom", hist_params);
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -786,13 +851,13 @@ void run_analysis(const vector<fv::util::DataFileDescriptor>& dfds, const string
|
|
|
|
|
|
TrackingDataSet tds(output_filename, dfds, "trackingNtuple/tree");
|
|
TrackingDataSet tds(output_filename, dfds, "trackingNtuple/tree");
|
|
/* tds.set_max_events(10); */
|
|
/* tds.set_max_events(10); */
|
|
- /* register_objects(tds); */
|
|
|
|
- /* setup_hit_pair_functions(); */
|
|
|
|
|
|
+ register_objects(tds);
|
|
|
|
+ setup_hit_pair_functions();
|
|
|
|
|
|
- /* setup_first_hit_pairs(tds); */
|
|
|
|
- /* setup_skipped_layer_hit_pairs(tds); */
|
|
|
|
- /* setup_sc_residuals(tds); */
|
|
|
|
- /* setup_residual_cross_corrolations(tds); */
|
|
|
|
|
|
+ setup_first_hit_pairs(tds);
|
|
|
|
+ setup_skipped_layer_hit_pairs(tds);
|
|
|
|
+ setup_sc_residuals(tds);
|
|
|
|
+ setup_residual_cross_corrolations(tds);
|
|
|
|
|
|
|
|
|
|
tds.process(silent);
|
|
tds.process(silent);
|
|
@@ -803,6 +868,9 @@ int main(int argc, char * argv[]){
|
|
fv::util::ArgParser args(argc, argv);
|
|
fv::util::ArgParser args(argc, argv);
|
|
bool silent = args.cmdOptionExists("-s");
|
|
bool silent = args.cmdOptionExists("-s");
|
|
string output_filename = args.cmdOptionExists("-o") ? args.getCmdOption("-o") : "output.root";
|
|
string output_filename = args.cmdOptionExists("-o") ? args.getCmdOption("-o") : "output.root";
|
|
|
|
+ if(args.cmdOptionExists("-c")){
|
|
|
|
+ fv::util::init_config(args.getCmdOption("-c"));
|
|
|
|
+ }
|
|
if(args.cmdOptionExists("-F")){
|
|
if(args.cmdOptionExists("-F")){
|
|
auto file_list = fv::util::read_input_list(args.getCmdOption("-F"));
|
|
auto file_list = fv::util::read_input_list(args.getCmdOption("-F"));
|
|
run_analysis(file_list, output_filename, silent);
|
|
run_analysis(file_list, output_filename, silent);
|
|
@@ -818,3 +886,10 @@ int main(int argc, char * argv[]){
|
|
}
|
|
}
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+/* int main(int argc, char * argv[]){ */
|
|
|
|
+/* using namespace fv::util; */
|
|
|
|
+/* init_config(argv[1]); */
|
|
|
|
+/* int max_events = the_config.get("max-events").as<int>(); */
|
|
|
|
+/* cout << max_events << endl; */
|
|
|
|
+/* } */
|