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 
137 
140 
143 
146 
149 
152 
155 
158 
161 
164 
167 
168  // digi producer
169  std::vector<edm::ParameterSet> theDigiProducersList;
170 
173 
176 
179 
181  std::vector<unsigned int> theMaskTecModules;
182  std::vector<unsigned int> theMaskAtModules;
183 
186 
187  // this object can judge if
188  // a LASModuleProfile is usable for position measurement
190 
191  // colection of constants
193 
194  // the detector ids for all the modules
196 
197  // the detector ids for the doubly hit modules in the TECs
198  std::vector<unsigned int> tecDoubleHitDetId;
199 
200  // all the 474 profiles for the pedestals
202 
205 
206  // summed data profiles
208 
209  // 474 names for retrieving data from the branches
211 
212  // number of accepted profiles for each module
214 
215  // hit map for the current event (int=0,1)
216  // which is needed for branching into AT or TEC mode
218 
219  // histograms for the summed profiles;
220  // these are needed for the fitting procedure (done by ROOT)
222 
223  // container for nominal module positions
225 
226  // a class for easy looping over LASGlobalData objects,
227  // avoids nested for-statements
229 
231  TFile* theFile;
232  TDirectory* singleModulesDir;
233 
238 
240 
242 
244 };
245 #endif
LaserAlignment
Definition: LaserAlignment.h:73
LaserAlignment::pedestalProfiles
LASGlobalData< LASModuleProfile > pedestalProfiles
Definition: LaserAlignment.h:201
GlobalPositionRcd.h
LASBarrelAlgorithm.h
LaserAlignment::CalculateNominalCoordinates
void CalculateNominalCoordinates(void)
fills a LASGlobalData<LASCoordinateSet> with nominal module positions
Definition: LaserAlignment.cc:1327
LaserAlignment::theUseMinuitAlgorithm
bool theUseMinuitAlgorithm
config switch
Definition: LaserAlignment.h:145
EDProducer.h
StripGeomDetUnit.h
MessageLogger.h
LaserAlignment::theSaveHistograms
bool theSaveHistograms
config switch
Definition: LaserAlignment.h:172
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:1620
LaserAlignment::theFile
TFile * theFile
Tree stuff.
Definition: LaserAlignment.h:231
SiStripRawDigi.h
LaserAlignment::isTECBeam
bool isTECBeam(void)
decide whether TEC or AT beams have fired
Definition: LaserAlignment.cc:1220
LASGlobalData< LASCoordinateSet >
LaserAlignment::LaserAlignment
LaserAlignment(edm::ParameterSet const &theConf)
Definition: LaserAlignment.cc:19
DetectorGlobalPosition.h
SiStripDetId.h
LaserAlignment::geomToken_
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > geomToken_
Definition: LaserAlignment.h:132
LaserAlignment::gD
edm::ESHandle< GeometricDet > gD
tracker geometry;
Definition: LaserAlignment.h:235
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:178
LaserAlignment::summedHistograms
LASGlobalData< TH1D * > summedHistograms
Definition: LaserAlignment.h:221
StripTopology.h
LaserAlignment::isAcceptedProfile
LASGlobalData< int > isAcceptedProfile
Definition: LaserAlignment.h:217
TkLasBeam.h
LaserAlignment::theMaskTecModules
std::vector< unsigned int > theMaskTecModules
config parameters
Definition: LaserAlignment.h:181
LaserAlignment::endRunProduce
void endRunProduce(edm::Run &, const edm::EventSetup &) override
Definition: LaserAlignment.cc:485
LaserAlignment::theProfileNames
LASGlobalData< std::string > theProfileNames
Definition: LaserAlignment.h:210
LaserAlignment::theAlignableTracker
AlignableTracker * theAlignableTracker
Definition: LaserAlignment.h:239
SiStripLaserRecHit2D.h
LaserAlignment::~LaserAlignment
~LaserAlignment() override
Definition: LaserAlignment.cc:115
PoolDBOutputService.h
LaserAlignment::theApplyBeamKinkCorrections
bool theApplyBeamKinkCorrections
config switch
Definition: LaserAlignment.h:148
LaserAlignment::geomDetToken_
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > geomDetToken_
Definition: LaserAlignment.h:133
LASModuleProfile.h
Service.h
LaserAlignment::numberOfAcceptedProfiles
LASGlobalData< int > numberOfAcceptedProfiles
Definition: LaserAlignment.h:213
SiStripDigi.h
LaserAlignment::singleModulesDir
TDirectory * singleModulesDir
Definition: LaserAlignment.h:232
LaserAlignment::theAlignRecordName
std::string theAlignRecordName
Definition: LaserAlignment.h:241
LaserAlignment::enableJudgeZeroFilter
bool enableJudgeZeroFilter
config switch
Definition: LaserAlignment.h:154
edm::ESHandle
Definition: DTSurvey.h:22
AlignableTracker
Definition: AlignableTracker.h:17
SiStripPedestalsRcd.h
LaserAlignment::DumpStripFileSet
void DumpStripFileSet(LASGlobalData< std::pair< float, float > > &)
for debugging only, will disappear
Definition: LaserAlignment.cc:1481
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:277
TrackerDigiGeometryRecord.h
LaserAlignment::moduleLoop
LASGlobalLoop moduleLoop
Definition: LaserAlignment.h:228
LaserAlignment::gprToken_
const edm::ESGetToken< Alignments, GlobalPositionRcd > gprToken_
Definition: LaserAlignment.h:135
edm::ParameterSet
Definition: ParameterSet.h:47
LaserAlignment::theSetNominalStrips
bool theSetNominalStrips
config switch
Definition: LaserAlignment.h:185
LaserAlignment::theCompression
int theCompression
config parameter (histograms file compression level)
Definition: LaserAlignment.h:175
Event.h
LaserAlignment::misalignedByRefGeometry
bool misalignedByRefGeometry
config switch
Definition: LaserAlignment.h:163
LaserAlignment::getTIBTOBNominalBeamOffset
double getTIBTOBNominalBeamOffset(unsigned int, unsigned int, unsigned int)
returns the nominal beam position (strips) in TOB for the profileJudge
Definition: LaserAlignment.cc:1274
LaserAlignment::theStoreToDB
bool theStoreToDB
config switch
Definition: LaserAlignment.h:166
LaserAlignment::testRoutine
void testRoutine(void)
for debugging & testing only, will disappear..
Definition: LaserAlignment.cc:1681
LaserAlignment::ApplyEndcapMaskingCorrections
void ApplyEndcapMaskingCorrections(LASGlobalData< LASCoordinateSet > &, LASGlobalData< LASCoordinateSet > &, LASEndcapAlignmentParameterSet &)
apply endcap correction to masked modules in TEC
Definition: LaserAlignment.cc:1580
LaserAlignment::updateFromInputGeometry
bool updateFromInputGeometry
config switch
Definition: LaserAlignment.h:160
LASBarrelAlignmentParameterSet
Definition: LASBarrelAlignmentParameterSet.h:23
LaserAlignment::firstEvent_
bool firstEvent_
Definition: LaserAlignment.h:243
LaserAlignment::peakFinderThreshold
double peakFinderThreshold
config parameter
Definition: LaserAlignment.h:151
LaserAlignment::judgeOverdriveThreshold
unsigned int judgeOverdriveThreshold
config parameters for the LASProfileJudge
Definition: LaserAlignment.h:157
LaserAlignment::isATBeam
bool isATBeam(void)
Definition: LaserAlignment.cc:1247
edm::EventSetup
Definition: EventSetup.h:58
LASGeometryUpdater.h
DetSetVector.h
LASEndcapAlgorithm.h
LaserAlignment::detectorId
LASGlobalData< unsigned int > detectorId
Definition: LaserAlignment.h:195
LaserAlignment::currentDataProfiles
LASGlobalData< LASModuleProfile > currentDataProfiles
data profiles for the current event
Definition: LaserAlignment.h:204
LaserAlignment::DumpHitmaps
void DumpHitmaps(LASGlobalData< int > &)
for debugging only, will disappear
Definition: LaserAlignment.cc:1526
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd >
LaserAlignment::theDoPedestalSubtraction
bool theDoPedestalSubtraction
config switch
Definition: LaserAlignment.h:142
LaserAlignment::theGlobalPositionRcd
edm::ESHandle< Alignments > theGlobalPositionRcd
Definition: LaserAlignment.h:237
LaserAlignment::DumpPosFileSet
void DumpPosFileSet(LASGlobalData< LASCoordinateSet > &)
for debugging only, will disappear
Definition: LaserAlignment.cc:1436
LaserAlignment::fillDataProfiles
void fillDataProfiles(edm::Event const &, edm::EventSetup const &)
fill profiles from SiStrip(Raw)Digi container
Definition: LaserAlignment.cc:936
LaserAlignment::theEvents
int theEvents
counter for the total number of events processed
Definition: LaserAlignment.h:139
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:1309
LaserAlignment::judge
LASProfileJudge judge
Definition: LaserAlignment.h:189
DetId.h
LaserAlignment::beginJob
void beginJob() override
Definition: LaserAlignment.cc:129
LASGlobalData.h
LaserAlignment::stripPedestalsToken_
const edm::ESGetToken< SiStripPedestals, SiStripPedestalsRcd > stripPedestalsToken_
Definition: LaserAlignment.h:136
LaserAlignment::theTrackerGeometry
edm::ESHandle< TrackerGeometry > theTrackerGeometry
Definition: LaserAlignment.h:236
LaserAlignment::topoToken_
const edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > topoToken_
Tokens for ESconsumes.
Definition: LaserAlignment.h:131
LaserAlignment::tecDoubleHitDetId
std::vector< unsigned int > tecDoubleHitDetId
Definition: LaserAlignment.h:198
SiStripPedestals.h
LaserAlignment::nominalCoordinates
LASGlobalData< LASCoordinateSet > nominalCoordinates
Definition: LaserAlignment.h:224
EventSetup.h
TrackerGeomBuilderFromGeometricDet.h
LASPeakFinder.h
AlignableTracker.h
LaserAlignment::theErrorRecordName
std::string theErrorRecordName
Definition: LaserAlignment.h:241
LASProfileJudge
Definition: LASProfileJudge.h:14
ParameterSet.h
LaserAlignment::fillPedestalProfiles
void fillPedestalProfiles(edm::ESHandle< SiStripPedestals > &)
fill pedestals from dbase
Definition: LaserAlignment.cc:1168
LaserAlignment::endJob
void endJob() override
Definition: LaserAlignment.cc:930
LaserAlignment::ConvertAngle
double ConvertAngle(double)
convert an angle in the [-pi,pi] range to the [0,2*pi] range
Definition: LaserAlignment.cc:1421
LASConstants
Definition: LASConstants.h:10
edm::Event
Definition: Event.h:73
LaserAlignment::theMaskAtModules
std::vector< unsigned int > theMaskAtModules
Definition: LaserAlignment.h:182
LASCoordinateSet.h
LaserAlignment::theDigiProducersList
std::vector< edm::ParameterSet > theDigiProducersList
Definition: LaserAlignment.h:169
GlobalPoint.h
StripSubdetector.h
LASProfileJudge.h
LaserAlignment::collectedDataProfiles
LASGlobalData< LASModuleProfile > collectedDataProfiles
Definition: LaserAlignment.h:207
LaserAlignment::ptpToken_
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > ptpToken_
Definition: LaserAlignment.h:134
LaserAlignment::theLasConstants
LASConstants theLasConstants
Definition: LaserAlignment.h:192
LASConstants.h