CMS 3D CMS Logo

LaserAlignment.h
Go to the documentation of this file.
1 
2 #ifndef LaserAlignment_LaserAlignment_H
3 #define LaserAlignment_LaserAlignment_H
4 
14 #include <sstream>
15 #include <iostream>
16 #include <cmath>
17 
25 
32 
37 
42 
49 
51 
63 
65 
66 #include "TH1.h"
67 #include "TFile.h"
68 #include "TF1.h"
69 
73 class LaserAlignment : public edm::one::EDProducer<edm::EndRunProducer> {
74 public:
75  explicit LaserAlignment(edm::ParameterSet const& theConf);
76  ~LaserAlignment() override;
77  void beginJob() override;
78  void produce(edm::Event&, edm::EventSetup const&) override;
79  void endJob() override;
80  void endRunProduce(edm::Run&, const edm::EventSetup&) override;
81 
83  void testRoutine(void);
84 
85 private:
87  void fillDataProfiles(edm::Event const&, edm::EventSetup const&);
88 
91 
93  bool isTECBeam(void);
94  bool isATBeam(void);
95 
97  double getTIBTOBNominalBeamOffset(unsigned int, unsigned int, unsigned int);
98 
100  double getTEC2TECNominalBeamOffset(unsigned int, unsigned int, unsigned int);
101 
103  void fillDetectorId(void);
104 
106  double ConvertAngle(double);
107 
109  void CalculateNominalCoordinates(void);
110 
113 
115  void DumpStripFileSet(LASGlobalData<std::pair<float, float> >&);
116 
119 
124 
129 
132 
135 
138 
141 
144 
147 
150 
153 
156 
159 
160  // digi producer
161  std::vector<edm::ParameterSet> theDigiProducersList;
162 
165 
168 
171 
173  std::vector<unsigned int> theMaskTecModules;
174  std::vector<unsigned int> theMaskAtModules;
175 
178 
179  // this object can judge if
180  // a LASModuleProfile is usable for position measurement
182 
183  // colection of constants
185 
186  // the detector ids for all the modules
188 
189  // the detector ids for the doubly hit modules in the TECs
190  std::vector<unsigned int> tecDoubleHitDetId;
191 
192  // all the 474 profiles for the pedestals
194 
197 
198  // summed data profiles
200 
201  // 474 names for retrieving data from the branches
203 
204  // number of accepted profiles for each module
206 
207  // hit map for the current event (int=0,1)
208  // which is needed for branching into AT or TEC mode
210 
211  // histograms for the summed profiles;
212  // these are needed for the fitting procedure (done by ROOT)
214 
215  // container for nominal module positions
217 
218  // a class for easy looping over LASGlobalData objects,
219  // avoids nested for-statements
221 
223  TFile* theFile;
224  TDirectory* singleModulesDir;
225 
230 
232 
234 
236 };
237 #endif
LaserAlignment
Definition: LaserAlignment.h:73
LaserAlignment::pedestalProfiles
LASGlobalData< LASModuleProfile > pedestalProfiles
Definition: LaserAlignment.h:193
GlobalPositionRcd.h
LASBarrelAlgorithm.h
LaserAlignment::CalculateNominalCoordinates
void CalculateNominalCoordinates(void)
fills a LASGlobalData<LASCoordinateSet> with nominal module positions
Definition: LaserAlignment.cc:1325
LaserAlignment::theUseMinuitAlgorithm
bool theUseMinuitAlgorithm
config switch
Definition: LaserAlignment.h:137
EDProducer.h
StripGeomDetUnit.h
MessageLogger.h
LaserAlignment::theSaveHistograms
bool theSaveHistograms
config switch
Definition: LaserAlignment.h:164
TrackerGeometry.h
ESHandle.h
LASEndcapAlignmentParameterSet
Definition: LASEndcapAlignmentParameterSet.h:25
edm::Run
Definition: Run.h:45
LaserAlignment::ApplyATMaskingCorrections
void ApplyATMaskingCorrections(LASGlobalData< LASCoordinateSet > &, LASGlobalData< LASCoordinateSet > &, LASBarrelAlignmentParameterSet &)
same for alignment tube modules
Definition: LaserAlignment.cc:1618
LaserAlignment::theFile
TFile * theFile
Tree stuff.
Definition: LaserAlignment.h:223
SiStripRawDigi.h
LaserAlignment::isTECBeam
bool isTECBeam(void)
decide whether TEC or AT beams have fired
Definition: LaserAlignment.cc:1218
LASGlobalData< LASCoordinateSet >
LaserAlignment::LaserAlignment
LaserAlignment(edm::ParameterSet const &theConf)
Definition: LaserAlignment.cc:19
DetectorGlobalPosition.h
SiStripDetId.h
LaserAlignment::gD
edm::ESHandle< GeometricDet > gD
tracker geometry;
Definition: LaserAlignment.h:227
LASAlignmentTubeAlgorithm.h
edm::one::EDProducer
Definition: EDProducer.h:30
LASGlobalLoop
Definition: LASGlobalLoop.h:24
LaserAlignment::theFileName
std::string theFileName
config parameter (histograms file output name)
Definition: LaserAlignment.h:170
LaserAlignment::summedHistograms
LASGlobalData< TH1D * > summedHistograms
Definition: LaserAlignment.h:213
StripTopology.h
LaserAlignment::isAcceptedProfile
LASGlobalData< int > isAcceptedProfile
Definition: LaserAlignment.h:209
TkLasBeam.h
LaserAlignment::theMaskTecModules
std::vector< unsigned int > theMaskTecModules
config parameters
Definition: LaserAlignment.h:173
LaserAlignment::endRunProduce
void endRunProduce(edm::Run &, const edm::EventSetup &) override
Definition: LaserAlignment.cc:483
LaserAlignment::theProfileNames
LASGlobalData< std::string > theProfileNames
Definition: LaserAlignment.h:202
LaserAlignment::theAlignableTracker
AlignableTracker * theAlignableTracker
Definition: LaserAlignment.h:231
SiStripLaserRecHit2D.h
LaserAlignment::~LaserAlignment
~LaserAlignment() override
Definition: LaserAlignment.cc:109
PoolDBOutputService.h
LaserAlignment::theApplyBeamKinkCorrections
bool theApplyBeamKinkCorrections
config switch
Definition: LaserAlignment.h:140
LASModuleProfile.h
Service.h
LaserAlignment::numberOfAcceptedProfiles
LASGlobalData< int > numberOfAcceptedProfiles
Definition: LaserAlignment.h:205
SiStripDigi.h
LaserAlignment::singleModulesDir
TDirectory * singleModulesDir
Definition: LaserAlignment.h:224
LaserAlignment::theAlignRecordName
std::string theAlignRecordName
Definition: LaserAlignment.h:233
LaserAlignment::enableJudgeZeroFilter
bool enableJudgeZeroFilter
config switch
Definition: LaserAlignment.h:146
edm::ESHandle< SiStripPedestals >
AlignableTracker
Definition: AlignableTracker.h:17
SiStripPedestalsRcd.h
LaserAlignment::DumpStripFileSet
void DumpStripFileSet(LASGlobalData< std::pair< float, float > > &)
for debugging only, will disappear
Definition: LaserAlignment.cc:1479
LaserAlignment::fillDetectorId
void fillDetectorId(void)
fill hard coded detIds
Definition: LaserAlignmentFillDetId.cc:7
LASGlobalLoop.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LaserAlignment::produce
void produce(edm::Event &, edm::EventSetup const &) override
Definition: LaserAlignment.cc:271
TrackerDigiGeometryRecord.h
LaserAlignment::moduleLoop
LASGlobalLoop moduleLoop
Definition: LaserAlignment.h:220
edm::ParameterSet
Definition: ParameterSet.h:47
LaserAlignment::theSetNominalStrips
bool theSetNominalStrips
config switch
Definition: LaserAlignment.h:177
LaserAlignment::theCompression
int theCompression
config parameter (histograms file compression level)
Definition: LaserAlignment.h:167
Event.h
LaserAlignment::misalignedByRefGeometry
bool misalignedByRefGeometry
config switch
Definition: LaserAlignment.h:155
LaserAlignment::getTIBTOBNominalBeamOffset
double getTIBTOBNominalBeamOffset(unsigned int, unsigned int, unsigned int)
returns the nominal beam position (strips) in TOB for the profileJudge
Definition: LaserAlignment.cc:1272
LaserAlignment::theStoreToDB
bool theStoreToDB
config switch
Definition: LaserAlignment.h:158
LaserAlignment::testRoutine
void testRoutine(void)
for debugging & testing only, will disappear..
Definition: LaserAlignment.cc:1679
LaserAlignment::ApplyEndcapMaskingCorrections
void ApplyEndcapMaskingCorrections(LASGlobalData< LASCoordinateSet > &, LASGlobalData< LASCoordinateSet > &, LASEndcapAlignmentParameterSet &)
apply endcap correction to masked modules in TEC
Definition: LaserAlignment.cc:1578
LaserAlignment::updateFromInputGeometry
bool updateFromInputGeometry
config switch
Definition: LaserAlignment.h:152
LASBarrelAlignmentParameterSet
Definition: LASBarrelAlignmentParameterSet.h:23
LaserAlignment::firstEvent_
bool firstEvent_
Definition: LaserAlignment.h:235
LaserAlignment::peakFinderThreshold
double peakFinderThreshold
config parameter
Definition: LaserAlignment.h:143
LaserAlignment::judgeOverdriveThreshold
unsigned int judgeOverdriveThreshold
config parameters for the LASProfileJudge
Definition: LaserAlignment.h:149
LaserAlignment::isATBeam
bool isATBeam(void)
Definition: LaserAlignment.cc:1245
edm::EventSetup
Definition: EventSetup.h:57
LASGeometryUpdater.h
DetSetVector.h
LASEndcapAlgorithm.h
LaserAlignment::detectorId
LASGlobalData< unsigned int > detectorId
Definition: LaserAlignment.h:187
LaserAlignment::currentDataProfiles
LASGlobalData< LASModuleProfile > currentDataProfiles
data profiles for the current event
Definition: LaserAlignment.h:196
LaserAlignment::DumpHitmaps
void DumpHitmaps(LASGlobalData< int > &)
for debugging only, will disappear
Definition: LaserAlignment.cc:1524
LaserAlignment::theDoPedestalSubtraction
bool theDoPedestalSubtraction
config switch
Definition: LaserAlignment.h:134
LaserAlignment::theGlobalPositionRcd
edm::ESHandle< Alignments > theGlobalPositionRcd
Definition: LaserAlignment.h:229
LaserAlignment::DumpPosFileSet
void DumpPosFileSet(LASGlobalData< LASCoordinateSet > &)
for debugging only, will disappear
Definition: LaserAlignment.cc:1434
LaserAlignment::fillDataProfiles
void fillDataProfiles(edm::Event const &, edm::EventSetup const &)
fill profiles from SiStrip(Raw)Digi container
Definition: LaserAlignment.cc:934
LaserAlignment::theEvents
int theEvents
counter for the total number of events processed
Definition: LaserAlignment.h:131
ErrorFrameTransformer.h
GeometryAligner.h
LaserAlignment::getTEC2TECNominalBeamOffset
double getTEC2TECNominalBeamOffset(unsigned int, unsigned int, unsigned int)
returns the nominal beam position (strips) in TEC (AT) for the profileJudge
Definition: LaserAlignment.cc:1307
LaserAlignment::judge
LASProfileJudge judge
Definition: LaserAlignment.h:181
DetId.h
LaserAlignment::beginJob
void beginJob() override
Definition: LaserAlignment.cc:123
LASGlobalData.h
LaserAlignment::theTrackerGeometry
edm::ESHandle< TrackerGeometry > theTrackerGeometry
Definition: LaserAlignment.h:228
LaserAlignment::tecDoubleHitDetId
std::vector< unsigned int > tecDoubleHitDetId
Definition: LaserAlignment.h:190
SiStripPedestals.h
LaserAlignment::nominalCoordinates
LASGlobalData< LASCoordinateSet > nominalCoordinates
Definition: LaserAlignment.h:216
EventSetup.h
TrackerGeomBuilderFromGeometricDet.h
LASPeakFinder.h
AlignableTracker.h
LaserAlignment::theErrorRecordName
std::string theErrorRecordName
Definition: LaserAlignment.h:233
LASProfileJudge
Definition: LASProfileJudge.h:14
ParameterSet.h
LaserAlignment::fillPedestalProfiles
void fillPedestalProfiles(edm::ESHandle< SiStripPedestals > &)
fill pedestals from dbase
Definition: LaserAlignment.cc:1166
LaserAlignment::endJob
void endJob() override
Definition: LaserAlignment.cc:928
LaserAlignment::ConvertAngle
double ConvertAngle(double)
convert an angle in the [-pi,pi] range to the [0,2*pi] range
Definition: LaserAlignment.cc:1419
LASConstants
Definition: LASConstants.h:10
edm::Event
Definition: Event.h:73
LaserAlignment::theMaskAtModules
std::vector< unsigned int > theMaskAtModules
Definition: LaserAlignment.h:174
LASCoordinateSet.h
LaserAlignment::theDigiProducersList
std::vector< edm::ParameterSet > theDigiProducersList
Definition: LaserAlignment.h:161
GlobalPoint.h
StripSubdetector.h
LASProfileJudge.h
LaserAlignment::collectedDataProfiles
LASGlobalData< LASModuleProfile > collectedDataProfiles
Definition: LaserAlignment.h:199
LaserAlignment::theLasConstants
LASConstants theLasConstants
Definition: LaserAlignment.h:184
LASConstants.h