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