20 #include <EVENT/LCCollection.h>
21 #include <IMPL/LCCollectionVec.h>
22 #include <IMPL/LCFlagImpl.h>
23 #include <IMPL/LCRelationImpl.h>
24 #include <UTIL/LCRelationNavigator.h>
25 #include <IMPL/TrackerPulseImpl.h>
26 #include <IMPL/TrackerHitPlaneImpl.h>
27 #include <UTIL/CellIDDecoder.h>
28 #include <UTIL/CellIDEncoder.h>
29 #include "UTIL/LCTrackerConf.h"
30 #include <UTIL/ILDConf.h>
34 #include <streamlog/streamlog.h>
37 using namespace CLHEP;
49 SiStripClus::SiStripClus() : Processor(
"SiStripClus")
52 _description =
"SiStripClus: Marlin processor intended for cluster finding - using digitized data worked out with SiStripDigi";
55 registerProcessorParameter(
"Subdetector",
56 "Subdetector to be digitised",
60 registerProcessorParameter(
"CMSnoise",
61 "Common mode subtracted noise, set in electrons",
65 registerProcessorParameter(
"FloatingStripsRPhi",
66 "Is every even strip floating in R-Phi?",
70 registerProcessorParameter(
"FloatingStripsZ",
71 "Is every even strip floating in Z?",
75 std::vector<float> resSVDFirstInRPhi;
76 resSVDFirstInRPhi.push_back( 6.5);
77 resSVDFirstInRPhi.push_back( 6.0);
78 resSVDFirstInRPhi.push_back( 6.0);
80 resSVDFirstInRPhi.push_back( 7.0);
81 resSVDFirstInRPhi.push_back( 7.0);
82 resSVDFirstInRPhi.push_back( 6.0);
84 resSVDFirstInRPhi.push_back( 6.5);
85 resSVDFirstInRPhi.push_back( 6.5);
86 resSVDFirstInRPhi.push_back( 6.5);
88 resSVDFirstInRPhi.push_back( 6.5);
89 resSVDFirstInRPhi.push_back( 6.5);
90 resSVDFirstInRPhi.push_back( 6.5);
92 resSVDFirstInRPhi.push_back( 6.5);
93 resSVDFirstInRPhi.push_back( 6.0);
95 registerProcessorParameter(
"ResolutionOfSVDFirstInRPhi",
96 "Resolution of first SVD layer in R-Phi (in um)",
100 std::vector<float> resSVDOtherInRPhi;
101 resSVDOtherInRPhi.push_back( 7.5);
102 resSVDOtherInRPhi.push_back( 9.5);
103 resSVDOtherInRPhi.push_back(10.5);
105 resSVDOtherInRPhi.push_back(11.0);
106 resSVDOtherInRPhi.push_back(11.0);
107 resSVDOtherInRPhi.push_back(11.0);
109 resSVDOtherInRPhi.push_back(11.0);
110 resSVDOtherInRPhi.push_back(11.0);
111 resSVDOtherInRPhi.push_back(11.0);
113 resSVDOtherInRPhi.push_back(11.0);
114 resSVDOtherInRPhi.push_back(11.0);
115 resSVDOtherInRPhi.push_back(11.0);
117 resSVDOtherInRPhi.push_back(11.0);
118 resSVDOtherInRPhi.push_back(10.0);
120 registerProcessorParameter(
"ResolutionOfSVDOtherInRPhi",
121 "Resolution of other SVD layers in R-Phi (in um) ",
125 std::vector<float> resSVDFirstInZ;
126 resSVDFirstInZ.push_back(20.0);
127 resSVDFirstInZ.push_back(16.0);
128 resSVDFirstInZ.push_back(14.0);
130 resSVDFirstInZ.push_back(14.0);
131 resSVDFirstInZ.push_back(13.0);
132 resSVDFirstInZ.push_back(13.0);
134 resSVDFirstInZ.push_back(28.0);
135 resSVDFirstInZ.push_back(28.0);
136 resSVDFirstInZ.push_back(28.0);
138 resSVDFirstInZ.push_back(14.0);
139 resSVDFirstInZ.push_back(13.0);
140 resSVDFirstInZ.push_back(13.0);
142 resSVDFirstInZ.push_back(14.0);
143 resSVDFirstInZ.push_back(16.0);
145 registerProcessorParameter(
"ResolutionOfSVDFirstInZ",
146 "Resolution of first SVD layer along Z axis (in um)",
150 std::vector<float> resSVDOtherInZ;
151 resSVDOtherInZ.push_back(16.0);
152 resSVDOtherInZ.push_back(16.0);
153 resSVDOtherInZ.push_back(15.0);
155 resSVDOtherInZ.push_back(14.0);
156 resSVDOtherInZ.push_back(17.0);
157 resSVDOtherInZ.push_back(34.0);
159 resSVDOtherInZ.push_back(50.0);
160 resSVDOtherInZ.push_back(50.0);
161 resSVDOtherInZ.push_back(50.0);
163 resSVDOtherInZ.push_back(34.0);
164 resSVDOtherInZ.push_back(14.0);
165 resSVDOtherInZ.push_back(14.0);
167 resSVDOtherInZ.push_back(16.0);
168 resSVDOtherInZ.push_back(16.0);
170 registerProcessorParameter(
"ResolutionOfSVDOtherInZ",
171 "Resolution of other SVD layers along Z axis (in um) ",
175 registerProcessorParameter(
"S/NSeedStrips",
176 "Signal to noise ratio cut for seed strips",
180 registerProcessorParameter(
"S/NAdjacentStrips",
181 "Signal to noise ratio cut for adjacent strips",
185 registerProcessorParameter(
"S/NCluster",
186 "Signal to noise ratio cut for total cluster",
195 registerProcessorParameter(
"TanOfAvgHLorentzShift",
196 "Tangent of holes' average Lorentz shift (0.05 for 273 K, 0.039 for 300 K)",
200 registerProcessorParameter(
"InputCollectionName",
201 "Name of TrackerPulse input collection",
203 std::string(
"FTDDigits") );
205 registerProcessorParameter(
"OutputCollectionName",
206 "Name of TrackerHitPlane output collection",
208 std::string(
"FTDTrackerHits") );
210 registerProcessorParameter(
"RelCollectionNamePlsToSim",
211 "Name of input relation collection - TrackerPulse to SimTrackerHit (if nonzero, required)",
213 std::string(
"FTDDigitsToSimHitsRel") );
215 registerProcessorParameter(
"pitchFront",
216 "Pitch of the front sensor family in the center of the sensors, set in um",
220 registerProcessorParameter(
"pitchRear",
221 "Pitch of the rear sensor family in the center of the sensors, set in um",
258 _rootFile =
new TFile(
"BelleII_SVD_Hits.root",
"recreate");
263 _rootTree =
new TTree(
"Hits",
"Hit info");
265 _rootTree->Branch(
"Layer" ,&_rootLayerID ,
"Layer/I" );
266 _rootTree->Branch(
"Ladder" ,&_rootLadderID ,
"Ladder/I" );
267 _rootTree->Branch(
"Sensor" ,&_rootSensorID ,
"Sensor/I" );
268 _rootTree->Branch(
"RPhiSim" ,&_rootSimRPhi ,
"SimRPhi/D" );
269 _rootTree->Branch(
"RPhiRec" ,&_rootRecRPhi ,
"RecRPhi/D" );
270 _rootTree->Branch(
"ResRPhi" ,&_rootResRPhi ,
"ResRPhi/D" );
271 _rootTree->Branch(
"ResR" ,&_rootResR ,
"ResR/D" );
272 _rootTree->Branch(
"ResModule" ,&_rootResModule ,
"Resmodule/D" );
273 _rootTree->Branch(
"RPhiClsSize",&_rootClsSizeRPhi ,
"ClsSizeRPhi/D");
274 _rootTree->Branch(
"RPhiMCPDG" ,&_rootMCPDGRPhi ,
"MCPDGRPhi/I" );
275 _rootTree->Branch(
"ZSim" ,&_rootSimZ ,
"SimZ/D" );
276 _rootTree->Branch(
"ZRec" ,&_rootRecZ ,
"RecZ/D" );
277 _rootTree->Branch(
"ZClsSize" ,&_rootClsSizeZ ,
"ClsSizeZ/D" );
278 _rootTree->Branch(
"ZMCPDG" ,&_rootMCPDGZ ,
"MCPDGZ/I" );
279 _rootTree->Branch(
"EvtNum" ,&_rootEvtNum ,
"EvtNum/I" );
311 _rootEvtNum =
event->getEventNumber();
316 LCCollection * colOfTrkPulses = 0;
319 if(event->getEventNumber() == 0)
321 streamlog_out(MESSAGE3) <<
" "
324 <<
"LCCollection(s) processed:"
326 << std::endl << std::endl;
330 for(ConstStringVec::const_iterator colName = strVec->begin();
331 colName != strVec->end(); ++colName)
337 if( (event->getCollection(*colName))->getTypeName()
338 == LCIO::TRACKERPULSE )
341 colOfTrkPulses =
event->getCollection(*colName);
343 if (event->getEventNumber() == 0)
345 streamlog_out(MESSAGE3) <<
" " << *colName
352 streamlog_out(ERROR) <<
"Required collection: "
354 <<
" found, but NOT of TRACKERPULSE type!!!"
364 if( (event->getCollection(*colName))->getTypeName()
365 == LCIO::LCRELATION )
369 event->getCollection(*colName));
371 if(event->getEventNumber() == 0)
373 streamlog_out(MESSAGE3) <<
" " << *colName
380 streamlog_out(ERROR) <<
"Required collection: "
382 <<
" found, but NOT of LCRELATION type!!!"
390 if(colOfTrkPulses == 0)
392 streamlog_out(WARNING) <<
"Required collection: "
400 streamlog_out(WARNING) <<
"Required collection: "
408 if(colOfTrkPulses != 0)
410 CellIDDecoder<TrackerPulse> cellIDDec(colOfTrkPulses);
413 TrackerPulseImpl * pulse = 0;
419 int nPulses = colOfTrkPulses->getNumberOfElements();
422 for(
int i=0; i<nPulses; ++i)
425 pulse =
dynamic_cast<TrackerPulseImpl*
>(
426 colOfTrkPulses->getElementAt(i) );
489 streamlog_out(MESSAGE3) << std::endl
492 <<
"Processor successfully finished!"
513 std::vector<StripType> stv;
518 std::map<StripType,int> stSensorIDmap;
527 for(SensorStripMap::iterator iterSMap = sensorMap.begin(); iterSMap!=sensorMap.end();
531 const int cellID = iterSMap->first;
533 const int layerID = bfmap[
"layer"];
534 const int ladderID= bfmap[
"module"];
537 for(std::vector<StripType>::iterator itST = stv.begin(); itST!= stv.end();
541 for(StripChargeMap::iterator iterChMap=iterSMap->second[STRIPTYPE].begin();
542 iterChMap!=iterSMap->second[STRIPTYPE].end(); iterChMap++)
544 const int sensorID= stSensorIDmap[STRIPTYPE];
548 const int seedStrip = iterChMap->first;
549 const double seedCharge = iterChMap->second->getCharge();
559 clsStrips[seedStrip] =
new Signal(seedCharge, 0.);
560 clsStrips[seedStrip]->updateSimHitMap(seedSimHitMap);
563 iterChMap->second->setCharge(0.);
568 StripChargeMap::iterator seedIt=iterSMap->second[STRIPTYPE].find(seedStrip);
571 StripChargeMap::reverse_iterator lschMap(seedIt);
572 clsStrips = storeHitsAdjacents<StripChargeMap::reverse_iterator>(
573 clsStrips, lschMap, iterSMap->second[STRIPTYPE].rend(),
574 iterSMap->second[STRIPTYPE]);
578 StripChargeMap::iterator rschMap(++seedIt);
579 clsStrips = storeHitsAdjacents<StripChargeMap::iterator>(clsStrips,
580 rschMap, iterSMap->second[STRIPTYPE].end(),
581 iterSMap->second[STRIPTYPE]);
587 double clsCharge = 0.0;
589 double xLeftSignal = 0.0;
590 double qLeftSignal = 0.0;
592 double xRightSignal = 0.0;
593 double qRightSignal = 0.0;
595 double qIntermSignal = 0.0;
598 for(StripChargeMap::iterator iterChMap2=clsStrips.begin();
599 iterChMap2!=clsStrips.end(); iterChMap2++)
602 stripID = iterChMap2->first;
604 sensorID,stripID,0.0);
606 const double stripCharge = iterChMap2->second->getCharge();
610 iterChMap2->second->getSimHitMap();
612 if(simHitMap.size() != 0)
614 for(SimTrackerHitMap::const_iterator iterSHM=simHitMap.begin();
615 iterSHM!=simHitMap.end(); ++iterSHM)
617 EVENT::SimTrackerHit * simHit =
618 dynamic_cast<EVENT::SimTrackerHit *
>(iterSHM->first);
619 float weight = iterSHM->second;
620 if(clsSimHitMap.find(simHit)!=clsSimHitMap.end())
622 clsSimHitMap[simHit] += weight;
626 clsSimHitMap[simHit] = weight;
634 if(iterChMap2 == clsStrips.begin())
636 xLeftSignal = stripPosYatz0;
637 qLeftSignal = stripCharge;
641 else if(iterChMap2 == --(clsStrips.end()))
643 xRightSignal = stripPosYatz0;
644 qRightSignal = stripCharge;
649 qIntermSignal += stripCharge;
653 clsCharge += stripCharge;
658 int clsSize = clsStrips.size();
662 qIntermSignal /= (clsSize - 2.0);
671 double readOutPitch = 0.;
674 readOutPitch = 2.0*geomPitchAtz0;
678 readOutPitch = geomPitchAtz0;
681 double clsPosYatz0 = 0.0;
686 if( (clsSize>2) && (qLeftSignal<1.5*qIntermSignal)
687 && (qRightSignal<1.5*qIntermSignal) )
689 clsPosYatz0 = (xRightSignal + xLeftSignal)/2.
690 + (qRightSignal - qLeftSignal)/2./qIntermSignal * readOutPitch;
694 clsPosYatz0 = (xRightSignal*qRightSignal
695 + xLeftSignal*qLeftSignal)/(qRightSignal + qLeftSignal);
708 if(clsCharge >= (
_SNtotal*_CMSnoise))
715 clsCharge, clsSize );
718 clsvectFrontRear[cellID][STRIPTYPE].push_back(
719 std::pair<int,StripCluster*>(stripID,pCluster));
723 for(StripChargeMap::iterator iterChMap2=clsStrips.begin();
724 iterChMap2!=clsStrips.end(); iterChMap2++)
726 delete iterChMap2->second;
737 for(SensorStripClusterMap::iterator it = clsvectFrontRear.begin();
738 it != clsvectFrontRear.end(); ++it)
740 const int cellID = it->first;
742 const int layerID = bfmap[
"layer"];
743 const int ladderID= bfmap[
"module"];
746 for(std::vector<StripClusterPair>::iterator
748 itFront != it->second[
STRIPFRONT].end(); ++itFront)
750 const int stripIDFront = itFront->first;
759 for(std::vector<StripClusterPair>::iterator
761 itRear != it->second[
STRIPREAR].end(); ++itRear)
763 const int stripIDRear = itRear->first;
774 if( (yatz0Front-yatz0Rear)*(yatzLFront-yatzLRear) > 0.)
788 ladderID,stripIDFront,stripIDRear);
791 const double sigmaY = sqrt(
801 double totalCharge = ( pclusterFront->
getCharge() +
806 1, position, posSigma, totalCharge, 0);
811 if(cls3DSimHitMap.size() != 0)
815 for(SimTrackerHitMap::iterator iterSHM=
816 clsRearSimHitMap.begin();
817 iterSHM!=clsRearSimHitMap.end(); iterSHM++)
819 EVENT::SimTrackerHit * simHit =
820 dynamic_cast<EVENT::SimTrackerHit *
>(iterSHM->first);
821 float weight = iterSHM->second;
822 if(cls3DSimHitMap.find(simHit)!=cls3DSimHitMap.end())
824 cls3DSimHitMap[simHit] += weight;
828 cls3DSimHitMap[simHit] = weight;
837 _rootLayerID = layerID;
838 _rootLadderID = ladderID;
845 _rootClsSizeRPhi = pclusterFront->
getSize();
846 _rootClsSizeZ = pclusterRear->
getSize();
852 EVENT::SimTrackerHit * simHit = 0;
857 for(SimTrackerHitMap::const_iterator iterSHM =
858 simHitMapFront.begin();
859 iterSHM!=simHitMapFront.end(); ++iterSHM)
862 if( (iterSHM->first!=0) && ((iterSHM->second)>weight) )
864 simHit = iterSHM->first;
865 weight = iterSHM->second;
870 Hep3Vector simPosGlob;
871 Hep3Vector simPosLoc;
873 simPosGlob.setX(simHit->getPosition()[0]*
mm);
874 simPosGlob.setY(simHit->getPosition()[1]*
mm);
875 simPosGlob.setZ(simHit->getPosition()[2]*
mm);
877 ladderID, 1, simPosGlob);
878 _rootMCPDGRPhi = simHit->getMCParticle()->getPDG();
879 _rootSimRPhi = sqrt(simPosGlob.getY()*simPosGlob.getY()+
880 simPosGlob.getX()*simPosGlob.getX())/
mm;
881 _rootSimZ = simPosGlob.getZ() /
mm;
884 const double theta = atan2(simPosGlob.getY(),simPosGlob.getX());
887 layerID,ladderID,1,position);
888 _rootRecRPhi = sqrt(recPoint.getX()*recPoint.getX()
889 + recPoint.getY()*recPoint.getY())/
mm;
890 _rootRecZ = recPoint.getZ()/
mm;
892 recPoint -= simPosGlob;
893 recPoint.rotateZ(theta);
896 _rootResRPhi = (simPosLoc.getY()-position.getY())/
mm;
897 _rootResR = (simPosLoc.getZ()-position.getZ())/
mm;
898 _rootResModule= sqrt(_rootResRPhi*_rootResRPhi+
899 _rootResR*_rootResR)/
mm;
935 clsVec.push_back(pCluster3D);
963 for(SensorStripClusterMap::iterator it = clsvectFrontRear.begin();
964 it != clsvectFrontRear.end(); ++it)
966 for(std::map<
StripType,std::vector<StripClusterPair> >::iterator itMap =
968 itMap != it->second.end(); ++itMap)
970 for(std::vector<StripClusterPair>::iterator itSCl = itMap->second.begin();
971 itSCl != itMap->second.end(); ++itSCl)
973 if( itSCl->second != 0)
975 delete itSCl->second;
1649 double adjCharge = 0.0;
1650 bool goNextStrip =
true;
1651 while( goNextStrip && schMap != endIt )
1653 adjCharge = schMap->second->getCharge();
1658 clsStrips[schMap->first] =
new Signal(adjCharge, 0.);
1659 clsStrips[schMap->first]->updateSimHitMap(adjSimHitMap);
1662 currentMap[schMap->first]->setCharge(0.);
1668 goNextStrip =
false;
1685 ClsVec::iterator iterClsVec;
1691 Hep3Vector position;
1692 Hep3Vector posSigma;
1697 streamlog_out(MESSAGE2) << std::endl
1698 <<
" Total number of reconstructed hits: "
1705 LCFlagImpl flag1(0);
1706 flag1.setBit(LCIO::RTHPBIT_ID1);
1707 colOfTrkHits->setFlag(flag1.getFlag());
1710 CellIDEncoder<TrackerHitPlaneImpl> cellEnc(
1711 LCTrackerCellID::encoding_string()+
",stripFront:11,stripRear:11",
1715 for(iterClsVec=clsVec.begin(); iterClsVec!=clsVec.end(); iterClsVec++)
1729 CLHEP::Hep3Vector localPos = position;
1733 sensorID, position);
1740 position.setZ(position.getZ()+sign*offsetZ);
1743 double posLCIO[3] = { position.getX()/
mm, position.getY()/
mm,
1744 position.getZ()/
mm };
1751 TrackerHitPlaneImpl * trkHit =
new TrackerHitPlaneImpl();
1754 trkHit->setType(layerID + 201);
1755 trkHit->setPosition(posLCIO);
1758 trkHit->setdU( covLCIO[2] );
1759 trkHit->setdV( covLCIO[5] );
1760 trkHit->setEDep(totalCharge /
e);
1762 trkHit->setTime(pCluster->
getTime());
1767 ladderID,1,CLHEP::Hep3Vector(0.0,1.0,0.0));
1768 float Uf[2] = { Uvector.getX(), Uvector.getY() };
1770 ladderID,1,CLHEP::Hep3Vector(0.0,0.0,1.0));
1771 float Vf[2] = { Vvector.getX(), Vvector.getY() };
1778 SimTrackerHit * simTrkHit = 0;
1781 for(SimTrackerHitMap::const_iterator iterSHM=simHitMap.begin();
1782 iterSHM!=simHitMap.end(); iterSHM++)
1786 if( (iterSHM->first!=0) && ((iterSHM->second)>weight) )
1788 simTrkHit = iterSHM->first;
1789 weight = iterSHM->second;
1795 cellEnc[
"subdet"]=ILDDetID::FTD;
1796 cellEnc[
"side"]=abs(realLayer)/realLayer;
1797 cellEnc[
"layer"]=abs(realLayer);
1798 cellEnc[
"module"]=ladderID+1;
1799 cellEnc[
"sensor"]=1;
1803 cellEnc.setCellID(trkHit);
1807 trkHit->rawHits().push_back(simTrkHit);
1810 colOfTrkHits->addElement(trkHit);
1820 streamlog_out(MESSAGE2) << std::endl;
1830 const double & posZ)
1832 static float covMatrix[6] = { 0., 0., 0.,
1838 const double sigmax = halfPitch/(2.*cos(hitTheta));
1839 const double sigmay = halfPitch*sin(hitTheta)/2.;
1843 covMatrix[2] = sigmax/
mm * sigmax/
mm;
1844 covMatrix[5] = sigmay/
mm * sigmay/
mm;
1952 int cellID0 = pulse->getCellID0();
1957 int cellID1 = pulse->getCellID1();
1959 double charge = pulse->getCharge()*
fC;
1964 const StripType stripType = tpIdpair.first;
1965 const int stripID = tpIdpair.second;
1970 streamlog_out(ERROR)
1971 <<
"cellID1 - problem to identify if strips in FRONT or REAR!!!"
1979 SensorStripMap::iterator iterSMap = sensorMap.find(cellID0);
1981 if(iterSMap == sensorMap.end())
1986 iterSMap = sensorMap.find(cellID0);
1990 StripChargeMap::iterator iterChMap = iterSMap->second[stripType].find(stripID);
1992 if( iterChMap == iterSMap->second[stripType].end() )
1994 signal =
new Signal(charge,0.0);
1995 iterSMap->second[stripType][stripID] = signal;
1997 iterChMap = iterSMap->second[stripType].find(stripID);
2007 LCObjectVec lcObjVec =
_navigatorPls->getRelatedToObjects(pulse);
2008 FloatVec floatVec =
_navigatorPls->getRelatedToWeights(pulse);
2010 LCObjectVec::iterator iterLCObjVec = lcObjVec.begin();
2011 FloatVec::iterator iterFloatVec = floatVec.begin();
2013 for(iterLCObjVec=lcObjVec.begin(); iterLCObjVec!=lcObjVec.end();
2014 iterLCObjVec++, iterFloatVec++)
2016 EVENT::SimTrackerHit * simHit =
dynamic_cast<EVENT::SimTrackerHit *
>(*iterLCObjVec);
2017 float weight = *iterFloatVec;
2019 iterChMap->second->updateSimHitMap(simHit, weight);
2029 for(SensorStripMap::iterator iterSMap=sensorMap.begin();
2030 iterSMap!=sensorMap.end(); iterSMap++)
2034 for(StripChargeMap::iterator iterChMap=iterSMap->second[
STRIPFRONT].begin();
2035 iterChMap!=iterSMap->second[
STRIPFRONT].end(); iterChMap++)
2037 delete iterChMap->second;
2040 for(StripChargeMap::iterator iterChMap=iterSMap->second[
STRIPREAR].begin();
2041 iterChMap!=iterSMap->second[
STRIPREAR].end(); iterChMap++)
2043 delete iterChMap->second;
2047 delete [] iterSMap->second;
2061 streamlog_out(MESSAGE3) << std::endl
2065 <<
"SiStripClus parameters:"
2068 << std::endl << std::endl;
2070 streamlog_out(MESSAGE3) << std::setiosflags(std::ios::fixed | std::ios::internal )
2071 << std::setprecision(2)
2072 <<
" CMS noise [fC]: " << std::setw(4) <<
_CMSnoise/
fC << std::endl
2074 << std::setprecision(1)
2075 <<
" S/N cut for seed strips: " << std::setw(3) <<
_SNseed << std::endl
2076 <<
" S/N cut for adjacent strips: " << std::setw(3) <<
_SNadjacent << std::endl
2077 <<
" S/N cut for total charge: " << std::setw(3) <<
_SNtotal << std::endl
2078 << std::resetiosflags(std::ios::showpos)
2079 << std::setprecision(0)
2083 streamlog_out(MESSAGE3) <<
" Read-out pitch in R-Phi is 2x geom. pitch." << std::endl;
2085 streamlog_out(MESSAGE3) <<
" Read-out pitch in Z is 2x geom. pitch." << std::endl << std::endl;
2102 streamlog_out(MESSAGE2) <<
" Layer "
2107 << sensorID << std::endl;
2108 streamlog_out(MESSAGE2) <<
" Hit in local ref. system: "
2110 << std::setprecision(3)
2111 << std::setiosflags(std::ios::showpos)
2112 <<
"PosX [mm]: " << position.getX()/
mm <<
" "
2113 <<
"PosY [mm]: " << position.getY()/
mm <<
" "
2114 <<
"PosZ [mm]: " << position.getZ()/
mm
2115 << std::setprecision(0)
2116 << std::resetiosflags(std::ios::internal | std::ios::showpos)
2121 streamlog_out(MESSAGE2) <<
" Hit in global ref. system: "
2123 << std::setprecision(3)
2124 << std::setiosflags(std::ios::showpos)
2125 <<
"PosX [mm]: " << position.getX()/
mm <<
" "
2126 <<
"PosY [mm]: " << position.getY()/
mm <<
" "
2127 <<
"PosZ [mm]: " << position.getZ()/
mm
2128 << std::setprecision(0)
2129 << std::resetiosflags(std::ios::internal | std::ios::showpos)
virtual void end()
Method called after all data processing.
double getTime() const
Get time when the cluster has been created by a particle.
virtual double getSensorThick(short int layerID) const
Get sensor thickness.
static SiStripGeom * Build(const std::string &detector, const double &pitchFront, const double &pitchRear)
double _pitchRear
Pitch in the middle of the rear sensor.
virtual CLHEP::Hep3Vector transformPointToLocal(short int layerID, short int ladderID, short int sensorID, const CLHEP::Hep3Vector &point)=0
Transform given point from global ref. system to local ref. system (sensor)
void updateSimHitMap(SimTrackerHitMap simHitMap)
Update MC truth information about SimTrackerHits, which contributed.
float * calcResolution(const int &layerID, const double &hitTheta, const double &posZ)
Method calculating hit resolution, i.e. covariance matrix.
float _SNtotal
Signal to noise ratio cut for total cluster.
void updateMap(TrackerPulseImpl *pulse, SensorStripMap &sensorMap)
Method to update and store the Sensor strip map.
short int getSensorID() const
Get cluster sensor ID.
virtual void check(LCEvent *event)
Method called after each event - used for data checking.
ClsVec findClus(SensorStripMap &sensorMap)
Method searching for clusters - first, strips above _SNseed threshold, so-called seed strips...
virtual void processRunHeader(LCRunHeader *run)
Method called for each run - used for run header processing.
This class holds all information about strip clusters, where the strip cluster is defined as a bunch ...
float _TanOfAvgHLorentzShift
Tangent of holes' average Lorentz shift.
bool _floatStripsZ
Is every even strip floating in Z?
virtual double getSensorLength(short int layerID) const
Get sensor length.
std::string _outColName
LCIO output collection name.
std::vector< float > _resSVDOtherInZ
Mean strip resolution in Z - other layers; in [mm].
std::vector< float > _resSVDFirstInRPhi
Mean strip resolution in RPhi - 1st layer; in [mm].
void printProcessorParams() const
Method printing processor parameters.
std::map< int, StripChargeMap * > SensorStripMap
std::map< EVENT::SimTrackerHit *, float > SimTrackerHitMap
int getStripFront() const
Get front strip ID.
virtual void init()
Method called at the beginning of data processing - used for initialization.
std::string _relColNamePlsToSim
LCIO input relation collection name - TrackerPulse <-> SimTrkHit.
float _SNadjacent
Signal to noise ratio cut for adjacent strips.
const std::vector< std::string > ConstStringVec
virtual double getStripPosY(const int &layerID, const int &sensorID, const int &stripID, const double &posZ) const =0
Get strip y-position.
StripChargeMap & storeHitsAdjacents(StripChargeMap &clsStripsIn, It schmap, const It &endIt, StripChargeMap &cM)
Calculated and stored the hits adjacents.
Signal class holds all information that one gets from strip, pixel, etc ...
std::vector< float > _resSVDOtherInRPhi
Mean strip resolution in RPhi - other layers; in [mm].
const SimTrackerHitMap & getSimHitMap() const
Get MC truth information about SimTrackerHits, which contributed.
CLHEP::Hep3Vector get3PosSigma() const
Get cluster position Three vector.
virtual double getLadderThick(short int layerID) const
Get ladder thickness.
double getPosY() const
Get cluster position Y.
std::vector< float > _resSVDFirstInZ
Mean strip resolution in Z - 1st layer; in [mm].
virtual void processEvent(LCEvent *event)
Method called for each event - used for event data processing.
short int getLadderID() const
Get cluster ladder ID.
SiStripClus anSiStripClus
SiStripGeom * _geometry
All geometry information from Gear xml file.
void updateCharge(double charge)
Update signal.
virtual CLHEP::Hep3Vector getCrossLinePoint(const int &diskID, const int &sensorID, const int &stripIDFront, const int &stripIDRear) const =0
Get the point which crossed two strips.
double getCharge() const
Get cluster charge.
float _CMSnoise
Common mode subtracted noise, set in ENC.
short int getSize() const
Get cluster size.
bool _floatStripsRPhi
Is every even strip floating in R-Phi?
std::vector< LCCollection * > LCCollectionVec
std::string _inColName
LCIO input collection name.
virtual int cellID0withSensor0(const int &cellID0) const =0
Returns the input cellID0 where the field sensor is put to 0.
int getStripRear() const
Get rear strip ID.
virtual std::pair< StripType, int > decodeStripID(const int &encStripID) const =0
Decode stripID.
short int getLayerID() const
Get cluster layer ID.
std::vector< StripCluster * > ClsVec
std::map< int, Signal * > StripChargeMap
virtual double getLadderTheta(short int layerID) const =0
Get ladder rotation - theta angle.
virtual double getSensorPitch(const int &layerID, const int &sensorID, const double &posZ) const =0
Get sensor pitch.
std::pair< int, StripCluster * > StripClusterPair
virtual CLHEP::Hep3Vector transformPointToGlobal(short int layerID, short int ladderID, short int sensorID, const CLHEP::Hep3Vector &point)=0
Transform given point from local ref. system (sensor) to global ref. system.
void calcHits(ClsVec &clsVec, IMPL::LCCollectionVec *colOfTrkHits)
Method calculating hits from given clusters.
void printHitInfo(const StripCluster *pCluster) const
Method printing hit info.
virtual std::map< std::string, int > decodeCellID(const UTIL::BitField64 &cellDec) const =0
Encode cellID.
virtual int getLayerRealID(short int layerID) const
Get layer real ID.
double _pitchFront
Pitch in the middle of the front sensor.
LCRelationNavigator * _navigatorPls
virtual double getSensorWidthMax(short int layerID) const
Get sensor width (the wider one for forward-type sensors)
float _SNseed
Signal to noise ratio cut for seed strips.
virtual CLHEP::Hep3Vector transformVecToGlobal(short int layerID, short int ladderID, short int sensorID, const CLHEP::Hep3Vector &vec)=0
Transform given vector from local ref. system (sensor) to global ref. system.
std::map< int, std::map< StripType, std::vector< StripClusterPair > > > SensorStripClusterMap
void releaseMap(SensorStripMap &sensorMap)
Method to release memory of the SensorStripMap.
CLHEP::Hep3Vector get3Position() const
Get cluster position Three vector.
std::string _subdetector
Name of the subdetector to be clusterize.