|
@@ -13,7 +13,7 @@
|
|
#include <boost/format.hpp>
|
|
#include <boost/format.hpp>
|
|
|
|
|
|
#include "analysis/TrackingNtuple.h"
|
|
#include "analysis/TrackingNtuple.h"
|
|
-#include "analysis/obj_types.cpp"
|
|
|
|
|
|
+#include "analysis/TrackingNtupleObjs.hpp"
|
|
#include "analysis/common.hpp"
|
|
#include "analysis/common.hpp"
|
|
|
|
|
|
using namespace std;
|
|
using namespace std;
|
|
@@ -34,22 +34,22 @@ enum PixSubDet{
|
|
|
|
|
|
struct PixDetElem{
|
|
struct PixDetElem{
|
|
PixSubDet subdet;
|
|
PixSubDet subdet;
|
|
- unsigned char lay;
|
|
|
|
|
|
+ unsigned char layer;
|
|
|
|
|
|
- PixDetElem():subdet(PixSubDet::Void), lay(0) {}
|
|
|
|
|
|
+ PixDetElem():subdet(PixSubDet::Void), layer(0) {}
|
|
|
|
|
|
- PixDetElem(const PixSubDet& subdet, const unsigned char& lay){
|
|
|
|
|
|
+ PixDetElem(const PixSubDet& subdet, const unsigned char& layer){
|
|
this->subdet = subdet;
|
|
this->subdet = subdet;
|
|
- this->lay = lay;
|
|
|
|
|
|
+ this->layer = layer;
|
|
}
|
|
}
|
|
|
|
|
|
template<typename T>
|
|
template<typename T>
|
|
bool contains(const T& obj) const{
|
|
bool contains(const T& obj) const{
|
|
- return obj.det == subdet && obj.lay == lay;
|
|
|
|
|
|
+ return obj.subdet() == subdet && obj.layer() == layer;
|
|
}
|
|
}
|
|
|
|
|
|
- bool contains(const PixSubDet& subdet, const unsigned char& lay) const{
|
|
|
|
- return subdet == this->subdet && lay == this->lay;
|
|
|
|
|
|
+ bool contains(const PixSubDet& subdet, const unsigned char& layer) const{
|
|
|
|
+ return subdet == this->subdet && layer == this->layer;
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
|
|
@@ -67,12 +67,12 @@ vector<string> seedTypes =
|
|
"pixelPairElectronSeeds",
|
|
"pixelPairElectronSeeds",
|
|
"stripPairElectronSeeds"};
|
|
"stripPairElectronSeeds"};
|
|
|
|
|
|
-Value<vector<SuperCluster>>* super_clusters;
|
|
|
|
-Value<vector<Seed>>* seeds;
|
|
|
|
-Value<vector<PixRecHit>>* pixrec_hits;
|
|
|
|
-Value<vector<Track>>* tracks;
|
|
|
|
-Value<vector<SimHit>>* sim_hits;
|
|
|
|
-Value<vector<SimTrack>>* sim_tracks;
|
|
|
|
|
|
+SuperClusterCollection super_clusters;
|
|
|
|
+SeedCollection seeds;
|
|
|
|
+PixRecHitCollection pixrec_hits;
|
|
|
|
+TrackCollection tracks;
|
|
|
|
+SimHitCollection sim_hits;
|
|
|
|
+SimTrackCollection sim_tracks;
|
|
|
|
|
|
void setup_hit_pair_functions(){
|
|
void setup_hit_pair_functions(){
|
|
|
|
|
|
@@ -83,7 +83,7 @@ void setup_hit_pair_functions(){
|
|
for(auto hit_pair : hit_pairs){
|
|
for(auto hit_pair : hit_pairs){
|
|
auto& pixrec_hit = std::get<PixRecHit>(hit_pair);
|
|
auto& pixrec_hit = std::get<PixRecHit>(hit_pair);
|
|
auto& sim_hit = std::get<SimHit>(hit_pair);
|
|
auto& sim_hit = std::get<SimHit>(hit_pair);
|
|
- dphis.push_back(atan2(sim_hit.x, sim_hit.y) - atan2(pixrec_hit.x, pixrec_hit.y));
|
|
|
|
|
|
+ dphis.push_back(atan2(sim_hit.x(), sim_hit.y()) - atan2(pixrec_hit.x(), pixrec_hit.y()));
|
|
etas.push_back(pseudorapidity(pixrec_hit));
|
|
etas.push_back(pseudorapidity(pixrec_hit));
|
|
}
|
|
}
|
|
return std::make_pair(etas, dphis);
|
|
return std::make_pair(etas, dphis);
|
|
@@ -109,7 +109,7 @@ void setup_hit_pair_functions(){
|
|
for(auto hit_pair : hit_pairs){
|
|
for(auto hit_pair : hit_pairs){
|
|
auto& pixrec_hit = std::get<PixRecHit>(hit_pair);
|
|
auto& pixrec_hit = std::get<PixRecHit>(hit_pair);
|
|
auto& sim_hit = std::get<SimHit>(hit_pair);
|
|
auto& sim_hit = std::get<SimHit>(hit_pair);
|
|
- dzs.push_back(sim_hit.z - pixrec_hit.z);
|
|
|
|
|
|
+ dzs.push_back(sim_hit.z() - pixrec_hit.z());
|
|
etas.push_back(pseudorapidity(pixrec_hit));
|
|
etas.push_back(pseudorapidity(pixrec_hit));
|
|
}
|
|
}
|
|
return std::make_pair(etas, dzs);
|
|
return std::make_pair(etas, dzs);
|
|
@@ -130,15 +130,12 @@ void setup_hit_pair_functions(){
|
|
}
|
|
}
|
|
|
|
|
|
void register_objects(TrackingDataSet& tds){
|
|
void register_objects(TrackingDataSet& tds){
|
|
- super_clusters = register_super_clusters(tds);
|
|
|
|
- seeds = register_seeds(tds);
|
|
|
|
-
|
|
|
|
- pixrec_hits = register_pixrec_hits(tds);
|
|
|
|
- tracks = register_tracks(tds);
|
|
|
|
-
|
|
|
|
- sim_hits = register_sim_hits(tds);
|
|
|
|
- sim_tracks = register_sim_tracks(tds);
|
|
|
|
-
|
|
|
|
|
|
+ super_clusters.init(tds);
|
|
|
|
+ seeds.init(tds);
|
|
|
|
+ pixrec_hits.init(tds);
|
|
|
|
+ tracks.init(tds);
|
|
|
|
+ sim_hits.init(tds);
|
|
|
|
+ sim_tracks.init(tds);
|
|
}
|
|
}
|
|
|
|
|
|
void setup_skipped_layer_hit_pairs(TrackingDataSet& tds){
|
|
void setup_skipped_layer_hit_pairs(TrackingDataSet& tds){
|
|
@@ -146,53 +143,43 @@ void setup_skipped_layer_hit_pairs(TrackingDataSet& tds){
|
|
/* Finds SimHit/RecHit pairs
|
|
/* Finds SimHit/RecHit pairs
|
|
*/
|
|
*/
|
|
auto find_matched_nth_hit_in_layer_with_skip =
|
|
auto find_matched_nth_hit_in_layer_with_skip =
|
|
- func<vector<HitPair>(vector<Seed>,
|
|
|
|
- vector<PixRecHit>,
|
|
|
|
- vector<SimHit>,
|
|
|
|
- vector<Track>,
|
|
|
|
- vector<SimTrack>,
|
|
|
|
- PixDetElem, int, bool)>("find_matched_nth_hit_in_layer_with_skip",
|
|
|
|
- FUNC(([](const vector<Seed>& seeds,
|
|
|
|
- const vector<PixRecHit>& pixrec_hits,
|
|
|
|
- const vector<SimHit>& sim_hits,
|
|
|
|
- const vector<Track>& tracks,
|
|
|
|
- const vector<SimTrack>& sim_tracks,
|
|
|
|
- const PixDetElem&& pixdet,
|
|
|
|
|
|
+ func<vector<HitPair>(PixDetElem, int, bool)>("find_matched_nth_hit_in_layer_with_skip",
|
|
|
|
+ FUNC(([](const PixDetElem&& pixdet,
|
|
const unsigned int&& skip,
|
|
const unsigned int&& skip,
|
|
const bool&& first){
|
|
const bool&& first){
|
|
vector<HitPair> matched_hits;
|
|
vector<HitPair> matched_hits;
|
|
- for(const Track &trk : tracks){ // loop over all tracks
|
|
|
|
- const Seed &seed = seeds[trk.seedIdx];
|
|
|
|
|
|
+ for(auto trk : tracks){ // loop over all tracks
|
|
|
|
+ auto seed = seeds[trk.seedIdx()];
|
|
|
|
|
|
// Require seed's source algorithm is one of those in seedTypes
|
|
// Require seed's source algorithm is one of those in seedTypes
|
|
- if(seed.algoOriginal < 0 || seed.algoOriginal >= seedTypes.size()) continue;
|
|
|
|
|
|
+ if(seed.algoOriginal() < 0 || seed.algoOriginal() >= seedTypes.size()) continue;
|
|
// Require seed w/ at least 2 hits
|
|
// Require seed w/ at least 2 hits
|
|
- if(seed.hitIdx.size() < 2) continue;
|
|
|
|
|
|
+ if(seed.hitIdx().size() < 2) continue;
|
|
// take only pixel hits for now
|
|
// take only pixel hits for now
|
|
- if(seed.hitType[0] != HIT_TYPE_PIXEL || seed.hitType[1] != HIT_TYPE_PIXEL) continue;
|
|
|
|
|
|
+ if(seed.hitType()[0] != HIT_TYPE_PIXEL || seed.hitType()[1] != HIT_TYPE_PIXEL) continue;
|
|
|
|
|
|
- const PixRecHit &rec_hit1 = pixrec_hits[seed.hitIdx[0]];
|
|
|
|
- const PixRecHit &rec_hit2 = pixrec_hits[seed.hitIdx[1]];
|
|
|
|
|
|
+ auto rec_hit1 = pixrec_hits[seed.hitIdx()[0]];
|
|
|
|
+ auto rec_hit2 = pixrec_hits[seed.hitIdx()[1]];
|
|
if(first){ // Looking at first hit in the pair
|
|
if(first){ // Looking at first hit in the pair
|
|
- if(pixdet.contains(rec_hit1) && pixdet.contains((PixSubDet)rec_hit2.det, rec_hit2.lay-1-skip)){
|
|
|
|
|
|
+ if(pixdet.contains(rec_hit1) && pixdet.contains((PixSubDet)rec_hit2.subdet(), rec_hit2.layer()-1-skip)){
|
|
// We have the RecHit we want to work with, now find a properly* matched SimHit
|
|
// We have the RecHit we want to work with, now find a properly* matched SimHit
|
|
- if(rec_hit1.simHitIdx.size() == 0) continue; // if rechit is matched to no simhits, give up.
|
|
|
|
- if(trk.simTrkIdx.size() == 0) continue; // if track is matched to no simtracks, give up.
|
|
|
|
- const int &simTrkIdx = trk.simTrkIdx[0]; // get first matched track
|
|
|
|
- for(const int& simHitIdx : sim_tracks[simTrkIdx].simHitIdx){ // loop over SimHits from SimTrack
|
|
|
|
- if(simHitIdx == rec_hit1.simHitIdx[0]) // take first matched simhit (should be the closest one)
|
|
|
|
- matched_hits.push_back({rec_hit1, sim_hits[rec_hit1.simHitIdx[0]]});
|
|
|
|
|
|
+ if(rec_hit1.simHitIdx().size() == 0) continue; // if rechit is matched to no simhits, give up.
|
|
|
|
+ if(trk.simTrkIdx().size() == 0) continue; // if track is matched to no simtracks, give up.
|
|
|
|
+ const int &simTrkIdx = trk.simTrkIdx()[0]; // get first matched track
|
|
|
|
+ for(const int& simHitIdx : sim_tracks[simTrkIdx].simHitIdx()){ // loop over SimHits from SimTrack
|
|
|
|
+ if(simHitIdx == rec_hit1.simHitIdx()[0]) // take first matched simhit (should be the closest one)
|
|
|
|
+ matched_hits.push_back({rec_hit1, sim_hits[rec_hit1.simHitIdx()[0]]});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}else{ // Looking at second hit in the pair
|
|
}else{ // Looking at second hit in the pair
|
|
- if(pixdet.contains(rec_hit2) && pixdet.contains((PixSubDet)rec_hit1.det, rec_hit2.lay+1+skip)){
|
|
|
|
|
|
+ if(pixdet.contains(rec_hit2) && pixdet.contains((PixSubDet)rec_hit1.subdet(), rec_hit2.layer()+1+skip)){
|
|
// We have the RecHit we want to work with, now find a properly* matched SimHit
|
|
// We have the RecHit we want to work with, now find a properly* matched SimHit
|
|
- if(rec_hit2.simHitIdx.size() == 0) continue; // if rechit is matched to no simhits, give up.
|
|
|
|
- if(trk.simTrkIdx.size() == 0) continue; // if track is matched to no simtracks, give up.
|
|
|
|
- const int &simTrkIdx = trk.simTrkIdx[0]; // get first matched track
|
|
|
|
- for(const int& simHitIdx : sim_tracks[simTrkIdx].simHitIdx){ // loop over SimHits from SimTrack
|
|
|
|
- if(simHitIdx == rec_hit1.simHitIdx[0]) // take first matched simhit (should be the closest one)
|
|
|
|
- matched_hits.push_back({rec_hit2, sim_hits[rec_hit2.simHitIdx[0]]});
|
|
|
|
|
|
+ if(rec_hit2.simHitIdx().size() == 0) continue; // if rechit is matched to no simhits, give up.
|
|
|
|
+ if(trk.simTrkIdx().size() == 0) continue; // if track is matched to no simtracks, give up.
|
|
|
|
+ const int &simTrkIdx = trk.simTrkIdx()[0]; // get first matched track
|
|
|
|
+ for(const int& simHitIdx : sim_tracks[simTrkIdx].simHitIdx()){ // loop over SimHits from SimTrack
|
|
|
|
+ if(simHitIdx == rec_hit1.simHitIdx()[0]) // take first matched simhit (should be the closest one)
|
|
|
|
+ matched_hits.push_back({rec_hit2, sim_hits[rec_hit2.simHitIdx()[0]]});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -214,27 +201,27 @@ void setup_skipped_layer_hit_pairs(TrackingDataSet& tds){
|
|
|
|
|
|
// First hit on 1st/2nd bpix layers and second hit in 2nd/3rd
|
|
// First hit on 1st/2nd bpix layers and second hit in 2nd/3rd
|
|
auto first_hits_in_B1_skip_zero = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
|
|
auto first_hits_in_B1_skip_zero = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
|
|
- fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L1, skip_zero, first), "first_hits_in_B1_skip_zero");
|
|
|
|
|
|
+ fv::tuple(BPIX_L1, skip_zero, first), "first_hits_in_B1_skip_zero");
|
|
auto first_hits_in_B2_skip_zero = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
|
|
auto first_hits_in_B2_skip_zero = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
|
|
- fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L2, skip_zero, first), "first_hits_in_B2_skip_zero");
|
|
|
|
|
|
+ fv::tuple(BPIX_L2, skip_zero, first), "first_hits_in_B2_skip_zero");
|
|
|
|
|
|
|
|
|
|
// First hit on 1st/2nd fpix layers and second hit in 2nd/3rd
|
|
// First hit on 1st/2nd fpix layers and second hit in 2nd/3rd
|
|
auto first_hits_in_F1_skip_zero = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
|
|
auto first_hits_in_F1_skip_zero = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
|
|
- fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, FPIX_L1, skip_zero, first), "first_hits_in_F1_skip_zero");
|
|
|
|
|
|
+ fv::tuple(FPIX_L1, skip_zero, first), "first_hits_in_F1_skip_zero");
|
|
auto first_hits_in_F2_skip_zero = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
|
|
auto first_hits_in_F2_skip_zero = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
|
|
- fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, FPIX_L2, skip_zero, first), "first_hits_in_F2_skip_zero");
|
|
|
|
|
|
+ fv::tuple(FPIX_L2, skip_zero, first), "first_hits_in_F2_skip_zero");
|
|
|
|
|
|
// First hit on 1st/2nd fpix layers and second hit in 3rd/4th
|
|
// First hit on 1st/2nd fpix layers and second hit in 3rd/4th
|
|
auto first_hits_in_B1_skip_one = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
|
|
auto first_hits_in_B1_skip_one = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
|
|
- fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L1, skip_one, first), "first_hits_in_B1_skip_one");
|
|
|
|
|
|
+ fv::tuple(BPIX_L1, skip_one, first), "first_hits_in_B1_skip_one");
|
|
auto first_hits_in_B2_skip_one = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
|
|
auto first_hits_in_B2_skip_one = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
|
|
- fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L2, skip_one, first), "first_hits_in_B2_skip_one");
|
|
|
|
|
|
+ fv::tuple(BPIX_L2, skip_one, first), "first_hits_in_B2_skip_one");
|
|
|
|
|
|
|
|
|
|
// First hit on 1st fpix layer and second hit in 3rd layer
|
|
// First hit on 1st fpix layer and second hit in 3rd layer
|
|
auto first_hits_in_F1_skip_one = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
|
|
auto first_hits_in_F1_skip_one = fv::tup_apply(find_matched_nth_hit_in_layer_with_skip,
|
|
- fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, FPIX_L1, skip_one, first), "first_hits_in_F1_skip_one");
|
|
|
|
|
|
+ fv::tuple(FPIX_L1, skip_one, first), "first_hits_in_F1_skip_one");
|
|
|
|
|
|
|
|
|
|
TH2Params params_dz = {"$\\eta$", 100, -4, 4,
|
|
TH2Params params_dz = {"$\\eta$", 100, -4, 4,
|
|
@@ -270,40 +257,31 @@ void setup_skipped_layer_hit_pairs(TrackingDataSet& tds){
|
|
void setup_first_hit_pairs(TrackingDataSet& tds){
|
|
void setup_first_hit_pairs(TrackingDataSet& tds){
|
|
|
|
|
|
auto find_matched_nth_hit_in_layer =
|
|
auto find_matched_nth_hit_in_layer =
|
|
- func<vector<HitPair>(vector<Seed>,
|
|
|
|
- vector<PixRecHit>,
|
|
|
|
- vector<SimHit>,
|
|
|
|
- vector<Track>,
|
|
|
|
- vector<SimTrack>,
|
|
|
|
- PixDetElem, int)>("find_matched_nth_hit_in_layer",
|
|
|
|
- FUNC(([](const vector<Seed>& seeds,
|
|
|
|
- const vector<PixRecHit>& pixrec_hits,
|
|
|
|
- const vector<SimHit>& sim_hits,
|
|
|
|
- const vector<Track>& tracks,
|
|
|
|
- const vector<SimTrack>& sim_tracks,
|
|
|
|
- const PixDetElem&& pixdet,
|
|
|
|
|
|
+ func<vector<HitPair>(PixDetElem, int)>("find_matched_nth_hit_in_layer",
|
|
|
|
+ FUNC(([](const PixDetElem&& pixdet,
|
|
const unsigned int&& hit_number){
|
|
const unsigned int&& hit_number){
|
|
vector<HitPair> matched_hits;
|
|
vector<HitPair> matched_hits;
|
|
- for(const Track &trk : tracks){ // loop over all tracks
|
|
|
|
- const Seed &seed = seeds[trk.seedIdx];
|
|
|
|
- if(seed.hitIdx.size() <= hit_number) continue; // looking for hit_number'th hit
|
|
|
|
- if(seed.algoOriginal < 0 || seed.algoOriginal >= seedTypes.size()) continue;
|
|
|
|
- if(seed.hitType[hit_number] != HIT_TYPE_PIXEL) continue; // take only pixel hits for now
|
|
|
|
- const PixRecHit &rec_hit = pixrec_hits[seed.hitIdx[hit_number]];
|
|
|
|
|
|
+ for(auto track : tracks){ // loop over all tracks
|
|
|
|
+ auto seed = seeds[track.seedIdx()];
|
|
|
|
+ if(seed.hitIdx().size() <= hit_number) continue; // looking for hit_number'th hit
|
|
|
|
+ if(seed.algoOriginal() < 0 || seed.algoOriginal() >= seedTypes.size()) continue;
|
|
|
|
+ if(seed.hitType()[hit_number] != HIT_TYPE_PIXEL) continue; // take only pixel hits for now
|
|
|
|
+ auto rec_hit = pixrec_hits[seed.hitIdx()[hit_number]];
|
|
if(pixdet.contains(rec_hit)){
|
|
if(pixdet.contains(rec_hit)){
|
|
// We have the RecHit we want to work with, now find a properly* matched SimHit
|
|
// We have the RecHit we want to work with, now find a properly* matched SimHit
|
|
- if(rec_hit.simHitIdx.size() == 0) continue; // if rechit is matched to no simhits, give up.
|
|
|
|
- if(trk.simTrkIdx.size() == 0) continue; // if rechit is matched to no simhits, give up.
|
|
|
|
- const int &simTrkIdx = trk.simTrkIdx[0]; // get first matched track
|
|
|
|
- for(const int& simHitIdx : sim_tracks[simTrkIdx].simHitIdx){ // loop over SimHits from SimTrack
|
|
|
|
- if(simHitIdx == rec_hit.simHitIdx[0]) // take first matched simhit (should be the closest one)
|
|
|
|
- matched_hits.push_back({rec_hit, sim_hits[rec_hit.simHitIdx[0]]});
|
|
|
|
|
|
+ if(rec_hit.simHitIdx().size() == 0) continue; // if rechit is matched to no simhits, give up.
|
|
|
|
+ if(track.simTrkIdx().size() == 0) continue; // if rechit is matched to no simhits, give up.
|
|
|
|
+ const int &simTrkIdx = track.simTrkIdx()[0]; // get first matched track
|
|
|
|
+ for(const int& simHitIdx : sim_tracks[simTrkIdx].simHitIdx()){ // loop over SimHits from SimTrack
|
|
|
|
+ if(simHitIdx == rec_hit.simHitIdx()[0]) // take first matched simhit (should be the closest one)
|
|
|
|
+ matched_hits.push_back({rec_hit, sim_hits[rec_hit.simHitIdx()[0]]});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return matched_hits;
|
|
return matched_hits;
|
|
})));
|
|
})));
|
|
|
|
|
|
|
|
+ //**//**
|
|
auto BPIX_L1 = constant("BPIX_L1", PixDetElem(PixSubDet::Barrel, 1));
|
|
auto BPIX_L1 = constant("BPIX_L1", PixDetElem(PixSubDet::Barrel, 1));
|
|
auto BPIX_L2 = constant("BPIX_L2", PixDetElem(PixSubDet::Barrel, 2));
|
|
auto BPIX_L2 = constant("BPIX_L2", PixDetElem(PixSubDet::Barrel, 2));
|
|
auto BPIX_L3 = constant("BPIX_L3", PixDetElem(PixSubDet::Barrel, 3));
|
|
auto BPIX_L3 = constant("BPIX_L3", PixDetElem(PixSubDet::Barrel, 3));
|
|
@@ -317,53 +295,53 @@ void setup_first_hit_pairs(TrackingDataSet& tds){
|
|
|
|
|
|
// First hits on inner two bpix layers
|
|
// First hits on inner two bpix layers
|
|
auto first_hits_in_B1 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
auto first_hits_in_B1 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
- fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L1, first_hit), "first_hits_in_B1");
|
|
|
|
|
|
+ fv::tuple(BPIX_L1, first_hit), "first_hits_in_B1");
|
|
auto first_hits_in_B2 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
auto first_hits_in_B2 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
- fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L2, first_hit), "first_hits_in_B2");
|
|
|
|
|
|
+ fv::tuple(BPIX_L2, first_hit), "first_hits_in_B2");
|
|
|
|
|
|
// Second hits on outer three bpix layers
|
|
// Second hits on outer three bpix layers
|
|
auto second_hits_in_B2 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
auto second_hits_in_B2 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
- fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L2, second_hit), "second_hits_in_B2");
|
|
|
|
|
|
+ fv::tuple(BPIX_L2, second_hit), "second_hits_in_B2");
|
|
auto second_hits_in_B3 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
auto second_hits_in_B3 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
- fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L3, second_hit), "second_hits_in_B3");
|
|
|
|
|
|
+ fv::tuple(BPIX_L3, second_hit), "second_hits_in_B3");
|
|
auto second_hits_in_B4 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
auto second_hits_in_B4 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
- fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, BPIX_L4, second_hit), "second_hits_in_B4");
|
|
|
|
|
|
+ fv::tuple(BPIX_L4, second_hit), "second_hits_in_B4");
|
|
|
|
|
|
auto first_hits_in_F1 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
auto first_hits_in_F1 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
- fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, FPIX_L1, first_hit), "first_hits_in_F1");
|
|
|
|
|
|
+ fv::tuple(FPIX_L1, first_hit), "first_hits_in_F1");
|
|
auto first_hits_in_F2 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
auto first_hits_in_F2 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
- fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, FPIX_L2, first_hit), "first_hits_in_F2");
|
|
|
|
|
|
+ fv::tuple(FPIX_L2, first_hit), "first_hits_in_F2");
|
|
|
|
|
|
auto second_hits_in_F2 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
auto second_hits_in_F2 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
- fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, FPIX_L2, second_hit), "second_hits_in_F2");
|
|
|
|
|
|
+ fv::tuple(FPIX_L2, second_hit), "second_hits_in_F2");
|
|
auto second_hits_in_F3 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
auto second_hits_in_F3 = fv::tup_apply(find_matched_nth_hit_in_layer,
|
|
- fv::tuple(seeds, pixrec_hits, sim_hits, tracks, sim_tracks, FPIX_L3, second_hit), "second_hits_in_F3");
|
|
|
|
|
|
+ fv::tuple(FPIX_L3, second_hit), "second_hits_in_F3");
|
|
|
|
|
|
// Even vs Odd Ladders
|
|
// Even vs Odd Ladders
|
|
auto even = constant("even", false);
|
|
auto even = constant("even", false);
|
|
auto odd = constant("odd", true);
|
|
auto odd = constant("odd", true);
|
|
|
|
|
|
- auto select_even_odd_ladder_blade_hit_pairs =
|
|
|
|
- func<vector<HitPair>(vector<HitPair>, bool)>("select_even_odd_ladder_blade_hit_pairs",
|
|
|
|
|
|
+ auto select_even_odd_ladder_hit_pairs =
|
|
|
|
+ func<vector<HitPair>(vector<HitPair>, bool)>("select_even_odd_ladder_hit_pairs",
|
|
FUNC(([](const vector<HitPair>& hit_pairs,
|
|
FUNC(([](const vector<HitPair>& hit_pairs,
|
|
const bool &&odd){
|
|
const bool &&odd){
|
|
vector<HitPair> even_pairs;
|
|
vector<HitPair> even_pairs;
|
|
for(const HitPair &hit_pair : hit_pairs){ // loop over all seeds
|
|
for(const HitPair &hit_pair : hit_pairs){ // loop over all seeds
|
|
- if(std::get<PixRecHit>(hit_pair).ladder_blade % 2 == odd){
|
|
|
|
|
|
+ if(std::get<PixRecHit>(hit_pair).ladder() % 2 == odd){
|
|
even_pairs.push_back(hit_pair);
|
|
even_pairs.push_back(hit_pair);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return even_pairs;
|
|
return even_pairs;
|
|
})));
|
|
})));
|
|
|
|
|
|
- auto first_hits_in_B1_even_ladder = fv::tup_apply(select_even_odd_ladder_blade_hit_pairs,
|
|
|
|
|
|
+ auto first_hits_in_B1_even_ladder = fv::tup_apply(select_even_odd_ladder_hit_pairs,
|
|
fv::tuple(first_hits_in_B1, even), "first_hits_in_B1_even_ladder");
|
|
fv::tuple(first_hits_in_B1, even), "first_hits_in_B1_even_ladder");
|
|
- auto first_hits_in_B1_odd_ladder = fv::tup_apply(select_even_odd_ladder_blade_hit_pairs,
|
|
|
|
|
|
+ auto first_hits_in_B1_odd_ladder = fv::tup_apply(select_even_odd_ladder_hit_pairs,
|
|
fv::tuple(first_hits_in_B1, odd), "first_hits_in_B1_odd_ladder");
|
|
fv::tuple(first_hits_in_B1, odd), "first_hits_in_B1_odd_ladder");
|
|
|
|
|
|
- auto first_hits_in_B2_even_ladder = fv::tup_apply(select_even_odd_ladder_blade_hit_pairs,
|
|
|
|
|
|
+ auto first_hits_in_B2_even_ladder = fv::tup_apply(select_even_odd_ladder_hit_pairs,
|
|
fv::tuple(first_hits_in_B2, even), "first_hits_in_B2_even_ladder");
|
|
fv::tuple(first_hits_in_B2, even), "first_hits_in_B2_even_ladder");
|
|
- auto first_hits_in_B2_odd_ladder = fv::tup_apply(select_even_odd_ladder_blade_hit_pairs,
|
|
|
|
|
|
+ auto first_hits_in_B2_odd_ladder = fv::tup_apply(select_even_odd_ladder_hit_pairs,
|
|
fv::tuple(first_hits_in_B2, odd), "first_hits_in_B2_odd_ladder");
|
|
fv::tuple(first_hits_in_B2, odd), "first_hits_in_B2_odd_ladder");
|
|
|
|
|
|
//Plots for dPhi of collections defined above
|
|
//Plots for dPhi of collections defined above
|
|
@@ -540,37 +518,37 @@ void sc_value_hists_for_lb(TrackingDataSet& tds, std::function<bool(int)>& parit
|
|
|
|
|
|
auto pcheck = constant(label, parity_check);
|
|
auto pcheck = constant(label, parity_check);
|
|
auto sc_hit_residuals = lookup_function<
|
|
auto sc_hit_residuals = lookup_function<
|
|
- pair_vec(vector<SuperCluster>, PixDetElem, int, bool, std::function<bool(int)>)>("sc_hit_residuals");
|
|
|
|
|
|
+ pair_vec(PixDetElem, int, bool, std::function<bool(int)>)>("sc_hit_residuals");
|
|
|
|
|
|
// First hits on inner three bpix layers
|
|
// First hits on inner three bpix layers
|
|
auto sc_first_hits_in_B1_dz = fv::tup_apply(sc_hit_residuals,
|
|
auto sc_first_hits_in_B1_dz = fv::tup_apply(sc_hit_residuals,
|
|
- fv::tuple(super_clusters, BPIX_L1, first_hit, dRz, pcheck), relabel("sc_first_hits_in_B1_dz"));
|
|
|
|
|
|
+ fv::tuple(BPIX_L1, first_hit, dRz, pcheck), relabel("sc_first_hits_in_B1_dz"));
|
|
auto sc_first_hits_in_B2_dz = fv::tup_apply(sc_hit_residuals,
|
|
auto sc_first_hits_in_B2_dz = fv::tup_apply(sc_hit_residuals,
|
|
- fv::tuple(super_clusters, BPIX_L2, first_hit, dRz, pcheck), relabel("sc_first_hits_in_B2_dz"));
|
|
|
|
|
|
+ fv::tuple(BPIX_L2, first_hit, dRz, pcheck), relabel("sc_first_hits_in_B2_dz"));
|
|
auto sc_first_hits_in_B3_dz = fv::tup_apply(sc_hit_residuals,
|
|
auto sc_first_hits_in_B3_dz = fv::tup_apply(sc_hit_residuals,
|
|
- fv::tuple(super_clusters, BPIX_L3, first_hit, dRz, pcheck), relabel("sc_first_hits_in_B3_dz"));
|
|
|
|
|
|
+ fv::tuple(BPIX_L3, first_hit, dRz, pcheck), relabel("sc_first_hits_in_B3_dz"));
|
|
|
|
|
|
auto sc_first_hits_in_B1_dphi = fv::tup_apply(sc_hit_residuals,
|
|
auto sc_first_hits_in_B1_dphi = fv::tup_apply(sc_hit_residuals,
|
|
- fv::tuple(super_clusters, BPIX_L1, first_hit, dPhi, pcheck), relabel("sc_first_hits_in_B1_dphi"));
|
|
|
|
|
|
+ fv::tuple(BPIX_L1, first_hit, dPhi, pcheck), relabel("sc_first_hits_in_B1_dphi"));
|
|
auto sc_first_hits_in_B2_dphi = fv::tup_apply(sc_hit_residuals,
|
|
auto sc_first_hits_in_B2_dphi = fv::tup_apply(sc_hit_residuals,
|
|
- fv::tuple(super_clusters, BPIX_L2, first_hit, dPhi, pcheck), relabel("sc_first_hits_in_B2_dphi"));
|
|
|
|
|
|
+ fv::tuple(BPIX_L2, first_hit, dPhi, pcheck), relabel("sc_first_hits_in_B2_dphi"));
|
|
auto sc_first_hits_in_B3_dphi = fv::tup_apply(sc_hit_residuals,
|
|
auto sc_first_hits_in_B3_dphi = fv::tup_apply(sc_hit_residuals,
|
|
- fv::tuple(super_clusters, BPIX_L3, first_hit, dPhi, pcheck), relabel("sc_first_hits_in_B3_dphi"));
|
|
|
|
|
|
+ fv::tuple(BPIX_L3, first_hit, dPhi, pcheck), relabel("sc_first_hits_in_B3_dphi"));
|
|
|
|
|
|
// Second hits on outer three bpix layers
|
|
// Second hits on outer three bpix layers
|
|
auto sc_second_hits_in_B2_dz = fv::tup_apply(sc_hit_residuals,
|
|
auto sc_second_hits_in_B2_dz = fv::tup_apply(sc_hit_residuals,
|
|
- fv::tuple(super_clusters, BPIX_L2, second_hit, dRz, pcheck), relabel("sc_second_hits_in_B2_dz"));
|
|
|
|
|
|
+ fv::tuple(BPIX_L2, second_hit, dRz, pcheck), relabel("sc_second_hits_in_B2_dz"));
|
|
auto sc_second_hits_in_B3_dz = fv::tup_apply(sc_hit_residuals,
|
|
auto sc_second_hits_in_B3_dz = fv::tup_apply(sc_hit_residuals,
|
|
- fv::tuple(super_clusters, BPIX_L3, second_hit, dRz, pcheck), relabel("sc_second_hits_in_B3_dz"));
|
|
|
|
|
|
+ fv::tuple(BPIX_L3, second_hit, dRz, pcheck), relabel("sc_second_hits_in_B3_dz"));
|
|
auto sc_second_hits_in_B4_dz = fv::tup_apply(sc_hit_residuals,
|
|
auto sc_second_hits_in_B4_dz = fv::tup_apply(sc_hit_residuals,
|
|
- fv::tuple(super_clusters, BPIX_L4, second_hit, dRz, pcheck), relabel("sc_second_hits_in_B4_dz"));
|
|
|
|
|
|
+ fv::tuple(BPIX_L4, second_hit, dRz, pcheck), relabel("sc_second_hits_in_B4_dz"));
|
|
|
|
|
|
auto sc_second_hits_in_B2_dphi = fv::tup_apply(sc_hit_residuals,
|
|
auto sc_second_hits_in_B2_dphi = fv::tup_apply(sc_hit_residuals,
|
|
- fv::tuple(super_clusters, BPIX_L2, second_hit, dPhi, pcheck), relabel("sc_second_hits_in_B2_dphi"));
|
|
|
|
|
|
+ fv::tuple(BPIX_L2, second_hit, dPhi, pcheck), relabel("sc_second_hits_in_B2_dphi"));
|
|
auto sc_second_hits_in_B3_dphi = fv::tup_apply(sc_hit_residuals,
|
|
auto sc_second_hits_in_B3_dphi = fv::tup_apply(sc_hit_residuals,
|
|
- fv::tuple(super_clusters, BPIX_L3, second_hit, dPhi, pcheck), relabel("sc_second_hits_in_B3_dphi"));
|
|
|
|
|
|
+ fv::tuple(BPIX_L3, second_hit, dPhi, pcheck), relabel("sc_second_hits_in_B3_dphi"));
|
|
auto sc_second_hits_in_B4_dphi = fv::tup_apply(sc_hit_residuals,
|
|
auto sc_second_hits_in_B4_dphi = fv::tup_apply(sc_hit_residuals,
|
|
- fv::tuple(super_clusters, BPIX_L4, second_hit, dPhi, pcheck), relabel("sc_second_hits_in_B4_dphi"));
|
|
|
|
|
|
+ fv::tuple(BPIX_L4, second_hit, dPhi, pcheck), relabel("sc_second_hits_in_B4_dphi"));
|
|
|
|
|
|
TH2Params params_dz = {"$\\eta$", 100, -4, 4,
|
|
TH2Params params_dz = {"$\\eta$", 100, -4, 4,
|
|
"$\\delta z$(cm)", 100, -0.7, 0.7};
|
|
"$\\delta z$(cm)", 100, -0.7, 0.7};
|
|
@@ -623,42 +601,41 @@ void setup_sc_residuals(TrackingDataSet& tds){
|
|
* examins the matched pixel hits. It calculates a residual based on the
|
|
* examins the matched pixel hits. It calculates a residual based on the
|
|
* extrapolated position of the SC track and the position of the matched
|
|
* extrapolated position of the SC track and the position of the matched
|
|
* hit.
|
|
* hit.
|
|
- * det: 1 for barrel, 2 for endcap
|
|
|
|
|
|
+ * subdet: 1 for barrel, 2 for endcap
|
|
* pix_layer: 1-4 for barrel, 1-3 for endcap
|
|
* pix_layer: 1-4 for barrel, 1-3 for endcap
|
|
* hit_number: examin either the first or second matched hit
|
|
* hit_number: examin either the first or second matched hit
|
|
* sel_dRz: True: calculate dR, False: calculate dz
|
|
* sel_dRz: True: calculate dR, False: calculate dz
|
|
* pcheck: a boolean function that filters residuals based on
|
|
* pcheck: a boolean function that filters residuals based on
|
|
* ladder/blade. Normally used to select either even or odd ladders.
|
|
* ladder/blade. Normally used to select either even or odd ladders.
|
|
*/
|
|
*/
|
|
- func<pair_vec(vector<SuperCluster>,
|
|
|
|
- PixDetElem, int, bool, std::function<bool(int)>)>("sc_hit_residuals",
|
|
|
|
- FUNC(([](const vector<SuperCluster>& super_clusters,
|
|
|
|
- const PixDetElem&& pixdet,
|
|
|
|
|
|
+ func<pair_vec(PixDetElem, int, bool, std::function<bool(int)>)>("sc_hit_residuals",
|
|
|
|
+ FUNC(([](const PixDetElem&& pixdet,
|
|
const int&& hit_number,
|
|
const int&& hit_number,
|
|
const bool&& sel_dRz,
|
|
const bool&& sel_dRz,
|
|
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 super-clusters
|
|
|
|
|
|
+ for(auto super_cluster : super_clusters){ // loop over all super-clusters
|
|
float dRz, dPhi;
|
|
float dRz, dPhi;
|
|
- int ladder_blade;
|
|
|
|
- unsigned int nSeeds = super_cluster.charge.size();
|
|
|
|
|
|
+ int ladder;
|
|
|
|
+ unsigned int nSeeds = super_cluster.charge().size();
|
|
for(unsigned int seedIdx=0; seedIdx<nSeeds; seedIdx++){ // loop over all seeds associated w/ sc
|
|
for(unsigned int seedIdx=0; seedIdx<nSeeds; seedIdx++){ // loop over all seeds associated w/ sc
|
|
if(hit_number == 0){
|
|
if(hit_number == 0){
|
|
- if(!pixdet.contains((PixSubDet)super_cluster.subDet1[seedIdx], super_cluster.lay1[seedIdx])) continue;
|
|
|
|
- dRz = super_cluster.dRz1[seedIdx];
|
|
|
|
- dPhi = super_cluster.dPhi1[seedIdx];
|
|
|
|
- ladder_blade = super_cluster.ladder_blade1[seedIdx];
|
|
|
|
|
|
+ if(!pixdet.contains((PixSubDet)super_cluster.subDet1()[seedIdx], super_cluster.lay1()[seedIdx])) continue;
|
|
|
|
+ dRz = super_cluster.dRz1()[seedIdx];
|
|
|
|
+ dPhi = super_cluster.dPhi1()[seedIdx];
|
|
|
|
+ /* ladder = super_cluster.ladder1()[seedIdx]; */
|
|
}else{
|
|
}else{
|
|
- if(!pixdet.contains((PixSubDet)super_cluster.subDet2[seedIdx], super_cluster.lay2[seedIdx])) continue;
|
|
|
|
- dRz = super_cluster.dRz2[seedIdx];
|
|
|
|
- dPhi = super_cluster.dPhi2[seedIdx];
|
|
|
|
- ladder_blade = super_cluster.ladder_blade2[seedIdx];
|
|
|
|
|
|
+ if(!pixdet.contains((PixSubDet)super_cluster.subDet2()[seedIdx], super_cluster.lay2()[seedIdx])) continue;
|
|
|
|
+ dRz = super_cluster.dRz2()[seedIdx];
|
|
|
|
+ dPhi = super_cluster.dPhi2()[seedIdx];
|
|
|
|
+ /* ladder = super_cluster.ladder2()[seedIdx]; */
|
|
}
|
|
}
|
|
|
|
+ ladder = 0; // TODO: Need to re-add ladder to tree for super-clusters
|
|
DEBUG("New Seed, Idx: " << seedIdx << endl
|
|
DEBUG("New Seed, Idx: " << seedIdx << endl
|
|
<< "\tdRz: " << dRz << endl
|
|
<< "\tdRz: " << dRz << endl
|
|
<< "\tdPhi: " << dPhi << endl);
|
|
<< "\tdPhi: " << dPhi << endl);
|
|
- if(!pcheck(ladder_blade)) continue;
|
|
|
|
|
|
+ if(!pcheck(ladder)) continue;
|
|
if(sel_dRz)
|
|
if(sel_dRz)
|
|
residuals.push_back(dRz);
|
|
residuals.push_back(dRz);
|
|
else
|
|
else
|
|
@@ -695,47 +672,45 @@ void setup_residual_cross_corrolations(TrackingDataSet& tds){
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
- auto sc_cross_correlations = func<pair_vec(vector<SuperCluster>,
|
|
|
|
- PixDetElem, PixDetElem, Res, Res)>("sc_cross_correlations",
|
|
|
|
- FUNC(([](const vector<SuperCluster>& super_clusters,
|
|
|
|
- const PixDetElem&& subdet1,
|
|
|
|
|
|
+ auto sc_cross_correlations = func<pair_vec(PixDetElem, PixDetElem, Res, Res)>("sc_cross_correlations",
|
|
|
|
+ FUNC(([](const PixDetElem&& subdet1,
|
|
const PixDetElem&& subdet2,
|
|
const PixDetElem&& subdet2,
|
|
const Res&& res1,
|
|
const Res&& res1,
|
|
const Res&& res2){
|
|
const Res&& res2){
|
|
vector<float> residuals1;
|
|
vector<float> residuals1;
|
|
vector<float> residuals2;
|
|
vector<float> residuals2;
|
|
- for(const SuperCluster& super_cluster : super_clusters){ // loop over all supser-clusters
|
|
|
|
- unsigned int nSeeds = super_cluster.charge.size();
|
|
|
|
|
|
+ for(auto super_cluster : super_clusters){ // loop over all supser-clusters
|
|
|
|
+ unsigned int nSeeds = super_cluster.charge().size();
|
|
for(unsigned int seedIdx=0; seedIdx<nSeeds; seedIdx++){ // loop over all seeds associated w/ sc
|
|
for(unsigned int seedIdx=0; seedIdx<nSeeds; seedIdx++){ // loop over all seeds associated w/ sc
|
|
- if (!subdet1.contains((PixSubDet)super_cluster.subDet1[seedIdx],super_cluster.lay1[seedIdx]) ||
|
|
|
|
- !subdet2.contains((PixSubDet)super_cluster.subDet2[seedIdx],super_cluster.lay2[seedIdx]))
|
|
|
|
|
|
+ if (!subdet1.contains((PixSubDet)super_cluster.subDet1()[seedIdx],super_cluster.lay1()[seedIdx]) ||
|
|
|
|
+ !subdet2.contains((PixSubDet)super_cluster.subDet2()[seedIdx],super_cluster.lay2()[seedIdx]))
|
|
continue;
|
|
continue;
|
|
switch(res1){
|
|
switch(res1){
|
|
case Res::dz1:
|
|
case Res::dz1:
|
|
- residuals1.push_back(super_cluster.dRz1[seedIdx]);
|
|
|
|
|
|
+ residuals1.push_back(super_cluster.dRz1()[seedIdx]);
|
|
break;
|
|
break;
|
|
case Res::dz2:
|
|
case Res::dz2:
|
|
- residuals1.push_back(super_cluster.dRz2[seedIdx]);
|
|
|
|
|
|
+ residuals1.push_back(super_cluster.dRz2()[seedIdx]);
|
|
break;
|
|
break;
|
|
case Res::dPhi1:
|
|
case Res::dPhi1:
|
|
- residuals1.push_back(super_cluster.dPhi1[seedIdx]);
|
|
|
|
|
|
+ residuals1.push_back(super_cluster.dPhi1()[seedIdx]);
|
|
break;
|
|
break;
|
|
case Res::dPhi2:
|
|
case Res::dPhi2:
|
|
- residuals1.push_back(super_cluster.dPhi2[seedIdx]);
|
|
|
|
|
|
+ residuals1.push_back(super_cluster.dPhi2()[seedIdx]);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
switch(res2){
|
|
switch(res2){
|
|
case Res::dz1:
|
|
case Res::dz1:
|
|
- residuals2.push_back(super_cluster.dRz1[seedIdx]);
|
|
|
|
|
|
+ residuals2.push_back(super_cluster.dRz1()[seedIdx]);
|
|
break;
|
|
break;
|
|
case Res::dz2:
|
|
case Res::dz2:
|
|
- residuals2.push_back(super_cluster.dRz2[seedIdx]);
|
|
|
|
|
|
+ residuals2.push_back(super_cluster.dRz2()[seedIdx]);
|
|
break;
|
|
break;
|
|
case Res::dPhi1:
|
|
case Res::dPhi1:
|
|
- residuals2.push_back(super_cluster.dPhi1[seedIdx]);
|
|
|
|
|
|
+ residuals2.push_back(super_cluster.dPhi1()[seedIdx]);
|
|
break;
|
|
break;
|
|
case Res::dPhi2:
|
|
case Res::dPhi2:
|
|
- residuals2.push_back(super_cluster.dPhi2[seedIdx]);
|
|
|
|
|
|
+ residuals2.push_back(super_cluster.dPhi2()[seedIdx]);
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -754,16 +729,16 @@ void setup_residual_cross_corrolations(TrackingDataSet& tds){
|
|
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,
|
|
- fv::tuple(super_clusters, BPIX_L1, BPIX_L2, v_dPhi2, v_dz1), "sc_dphi1_v_dz1_L1_L2");
|
|
|
|
|
|
+ fv::tuple(BPIX_L1, BPIX_L2, v_dPhi2, v_dz1), "sc_dphi1_v_dz1_L1_L2");
|
|
|
|
|
|
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(BPIX_L1, BPIX_L2, v_dz2, v_dz1), "sc_dz2_v_dz1_L1_L2");
|
|
|
|
|
|
auto sc_dphi2_v_dphi1_L1_L2 = fv::tup_apply(sc_cross_correlations,
|
|
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");
|
|
|
|
|
|
+ fv::tuple(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,
|
|
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");
|
|
|
|
|
|
+ fv::tuple(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");
|
|
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",
|
|
@@ -796,16 +771,16 @@ void setup_residual_cross_corrolations(TrackingDataSet& tds){
|
|
"sc_dphi2_v_dphi1_L1_L2_zoom", hist_params);
|
|
"sc_dphi2_v_dphi1_L1_L2_zoom", hist_params);
|
|
|
|
|
|
auto sc_dphi2_v_dz1_L1_L3 = fv::tup_apply(sc_cross_correlations,
|
|
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");
|
|
|
|
|
|
+ fv::tuple(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,
|
|
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");
|
|
|
|
|
|
+ fv::tuple(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,
|
|
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");
|
|
|
|
|
|
+ fv::tuple(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,
|
|
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");
|
|
|
|
|
|
+ fv::tuple(BPIX_L1, BPIX_L3, v_dz2, v_dPhi1), "sc_dz2_v_dphi1_L1_L3");
|
|
|
|
|
|
hist_params = TH2Params::lookup("sc_dphi2_v_dz1_L1_L2");
|
|
hist_params = TH2Params::lookup("sc_dphi2_v_dz1_L1_L2");
|
|
tds.register_container<ContainerTH2Many<float>>("sc_dphi2_v_dz1_L1_L3",
|
|
tds.register_container<ContainerTH2Many<float>>("sc_dphi2_v_dz1_L1_L3",
|
|
@@ -856,8 +831,8 @@ void run_analysis(const vector<fv::util::DataFileDescriptor>& dfds, const string
|
|
|
|
|
|
setup_first_hit_pairs(tds);
|
|
setup_first_hit_pairs(tds);
|
|
setup_skipped_layer_hit_pairs(tds);
|
|
setup_skipped_layer_hit_pairs(tds);
|
|
- setup_sc_residuals(tds);
|
|
|
|
- setup_residual_cross_corrolations(tds);
|
|
|
|
|
|
+ /* setup_sc_residuals(tds); */
|
|
|
|
+ /* setup_residual_cross_corrolations(tds); */
|
|
|
|
|
|
|
|
|
|
tds.process(silent);
|
|
tds.process(silent);
|