From 6d5990a9651ed8f13a8c98a7d3f4f534c65acc64 Mon Sep 17 00:00:00 2001 From: Sunanda Date: Mon, 5 Oct 2015 14:37:28 +0200 Subject: [PATCH] Change double to float --- SimG4CMS/Calo/interface/CaloHitID.h | 6 +++--- SimG4CMS/Calo/interface/CaloSD.h | 4 ++-- SimG4CMS/Calo/src/CaloHitID.cc | 4 ++-- SimG4CMS/Calo/src/CaloSD.cc | 2 +- SimG4CMS/Calo/src/ECalSD.cc | 5 ++--- SimG4CMS/Calo/src/HCalSD.cc | 2 +- SimG4CMS/Calo/src/HGCSD.cc | 2 +- 7 files changed, 12 insertions(+), 13 deletions(-) diff --git a/SimG4CMS/Calo/interface/CaloHitID.h b/SimG4CMS/Calo/interface/CaloHitID.h index 36eb27d121763..d969c8895d89d 100644 --- a/SimG4CMS/Calo/interface/CaloHitID.h +++ b/SimG4CMS/Calo/interface/CaloHitID.h @@ -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(); @@ -39,7 +39,7 @@ class CaloHitID { int theTrackID; int theTimeSliceID; uint16_t theDepth; - double timeSliceUnit; + float timeSliceUnit; bool ignoreTrackID; }; diff --git a/SimG4CMS/Calo/interface/CaloSD.h b/SimG4CMS/Calo/interface/CaloSD.h index ec66231a47ef6..03772f7655498 100644 --- a/SimG4CMS/Calo/interface/CaloSD.h +++ b/SimG4CMS/Calo/interface/CaloSD.h @@ -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*); @@ -138,7 +138,7 @@ class CaloSD : public SensitiveCaloDetector, private: - double timeSlice; + float timeSlice; bool ignoreTrackID; CaloSlaveSD* slave; int hcID; diff --git a/SimG4CMS/Calo/src/CaloHitID.cc b/SimG4CMS/Calo/src/CaloHitID.cc index 63eb70fbfd870..3f00832978c5a 100644 --- a/SimG4CMS/Calo/src/CaloHitID.cc +++ b/SimG4CMS/Calo/src/CaloHitID.cc @@ -7,12 +7,12 @@ #include 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(); } diff --git a/SimG4CMS/Calo/src/CaloSD.cc b/SimG4CMS/Calo/src/CaloSD.cc index 7154f039c5500..eeab00cbc1820 100644 --- a/SimG4CMS/Calo/src/CaloSD.cc +++ b/SimG4CMS/Calo/src/CaloSD.cc @@ -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), diff --git a/SimG4CMS/Calo/src/ECalSD.cc b/SimG4CMS/Calo/src/ECalSD.cc index 877c26314fd2b..93a0dd91a8b45 100644 --- a/SimG4CMS/Calo/src/ECalSD.cc +++ b/SimG4CMS/Calo/src/ECalSD.cc @@ -31,8 +31,7 @@ //#define DebugLog template -bool any(const std::vector & v, const T &what) -{ +bool any(const std::vector & v, const T &what) { return std::find(v.begin(), v.end(), what) != v.end(); } @@ -40,7 +39,7 @@ 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("ECalSD").getParameter("TimeSliceUnit"), + (float)(p.getParameter("ECalSD").getParameter("TimeSliceUnit")), p.getParameter("ECalSD").getParameter("IgnoreTrackID")), numberingScheme(0){ diff --git a/SimG4CMS/Calo/src/HCalSD.cc b/SimG4CMS/Calo/src/HCalSD.cc index abc7ad86289ba..43d9dd173ff56 100644 --- a/SimG4CMS/Calo/src/HCalSD.cc +++ b/SimG4CMS/Calo/src/HCalSD.cc @@ -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("HCalSD").getParameter("TimeSliceUnit"), + (float)(p.getParameter("HCalSD").getParameter("TimeSliceUnit")), p.getParameter("HCalSD").getParameter("IgnoreTrackID")), hcalConstants(0), numberingFromDDD(0), numberingScheme(0), showerLibrary(0), hfshower(0), showerParam(0), showerPMT(0), showerBundle(0), m_HEDarkening(0), diff --git a/SimG4CMS/Calo/src/HGCSD.cc b/SimG4CMS/Calo/src/HGCSD.cc index 65f3578a4ae1a..0b847d41358b1 100644 --- a/SimG4CMS/Calo/src/HGCSD.cc +++ b/SimG4CMS/Calo/src/HGCSD.cc @@ -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("HGCSD").getParameter("TimeSliceUnit"), + (float)(p.getParameter("HGCSD").getParameter("TimeSliceUnit")), p.getParameter("HGCSD").getParameter("IgnoreTrackID")), numberingScheme(0) {