ATLAS Offline Software
Loading...
Searching...
No Matches
PixelFastDigitizationTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3*/
4
6// PixelFastDigitizationTool.cxx
7// Implementation file for class PixelFastDigitizationTool
9
10// Pixel digitization includes
12#include "PixelConditionsData/ChargeCalibParameters.h" //for Thresholds
13
14// Det Descr
15#include "Identifier/Identifier.h"
16
22
23// Random numbers
25#include "CLHEP/Random/RandGaussZiggurat.h"
26#include "CLHEP/Random/RandFlat.h"
27#include "CLHEP/Random/RandLandau.h"
28
29// Pile-up
30
32
33// Fatras
42
45
46//Package For New Tracking:
47// Amg includes
50// Trk includes
51
54
60
61
62using namespace InDetDD;
63using namespace InDet;
64
65// Constructor with parameters:
66PixelFastDigitizationTool::PixelFastDigitizationTool(const std::string &type, const std::string &name,
67 const IInterface* parent):
68
69 PileUpToolBase(type, name, parent)
70{
71}
72
78
79// Initialize method:
81{
82
83 ATH_MSG_DEBUG ( "PixelDigitizationTool::initialize()" );
84
85 ATH_CHECK(m_pixelReadout.retrieve());
86 ATH_CHECK(m_chargeDataKey.initialize());
87 ATH_CHECK(m_offlineCalibDataKey.initialize());
88 ATH_CHECK(m_pixelDetEleCollKey.initialize());
89
90 //locate the AtRndmGenSvc and initialize our local ptr
91 if (!m_rndmSvc.retrieve().isSuccess())
92 {
93 ATH_MSG_ERROR ( "Could not find given RndmSvc" );
94 return StatusCode::FAILURE;
95 }
96
97 if (detStore()->retrieve(m_pixel_ID, "PixelID").isFailure()) {
98 ATH_MSG_ERROR ( "Could not get Pixel ID helper" );
99 return StatusCode::FAILURE;
100 }
101
102 if (m_inputObjectName.empty())
103 {
104 ATH_MSG_FATAL ( "Property InputObjectName not set !" );
105 return StatusCode::FAILURE;
106 }
107 else
108 {
109 ATH_MSG_DEBUG ( "Input objects: '" << m_inputObjectName << "'" );
110 }
111
112 // retrieve the offline cluster maker : for pixel and/or sct
114 if (m_clusterMaker.retrieve().isFailure()){
115 ATH_MSG_WARNING( "Could not retrieve " << m_clusterMaker );
116 ATH_MSG_WARNING( "-> Switching to simplified cluster creation!" );
117 m_pixUseClusterMaker = false;
118 m_clusterMaker.disable();
119 }
120 } else {
121 m_clusterMaker.disable();
122 }
123
125 ATH_CHECK(m_distortionKey.initialize());
126 }
127
128 //locate the PileUpMergeSvc and initialize our local ptr
129 if (!m_mergeSvc.retrieve().isSuccess()) {
130 ATH_MSG_ERROR ( "Could not find PileUpMergeSvc" );
131 return StatusCode::FAILURE;
132 }
133
134
135 // get the InDet::PixelGangedAmbiguitiesFinder
136 if ( m_gangedAmbiguitiesFinder.retrieve().isFailure() ) {
137 ATH_MSG_FATAL( m_gangedAmbiguitiesFinder.propertyName() << ": Failed to retrieve tool " << m_gangedAmbiguitiesFinder.type() );
138 return StatusCode::FAILURE;
139 } else {
140 ATH_MSG_DEBUG ( m_gangedAmbiguitiesFinder.propertyName() << ": Retrieved tool " << m_gangedAmbiguitiesFinder.type() );
141 }
142
143 ATH_CHECK(m_lorentzAngleTool.retrieve());
144
145 return StatusCode::SUCCESS;
146}
147
148
149
150StatusCode PixelFastDigitizationTool::prepareEvent(const EventContext& /*ctx*/, unsigned int)
151{
152
153 m_siHitCollList.clear();
156 return StatusCode::SUCCESS;
157}
158
159
161 SubEventIterator bSubEvents,
162 SubEventIterator eSubEvents)
163{
164 //decide if this event will be processed depending on HardScatterSplittingMode & bunchXing
165 if (m_HardScatterSplittingMode == 2 && !m_HardScatterSplittingSkipper ) { m_HardScatterSplittingSkipper = true; return StatusCode::SUCCESS; }
166 if (m_HardScatterSplittingMode == 1 && m_HardScatterSplittingSkipper ) { return StatusCode::SUCCESS; }
168
170 TimedHitCollList hitCollList;
171
172 if (!(m_mergeSvc->retrieveSubSetEvtData(m_inputObjectName.value(), hitCollList, bunchXing,
173 bSubEvents, eSubEvents).isSuccess()) &&
174 hitCollList.empty()) {
175 ATH_MSG_ERROR("Could not fill TimedHitCollList");
176 return StatusCode::FAILURE;
177 } else {
178 ATH_MSG_VERBOSE(hitCollList.size() << " SiHitCollections with key " <<
179 m_inputObjectName << " found");
180 }
181
182 TimedHitCollList::iterator iColl(hitCollList.begin());
183 TimedHitCollList::iterator endColl(hitCollList.end());
184
185 for( ; iColl != endColl; ++iColl) {
186 SiHitCollection *siHitColl = new SiHitCollection(*iColl->second);
187 PileUpTimeEventIndex timeIndex(iColl->first);
188 ATH_MSG_DEBUG("SiHitCollection found with " << siHitColl->size() <<
189 " hits");
190 ATH_MSG_VERBOSE("time index info. time: " << timeIndex.time()
191 << " index: " << timeIndex.index()
192 << " type: " << timeIndex.type());
193 m_thpcsi->insert(timeIndex, siHitColl);
194 m_siHitCollList.push_back(siHitColl);
195 }
196
197 return StatusCode::SUCCESS;
198}
199
200
201StatusCode PixelFastDigitizationTool::processAllSubEvents(const EventContext& ctx) {
202
203 m_pixelClusterContainer = new InDet::PixelClusterContainer(m_pixel_ID->wafer_hash_max());
204
206 ATH_MSG_FATAL( "[ --- ] Could not create PixelClusterContainer");
207 return StatusCode::FAILURE;
208 }
209
210 InDet::SiClusterContainer* symSiContainer=nullptr;
211
212 // --------------------------------------
213 // Pixel Cluster container registration
214 m_pixelClusterContainer->cleanup();
215 if ((evtStore()->record(m_pixelClusterContainer, m_pixel_SiClustersName)).isFailure()) {
216 ATH_MSG_FATAL("[ hitproc ] Error while registering PixelCluster container");
217 return StatusCode::FAILURE;
218 }
219
220 // symlink the Pixel Cluster Container
221 if ((evtStore()->symLink(m_pixelClusterContainer,symSiContainer)).isFailure()) {
222 ATH_MSG_FATAL( "[ --- ] PixelClusterContainer could not be symlinked to SiClusterContainter in StoreGate !" );
223 return StatusCode::FAILURE;
224 } else {
225 ATH_MSG_DEBUG( "[ hitproc ] PixelClusterContainer symlinked to SiClusterContainer in StoreGate" );
226 }
227
228 // truth info
229
231
233 if((evtStore()->retrieve(m_pixPrdTruth, m_prdTruthNamePixel)).isFailure()){
234 ATH_MSG_FATAL("Could not retrieve collection " << m_prdTruthNamePixel);
235 return StatusCode::FAILURE;
236 }
237 }else{
238 if((evtStore()->record(m_pixPrdTruth, m_prdTruthNamePixel)).isFailure()){
239 ATH_MSG_FATAL("Could not record collection " << m_prdTruthNamePixel);
240 return StatusCode::FAILURE;
241 }
242 }
243
244
245 m_ambiguitiesMap =new PixelGangedClusterAmbiguities();
246
247
248 // get the container(s)
250
251 //this is a list<pair<time_t, DataLink<SCTUncompressedHitCollection> > >
252 TimedHitCollList hitCollList;
253 unsigned int numberOfSimHits(0);
254 if ( !(m_mergeSvc->retrieveSubEvtsData(m_inputObjectName.value(), hitCollList, numberOfSimHits).isSuccess()) && hitCollList.empty() ) {
255 ATH_MSG_ERROR ( "Could not fill TimedHitCollList" );
256 return StatusCode::FAILURE;
257 } else {
258 ATH_MSG_DEBUG ( hitCollList.size() << " SiHitCollections with key " << m_inputObjectName << " found" );
259 }
260
261 // Define Hit Collection
262 TimedHitCollection<SiHit> thpcsi(numberOfSimHits);
263
264 //now merge all collections into one
265 TimedHitCollList::iterator iColl(hitCollList.begin());
266 TimedHitCollList::iterator endColl(hitCollList.end() );
267
269 // loop on the hit collections
270 while ( iColl != endColl ) {
271 //decide if this event will be processed depending on HardScatterSplittingMode & bunchXing
273 if (m_HardScatterSplittingMode == 1 && m_HardScatterSplittingSkipper ) { ++iColl; continue; }
275 const SiHitCollection* p_collection(iColl->second);
276 thpcsi.insert(iColl->first, p_collection);
277 ATH_MSG_DEBUG ( "SiHitCollection found with " << p_collection->size() << " hits" );
278 ++iColl;
279 }
280
281 // Process the Hits straw by straw: get the iterator pairs for given straw
282 if(this->digitize(ctx, thpcsi).isFailure()) {
283 ATH_MSG_FATAL ( "digitize method failed!" );
284 return StatusCode::FAILURE;
285 }
286
287 if (createAndStoreRIOs(ctx).isFailure()) {
288 ATH_MSG_FATAL ( "createAndStoreRIOs() failed!" );
289 return StatusCode::FAILURE;
290 }
291 else {
292 ATH_MSG_DEBUG ( "createAndStoreRIOs() succeeded" );
293 }
294
295
296 if ((evtStore()->setConst(m_pixelClusterContainer)).isFailure()) {
297 ATH_MSG_ERROR("[ ---- ] Could not set Pixel ROT container ");
298 }
299 ATH_MSG_DEBUG ("Ambiguities map has " << m_ambiguitiesMap->size() << " elements" );
300 StatusCode sc = evtStore()->record(m_ambiguitiesMap,m_pixelClusterAmbiguitiesMapName,false);
301 if (sc.isFailure()){
302 ATH_MSG_FATAL ( "PixelClusterAmbiguitiesMap could not be recorded in StoreGate !" );
303 return StatusCode::FAILURE;
304 }else{
305 ATH_MSG_DEBUG ( "PixelClusterAmbiguitiesMap recorded in StoreGate" );
306 }
307
308
309
310
311 return StatusCode::SUCCESS;
312
313}
314
315
316
317StatusCode PixelFastDigitizationTool::mergeEvent(const EventContext& ctx)
318{
319
320 m_pixelClusterContainer = new InDet::PixelClusterContainer(m_pixel_ID->wafer_hash_max());
321
323 ATH_MSG_FATAL( "[ --- ] Could not create PixelClusterContainer");
324 return StatusCode::FAILURE;
325 }
326
327 InDet::SiClusterContainer* symSiContainer=nullptr;
328
329 // --------------------------------------
330 // Pixel_Cluster container registration
331 m_pixelClusterContainer->cleanup();
332 if ((evtStore()->record(m_pixelClusterContainer, "PixelClusters")).isFailure()) {
333 ATH_MSG_FATAL("[ hitproc ] Error while registering PixelCluster container");
334 return StatusCode::FAILURE;
335 }
336
337 // symlink the SCT Container
338 if ((evtStore()->symLink(m_pixelClusterContainer,symSiContainer)).isFailure()) {
339 ATH_MSG_FATAL( "[ --- ] PixelClusterContainer could not be symlinked to SiClusterContainter in StoreGate !" );
340 return StatusCode::FAILURE;
341 } else {
342 ATH_MSG_DEBUG( "[ hitproc ] PixelClusterContainer symlinked to SiClusterContainer in StoreGate" );
343 }
344
345 // truth info
347
349 if((evtStore()->retrieve(m_pixPrdTruth, m_prdTruthNamePixel)).isFailure()){
350 ATH_MSG_FATAL("Could not retrieve collection " << m_prdTruthNamePixel);
351 return StatusCode::FAILURE;
352 }
353 }else{
354 if((evtStore()->record(m_pixPrdTruth, m_prdTruthNamePixel)).isFailure()){
355 ATH_MSG_FATAL("Could not record collection " << m_prdTruthNamePixel);
356 return StatusCode::FAILURE;
357 }
358 }
359
360 m_ambiguitiesMap =new PixelGangedClusterAmbiguities();
361
362 if (m_thpcsi != nullptr) {
363 if(digitize(ctx, *m_thpcsi).isFailure()) {
364 ATH_MSG_FATAL ( "Pixel digitize method failed!" );
365 return StatusCode::FAILURE;
366 }
367 }
368
369 delete m_thpcsi;
370 for(SiHitCollection* ptr : m_siHitCollList) delete ptr;
371 m_siHitCollList.clear();
372
373
374 if (createAndStoreRIOs(ctx).isFailure()) {
375 ATH_MSG_FATAL ( "createAndStoreRIOs() failed!" );
376 return StatusCode::FAILURE;
377 }
378 else {
379 ATH_MSG_DEBUG ( "createAndStoreRIOs() succeeded" );
380 }
381
382 if ((evtStore()->setConst(m_pixelClusterContainer)).isFailure()) {
383 ATH_MSG_ERROR("[ ---- ] Could not set Pixel ROT container ");
384 }
385 ATH_MSG_DEBUG ("Ambiguities map has " << m_ambiguitiesMap->size() << " elements" );
386 StatusCode sc = evtStore()->record(m_ambiguitiesMap,m_pixelClusterAmbiguitiesMapName,false);
387 if (sc.isFailure()){
388 ATH_MSG_FATAL ( "PixelClusterAmbiguitiesMap could not be recorded in StoreGate !" );
389 return StatusCode::FAILURE;
390 }else{
391 ATH_MSG_DEBUG ( "PixelClusterAmbiguitiesMap recorded in StoreGate" );
392 }
393
394
395
396 return StatusCode::SUCCESS;
397}
398
399
400StatusCode PixelFastDigitizationTool::digitize(const EventContext& ctx,
402{
403 // Set the RNG to use for this event.
404 ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this, m_randomEngineName);
405 const std::string rngName = name()+m_randomEngineName;
406 rngWrapper->setSeed( rngName, ctx );
407 CLHEP::HepRandomEngine *rndmEngine = rngWrapper->getEngine(ctx);
408
410 const InDetDD::SiDetectorElementCollection* elements(*pixelDetEleHandle);
411 if (not pixelDetEleHandle.isValid() or elements==nullptr) {
412 ATH_MSG_FATAL(m_pixelDetEleCollKey.fullKey() << " is not available.");
413 return StatusCode::FAILURE;
414 }
415
417
419 else { m_pixelClusterMap->clear(); }
420
422 const PixelChargeCalibCondData *calibData = *calibDataHandle;
424 std::vector<int> truthIdList;
425 std::vector<Identifier> detEl;
426
427 while (thpcsi.nextDetectorElement(i, e)) {
428
429 Pixel_detElement_RIO_map PixelDetElClusterMap;
430
431 truthIdList.clear();
432 detEl.clear();
433
434 while (i != e) {
435
436 const TimedHitPtr<SiHit>& hit(*i++);
437 // check the status of truth information for this SiHit
438 // some Truth information is cut for pile up events
439 const HepMcParticleLink currentLink = HepMcParticleLink::getRedirectedLink(hit->particleLink(), hit.eventId(), ctx); // This link should now correctly resolve to the TruthEvent McEventCollection in the main StoreGateSvc.
440 const int barrelEC = hit->getBarrelEndcap();
441 const int layerDisk = hit->getLayerDisk();
442 const int phiModule = hit->getPhiModule();
443 const int etaModule = hit->getEtaModule();
444
445 const Identifier moduleID = m_pixel_ID->wafer_id(barrelEC, layerDisk, phiModule, etaModule);
446 const IdentifierHash waferHash = m_pixel_ID->wafer_hash(moduleID);
447 const InDetDD::SiDetectorElement* hitSiDetElement = elements->getDetectorElement(waferHash);
448 if (!hitSiDetElement) {ATH_MSG_ERROR( " could not get detector element "); continue;}
449
450 if (!(hitSiDetElement->isPixel())) {continue;}
451
452
453
454 std::vector<HepMcParticleLink> hit_vector; //Store the hits in merged cluster
455
456 const int truthID = (currentLink.barcode() !=0 && currentLink.id() == 0) ? 3 : currentLink.id(); // FIXME barcode-based Patch for reading in legacy barcode-based EDM - if the barcode is non-zero, but the id is zero then we must be looking at a particle linked to suppressed pile-up truth - such SiHits would be linked to the third GenParticle in their GenEvents (if they were present)
457
458 const Identifier hitId = hitSiDetElement->identify(); // Isn't this is identical to moduleID?
459 //const IdentifierHash hitIdHash = hitSiDetElement->identifyHash();
460
461
462 bool isRep = false;
463
464 for (int j : truthIdList) {
465 for (auto & k : detEl) {
466 if ((truthID > 0) && (truthID == j) && (hitId == k)) {isRep = true; break;}
467 }
468 if (isRep) break;
469 }
470
471 if (isRep) continue;
472
473 truthIdList.push_back(truthID);
474 detEl.push_back(hitId);
475
476 HepGeom::Point3D<double> localStartPosition = hit->localStartPosition();
477 HepGeom::Point3D<double> localEndPosition = hit->localEndPosition();
478
479 localStartPosition = hitSiDetElement->hitLocalToLocal3D(localStartPosition);
480 localEndPosition = hitSiDetElement->hitLocalToLocal3D(localEndPosition);
481
482 int isEndcap = (barrelEC==0) ? 0:1;
483
484 double shiftX = isEndcap ? m_pixDiffShiftEndCX : m_pixDiffShiftBarrX;
485 double shiftY = isEndcap ? m_pixDiffShiftEndCY : m_pixDiffShiftBarrY;
486
487 // std::cout<<"Thr "<<m_ThrConverted<<std::endl;
488
489 //New function to tune the cluster size
490 Diffuse(localStartPosition, localEndPosition, shiftX, shiftY);
491
492 const Amg::Vector3D localDirection(localEndPosition.x()-localStartPosition.x(), localEndPosition.y()-localStartPosition.y(), localEndPosition.z()-localStartPosition.z());
493
494 Amg::Vector3D entryPoint(localStartPosition.x(),localStartPosition.y(),localStartPosition.z());
495 Amg::Vector3D exitPoint(localEndPosition.x(),localEndPosition.y(),localEndPosition.z());
496
497 const InDetDD::PixelModuleDesign* design(dynamic_cast<const InDetDD::PixelModuleDesign*>(&hitSiDetElement->design()));
498 if (not design){
499 ATH_MSG_FATAL("Failed to cast the hitSiDetElement::design pointer to a PixelModuleDesign*; aborting due to null pointer");
500 return StatusCode::FAILURE;
501 }
502 const Amg::Vector2D localEntry(localStartPosition.x(),localStartPosition.y());
503 const Amg::Vector2D localExit(localEndPosition.x(),localEndPosition.y());
504
505 Identifier entryId = hitSiDetElement->identifierOfPosition(localEntry);
506 Identifier exitId = hitSiDetElement->identifierOfPosition(localExit);
507
508 InDetDD::SiCellId entryCellId = hitSiDetElement->cellIdFromIdentifier(entryId);
509 InDetDD::SiCellId exitCellId = hitSiDetElement->cellIdFromIdentifier(exitId);
510
511 double halfthickness = hitSiDetElement->thickness()*0.5;
512
513 bool EntryValid(entryCellId.isValid());
514 bool ExitValid(exitCellId.isValid());
515
516 double pixMinimalPathCut= 1. / m_pixPathLengthTotConv;
517
518 Identifier diodeID = hitId;
519 unsigned int FE = m_pixelReadout->getFE(diodeID, moduleID);
520 InDetDD::PixelDiodeType type = m_pixelReadout->getDiodeType(diodeID);
521
522 double th0 = calibData->getThresholds(type, waferHash, FE).value/ m_ThrConverted;
523
524 // if (old_th != th0) std::cout<<"converted threshold "<<th0<<std::endl, old_th= th0;
525
526 //Avoid to store pixels with 0 ToT
527 //if (m_pixMinimalPathCut > pixMinimalPathCut) pixMinimalPathCut=m_pixMinimalPathCut;
528 //if (th0 > pixMinimalPathCut) ;
529 pixMinimalPathCut=th0;
530
531 if (!EntryValid || !ExitValid)
532 {
533 //If entry or exit aren't valid search for the valid entry/exit of the hit as Intersection with the module
534
535 if ( !EntryValid && !ExitValid) continue;
536
537 Amg::Vector3D Point = EntryValid ? entryPoint : exitPoint ;
538
539 Amg::Vector3D Intersection = CalculateIntersection(Point, localDirection, Amg::Vector2D(design->width() * 0.5,design->length() * 0.5),halfthickness);
540
541 if( Intersection == Amg::Vector3D(0.,0.,0.))
542 {
543 ATH_MSG_WARNING("ATTENTION THE INTERSECTION COORDINATE IS OUT OF THE MODULE");
544 continue;
545 }
546
547 const Amg::Vector2D Intersection_2d(Intersection.x(),Intersection.y());
548 Identifier Intersection_2dId = hitSiDetElement->identifierOfPosition(Intersection_2d);
549
550 InDetDD::SiCellId Intersection_2dCellId = hitSiDetElement->cellIdFromIdentifier(Intersection_2dId);
551
552
553 if(!Intersection_2dCellId.isValid()) continue;
554
555 if(EntryValid)
556 exitPoint = Intersection;
557 else
558 entryPoint = Intersection;
559
560
561 }
562
563
564
565 Trk::DigitizationModule * digitizationModule = buildDetectorModule(hitSiDetElement);
566 if(!digitizationModule){
567 ATH_MSG_FATAL( " could not get build detector module ");
568 return StatusCode::FAILURE;
569 }
570
571 // Getting the steps in the sensor
572 std::vector<Trk::DigitizationStep> digitizationSteps = m_digitizationStepper->cellSteps(*digitizationModule,entryPoint,exitPoint);
573
574
575
576 // the pixel positions and other needed stuff for the geometrical clustering
577 std::unique_ptr<InDet::PixelCluster> pixelCluster = nullptr;
578 Amg::Vector2D clusterPosition(0.,0.);
579
580 std::vector<Identifier> rdoList;
581 std::vector<int> totList;
582
583 const bool isGanged = false;
584 int lvl1a = 0;
585
586 double accumulatedPathLength=0.;
587
588 //ATTENTION index max e min da rdo + manager
589 int phiIndexMax = -999999;
590 int phiIndexMin = 1000000;
591 int etaIndexMax = -999999;
592 int etaIndexMin = 1000000;
593
594
595 for (auto& dStep : digitizationSteps){
596
597 double pathlength = dStep.stepLength;
598 // two options fro charge smearing: landau / gauss
599 if ( m_pixSmearPathLength > 0. ) {
600 // create the smdar parameter
601 double sPar = m_pixSmearLandau ?
602 m_pixSmearPathLength*CLHEP::RandLandau::shoot(rndmEngine) :
603 m_pixSmearPathLength*CLHEP::RandGaussZiggurat::shoot(rndmEngine);
604 pathlength *= (1.+sPar);
605 }
606
607
608 if (pathlength < pixMinimalPathCut) continue;
609
610 // position on the diode map
611 Trk::DigitizationCell cell(dStep.stepCell.first,dStep.stepCell.second);
612 Amg::Vector2D PositionOnModule = digitizationModule->segmentation().cellPosition(cell);
613 InDetDD::SiCellId diode = hitSiDetElement->cellIdOfPosition(PositionOnModule);
614
615
616 if (!diode.isValid())
617 continue;
618
619 Amg::Vector2D chargeCenterPosition = hitSiDetElement->rawLocalPositionOfCell(diode);
620
621 const Identifier rdoId = hitSiDetElement->identifierOfPosition(chargeCenterPosition);
622 clusterPosition += pathlength * chargeCenterPosition;
623
624 int currentEtaIndex = diode.etaIndex();
625 int currentPhiIndex = diode.phiIndex();
626 if(currentEtaIndex > etaIndexMax) etaIndexMax = currentEtaIndex;
627 if(currentEtaIndex < etaIndexMin) etaIndexMin = currentEtaIndex;
628 if(currentPhiIndex > phiIndexMax) phiIndexMax = currentPhiIndex;
629 if(currentPhiIndex < phiIndexMin) phiIndexMin = currentPhiIndex;
630
631
632 // record - positions, rdoList and totList
633 accumulatedPathLength += pathlength;
634 //Fail
635 rdoList.push_back(rdoId);
636 totList.push_back(int(pathlength*m_pixPathLengthTotConv));
637
638 }
639
640 delete digitizationModule;
641
642 // the col/row
643 int siDeltaPhiCut = phiIndexMax-phiIndexMin+1;
644 int siDeltaEtaCut = etaIndexMax-etaIndexMin+1;
645
646 int totalToT=std::accumulate(totList.begin(), totList.end(), 0);;
647
648 // bail out if 0 pixel or path length problem
649 if (rdoList.empty() || accumulatedPathLength < pixMinimalPathCut || totalToT == 0) {
650 if (totalToT == 0 && !rdoList.empty() ) ATH_MSG_WARNING("The total ToT of the cluster is 0, this should never happen");
651 continue;
652 }
653
654 // weight the cluster position
655 //accumulatedPathLength was checked in previous lines
656 //coverity[DIVIDE_BY_ZERO:FALSE]
657 clusterPosition *= 1./accumulatedPathLength;
658 Identifier clusterId = hitSiDetElement->identifierOfPosition(clusterPosition);
659
660
661 // merging clusters
662
663 bool merged = false;
664 if(m_mergeCluster){ // merge to the current cluster "near" cluster in the cluster map, in the current detector element
665
666 for(Pixel_detElement_RIO_map::iterator currentClusIter = PixelDetElClusterMap.begin(); currentClusIter != PixelDetElClusterMap.end();) {
667 //make a temporary to use within the loop and possibly erase - increment the main interator at the same time.
668 Pixel_detElement_RIO_map::iterator clusIter = currentClusIter++;
669 InDet::PixelCluster* currentCluster = clusIter->second;
670 const std::vector<Identifier> &currentRdoList = currentCluster->rdoList();
671 bool areNb = false;
672 for (auto rdoIter : rdoList) {
673 areNb = PixelFastDigitizationTool::areNeighbours(currentRdoList, rdoIter, hitSiDetElement,*m_pixel_ID);
674 if (areNb) { break; }
675 }
676 if (areNb) {
677 const std::vector<int> &currentTotList = currentCluster->totList();
678 rdoList.insert(rdoList.end(), currentRdoList.begin(), currentRdoList.end() );
679 totList.insert(totList.end(), currentTotList.begin(), currentTotList.end() );
680 Amg::Vector2D currentClusterPosition(currentCluster->localPosition());
681 float c1 = (float)currentRdoList.size();
682 float c2 = (float)rdoList.size();
683 clusterPosition = (clusterPosition*c2 + currentClusterPosition*c1)/((c1 + c2));
684 clusterId = hitSiDetElement->identifierOfPosition(clusterPosition);
685 merged = true;
686 PixelDetElClusterMap.erase(clusIter);
687
688 //Store HepMcParticleLink connected to the cluster removed from the collection
689 std::pair<PRD_MultiTruthCollection::iterator,PRD_MultiTruthCollection::iterator> saved_hit = m_pixPrdTruth->equal_range(currentCluster->identify());
690 for (PRD_MultiTruthCollection::iterator this_hit = saved_hit.first; this_hit != saved_hit.second; ++this_hit)
691 {
692 hit_vector.push_back(this_hit->second);
693 }
694 //Delete all the occurency of the currentCluster from the multi map
695 if (saved_hit.first != saved_hit.second) m_pixPrdTruth->erase(currentCluster->identify());
696 delete currentCluster;
697 //break; //commenting out this break statement allows for multiple existing clusters to be merged.
698 }
699 }
700 }
701
702 bool not_valid = false;
703 for (auto & entry : rdoList) {
704 if (!(entry.is_valid())) { not_valid = true; break;}
705 }
706
707 if (not_valid) continue;
708
709 if(merged) {
710 //Hacks for merged clusters
711 for (auto rdoIter : rdoList) {
712 const InDetDD::SiCellId& chargeCellId = hitSiDetElement->cellIdFromIdentifier(rdoIter);
713 // phi/ eta index
714 int chargePhiIndex = chargeCellId.phiIndex();
715 int chargeEtaIndex = chargeCellId.etaIndex();
716 // set max min
717 phiIndexMin = chargePhiIndex < phiIndexMin ? chargePhiIndex : phiIndexMin;
718 phiIndexMax = chargePhiIndex > phiIndexMax ? chargePhiIndex : phiIndexMax;
719 etaIndexMin = chargeEtaIndex < etaIndexMin ? chargeEtaIndex : etaIndexMin;
720 etaIndexMax = chargeEtaIndex > etaIndexMax ? chargeEtaIndex : etaIndexMax;
721 }
722 siDeltaPhiCut = (phiIndexMax-phiIndexMin)+1;
723 siDeltaEtaCut = (etaIndexMax-etaIndexMin)+1;
724 }
725
726 // ---------------------------------------------------------------------------------------------
727 // PART 2: Cluster && ROT creation
728
729
730 //ATTENTION
731 // // correct shift implied by the scaling of the Lorentz angle
732 // double newshift = 0.5*thickness*tanLorAng;
733 // double corr = ( shift - newshift );
734 // 2a) Cluster creation ------------------------------------
736
737 // from InDetReadoutGeometry: width from eta
738 const auto* pixModDesign =
739 dynamic_cast<const InDetDD::PixelModuleDesign*>(
740 &hitSiDetElement->design());
741 if (!pixModDesign) {
742 return StatusCode::FAILURE;
743 }
744 double etaWidth =
745 pixModDesign->widthFromColumnRange(etaIndexMin, etaIndexMax);
746 // from InDetReadoutGeometry : width from phi
747 double phiWidth =
748 pixModDesign->widthFromRowRange(phiIndexMin, phiIndexMax);
749
750 InDet::SiWidth siWidth(Amg::Vector2D(siDeltaPhiCut, siDeltaEtaCut),
751 Amg::Vector2D(phiWidth, etaWidth));
752
753 // use the cluster maker from the offline software
754 pixelCluster =
755 std::make_unique<PixelCluster>(m_clusterMaker->pixelCluster(
756 clusterId, clusterPosition, std::move(rdoList),
757 lvl1a, std::move(totList), siWidth,
758 hitSiDetElement, isGanged, m_pixErrorStrategy, *m_pixel_ID,
759 false, 0.0, 0.0, calibData, *offlineCalibData, ctx));
760 if (isGanged) {
761 pixelCluster->setGangedPixel(isGanged);
762 }
763 } else {
765 "[ cluster - pix ] No pixels errors provided, but configured to "
766 "use them.");
768 " -> No pixels cluster will be created.");
769 continue;
770 }
771
772 if (!(pixelCluster->identify().is_valid())) {
773 pixelCluster.reset();
774 continue;
775 }
776
777 if (!(m_pixel_ID->is_pixel(pixelCluster->identify()))) {
778 pixelCluster.reset();
779 continue;
780 }
781
782 const auto it =
783 PixelDetElClusterMap.insert(Pixel_detElement_RIO_map::value_type(
784 waferHash, pixelCluster.release()));
785 const PixelCluster* insertedCluster = it->second;
786
787 if (currentLink.isValid()) {
789 m_pixPrdTruth->insert(
790 std::make_pair(insertedCluster->identify(), currentLink));
791 ATH_MSG_DEBUG("Truth map filled with cluster"
792 << insertedCluster
793 << " and link = " << currentLink);
794 }
795 } else {
797 "Particle link NOT valid!! Truth map NOT filled with cluster"
798 << insertedCluster << " and link = " << currentLink);
799 }
800
801 // Add all hit that was connected to the cluster
802 for (const HepMcParticleLink& p : hit_vector) {
803
804 m_pixPrdTruth->insert(std::make_pair(insertedCluster->identify(), p ));
805 }
806
807 hit_vector.clear();
808 } // end hit while
809
810
811 (void) m_pixelClusterMap->insert(PixelDetElClusterMap.begin(), PixelDetElClusterMap.end());
812
813
814 } // end nextDetectorElement while
815
816
817 return StatusCode::SUCCESS;
818}
819
820StatusCode PixelFastDigitizationTool::createAndStoreRIOs(const EventContext& ctx)
821{
823 const InDetDD::SiDetectorElementCollection* elements(*pixelDetEleHandle);
824 if (not pixelDetEleHandle.isValid() or elements==nullptr) {
825 ATH_MSG_FATAL(m_pixelDetEleCollKey.fullKey() << " is not available.");
826 return StatusCode::FAILURE;
827 }
828
829 Pixel_detElement_RIO_map::iterator i = m_pixelClusterMap->begin();
830 Pixel_detElement_RIO_map::iterator e = m_pixelClusterMap->end();
831
832 //InDet::PixelClusterCollection* clusterCollection = nullptr;
833 IdentifierHash waferHash;
834
835 for (; i != e; i = m_pixelClusterMap->upper_bound(i->first)){
836 std::pair <Pixel_detElement_RIO_map::iterator, Pixel_detElement_RIO_map::iterator> range;
837 range = m_pixelClusterMap->equal_range(i->first);
838 Pixel_detElement_RIO_map::iterator firstDetElem;
839 firstDetElem = range.first;
840 waferHash = firstDetElem->first;
841 const InDetDD::SiDetectorElement* detElement = elements->getDetectorElement(waferHash);
842 auto clusterCollection = std::make_unique<InDet::PixelClusterCollection>(waferHash);
843 clusterCollection->setIdentifier(detElement->identify());
844 for ( Pixel_detElement_RIO_map::iterator iter = range.first; iter != range.second; ++iter){
845 InDet::PixelCluster* pixelCluster = (*iter).second;
846 pixelCluster->setHashAndIndex(clusterCollection->identifyHash(),clusterCollection->size());
847 clusterCollection->push_back(pixelCluster);
848 }
849 if (!clusterCollection->empty()) {
850 ATH_MSG_DEBUG ( "Filling ambiguities map" );
851 m_gangedAmbiguitiesFinder->execute(clusterCollection.get(),*m_ambiguitiesMap);
852 ATH_MSG_DEBUG ( "Ambiguities map: " << m_ambiguitiesMap->size() << " elements" );
853 if ((m_pixelClusterContainer->addCollection(clusterCollection.release(), waferHash)).isFailure()){
854 ATH_MSG_WARNING( "Could not add collection to Identifyable container !" );
855 }
856 }
857 } // end for
858
859 m_pixelClusterMap->clear();
860
861 return StatusCode::SUCCESS;
862}
863// copied from PixelClusteringToolBase
865(const std::vector<Identifier>& group,
866 const Identifier& rdoID,
867 const InDetDD::SiDetectorElement* /*element*/,
868 const PixelID& pixelID)
869{
870 // note: in the PixelClusteringToolBase, m_splitClusters is a variable; here
871 // splitClusters was explicitly set to zero, acceptDiagonalClusters = 1
872 // so much of the original code is redundant and only one path through the code
873 // is possible.
874
875 std::vector<Identifier>::const_iterator groupBegin = group.begin();
876 std::vector<Identifier>::const_iterator groupEnd = group.end();
877
878 int row2 = pixelID.phi_index(rdoID);
879 int col2 = pixelID.eta_index(rdoID);
880
881 int rowmax = row2;
882 bool match=false;
883 while (groupBegin!=groupEnd)
884 {
885 Identifier id = *groupBegin;
886 int row1 = pixelID.phi_index(id);
887 int col1 = pixelID.eta_index(id);
888 if(row1 > rowmax) rowmax = row1;
889 int deltarow = abs(row2-row1);
890 int deltacol = abs(col2-col1);
891
892 // a side in common
893 if(deltacol+deltarow < 2) match = true;
894 //condition "if (acceptDiagonalClusters !=0") is redundant
895 if(deltacol == 1 && deltarow == 1) match = true;
896
897 ++groupBegin;
898 }
899
900
901 return match;
902}
903
905
906 const InDetDD::PixelModuleDesign* design(dynamic_cast<const InDetDD::PixelModuleDesign*>(&hitSiDetElement->design()));
907
908 if (!design) {
909 ATH_MSG_DEBUG ( "Could not get design"<< design) ;
910 return nullptr;
911 }
912
913 //Read from the SiDetectorElement information to build the digitization module
914 const double halfThickness = hitSiDetElement->thickness() * 0.5;
915 const double halfWidth = design->width() * 0.5;
916 const double halfLength = design->length() * 0.5;
917
918 int binsX = design->rows();
919 int binsY = design->columns();
920 double numberOfChip = design->numberOfCircuits();
921
922 InDetDD::SiCellId cell(0,binsY/2);
923 float LongPitch =design->parameters(cell).width().xEta();
924 //std::cout<<"numberOfChip "<<numberOfChip<<" LongPitch "<<LongPitch<<std::endl;
925
926 ATH_MSG_VERBOSE("Retrieving infos: halfThickness = " << halfThickness << " --- halfWidth = " << halfWidth << " --- halfLength = " << halfLength );
927 ATH_MSG_VERBOSE("Retrieving infos: binsX = " << binsX << " --- binsY = " << binsY << " --- numberOfChip = " << numberOfChip);
928
929 int readoutDirection = design->readoutSide();
930
931 const bool useLorentzAngle{true};
932 const IdentifierHash detElHash = hitSiDetElement->identifyHash();
933 float lorentzAngle = useLorentzAngle ? hitSiDetElement->hitDepthDirection()*hitSiDetElement->hitPhiDirection()*std::atan(m_lorentzAngleTool->getTanLorentzAngle(detElHash, Gaudi::Hive::currentContext())) : 0.;
934
935 // added for degugging
936
937 // std::cout << "barrel_ec = " << m_detID->barrel_ec(hitSiDetElement->identify())
938 // << " -- layer_disk = " << m_detID->layer_disk(hitSiDetElement->identify())
939 // << " -- eta_module = " << m_detID->eta_module(hitSiDetElement->identify())
940 // << " -- lorentzAngle = " << lorentzAngle
941 // << " -- lorentzCorrection = " << shift
942 // << " -- readoutDirection = " << readoutDirection << std::endl;
943 // std::cout << "element->hitDepthDirection() = " << hitSiDetElement->hitDepthDirection()
944 // << " -- element->hitPhiDirection() = " << hitSiDetElement->hitPhiDirection() << std::endl;
945
946 // rectangle bounds
947 auto rectangleBounds = std::make_shared<const Trk::RectangleBounds>(halfWidth,halfLength);
948 ATH_MSG_VERBOSE("Initialized rectangle Bounds");
949 // create the segmentation
950 std::shared_ptr<const Trk::Segmentation> rectangleSegmentation(new Trk::RectangularSegmentation(std::move(rectangleBounds),(size_t)binsX,LongPitch,(size_t)binsY, numberOfChip));
951 // build the module
952 ATH_MSG_VERBOSE("Initialized rectangleSegmentation");
953 Trk::DigitizationModule * digitizationModule = new Trk::DigitizationModule(std::move(rectangleSegmentation),
954 halfThickness,
955 readoutDirection,
956 lorentzAngle);
957 ATH_MSG_VERBOSE("Building Rectangle Segmentation with dimensions (halfX, halfY) = (" << halfWidth << ", " << halfLength << ")");
958
959 // success return
960 return digitizationModule;
961}
962
963
965{
966 Amg::Vector3D Intersection(0.,0.,0.);
967
968 //Using parameter definition of a line in 3d z=z_point + direction_z t
969 std::vector<double> parameters;
970 parameters.push_back((PlaneBorder.x() - Point.x())/Direction.x());
971 parameters.push_back((-PlaneBorder.x() - Point.x())/Direction.x());
972 parameters.push_back((PlaneBorder.y() - Point.y())/Direction.y());
973 parameters.push_back((-PlaneBorder.y() - Point.y())/Direction.y());
974
975 for(double parameter: parameters)
976 {
977 double z = Point.z() + Direction.z() * parameter;
978 if( std::abs(z) > halfthickness )
979 continue;
980
981
982 double x = Point.x() + Direction.x() * parameter;
983 double y = Point.y() + Direction.y() * parameter;
984
985 if(std::abs(x) > PlaneBorder.x() || std::abs(y) > PlaneBorder.y())
986 continue;
987
988
989 Intersection = Amg::Vector3D(x,y,z);
990 break;
991
992 }
993
994 return Intersection;
995}
996
997void PixelFastDigitizationTool::Diffuse(HepGeom::Point3D<double>& localEntry, HepGeom::Point3D<double>& localExit, double shiftX, double shiftY) {
998
999 double localEntryX = localEntry.x();
1000 double localEntryY = localEntry.y();
1001 double localExitX = localExit.x();
1002 double localExitY = localExit.y();
1003
1004 double signX = localExitX>localEntryX ? 1:-1 ;
1005 double signY = localExitY>localEntryY ? 1:-1 ;
1006
1007 localEntryX += shiftX*signX*(-1);
1008 localExitX += shiftX*signX;
1009 localEntryY += shiftY*signY*(-1);
1010 localExitY += shiftY*signY;
1011
1012 localEntry.setX(localEntryX);
1013 localEntry.setY(localEntryY);
1014 localExit.setX(localExitX);
1015 localExit.setY(localExitY);
1016
1017}
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_FATAL(x)
#define ATH_MSG_VERBOSE(x)
#define ATH_MSG_WARNING(x)
#define ATH_MSG_DEBUG(x)
Structs for holding charge calibration parameterisation and data.
std::vector< xAOD::EventInfo::SubEvent >::const_iterator SubEventIterator
Definition IPileUpTool.h:22
static Double_t sc
This is an Identifier helper class for the Pixel subdetector.
AtlasHitsVector< SiHit > SiHitCollection
#define y
#define x
#define z
A wrapper class for event-slot-local random engines.
Definition RNGWrapper.h:56
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Definition RNGWrapper.h:154
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition RNGWrapper.h:108
size_type size() const
This is a "hash" representation of an Identifier.
int readoutSide() const
ReadoutSide.
Class used to describe the design of a module (diode segmentation and readout scheme).
virtual SiDiodesParameters parameters(const SiCellId &cellId) const
readout or diode id -> position, size
int columns() const
Number of cell columns per module:
virtual double length() const
Method to calculate length of a module.
int rows() const
Number of cell rows per module:
double widthFromColumnRange(const int colMin, const int colMax) const
Method to calculate eta width from a column range.
int numberOfCircuits() const
Total number of circuits:
virtual double width() const
Method to calculate average width of a module.
Identifier for the strip or pixel cell.
Definition SiCellId.h:29
int phiIndex() const
Get phi index. Equivalent to strip().
Definition SiCellId.h:122
bool isValid() const
Test if its in a valid state.
Definition SiCellId.h:136
int etaIndex() const
Get eta index.
Definition SiCellId.h:114
Class to hold the SiDetectorElement objects to be put in the detector store.
const SiDetectorElement * getDetectorElement(const IdentifierHash &hash) const
Class to hold geometrical description of a silicon detector element.
virtual SiCellId cellIdFromIdentifier(const Identifier &identifier) const override final
SiCellId from Identifier.
virtual const SiDetectorDesign & design() const override final
access to the local description (inline):
const SiLocalPosition & width() const
width of the diodes:
double xEta() const
position along eta direction:
HepGeom::Point3D< double > hitLocalToLocal3D(const HepGeom::Point3D< double > &hitPosition) const
Same as previuos method but 3D.
SiCellId cellIdOfPosition(const Amg::Vector2D &localPos) const
As in previous method but returns SiCellId.
double hitPhiDirection() const
See previous method.
virtual IdentifierHash identifyHash() const override final
identifier hash (inline)
virtual Identifier identify() const override final
identifier of this detector element (inline)
double hitDepthDirection() const
Directions of hit depth,phi,eta axes relative to reconstruction local position axes (LocalPosition).
Identifier identifierOfPosition(const Amg::Vector2D &localPos) const
Full identifier of the cell for a given position: assumes a raw local position (no Lorentz shift).
Amg::Vector2D rawLocalPositionOfCell(const SiCellId &cellId) const
Returns position (center) of cell.
A PRD is mapped onto all contributing particles.
Gaudi::Property< int > m_vetoPileUpTruthLinks
PileUpToolBase(const std::string &type, const std::string &name, const IInterface *parent)
PixelChargeCalib::Thresholds getThresholds(InDetDD::PixelDiodeType type, unsigned int moduleHash, unsigned int FE) const
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
const PixelID * m_pixel_ID
Handle to the ID helper.
StatusCode mergeEvent(const EventContext &ctx)
StatusCode processAllSubEvents(const EventContext &ctx)
StringProperty m_randomEngineName
Name of the random number stream.
BooleanProperty m_pixUseClusterMaker
use the pixel cluster maker or not
SG::ReadCondHandleKey< PixelCalib::PixelOfflineCalibData > m_offlineCalibDataKey
StatusCode createAndStoreRIOs(const EventContext &ctx)
PublicToolHandle< Trk::IModuleStepper > m_digitizationStepper
static void Diffuse(HepGeom::Point3D< double > &localEntry, HepGeom::Point3D< double > &localExit, double shiftX, double shiftY)
ServiceHandle< InDetDD::IPixelReadoutManager > m_pixelReadout
DoubleProperty m_pixPathLengthTotConv
from path length to tot
DoubleProperty m_pixSmearPathLength
the 2.
BooleanProperty m_pixModuleDistortion
simulationn of module bowing
InDet::PixelGangedClusterAmbiguities * m_ambiguitiesMap
static bool areNeighbours(const std::vector< Identifier > &group, const Identifier &rdoID, const InDetDD::SiDetectorElement *, const PixelID &pixelID)
bool m_mergeCluster
enable the merging of neighbour Pixel clusters >
StatusCode digitize(const EventContext &ctx, TimedHitCollection< SiHit > &thpcsi)
PublicToolHandle< InDet::PixelGangedAmbiguitiesFinder > m_gangedAmbiguitiesFinder
SG::ReadCondHandleKey< PixelChargeCalibCondData > m_chargeDataKey
BooleanProperty m_pixSmearLandau
if true : landau else: gauss
std::vector< SiHitCollection * > m_siHitCollList
name of the sub event hit collections.
StatusCode processBunchXing(int bunchXing, SubEventIterator bSubEvents, SubEventIterator eSubEvents)
ServiceHandle< IAthRNGSvc > m_rndmSvc
Random number service.
StatusCode prepareEvent(const EventContext &ctx, unsigned int)
TimedHitCollection< SiHit > * m_thpcsi
IntegerProperty m_HardScatterSplittingMode
Process all SiHit or just those from signal or background events.
SG::ReadCondHandleKey< PixelDistortionData > m_distortionKey
PRD_MultiTruthCollection * m_pixPrdTruth
the PRD truth map for Pixel measurements
ToolHandle< ISiLorentzAngleTool > m_lorentzAngleTool
static Amg::Vector3D CalculateIntersection(const Amg::Vector3D &Point, const Amg::Vector3D &Direction, Amg::Vector2D PlaneBorder, double halfthickness)
Pixel_detElement_RIO_map * m_pixelClusterMap
std::multimap< IdentifierHash, InDet::PixelCluster * > Pixel_detElement_RIO_map
Trk::DigitizationModule * buildDetectorModule(const InDetDD::SiDetectorElement *) const
InDet::PixelClusterContainer * m_pixelClusterContainer
the PixelClusterContainer
ServiceHandle< PileUpMergeSvc > m_mergeSvc
PileUp Merge service.
PublicToolHandle< InDet::ClusterMakerTool > m_clusterMaker
ToolHandle to ClusterMaker.
IntegerProperty m_pixErrorStrategy
error strategy for the ClusterMaker
This is an Identifier helper class for the Pixel subdetector.
Definition PixelID.h:69
int eta_index(const Identifier &id) const
Definition PixelID.h:640
int phi_index(const Identifier &id) const
Definition PixelID.h:634
bool nextDetectorElement(const_iterator &b, const_iterator &e)
sets an iterator range with the hits of current detector element returns a bool when done
TimedVector::const_iterator const_iterator
void insert(const PileUpTimeEventIndex &timeEventIndex, const AtlasHitsVector< HIT > *inputCollection)
a smart pointer to a hit that also provides access to the extended timing info of the host event.
Definition TimedHitPtr.h:18
unsigned short eventId() const
the index of the component event in PileUpEventInfo.
Definition TimedHitPtr.h:47
Class that holds the surfaces for a planar digitization detector module.
const Segmentation & segmentation() const
return the segmenation
const Amg::Vector2D & localPosition() const
return the local position reference
Identifier identify() const
return the identifier
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
virtual const Amg::Vector2D cellPosition(const DigitizationCell &dCell) const =0
calculate the cell Position from the Id
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition hcg.cxx:116
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition hcg.cxx:359
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
bool ignoreTruthLink(const T &p, bool vetoPileUp)
Helper function for SDO creation in PileUpTools.
Message Stream Member.
Primary Vertex Finder.
std::pair< size_t, size_t > DigitizationCell
std::list< value_t > type
type of the collection of timed data object
a struct encapsulating the identifier of a pile-up event
index_type index() const
the index of the component event in PileUpEventInfo
PileUpType type() const
the pileup type - minbias, cavern, beam halo, signal?
time_type time() const
bunch xing time in ns