Commit in lcdd on MAIN | |||
include/lcdd/core/LCDDParser.hh | +6 | -8 | 1.7 -> 1.8 |
include/lcdd/detectors/GridXYZSegmentation.hh | +6 | -6 | 1.5 -> 1.6 |
/NonprojectiveCylinderSegmentation.hh | +8 | -10 | 1.5 -> 1.6 |
/ProjectiveSegmentation.hh | +3 | -3 | 1.6 -> 1.7 |
/Segmentation.hh | +21 | -21 | 1.7 -> 1.8 |
/SensitiveDetector.hh | +72 | -121 | 1.4 -> 1.5 |
/UnsegmentedCalorimeterSD.hh | +2 | -5 | 1.3 -> 1.4 |
include/lcdd/geant4/PhysVolIdMap.hh | +9 | -7 | 1.6 -> 1.7 |
include/lcdd/hits/CalorimeterHit.hh | +1 | -3 | 1.6 -> 1.7 |
include/lcdd/id/IdFactory.hh | +14 | -11 | 1.4 -> 1.5 |
/IdManager.hh | +2 | -5 | 1.5 -> 1.6 |
src/lcdd/detectors/NonprojectiveCylinderSegmentation.cc | +7 | -1 | 1.3 -> 1.4 |
/SensitiveDetector.cc | +115 | -1 | 1.2 -> 1.3 |
/UnsegmentedCalorimeterSD.cc | +6 | -1 | 1.3 -> 1.4 |
src/lcdd/id/IdManager.cc | +6 | -1 | 1.4 -> 1.5 |
+278 | -204 |
modifications to method access
diff -u -r1.7 -r1.8 --- LCDDParser.hh 10 Jul 2013 20:49:05 -0000 1.7 +++ LCDDParser.hh 10 Jul 2013 22:39:26 -0000 1.8 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/core/LCDDParser.hh,v 1.7 2013/07/10 20:49:05 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/core/LCDDParser.hh,v 1.8 2013/07/10 22:39:26 jeremy Exp $
#ifndef LCDD_CORE_LCDDPARSER_HH #define LCDD_CORE_LCDDPARSER_HH 1
@@ -35,8 +35,6 @@
*/ static LCDDParser* instance();
-public: -
/** * Initialize the parser and build the geometry. * @return The geometry's world volume.
@@ -44,11 +42,6 @@
G4VPhysicalVolume* construct(); /**
- * End of build hook. Calls Finalize method of the SAX processor. - */ - void finalize(); - - /**
* Set the URI of the LCDD or GDML file to build. * @param[in] URI The URI of the LCDD file. */
@@ -95,6 +88,11 @@
private: /**
+ * End of build hook. Calls Finalize method of the SAX processor. + */ + void finalize(); + + /**
* Initialize the XML parser. This is just a wrapped for initializeParser. */ void initialize();
diff -u -r1.5 -r1.6 --- GridXYZSegmentation.hh 10 Jul 2013 18:06:17 -0000 1.5 +++ GridXYZSegmentation.hh 10 Jul 2013 22:39:26 -0000 1.6 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/GridXYZSegmentation.hh,v 1.5 2013/07/10 18:06:17 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/GridXYZSegmentation.hh,v 1.6 2013/07/10 22:39:26 jeremy Exp $
#ifndef LCDD_DETECTORS_G4GRIDXYZSEGMENTATION_HH #define LCDD_DETECTORS_G4GRIDXYZSEGMENTATION_HH 1
@@ -49,11 +49,6 @@
//G4ThreeVector getGlobalHitPosPreStep(const G4StepPoint* aPreStepPoint); /**
- * Set the valid bin names for this Segmentation. - */ - void setBinNames(); - - /**
* Compute the local hit position from a local step position. * @param[in] localStepPos The local step position. * @return The local hit position.
@@ -63,6 +58,11 @@
protected: /**
+ * Set the valid bin names for this Segmentation. + */ + void setBinNames(); + + /**
* Compute X bin value from a local coordinate. * @param[in] localStepPos The local step position. * @return The X bin value.
diff -u -r1.5 -r1.6 --- NonprojectiveCylinderSegmentation.hh 10 Jul 2013 20:49:06 -0000 1.5 +++ NonprojectiveCylinderSegmentation.hh 10 Jul 2013 22:39:26 -0000 1.6 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/NonprojectiveCylinderSegmentation.hh,v 1.5 2013/07/10 20:49:06 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/NonprojectiveCylinderSegmentation.hh,v 1.6 2013/07/10 22:39:26 jeremy Exp $
#ifndef LCDD_DETECTORS_G4NONPROJECTIVECYLINDERSEGMENTATION #define LCDD_DETECTORS_G4NONPROJECTIVECYLINDERSEGMENTATION 1
@@ -54,15 +54,6 @@
*/ //void setBins(const G4StepPoint* aPreStepPoint);
- /** - * Set the valid bin names for this Segmentation. - */ - void setBinNames() - { - addBinName("phi"); - addBinName("z"); - } -
G4ThreeVector getLocalHitPos(const G4Step* aStep); /**
@@ -76,6 +67,13 @@
*/ bool isValidSolid(G4VSolid*);
+protected: + + /** + * Set the valid bin names for this Segmentation. + */ + void setBinNames(); +
private: /**
diff -u -r1.6 -r1.7 --- ProjectiveSegmentation.hh 10 Jul 2013 20:49:06 -0000 1.6 +++ ProjectiveSegmentation.hh 10 Jul 2013 22:39:26 -0000 1.7 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/ProjectiveSegmentation.hh,v 1.6 2013/07/10 20:49:06 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/ProjectiveSegmentation.hh,v 1.7 2013/07/10 22:39:26 jeremy Exp $
#ifndef LCDD_DETECTORS_PROJECTIVESEGMENTATION_HH #define LCDD_DETECTORS_PROJECTIVESEGMENTATION_HH 1
@@ -45,13 +45,13 @@
//G4ThreeVector getGlobalHitPos(const G4StepPoint* aPreStepPoint); //void setBins(const G4StepPoint* aPreStepPoint);
+protected: +
/** * Get the valid bin names for this Segmentation. */ void setBinNames();
-protected: -
/** * Get the number of theta cells. * @return The number of theta cells.
diff -u -r1.7 -r1.8 --- Segmentation.hh 10 Jul 2013 18:06:17 -0000 1.7 +++ Segmentation.hh 10 Jul 2013 22:39:26 -0000 1.8 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/Segmentation.hh,v 1.7 2013/07/10 18:06:17 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/Segmentation.hh,v 1.8 2013/07/10 22:39:26 jeremy Exp $
#ifndef LCDD_DETECTORS_SEGMENTATION_HH #define LCDD_DETECTORS_SEGMENTATION_HH 1
@@ -58,12 +58,6 @@
*/ virtual void setBins(const G4Step* aStep) = 0;
- /** - * Set the valid bin names for this Segmentation. - * @note This should only be called once. - */ - virtual void setBinNames() = 0; -
/* * Check whether the solid is valid for this segmentation. * @return True if solid is valid; false if not.
@@ -110,20 +104,6 @@
const std::string& getBinName(int idx); /**
- * Add a bin name to the end of the list. - * @param[in] The name of the bin. - */ - void addBinName(const std::string& binName); - - /** - * Set the bin value. - * @param[in] binIdx The index of the bin. - * @param[in] binVal The value of the bin. - * @todo Change method name to "setBinValue". - */ - void setBin(int binIdx, int binVal); - - /**
* Get the number of bins defined by this Segmentation. * @return The number of bins. */
@@ -150,6 +130,26 @@
protected: /**
+ * Set the valid bin names for this Segmentation. + * @note This should only be called once. + */ + virtual void setBinNames() = 0; + + /** + * Add a bin name to the end of the list. + * @param[in] The name of the bin. + */ + void addBinName(const std::string& binName); + + /** + * Set the bin value. + * @param[in] binIdx The index of the bin. + * @param[in] binVal The value of the bin. + * @todo Change method name to "setBinValue". + */ + void setBin(int binIdx, int binVal); + + /**
* Print the bin values to an output stream. * @param[in] os The output stream. * @param[in] bins The list of bin values.
diff -u -r1.4 -r1.5 --- SensitiveDetector.hh 10 Jul 2013 18:06:17 -0000 1.4 +++ SensitiveDetector.hh 10 Jul 2013 22:39:26 -0000 1.5 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/SensitiveDetector.hh,v 1.4 2013/07/10 18:06:17 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/detectors/SensitiveDetector.hh,v 1.5 2013/07/10 22:39:26 jeremy Exp $
#ifndef LCDD_DETECTORS_SENSITIVEDETECTOR_HH #define LCDD_DETECTORS_SENSITIVEDETECTOR_HH 1
@@ -21,7 +21,8 @@
* IdSpec,and hits collections. * @todo Move code to source file. */
-class SensitiveDetector: public G4VSensitiveDetector, protected StepReadout {
+class SensitiveDetector: public G4VSensitiveDetector, protected StepReadout +{
public: /**
@@ -37,66 +38,75 @@
public:
+ /** + * Class constructor. + * @param[in] sdName The name of the detector. + * @param[in] hcName The name of the hit collection. + * @param[in] sdType The type of the detector. + */
SensitiveDetector(G4String sdName, G4String hcName, EType sdType);
- SensitiveDetector(G4String sdName, const std::vector<G4String>& hcNames, - EType sdType);
+ /** + * Class constructor. + * @param[in] sdName The name of the detector. + * @param[in] hcNames The names of the hit collections. + * @param[in] sdType The type of the detector. + */ + SensitiveDetector(G4String sdName, const std::vector<G4String>& hcNames, EType sdType);
+ /** + * Class destructor. + */
virtual ~SensitiveDetector(); public: /** * Geant4 initialization function called at beginning of event.
+ * @param[in] hce The hit collections of this event.
*/
- virtual void Initialize(G4HCofThisEvent *);
+ virtual void Initialize(G4HCofThisEvent* hce);
/** * Geant4 EndOfEvent hook.
+ * @param[in] hce The hit collections of this event.
*/
- virtual void EndOfEvent(G4HCofThisEvent *);
+ virtual void EndOfEvent(G4HCofThisEvent* hce);
protected: /** * Geant4 function to make hits from the step.
+ * @param[in] step The G4Step object. + * @param[in] touchable The touchable handle to the current geometry.
*/
- virtual G4bool ProcessHits(G4Step*, G4TouchableHistory*);
+ virtual G4bool ProcessHits(G4Step* step, G4TouchableHistory* touchable);
public: /**
- * Return the type of this detector encoded as an int.
+ * Get the type of this detector encoded as an enum. + * @return The type of this detector as an enum.
*/
- inline SensitiveDetector::EType getType() const { - return _type; - }
+ SensitiveDetector::EType getType() const;
/**
- * Return the type of this detector encoded as a string.
+ * Get the type of this detector encoded as a string.
*/
- inline const std::string& getTypeString() const;
+ const std::string& getTypeString() const;
/**
- * Return the hits collection ID associated with this detector.
+ * Get the hit collection ID associated with this detector.
+ * @return The hit collection ID.
*/
- inline G4int getHCID() const { - return _hcids[0]; - }
+ G4int getHCID() const;
/** * Get the hit collection ID from the index. * @param[in] nHC The hit collection index. * @return The hit collection ID. */
- inline G4int getHCID(G4int nHC) const { - if (nHC > getNumberOfHitsCollections() + 1 || nHC < 0) { - G4cerr << "The index " << nHC << " is not valid for SD " - << this->GetName() << "." << G4endl; - G4Exception("", "", FatalException, "Invalid index."); - } - return _hcids[nHC]; - }
+ G4int getHCID(G4int nHC) const;
/** * Check whether the G4LogicalVolume can be readout by this detector.
@@ -104,115 +114,73 @@
* @param[in] lv The G4LogicalVolume object. * @return True if volume is valid; false if not. */
- inline virtual bool isValidVolume(G4LogicalVolume* lv) - { - return lv != 0; - }
+ virtual bool isValidVolume(G4LogicalVolume* lv);
/** * Get the hit collection name associated with this detector. * @return The name of the hit collection. */
- inline const std::string& getHCName() const - { - return collectionName[0]; - }
+ const std::string& getHCName() const;
/** * Get the hit collection by index. * @return The hit collection by index. */
- inline const std::string& getHCName(G4int nHC) const - { - return collectionName[nHC]; - }
+ const std::string& getHCName(G4int nHC) const;
/** * Set the verbosity level of this detector. * @param[in] v The verbosity level. */
- inline void setVerbose(unsigned int v) - { - _verbose = v; - }
+ void setVerbose(unsigned int v);
/** * Get the verbosity level of this detector. * @return The verbosity level of this detector. */
- inline unsigned int getVerbose() const - { - return _verbose; - }
+ unsigned int getVerbose() const;
/** * Get the hit energy cut of this detector (GeV). * @return The energy cut. */
- inline G4double getEcut() - { - return _ecut; - }
+ G4double getEcut();
/** * Set the hit energy cut of this detector. * @param[in] ecut The energy cut. */
- inline void setEcut(G4double ecut) - { - _ecut = ecut; - }
+ void setEcut(G4double ecut);
/** * Set the identifier specification for this detector. * @param[in] idspec The identifier specification. */
- inline void setIdSpec(IdSpec* idspec) - { - _idspec = idspec; - }
+ void setIdSpec(IdSpec* idspec);
/** * Get the identifier specification for this detector. * @return The identifier specification. */
- inline IdSpec* getIdSpec() const - { - return _idspec; - }
+ IdSpec* getIdSpec() const;
/** * Check whether this detector has an associated identifier specification. * @return True if detector has identifier specification; false if not. */
- inline bool hasIdSpec() const - { - return _idspec != 0; - } - - /** - * Create a 64-bit identifier based on the current step information. - * @return A 64-bit identifier from the current step. - */ - Id64bit makeId() const;
+ bool hasIdSpec() const;
/** * Set the endcap flag. * @param[in] ec Set the endcap flag. */
- inline void setEndcapFlag(bool ec = true) - { - _endcap = ec; - }
+ void setEndcapFlag(bool ec = true);
/** * Get the endcap flag. * @return The flag indicating endcap or not. */
- inline bool getEndcapFlag() - { - return _endcap; - }
+ bool getEndcapFlag();
/** * Print basic information about this detector.
@@ -247,31 +215,13 @@
* @param[in] os The output stream. * @return The same output stream. */
- virtual std::ostream& printHits(std::ostream& os) - { - return os; - } - - /** - * Get the (first) hit collection associated with this detector. - * @return The hit collection associated with this detector. - */ - G4VHitsCollection* getHitsCollection() const; - - /** - * Get a hits collection, using the hits collection ID (HCID). - * @return The hit collection from the HC ID. - */ - G4VHitsCollection* getHitsCollection(G4int) const;
+ virtual std::ostream& printHits(std::ostream& os);
/** * Get the number of hits collections associated to this detector. * @return The number of hit collections. */
- inline int getNumberOfHitsCollections() const - { - return _hcids.size(); - }
+ int getNumberOfHitsCollections() const;
/** * Get the total energy deposition from the hits of this detector.
@@ -279,10 +229,7 @@
* so this function must be implemented by subclasses. * @return The total energy deposition of all the hits. */
- virtual double getEdep() const - { - return 0.0; - }
+ virtual double getEdep() const;
/** * Get a list of G4LogicalVolume objects that have been assigned to this detector.
@@ -294,36 +241,40 @@
* Clear the list of hits after event processing. * @note Sub-classes must implement this method. */
- virtual void clearHits() - { - ; - }
+ virtual void clearHits();
protected: /**
- * Set the Hits Collection ID for a single collection.
+ * Get the (first) hit collection associated with this detector. + * @return The hit collection associated with this detector. + */ + G4VHitsCollection* getHitsCollection() const; + + /** + * Get a hits collection, using the hits collection ID (HCID). + * @return The hit collection from the HC ID. + */ + G4VHitsCollection* getHitsCollection(G4int) const; + + /** + * Create a 64-bit identifier based on the current step information. + * @return A 64-bit identifier from the current step. + */ + Id64bit makeId() const; + + /** + * Set the Hits Collection ID.
* @param[in] The hit collection ID. */
- inline void setHCID(G4int hcid) - { - _hcids[0] = hcid; - }
+ void setHCID(G4int hcid);
/** * Set the Hits Collection ID for a given collection. * @param[in] hcid The hit collection ID. * @param[in] nHC The numerical index of the hit collection. */
- inline void setHCID(G4int hcid, G4int nHC) - { - if ( nHC > getNumberOfHitsCollections() + 1 || nHC < 0) - { - G4cerr << this->GetName() << "setHCID Nr of HC"<< nHC << "not valid"<< G4endl; - G4Exception("", "", FatalException, "Bad HC index."); - } - _hcids[nHC] = hcid; - }
+ void setHCID(G4int hcid, G4int nHC);
protected:
diff -u -r1.3 -r1.4 --- UnsegmentedCalorimeterSD.hh 10 Jul 2013 18:06:17 -0000 1.3 +++ UnsegmentedCalorimeterSD.hh 10 Jul 2013 22:39:26 -0000 1.4 @@ -1,4 +1,4 @@
-// $Id: UnsegmentedCalorimeterSD.hh,v 1.3 2013/07/10 18:06:17 jeremy Exp $
+// $Id: UnsegmentedCalorimeterSD.hh,v 1.4 2013/07/10 22:39:26 jeremy Exp $
#ifndef LCDD_DETECTORS_UNSEGMENTEDCALORIMETERSD_HH #define LCDD_DETECTORS_UNSEGMENTEDCALORIMETERSD_HH 1
@@ -24,10 +24,7 @@
/** * Class destructor. */
- ~UnsegmentedCalorimeterSD() - { - ; - }
+ virtual ~UnsegmentedCalorimeterSD();
protected:
diff -u -r1.6 -r1.7 --- PhysVolIdMap.hh 10 Jul 2013 20:49:06 -0000 1.6 +++ PhysVolIdMap.hh 10 Jul 2013 22:39:26 -0000 1.7 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/geant4/PhysVolIdMap.hh,v 1.6 2013/07/10 20:49:06 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/geant4/PhysVolIdMap.hh,v 1.7 2013/07/10 22:39:26 jeremy Exp $
#ifndef LCDD_GEANT4_PHYSVOLTOIDMAP_HH #define LCDD_GEANT4_PHYSVOLTOIDMAP_HH 1
@@ -44,12 +44,6 @@
void addPhysVolId(G4VPhysicalVolume* pv, PhysVolId id); /**
- * Add an empty ID container for a volume key. - * @param[in] pv The volume key. - */ - void createPhysVolIds(G4VPhysicalVolume* pv); - - /**
* Check whether the volume has a key in the map. * @param[in] pv The G4VPhysicalVolume object. * @return True if the volume has a key; false if not.
@@ -61,6 +55,14 @@
* @return The list of PhysVolId objects associated with the volume key. */ PhysVolId::PhysVolIds& getPhysVolIds(G4VPhysicalVolume* pv);
+ +private: + + /** + * Add an empty ID container for a volume key. + * @param[in] pv The volume key. + */ + void createPhysVolIds(G4VPhysicalVolume* pv);
}; #endif
diff -u -r1.6 -r1.7 --- CalorimeterHit.hh 10 Jul 2013 20:49:06 -0000 1.6 +++ CalorimeterHit.hh 10 Jul 2013 22:39:26 -0000 1.7 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/hits/CalorimeterHit.hh,v 1.6 2013/07/10 20:49:06 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/hits/CalorimeterHit.hh,v 1.7 2013/07/10 22:39:26 jeremy Exp $
#ifndef LCDD_HITS_CALORIMETERHIT_HH #define LCDD_HITS_CALORIMETERHIT_HH 1
@@ -89,8 +89,6 @@
*/ void Print();
-public: -
/** * Operator overloading of stream operator for printing. * @param[in] os The output stream.
diff -u -r1.4 -r1.5 --- IdFactory.hh 10 Jul 2013 18:06:17 -0000 1.4 +++ IdFactory.hh 10 Jul 2013 22:39:26 -0000 1.5 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdFactory.hh,v 1.4 2013/07/10 18:06:17 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdFactory.hh,v 1.5 2013/07/10 22:39:26 jeremy Exp $
#ifndef LCDD_IDFACTORY_HH #define LCDD_IDFACTORY_HH 1
@@ -57,6 +57,16 @@
*/ static Id64bit createId64bit(const IdVec& idvec, IdSpec* idspec);
+ /** + * Create an IdVec ordered by the SD's idspec, or an empty vec if the SD does not have one. + * @param[in] aStep A G4Step object. + * @param[in] sd The SensitiveDetector object. + * @return The vector of ID field values. + */ + static IdVec createOrderedIdVec(G4Step* aStep, const SensitiveDetector* sd); + +private: +
/* * Make bit mask of a certain length. * @param[in] len The length of mask
@@ -70,14 +80,6 @@
static inline Bits checkOverflow(Id64bit::ElementType field_val, Bits mask); /**
- * Create an IdVec ordered by the SD's idspec, or an empty vec if the SD does not have one. - * @param[in] aStep A G4Step object. - * @param[in] sd The SensitiveDetector object. - * @return The vector of ID field values. - */ - static IdVec createOrderedIdVec(G4Step* aStep, const SensitiveDetector* sd); - - /**
* Lookup a bin value by field name in the Segmentation. * @param[in] segmentation The Segmentation object. * @param[in] field_name The name of the field.
@@ -105,14 +107,15 @@
* @param[in] aStep The G4Step object. * @param[out] v The list of IDs to fill. */
- static void addPhysVolIds(G4Step* aStep, IdVec& v);
+ //static void addPhysVolIds(G4Step* aStep, IdVec& v);
/** * Get the list of physical volumes from a step. * @param[in] The G4Step object. * @return The list of physical volumes. */
- static std::vector<G4VPhysicalVolume*> getPhysVolList(G4Step* aStep);
+ //static std::vector<G4VPhysicalVolume*> getPhysVolList(G4Step* aStep);
+
}; #endif
diff -u -r1.5 -r1.6 --- IdManager.hh 10 Jul 2013 20:49:06 -0000 1.5 +++ IdManager.hh 10 Jul 2013 22:39:26 -0000 1.6 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdManager.hh,v 1.5 2013/07/10 20:49:06 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/include/lcdd/id/IdManager.hh,v 1.6 2013/07/10 22:39:26 jeremy Exp $
#ifndef LCDD_IDMANAGER_HH #define LCDD_IDMANAGER_HH 1
@@ -89,10 +89,7 @@
* Get the map of names to IdSpec objects. * @return The IdSpec map. */
- const IdSpecs* getIdSpecStore() - { - return &_idSpecs; - }
+ const IdSpecs* getIdSpecStore();
/** * Add a PhysVolId.
diff -u -r1.3 -r1.4 --- NonprojectiveCylinderSegmentation.cc 10 Jul 2013 22:01:21 -0000 1.3 +++ NonprojectiveCylinderSegmentation.cc 10 Jul 2013 22:39:26 -0000 1.4 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/NonprojectiveCylinderSegmentation.cc,v 1.3 2013/07/10 22:01:21 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/NonprojectiveCylinderSegmentation.cc,v 1.4 2013/07/10 22:39:26 jeremy Exp $
// LCDD #include "lcdd/detectors/NonprojectiveCylinderSegmentation.hh"
@@ -21,6 +21,12 @@
{ }
+void NonprojectiveCylinderSegmentation::setBinNames() +{ + addBinName("phi"); + addBinName("z"); +} +
G4ThreeVector NonprojectiveCylinderSegmentation::getGlobalHitPos(const G4Step* aStep) { // local cell pos
diff -u -r1.2 -r1.3 --- SensitiveDetector.cc 10 Jul 2013 16:49:47 -0000 1.2 +++ SensitiveDetector.cc 10 Jul 2013 22:39:26 -0000 1.3 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/SensitiveDetector.cc,v 1.2 2013/07/10 16:49:47 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/detectors/SensitiveDetector.cc,v 1.3 2013/07/10 22:39:26 jeremy Exp $
// LCDD #include "lcdd/detectors/SensitiveDetector.hh"
@@ -184,3 +184,117 @@
} return os; }
+ +SensitiveDetector::EType SensitiveDetector::getType() const +{ + return _type; +} + +G4int SensitiveDetector::getHCID() const +{ + return _hcids[0]; +} + +G4int SensitiveDetector::getHCID(G4int nHC) const +{ + if (nHC > getNumberOfHitsCollections() + 1 || nHC < 0) { + G4cerr << "The index " << nHC << " is not valid for SD " + << this->GetName() << "." << G4endl; + G4Exception("", "", FatalException, "Invalid index."); + } + return _hcids[nHC]; +} + + +bool SensitiveDetector::isValidVolume(G4LogicalVolume* lv) +{ + return lv != 0; +} + +const std::string& SensitiveDetector::getHCName() const +{ + return collectionName[0]; +} + +const std::string& SensitiveDetector::getHCName(G4int nHC) const +{ + return collectionName[nHC]; +} + +void SensitiveDetector::setVerbose(unsigned int v) +{ + _verbose = v; +} + +unsigned int SensitiveDetector::getVerbose() const +{ + return _verbose; +} + +G4double SensitiveDetector::getEcut() +{ + return _ecut; +} + +void SensitiveDetector::setEcut(G4double ecut) +{ + _ecut = ecut; +} + +void SensitiveDetector::setIdSpec(IdSpec* idspec) +{ + _idspec = idspec; +} + +IdSpec* SensitiveDetector::getIdSpec() const +{ + return _idspec; +} + +bool SensitiveDetector::hasIdSpec() const +{ + return _idspec != 0; +} + +void SensitiveDetector::setEndcapFlag(bool ec) +{ + _endcap = ec; +} + +bool SensitiveDetector::getEndcapFlag() +{ + return _endcap; +} + +std::ostream& printHits(std::ostream& os) +{ + return os; +} + +void SensitiveDetector::clearHits() +{ +} + +int SensitiveDetector::getNumberOfHitsCollections() const +{ + return _hcids.size(); +} + +double SensitiveDetector::getEdep() const +{ + return 0.0; +} + +void SensitiveDetector::setHCID(G4int hcid) +{ + _hcids[0] = hcid; +} + +void SensitiveDetector::setHCID(G4int hcid, G4int nHC) +{ + if (nHC > getNumberOfHitsCollections() + 1 || nHC < 0) { + G4cerr << this->GetName() << "setHCID Nr of HC" << nHC << "not valid" << G4endl; + G4Exception("", "", FatalException, "Bad HC index."); + } + _hcids[nHC] = hcid; +}
diff -u -r1.3 -r1.4 --- UnsegmentedCalorimeterSD.cc 10 Jul 2013 16:49:47 -0000 1.3 +++ UnsegmentedCalorimeterSD.cc 10 Jul 2013 22:39:26 -0000 1.4 @@ -1,4 +1,4 @@
-// $Id: UnsegmentedCalorimeterSD.cc,v 1.3 2013/07/10 16:49:47 jeremy Exp $
+// $Id: UnsegmentedCalorimeterSD.cc,v 1.4 2013/07/10 22:39:26 jeremy Exp $
// LCDD #include "lcdd/detectors/UnsegmentedCalorimeterSD.hh"
@@ -8,6 +8,10 @@
{ }
+UnsegmentedCalorimeterSD::~UnsegmentedCalorimeterSD() +{ +} +
G4bool UnsegmentedCalorimeterSD::ProcessHits(G4Step* aStep, G4TouchableHistory*) { #ifdef G4VERBOSE
@@ -67,3 +71,4 @@
/* Success. */ return true; }
+
diff -u -r1.4 -r1.5 --- IdManager.cc 10 Jul 2013 22:01:21 -0000 1.4 +++ IdManager.cc 10 Jul 2013 22:39:27 -0000 1.5 @@ -1,4 +1,4 @@
-// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdManager.cc,v 1.4 2013/07/10 22:01:21 jeremy Exp $
+// $Header: /cvs/lcd/lcdd/src/lcdd/id/IdManager.cc,v 1.5 2013/07/10 22:39:27 jeremy Exp $
// LCDD #include "lcdd/id/IdManager.hh"
@@ -101,3 +101,8 @@
{ return _physVolIdMap.getPhysVolIds(pv); }
+ +const IdManager::IdSpecs* IdManager::getIdSpecStore() +{ + return &_idSpecs; +}
Use REPLY-ALL to reply to list
To unsubscribe from the LCD-CVS list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=LCD-CVS&A=1