-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #179 from JeffersonLab/iss89
Iss89: Trident and WAB track rates/shapes and track efficiency
- Loading branch information
Showing
150 changed files
with
21,774 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#ifndef THREEPRONGHISTOS_H | ||
#define THREEPRONGHISTOS_H | ||
|
||
#include "HistoManager.h" | ||
#include "Track.h" | ||
#include "CalCluster.h" | ||
#include "Vertex.h" | ||
#include "Particle.h" | ||
//#include "AnaHelpers.h" | ||
#include <string> | ||
#include <vector> | ||
|
||
class ThreeProngHistos : public HistoManager { | ||
|
||
public: | ||
|
||
ThreeProngHistos(const std::string& inputName) : | ||
HistoManager(inputName) | ||
{ | ||
m_name = inputName; | ||
// _ah = std::make_shared<AnaHelpers>(); | ||
// BuildAxes(); | ||
} | ||
|
||
virtual void Define3DHistos(){}; | ||
virtual void Define2DHistos(){}; | ||
|
||
|
||
void BuildAxes(){}; | ||
void setBeamEnergy(double beamEnergy){eBeam=beamEnergy;}; | ||
void FillThreeProngPlots(Particle* ele, Particle* pos, Particle* rec,float weight=1.0); | ||
private: | ||
// Vertices | ||
// std::vector<std::string> vPs{"vtx_chi2", "vtx_X", "vtx_Y", "vtx_Z", "vtx_sigma_X","vtx_sigma_Y","vtx_sigma_Z","vtx_InvM","vtx_InvMErr"}; | ||
double eBeam{3.74}; | ||
//bool doTrkCompPlots{false}; | ||
|
||
}; | ||
|
||
#endif //TRACKEFFIC_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#ifndef TRACKEFFICHISTOS_H | ||
#define TRACKEFFICHISTOS_H | ||
|
||
#include "HistoManager.h" | ||
#include "Track.h" | ||
#include "CalCluster.h" | ||
#include "Vertex.h" | ||
#include "Particle.h" | ||
#include "AnaHelpers.h" | ||
#include <string> | ||
#include <vector> | ||
|
||
class TrackEfficHistos : public HistoManager { | ||
|
||
public: | ||
|
||
TrackEfficHistos(const std::string& inputName, std::shared_ptr<AnaHelpers> ah) : | ||
HistoManager(inputName) | ||
{ | ||
m_name = inputName; | ||
_ah=ah; | ||
// _ah = std::make_shared<AnaHelpers>(); | ||
// BuildAxes(); | ||
} | ||
|
||
virtual void Define3DHistos(){}; | ||
virtual void Define2DHistos(){}; | ||
|
||
|
||
void BuildAxes(){}; | ||
|
||
void FillEffPlots(std::pair<CalCluster*,Track*> ele, std::pair<CalCluster*,Track*> pos, float weight = 1.); | ||
void FillPreSelectionPlots(CalCluster*, float weight=1.); | ||
void FillPairSelectionPlots(CalCluster* eleClu, CalCluster* posClu, | ||
float weight); | ||
std::pair<CalCluster*, Track*> getClusterTrackPair(CalCluster* cluster,std::vector<Track*>& tracks, float weight=1.0); | ||
void FillEffPlots(Particle* ele, Particle* pos, float weight=1.0); | ||
void SetCalTimeOffset(double offset){ | ||
std::cout<<"setting TrackEfficHistos::timeOffset_ = "<<offset<<std::endl; | ||
timeOffset_ = offset; | ||
}; | ||
|
||
|
||
private: | ||
std::shared_ptr<AnaHelpers> _ah ; | ||
double timeOffset_{0.0}; | ||
// Vertices | ||
// std::vector<std::string> vPs{"vtx_chi2", "vtx_X", "vtx_Y", "vtx_Z", "vtx_sigma_X","vtx_sigma_Y","vtx_sigma_Z","vtx_InvM","vtx_InvMErr"}; | ||
|
||
//bool doTrkCompPlots{false}; | ||
|
||
}; | ||
|
||
#endif //TRACKEFFIC_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#ifndef TRIDENTHISTOS_H | ||
#define TRIDENTHISTOS_H | ||
|
||
#include "HistoManager.h" | ||
#include "Track.h" | ||
#include "TrackerHit.h" | ||
#include "RawSvtHit.h" | ||
#include "CalCluster.h" | ||
#include "Vertex.h" | ||
#include "Particle.h" | ||
#include <string> | ||
#include <vector> | ||
|
||
class TridentHistos : public HistoManager { | ||
|
||
public: | ||
|
||
TridentHistos(const std::string& inputName) : | ||
HistoManager(inputName) | ||
{ | ||
m_name = inputName; | ||
BuildAxes(); | ||
} | ||
|
||
virtual void Define3DHistos(){}; | ||
virtual void Define2DHistos(); | ||
void DefineHistos(); | ||
void saveHistos(TFile* outF,std::string folder); | ||
void AssignLayerCode(Track* ele_trk, Track* pos_trk); | ||
std::string getLayerCodeFromHistoName(std::string name); | ||
bool isLayerCode(std::string histoName, int nLayers, int ptr ); | ||
void setOutputDir(TFile* outF, std::string folder, std::string histoName); | ||
std::string getLayerCodeFromTrack(Track* trk); | ||
std::string splitByElePosLayerCombos(std::string histoName); | ||
void BuildAxes(); | ||
|
||
void Fill1DTrack(Track* track, double trkTimeOffset,float weight = 1., const std::string& trkname = ""); | ||
void Fill2DTrack(Track* track,float weight = 1., const std::string& trkname = ""); | ||
|
||
//This should probably go somewhere else | ||
void FillResidualHistograms(Track* track, int ly, double res, double sigma); | ||
|
||
void Fill1DVertex(Vertex* vtx, float weight = 1.); | ||
|
||
//TODO Change this | ||
void Fill1DVertex(Vertex* vtx, Particle* ele, Particle* pos, Track* ele_trk, Track* pos_trk, double trkTimeOffset,float weight = 1.); | ||
|
||
void Fill1DHistograms(Track* track = nullptr, Vertex* vtx = nullptr, float weight = 1.); | ||
void Fill2DHistograms(Vertex* vtx = nullptr, float weight = 1.); | ||
|
||
//Truth comparison | ||
void Fill1DTrackTruth(Track* track, Track* truth_track, float weight=1.,const std::string& =""); | ||
std::pair<CalCluster*, Track*> getTrackClusterPair(Track* trk,std::vector<CalCluster*>& clusters, float weight); | ||
//track_x goes for x axis, and y for y axis | ||
void FillTrackComparisonHistograms(Track* track_x, Track* track_y, float weight = 1.); | ||
void doTrackComparisonPlots(bool doplots) {doTrkCompPlots = doplots;}; | ||
// void FillTrackClusterHistos(std::pair<CalCluster, Track*> ele, std::pair<CalCluster, Track*> posOrGamma, double calTimeOffset, double trkTimeOffset,std::vector<CalCluster*> * clusterList, double weight); | ||
void FillTrackClusterHistos(std::pair<CalCluster, Track*> ele, | ||
std::pair<CalCluster, Track*> posOrGamma, double calTimeOffset, | ||
double trkTimeOffset,double weight); | ||
void FillWABHistos(std::pair<CalCluster*, Track*> ele, CalCluster* gamma, double weight); | ||
void setBeamEnergy(double ebeam){eBeam_=ebeam;}; | ||
private: | ||
|
||
// Vertices | ||
std::vector<std::string> vPs{"vtx_chi2", "vtx_X", "vtx_Y", "vtx_Z", "vtx_sigma_X","vtx_sigma_Y","vtx_sigma_Z","vtx_InvM","vtx_InvMErr"}; | ||
std::string layerCode; | ||
|
||
bool doTrkCompPlots{false}; | ||
|
||
//histogram template splitting | ||
virtual void DefineHistosFromTemplateOnly(std::vector<std::string> histoCopyNames, | ||
std::string makeCopyJsonTag = "default=single_copy"); | ||
virtual void DefineOneTimeHistos(); | ||
double eBeam_; | ||
double stdBeamEnergy_=4.5; // GeV...use this to shift PSums from different beam energies in order to compare... | ||
|
||
}; | ||
|
||
#endif //TRACKHISTOS_H |
Oops, something went wrong.