CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LaserAlignment.h
Go to the documentation of this file.
1 
2 #ifndef LaserAlignment_LaserAlignment_H
3 #define LaserAlignment_LaserAlignment_H
4 
5 
17 #include <sstream>
18 #include <iostream>
19 #include <cmath>
20 
28 
35 
40 
45 
52 
54 
66 
68 
69 #include "TH1.h"
70 #include "TFile.h"
71 #include "TF1.h"
72 
73 
74 
75 
76 
77 
78 
79 
83 class LaserAlignment : public edm::one::EDProducer<edm::EndRunProducer>, public TObject {
84 
85  public:
86 
87  explicit LaserAlignment( edm::ParameterSet const& theConf );
89  virtual void beginJob() override;
90  virtual void produce( edm::Event&, edm::EventSetup const& ) override;
91  virtual void endJob() override;
92  virtual void endRunProduce(edm::Run&, const edm::EventSetup& ) override;
93 
95  void testRoutine( void );
96 
97 
98  private:
99 
101  void fillDataProfiles( edm::Event const&, edm::EventSetup const& );
102 
105 
107  bool isTECBeam( void );
108  bool isATBeam( void );
109 
111  double getTIBTOBNominalBeamOffset( unsigned int, unsigned int, unsigned int );
112 
114  double getTEC2TECNominalBeamOffset( unsigned int, unsigned int, unsigned int );
115 
117  void fillDetectorId( void );
118 
120  double ConvertAngle( double );
121 
123  void CalculateNominalCoordinates( void );
124 
127 
129  void DumpStripFileSet( LASGlobalData<std::pair<float,float> >& );
130 
133 
136 
139 
142 
145 
148 
151 
154 
157 
160 
163 
166 
169 
170  // digi producer
171  std::vector<edm::ParameterSet> theDigiProducersList;
172 
175 
178 
181 
183  std::vector<unsigned int> theMaskTecModules;
184  std::vector<unsigned int> theMaskAtModules;
185 
188 
189  // this object can judge if
190  // a LASModuleProfile is usable for position measurement
192 
193  // colection of constants
195 
196  // the detector ids for all the modules
198 
199  // the detector ids for the doubly hit modules in the TECs
200  std::vector<unsigned int> tecDoubleHitDetId;
201 
202  // all the 474 profiles for the pedestals
204 
207 
208  // summed data profiles
210 
211  // 474 names for retrieving data from the branches
213 
214  // number of accepted profiles for each module
216 
217  // hit map for the current event (int=0,1)
218  // which is needed for branching into AT or TEC mode
220 
221  // histograms for the summed profiles;
222  // these are needed for the fitting procedure (done by ROOT)
224 
225  // container for nominal module positions
227 
228  // a class for easy looping over LASGlobalData objects,
229  // avoids nested for-statements
231 
233  TFile * theFile;
234  TDirectory* singleModulesDir;
235 
240 
241 
243 
245 
247 
249 };
250 #endif
bool isATBeam(void)
unsigned int judgeOverdriveThreshold
config parameters for the LASProfileJudge
void fillDataProfiles(edm::Event const &, edm::EventSetup const &)
fill profiles from SiStrip(Raw)Digi container
virtual void beginJob() override
const edm::ParameterSet theParameterSet
bool theSaveHistograms
config switch
void ApplyEndcapMaskingCorrections(LASGlobalData< LASCoordinateSet > &, LASGlobalData< LASCoordinateSet > &, LASEndcapAlignmentParameterSet &)
apply endcap correction to masked modules in TEC
virtual void produce(edm::Event &, edm::EventSetup const &) override
bool misalignedByRefGeometry
config switch
std::string theAlignRecordName
bool isTECBeam(void)
decide whether TEC or AT beams have fired
LaserAlignment(edm::ParameterSet const &theConf)
double getTIBTOBNominalBeamOffset(unsigned int, unsigned int, unsigned int)
returns the nominal beam position (strips) in TOB for the profileJudge
edm::ESHandle< TrackerGeometry > theTrackerGeometry
double peakFinderThreshold
config parameter
void DumpHitmaps(LASGlobalData< int > &)
for debugging only, will disappear
void DumpPosFileSet(LASGlobalData< LASCoordinateSet > &)
for debugging only, will disappear
LASGlobalData< int > numberOfAcceptedProfiles
bool theDoPedestalSubtraction
config switch
LASGlobalData< LASModuleProfile > currentDataProfiles
data profiles for the current event
std::vector< unsigned int > theMaskTecModules
config parameters
bool theUseMinuitAlgorithm
config switch
TFile * theFile
Tree stuff.
LASGlobalData< int > isAcceptedProfile
std::vector< edm::ParameterSet > theDigiProducersList
void DumpStripFileSet(LASGlobalData< std::pair< float, float > > &)
for debugging only, will disappear
void fillPedestalProfiles(edm::ESHandle< SiStripPedestals > &)
fill pedestals from dbase
LASGlobalData< TH1D * > summedHistograms
TDirectory * singleModulesDir
double ConvertAngle(double)
convert an angle in the [-pi,pi] range to the [0,2*pi] range
edm::ESHandle< Alignments > theGlobalPositionRcd
std::string theFileName
config parameter (histograms file output name)
virtual void endJob() override
std::vector< unsigned int > tecDoubleHitDetId
virtual void endRunProduce(edm::Run &, const edm::EventSetup &) override
bool theApplyBeamKinkCorrections
config switch
void CalculateNominalCoordinates(void)
fills a LASGlobalData&lt;LASCoordinateSet&gt; with nominal module positions
std::string theErrorRecordName
bool theStoreToDB
config switch
LASGlobalData< LASModuleProfile > pedestalProfiles
LASGlobalData< LASCoordinateSet > nominalCoordinates
AlignableTracker * theAlignableTracker
int theEvents
counter for the total number of events processed
LASConstants theLasConstants
double getTEC2TECNominalBeamOffset(unsigned int, unsigned int, unsigned int)
returns the nominal beam position (strips) in TEC (AT) for the profileJudge
LASGlobalData< std::string > theProfileNames
std::vector< unsigned int > theMaskAtModules
void ApplyATMaskingCorrections(LASGlobalData< LASCoordinateSet > &, LASGlobalData< LASCoordinateSet > &, LASBarrelAlignmentParameterSet &)
same for alignment tube modules
void testRoutine(void)
for debugging &amp; testing only, will disappear..
LASGlobalData< LASModuleProfile > collectedDataProfiles
void fillDetectorId(void)
fill hard coded detIds
int theCompression
config parameter (histograms file compression level)
LASGlobalData< unsigned int > detectorId
bool enableJudgeZeroFilter
config switch
edm::ESHandle< GeometricDet > gD
tracker geometry;
Definition: Run.h:36
LASGlobalLoop moduleLoop
LASProfileJudge judge
bool updateFromInputGeometry
config switch
bool theSetNominalStrips
config switch