Skip to content

Commit

Permalink
Change double to float
Browse files Browse the repository at this point in the history
  • Loading branch information
Sunanda committed Oct 5, 2015
1 parent 7ea4b58 commit 6d5990a
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 13 deletions.
6 changes: 3 additions & 3 deletions SimG4CMS/Calo/interface/CaloHitID.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class CaloHitID {
public:

CaloHitID(uint32_t unitID, double timeSlice, int trackID, uint16_t depth=0,
double tSlice=1, bool ignoreTkID=false);
CaloHitID(double tSlice=1, bool ignoreTkID=false);
float tSlice=1, bool ignoreTkID=false);
CaloHitID(float tSlice=1, bool ignoreTkID=false);
CaloHitID(const CaloHitID&);
const CaloHitID& operator=(const CaloHitID&);
virtual ~CaloHitID();
Expand All @@ -39,7 +39,7 @@ class CaloHitID {
int theTrackID;
int theTimeSliceID;
uint16_t theDepth;
double timeSliceUnit;
float timeSliceUnit;
bool ignoreTrackID;

};
Expand Down
4 changes: 2 additions & 2 deletions SimG4CMS/Calo/interface/CaloSD.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class CaloSD : public SensitiveCaloDetector,
CaloSD(G4String aSDname, const DDCompactView & cpv,
const SensitiveDetectorCatalog & clg,
edm::ParameterSet const & p, const SimTrackManager*,
double timeSlice=1., bool ignoreTkID=false);
float timeSlice=1., bool ignoreTkID=false);
virtual ~CaloSD();
virtual bool ProcessHits(G4Step * step,G4TouchableHistory * tHistory);
virtual bool ProcessHits(G4GFlashSpot*aSpot,G4TouchableHistory*);
Expand Down Expand Up @@ -138,7 +138,7 @@ class CaloSD : public SensitiveCaloDetector,

private:

double timeSlice;
float timeSlice;
bool ignoreTrackID;
CaloSlaveSD* slave;
int hcID;
Expand Down
4 changes: 2 additions & 2 deletions SimG4CMS/Calo/src/CaloHitID.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
#include <iomanip>

CaloHitID::CaloHitID(uint32_t unitID, double timeSlice, int trackID,
uint16_t depth, double tSlice, bool ignoreTkID) :
uint16_t depth, float tSlice, bool ignoreTkID) :
timeSliceUnit(tSlice), ignoreTrackID(ignoreTkID) {
setID(unitID, timeSlice, trackID, depth);
}

CaloHitID::CaloHitID(double tSlice, bool ignoreTkID) :
CaloHitID::CaloHitID(float tSlice, bool ignoreTkID) :
timeSliceUnit(tSlice), ignoreTrackID(ignoreTkID) {
reset();
}
Expand Down
2 changes: 1 addition & 1 deletion SimG4CMS/Calo/src/CaloSD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
CaloSD::CaloSD(G4String name, const DDCompactView & cpv,
const SensitiveDetectorCatalog & clg,
edm::ParameterSet const & p, const SimTrackManager* manager,
double timeSliceUnit, bool ignoreTkID) :
float timeSliceUnit, bool ignoreTkID) :
SensitiveCaloDetector(name, cpv, clg, p),
G4VGFlashSensitiveDetector(), theTrack(0), preStepPoint(0), eminHit(0),
eminHitD(0), m_trackManager(manager), currentHit(0), runInit(false),
Expand Down
5 changes: 2 additions & 3 deletions SimG4CMS/Calo/src/ECalSD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,15 @@
//#define DebugLog

template <class T>
bool any(const std::vector<T> & v, const T &what)
{
bool any(const std::vector<T> & v, const T &what) {
return std::find(v.begin(), v.end(), what) != v.end();
}

ECalSD::ECalSD(G4String name, const DDCompactView & cpv,
const SensitiveDetectorCatalog & clg,
edm::ParameterSet const & p, const SimTrackManager* manager) :
CaloSD(name, cpv, clg, p, manager,
p.getParameter<edm::ParameterSet>("ECalSD").getParameter<double>("TimeSliceUnit"),
(float)(p.getParameter<edm::ParameterSet>("ECalSD").getParameter<double>("TimeSliceUnit")),
p.getParameter<edm::ParameterSet>("ECalSD").getParameter<bool>("IgnoreTrackID")),
numberingScheme(0){

Expand Down
2 changes: 1 addition & 1 deletion SimG4CMS/Calo/src/HCalSD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ HCalSD::HCalSD(G4String name, const DDCompactView & cpv,
const SensitiveDetectorCatalog & clg,
edm::ParameterSet const & p, const SimTrackManager* manager) :
CaloSD(name, cpv, clg, p, manager,
p.getParameter<edm::ParameterSet>("HCalSD").getParameter<double>("TimeSliceUnit"),
(float)(p.getParameter<edm::ParameterSet>("HCalSD").getParameter<double>("TimeSliceUnit")),
p.getParameter<edm::ParameterSet>("HCalSD").getParameter<bool>("IgnoreTrackID")),
hcalConstants(0), numberingFromDDD(0), numberingScheme(0), showerLibrary(0),
hfshower(0), showerParam(0), showerPMT(0), showerBundle(0), m_HEDarkening(0),
Expand Down
2 changes: 1 addition & 1 deletion SimG4CMS/Calo/src/HGCSD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ HGCSD::HGCSD(G4String name, const DDCompactView & cpv,
const SensitiveDetectorCatalog & clg,
edm::ParameterSet const & p, const SimTrackManager* manager) :
CaloSD(name, cpv, clg, p, manager,
p.getParameter<edm::ParameterSet>("HGCSD").getParameter<double>("TimeSliceUnit"),
(float)(p.getParameter<edm::ParameterSet>("HGCSD").getParameter<double>("TimeSliceUnit")),
p.getParameter<edm::ParameterSet>("HGCSD").getParameter<bool>("IgnoreTrackID")),
numberingScheme(0) {

Expand Down

0 comments on commit 6d5990a

Please sign in to comment.