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 clusterPosition *= 1./accumulatedPathLength;
656 Identifier clusterId = hitSiDetElement->identifierOfPosition(clusterPosition);
657
658
659 // merging clusters
660
661 bool merged = false;
662 if(m_mergeCluster){ // merge to the current cluster "near" cluster in the cluster map, in the current detector element
663
664 for(Pixel_detElement_RIO_map::iterator currentClusIter = PixelDetElClusterMap.begin(); currentClusIter != PixelDetElClusterMap.end();) {
665 //make a temporary to use within the loop and possibly erase - increment the main interator at the same time.
666 Pixel_detElement_RIO_map::iterator clusIter = currentClusIter++;
667 InDet::PixelCluster* currentCluster = clusIter->second;
668 const std::vector<Identifier> &currentRdoList = currentCluster->rdoList();
669 bool areNb = false;
670 for (auto rdoIter : rdoList) {
671 areNb = PixelFastDigitizationTool::areNeighbours(currentRdoList, rdoIter, hitSiDetElement,*m_pixel_ID);
672 if (areNb) { break; }
673 }
674 if (areNb) {
675 const std::vector<int> &currentTotList = currentCluster->totList();
676 rdoList.insert(rdoList.end(), currentRdoList.begin(), currentRdoList.end() );
677 totList.insert(totList.end(), currentTotList.begin(), currentTotList.end() );
678 Amg::Vector2D currentClusterPosition(currentCluster->localPosition());
679 float c1 = (float)currentRdoList.size();
680 float c2 = (float)rdoList.size();
681 clusterPosition = (clusterPosition*c2 + currentClusterPosition*c1)/((c1 + c2));
682 clusterId = hitSiDetElement->identifierOfPosition(clusterPosition);
683 merged = true;
684 PixelDetElClusterMap.erase(clusIter);
685
686 //Store HepMcParticleLink connected to the cluster removed from the collection
687 std::pair<PRD_MultiTruthCollection::iterator,PRD_MultiTruthCollection::iterator> saved_hit = m_pixPrdTruth->equal_range(currentCluster->identify());
688 for (PRD_MultiTruthCollection::iterator this_hit = saved_hit.first; this_hit != saved_hit.second; ++this_hit)
689 {
690 hit_vector.push_back(this_hit->second);
691 }
692 //Delete all the occurency of the currentCluster from the multi map
693 if (saved_hit.first != saved_hit.second) m_pixPrdTruth->erase(currentCluster->identify());
694 delete currentCluster;
695 //break; //commenting out this break statement allows for multiple existing clusters to be merged.
696 }
697 }
698 }
699
700 bool not_valid = false;
701 for (auto & entry : rdoList) {
702 if (!(entry.is_valid())) { not_valid = true; break;}
703 }
704
705 if (not_valid) continue;
706
707 if(merged) {
708 //Hacks for merged clusters
709 for (auto rdoIter : rdoList) {
710 const InDetDD::SiCellId& chargeCellId = hitSiDetElement->cellIdFromIdentifier(rdoIter);
711 // phi/ eta index
712 int chargePhiIndex = chargeCellId.phiIndex();
713 int chargeEtaIndex = chargeCellId.etaIndex();
714 // set max min
715 phiIndexMin = chargePhiIndex < phiIndexMin ? chargePhiIndex : phiIndexMin;
716 phiIndexMax = chargePhiIndex > phiIndexMax ? chargePhiIndex : phiIndexMax;
717 etaIndexMin = chargeEtaIndex < etaIndexMin ? chargeEtaIndex : etaIndexMin;
718 etaIndexMax = chargeEtaIndex > etaIndexMax ? chargeEtaIndex : etaIndexMax;
719 }
720 siDeltaPhiCut = (phiIndexMax-phiIndexMin)+1;
721 siDeltaEtaCut = (etaIndexMax-etaIndexMin)+1;
722 }
723
724 // ---------------------------------------------------------------------------------------------
725 // PART 2: Cluster && ROT creation
726
727
728 //ATTENTION
729 // // correct shift implied by the scaling of the Lorentz angle
730 // double newshift = 0.5*thickness*tanLorAng;
731 // double corr = ( shift - newshift );
732 // 2a) Cluster creation ------------------------------------
734
735 // from InDetReadoutGeometry: width from eta
736 const auto* pixModDesign =
737 dynamic_cast<const InDetDD::PixelModuleDesign*>(
738 &hitSiDetElement->design());
739 if (!pixModDesign) {
740 return StatusCode::FAILURE;
741 }
742 double etaWidth =
743 pixModDesign->widthFromColumnRange(etaIndexMin, etaIndexMax);
744 // from InDetReadoutGeometry : width from phi
745 double phiWidth =
746 pixModDesign->widthFromRowRange(phiIndexMin, phiIndexMax);
747
748 InDet::SiWidth siWidth(Amg::Vector2D(siDeltaPhiCut, siDeltaEtaCut),
749 Amg::Vector2D(phiWidth, etaWidth));
750
751 // use the cluster maker from the offline software
752 pixelCluster =
753 std::make_unique<PixelCluster>(m_clusterMaker->pixelCluster(
754 clusterId, clusterPosition, std::vector<Identifier>(rdoList),
755 lvl1a, std::vector<int>(totList), siWidth,
756 hitSiDetElement, isGanged, m_pixErrorStrategy, *m_pixel_ID,
757 false, 0.0, 0.0, calibData, *offlineCalibData, ctx));
758 if (isGanged) {
759 pixelCluster->setGangedPixel(isGanged);
760 }
761 } else {
763 "[ cluster - pix ] No pixels errors provided, but configured to "
764 "use them.");
766 " -> No pixels cluster will be created.");
767 continue;
768 }
769
770 if (!(pixelCluster->identify().is_valid())) {
771 pixelCluster.reset();
772 continue;
773 }
774
775 if (!(m_pixel_ID->is_pixel(pixelCluster->identify()))) {
776 pixelCluster.reset();
777 continue;
778 }
779
780 const auto it =
781 PixelDetElClusterMap.insert(Pixel_detElement_RIO_map::value_type(
782 waferHash, pixelCluster.release()));
783 const PixelCluster* insertedCluster = it->second;
784
785 if (currentLink.isValid()) {
787 m_pixPrdTruth->insert(
788 std::make_pair(insertedCluster->identify(), currentLink));
789 ATH_MSG_DEBUG("Truth map filled with cluster"
790 << insertedCluster
791 << " and link = " << currentLink);
792 }
793 } else {
795 "Particle link NOT valid!! Truth map NOT filled with cluster"
796 << insertedCluster << " and link = " << currentLink);
797 }
798
799 // Add all hit that was connected to the cluster
800 for (const HepMcParticleLink& p : hit_vector) {
801
802 m_pixPrdTruth->insert(std::make_pair(insertedCluster->identify(), p ));
803 }
804
805 hit_vector.clear();
806 } // end hit while
807
808
809 (void) m_pixelClusterMap->insert(PixelDetElClusterMap.begin(), PixelDetElClusterMap.end());
810
811
812 } // end nextDetectorElement while
813
814
815 return StatusCode::SUCCESS;
816}
817
818StatusCode PixelFastDigitizationTool::createAndStoreRIOs(const EventContext& ctx)
819{
821 const InDetDD::SiDetectorElementCollection* elements(*pixelDetEleHandle);
822 if (not pixelDetEleHandle.isValid() or elements==nullptr) {
823 ATH_MSG_FATAL(m_pixelDetEleCollKey.fullKey() << " is not available.");
824 return StatusCode::FAILURE;
825 }
826
827 Pixel_detElement_RIO_map::iterator i = m_pixelClusterMap->begin();
828 Pixel_detElement_RIO_map::iterator e = m_pixelClusterMap->end();
829
830 InDet::PixelClusterCollection* clusterCollection = nullptr;
831 IdentifierHash waferHash;
832
833 for (; i != e; i = m_pixelClusterMap->upper_bound(i->first)){
834
835 std::pair <Pixel_detElement_RIO_map::iterator, Pixel_detElement_RIO_map::iterator> range;
836 range = m_pixelClusterMap->equal_range(i->first);
837
838 Pixel_detElement_RIO_map::iterator firstDetElem;
839 firstDetElem = range.first;
840
841 waferHash = firstDetElem->first;
842
843 const InDetDD::SiDetectorElement* detElement = elements->getDetectorElement(waferHash);
844
845 clusterCollection = new InDet::PixelClusterCollection(waferHash);
846 clusterCollection->setIdentifier(detElement->identify());
847
848
849 for ( Pixel_detElement_RIO_map::iterator iter = range.first; iter != range.second; ++iter){
850
851 InDet::PixelCluster* pixelCluster = (*iter).second;
852 pixelCluster->setHashAndIndex(clusterCollection->identifyHash(),clusterCollection->size());
853 clusterCollection->push_back(pixelCluster);
854
855 }
856
857
858 if (clusterCollection) {
859 if (!clusterCollection->empty()) {
860 ATH_MSG_DEBUG ( "Filling ambiguities map" );
861 m_gangedAmbiguitiesFinder->execute(clusterCollection,*m_ambiguitiesMap);
862 ATH_MSG_DEBUG ( "Ambiguities map: " << m_ambiguitiesMap->size() << " elements" );
863 if ((m_pixelClusterContainer->addCollection(clusterCollection, waferHash)).isFailure()){
864 ATH_MSG_WARNING( "Could not add collection to Identifyable container !" );
865 }
866 }
867 else {delete clusterCollection;}
868 }
869
870
871 } // end for
872
873 m_pixelClusterMap->clear();
874
875 return StatusCode::SUCCESS;
876}
877// copied from PixelClusteringToolBase
879(const std::vector<Identifier>& group,
880 const Identifier& rdoID,
881 const InDetDD::SiDetectorElement* /*element*/,
882 const PixelID& pixelID)
883{
884 // note: in the PixelClusteringToolBase, m_splitClusters is a variable; here
885 // splitClusters was explicitly set to zero, acceptDiagonalClusters = 1
886 // so much of the original code is redundant and only one path through the code
887 // is possible.
888
889 std::vector<Identifier>::const_iterator groupBegin = group.begin();
890 std::vector<Identifier>::const_iterator groupEnd = group.end();
891
892 int row2 = pixelID.phi_index(rdoID);
893 int col2 = pixelID.eta_index(rdoID);
894
895 int rowmax = row2;
896 bool match=false;
897 while (groupBegin!=groupEnd)
898 {
899 Identifier id = *groupBegin;
900 int row1 = pixelID.phi_index(id);
901 int col1 = pixelID.eta_index(id);
902 if(row1 > rowmax) rowmax = row1;
903 int deltarow = abs(row2-row1);
904 int deltacol = abs(col2-col1);
905
906 // a side in common
907 if(deltacol+deltarow < 2) match = true;
908 //condition "if (acceptDiagonalClusters !=0") is redundant
909 if(deltacol == 1 && deltarow == 1) match = true;
910
911 ++groupBegin;
912 }
913
914
915 return match;
916}
917
919
920 const InDetDD::PixelModuleDesign* design(dynamic_cast<const InDetDD::PixelModuleDesign*>(&hitSiDetElement->design()));
921
922 if (!design) {
923 ATH_MSG_DEBUG ( "Could not get design"<< design) ;
924 return nullptr;
925 }
926
927 //Read from the SiDetectorElement information to build the digitization module
928 const double halfThickness = hitSiDetElement->thickness() * 0.5;
929 const double halfWidth = design->width() * 0.5;
930 const double halfLength = design->length() * 0.5;
931
932 int binsX = design->rows();
933 int binsY = design->columns();
934 double numberOfChip = design->numberOfCircuits();
935
936 InDetDD::SiCellId cell(0,binsY/2);
937 float LongPitch =design->parameters(cell).width().xEta();
938 //std::cout<<"numberOfChip "<<numberOfChip<<" LongPitch "<<LongPitch<<std::endl;
939
940 ATH_MSG_VERBOSE("Retrieving infos: halfThickness = " << halfThickness << " --- halfWidth = " << halfWidth << " --- halfLength = " << halfLength );
941 ATH_MSG_VERBOSE("Retrieving infos: binsX = " << binsX << " --- binsY = " << binsY << " --- numberOfChip = " << numberOfChip);
942
943 int readoutDirection = design->readoutSide();
944
945 const bool useLorentzAngle{true};
946 const IdentifierHash detElHash = hitSiDetElement->identifyHash();
947 float lorentzAngle = useLorentzAngle ? hitSiDetElement->hitDepthDirection()*hitSiDetElement->hitPhiDirection()*std::atan(m_lorentzAngleTool->getTanLorentzAngle(detElHash, Gaudi::Hive::currentContext())) : 0.;
948
949 // added for degugging
950
951 // std::cout << "barrel_ec = " << m_detID->barrel_ec(hitSiDetElement->identify())
952 // << " -- layer_disk = " << m_detID->layer_disk(hitSiDetElement->identify())
953 // << " -- eta_module = " << m_detID->eta_module(hitSiDetElement->identify())
954 // << " -- lorentzAngle = " << lorentzAngle
955 // << " -- lorentzCorrection = " << shift
956 // << " -- readoutDirection = " << readoutDirection << std::endl;
957 // std::cout << "element->hitDepthDirection() = " << hitSiDetElement->hitDepthDirection()
958 // << " -- element->hitPhiDirection() = " << hitSiDetElement->hitPhiDirection() << std::endl;
959
960 // rectangle bounds
961 auto rectangleBounds = std::make_shared<const Trk::RectangleBounds>(halfWidth,halfLength);
962 ATH_MSG_VERBOSE("Initialized rectangle Bounds");
963 // create the segmentation
964 std::shared_ptr<const Trk::Segmentation> rectangleSegmentation(new Trk::RectangularSegmentation(std::move(rectangleBounds),(size_t)binsX,LongPitch,(size_t)binsY, numberOfChip));
965 // build the module
966 ATH_MSG_VERBOSE("Initialized rectangleSegmentation");
967 Trk::DigitizationModule * digitizationModule = new Trk::DigitizationModule(std::move(rectangleSegmentation),
968 halfThickness,
969 readoutDirection,
970 lorentzAngle);
971 ATH_MSG_VERBOSE("Building Rectangle Segmentation with dimensions (halfX, halfY) = (" << halfWidth << ", " << halfLength << ")");
972
973 // success return
974 return digitizationModule;
975}
976
977
979{
980 Amg::Vector3D Intersection(0.,0.,0.);
981
982 //Using parameter definition of a line in 3d z=z_point + direction_z t
983 std::vector<double> parameters;
984 parameters.push_back((PlaneBorder.x() - Point.x())/Direction.x());
985 parameters.push_back((-PlaneBorder.x() - Point.x())/Direction.x());
986 parameters.push_back((PlaneBorder.y() - Point.y())/Direction.y());
987 parameters.push_back((-PlaneBorder.y() - Point.y())/Direction.y());
988
989 for(double parameter: parameters)
990 {
991 double z = Point.z() + Direction.z() * parameter;
992 if( std::abs(z) > halfthickness )
993 continue;
994
995
996 double x = Point.x() + Direction.x() * parameter;
997 double y = Point.y() + Direction.y() * parameter;
998
999 if(std::abs(x) > PlaneBorder.x() || std::abs(y) > PlaneBorder.y())
1000 continue;
1001
1002
1003 Intersection = Amg::Vector3D(x,y,z);
1004 break;
1005
1006 }
1007
1008 return Intersection;
1009}
1010
1011void PixelFastDigitizationTool::Diffuse(HepGeom::Point3D<double>& localEntry, HepGeom::Point3D<double>& localExit, double shiftX, double shiftY) {
1012
1013 double localEntryX = localEntry.x();
1014 double localEntryY = localEntry.y();
1015 double localExitX = localExit.x();
1016 double localExitY = localExit.y();
1017
1018 double signX = localExitX>localEntryX ? 1:-1 ;
1019 double signY = localExitY>localEntryY ? 1:-1 ;
1020
1021 localEntryX += shiftX*signX*(-1);
1022 localExitX += shiftX*signX;
1023 localEntryY += shiftY*signY*(-1);
1024 localExitY += shiftY*signY;
1025
1026 localEntry.setX(localEntryX);
1027 localEntry.setY(localEntryY);
1028 localExit.setX(localExitX);
1029 localExit.setY(localExitY);
1030
1031}
#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: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: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: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