77 std::cout <<
"SiTrackerGaussianSmearingRecHitConverter instantiated" << std::endl;
80 produces<FastTrackerRecHitCollection>();
81 produces<FastTrackerRecHitRefCollection>(
"simHit2RecHitMap");
93 if(trackingPSimHits)
std::cout <<
"### trackingPSimHits chosen " << trackingPSimHits << std::endl;
101 std::cout << (useCMSSWPixelParameterization?
"CMSSW" :
"ORCA") <<
" pixel parametrization chosen in config file." << std::endl;
156 std::cout <<
"RecHit local position error set to" <<
"\n"
157 <<
"\tTIB1\tx = " << localPositionResolution_TIB1x
158 <<
" cm\ty = " << localPositionResolution_TIB1y <<
" cm" <<
"\n"
159 <<
"\tTIB2\tx = " << localPositionResolution_TIB2x
160 <<
" cm\ty = " << localPositionResolution_TIB2y <<
" cm" <<
"\n"
161 <<
"\tTIB3\tx = " << localPositionResolution_TIB3x
162 <<
" cm\ty = " << localPositionResolution_TIB3y <<
" cm" <<
"\n"
163 <<
"\tTIB4\tx = " << localPositionResolution_TIB4x
164 <<
" cm\ty = " << localPositionResolution_TIB4y <<
" cm" <<
"\n"
165 <<
"\tTID1\tx = " << localPositionResolution_TID1x
166 <<
" cm\ty = " << localPositionResolution_TID1y <<
" cm" <<
"\n"
167 <<
"\tTID2\tx = " << localPositionResolution_TID2x
168 <<
" cm\ty = " << localPositionResolution_TID2y <<
" cm" <<
"\n"
169 <<
"\tTID3\tx = " << localPositionResolution_TID3x
170 <<
" cm\ty = " << localPositionResolution_TID3y <<
" cm" <<
"\n"
171 <<
"\tTOB1\tx = " << localPositionResolution_TOB1x
172 <<
" cm\ty = " << localPositionResolution_TOB1y <<
" cm" <<
"\n"
173 <<
"\tTOB2\tx = " << localPositionResolution_TOB2x
174 <<
" cm\ty = " << localPositionResolution_TOB2y <<
" cm" <<
"\n"
175 <<
"\tTOB3\tx = " << localPositionResolution_TOB3x
176 <<
" cm\ty = " << localPositionResolution_TOB3y <<
" cm" <<
"\n"
177 <<
"\tTOB4\tx = " << localPositionResolution_TOB4x
178 <<
" cm\ty = " << localPositionResolution_TOB4y <<
" cm" <<
"\n"
179 <<
"\tTOB5\tx = " << localPositionResolution_TOB5x
180 <<
" cm\ty = " << localPositionResolution_TOB5y <<
" cm" <<
"\n"
181 <<
"\tTOB6\tx = " << localPositionResolution_TOB6x
182 <<
" cm\ty = " << localPositionResolution_TOB6y <<
" cm" <<
"\n"
183 <<
"\tTEC1\tx = " << localPositionResolution_TEC1x
184 <<
" cm\ty = " << localPositionResolution_TEC1y <<
" cm" <<
"\n"
185 <<
"\tTEC2\tx = " << localPositionResolution_TEC2x
186 <<
" cm\ty = " << localPositionResolution_TEC2y <<
" cm" <<
"\n"
187 <<
"\tTEC3\tx = " << localPositionResolution_TEC3x
188 <<
" cm\ty = " << localPositionResolution_TEC3y <<
" cm" <<
"\n"
189 <<
"\tTEC4\tx = " << localPositionResolution_TEC4x
190 <<
" cm\ty = " << localPositionResolution_TEC4y <<
" cm" <<
"\n"
191 <<
"\tTEC5\tx = " << localPositionResolution_TEC5x
192 <<
" cm\ty = " << localPositionResolution_TEC5y <<
" cm" <<
"\n"
193 <<
"\tTEC6\tx = " << localPositionResolution_TEC6x
194 <<
" cm\ty = " << localPositionResolution_TEC6y <<
" cm" <<
"\n"
195 <<
"\tTEC7\tx = " << localPositionResolution_TEC7x
196 <<
" cm\ty = " << localPositionResolution_TEC7y <<
" cm" <<
"\n"
197 <<
"\tAll:\tz = " << localPositionResolution_z <<
" cm"
202 if(useCMSSWPixelParameterization) {
214 std::cout <<
"Pixel maximum multiplicity set to "
223 if(useCMSSWPixelParameterization) {
240 if(useCMSSWPixelParameterization) {
281 std::cout <<
"RecHit finding probability set to" <<
"\n"
283 <<
"\tPXF = " << theHitFindingProbability_PXF <<
"\n"
284 <<
"\tTIB1 = " << theHitFindingProbability_TIB1 <<
"\n"
285 <<
"\tTIB2 = " << theHitFindingProbability_TIB2 <<
"\n"
286 <<
"\tTIB3 = " << theHitFindingProbability_TIB3 <<
"\n"
287 <<
"\tTIB4 = " << theHitFindingProbability_TIB4 <<
"\n"
288 <<
"\tTID1 = " << theHitFindingProbability_TID1 <<
"\n"
289 <<
"\tTID2 = " << theHitFindingProbability_TID2 <<
"\n"
290 <<
"\tTID3 = " << theHitFindingProbability_TID3 <<
"\n"
291 <<
"\tTOB1 = " << theHitFindingProbability_TOB1 <<
"\n"
292 <<
"\tTOB2 = " << theHitFindingProbability_TOB2 <<
"\n"
293 <<
"\tTOB3 = " << theHitFindingProbability_TOB3 <<
"\n"
294 <<
"\tTOB4 = " << theHitFindingProbability_TOB4 <<
"\n"
295 <<
"\tTOB5 = " << theHitFindingProbability_TOB5 <<
"\n"
296 <<
"\tTOB6 = " << theHitFindingProbability_TOB6 <<
"\n"
297 <<
"\tTEC1 = " << theHitFindingProbability_TEC1 <<
"\n"
298 <<
"\tTEC2 = " << theHitFindingProbability_TEC2 <<
"\n"
299 <<
"\tTEC3 = " << theHitFindingProbability_TEC3 <<
"\n"
300 <<
"\tTEC4 = " << theHitFindingProbability_TEC4 <<
"\n"
301 <<
"\tTEC5 = " << theHitFindingProbability_TEC5 <<
"\n"
302 <<
"\tTEC6 = " << theHitFindingProbability_TEC6 <<
"\n"
303 <<
"\tTEC7 = " << theHitFindingProbability_TEC7 <<
"\n"
385 TFile* pixelDataFile,
386 unsigned int nMultiplicity,
388 std::vector<TH1F*>& theMultiplicityCumulativeProbabilities,
394 theMultiplicityCumulativeProbabilities.clear();
398 for(
unsigned int i = 0;
i<nMultiplicity; ++
i) {
399 TH1F addHist = *((TH1F*) pixelDataFile->Get( Form( histName_i.c_str() ,
i+1 )));
401 theMultiplicityCumulativeProbabilities.push_back(
new TH1F(addHist) );
405 sumHist = *(theMultiplicityCumulativeProbabilities[nMultiplicity+
i-1]);
407 sumHist = *(theMultiplicityCumulativeProbabilities[
i-1]);
408 sumHist.Add(&addHist);
409 theMultiplicityCumulativeProbabilities.push_back(
new TH1F(sumHist) );
415 const unsigned int maxMult = theMultiplicityCumulativeProbabilities.size();
416 unsigned int iMult, multSize;
429 std::cout <<
" Multiplicity cumulated probability " << histName << std::endl;
430 for(; iMult<multSize; ++iMult) {
431 for(
int iBin = 1; iBin<=theMultiplicityCumulativeProbabilities[iMult]->GetNbinsX(); ++iBin) {
433 <<
" Multiplicity " << iMult+1
436 << theMultiplicityCumulativeProbabilities[iMult]->GetBinLowEdge(iBin)
438 << (theMultiplicityCumulativeProbabilities[iMult])->GetBinContent(iBin)
480 magfield=&(*magField);
482 double magFieldAtCenter = magfield->
inTesla(center).
mag();
486 if(magFieldAtCenter > 3.9) {
507 disabledModules =
new std::vector<SiPixelQuality::disabledModuleType> ( siPixelBadModule->getBadComponentList() );
509 size_t numberOfRecoverableModules = 0;
517 if ( (*
disabledModules)[
id-numberOfRecoverableModules].errorType != 0 ){
520 numberOfRecoverableModules++;
531 std::cout <<
"Pixel maximum multiplicity set to "
538 std::cout <<
"Barrel Pixel resolution data are taken from file "
549 std::cout <<
"Forward Pixel resolution data are taken from file "
595 output_recHits->reserve(allTrackerHits.size());
603 for (
unsigned simHitCounter = 0;simHitCounter<allTrackerHits.size();++simHitCounter) {
605 const PSimHit & simHit = allTrackerHits[simHitCounter];
610 unsigned int geoId = det.
rawId();
622 bool isCreated =
smear(simHit, position, error,tTopo, &
random);
623 unsigned int subdet = det.subdetId();
633 error.
xy()+lape.xy(),
634 error.
yy()+lape.yy() );
642 recHit->addSimTrackId(simHit.
trackId());
643 recHit->setId(output_recHits->size());
644 output_recHits->push_back(recHit);
648 (*output_recHitRefs)[simHitCounter] =
FastTrackerRecHitRef(output_recHits_refProd,output_recHits->size()-1);
674 const Bounds& theBounds = theDetPlane.bounds();
675 double boundX = theBounds.
width()/2.;
676 double boundY = theBounds.
length()/2.;
680 <<
" rawid " << detid
688 localPositionResolution_z * localPositionResolution_z );
700 double hitFindingProbability = random->
flatShoot();
702 std::cout <<
" Hit finding probability draw: " << hitFindingProbability << std::endl;;
711 unsigned int theLayer = tTopo->
pxbLayer(detid);
712 std::cout <<
"\tPixel Barrel Layer " << theLayer << std::endl;
728 unsigned int theDisk = tTopo->
pxfDisk(detid);
729 std::cout <<
"\tPixel Forward Disk " << theDisk << std::endl;
744 unsigned int theLayer = tTopo->
tibLayer(detid);
746 std::cout <<
"\tTIB Layer " << theLayer << std::endl;
749 double resolutionX, resolutionY, resolutionZ;
784 <<
"\tTIB Layer not valid " << theLayer << std::endl;
802 unsigned int theRing = tTopo->
tidRing(detid);
803 double resolutionFactorY =
807 std::cout <<
"\tTID Ring " << theRing << std::endl;
809 double resolutionX, resolutionY, resolutionZ;
837 <<
"\tTID Ring not valid " << theRing << std::endl;
843 boundX *= resolutionFactorY;
856 unsigned int theLayer = tTopo->
tobLayer(detid);
858 std::cout <<
"\tTOB Layer " << theLayer << std::endl;
860 double resolutionX, resolutionY, resolutionZ;
909 <<
"\tTOB Layer not valid " << theLayer << std::endl;
925 unsigned int theRing = tTopo->
tecRing(detid);
926 double resolutionFactorY =
930 std::cout <<
"\tTEC Ring " << theRing << std::endl;
932 double resolutionX, resolutionY, resolutionZ;
988 <<
"\tTEC Ring not valid " << theRing << std::endl;
994 boundX *= resolutionFactorY;
1004 edm::LogError (
"SiTrackerGaussianSmearingRecHits") <<
"\tTracker subdetector not valid " << subdet << std::endl;
std::vector< TH1F * > theBarrelMultiplicityAlphaCumulativeProbabilities
T getParameter(std::string const &) const
const TrackerGeometry * misAlignedGeometry
virtual const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
std::string thePixelBarrelResolutionFileName
double localPositionResolution_TOB5y
double localPositionResolution_TIB2y
edm::EDGetTokenT< edm::PSimHitContainer > simHitToken
double localPositionResolution_TOB2y
SiStripGaussianSmearingRecHitConverterAlgorithm * theSiStripErrorParametrization
unsigned int nAlphaForward
virtual float length() const =0
unsigned int tibLayer(const DetId &id) const
unsigned int tidRing(const DetId &id) const
SiPixelGaussianSmearingRecHitConverterAlgorithm * thePixelEndcapParametrization
unsigned int nBetaForward
double flatShoot(double xmin=0.0, double xmax=1.0) const
double localPositionResolution_TIB3y
std::vector< TH1F * > theForwardMultiplicityAlphaCumulativeProbabilities
const Local3DPoint & getPosition() const
bool getByToken(EDGetToken token, Handle< PROD > &result) const
unsigned int resAlphaBarrel_binN
virtual GlobalVector inTesla(const GlobalPoint &gp) const =0
Field value ad specified global point, in Tesla.
double localPositionResolution_TOB4x
bool useCMSSWPixelParameterization
unsigned int pxfDisk(const DetId &id) const
double resAlphaBarrel_binMin
double theHitFindingProbability_TEC3
unsigned int tecRing(const DetId &id) const
ring id
double localPositionResolution_z
double theHitFindingProbability_TEC5
double localPositionResolution_TEC1y
double theHitFindingProbability_TIB2
double theHitFindingProbability_TID2
double resBetaBarrel_binWidth
double localPositionResolution_TEC6y
double theHitFindingProbability_TEC1
double theHitFindingProbability_TEC7
unsigned int resBetaForward_binN
double theHitFindingProbability_TOB5
double theHitFindingProbability_TOB3
double resAlphaForward_binWidth
double localPositionResolution_TID2x
double localPositionResolution_TOB3x
const Plane & surface() const
The nominal surface of the GeomDet.
edm::Ref< FastTrackerRecHitCollection > FastTrackerRecHitRef
double theHitFindingProbability_PXF
std::vector< TH1F * > theForwardMultiplicityBetaCumulativeProbabilities
double localPositionResolution_TID1y
double localPositionResolution_TOB3y
uint32_t rawId() const
get the raw id
double theHitFindingProbability_TEC2
double localPositionResolution_TEC4y
double localPositionResolution_TID2y
double theHitFindingProbability_TIB3
unsigned int resAlphaForward_binN
TFile * thePixelForwardResolutionFile
Local3DPoint localPosition() const
double localPositionResolution_TOB2x
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
double localPositionResolution_TOB1x
virtual ~SiTrackerGaussianSmearingRecHitConverter()
double localPositionResolution_TOB6y
bool smear(const PSimHit &simHit, Local3DPoint &position, LocalError &error, const TrackerTopology *tTopo, RandomEngineAndDistribution const *)
double localPositionResolution_TOB5x
double localPositionResolution_TEC1x
double theHitFindingProbability_TID3
double localPositionResolution_TIB1y
double localPositionResolution_TIB4x
double theHitFindingProbability_TEC6
SiPixelGaussianSmearingRecHitConverterAlgorithm * thePixelBarrelParametrization
std::vector< SiPixelQuality::disabledModuleType > * disabledModules
double theHitFindingProbability_TOB2
double resBetaForward_binWidth
const LocalError & getError() const
double localPositionResolution_TEC2y
unsigned int resBetaBarrel_binN
RefProd< PROD > getRefBeforePut()
double localPositionResolution_TEC4x
std::string thePixelMultiplicityFileName
const TrackerGeometry * geometry
unsigned int pxbLayer(const DetId &id) const
double resAlphaForward_binMin
std::string thePixelForwardResolutionFileName
double resAlphaBarrel_binWidth
virtual void produce(edm::Event &e, const edm::EventSetup &c) override
double theHitFindingProbability_TOB1
virtual void beginRun(edm::Run const &run, const edm::EventSetup &es) override
double localPositionResolution_TEC5y
SiTrackerGaussianSmearingRecHitConverter(const edm::ParameterSet &conf)
double localPositionResolution_TID3y
double theHitFindingProbability_TIB1
void smearHit(const PSimHit &simHit, const PixelGeomDetUnit *detUnit, const double boundX, const double boundY, RandomEngineAndDistribution const *)
double localPositionResolution_TOB4y
double localPositionResolution_TID1x
double resBetaBarrel_binMin
std::vector< FastTrackerRecHitRef > FastTrackerRecHitRefCollection
double resBetaForward_binMin
std::vector< TH1F * > theBarrelMultiplicityBetaCumulativeProbabilities
unsigned int nAlphaBarrel
double theHitFindingProbability_TIB4
TFile * thePixelBarrelResolutionFile
static int position[264][3]
double localPositionResolution_TEC2x
double localPositionResolution_TOB6x
StreamID streamID() const
double localPositionResolution_TEC7x
unsigned int trackId() const
double localPositionResolution_TOB1y
double localPositionResolution_TIB2x
double localPositionResolution_TID3x
double localPositionResolution_TIB1x
double localPositionResolution_TEC5x
std::vector< PSimHit > PSimHitContainer
double theHitFindingProbability_TEC4
double localPositionResolution_TEC7y
double theHitFindingProbability_PXB
double theHitFindingProbability_TOB4
unsigned int numberOfDisabledModules
double theHitFindingProbability_TOB6
double localPositionResolution_TIB4y
double localPositionResolution_TIB3x
virtual float width() const =0
double localPositionResolution_TEC3x
LocalError const & localAlignmentError() const
Return local alligment error.
double localPositionResolution_TEC3y
unsigned int detUnitId() const
unsigned int tobLayer(const DetId &id) const
Local3DPoint getPosition()
void smearHit(const PSimHit &simHit, double localPositionResolutionX, double localPositionResolutionY, double localPositionResolutionZ, double boundX, double boundY, RandomEngineAndDistribution const *)
double theHitFindingProbability_TID1
double localPositionResolution_TEC6x
virtual const TrackerGeomDet * idToDet(DetId) const
edm::InputTag simHitLabel