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 
138 
141 
144 
147 
150 
153 
156 
159 
162 
165 
168 
169  // digi producer
170  std::vector<edm::ParameterSet> theDigiProducersList;
171 
174 
177 
180 
182  std::vector<unsigned int> theMaskTecModules;
183  std::vector<unsigned int> theMaskAtModules;
184 
187 
188  // this object can judge if
189  // a LASModuleProfile is usable for position measurement
191 
192  // colection of constants
194 
195  // the detector ids for all the modules
197 
198  // the detector ids for the doubly hit modules in the TECs
199  std::vector<unsigned int> tecDoubleHitDetId;
200 
201  // all the 474 profiles for the pedestals
203 
206 
207  // summed data profiles
209 
210  // 474 names for retrieving data from the branches
212 
213  // number of accepted profiles for each module
215 
216  // hit map for the current event (int=0,1)
217  // which is needed for branching into AT or TEC mode
219 
220  // histograms for the summed profiles;
221  // these are needed for the fitting procedure (done by ROOT)
223 
224  // container for nominal module positions
226 
227  // a class for easy looping over LASGlobalData objects,
228  // avoids nested for-statements
230 
232  TFile* theFile;
233  TDirectory* singleModulesDir;
234 
239 
241 
243 
245 };
246 #endif
LaserAlignment
Definition: LaserAlignment.h:73
LaserAlignment::pedestalProfiles
LASGlobalData< LASModuleProfile > pedestalProfiles
Definition: LaserAlignment.h:202
GlobalPositionRcd.h
LASBarrelAlgorithm.h
LaserAlignment::CalculateNominalCoordinates
void CalculateNominalCoordinates(void)
fills a LASGlobalData<LASCoordinateSet> with nominal module positions
Definition: LaserAlignment.cc:1331
LaserAlignment::theUseMinuitAlgorithm
bool theUseMinuitAlgorithm
config switch
Definition: LaserAlignment.h:146
EDProducer.h
StripGeomDetUnit.h
MessageLogger.h
LaserAlignment::theSaveHistograms
bool theSaveHistograms
config switch
Definition: LaserAlignment.h:173
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:1624
LaserAlignment::theFile
TFile * theFile
Tree stuff.
Definition: LaserAlignment.h:232
SiStripRawDigi.h
LaserAlignment::isTECBeam
bool isTECBeam(void)
decide whether TEC or AT beams have fired
Definition: LaserAlignment.cc:1224
LASGlobalData< LASCoordinateSet >
LaserAlignment::LaserAlignment
LaserAlignment(edm::ParameterSet const &theConf)
Definition: LaserAlignment.cc:21
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:236
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:179
LaserAlignment::summedHistograms
LASGlobalData< TH1D * > summedHistograms
Definition: LaserAlignment.h:222
StripTopology.h
LaserAlignment::isAcceptedProfile
LASGlobalData< int > isAcceptedProfile
Definition: LaserAlignment.h:218
TkLasBeam.h
LaserAlignment::theMaskTecModules
std::vector< unsigned int > theMaskTecModules
config parameters
Definition: LaserAlignment.h:182
LaserAlignment::endRunProduce
void endRunProduce(edm::Run &, const edm::EventSetup &) override
Definition: LaserAlignment.cc:489
LaserAlignment::theProfileNames
LASGlobalData< std::string > theProfileNames
Definition: LaserAlignment.h:211
LaserAlignment::theAlignableTracker
AlignableTracker * theAlignableTracker
Definition: LaserAlignment.h:240
SiStripLaserRecHit2D.h
LaserAlignment::~LaserAlignment
~LaserAlignment() override
Definition: LaserAlignment.cc:118
PoolDBOutputService.h
LaserAlignment::theApplyBeamKinkCorrections
bool theApplyBeamKinkCorrections
config switch
Definition: LaserAlignment.h:149
LaserAlignment::geomDetToken_
const edm::ESGetToken< GeometricDet, IdealGeometryRecord > geomDetToken_
Definition: LaserAlignment.h:133
LASModuleProfile.h
Service.h
LaserAlignment::numberOfAcceptedProfiles
LASGlobalData< int > numberOfAcceptedProfiles
Definition: LaserAlignment.h:214
SiStripDigi.h
LaserAlignment::singleModulesDir
TDirectory * singleModulesDir
Definition: LaserAlignment.h:233
LaserAlignment::theAlignRecordName
std::string theAlignRecordName
Definition: LaserAlignment.h:242
LaserAlignment::enableJudgeZeroFilter
bool enableJudgeZeroFilter
config switch
Definition: LaserAlignment.h:155
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:1485
LaserAlignment::fillDetectorId
void fillDetectorId(void)
fill hard coded detIds
Definition: LaserAlignmentFillDetId.cc:7
LASGlobalLoop.h
LaserAlignment::produce
void produce(edm::Event &, edm::EventSetup const &) override
Definition: LaserAlignment.cc:280
TrackerDigiGeometryRecord.h
LaserAlignment::moduleLoop
LASGlobalLoop moduleLoop
Definition: LaserAlignment.h:229
LaserAlignment::gprToken_
const edm::ESGetToken< Alignments, GlobalPositionRcd > gprToken_
Definition: LaserAlignment.h:136
edm::ParameterSet
Definition: ParameterSet.h:47
LaserAlignment::theSetNominalStrips
bool theSetNominalStrips
config switch
Definition: LaserAlignment.h:186
LaserAlignment::theCompression
int theCompression
config parameter (histograms file compression level)
Definition: LaserAlignment.h:176
Event.h
LaserAlignment::misalignedByRefGeometry
bool misalignedByRefGeometry
config switch
Definition: LaserAlignment.h:164
LaserAlignment::getTIBTOBNominalBeamOffset
double getTIBTOBNominalBeamOffset(unsigned int, unsigned int, unsigned int)
returns the nominal beam position (strips) in TOB for the profileJudge
Definition: LaserAlignment.cc:1278
LaserAlignment::theStoreToDB
bool theStoreToDB
config switch
Definition: LaserAlignment.h:167
LaserAlignment::testRoutine
void testRoutine(void)
for debugging & testing only, will disappear..
Definition: LaserAlignment.cc:1685
LaserAlignment::ApplyEndcapMaskingCorrections
void ApplyEndcapMaskingCorrections(LASGlobalData< LASCoordinateSet > &, LASGlobalData< LASCoordinateSet > &, LASEndcapAlignmentParameterSet &)
apply endcap correction to masked modules in TEC
Definition: LaserAlignment.cc:1584
LaserAlignment::updateFromInputGeometry
bool updateFromInputGeometry
config switch
Definition: LaserAlignment.h:161
LASBarrelAlignmentParameterSet
Definition: LASBarrelAlignmentParameterSet.h:23
LaserAlignment::firstEvent_
bool firstEvent_
Definition: LaserAlignment.h:244
LaserAlignment::peakFinderThreshold
double peakFinderThreshold
config parameter
Definition: LaserAlignment.h:152
LaserAlignment::ptitpToken_
const edm::ESGetToken< PTrackerAdditionalParametersPerDet, PTrackerAdditionalParametersPerDetRcd > ptitpToken_
Definition: LaserAlignment.h:135
LaserAlignment::judgeOverdriveThreshold
unsigned int judgeOverdriveThreshold
config parameters for the LASProfileJudge
Definition: LaserAlignment.h:158
LaserAlignment::isATBeam
bool isATBeam(void)
Definition: LaserAlignment.cc:1251
edm::EventSetup
Definition: EventSetup.h:58
LASGeometryUpdater.h
DetSetVector.h
LASEndcapAlgorithm.h
LaserAlignment::detectorId
LASGlobalData< unsigned int > detectorId
Definition: LaserAlignment.h:196
LaserAlignment::currentDataProfiles
LASGlobalData< LASModuleProfile > currentDataProfiles
data profiles for the current event
Definition: LaserAlignment.h:205
LaserAlignment::DumpHitmaps
void DumpHitmaps(LASGlobalData< int > &)
for debugging only, will disappear
Definition: LaserAlignment.cc:1530
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd >
LaserAlignment::theDoPedestalSubtraction
bool theDoPedestalSubtraction
config switch
Definition: LaserAlignment.h:143
LaserAlignment::theGlobalPositionRcd
edm::ESHandle< Alignments > theGlobalPositionRcd
Definition: LaserAlignment.h:238
LaserAlignment::DumpPosFileSet
void DumpPosFileSet(LASGlobalData< LASCoordinateSet > &)
for debugging only, will disappear
Definition: LaserAlignment.cc:1440
LaserAlignment::fillDataProfiles
void fillDataProfiles(edm::Event const &, edm::EventSetup const &)
fill profiles from SiStrip(Raw)Digi container
Definition: LaserAlignment.cc:940
LaserAlignment::theEvents
int theEvents
counter for the total number of events processed
Definition: LaserAlignment.h:140
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:1313
LaserAlignment::judge
LASProfileJudge judge
Definition: LaserAlignment.h:190
DetId.h
LaserAlignment::beginJob
void beginJob() override
Definition: LaserAlignment.cc:132
LASGlobalData.h
LaserAlignment::stripPedestalsToken_
const edm::ESGetToken< SiStripPedestals, SiStripPedestalsRcd > stripPedestalsToken_
Definition: LaserAlignment.h:137
LaserAlignment::theTrackerGeometry
edm::ESHandle< TrackerGeometry > theTrackerGeometry
Definition: LaserAlignment.h:237
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:199
SiStripPedestals.h
LaserAlignment::nominalCoordinates
LASGlobalData< LASCoordinateSet > nominalCoordinates
Definition: LaserAlignment.h:225
EventSetup.h
TrackerGeomBuilderFromGeometricDet.h
LASPeakFinder.h
AlignableTracker.h
LaserAlignment::theErrorRecordName
std::string theErrorRecordName
Definition: LaserAlignment.h:242
LASProfileJudge
Definition: LASProfileJudge.h:14
ParameterSet.h
LaserAlignment::fillPedestalProfiles
void fillPedestalProfiles(edm::ESHandle< SiStripPedestals > &)
fill pedestals from dbase
Definition: LaserAlignment.cc:1172
LaserAlignment::endJob
void endJob() override
Definition: LaserAlignment.cc:934
LaserAlignment::ConvertAngle
double ConvertAngle(double)
convert an angle in the [-pi,pi] range to the [0,2*pi] range
Definition: LaserAlignment.cc:1425
LASConstants
Definition: LASConstants.h:10
edm::Event
Definition: Event.h:73
LaserAlignment::theMaskAtModules
std::vector< unsigned int > theMaskAtModules
Definition: LaserAlignment.h:183
LASCoordinateSet.h
LaserAlignment::theDigiProducersList
std::vector< edm::ParameterSet > theDigiProducersList
Definition: LaserAlignment.h:170
GlobalPoint.h
StripSubdetector.h
LASProfileJudge.h
LaserAlignment::collectedDataProfiles
LASGlobalData< LASModuleProfile > collectedDataProfiles
Definition: LaserAlignment.h:208
LaserAlignment::ptpToken_
const edm::ESGetToken< PTrackerParameters, PTrackerParametersRcd > ptpToken_
Definition: LaserAlignment.h:134
LaserAlignment::theLasConstants
LASConstants theLasConstants
Definition: LaserAlignment.h:193
LASConstants.h