47 #include <G4String.hh>
62 vetoCounterEDLeft( 0 ), vetoCounterEDRight( 0 ),
63 calorimeterEDLeft( 0 ), calorimeterEDRight( 0 ),
64 calorimeterEDLeftMaxX( 0 ), calorimeterEDLeftMaxY( 0 ),
65 calorimeterEDRightMaxX( 0 ), calorimeterEDRightMaxY( 0 ),
66 monitorHasTriggered( false ), hasTriggered( false ),
67 monitorEDThreshold( 0 ),
68 vetoCounterEDLeftThreshold( 0 ), vetoCounterEDRightThreshold( 0 ),
69 calorimeterEDLeftThreshold( 0 ), calorimeterEDRightThreshold( 0 ),
72 outerCrystalsVetoFraction( 0 ), monitorEDThresholdRef( 0 ),
73 vetoCounterEDLeftThresholdRef( 0 ), vetoCounterEDRightThresholdRef( 0 ),
74 calorimeterEDLeftThresholdRef( 0 ), calorimeterEDRightThresholdRef( 0 ),
77 outerCrystalsVetoFractionRef( 0 ), nCrystalsInColumn( 1 ),
78 nCrystalsInRow( 1 ), applyFiniteCrystalResolution( false ),
82 const CexmcSetup * setup( static_cast< const CexmcSetup * >(
90 if ( nCrystalsInColumn > 0 )
98 for ( CexmcEnergyDepositCalorimeterCollection::iterator
104 for ( CexmcEnergyDepositCalorimeterCollection::iterator
136 for ( CexmcEnergyDepositCalorimeterCollection::iterator
140 for ( CexmcEnergyDepositCrystalRowCollection::iterator
141 l( k->begin() ); l != k->end(); ++l )
146 for ( CexmcEnergyDepositCalorimeterCollection::iterator
150 for ( CexmcEnergyDepositCrystalRowCollection::iterator
151 l( k->begin() ); l != k->end(); ++l )
168 hitsCollection( static_cast< const CexmcEnergyDepositCollection * >(
171 if ( hitsCollection )
174 if ( ( *hitsCollection )[ 0 ] )
183 if ( hitsCollection )
185 for ( CexmcEnergyDepositCollectionData::iterator
186 k( hitsCollection->GetMap()->begin() );
187 k != hitsCollection->GetMap()->end(); ++k )
189 G4int index( k->first );
221 if ( hitsCollection )
223 for ( CexmcEnergyDepositCollectionData::iterator
224 k( hitsCollection->GetMap()->begin() );
225 k != hitsCollection->GetMap()->end(); ++k )
227 G4int index( k->first );
237 for ( CexmcEnergyRangeWithDoubleValueList::const_iterator
253 if ( value > maxEDCrystalLeft )
257 maxEDCrystalLeft =
value;
261 outerCrystalsEDLeft +=
value;
265 innerCrystalsEDLeft +=
value;
271 if ( value > maxEDCrystalRight )
275 maxEDCrystalRight =
value;
279 outerCrystalsEDRight +=
value;
283 innerCrystalsEDRight +=
value;
300 calorimeterEDLeftEffective = innerCrystalsEDLeft;
301 calorimeterEDRightEffective = innerCrystalsEDRight;
343 std::streamsize
prec( out.precision() );
348 for ( CexmcEnergyDepositCalorimeterCollection::const_reverse_iterator
349 k( edCollection.rbegin() ); k != edCollection.rend(); ++k )
351 for ( CexmcEnergyDepositCrystalRowCollection::const_reverse_iterator
352 l( k->rbegin() ); l != k->rend(); ++l )
353 out << std::setw( 10 ) << *l;
357 out.precision(
prec );
static G4DigiManager * GetDMpointer()
static G4RunManager * GetRunManager()
G4bool monitorHasTriggered
G4bool IsOuterCrystal(G4int column, G4int row) const
const G4String CexmcDetectorRoleName[CexmcNumberOfDetectorRoles]
G4double vetoCounterEDLeftThreshold
G4int calorimeterEDLeftMaxY
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
static G4int GetColumn(G4int index)
CexmcCalorimeterTriggerAlgorithm calorimeterTriggerAlgorithm
CexmcEnergyDepositCalorimeterCollection calorimeterEDRightCollection
~CexmcEnergyDepositDigitizer()
const G4String CexmcDetectorTypeName[CexmcNumberOfDetectorTypes]
const G4VHitsCollection * GetHitsCollection(G4int HCID, G4int eventID=0)
static CexmcSide GetSide(G4int index)
CexmcEnergyRangeWithDoubleValueList crystalResolutionData
void InitializeData(void)
G4int calorimeterEDRightMaxY
G4double vetoCounterEDRight
G4int calorimeterEDLeftMaxX
G4int calorimeterEDRightMaxX
std::vector< CexmcEnergyDepositCrystalRowCollection > CexmcEnergyDepositCalorimeterCollection
const XML_Char int const XML_Char * value
G4double calorimeterEDRightThreshold
CexmcOuterCrystalsVetoAlgorithm outerCrystalsVetoAlgorithm
static G4int GetRow(G4int index)
const CalorimeterGeometryData & GetCalorimeterGeometry(void) const
G4bool ProjectIsRead(void) const
G4double monitorEDThreshold
G4double calorimeterEDLeftThreshold
G4double outerCrystalsVetoFraction
ThreeVector shoot(const G4int Ap, const G4int Af)
G4double vetoCounterEDRightThreshold
G4double calorimeterEDRight
CexmcEnergyDepositDigitizerMessenger * messenger
G4double calorimeterEDLeft
G4int GetHitsCollectionID(G4String HCname)
G4double vetoCounterEDLeft
CexmcEnergyDepositDigitizer(const G4String &name)
const G4double CexmcFwhmToStddev(0.42466)
CexmcEnergyDepositCalorimeterCollection calorimeterEDLeftCollection
G4bool applyFiniteCrystalResolution
const G4VUserDetectorConstruction * GetUserDetectorConstruction() const