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 
36 
41 
46 
53 
55 
67 
69 
70 #include "TH1.h"
71 #include "TFile.h"
72 #include "TF1.h"
73 
74 
75 
76 
77 
78 
79 
80 
84 class LaserAlignment : public edm::EDProducer, public TObject {
85 
86  public:
87 
88  explicit LaserAlignment( edm::ParameterSet const& theConf );
90  virtual void beginJob( void );
91  virtual void produce( edm::Event&, edm::EventSetup const& );
92  virtual void endJob( void );
93  virtual void endRun( edm::Run&, const edm::EventSetup& );
94 
96  void testRoutine( void );
97 
98 
99  private:
100 
102  void fillDataProfiles( edm::Event const&, edm::EventSetup const& );
103 
106 
108  bool isTECBeam( void );
109  bool isATBeam( void );
110 
112  double getTIBTOBNominalBeamOffset( unsigned int, unsigned int, unsigned int );
113 
115  double getTEC2TECNominalBeamOffset( unsigned int, unsigned int, unsigned int );
116 
118  void fillDetectorId( void );
119 
121  double ConvertAngle( double );
122 
124  void CalculateNominalCoordinates( void );
125 
128 
130  void DumpStripFileSet( LASGlobalData<std::pair<float,float> >& );
131 
134 
137 
140 
143 
146 
149 
152 
155 
158 
161 
164 
167 
170 
171  // digi producer
172  std::vector<edm::ParameterSet> theDigiProducersList;
173 
176 
179 
181  std::string theFileName;
182 
184  std::vector<unsigned int> theMaskTecModules;
185  std::vector<unsigned int> theMaskAtModules;
186 
189 
190  // this object can judge if
191  // a LASModuleProfile is usable for position measurement
193 
194  // colection of constants
196 
197  // the detector ids for all the modules
199 
200  // the detector ids for the doubly hit modules in the TECs
201  std::vector<unsigned int> tecDoubleHitDetId;
202 
203  // all the 474 profiles for the pedestals
205 
208 
209  // summed data profiles
211 
212  // 474 names for retrieving data from the branches
214 
215  // number of accepted profiles for each module
217 
218  // hit map for the current event (int=0,1)
219  // which is needed for branching into AT or TEC mode
221 
222  // histograms for the summed profiles;
223  // these are needed for the fitting procedure (done by ROOT)
225 
226  // container for nominal module positions
228 
229  // a class for easy looping over LASGlobalData objects,
230  // avoids nested for-statements
232 
234  TFile * theFile;
235  TDirectory* singleModulesDir;
236 
241 
242 
244 
246 
248 
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
bool theSaveHistograms
config switch
void ApplyEndcapMaskingCorrections(LASGlobalData< LASCoordinateSet > &, LASGlobalData< LASCoordinateSet > &, LASEndcapAlignmentParameterSet &)
apply endcap correction to masked modules in TEC
bool misalignedByRefGeometry
config switch
std::string theAlignRecordName
bool isTECBeam(void)
decide whether TEC or AT beams have fired
LaserAlignment(edm::ParameterSet const &theConf)
virtual void endRun(edm::Run &, const edm::EventSetup &)
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)
std::vector< unsigned int > tecDoubleHitDetId
bool theApplyBeamKinkCorrections
config switch
void CalculateNominalCoordinates(void)
fills a LASGlobalData&lt;LASCoordinateSet&gt; with nominal module positions
std::string theErrorRecordName
virtual void endJob(void)
bool theStoreToDB
config switch
LASGlobalData< LASModuleProfile > pedestalProfiles
virtual void beginJob(void)
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
virtual void produce(edm::Event &, edm::EventSetup const &)
bool enableJudgeZeroFilter
config switch
edm::ESHandle< GeometricDet > gD
tracker geometry;
Definition: Run.h:33
LASGlobalLoop moduleLoop
LASProfileJudge judge
bool updateFromInputGeometry
config switch
bool theSetNominalStrips
config switch