ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitAna/scripts/SiPixelRecHits.patch
Revision: 1.1
Committed: Thu Nov 5 10:30:05 2009 UTC (15 years, 5 months ago) by loizides
Branch: MAIN
CVS Tags: Mit_032, Mit_031, Mit_025c_branch2, Mit_025c_branch1, Mit_030, Mit_029c, Mit_029b, Mit_030_pre1, Mit_029a, Mit_029, Mit_029_pre1, Mit_028a, Mit_025c_branch0, Mit_028, Mit_027a, Mit_027, Mit_026, Mit_025e, Mit_025d, Mit_025c, Mit_025b, Mit_025a, Mit_025, Mit_025pre2, Mit_024b, Mit_025pre1, Mit_024a, Mit_024, Mit_023, Mit_022a, Mit_022, Mit_020d, TMit_020d, Mit_020c, Mit_021, Mit_021pre2, Mit_021pre1, Mit_020b, Mit_020a, Mit_020, Mit_020pre1, Mit_018, Mit_017, Mit_017pre3, Mit_017pre2, Mit_017pre1, Mit_016, Mit_015b, Mit_015a, Mit_015, Mit_014e, Mit_014d, Mit_014c, Mit_014b, Mit_014a, Mit_014, Mit_014pre3, Mit_014pre2, Mit_014pre1, Mit_013d, Mit_013c, Mit_013b, Mit_013a, Mit_013, Mit_013pre1, Mit_012i, Mit_012h, Mit_012g, Mit_012f, Mit_012e, Mit_012d, Mit_012c, Mit_012b, Mit_012a, Mit_012, HEAD
Branch point for: Mit_025c_branch
Log Message:
Added SiPixelRecHits chain

File Contents

# User Rev Content
1 loizides 1.1 ? RecoLocalTracker/SiPixelRecHits/python/__init__.py
2     Index: RecoLocalTracker/SiPixelRecHits/interface/SiPixelRecHitConverter.h
3     ===================================================================
4     RCS file: /cvs_server/repositories/CMSSW/CMSSW/RecoLocalTracker/SiPixelRecHits/interface/SiPixelRecHitConverter.h,v
5     retrieving revision 1.22
6     diff -u -r1.22 SiPixelRecHitConverter.h
7     --- RecoLocalTracker/SiPixelRecHits/interface/SiPixelRecHitConverter.h 5 May 2009 20:29:31 -0000 1.22
8     +++ RecoLocalTracker/SiPixelRecHits/interface/SiPixelRecHitConverter.h 5 Nov 2009 09:37:51 -0000
9     @@ -33,7 +33,7 @@
10    
11     //--- Base class for CPEs:
12     #include "RecoLocalTracker/ClusterParameterEstimator/interface/PixelClusterParameterEstimator.h"
13     -//&&& #include "RecoLocalTracker/SiPixelRecHits/interface/PixelCPEBase.h"
14     +#include "RecoLocalTracker/SiPixelRecHits/interface/PixelCPEBase.h"
15    
16     //--- Geometry + DataFormats
17     #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
18     @@ -97,7 +97,7 @@
19     // TO DO: maybe allow a map of pointers?
20     std::string cpeName_; // what the user said s/he wanted
21     const PixelClusterParameterEstimator * cpe_; // what we got (for now, one ptr to base class)
22     - //&&& PixelCPEBase * cpe_; // what we got (for now, one ptr to base class)
23     + const PixelCPEBase * cpe2_; // what we got (for now, one ptr to base class)
24     bool ready_; // needed CPE's valid => good to go!
25     edm::InputTag src_;
26     int theVerboseLevel; // algorithm's verbosity
27     Index: RecoLocalTracker/SiPixelRecHits/plugins/SiPixelRecHitConverter.cc
28     ===================================================================
29     RCS file: /cvs_server/repositories/CMSSW/CMSSW/RecoLocalTracker/SiPixelRecHits/plugins/SiPixelRecHitConverter.cc,v
30     retrieving revision 1.14
31     diff -u -r1.14 SiPixelRecHitConverter.cc
32     --- RecoLocalTracker/SiPixelRecHits/plugins/SiPixelRecHitConverter.cc 5 May 2009 20:29:45 -0000 1.14
33     +++ RecoLocalTracker/SiPixelRecHits/plugins/SiPixelRecHitConverter.cc 5 Nov 2009 09:37:51 -0000
34     @@ -53,6 +53,7 @@
35     conf_(conf),
36     cpeName_("None"), // bogus
37     cpe_(0), // the default, in case we fail to make one
38     + cpe2_(0), // the default, in case we fail to make one
39     ready_(false), // since we obviously aren't
40     src_( conf.getParameter<edm::InputTag>( "src" ) ),
41     theVerboseLevel(conf.getUntrackedParameter<int>("VerboseLevel",0))
42     @@ -99,7 +100,10 @@
43     const PixelClusterParameterEstimator &cpe(*hCPE);
44     cpe_ = &cpe;
45    
46     - if(cpe_) ready_ = true;
47     + if(cpe_) {
48     + ready_ = true;
49     + cpe2_ = dynamic_cast<const PixelCPEBase *>(cpe_);
50     + }
51    
52    
53     // Step C: Iterate over DetIds and invoke the strip CPE algorithm
54     @@ -159,20 +163,14 @@
55     // Make a RecHit and add it to the DetSet
56     // old : recHitsOnDetUnit.push_back( new SiPixelRecHit( lp, le, detIdObject, &*clustIt) );
57     SiPixelRecHit hit( lp, le, detIdObject, cluster);
58     - #ifdef SIPIXELRECHIT_HAS_EXTRA_INFO
59     // Copy the extra stuff; unfortunately, only the derivatives of PixelCPEBase
60     // are capable of doing that. So until we get rid of CPEFromDetPosition
61     // we'll have to dynamic_cast :(
62     // &&& This cast can be moved to the setupCPE, so that it's done once per job.
63     - PixelCPEBase * cpeBase = dynamic_cast< PixelCPEBase* >( cpe_ );
64     - if (cpeBase) {
65     - hit.setProbabilityX( cpeBase->probabilityX() );
66     - hit.setProbabilityY( cpeBase->probabilityY() );
67     - hit.setQBin( cpeBase->qBin() );
68     - hit.setCotAlphaFromCluster( cpeBase->cotAlphaFromCluster() );
69     - hit.setCotBetaFromCluster ( cpeBase->cotBetaFromCluster() );
70     - }
71     - #endif
72     + //PixelCPEBase * cpeBase = dynamic_cast< PixelCPEBase* >( cpe_ );
73     + if (cpe2_) {
74     + hit.setRawQualityWord( cpe2_->rawQualityWord());
75     + }
76     //
77     // Now save it =================
78     recHitsOnDetUnit.push_back(hit);