Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
Remove copy c'tor and assignment operators for processors
initialise all member variables c++11 style
remove unused parameters names variables
  • Loading branch information
andresailer committed Feb 28, 2017
1 parent b61033b commit 55446d3
Show file tree
Hide file tree
Showing 8 changed files with 222 additions and 210 deletions.
108 changes: 56 additions & 52 deletions Calorimetry/include/ShowerStudy.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ class ShowerStudy : public Processor {
virtual Processor* newProcessor() { return new ShowerStudy ; }

ShowerStudy() ;


ShowerStudy(const ShowerStudy&) = delete;
ShowerStudy& operator=(const ShowerStudy&) = delete;

// Initialisation - run at the beginning to start histograms, etc.
virtual void init() ;

Expand All @@ -46,73 +49,74 @@ class ShowerStudy : public Processor {

protected:

// Collection names for (in/out)put
std::string m_inputCalorimeterHitCollection ;
std::string m_inputMCParticleCollection ;
std::string m_inputLeakageCalorimeterHitCollection;
std::string m_rootFileName;

// Run and event counters
int m_eventNumber ;
int m_runNumber ;
// Call to get collections
void getCollection(LCCollection*&, std::string, LCEvent*);

// Collection names for (in/out)put
std::string m_inputCalorimeterHitCollection = "";
std::string m_inputMCParticleCollection = "";
std::string m_inputLeakageCalorimeterHitCollection = "";
std::string m_rootFileName = "";

// Call to get collections
void getCollection(LCCollection*&, std::string, LCEvent*);
// Run and event counters
int m_eventNumber = 0;
int m_runNumber = 0;

// Plots
TH2F * m_showerHistLayers;
TH2F * m_showerHist;
TH2F * m_showerHistX0;
TProfile * m_leakageProfile;
// Plots
TH2F * m_showerHistLayers = NULL;
TH2F * m_showerHist = NULL;
TH2F * m_showerHistX0 = NULL;
TProfile * m_leakageProfile = NULL;


TH2F * m_raw_showerHistLayers;
TH2F * m_raw_showerHist;
TH2F * m_raw_showerHistX0;
TH2F * m_raw_showerHistLayers = NULL;
TH2F * m_raw_showerHist = NULL;
TH2F * m_raw_showerHistX0 = NULL;

TH2F * m_totalEnergyHist;
TTree * m_outputTree;
TFile * m_rootFile;
//Tree branch variables
TH2F * m_totalEnergyHist = NULL;
TTree * m_outputTree = NULL;
TFile * m_rootFile = NULL;
//Tree branch variables

float m_trueEnergy;
float m_totalEnergy;
float m_totalLeakEnergy;
float m_trueEnergy = 0.0;
float m_totalEnergy = 0.0;
float m_totalLeakEnergy = 0.0;

std::vector<float> * m_totalEnergyInLayerGroup;
std::vector<float> * m_totalEnergyInLayerGroup = NULL;

unsigned int m_nhits;
unsigned int m_leak_nhits;
unsigned int m_nhits = 0;
unsigned int m_leak_nhits = 0;

int m_layerThreshold;
int m_layerThreshold = 0;

std::vector<float> * m_hitEnergies;
std::vector<float> * m_raw_hitEnergies;
std::vector<float> * m_hitEnergies = NULL;
std::vector<float> * m_raw_hitEnergies = NULL;

std::vector<float> * m_hit_x;
std::vector<float> * m_hit_y;
std::vector<float> * m_hit_z;
std::vector<float> * m_hit_x = NULL;
std::vector<float> * m_hit_y = NULL;
std::vector<float> * m_hit_z = NULL;

std::vector<int> * m_hitLayers;
std::vector<float> * m_hitLayerThicknesses;
std::vector<float> * m_hitLayerRadiationLengths;
std::vector<float> * m_hitLayerIntRadiationLengths;
std::vector<float> * m_hitLayerDistances;
std::vector<float> * m_hitLayerSensitiveThicknesses;
std::vector<int> * m_hitLayers = NULL;
std::vector<float> * m_hitLayerThicknesses = NULL;
std::vector<float> * m_hitLayerRadiationLengths = NULL;
std::vector<float> * m_hitLayerIntRadiationLengths = NULL;
std::vector<float> * m_hitLayerDistances = NULL;
std::vector<float> * m_hitLayerSensitiveThicknesses = NULL;


std::vector<float> * m_leak_hitEnergies;
std::vector<float> * m_leak_hit_x;
std::vector<float> * m_leak_hit_y;
std::vector<float> * m_leak_hit_z;
std::vector<float> * m_leak_hitEnergies = NULL;
std::vector<float> * m_leak_hit_x = NULL;
std::vector<float> * m_leak_hit_y = NULL;
std::vector<float> * m_leak_hit_z = NULL;

std::vector<int> * m_leak_hitLayers;
std::vector<float> * m_leak_hitLayerThicknesses;
std::vector<float> * m_leak_hitLayerRadiationLengths;
std::vector<float> * m_leak_hitLayerIntRadiationLengths;
std::vector<float> * m_leak_hitLayerDistances;
std::vector<float> * m_leak_raw_hitEnergies;
std::vector<float> * m_leak_hitLayerSensitiveThicknesses;
std::vector<int> * m_leak_hitLayers = NULL;
std::vector<float> * m_leak_hitLayerThicknesses = NULL;
std::vector<float> * m_leak_hitLayerRadiationLengths = NULL;
std::vector<float> * m_leak_hitLayerIntRadiationLengths = NULL;
std::vector<float> * m_leak_hitLayerDistances = NULL;
std::vector<float> * m_leak_raw_hitEnergies = NULL;
std::vector<float> * m_leak_hitLayerSensitiveThicknesses = NULL;


} ;
Expand Down
4 changes: 2 additions & 2 deletions Calorimetry/src/ShowerStudy.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ void ShowerStudy::init() {
}


void ShowerStudy::processRunHeader( LCRunHeader* run) {
void ShowerStudy::processRunHeader( LCRunHeader* ) {
++m_runNumber ;
}

Expand Down Expand Up @@ -454,7 +454,7 @@ void ShowerStudy::getCollection(LCCollection* &collection, std::string collectio
return;
}

void ShowerStudy::check(LCEvent* evt){
void ShowerStudy::check(LCEvent* ){
}

void ShowerStudy::end(){
Expand Down
130 changes: 66 additions & 64 deletions Tracking/include/ClicEfficiencyCalculator.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ class ClicEfficiencyCalculator : public Processor {
virtual Processor* newProcessor() { return new ClicEfficiencyCalculator ; }

ClicEfficiencyCalculator() ;

ClicEfficiencyCalculator(const ClicEfficiencyCalculator&) = delete;
ClicEfficiencyCalculator& operator=(const ClicEfficiencyCalculator&) = delete;

// Initialisation - run at the beginning to start histograms, etc.
virtual void init() ;

Expand Down Expand Up @@ -71,77 +73,77 @@ class ClicEfficiencyCalculator : public Processor {

protected:

// Collection names for (in/out)put
std::vector<std::string> m_inputTrackerHitCollections ;
std::vector<std::string> m_inputTrackerHitRelationCollections ;
std::string m_inputParticleCollection ;
std::string m_inputTrackCollection ;
std::string m_inputTrackRelationCollection;
std::string m_outputEfficientMCParticleCollection;
std::string m_outputInefficientMCParticleCollection;
// Collection names for (in/out)put
std::vector<std::string> m_inputTrackerHitCollections = {};
std::vector<std::string> m_inputTrackerHitRelationCollections = {};
std::string m_inputParticleCollection = "";
std::string m_inputTrackCollection = "";
std::string m_inputTrackRelationCollection = "";
std::string m_outputEfficientMCParticleCollection = "";
std::string m_outputInefficientMCParticleCollection = "";

// Run and event counters
int m_eventNumber ;
int m_runNumber ;
// Run and event counters
int m_eventNumber = 0;
int m_runNumber = 0;

// Track fit factory
MarlinTrk::IMarlinTrkSystem* trackFactory;
// Track fit factory
MarlinTrk::IMarlinTrkSystem* trackFactory = NULL;

// Parameters
bool m_fullOutput;
bool m_simpleOutput;
double m_purity;
double m_magneticField;
std::string m_cuts;
std::string m_mcTreeName;
std::string m_purityTreeName;
std::string m_efficiencyTreeName;
std::map<std::string,double> m_particles;
std::map<std::string,double> m_reconstructedParticles;
std::map<MCParticle*, std::vector<TrackerHit*> > particleHits;
// Parameters
bool m_fullOutput = false;
bool m_simpleOutput = false;
double m_purity = 0.0;
double m_magneticField = 0.0;
std::string m_cuts = "";
std::string m_mcTreeName = "";
std::string m_purityTreeName = "";
std::string m_efficiencyTreeName = "";
std::map<std::string,double> m_particles = {};
std::map<std::string,double> m_reconstructedParticles = {};
std::map<MCParticle*, std::vector<TrackerHit*> > particleHits = {};

// Histograms
TH2F* m_thetaPtMCParticle;
TH2F* m_thetaPtMCParticleReconstructed;
TH2F* m_thetaPtMCParticleEfficiency;
TH2F* m_thetaPtMCParticle = NULL;
TH2F* m_thetaPtMCParticleReconstructed = NULL;
TH2F* m_thetaPtMCParticleEfficiency = NULL;

// Trees
TTree *m_mctree ;
std::vector<int > m_mcCat;
std::vector<double > m_mcTheta;
std::vector<double > m_mcPt;
std::vector<int > m_mcIsDecayedInTracker;
std::vector<int > m_mcNHitsTot;
std::vector<int > m_mcNHitsVXD;
std::vector<int > m_mcNTracks;
std::vector<int > m_mcNTrkHits;
std::vector<int > m_mcThetaTrk;
std::vector<int > m_mcPtTrk;
std::vector<int > m_mcPhiTrk;
std::vector<int > m_mcNTracksCone;

TTree *m_trackTree ;
std::vector<double > m_vec_vx_reconstructable;
std::vector<double > m_vec_vy_reconstructable;
std::vector<double > m_vec_vz_reconstructable;
std::vector<double > m_vec_vr_reconstructable;
std::vector<double > m_vec_pt_reconstructable;
std::vector<double > m_vec_theta_reconstructable;
std::vector<bool > m_vec_is_reconstructed;

TTree *m_purityTree ;
std::vector<int > m_vec_nhits_vtx;
std::vector<int > m_vec_nhits_trk;
std::vector<int > m_vec_nhits;
std::vector<double > m_vec_purity;
std::vector<int > m_vec_pdg;
std::vector<double > m_vec_theta;
std::vector<double > m_vec_phi;
std::vector<double > m_vec_p;
TTree *m_mctree = NULL;
std::vector<int > m_mcCat = {};
std::vector<double > m_mcTheta = {};
std::vector<double > m_mcPt = {};
std::vector<int > m_mcIsDecayedInTracker = {};
std::vector<int > m_mcNHitsTot = {};
std::vector<int > m_mcNHitsVXD = {};
std::vector<int > m_mcNTracks = {};
std::vector<int > m_mcNTrkHits = {};
std::vector<int > m_mcThetaTrk = {};
std::vector<int > m_mcPtTrk = {};
std::vector<int > m_mcPhiTrk = {};
std::vector<int > m_mcNTracksCone = {};

TTree *m_trackTree = NULL;
std::vector<double > m_vec_vx_reconstructable = {};
std::vector<double > m_vec_vy_reconstructable = {};
std::vector<double > m_vec_vz_reconstructable = {};
std::vector<double > m_vec_vr_reconstructable = {};
std::vector<double > m_vec_pt_reconstructable = {};
std::vector<double > m_vec_theta_reconstructable = {};
std::vector<bool > m_vec_is_reconstructed = {};

TTree *m_purityTree = NULL;
std::vector<int > m_vec_nhits_vtx = {};
std::vector<int > m_vec_nhits_trk = {};
std::vector<int > m_vec_nhits = {};
std::vector<double > m_vec_purity = {};
std::vector<int > m_vec_pdg = {};
std::vector<double > m_vec_theta = {};
std::vector<double > m_vec_phi = {};
std::vector<double > m_vec_p = {};

TTree *m_simplifiedTree ;
double m_type, m_pt, m_theta, m_phi, m_vertexR, m_closeTracks;
bool m_reconstructed;
TTree *m_simplifiedTree = NULL;
double m_type = 0.0, m_pt = 0.0, m_theta = 0.0, m_phi = 0.0, m_vertexR = 0.0, m_closeTracks = 0.0;
bool m_reconstructed = false;


} ;
Expand Down
39 changes: 21 additions & 18 deletions Tracking/include/HitResiduals.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ class HitResiduals : public Processor {


HitResiduals() ;

HitResiduals(const HitResiduals&) = delete;
HitResiduals& operator=(const HitResiduals&) = delete;

/** Called at the begin of the job before anything is read.
* Use to initialize the processor, e.g. book histograms.
Expand Down Expand Up @@ -67,29 +70,29 @@ class HitResiduals : public Processor {

/** Input collection name.
*/
std::string _inputTrkColName;
std::string _inputTrkColName = "";

std::string _outFileName;
std::string _treeName;
std::string _outFileName = "";
std::string _treeName = "";

TFile* _out;
TTree* _tree;
TFile* _out = NULL;
TTree* _tree = NULL;

int _nRun;
int _nEvt;
int _nRun = 0;
int _nEvt = 0;

std::vector<double > _resU;
std::vector<double > _resV;
std::vector<int > _subdet;
std::vector<int > _layer;
std::vector<double > _resU = {};
std::vector<double > _resV = {};
std::vector<int > _subdet = {};
std::vector<int > _layer = {};

MarlinTrk::IMarlinTrkSystem* _trksystem;
SurfaceMap _surfMap;
bool _MSOn;
bool _ElossOn;
bool _SmoothOn;
double _Max_Chi2_Incr;
double _bField;
MarlinTrk::IMarlinTrkSystem* _trksystem = NULL;
SurfaceMap _surfMap = {};
bool _MSOn = true;
bool _ElossOn = true;
bool _SmoothOn = false;
double _Max_Chi2_Incr = 0.0;
double _bField = 0.0;

} ;

Expand Down
Loading

0 comments on commit 55446d3

Please sign in to comment.