CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes
SiStripGainFromData Class Reference
Inheritance diagram for SiStripGainFromData:
ConditionDBWriter< SiStripApvGain > edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks > edm::one::EDAnalyzerBase edm::EDConsumerBase

Classes

class  isEqual
 

Public Types

typedef dqm::legacy::DQMStore DQMStore
 
typedef dqm::legacy::MonitorElement MonitorElement
 
- Public Types inherited from edm::one::EDAnalyzerBase
typedef EDAnalyzerBase ModuleType
 
- Public Types inherited from edm::EDConsumerBase
typedef ProductLabels Labels
 

Public Member Functions

 SiStripGainFromData (const edm::ParameterSet &)
 
 ~SiStripGainFromData () override
 
- Public Member Functions inherited from ConditionDBWriter< SiStripApvGain >
 ConditionDBWriter (const edm::ParameterSet &iConfig)
 
 ~ConditionDBWriter () override
 
- Public Member Functions inherited from edm::one::EDAnalyzer< edm::one::WatchRuns, edm::one::WatchLuminosityBlocks >
 EDAnalyzer ()=default
 
 EDAnalyzer (const EDAnalyzer &)=delete
 
SerialTaskQueueglobalLuminosityBlocksQueue () final
 
SerialTaskQueueglobalRunsQueue () final
 
const EDAnalyzeroperator= (const EDAnalyzer &)=delete
 
bool wantsGlobalLuminosityBlocks () const final
 
bool wantsGlobalRuns () const final
 
bool wantsInputProcessBlocks () const final
 
bool wantsProcessBlocks () const final
 
- Public Member Functions inherited from edm::one::EDAnalyzerBase
void callWhenNewProductsRegistered (std::function< void(BranchDescription const &)> const &func)
 
 EDAnalyzerBase ()
 
ModuleDescription const & moduleDescription () const
 
bool wantsStreamLuminosityBlocks () const
 
bool wantsStreamRuns () const
 
 ~EDAnalyzerBase () override
 
- Public Member Functions inherited from edm::EDConsumerBase
std::vector< ConsumesInfoconsumesInfo () const
 
void convertCurrentProcessAlias (std::string const &processName)
 Convert "@currentProcess" in InputTag process names to the actual current process name. More...
 
 EDConsumerBase ()
 
 EDConsumerBase (EDConsumerBase const &)=delete
 
 EDConsumerBase (EDConsumerBase &&)=default
 
ESProxyIndex const * esGetTokenIndices (edm::Transition iTrans) const
 
std::vector< ESProxyIndex > const & esGetTokenIndicesVector (edm::Transition iTrans) const
 
std::vector< ESRecordIndex >
const & 
esGetTokenRecordIndicesVector (edm::Transition iTrans) const
 
ProductResolverIndexAndSkipBit indexFrom (EDGetToken, BranchType, TypeID const &) const
 
void itemsMayGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
void itemsToGet (BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
 
std::vector
< ProductResolverIndexAndSkipBit >
const & 
itemsToGetFrom (BranchType iType) const
 
void labelsForToken (EDGetToken iToken, Labels &oLabels) const
 
void modulesWhoseProductsAreConsumed (std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
 
EDConsumerBase const & operator= (EDConsumerBase const &)=delete
 
EDConsumerBaseoperator= (EDConsumerBase &&)=default
 
bool registeredToConsume (ProductResolverIndex, bool, BranchType) const
 
bool registeredToConsumeMany (TypeID const &, BranchType) const
 
void selectInputProcessBlocks (ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
 
ProductResolverIndexAndSkipBit uncheckedIndexFrom (EDGetToken) const
 
void updateLookup (BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
 
void updateLookup (eventsetup::ESRecordsToProxyIndices const &)
 
virtual ~EDConsumerBase () noexcept(false)
 

Private Member Functions

void algoAnalyze (const edm::Event &, const edm::EventSetup &) override
 
void algoBeginJob (const edm::EventSetup &) override
 
void algoBeginRun (const edm::Run &, const edm::EventSetup &) override
 
void algoEndJob () override
 
double ComputeChargeOverPath (const SiStripCluster *Cluster, TrajectoryStateOnSurface trajState, const edm::EventSetup *iSetup, const Track *track, double trajChi2OverN)
 
std::unique_ptr< SiStripApvGaingetNewObject () override
 
void getPeakOfLandau (TH1 *InputHisto, double *FitResults, double LowRange=0, double HighRange=5400)
 
bool IsFarFromBorder (TrajectoryStateOnSurface trajState, const uint32_t detid, const edm::EventSetup *iSetup)
 

Private Attributes

std::string AlgoMode
 
bool AllowSaturation
 
TH2F * APV_Charge
 
TH1F * APV_CumulGain
 
TH1F * APV_DetId
 
TH1F * APV_Eta
 
TH1F * APV_Gain
 
TH1F * APV_Id
 
TH2F * APV_Momentum
 
TH1F * APV_MPV
 
TH2F * APV_PathLength
 
TH1F * APV_PathLengthM
 
TH1F * APV_PrevGain
 
TH1F * APV_R
 
TH1F * APV_SubDet
 
TH1F * APV_Thickness
 
std::unordered_map< unsigned
int, stAPVGain * > 
APVsColl
 
std::vector< stAPVGain * > APVsCollOrdered
 
int CalibrationLevel
 
TH1F * Charge_TEC
 
TH1F * Charge_TEC1
 
TH1F * Charge_TEC2
 
TH1F * Charge_TECM
 
TH1F * Charge_TECP
 
TH1F * Charge_TIB
 
TH1F * Charge_TID
 
TH1F * Charge_TIDM
 
TH1F * Charge_TIDP
 
TH1F * Charge_TOB
 
TH2F * Charge_Vs_Alpha
 
TH2F * Charge_Vs_Beta
 
TH2F * Charge_Vs_PathLength
 
TH2F * Charge_Vs_PathLength320
 
TH2F * Charge_Vs_PathLength500
 
TH2F * Charge_Vs_PathTEC
 
TH2F * Charge_Vs_PathTEC1
 
TH2F * Charge_Vs_PathTEC2
 
TH2F * Charge_Vs_PathTIB
 
TH2F * Charge_Vs_PathTID
 
TH2F * Charge_Vs_PathTOB
 
TH2F * Charge_Vs_TransversAngle
 
bool CheckIfFileExist
 
bool CheckLocalAngle
 
DQMStoredqmStore_
 
unsigned int EEvent
 
TH2F * Error_Vs_Entries
 
TH2F * Error_Vs_Eta
 
TH2F * Error_Vs_MPV
 
TH2F * Error_Vs_Phi
 
unsigned int ERun
 
TimeValue_t ETimestamp
 
bool FirstSetOfConstants
 
TH1F * FWHM_Vs_PathLength
 
TH1F * FWHM_Vs_PathLength320
 
TH1F * FWHM_Vs_PathLength500
 
edm::ESGetToken< SiStripGain,
SiStripGainRcd
gainToken_
 
TH1F * HChi2OverNDF
 
TH1F * HFirstStrip
 
TH2F * HitLocalPosition
 
TH2F * HitLocalPositionBefCut
 
TH1F * HTrackChi2OverNDF
 
TH1F * HTrackHits
 
const edm::EventiEvent_
 
const edm::EventSetupiSetup_
 
TH1F * JobInfo
 
double MaxChi2OverNDF
 
double MaxMPVError
 
unsigned int MaxNrStrips
 
double MaxTrackChiOverNdf
 
double MaxTrackEta
 
double MaxTrackMomentum
 
unsigned int MinNrEntries
 
double MinTrackEta
 
unsigned int MinTrackHits
 
double MinTrackMomentum
 
TH1F * MPV_Vs_Alpha
 
TH1F * MPV_Vs_Beta
 
TH2F * MPV_Vs_Eta
 
TH2F * MPV_Vs_EtaTEC
 
TH2F * MPV_Vs_EtaTEC1
 
TH2F * MPV_Vs_EtaTEC2
 
TH2F * MPV_Vs_EtaTIB
 
TH2F * MPV_Vs_EtaTID
 
TH2F * MPV_Vs_EtaTOB
 
TH1F * MPV_Vs_PathLength
 
TH1F * MPV_Vs_PathLength320
 
TH1F * MPV_Vs_PathLength500
 
TH1F * MPV_Vs_PathTEC
 
TH1F * MPV_Vs_PathTEC1
 
TH1F * MPV_Vs_PathTEC2
 
TH1F * MPV_Vs_PathTIB
 
TH1F * MPV_Vs_PathTID
 
TH1F * MPV_Vs_PathTOB
 
TH2F * MPV_Vs_Phi
 
TH2F * MPV_Vs_PhiTEC
 
TH2F * MPV_Vs_PhiTEC1
 
TH2F * MPV_Vs_PhiTEC2
 
TH2F * MPV_Vs_PhiTIB
 
TH2F * MPV_Vs_PhiTID
 
TH2F * MPV_Vs_PhiTOB
 
TH2F * MPV_Vs_R
 
TH1F * MPV_Vs_TransversAngle
 
TH1F * MPVs
 
TH1F * MPVs320
 
TH1F * MPVs500
 
unsigned int NEvent
 
TH1F * NHighStripInCluster
 
TH2F * NoMPV_Vs_EtaPhi
 
TH1F * NSatStripInCluster
 
TH2F * NStrips_Vs_Alpha
 
TH2F * NStrips_Vs_Beta
 
TH2F * NStrips_Vs_TransversAngle
 
TH1F * NumberOfEntriesByAPV
 
std::string OutputGains
 
std::string OutputHistos
 
unsigned int SEvent
 
unsigned int SRun
 
TimeValue_t STimestamp
 
edm::ESGetToken
< TrackerGeometry,
TrackerDigiGeometryRecord
tkGeomToken_
 
MonitorElementtmp
 
TH2F * Tracks_P_Vs_Eta
 
TH2F * Tracks_Pt_Vs_Eta
 
std::string TrajToTrackLabel
 
std::string TrajToTrackProducer
 
edm::ESGetToken
< TrackerTopology,
TrackerTopologyRcd
tTopoToken_
 
bool Validation
 
vector< string > VInputFiles
 

Additional Inherited Members

- Static Public Member Functions inherited from ConditionDBWriter< SiStripApvGain >
static void fillPSetDescription (edm::ParameterSetDescription &desc)
 
- Static Public Member Functions inherited from edm::one::EDAnalyzerBase
static const std::string & baseType ()
 
static void fillDescriptions (ConfigurationDescriptions &descriptions)
 
static void prevalidate (ConfigurationDescriptions &descriptions)
 
- Protected Member Functions inherited from ConditionDBWriter< SiStripApvGain >
void setDoStore (const bool doStore)
 When set to false the payload will not be written to the db. More...
 
void storeOnDbNow ()
 
cond::Time_t timeOfLastIOV ()
 
- Protected Member Functions inherited from edm::EDConsumerBase
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > consumes (edm::InputTag const &tag)
 
template<BranchType B = InEvent>
EDConsumerBaseAdaptor< Bconsumes (edm::InputTag tag) noexcept
 
EDGetToken consumes (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken consumes (TypeToGet const &id, edm::InputTag const &tag)
 
ConsumesCollector consumesCollector ()
 Use a ConsumesCollector to gather consumes information from helper functions. More...
 
template<typename ProductType , BranchType B = InEvent>
void consumesMany ()
 
void consumesMany (const TypeToGet &id)
 
template<BranchType B>
void consumesMany (const TypeToGet &id)
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes ()
 
template<typename ESProduct , typename ESRecord , Transition Tr = Transition::Event>
auto esConsumes (ESInputTag const &tag)
 
template<Transition Tr = Transition::Event>
constexpr auto esConsumes ()
 
template<Transition Tr = Transition::Event>
auto esConsumes (ESInputTag tag)
 
template<Transition Tr = Transition::Event>
ESGetTokenGeneric esConsumes (eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
 Used with EventSetupRecord::doGet. More...
 
template<typename ProductType , BranchType B = InEvent>
EDGetTokenT< ProductType > mayConsume (edm::InputTag const &tag)
 
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
template<BranchType B>
EDGetToken mayConsume (const TypeToGet &id, edm::InputTag const &tag)
 
void resetItemsToGetFrom (BranchType iType)
 

Detailed Description

Definition at line 86 of file SiStripGainFromData.cc.

Member Typedef Documentation

Definition at line 89 of file SiStripGainFromData.cc.

Definition at line 88 of file SiStripGainFromData.cc.

Constructor & Destructor Documentation

SiStripGainFromData::SiStripGainFromData ( const edm::ParameterSet iConfig)
explicit

Definition at line 300 of file SiStripGainFromData.cc.

References AlgoMode, AllowSaturation, CalibrationLevel, CheckIfFileExist, CheckLocalAngle, dqmStore_, FirstSetOfConstants, gainToken_, edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), MaxChi2OverNDF, MaxMPVError, MaxNrStrips, MaxTrackChiOverNdf, MaxTrackEta, MaxTrackMomentum, MinNrEntries, MinTrackEta, MinTrackHits, MinTrackMomentum, Utilities::operator, OutputGains, OutputHistos, AlCaHLTBitMon_QueryRunRegistry::string, tkGeomToken_, TrajToTrackLabel, TrajToTrackProducer, tTopoToken_, Validation, and VInputFiles.

302  AlgoMode = iConfig.getParameter<std::string>("AlgoMode");
303 
304  OutputGains = iConfig.getParameter<std::string>("OutputGains");
305  OutputHistos = iConfig.getParameter<std::string>("OutputHistos");
306 
307  TrajToTrackProducer = iConfig.getParameter<std::string>("TrajToTrackProducer");
308  TrajToTrackLabel = iConfig.getParameter<std::string>("TrajToTrackLabel");
309 
310  CheckLocalAngle = iConfig.getUntrackedParameter<bool>("checkLocalAngle", false);
311  MinNrEntries = iConfig.getUntrackedParameter<unsigned>("minNrEntries", 20);
312  MaxMPVError = iConfig.getUntrackedParameter<double>("maxMPVError", 500.0);
313  MaxChi2OverNDF = iConfig.getUntrackedParameter<double>("maxChi2OverNDF", 5.0);
314  MinTrackMomentum = iConfig.getUntrackedParameter<double>("minTrackMomentum", 3.0);
315  MaxTrackMomentum = iConfig.getUntrackedParameter<double>("maxTrackMomentum", 99999.0);
316  MinTrackEta = iConfig.getUntrackedParameter<double>("minTrackEta", -5.0);
317  MaxTrackEta = iConfig.getUntrackedParameter<double>("maxTrackEta", 5.0);
318  MaxNrStrips = iConfig.getUntrackedParameter<unsigned>("maxNrStrips", 2);
319  MinTrackHits = iConfig.getUntrackedParameter<unsigned>("MinTrackHits", 8);
320  MaxTrackChiOverNdf = iConfig.getUntrackedParameter<double>("MaxTrackChiOverNdf", 3);
321  AllowSaturation = iConfig.getUntrackedParameter<bool>("AllowSaturation", false);
322  FirstSetOfConstants = iConfig.getUntrackedParameter<bool>("FirstSetOfConstants", true);
323  Validation = iConfig.getUntrackedParameter<bool>("Validation", false);
324  CheckIfFileExist = iConfig.getUntrackedParameter<bool>("CheckIfFileExist", false);
325 
326  CalibrationLevel = iConfig.getUntrackedParameter<int>("CalibrationLevel", 0);
327 
328  if (strcmp(AlgoMode.c_str(), "WriteOnDB") == 0)
329  VInputFiles = iConfig.getParameter<vector<string> >("VInputFiles");
330 
332 
333  tTopoToken_ = esConsumes<edm::Transition::BeginRun>();
334  tkGeomToken_ = esConsumes<edm::Transition::BeginRun>();
335  gainToken_ = esConsumes<edm::Transition::BeginRun>();
336 
337  //if( OutputHistos!="" )
338  // dqmStore_->open(OutputHistos.c_str(), true);
339 }
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
T getUntrackedParameter(std::string const &, T const &) const
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
vector< string > VInputFiles
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
SiStripGainFromData::~SiStripGainFromData ( )
override

Definition at line 341 of file SiStripGainFromData.cc.

341 {}

Member Function Documentation

void SiStripGainFromData::algoAnalyze ( const edm::Event iEvent,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 1160 of file SiStripGainFromData.cc.

References AlgoMode, edm::AssociationMap< Tag >::begin(), Trajectory::chiSquared(), SiStripRecHit1D::cluster(), SiStripRecHit2D::cluster(), ComputeChargeOverPath(), edm::AssociationMap< edm::OneToOne< std::vector< Trajectory >, reco::TrackCollection, unsigned short > >::const_iterator, EEvent, edm::AssociationMap< Tag >::end(), ERun, reco::TrackBase::eta(), ETimestamp, edm::EventID::event(), Trajectory::foundHits(), edm::Event::getByLabel(), HTrackChi2OverNDF, HTrackHits, edm::EventBase::id(), iEvent, iEvent_, TrajectoryStateOnSurface::isValid(), MaxTrackChiOverNdf, MaxTrackEta, MaxTrackMomentum, Trajectory::measurements(), MinTrackEta, MinTrackHits, MinTrackMomentum, SiStripMatchedRecHit2D::monoCluster(), ndof, NEvent, reco::TrackBase::p(), edm::Handle< T >::product(), reco::TrackBase::pt(), Trajectory::recHits(), edm::EventID::run(), SEvent, SRun, SiStripMatchedRecHit2D::stereoCluster(), STimestamp, edm::EventBase::time(), HLT_FULL_cff::track, Tracks_P_Vs_Eta, Tracks_Pt_Vs_Eta, TrajToTrackLabel, TrajToTrackProducer, and edm::Timestamp::value().

1160  {
1161  if (strcmp(AlgoMode.c_str(), "WriteOnDB") == 0)
1162  return;
1163 
1164  if (NEvent == 0) {
1165  SRun = iEvent.id().run();
1166  SEvent = iEvent.id().event();
1167  STimestamp = iEvent.time().value();
1168  }
1169  ERun = iEvent.id().run();
1170  EEvent = iEvent.id().event();
1171  ETimestamp = iEvent.time().value();
1172  NEvent++;
1173 
1174  iEvent_ = &iEvent;
1175 
1176  Handle<TrajTrackAssociationCollection> trajTrackAssociationHandle;
1177  iEvent.getByLabel(TrajToTrackProducer, TrajToTrackLabel, trajTrackAssociationHandle);
1178  const TrajTrackAssociationCollection TrajToTrackMap = *trajTrackAssociationHandle.product();
1179 
1180  for (TrajTrackAssociationCollection::const_iterator it = TrajToTrackMap.begin(); it != TrajToTrackMap.end(); ++it) {
1181  const Track track = *it->val;
1182  const Trajectory traj = *it->key;
1183 
1184  if (track.p() < MinTrackMomentum || track.p() > MaxTrackMomentum || track.eta() < MinTrackEta ||
1185  track.eta() > MaxTrackEta)
1186  continue;
1187 
1188  Tracks_Pt_Vs_Eta->Fill(fabs(track.eta()), track.pt());
1189  Tracks_P_Vs_Eta->Fill(fabs(track.eta()), track.p());
1190 
1191  //BEGIN TO COMPUTE NDOF FOR TRACKS NO IMPLEMENTED BEFORE 200pre3
1192  int ndof = 0;
1193  const Trajectory::RecHitContainer transRecHits = traj.recHits();
1194 
1195  for (Trajectory::RecHitContainer::const_iterator rechit = transRecHits.begin(); rechit != transRecHits.end();
1196  ++rechit)
1197  if ((*rechit)->isValid())
1198  ndof += (*rechit)->dimension();
1199  ndof -= 5;
1200  //END TO COMPUTE NDOF FOR TRACKS NO IMPLEMENTED BEFORE 200pre3
1201 
1202  HTrackChi2OverNDF->Fill(traj.chiSquared() / ndof);
1203  if (traj.chiSquared() / ndof > MaxTrackChiOverNdf)
1204  continue;
1205 
1206  vector<TrajectoryMeasurement> measurements = traj.measurements();
1207  HTrackHits->Fill(traj.foundHits());
1208  if (traj.foundHits() < (int)MinTrackHits)
1209  continue;
1210  /*
1211  //BEGIN TO COMPUTE #MATCHEDRECHIT IN THE TRACK
1212  int NMatchedHit = 0;
1213  for(vector<TrajectoryMeasurement>::const_iterator measurement_it = measurements.begin(); measurement_it!=measurements.end(); measurement_it++){
1214  TrajectoryStateOnSurface trajState = measurement_it->updatedState();
1215  if( !trajState.isValid() ) continue;
1216  const TrackingRecHit* hit = (*measurement_it->recHit()).hit();
1217  const SiStripMatchedRecHit2D* sistripmatchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>(hit);
1218  if(sistripmatchedhit)NMatchedHit++;
1219 // NMatchedHit++;
1220 
1221  }
1222  //END TO COMPUTE #MATCHEDRECHIT IN THE TRACK
1223 
1224  if(NMatchedHit<2){
1225  printf("NOT ENOUGH MATCHED RECHITS : %i\n",NMatchedHit);
1226  continue;
1227  }
1228 */
1229 
1230  for (vector<TrajectoryMeasurement>::const_iterator measurement_it = measurements.begin();
1231  measurement_it != measurements.end();
1232  measurement_it++) {
1233  TrajectoryStateOnSurface trajState = measurement_it->updatedState();
1234  if (!trajState.isValid())
1235  continue;
1236 
1237  const TrackingRecHit* hit = (*measurement_it->recHit()).hit();
1238  const SiStripRecHit1D* sistripsimple1dhit = dynamic_cast<const SiStripRecHit1D*>(hit);
1239  const SiStripRecHit2D* sistripsimplehit = dynamic_cast<const SiStripRecHit2D*>(hit);
1240  const SiStripMatchedRecHit2D* sistripmatchedhit = dynamic_cast<const SiStripMatchedRecHit2D*>(hit);
1241 
1242  if (sistripsimplehit) {
1244  (sistripsimplehit->cluster()).get(), trajState, &iSetup, &track, traj.chiSquared() / ndof);
1245  } else if (sistripmatchedhit) {
1246  ComputeChargeOverPath(&sistripmatchedhit->monoCluster(), trajState, &iSetup, &track, traj.chiSquared() / ndof);
1248  &sistripmatchedhit->stereoCluster(), trajState, &iSetup, &track, traj.chiSquared() / ndof);
1249  } else if (sistripsimple1dhit) {
1251  (sistripsimple1dhit->cluster()).get(), trajState, &iSetup, &track, traj.chiSquared() / ndof);
1252  } else {
1253  }
1254  }
1255  }
1256 }
RunNumber_t run() const
Definition: EventID.h:38
ClusterRef cluster() const
double p() const
momentum vector magnitude
Definition: TrackBase.h:631
EventNumber_t event() const
Definition: EventID.h:40
int foundHits() const
Definition: Trajectory.h:206
const_iterator end() const
last iterator over the map (read only)
SiStripCluster const & monoCluster() const
ConstRecHitContainer recHits() const
Definition: Trajectory.h:186
DataContainer const & measurements() const
Definition: Trajectory.h:178
int iEvent
Definition: GenABIO.cc:224
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
double pt() const
track transverse momentum
Definition: TrackBase.h:637
ClusterRef cluster() const
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:500
ConstRecHitContainer RecHitContainer
Definition: Trajectory.h:42
T const * product() const
Definition: Handle.h:70
double ComputeChargeOverPath(const SiStripCluster *Cluster, TrajectoryStateOnSurface trajState, const edm::EventSetup *iSetup, const Track *track, double trajChi2OverN)
float chiSquared() const
Definition: Trajectory.h:241
SiStripCluster const & stereoCluster() const
edm::EventID id() const
Definition: EventBase.h:59
const_iterator begin() const
first iterator over the map (read only)
TimeValue_t value() const
Definition: Timestamp.h:45
edm::Timestamp time() const
Definition: EventBase.h:60
const edm::Event * iEvent_
void SiStripGainFromData::algoBeginJob ( const edm::EventSetup iSetup)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 343 of file SiStripGainFromData.cc.

References AlgoMode, sistrip::APV, APV_Charge, APV_CumulGain, APV_DetId, APV_Eta, APV_Gain, APV_Id, APV_Momentum, APV_MPV, APV_PathLength, APV_PathLengthM, APV_PrevGain, APV_R, APV_SubDet, APV_Thickness, stAPVGain::APVId, APVsColl, APVsCollOrdered, dqm::implementation::IBooker::book1D(), dqm::implementation::IBooker::book2D(), Charge_TEC, Charge_TEC1, Charge_TEC2, Charge_TECM, Charge_TECP, Charge_TIB, Charge_TID, Charge_TIDM, Charge_TIDP, Charge_TOB, Charge_Vs_Alpha, Charge_Vs_Beta, Charge_Vs_PathLength, Charge_Vs_PathLength320, Charge_Vs_PathLength500, Charge_Vs_PathTEC, Charge_Vs_PathTEC1, Charge_Vs_PathTEC2, Charge_Vs_PathTIB, Charge_Vs_PathTID, Charge_Vs_PathTOB, Charge_Vs_TransversAngle, runTheMatrix::const, stAPVGain::DetId, dqmStore_, EEvent, Error_Vs_Entries, Error_Vs_Eta, Error_Vs_MPV, Error_Vs_Phi, ERun, stAPVGain::Eta, ETimestamp, beamvalidation::exit(), FWHM_Vs_PathLength, FWHM_Vs_PathLength320, FWHM_Vs_PathLength500, stAPVGain::Gain, gainToken_, edm::EventSetup::getData(), edm::EventSetup::getHandle(), dqm::legacy::MonitorElement::getTH1F(), dqm::legacy::MonitorElement::getTH2F(), HChi2OverNDF, HFirstStrip, HTrackChi2OverNDF, HTrackHits, mps_fire::i, stAPVGain::Index, iSetup_, dqmiolumiharvest::j, JobInfo, stAPVGain::MPV, MPV_Vs_Alpha, MPV_Vs_Beta, MPV_Vs_Eta, MPV_Vs_EtaTEC, MPV_Vs_EtaTEC1, MPV_Vs_EtaTEC2, MPV_Vs_EtaTIB, MPV_Vs_EtaTID, MPV_Vs_EtaTOB, MPV_Vs_PathLength, MPV_Vs_PathLength320, MPV_Vs_PathLength500, MPV_Vs_PathTEC, MPV_Vs_PathTEC1, MPV_Vs_PathTEC2, MPV_Vs_PathTIB, MPV_Vs_PathTID, MPV_Vs_PathTOB, MPV_Vs_Phi, MPV_Vs_PhiTEC, MPV_Vs_PhiTEC1, MPV_Vs_PhiTEC2, MPV_Vs_PhiTIB, MPV_Vs_PhiTID, MPV_Vs_PhiTOB, MPV_Vs_R, MPV_Vs_TransversAngle, MPVs, MPVs320, MPVs500, NEvent, NHighStripInCluster, NoMPV_Vs_EtaPhi, NSatStripInCluster, StripTopology::nstrips(), NStrips_Vs_Alpha, NStrips_Vs_Beta, NStrips_Vs_TransversAngle, NumberOfEntriesByAPV, colinearityKinematic::Phi, stAPVGain::Phi, stAPVGain::PreviousGain, gpuVertexFinder::printf(), stAPVGain::R, dttmaxenums::R, DetId::rawId(), SEvent, stAPVGain::Side, SRun, STimestamp, stAPVGain::SubDet, ntupleEnum::SubDet, DetId::subdetId(), StripSubdetector::TEC, TrackerTopology::tecSide(), stAPVGain::Thickness, StripSubdetector::TIB, StripSubdetector::TID, tkGeomToken_, tmp, StripSubdetector::TOB, Tracks_P_Vs_Eta, Tracks_Pt_Vs_Eta, and tTopoToken_.

343  {
344  const TrackerTopology* const tTopo = &iSetup.getData(tTopoToken_);
345 
346  iSetup_ = &iSetup;
347 
348  // TH1::AddDirectory(kTRUE);
349 
350  tmp = dqmStore_->book1D("JobInfo", "JobInfo", 20, 0, 20);
351  JobInfo = tmp->getTH1F();
352 
353  tmp = dqmStore_->book1D("APV_DetId", "APV_DetId", 72785, 0, 72784);
354  APV_DetId = tmp->getTH1F();
355  tmp = dqmStore_->book1D("APV_Id", "APV_Id", 72785, 0, 72784);
356  APV_Id = tmp->getTH1F();
357  tmp = dqmStore_->book1D("APV_Eta", "APV_Eta", 72785, 0, 72784);
358  APV_Eta = tmp->getTH1F();
359  tmp = dqmStore_->book1D("APV_R", "APV_R", 72785, 0, 72784);
360  APV_R = tmp->getTH1F();
361  tmp = dqmStore_->book1D("APV_SubDet", "APV_SubDet", 72785, 0, 72784);
362  APV_SubDet = tmp->getTH1F();
363  tmp = dqmStore_->book2D("APV_Momentum", "APV_Momentum", 72785, 0, 72784, 50, 0, 200);
364  APV_Momentum = tmp->getTH2F();
365  tmp = dqmStore_->book2D("APV_Charge", "APV_Charge", 72785, 0, 72784, 1000, 0, 2000);
366  APV_Charge = tmp->getTH2F();
367  tmp = dqmStore_->book2D("APV_PathLength", "APV_PathLength", 72785, 0, 72784, 100, 0.2, 1.4);
369  tmp = dqmStore_->book1D("APV_PathLengthM", "APV_PathLengthM", 72785, 0, 72784);
371  tmp = dqmStore_->book1D("APV_MPV", "APV_MPV", 72785, 0, 72784);
372  APV_MPV = tmp->getTH1F();
373  tmp = dqmStore_->book1D("APV_Gain", "APV_Gain", 72785, 0, 72784);
374  APV_Gain = tmp->getTH1F();
375  tmp = dqmStore_->book1D("APV_PrevGain", "APV_PrevGain", 72785, 0, 72784);
376  APV_PrevGain = tmp->getTH1F();
377  tmp = dqmStore_->book1D("APV_CumulGain", "APV_CumulGain", 72785, 0, 72784);
379  tmp = dqmStore_->book1D("APV_Thickness", "APV_Thicknes", 72785, 0, 72784);
381 
382  tmp = dqmStore_->book2D("Tracks_P_Vs_Eta", "Tracks_P_Vs_Eta", 30, 0, 3, 50, 0, 200);
384  tmp = dqmStore_->book2D("Tracks_Pt_Vs_Eta", "Tracks_Pt_Vs_Eta", 30, 0, 3, 50, 0, 200);
386 
387  tmp = dqmStore_->book2D("Charge_Vs_PathTIB", "Charge_Vs_PathTIB", 100, 0.2, 1.4, 500, 0, 2000);
389  tmp = dqmStore_->book2D("Charge_Vs_PathTID", "Charge_Vs_PathTID", 100, 0.2, 1.4, 500, 0, 2000);
391  tmp = dqmStore_->book2D("Charge_Vs_PathTOB", "Charge_Vs_PathTOB", 100, 0.2, 1.4, 500, 0, 2000);
393  tmp = dqmStore_->book2D("Charge_Vs_PathTEC", "Charge_Vs_PathTEC", 100, 0.2, 1.4, 500, 0, 2000);
395  tmp = dqmStore_->book2D("Charge_Vs_PathTEC1", "Charge_Vs_PathTEC1", 100, 0.2, 1.4, 500, 0, 2000);
397  tmp = dqmStore_->book2D("Charge_Vs_PathTEC2", "Charge_Vs_PathTEC2", 100, 0.2, 1.4, 500, 0, 2000);
399 
400  tmp = dqmStore_->book1D("Charge_TIB", "Charge_TIB", 1000, 0, 2000);
401  Charge_TIB = tmp->getTH1F();
402  tmp = dqmStore_->book1D("Charge_TID", "Charge_TID", 1000, 0, 2000);
403  Charge_TID = tmp->getTH1F();
404  tmp = dqmStore_->book1D("Charge_TID+", "Charge_TID+", 1000, 0, 2000);
405  Charge_TIDP = tmp->getTH1F();
406  tmp = dqmStore_->book1D("Charge_TID-", "Charge_TID-", 1000, 0, 2000);
407  Charge_TIDM = tmp->getTH1F();
408  tmp = dqmStore_->book1D("Charge_TOB", "Charge_TOB", 1000, 0, 2000);
409  Charge_TOB = tmp->getTH1F();
410  tmp = dqmStore_->book1D("Charge_TEC", "Charge_TEC", 1000, 0, 2000);
411  Charge_TEC = tmp->getTH1F();
412  tmp = dqmStore_->book1D("Charge_TEC1", "Charge_TEC1", 1000, 0, 2000);
413  Charge_TEC1 = tmp->getTH1F();
414  tmp = dqmStore_->book1D("Charge_TEC2", "Charge_TEC2", 1000, 0, 2000);
415  Charge_TEC2 = tmp->getTH1F();
416  tmp = dqmStore_->book1D("Charge_TEC+", "Charge_TEC+", 1000, 0, 2000);
417  Charge_TECP = tmp->getTH1F();
418  tmp = dqmStore_->book1D("Charge_TEC-", "Charge_TEC-", 1000, 0, 2000);
419  Charge_TECM = tmp->getTH1F();
420 
421  /*
422  tmp = dqmStore_->book2D ("Charge_Vs_PathLength_CS1", "Charge_Vs_PathLength_CS1" , 250,0.2,1.4, 500,0,2000); Charge_Vs_PathLength_CS1 = tmp->getTH2F();
423  tmp = dqmStore_->book2D ("Charge_Vs_PathLength_CS2", "Charge_Vs_PathLength_CS2" , 250,0.2,1.4, 500,0,2000); Charge_Vs_PathLength_CS2 = tmp->getTH2F();
424  tmp = dqmStore_->book2D ("Charge_Vs_PathLength_CS3", "Charge_Vs_PathLength_CS3" , 250,0.2,1.4, 500,0,2000); Charge_Vs_PathLength_CS3 = tmp->getTH2F();
425  tmp = dqmStore_->book2D ("Charge_Vs_PathLength_CS4", "Charge_Vs_PathLength_CS4" , 250,0.2,1.4, 500,0,2000); Charge_Vs_PathLength_CS4 = tmp->getTH2F();
426  tmp = dqmStore_->book2D ("Charge_Vs_PathLength_CS5", "Charge_Vs_PathLength_CS5" , 250,0.2,1.4, 500,0,2000); Charge_Vs_PathLength_CS5 = tmp->getTH2F();
427 */
428  tmp = dqmStore_->book2D("Charge_Vs_PathLength", "Charge_Vs_PathLength", 100, 0.2, 1.4, 500, 0, 2000);
430  tmp = dqmStore_->book2D("Charge_Vs_PathLength320", "Charge_Vs_PathLength", 100, 0.2, 1.4, 500, 0, 2000);
432  tmp = dqmStore_->book2D("Charge_Vs_PathLength500", "Charge_Vs_PathLength", 100, 0.2, 1.4, 500, 0, 2000);
434 
435  tmp = dqmStore_->book2D("Charge_Vs_TransversAngle", "Charge_Vs_TransversAngle", 220, -20, 200, 500, 0, 2000);
437  tmp = dqmStore_->book2D("Charge_Vs_Alpha", "Charge_Vs_Alpha", 220, -20, 200, 500, 0, 2000);
439  tmp = dqmStore_->book2D("Charge_Vs_Beta", "Charge_Vs_Beta", 220, -20, 200, 500, 0, 2000);
441 
442  tmp = dqmStore_->book2D("NStrips_Vs_TransversAngle", "NStrips_Vs_TransversAngle", 220, -20, 200, 10, 0, 10);
444  tmp = dqmStore_->book2D("NStrips_Vs_Alpha", "NStrips_Vs_Alpha", 220, -20, 200, 10, 0, 10);
446  tmp = dqmStore_->book2D("NStrips_Vs_Beta", "NStrips_Vs_Beta", 220, -20, 200, 10, 0, 10);
448  tmp = dqmStore_->book1D("NHighStripInCluster", "NHighStripInCluster", 15, 0, 14);
450  tmp = dqmStore_->book1D("NSatStripInCluster", "NSatStripInCluster", 50, 0, 50);
452 
453  tmp = dqmStore_->book1D("TrackChi2OverNDF", "TrackChi2OverNDF", 500, 0, 10);
455  tmp = dqmStore_->book1D("TrackHits", "TrackHits", 40, 0, 40);
456  HTrackHits = tmp->getTH1F();
457 
458  tmp = dqmStore_->book1D("FirstStrip", "FirstStrip", 800, 0, 800);
459  HFirstStrip = tmp->getTH1F();
460 
461  if (strcmp(AlgoMode.c_str(), "MultiJob") != 0) {
462  tmp = dqmStore_->book2D("MPV_Vs_EtaTIB", "MPV_Vs_EtaTIB", 50, -3.0, 3.0, 300, 0, 600);
464  tmp = dqmStore_->book2D("MPV_Vs_EtaTID", "MPV_Vs_EtaTID", 50, -3.0, 3.0, 300, 0, 600);
466  tmp = dqmStore_->book2D("MPV_Vs_EtaTOB", "MPV_Vs_EtaTOB", 50, -3.0, 3.0, 300, 0, 600);
468  tmp = dqmStore_->book2D("MPV_Vs_EtaTEC", "MPV_Vs_EtaTEC", 50, -3.0, 3.0, 300, 0, 600);
470  tmp = dqmStore_->book2D("MPV_Vs_EtaTEC1", "MPV_Vs_EtaTEC1", 50, -3.0, 3.0, 300, 0, 600);
472  tmp = dqmStore_->book2D("MPV_Vs_EtaTEC2", "MPV_Vs_EtaTEC2", 50, -3.0, 3.0, 300, 0, 600);
474 
475  tmp = dqmStore_->book2D("MPV_Vs_PhiTIB", "MPV_Vs_PhiTIB", 50, -3.2, 3.2, 300, 0, 600);
477  tmp = dqmStore_->book2D("MPV_Vs_PhiTID", "MPV_Vs_PhiTID", 50, -3.2, 3.2, 300, 0, 600);
479  tmp = dqmStore_->book2D("MPV_Vs_PhiTOB", "MPV_Vs_PhiTOB", 50, -3.2, 3.2, 300, 0, 600);
481  tmp = dqmStore_->book2D("MPV_Vs_PhiTEC", "MPV_Vs_PhiTEC", 50, -3.2, 3.2, 300, 0, 600);
483  tmp = dqmStore_->book2D("MPV_Vs_PhiTEC1", "MPV_Vs_PhiTEC1", 50, -3.2, 3.2, 300, 0, 600);
485  tmp = dqmStore_->book2D("MPV_Vs_PhiTEC2", "MPV_Vs_PhiTEC2", 50, -3.2, 3.2, 300, 0, 600);
487 
488  tmp = dqmStore_->book1D("MPV_Vs_PathTIB", "MPV_Vs_PathTIB", 100, 0.2, 1.4);
490  tmp = dqmStore_->book1D("MPV_Vs_PathTID", "MPV_Vs_PathTID", 100, 0.2, 1.4);
492  tmp = dqmStore_->book1D("MPV_Vs_PathTOB", "MPV_Vs_PathTOB", 100, 0.2, 1.4);
494  tmp = dqmStore_->book1D("MPV_Vs_PathTEC", "MPV_Vs_PathTEC", 100, 0.2, 1.4);
496  tmp = dqmStore_->book1D("MPV_Vs_PathTEC1", "MPV_Vs_PathTEC1", 100, 0.2, 1.4);
498  tmp = dqmStore_->book1D("MPV_Vs_PathTEC2", "MPV_Vs_PathTEC2", 100, 0.2, 1.4);
500 
501  tmp = dqmStore_->book2D("MPV_Vs_Phi", "MPV_Vs_Phi", 50, -3.2, 3.2, 300, 0, 600);
502  MPV_Vs_Phi = tmp->getTH2F();
503  tmp = dqmStore_->book2D("MPV_Vs_Eta", "MPV_Vs_Eta", 50, -3.0, 3.0, 300, 0, 600);
504  MPV_Vs_Eta = tmp->getTH2F();
505  tmp = dqmStore_->book2D("MPV_Vs_R", "MPV_Vs_R", 150, 0.0, 150.0, 300, 0, 600);
506  MPV_Vs_R = tmp->getTH2F();
507  /*
508  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS1" , "MPV_Vs_PathLength_CS1" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS1 = tmp->getTH1F();
509  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS2" , "MPV_Vs_PathLength_CS2" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS2 = tmp->getTH1F();
510  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS3" , "MPV_Vs_PathLength_CS3" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS3 = tmp->getTH1F();
511  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS4" , "MPV_Vs_PathLength_CS4" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS4 = tmp->getTH1F();
512  tmp = dqmStore_->book1D ("MPV_Vs_PathLength_CS5" , "MPV_Vs_PathLength_CS5" , 250, 0.2, 1.4); MPV_Vs_PathLength_CS5 = tmp->getTH1F();
513 
514  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS1" , "FWHM_Vs_PathLength_CS1", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS1 = tmp->getTH1F();
515  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS2" , "FWHM_Vs_PathLength_CS2", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS2 = tmp->getTH1F();
516  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS3" , "FWHM_Vs_PathLength_CS3", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS3 = tmp->getTH1F();
517  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS4" , "FWHM_Vs_PathLength_CS4", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS4 = tmp->getTH1F();
518  tmp = dqmStore_->book1D ("FWHM_Vs_PathLength_CS5" , "FWHM_Vs_PathLength_CS5", 250, 0.2, 1.4); FWHM_Vs_PathLength_CS5 = tmp->getTH1F();
519 */
520  tmp = dqmStore_->book1D("MPV_Vs_PathLength", "MPV_Vs_PathLength", 100, 0.2, 1.4);
522  tmp = dqmStore_->book1D("MPV_Vs_PathLength320", "MPV_Vs_PathLength", 100, 0.2, 1.4);
524  tmp = dqmStore_->book1D("MPV_Vs_PathLength500", "MPV_Vs_PathLength", 100, 0.2, 1.4);
526 
527  tmp = dqmStore_->book1D("FWHM_Vs_PathLength", "FWHM_Vs_PathLength", 100, 0.2, 1.4);
529  tmp = dqmStore_->book1D("FWHM_Vs_PathLength320", "FWHM_Vs_PathLength", 100, 0.2, 1.4);
531  tmp = dqmStore_->book1D("FWHM_Vs_PathLength500", "FWHM_Vs_PathLength", 100, 0.2, 1.4);
533 
534  tmp = dqmStore_->book1D("MPV_Vs_TransversAngle", "MPV_Vs_TransversAngle", 220, -20, 200);
536  tmp = dqmStore_->book1D("MPV_Vs_Alpha", "MPV_Vs_Alpha", 220, -20, 200);
537  MPV_Vs_Alpha = tmp->getTH1F();
538  tmp = dqmStore_->book1D("MPV_Vs_Beta", "MPV_Vs_Beta", 220, -20, 200);
539  MPV_Vs_Beta = tmp->getTH1F();
540 
541  tmp = dqmStore_->book2D("Error_Vs_MPV", "Error_Vs_MPV", 600, 0, 600, 100, 0, 50);
542  Error_Vs_MPV = tmp->getTH2F();
543  tmp = dqmStore_->book2D("Error_Vs_Entries", "Error_Vs_Entries", 500, 0, 10000, 100, 0, 50);
545  tmp = dqmStore_->book2D("Error_Vs_Eta", "Error_Vs_Eta", 50, -3.0, 3.0, 100, 0, 50);
546  Error_Vs_Eta = tmp->getTH2F();
547  tmp = dqmStore_->book2D("Error_Vs_Phi", "Error_Vs_Phi", 50, -3.2, 3.2, 100, 0, 50);
548  Error_Vs_Phi = tmp->getTH2F();
549 
550  tmp = dqmStore_->book2D("NoMPV_Vs_EtaPhi", "NoMPV_Vs_EtaPhi", 50, -3.0, 3.0, 50, -3.2, 3.2);
552 
553  tmp = dqmStore_->book1D("NumberOfEntriesByAPV", "NumberOfEntriesByAPV", 1000, 0, 10000);
555  tmp = dqmStore_->book1D("Chi2OverNDF", "Chi2OverNDF", 500, 0, 25);
556  HChi2OverNDF = tmp->getTH1F();
557 
558  tmp = dqmStore_->book1D("MPVs", "MPVs", 600, 0, 600);
559  MPVs = tmp->getTH1F();
560  tmp = dqmStore_->book1D("MPVs320", "MPVs320", 600, 0, 600);
561  MPVs320 = tmp->getTH1F();
562  tmp = dqmStore_->book1D("MPVs500", "MPVs500", 600, 0, 600);
563  MPVs500 = tmp->getTH1F();
564 
565  // MPV_vs_10RplusEta tmp = dqmStore_->book2D ("MPV_vs_10RplusEta","MPV_vs_10RplusEta", 48000,0,2400, 800,100,500);
566  }
567 
568  gROOT->cd();
569 
570  auto const& Det = iSetup.getData(tkGeomToken_).dets();
571 
572  // if(strcmp(AlgoMode.c_str(),"MultiJob")!=0 && !FirstSetOfConstants){
573  if (!iSetup.getHandle(gainToken_)) {
574  printf("\n#####################\n\nERROR --> gainHandle is not valid\n\n#####################\n\n");
575  exit(0);
576  }
577  // }
578 
579  unsigned int Id = 0;
580  for (unsigned int i = 0; i < Det.size(); i++) {
581  DetId Detid = Det[i]->geographicalId();
582  int SubDet = Detid.subdetId();
583 
584  if (SubDet == StripSubdetector::TIB || SubDet == StripSubdetector::TID || SubDet == StripSubdetector::TOB ||
585  SubDet == StripSubdetector::TEC) {
586  auto DetUnit = dynamic_cast<StripGeomDetUnit const*>(Det[i]);
587  if (!DetUnit)
588  continue;
589 
590  const StripTopology& Topo = DetUnit->specificTopology();
591  unsigned int NAPV = Topo.nstrips() / 128;
592 
593  double Phi = DetUnit->position().basicVector().phi();
594  double Eta = DetUnit->position().basicVector().eta();
595  double R = DetUnit->position().basicVector().transverse();
596  double Thick = DetUnit->surface().bounds().thickness();
597 
598  for (unsigned int j = 0; j < NAPV; j++) {
599  stAPVGain* APV = new stAPVGain;
600  APV->Index = Id;
601  APV->DetId = Detid.rawId();
602  APV->APVId = j;
603  APV->SubDet = SubDet;
604  APV->MPV = -1;
605  APV->Gain = -1;
606  APV->PreviousGain = 1;
607  APV->Eta = Eta;
608  APV->Phi = Phi;
609  APV->R = R;
610  APV->Thickness = Thick;
611  APV->Side = 0;
612 
613  if (SubDet == StripSubdetector::TID) {
614  APV->Side = tTopo->tecSide(Detid);
615  } else if (SubDet == StripSubdetector::TEC) {
616  APV->Side = tTopo->tecSide(Detid);
617  }
618 
619  APVsCollOrdered.push_back(APV);
620  APVsColl[(APV->DetId << 3) | APV->APVId] = APV;
621  Id++;
622 
623  APV_DetId->Fill(Id, APV->DetId);
624  APV_Id->Fill(Id, APV->APVId);
625  APV_Eta->Fill(Id, APV->Eta);
626  APV_R->Fill(Id, APV->R);
627  APV_SubDet->Fill(Id, APV->SubDet);
628  APV_Thickness->Fill(Id, APV->Thickness);
629  }
630  }
631  }
632 
633  NEvent = 0;
634  SRun = 0;
635  SEvent = 0;
636  STimestamp = 0;
637  ERun = 0;
638  EEvent = 0;
639  ETimestamp = 0;
640 }
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
static constexpr auto TEC
virtual int nstrips() const =0
virtual TH2F * getTH2F() const
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
tuple SubDet
Definition: ntupleEnum.py:14
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoToken_
std::vector< stAPVGain * > APVsCollOrdered
unsigned int APVId
Definition: APVGainStruct.h:13
virtual TH1F * getTH1F() const
float Thickness
Definition: APVGainStruct.h:21
constexpr uint32_t rawId() const
get the raw id
Definition: DetId.h:57
unsigned int DetId
Definition: APVGainStruct.h:12
const edm::EventSetup * iSetup_
bool getData(T &iHolder) const
Definition: EventSetup.h:122
double Gain
Definition: APVGainStruct.h:29
std::unordered_map< unsigned int, stAPVGain * > APVsColl
double PreviousGain
Definition: APVGainStruct.h:31
unsigned int Index
Definition: APVGainStruct.h:10
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
static constexpr auto TOB
Definition: DetId.h:17
static constexpr auto TIB
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
Definition: DQMStore.h:212
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())
Definition: DQMStore.h:98
unsigned int SubDet
Definition: APVGainStruct.h:14
static constexpr auto TID
unsigned int tecSide(const DetId &id) const
void SiStripGainFromData::algoBeginRun ( const edm::Run ,
const edm::EventSetup iSetup 
)
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 1135 of file SiStripGainFromData.cc.

References AlgoMode, sistrip::APV, APV_PrevGain, stAPVGain::APVId, APVsCollOrdered, stAPVGain::DetId, beamvalidation::exit(), FirstSetOfConstants, gainToken_, edm::EventSetup::getHandle(), stAPVGain::Index, stAPVGain::PreviousGain, gpuVertexFinder::printf(), and Validation.

1135  {
1136  if ((strcmp(AlgoMode.c_str(), "MultiJob") != 0 && !FirstSetOfConstants) || Validation) {
1137  const auto gainHandle = iSetup.getHandle(gainToken_);
1138  if (!gainHandle.isValid()) {
1139  printf("\n#####################\n\nERROR --> gainHandle is not valid\n\n#####################\n\n");
1140  exit(0);
1141  }
1142 
1143  for (std::vector<stAPVGain*>::iterator it = APVsCollOrdered.begin(); it != APVsCollOrdered.end(); it++) {
1144  stAPVGain* APV = *it;
1145 
1146  if (gainHandle.isValid()) {
1147  SiStripApvGain::Range detGainRange = gainHandle->getRange(APV->DetId);
1148  APV->PreviousGain = *(detGainRange.first + APV->APVId);
1149  // APV_PrevGain->Fill(APV->Index,APV->PreviousGain);
1150  APV_PrevGain->SetBinContent(APV_PrevGain->GetXaxis()->FindBin(APV->Index), APV->PreviousGain);
1151  if (APV->PreviousGain < 0)
1152  APV->PreviousGain = 1;
1153  } else {
1154  printf("GAIN HANDLE IS NOT VALID\n");
1155  }
1156  }
1157  }
1158 }
edm::ESGetToken< SiStripGain, SiStripGainRcd > gainToken_
std::vector< stAPVGain * > APVsCollOrdered
unsigned int APVId
Definition: APVGainStruct.h:13
unsigned int DetId
Definition: APVGainStruct.h:12
double PreviousGain
Definition: APVGainStruct.h:31
unsigned int Index
Definition: APVGainStruct.h:10
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)
std::pair< ContainerIterator, ContainerIterator > Range
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
Definition: EventSetup.h:151
void SiStripGainFromData::algoEndJob ( )
overrideprivatevirtual

Reimplemented from ConditionDBWriter< SiStripApvGain >.

Definition at line 642 of file SiStripGainFromData.cc.

References AlgoMode, sistrip::APV, APV_Charge, APV_CumulGain, APV_Gain, APV_Momentum, APV_MPV, APV_PathLength, APV_PathLengthM, stAPVGain::APVId, APVsColl, APVsCollOrdered, b, hcaldqm::constants::BAD, newFWLiteAna::bin, CalibrationLevel, dqm::implementation::DQMStore::cd(), Charge_TEC, Charge_TEC1, Charge_TEC2, Charge_TECM, Charge_TECP, Charge_TIB, Charge_TID, Charge_TIDM, Charge_TIDP, Charge_TOB, Charge_Vs_Alpha, Charge_Vs_Beta, Charge_Vs_PathLength, Charge_Vs_PathLength320, Charge_Vs_PathLength500, Charge_Vs_PathTEC, Charge_Vs_PathTEC1, Charge_Vs_PathTEC2, Charge_Vs_PathTIB, Charge_Vs_PathTID, Charge_Vs_PathTOB, Charge_Vs_TransversAngle, CheckIfFileExist, stAPVGain::DetId, dqmStore_, EEvent, Error_Vs_Entries, Error_Vs_Eta, Error_Vs_MPV, Error_Vs_Phi, ERun, stAPVGain::Eta, validate-o2o-wbm::f, mergeVDriftHistosByStation::file, FirstSetOfConstants, FWHM_Vs_PathLength, FWHM_Vs_PathLength320, FWHM_Vs_PathLength500, stAPVGain::Gain, getPeakOfLandau(), hcaldqm::constants::GOOD, HChi2OverNDF, HFirstStrip, HTrackChi2OverNDF, HTrackHits, Exhume::I, stAPVGain::Index, dqmiolumiharvest::j, JobInfo, MaxMPVError, stAPVGain::MPV, MPV_Vs_Alpha, MPV_Vs_Beta, MPV_Vs_Eta, MPV_Vs_EtaTEC, MPV_Vs_EtaTEC1, MPV_Vs_EtaTEC2, MPV_Vs_EtaTIB, MPV_Vs_EtaTID, MPV_Vs_EtaTOB, MPV_Vs_PathLength, MPV_Vs_PathLength320, MPV_Vs_PathLength500, MPV_Vs_PathTEC, MPV_Vs_PathTEC1, MPV_Vs_PathTEC2, MPV_Vs_PathTIB, MPV_Vs_PathTID, MPV_Vs_PathTOB, MPV_Vs_Phi, MPV_Vs_PhiTEC, MPV_Vs_PhiTEC1, MPV_Vs_PhiTEC2, MPV_Vs_PhiTIB, MPV_Vs_PhiTID, MPV_Vs_PhiTOB, MPV_Vs_R, MPV_Vs_TransversAngle, MPVs, MPVs320, MPVs500, NEvent, NHighStripInCluster, NoMPV_Vs_EtaPhi, NSatStripInCluster, NStrips_Vs_Alpha, NStrips_Vs_TransversAngle, NumberOfEntriesByAPV, OutputGains, OutputHistos, stAPVGain::Phi, stAPVGain::PreviousGain, gpuVertexFinder::printf(), stAPVGain::R, dqm::implementation::DQMStore::save(), SEvent, stAPVGain::Side, SRun, stAPVGain::SubDet, StripSubdetector::TEC, stAPVGain::Thickness, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, Tracks_P_Vs_Eta, Tracks_Pt_Vs_Eta, and VInputFiles.

642  {
643  unsigned int I = 0;
644 
645  if (strcmp(AlgoMode.c_str(), "WriteOnDB") == 0 || strcmp(AlgoMode.c_str(), "Merge") == 0) {
646  TH1::AddDirectory(kTRUE);
647 
648  TFile* file = nullptr;
649  for (unsigned int f = 0; f < VInputFiles.size(); f++) {
650  printf("Loading New Input File : %s\n", VInputFiles[f].c_str());
651  if (CheckIfFileExist) {
652  FILE* doesFileExist = fopen(VInputFiles[f].c_str(), "r");
653  if (!doesFileExist) {
654  printf("File %s doesn't exist\n", VInputFiles[f].c_str());
655  continue;
656  } else {
657  fclose(doesFileExist);
658  }
659  }
660  file = new TFile(VInputFiles[f].c_str());
661  if (!file || file->IsZombie()) {
662  printf("### Bug With File %s\n### File will be skipped \n", VInputFiles[f].c_str());
663  continue;
664  }
665  APV_Charge->Add((TH1*)file->FindObjectAny("APV_Charge"), 1);
666  APV_Momentum->Add((TH1*)file->FindObjectAny("APV_Momentum"), 1);
667  APV_PathLength->Add((TH1*)file->FindObjectAny("APV_PathLength"), 1);
668 
669  Tracks_P_Vs_Eta->Add((TH1*)file->FindObjectAny("Tracks_P_Vs_Eta"), 1);
670  Tracks_Pt_Vs_Eta->Add((TH1*)file->FindObjectAny("Tracks_Pt_Vs_Eta"), 1);
671 
672  Charge_Vs_PathTIB->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTIB"), 1);
673  Charge_Vs_PathTID->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTID"), 1);
674  Charge_Vs_PathTOB->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTOB"), 1);
675  Charge_Vs_PathTEC->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTEC"), 1);
676  Charge_Vs_PathTEC1->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTEC1"), 1);
677  Charge_Vs_PathTEC2->Add((TH1*)file->FindObjectAny("Charge_Vs_PathTEC2"), 1);
678 
679  HTrackChi2OverNDF->Add((TH1*)file->FindObjectAny("TrackChi2OverNDF"), 1);
680  HTrackHits->Add((TH1*)file->FindObjectAny("TrackHits"), 1);
681 
682  NHighStripInCluster->Add((TH1*)file->FindObjectAny("NHighStripInCluster"), 1);
683  NSatStripInCluster->Add((TH1*)file->FindObjectAny("NSatStripInCluster"), 1);
684  Charge_Vs_PathLength->Add((TH1*)file->FindObjectAny("Charge_Vs_PathLength"), 1);
685  Charge_Vs_PathLength320->Add((TH1*)file->FindObjectAny("Charge_Vs_PathLength320"), 1);
686  Charge_Vs_PathLength500->Add((TH1*)file->FindObjectAny("Charge_Vs_PathLength500"), 1);
687  Charge_Vs_TransversAngle->Add((TH1*)file->FindObjectAny("Charge_Vs_TransversAngle"), 1);
688  NStrips_Vs_TransversAngle->Add((TH1*)file->FindObjectAny("NStrips_Vs_TransversAngle"), 1);
689  Charge_Vs_Alpha->Add((TH1*)file->FindObjectAny("Charge_Vs_Alpha"), 1);
690  NStrips_Vs_Alpha->Add((TH1*)file->FindObjectAny("NStrips_Vs_Alpha"), 1);
691  HFirstStrip->Add((TH1*)file->FindObjectAny("FirstStrip"), 1);
692 
693  TH1F* JobInfo_tmp = (TH1F*)file->FindObjectAny("JobInfo");
694  NEvent += (unsigned int)JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(1));
695  unsigned int tmp_SRun = (unsigned int)JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(3));
696  unsigned int tmp_SEvent = (unsigned int)JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(4));
697  unsigned int tmp_ERun = (unsigned int)JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(6));
698  unsigned int tmp_EEvent = (unsigned int)JobInfo_tmp->GetBinContent(JobInfo_tmp->GetXaxis()->FindBin(7));
699 
700  if (SRun == 0)
701  SRun = tmp_SRun;
702 
703  if (tmp_SRun < SRun) {
704  SRun = tmp_SRun;
705  SEvent = tmp_SEvent;
706  } else if (tmp_SRun == SRun && tmp_SEvent < SEvent) {
707  SEvent = tmp_SEvent;
708  }
709 
710  if (tmp_ERun > ERun) {
711  ERun = tmp_ERun;
712  EEvent = tmp_EEvent;
713  } else if (tmp_ERun == ERun && tmp_EEvent > EEvent) {
714  EEvent = tmp_EEvent;
715  }
716 
717  printf("Deleting Current Input File\n");
718  file->Close();
719  delete file;
720  }
721  }
722 
723  JobInfo->Fill(1, NEvent);
724  JobInfo->Fill(3, SRun);
725  JobInfo->Fill(4, SEvent);
726  JobInfo->Fill(6, ERun);
727  JobInfo->Fill(7, EEvent);
728 
729  if (strcmp(AlgoMode.c_str(), "MultiJob") != 0) {
730  TH1D* Proj = nullptr;
731  double FitResults[5];
732  I = 0;
733  for (auto it = APVsColl.begin(); it != APVsColl.end(); it++) {
734  if (I % 3650 == 0)
735  printf("Fitting Histograms \t %6.2f%%\n", (100.0 * I) / APVsColl.size());
736  I++;
737  stAPVGain* APV = it->second;
738 
739  int bin = APV_Charge->GetXaxis()->FindBin(APV->Index);
740  Proj = APV_Charge->ProjectionY(" ", bin, bin, "e");
741  Proj = (TH1D*)Proj->Clone();
742  if (Proj == nullptr)
743  continue;
744 
745  // ADD PROJECTTIONS COMMING FROM THE SECOND APV IN THE PAIR
746  if (CalibrationLevel == 1) {
747  int SecondAPVId = APV->APVId;
748  if (SecondAPVId % 2 == 0) {
749  SecondAPVId = SecondAPVId + 1;
750  } else {
751  SecondAPVId = SecondAPVId - 1;
752  }
753  stAPVGain* APV2 = APVsColl[(APV->DetId << 3) | SecondAPVId];
754 
755  int bin2 = APV_Charge->GetXaxis()->FindBin(APV2->Index);
756  TH1D* Proj2 = APV_Charge->ProjectionY(" ", bin2, bin2, "e");
757  if (Proj2 != nullptr) {
758  Proj->Add(Proj2, 1);
759  }
760  } else if (CalibrationLevel > 1) {
761  // printf("%8i %i--> %4.0f + %4.0f\n",APV->DetId, APV->APVId, 0.0, Proj->GetEntries());
762  for (auto it2 = APVsColl.begin(); it2 != APVsColl.end(); it2++) {
763  stAPVGain* APV2 = it2->second;
764 
765  if (APV2->DetId != APV->DetId)
766  continue;
767  if (APV2->APVId == APV->APVId)
768  continue;
769 
770  int bin2 = APV_Charge->GetXaxis()->FindBin(APV2->Index);
771  TH1D* Proj2 = APV_Charge->ProjectionY(" ", bin2, bin2, "e");
772  if (Proj2 != nullptr) {
773  // printf("%8i %i--> %4.0f + %4.0f\n",APV2->DetId, APV2->APVId, Proj->GetEntries(), Proj2->GetEntries());
774  Proj->Add(Proj2, 1);
775  }
776  }
777  // printf("%8i %i--> %4.0f Full\n",APV->DetId, APV->APVId, Proj->GetEntries());
778  }
779 
780  //std::cout << "Proj->GetEntries(): " << Proj->GetEntries() << ", Proj->GetMean(): " << Proj->GetMean() << std::endl;
781 
782  getPeakOfLandau(Proj, FitResults);
783  APV->MPV = FitResults[0];
784  // printf("MPV = %f - %f\n",FitResults[0], FitResults[1]);
785  if (FitResults[0] != -0.5 && FitResults[1] < MaxMPVError) {
786  APV_MPV->Fill(APV->Index, APV->MPV);
787  MPVs->Fill(APV->MPV);
788  if (APV->Thickness < 0.04)
789  MPVs320->Fill(APV->MPV);
790  if (APV->Thickness > 0.04)
791  MPVs500->Fill(APV->MPV);
792 
793  MPV_Vs_R->Fill(APV->R, APV->MPV);
794  MPV_Vs_Eta->Fill(APV->Eta, APV->MPV);
795  if (APV->SubDet == StripSubdetector::TIB)
796  MPV_Vs_EtaTIB->Fill(APV->Eta, APV->MPV);
797  if (APV->SubDet == StripSubdetector::TID)
798  MPV_Vs_EtaTID->Fill(APV->Eta, APV->MPV);
799  if (APV->SubDet == StripSubdetector::TOB)
800  MPV_Vs_EtaTOB->Fill(APV->Eta, APV->MPV);
801  if (APV->SubDet == StripSubdetector::TEC) {
802  MPV_Vs_EtaTEC->Fill(APV->Eta, APV->MPV);
803  if (APV->Thickness < 0.04)
804  MPV_Vs_EtaTEC1->Fill(APV->Eta, APV->MPV);
805  if (APV->Thickness > 0.04)
806  MPV_Vs_EtaTEC2->Fill(APV->Eta, APV->MPV);
807  }
808  MPV_Vs_Phi->Fill(APV->Phi, APV->MPV);
809  if (APV->SubDet == StripSubdetector::TIB)
810  MPV_Vs_PhiTIB->Fill(APV->Phi, APV->MPV);
811  if (APV->SubDet == StripSubdetector::TID)
812  MPV_Vs_PhiTID->Fill(APV->Phi, APV->MPV);
813  if (APV->SubDet == StripSubdetector::TOB)
814  MPV_Vs_PhiTOB->Fill(APV->Phi, APV->MPV);
815  if (APV->SubDet == StripSubdetector::TEC) {
816  MPV_Vs_PhiTEC->Fill(APV->Phi, APV->MPV);
817  if (APV->Thickness < 0.04)
818  MPV_Vs_PhiTEC1->Fill(APV->Phi, APV->MPV);
819  if (APV->Thickness > 0.04)
820  MPV_Vs_PhiTEC2->Fill(APV->Phi, APV->MPV);
821  }
822 
823  if (APV->SubDet == StripSubdetector::TIB)
824  Charge_TIB->Add(Proj, 1);
825  if (APV->SubDet == StripSubdetector::TID) {
826  Charge_TID->Add(Proj, 1);
827  if (APV->Side == 1)
828  Charge_TIDM->Add(Proj, 1);
829  if (APV->Side == 2)
830  Charge_TIDP->Add(Proj, 1);
831  }
832  if (APV->SubDet == StripSubdetector::TOB)
833  Charge_TOB->Add(Proj, 1);
834  if (APV->SubDet == StripSubdetector::TEC) {
835  Charge_TEC->Add(Proj, 1);
836  if (APV->Thickness < 0.04)
837  Charge_TEC1->Add(Proj, 1);
838  if (APV->Thickness > 0.04)
839  Charge_TEC2->Add(Proj, 1);
840  if (APV->Side == 1)
841  Charge_TECM->Add(Proj, 1);
842  if (APV->Side == 2)
843  Charge_TECP->Add(Proj, 1);
844  }
845  }
846 
847  if (APV->SubDet == StripSubdetector::TIB)
848  Charge_TIB->Add(Proj, 1);
849  if (APV->SubDet == StripSubdetector::TID) {
850  Charge_TID->Add(Proj, 1);
851  if (APV->Side == 1)
852  Charge_TIDM->Add(Proj, 1);
853  if (APV->Side == 2)
854  Charge_TIDP->Add(Proj, 1);
855  }
856  if (APV->SubDet == StripSubdetector::TOB)
857  Charge_TOB->Add(Proj, 1);
858  if (APV->SubDet == StripSubdetector::TEC) {
859  Charge_TEC->Add(Proj, 1);
860  if (APV->Thickness < 0.04)
861  Charge_TEC1->Add(Proj, 1);
862  if (APV->Thickness > 0.04)
863  Charge_TEC2->Add(Proj, 1);
864  if (APV->Side == 1)
865  Charge_TECM->Add(Proj, 1);
866  if (APV->Side == 2)
867  Charge_TECP->Add(Proj, 1);
868  }
869 
870  if (FitResults[0] != -0.5) {
871  HChi2OverNDF->Fill(FitResults[4]);
872  Error_Vs_MPV->Fill(FitResults[0], FitResults[1]);
873  Error_Vs_Entries->Fill(Proj->GetEntries(), FitResults[1]);
874  Error_Vs_Eta->Fill(APV->Eta, FitResults[1]);
875  Error_Vs_Phi->Fill(APV->Phi, FitResults[1]);
876  }
877  NumberOfEntriesByAPV->Fill(Proj->GetEntries());
878  delete Proj;
879 
880  Proj = APV_PathLength->ProjectionY(" ", bin, bin, "e");
881  if (Proj == nullptr)
882  continue;
883 
884  APV_PathLengthM->SetBinContent(APV->Index, Proj->GetMean(1));
885  APV_PathLengthM->SetBinError(APV->Index, Proj->GetMeanError(1));
886  // delete Proj;
887  }
888 
889  unsigned int GOOD = 0;
890  unsigned int BAD = 0;
891  double MPVmean = 300.; //MPVs->GetMean();
892  for (auto it = APVsColl.begin(); it != APVsColl.end(); it++) {
893  stAPVGain* APV = it->second;
894  if (APV->MPV > 0) {
895  APV->Gain = APV->MPV / MPVmean; // APV->MPV;
896  GOOD++;
897  } else {
898  NoMPV_Vs_EtaPhi->Fill(APV->Eta, APV->Phi);
899  APV->Gain = 1;
900  BAD++;
901  }
902  if (APV->Gain <= 0)
903  APV->Gain = 1;
904  APV_Gain->Fill(APV->Index, APV->Gain);
905 
906  if (!FirstSetOfConstants)
907  APV->Gain *= APV->PreviousGain;
908  APV_CumulGain->Fill(APV->Index, APV->Gain);
909  }
910 
911  for (int j = 0; j < Charge_Vs_PathLength->GetXaxis()->GetNbins(); j++) {
912  Proj = Charge_Vs_PathLength->ProjectionY(" ", j, j, "e");
913  getPeakOfLandau(Proj, FitResults);
914  if (FitResults[0] == -0.5)
915  continue;
916  MPV_Vs_PathLength->SetBinContent(j, FitResults[0] / Charge_Vs_PathLength->GetXaxis()->GetBinCenter(j));
917  MPV_Vs_PathLength->SetBinError(j, FitResults[1] / Charge_Vs_PathLength->GetXaxis()->GetBinCenter(j));
918  FWHM_Vs_PathLength->SetBinContent(
919  j, FitResults[2] / (FitResults[0] / Charge_Vs_PathLength->GetXaxis()->GetBinCenter(j)));
920  FWHM_Vs_PathLength->SetBinError(
921  j, FitResults[3] / (FitResults[0] / Charge_Vs_PathLength->GetXaxis()->GetBinCenter(j)));
922  delete Proj;
923  }
924 
925  for (int j = 0; j < Charge_Vs_PathLength320->GetXaxis()->GetNbins(); j++) {
926  Proj = Charge_Vs_PathLength320->ProjectionY(" ", j, j, "e");
927  getPeakOfLandau(Proj, FitResults);
928  if (FitResults[0] == -0.5)
929  continue;
930  MPV_Vs_PathLength320->SetBinContent(j, FitResults[0] / Charge_Vs_PathLength320->GetXaxis()->GetBinCenter(j));
931  MPV_Vs_PathLength320->SetBinError(j, FitResults[1] / Charge_Vs_PathLength320->GetXaxis()->GetBinCenter(j));
932  FWHM_Vs_PathLength320->SetBinContent(
933  j, FitResults[2] / (FitResults[0] / Charge_Vs_PathLength320->GetXaxis()->GetBinCenter(j)));
934  FWHM_Vs_PathLength320->SetBinError(
935  j, FitResults[3] / (FitResults[0] / Charge_Vs_PathLength320->GetXaxis()->GetBinCenter(j)));
936  delete Proj;
937  }
938 
939  for (int j = 0; j < Charge_Vs_PathLength500->GetXaxis()->GetNbins(); j++) {
940  Proj = Charge_Vs_PathLength500->ProjectionY(" ", j, j, "e");
941  getPeakOfLandau(Proj, FitResults);
942  if (FitResults[0] == -0.5)
943  continue;
944  MPV_Vs_PathLength500->SetBinContent(j, FitResults[0] / Charge_Vs_PathLength500->GetXaxis()->GetBinCenter(j));
945  MPV_Vs_PathLength500->SetBinError(j, FitResults[1] / Charge_Vs_PathLength500->GetXaxis()->GetBinCenter(j));
946  FWHM_Vs_PathLength500->SetBinContent(
947  j, FitResults[2] / (FitResults[0] / Charge_Vs_PathLength500->GetXaxis()->GetBinCenter(j)));
948  FWHM_Vs_PathLength500->SetBinError(
949  j, FitResults[3] / (FitResults[0] / Charge_Vs_PathLength500->GetXaxis()->GetBinCenter(j)));
950  delete Proj;
951  }
952  /*
953  for(int j=0;j<Charge_Vs_PathLength_CS1->GetXaxis()->GetNbins();j++){
954  Proj = Charge_Vs_PathLength_CS1->ProjectionY(" ",j,j,"e");
955  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
956  MPV_Vs_PathLength_CS1->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS1->GetXaxis()->GetBinCenter(j));
957  MPV_Vs_PathLength_CS1->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS1->GetXaxis()->GetBinCenter(j));
958  FWHM_Vs_PathLength_CS1->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS1->GetXaxis()->GetBinCenter(j) ));
959  FWHM_Vs_PathLength_CS1->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS1->GetXaxis()->GetBinCenter(j) ));
960  delete Proj;
961  }
962 
963  for(int j=0;j<Charge_Vs_PathLength_CS2->GetXaxis()->GetNbins();j++){
964  Proj = Charge_Vs_PathLength_CS2->ProjectionY(" ",j,j,"e");
965  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
966  MPV_Vs_PathLength_CS2->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS2->GetXaxis()->GetBinCenter(j));
967  MPV_Vs_PathLength_CS2->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS2->GetXaxis()->GetBinCenter(j));
968  FWHM_Vs_PathLength_CS2->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS2->GetXaxis()->GetBinCenter(j) ));
969  FWHM_Vs_PathLength_CS2->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS2->GetXaxis()->GetBinCenter(j) ));
970  delete Proj;
971  }
972 
973  for(int j=0;j<Charge_Vs_PathLength_CS3->GetXaxis()->GetNbins();j++){
974  Proj = Charge_Vs_PathLength_CS3->ProjectionY(" ",j,j,"e");
975  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
976  MPV_Vs_PathLength_CS3->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS3->GetXaxis()->GetBinCenter(j));
977  MPV_Vs_PathLength_CS3->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS3->GetXaxis()->GetBinCenter(j));
978  FWHM_Vs_PathLength_CS3->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS3->GetXaxis()->GetBinCenter(j) ));
979  FWHM_Vs_PathLength_CS3->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS3->GetXaxis()->GetBinCenter(j) ));
980  delete Proj;
981  }
982 
983  for(int j=0;j<Charge_Vs_PathLength_CS4->GetXaxis()->GetNbins();j++){
984  Proj = Charge_Vs_PathLength_CS4->ProjectionY(" ",j,j,"e");
985  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
986  MPV_Vs_PathLength_CS4->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS4->GetXaxis()->GetBinCenter(j));
987  MPV_Vs_PathLength_CS4->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS4->GetXaxis()->GetBinCenter(j));
988  FWHM_Vs_PathLength_CS4->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS4->GetXaxis()->GetBinCenter(j) ));
989  FWHM_Vs_PathLength_CS4->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS4->GetXaxis()->GetBinCenter(j) ));
990  delete Proj;
991  }
992 
993  for(int j=0;j<Charge_Vs_PathLength_CS5->GetXaxis()->GetNbins();j++){
994  Proj = Charge_Vs_PathLength_CS5->ProjectionY(" ",j,j,"e");
995  getPeakOfLandau(Proj,FitResults); if(FitResults[0] ==-0.5)continue;
996  MPV_Vs_PathLength_CS5->SetBinContent (j, FitResults[0]/Charge_Vs_PathLength_CS5->GetXaxis()->GetBinCenter(j));
997  MPV_Vs_PathLength_CS5->SetBinError (j, FitResults[1]/Charge_Vs_PathLength_CS5->GetXaxis()->GetBinCenter(j));
998  FWHM_Vs_PathLength_CS5->SetBinContent(j, FitResults[2]/(FitResults[0]/Charge_Vs_PathLength_CS5->GetXaxis()->GetBinCenter(j) ));
999  FWHM_Vs_PathLength_CS5->SetBinError (j, FitResults[3]/(FitResults[0]/Charge_Vs_PathLength_CS5->GetXaxis()->GetBinCenter(j) ));
1000  delete Proj;
1001  }
1002 */
1003 
1004  for (int j = 0; j < Charge_Vs_PathTIB->GetXaxis()->GetNbins(); j++) {
1005  Proj = Charge_Vs_PathTIB->ProjectionY(" ", j, j, "e");
1006  getPeakOfLandau(Proj, FitResults);
1007  if (FitResults[0] == -0.5)
1008  continue;
1009  MPV_Vs_PathTIB->SetBinContent(j, FitResults[0] / Charge_Vs_PathTIB->GetXaxis()->GetBinCenter(j));
1010  MPV_Vs_PathTIB->SetBinError(j, FitResults[1] / Charge_Vs_PathTIB->GetXaxis()->GetBinCenter(j));
1011  delete Proj;
1012  }
1013 
1014  for (int j = 0; j < Charge_Vs_PathTID->GetXaxis()->GetNbins(); j++) {
1015  Proj = Charge_Vs_PathTID->ProjectionY(" ", j, j, "e");
1016  getPeakOfLandau(Proj, FitResults);
1017  if (FitResults[0] == -0.5)
1018  continue;
1019  MPV_Vs_PathTID->SetBinContent(j, FitResults[0] / Charge_Vs_PathTID->GetXaxis()->GetBinCenter(j));
1020  MPV_Vs_PathTID->SetBinError(j, FitResults[1] / Charge_Vs_PathTID->GetXaxis()->GetBinCenter(j));
1021  delete Proj;
1022  }
1023 
1024  for (int j = 0; j < Charge_Vs_PathTOB->GetXaxis()->GetNbins(); j++) {
1025  Proj = Charge_Vs_PathTOB->ProjectionY(" ", j, j, "e");
1026  getPeakOfLandau(Proj, FitResults);
1027  if (FitResults[0] == -0.5)
1028  continue;
1029  MPV_Vs_PathTOB->SetBinContent(j, FitResults[0] / Charge_Vs_PathTOB->GetXaxis()->GetBinCenter(j));
1030  MPV_Vs_PathTOB->SetBinError(j, FitResults[1] / Charge_Vs_PathTOB->GetXaxis()->GetBinCenter(j));
1031  delete Proj;
1032  }
1033 
1034  for (int j = 0; j < Charge_Vs_PathTEC->GetXaxis()->GetNbins(); j++) {
1035  Proj = Charge_Vs_PathTEC->ProjectionY(" ", j, j, "e");
1036  getPeakOfLandau(Proj, FitResults);
1037  if (FitResults[0] == -0.5)
1038  continue;
1039  MPV_Vs_PathTEC->SetBinContent(j, FitResults[0] / Charge_Vs_PathTEC->GetXaxis()->GetBinCenter(j));
1040  MPV_Vs_PathTEC->SetBinError(j, FitResults[1] / Charge_Vs_PathTEC->GetXaxis()->GetBinCenter(j));
1041  delete Proj;
1042  }
1043 
1044  for (int j = 0; j < Charge_Vs_PathTEC1->GetXaxis()->GetNbins(); j++) {
1045  Proj = Charge_Vs_PathTEC1->ProjectionY(" ", j, j, "e");
1046  getPeakOfLandau(Proj, FitResults);
1047  if (FitResults[0] == -0.5)
1048  continue;
1049  MPV_Vs_PathTEC1->SetBinContent(j, FitResults[0] / Charge_Vs_PathTEC1->GetXaxis()->GetBinCenter(j));
1050  MPV_Vs_PathTEC1->SetBinError(j, FitResults[1] / Charge_Vs_PathTEC1->GetXaxis()->GetBinCenter(j));
1051  delete Proj;
1052  }
1053 
1054  for (int j = 0; j < Charge_Vs_PathTEC2->GetXaxis()->GetNbins(); j++) {
1055  Proj = Charge_Vs_PathTEC2->ProjectionY(" ", j, j, "e");
1056  getPeakOfLandau(Proj, FitResults);
1057  if (FitResults[0] == -0.5)
1058  continue;
1059  MPV_Vs_PathTEC2->SetBinContent(j, FitResults[0] / Charge_Vs_PathTEC2->GetXaxis()->GetBinCenter(j));
1060  MPV_Vs_PathTEC2->SetBinError(j, FitResults[1] / Charge_Vs_PathTEC2->GetXaxis()->GetBinCenter(j));
1061  delete Proj;
1062  }
1063 
1064  for (int j = 1; j < Charge_Vs_TransversAngle->GetXaxis()->GetNbins(); j++) {
1065  Proj = Charge_Vs_TransversAngle->ProjectionY(" ", j, j, "e");
1066  getPeakOfLandau(Proj, FitResults);
1067  if (FitResults[0] == -0.5)
1068  continue;
1069  MPV_Vs_TransversAngle->SetBinContent(j, FitResults[0]);
1070  MPV_Vs_TransversAngle->SetBinError(j, FitResults[1]);
1071  delete Proj;
1072  }
1073 
1074  for (int j = 1; j < Charge_Vs_Alpha->GetXaxis()->GetNbins(); j++) {
1075  Proj = Charge_Vs_Alpha->ProjectionY(" ", j, j, "e");
1076  getPeakOfLandau(Proj, FitResults);
1077  if (FitResults[0] == -0.5)
1078  continue;
1079  MPV_Vs_Alpha->SetBinContent(j, FitResults[0]);
1080  MPV_Vs_Alpha->SetBinError(j, FitResults[1]);
1081  delete Proj;
1082  }
1083 
1084  for (int j = 1; j < Charge_Vs_Beta->GetXaxis()->GetNbins(); j++) {
1085  Proj = Charge_Vs_Beta->ProjectionY(" ", j, j, "e");
1086  getPeakOfLandau(Proj, FitResults);
1087  if (FitResults[0] == -0.5)
1088  continue;
1089  MPV_Vs_Beta->SetBinContent(j, FitResults[0]);
1090  MPV_Vs_Beta->SetBinError(j, FitResults[1]);
1091  delete Proj;
1092  }
1093 
1094  FILE* Gains = fopen(OutputGains.c_str(), "w");
1095  fprintf(Gains, "NEvents = %i\n", NEvent);
1096  fprintf(Gains, "Number of APVs = %lu\n", static_cast<unsigned long>(APVsColl.size()));
1097  fprintf(Gains, "GoodFits = %i BadFits = %i ratio = %f\n", GOOD, BAD, (100.0 * GOOD) / (GOOD + BAD));
1098  for (std::vector<stAPVGain*>::iterator it = APVsCollOrdered.begin(); it != APVsCollOrdered.end(); it++) {
1099  stAPVGain* APV = *it;
1100  fprintf(Gains,
1101  "%i | %i | PreviousGain = %7.5f NewGain = %7.5f\n",
1102  APV->DetId,
1103  APV->APVId,
1104  APV->PreviousGain,
1105  APV->Gain);
1106  }
1107 
1108  std::vector<int> DetIdOfBuggedAPV;
1109  fprintf(Gains, "----------------------------------------------------------------------\n");
1110  for (std::vector<stAPVGain*>::iterator it = APVsCollOrdered.begin(); it != APVsCollOrdered.end(); it++) {
1111  stAPVGain* APV = *it;
1112  if (APV->MPV > 0 && APV->MPV < 200) {
1113  bool tmpBug = false;
1114  for (unsigned int b = 0; b < DetIdOfBuggedAPV.size() && !tmpBug; b++) {
1115  if (DetIdOfBuggedAPV[b] == APV->DetId)
1116  tmpBug = true;
1117  }
1118  if (!tmpBug) {
1119  fprintf(Gains, "%i,\n", APV->DetId);
1120  DetIdOfBuggedAPV.push_back(APV->DetId);
1121  }
1122  }
1123  }
1124 
1125  fclose(Gains);
1126 
1127  // delete [] FitResults;
1128  // delete Proj;
1129  }
1130 
1131  dqmStore_->cd();
1133 }
static constexpr auto TEC
std::vector< stAPVGain * > APVsCollOrdered
unsigned int APVId
Definition: APVGainStruct.h:13
float Thickness
Definition: APVGainStruct.h:21
unsigned int DetId
Definition: APVGainStruct.h:12
vector< string > VInputFiles
double Gain
Definition: APVGainStruct.h:29
std::unordered_map< unsigned int, stAPVGain * > APVsColl
double PreviousGain
Definition: APVGainStruct.h:31
unsigned int Index
Definition: APVGainStruct.h:10
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)
const std::complex< double > I
Definition: I.h:8
double const GOOD
Definition: Constants.h:13
static constexpr auto TOB
double const BAD
Definition: Constants.h:15
static constexpr auto TIB
double b
Definition: hdecay.h:118
void getPeakOfLandau(TH1 *InputHisto, double *FitResults, double LowRange=0, double HighRange=5400)
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
Definition: DQMStore.cc:784
unsigned int SubDet
Definition: APVGainStruct.h:14
static constexpr auto TID
double SiStripGainFromData::ComputeChargeOverPath ( const SiStripCluster Cluster,
TrajectoryStateOnSurface  trajState,
const edm::EventSetup iSetup,
const Track track,
double  trajChi2OverN 
)
private

Definition at line 1258 of file SiStripGainFromData.cc.

References a, AllowSaturation, alpha, SiStripCluster::amplitudes(), sistrip::APV, APV_Charge, APV_Momentum, APV_PathLength, APVsColl, HLT_FULL_cff::beta, PixelTestBeamValidation_cfi::Charge, Charge_Vs_Alpha, Charge_Vs_Beta, Charge_Vs_PathLength, Charge_Vs_PathLength320, Charge_Vs_PathLength500, Charge_Vs_PathTEC, Charge_Vs_PathTEC1, Charge_Vs_PathTEC2, Charge_Vs_PathTIB, Charge_Vs_PathTID, Charge_Vs_PathTOB, Charge_Vs_TransversAngle, SiStripCluster::firstStrip(), TrajectoryStateOnSurface::globalMomentum(), HFirstStrip, stAPVGain::Index, IsFarFromBorder(), TrajectoryStateOnSurface::localDirection(), PV3DBase< T, PVType, FrameType >::mag(), MaxNrStrips, NHighStripInCluster, NSatStripInCluster, NStrips_Vs_Alpha, NStrips_Vs_Beta, NStrips_Vs_TransversAngle, fed_dqm_sourceclient-live_cfg::path, funct::pow(), stAPVGain::PreviousGain, mathSSE::sqrt(), stAPVGain::SubDet, StripSubdetector::TEC, stAPVGain::Thickness, StripSubdetector::TIB, StripSubdetector::TID, StripSubdetector::TOB, Validation, PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

Referenced by algoAnalyze().

1262  {
1263  LocalVector trackDirection = trajState.localDirection();
1264  double cosine = trackDirection.z() / trackDirection.mag();
1265  auto const& Ampls = Cluster->amplitudes();
1266  uint32_t DetId = 0; // is 0 since long time Cluster->geographicalId();
1267  int FirstStrip = Cluster->firstStrip();
1268  int APVId = FirstStrip / 128;
1269  stAPVGain* APV = APVsColl[(DetId << 3) | APVId];
1270  int Saturation = 0;
1271  bool Overlaping = false;
1272  int Charge = 0;
1273  unsigned int NHighStrip = 0;
1274 
1275  if (!IsFarFromBorder(trajState, DetId, iSetup))
1276  return -1;
1277 
1278  if (FirstStrip == 0)
1279  Overlaping = true;
1280  if (FirstStrip == 128)
1281  Overlaping = true;
1282  if (FirstStrip == 256)
1283  Overlaping = true;
1284  if (FirstStrip == 384)
1285  Overlaping = true;
1286  if (FirstStrip == 512)
1287  Overlaping = true;
1288  if (FirstStrip == 640)
1289  Overlaping = true;
1290 
1291  if (FirstStrip <= 127 && FirstStrip + Ampls.size() > 127)
1292  Overlaping = true;
1293  if (FirstStrip <= 255 && FirstStrip + Ampls.size() > 255)
1294  Overlaping = true;
1295  if (FirstStrip <= 383 && FirstStrip + Ampls.size() > 383)
1296  Overlaping = true;
1297  if (FirstStrip <= 511 && FirstStrip + Ampls.size() > 511)
1298  Overlaping = true;
1299  if (FirstStrip <= 639 && FirstStrip + Ampls.size() > 639)
1300  Overlaping = true;
1301 
1302  if (FirstStrip + Ampls.size() == 127)
1303  Overlaping = true;
1304  if (FirstStrip + Ampls.size() == 255)
1305  Overlaping = true;
1306  if (FirstStrip + Ampls.size() == 383)
1307  Overlaping = true;
1308  if (FirstStrip + Ampls.size() == 511)
1309  Overlaping = true;
1310  if (FirstStrip + Ampls.size() == 639)
1311  Overlaping = true;
1312  if (FirstStrip + Ampls.size() == 767)
1313  Overlaping = true;
1314  if (Overlaping)
1315  return -1;
1316 
1317  /*
1318  if(FirstStrip==0 )Overlaping=true;
1319  if(FirstStrip<=255 && FirstStrip+Ampls.size()>255)Overlaping=true;
1320  if(FirstStrip<=511 && FirstStrip+Ampls.size()>511)Overlaping=true;
1321  if(FirstStrip+Ampls.size()==511 )Overlaping=true;
1322  if(FirstStrip+Ampls.size()==767 )Overlaping=true;
1323  if(Overlaping)return -1;
1324 */
1325 
1326  for (unsigned int a = 0; a < Ampls.size(); a++) {
1327  Charge += Ampls[a];
1328  if (Ampls[a] >= 254)
1329  Saturation++;
1330  if (Ampls[a] >= 20)
1331  NHighStrip++;
1332  }
1333  double path = (10.0 * APV->Thickness) / fabs(cosine);
1334  double ClusterChargeOverPath = (double)Charge / path;
1335 
1336  NSatStripInCluster->Fill(Saturation);
1337 
1338  if (Ampls.size() > MaxNrStrips)
1339  return -1;
1340  if (Saturation > 0 && !AllowSaturation)
1341  return -1;
1342  Charge_Vs_PathLength->Fill(path, Charge);
1343  if (APV->Thickness < 0.04)
1344  Charge_Vs_PathLength320->Fill(path, Charge);
1345  if (APV->Thickness > 0.04)
1346  Charge_Vs_PathLength500->Fill(path, Charge);
1347  if (APV->SubDet == StripSubdetector::TIB)
1348  Charge_Vs_PathTIB->Fill(path, Charge);
1349  if (APV->SubDet == StripSubdetector::TID)
1350  Charge_Vs_PathTID->Fill(path, Charge);
1351  if (APV->SubDet == StripSubdetector::TOB)
1352  Charge_Vs_PathTOB->Fill(path, Charge);
1353  if (APV->SubDet == StripSubdetector::TEC) {
1354  Charge_Vs_PathTEC->Fill(path, Charge);
1355  if (APV->Thickness < 0.04)
1356  Charge_Vs_PathTEC1->Fill(path, Charge);
1357  if (APV->Thickness > 0.04)
1358  Charge_Vs_PathTEC2->Fill(path, Charge);
1359  }
1360 
1361  double trans = atan2(trackDirection.y(), trackDirection.x()) * (180 / 3.14159265);
1362  double alpha =
1363  acos(trackDirection.x() / sqrt(pow(trackDirection.x(), 2) + pow(trackDirection.z(), 2))) * (180 / 3.14159265);
1364  double beta =
1365  acos(trackDirection.y() / sqrt(pow(trackDirection.x(), 2) + pow(trackDirection.z(), 2))) * (180 / 3.14159265);
1366 
1367  if (path > 0.4 && path < 0.45) {
1368  Charge_Vs_TransversAngle->Fill(trans, Charge / path);
1369  Charge_Vs_Alpha->Fill(alpha, Charge / path);
1370  Charge_Vs_Beta->Fill(beta, Charge / path);
1371  }
1372 
1373  NStrips_Vs_TransversAngle->Fill(trans, Ampls.size());
1374  NStrips_Vs_Alpha->Fill(alpha, Ampls.size());
1375  NStrips_Vs_Beta->Fill(beta, Ampls.size());
1376 
1377  NHighStripInCluster->Fill(NHighStrip);
1378  // if(NHighStrip==1) Charge_Vs_PathLength_CS1->Fill(path, Charge );
1379  // if(NHighStrip==2) Charge_Vs_PathLength_CS2->Fill(path, Charge );
1380  // if(NHighStrip==3) Charge_Vs_PathLength_CS3->Fill(path, Charge );
1381  // if(NHighStrip==4) Charge_Vs_PathLength_CS4->Fill(path, Charge );
1382  // if(NHighStrip==5) Charge_Vs_PathLength_CS5->Fill(path, Charge );
1383 
1384  HFirstStrip->Fill(FirstStrip);
1385 
1386  if (Validation) {
1387  ClusterChargeOverPath = ClusterChargeOverPath / APV->PreviousGain;
1388  }
1389 
1390  APV_Charge->Fill(APV->Index, ClusterChargeOverPath);
1391  APV_Momentum->Fill(APV->Index, trajState.globalMomentum().mag());
1392  APV_PathLength->Fill(APV->Index, path);
1393 
1394  return ClusterChargeOverPath;
1395 }
static constexpr auto TEC
float alpha
Definition: AMPTWrapper.h:105
LocalVector localDirection() const
float Thickness
Definition: APVGainStruct.h:21
SiStripCluster const & amplitudes() const
bool IsFarFromBorder(TrajectoryStateOnSurface trajState, const uint32_t detid, const edm::EventSetup *iSetup)
T y() const
Definition: PV3DBase.h:60
uint16_t firstStrip() const
T mag() const
Definition: PV3DBase.h:64
std::unordered_map< unsigned int, stAPVGain * > APVsColl
double PreviousGain
Definition: APVGainStruct.h:31
unsigned int Index
Definition: APVGainStruct.h:10
T sqrt(T t)
Definition: SSEVec.h:19
T z() const
Definition: PV3DBase.h:61
static constexpr auto TOB
Definition: DetId.h:17
static constexpr auto TIB
GlobalVector globalMomentum() const
double a
Definition: hdecay.h:119
T x() const
Definition: PV3DBase.h:59
unsigned int SubDet
Definition: APVGainStruct.h:14
static constexpr auto TID
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
std::unique_ptr< SiStripApvGain > SiStripGainFromData::getNewObject ( )
overrideprivatevirtual

Implements ConditionDBWriter< SiStripApvGain >.

Definition at line 1487 of file SiStripGainFromData.cc.

References a, AlgoMode, sistrip::APV, stAPVGain::APVId, APVsCollOrdered, gather_cfg::cout, stAPVGain::DetId, stAPVGain::Gain, getGTfromDQMFile::obj, stAPVGain::PreviousGain, gpuVertexFinder::printf(), and sistrip::SpyUtilities::range().

1487  {
1488  cout << "START getNewObject\n";
1489 
1490  // if( !(strcmp(AlgoMode.c_str(),"WriteOnDB")==0 || strcmp(AlgoMode.c_str(),"SingleJob")==0) )return NULL;
1491  if (!(strcmp(AlgoMode.c_str(), "WriteOnDB") == 0 || strcmp(AlgoMode.c_str(), "SingleJob") == 0))
1492  return std::make_unique<SiStripApvGain>();
1493 
1494  auto obj = std::make_unique<SiStripApvGain>();
1495  std::vector<float>* theSiStripVector = nullptr;
1496  int PreviousDetId = -1;
1497  for (unsigned int a = 0; a < APVsCollOrdered.size(); a++) {
1499  if (APV == nullptr) {
1500  printf("Bug\n");
1501  continue;
1502  }
1503  if (APV->DetId != PreviousDetId) {
1504  if (theSiStripVector != nullptr) {
1505  SiStripApvGain::Range range(theSiStripVector->begin(), theSiStripVector->end());
1506  if (!obj->put(PreviousDetId, range))
1507  printf("Bug to put detId = %i\n", PreviousDetId);
1508  }
1509 
1510  theSiStripVector = new std::vector<float>;
1511  PreviousDetId = APV->DetId;
1512  }
1513  printf("%i | %i | PreviousGain = %7.5f NewGain = %7.5f\n", APV->DetId, APV->APVId, APV->PreviousGain, APV->Gain);
1514  if (theSiStripVector != nullptr) {
1515  theSiStripVector->push_back(APV->Gain);
1516  }
1517  // theSiStripVector->push_back(APV->Gain);
1518  }
1519 
1520  if (theSiStripVector != nullptr) {
1521  SiStripApvGain::Range range(theSiStripVector->begin(), theSiStripVector->end());
1522  if (!obj->put(PreviousDetId, range))
1523  printf("Bug to put detId = %i\n", PreviousDetId);
1524  }
1525 
1526  cout << "END getNewObject\n";
1527  return obj;
1528 }
std::vector< stAPVGain * > APVsCollOrdered
unsigned int APVId
Definition: APVGainStruct.h:13
unsigned int DetId
Definition: APVGainStruct.h:12
const uint16_t range(const Frame &aFrame)
double Gain
Definition: APVGainStruct.h:29
double PreviousGain
Definition: APVGainStruct.h:31
printf("params %d %f %f %f\n", minT, eps, errmax, chi2max)
std::pair< ContainerIterator, ContainerIterator > Range
double a
Definition: hdecay.h:119
tuple cout
Definition: gather_cfg.py:144
void SiStripGainFromData::getPeakOfLandau ( TH1 *  InputHisto,
double *  FitResults,
double  LowRange = 0,
double  HighRange = 5400 
)
private

Definition at line 1438 of file SiStripGainFromData.cc.

References MaxChi2OverNDF, and MinNrEntries.

Referenced by algoEndJob().

1438  {
1439  double adcs = -0.5;
1440  double adcs_err = 0.;
1441  double width = -0.5;
1442  double width_err = 0;
1443  double chi2overndf = -0.5;
1444 
1445  double nr_of_entries = InputHisto->GetEntries();
1446 
1447  if ((unsigned int)nr_of_entries < MinNrEntries) {
1448  FitResults[0] = adcs;
1449  FitResults[1] = adcs_err;
1450  FitResults[2] = width;
1451  FitResults[3] = width_err;
1452  FitResults[4] = chi2overndf;
1453  return;
1454  }
1455 
1456  // perform fit with standard landau
1457  TF1* MyLandau = new TF1("MyLandau", "landau", LowRange, HighRange);
1458  MyLandau->SetParameter("MPV", 300);
1459 
1460  InputHisto->Fit(MyLandau, "QR WW");
1461 
1462  // MPV is parameter 1 (0=constant, 1=MPV, 2=Sigma)
1463  adcs = MyLandau->GetParameter("MPV");
1464  adcs_err = MyLandau->GetParError(1);
1465  width = MyLandau->GetParameter(2);
1466  width_err = MyLandau->GetParError(2);
1467  chi2overndf = MyLandau->GetChisquare() / MyLandau->GetNDF();
1468 
1469  // if still wrong, give up
1470  if (adcs < 2. || chi2overndf > MaxChi2OverNDF) {
1471  adcs = -0.5;
1472  adcs_err = 0.;
1473  width = -0.5;
1474  width_err = 0;
1475  chi2overndf = -0.5;
1476  }
1477 
1478  FitResults[0] = adcs;
1479  FitResults[1] = adcs_err;
1480  FitResults[2] = width;
1481  FitResults[3] = width_err;
1482  FitResults[4] = chi2overndf;
1483 
1484  delete MyLandau;
1485 }
bool SiStripGainFromData::IsFarFromBorder ( TrajectoryStateOnSurface  trajState,
const uint32_t  detid,
const edm::EventSetup iSetup 
)
private

Definition at line 1397 of file SiStripGainFromData.cc.

References Surface::bounds(), gather_cfg::cout, edm::EventSetup::getData(), Bounds::length(), TrajectoryStateOnSurface::localError(), TrajectoryStateOnSurface::localPosition(), LocalTrajectoryError::positionError(), GeomDet::surface(), tkGeomToken_, PV3DBase< T, PVType, FrameType >::y(), and LocalError::yy().

Referenced by ComputeChargeOverPath().

1399  {
1400  const auto& tkGeom = iSetup->getData(tkGeomToken_);
1401 
1402  LocalPoint HitLocalPos = trajState.localPosition();
1403  LocalError HitLocalError = trajState.localError().positionError();
1404 
1405  const GeomDetUnit* it = tkGeom.idToDetUnit(DetId(detid));
1406  if (dynamic_cast<const StripGeomDetUnit*>(it) == nullptr && dynamic_cast<const PixelGeomDetUnit*>(it) == nullptr) {
1407  std::cout << "this detID doesn't seem to belong to the Tracker" << std::endl;
1408  return false;
1409  }
1410 
1411  const BoundPlane plane = it->surface();
1412  const TrapezoidalPlaneBounds* trapezoidalBounds(dynamic_cast<const TrapezoidalPlaneBounds*>(&(plane.bounds())));
1413  const RectangularPlaneBounds* rectangularBounds(dynamic_cast<const RectangularPlaneBounds*>(&(plane.bounds())));
1414 
1415  double DistFromBorder = 1.0;
1416  //double HalfWidth = it->surface().bounds().width() /2.0;
1417  double HalfLength;
1418 
1419  if (trapezoidalBounds) {
1420  std::array<const float, 4> const& parameters = (*trapezoidalBounds).parameters();
1421  HalfLength = parameters[3];
1422  //double t = (HalfLength + HitLocalPos.y()) / (2*HalfLength) ;
1423  //HalfWidth = parameters[0] + (parameters[1]-parameters[0]) * t;
1424  } else if (rectangularBounds) {
1425  //HalfWidth = it->surface().bounds().width() /2.0;
1426  HalfLength = it->surface().bounds().length() / 2.0;
1427  } else {
1428  return false;
1429  }
1430 
1431  // if (fabs(HitLocalPos.x())+HitLocalError.xx() >= (HalfWidth - DistFromBorder) ) return false;//Don't think is really necessary
1432  if (fabs(HitLocalPos.y()) + HitLocalError.yy() >= (HalfLength - DistFromBorder))
1433  return false;
1434 
1435  return true;
1436 }
virtual float length() const =0
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
T y() const
Definition: PV3DBase.h:60
const Bounds & bounds() const
Definition: Surface.h:87
const Plane & surface() const
The nominal surface of the GeomDet.
Definition: GeomDet.h:37
LocalError positionError() const
bool getData(T &iHolder) const
Definition: EventSetup.h:122
float yy() const
Definition: LocalError.h:24
const LocalTrajectoryError & localError() const
Definition: DetId.h:17
tuple cout
Definition: gather_cfg.py:144

Member Data Documentation

std::string SiStripGainFromData::AlgoMode
private
bool SiStripGainFromData::AllowSaturation
private

Definition at line 126 of file SiStripGainFromData.cc.

Referenced by ComputeChargeOverPath(), and SiStripGainFromData().

TH2F* SiStripGainFromData::APV_Charge
private

Definition at line 202 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH1F* SiStripGainFromData::APV_CumulGain
private

Definition at line 207 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::APV_DetId
private

Definition at line 196 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH1F* SiStripGainFromData::APV_Eta
private

Definition at line 198 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH1F* SiStripGainFromData::APV_Gain
private

Definition at line 206 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::APV_Id
private

Definition at line 197 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH2F* SiStripGainFromData::APV_Momentum
private

Definition at line 201 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH1F* SiStripGainFromData::APV_MPV
private

Definition at line 205 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::APV_PathLength
private

Definition at line 203 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH1F* SiStripGainFromData::APV_PathLengthM
private

Definition at line 204 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::APV_PrevGain
private

Definition at line 208 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoBeginRun().

TH1F* SiStripGainFromData::APV_R
private

Definition at line 199 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH1F* SiStripGainFromData::APV_SubDet
private

Definition at line 200 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH1F* SiStripGainFromData::APV_Thickness
private

Definition at line 209 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

std::unordered_map<unsigned int, stAPVGain*> SiStripGainFromData::APVsColl
private

Definition at line 293 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

std::vector<stAPVGain*> SiStripGainFromData::APVsCollOrdered
private

Definition at line 292 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoBeginRun(), algoEndJob(), and getNewObject().

int SiStripGainFromData::CalibrationLevel
private

Definition at line 129 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

TH1F* SiStripGainFromData::Charge_TEC
private

Definition at line 183 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TEC1
private

Definition at line 184 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TEC2
private

Definition at line 185 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TECM
private

Definition at line 187 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TECP
private

Definition at line 186 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TIB
private

Definition at line 178 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TID
private

Definition at line 179 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TIDM
private

Definition at line 181 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TIDP
private

Definition at line 180 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::Charge_TOB
private

Definition at line 182 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::Charge_Vs_Alpha
private

Definition at line 253 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_Beta
private

Definition at line 257 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathLength
private

Definition at line 237 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathLength320
private

Definition at line 238 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathLength500
private

Definition at line 239 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathTEC
private

Definition at line 167 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathTEC1
private

Definition at line 168 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathTEC2
private

Definition at line 169 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathTIB
private

Definition at line 164 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathTID
private

Definition at line 165 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_PathTOB
private

Definition at line 166 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::Charge_Vs_TransversAngle
private

Definition at line 249 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

bool SiStripGainFromData::CheckIfFileExist
private

Definition at line 130 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

bool SiStripGainFromData::CheckLocalAngle
private

Definition at line 115 of file SiStripGainFromData.cc.

Referenced by SiStripGainFromData().

DQMStore* SiStripGainFromData::dqmStore_
private

Definition at line 101 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and SiStripGainFromData().

unsigned int SiStripGainFromData::EEvent
private

Definition at line 280 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::Error_Vs_Entries
private

Definition at line 262 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::Error_Vs_Eta
private

Definition at line 263 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::Error_Vs_MPV
private

Definition at line 261 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::Error_Vs_Phi
private

Definition at line 264 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

unsigned int SiStripGainFromData::ERun
private

Definition at line 279 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

TimeValue_t SiStripGainFromData::ETimestamp
private

Definition at line 281 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and algoBeginJob().

bool SiStripGainFromData::FirstSetOfConstants
private

Definition at line 127 of file SiStripGainFromData.cc.

Referenced by algoBeginRun(), algoEndJob(), and SiStripGainFromData().

TH1F* SiStripGainFromData::FWHM_Vs_PathLength
private

Definition at line 245 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::FWHM_Vs_PathLength320
private

Definition at line 246 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::FWHM_Vs_PathLength500
private

Definition at line 247 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

edm::ESGetToken<SiStripGain, SiStripGainRcd> SiStripGainFromData::gainToken_
private

Definition at line 297 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoBeginRun(), and SiStripGainFromData().

TH1F* SiStripGainFromData::HChi2OverNDF
private

Definition at line 146 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::HFirstStrip
private

Definition at line 273 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::HitLocalPosition
private

Definition at line 268 of file SiStripGainFromData.cc.

TH2F* SiStripGainFromData::HitLocalPositionBefCut
private

Definition at line 269 of file SiStripGainFromData.cc.

TH1F* SiStripGainFromData::HTrackChi2OverNDF
private

Definition at line 147 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::HTrackHits
private

Definition at line 148 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

const edm::Event* SiStripGainFromData::iEvent_
private

Definition at line 113 of file SiStripGainFromData.cc.

Referenced by algoAnalyze().

const edm::EventSetup* SiStripGainFromData::iSetup_
private

Definition at line 112 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH1F* SiStripGainFromData::JobInfo
private

Definition at line 271 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

double SiStripGainFromData::MaxChi2OverNDF
private

Definition at line 118 of file SiStripGainFromData.cc.

Referenced by getPeakOfLandau(), and SiStripGainFromData().

double SiStripGainFromData::MaxMPVError
private

Definition at line 117 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

unsigned int SiStripGainFromData::MaxNrStrips
private

Definition at line 123 of file SiStripGainFromData.cc.

Referenced by ComputeChargeOverPath(), and SiStripGainFromData().

double SiStripGainFromData::MaxTrackChiOverNdf
private

Definition at line 125 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

double SiStripGainFromData::MaxTrackEta
private

Definition at line 122 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

double SiStripGainFromData::MaxTrackMomentum
private

Definition at line 120 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

unsigned int SiStripGainFromData::MinNrEntries
private

Definition at line 116 of file SiStripGainFromData.cc.

Referenced by getPeakOfLandau(), and SiStripGainFromData().

double SiStripGainFromData::MinTrackEta
private

Definition at line 121 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

unsigned int SiStripGainFromData::MinTrackHits
private

Definition at line 124 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

double SiStripGainFromData::MinTrackMomentum
private

Definition at line 119 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

TH1F* SiStripGainFromData::MPV_Vs_Alpha
private

Definition at line 254 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_Beta
private

Definition at line 258 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_Eta
private

Definition at line 190 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTEC
private

Definition at line 153 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTEC1
private

Definition at line 154 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTEC2
private

Definition at line 155 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTIB
private

Definition at line 150 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTID
private

Definition at line 151 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_EtaTOB
private

Definition at line 152 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathLength
private

Definition at line 241 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathLength320
private

Definition at line 242 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathLength500
private

Definition at line 243 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTEC
private

Definition at line 174 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTEC1
private

Definition at line 175 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTEC2
private

Definition at line 176 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTIB
private

Definition at line 171 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTID
private

Definition at line 172 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_PathTOB
private

Definition at line 173 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_Phi
private

Definition at line 189 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTEC
private

Definition at line 160 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTEC1
private

Definition at line 161 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTEC2
private

Definition at line 162 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTIB
private

Definition at line 157 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTID
private

Definition at line 158 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_PhiTOB
private

Definition at line 159 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::MPV_Vs_R
private

Definition at line 191 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPV_Vs_TransversAngle
private

Definition at line 250 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPVs
private

Definition at line 211 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPVs320
private

Definition at line 212 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::MPVs500
private

Definition at line 213 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

unsigned int SiStripGainFromData::NEvent
private

Definition at line 275 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::NHighStripInCluster
private

Definition at line 218 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::NoMPV_Vs_EtaPhi
private

Definition at line 266 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

TH1F* SiStripGainFromData::NSatStripInCluster
private

Definition at line 217 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::NStrips_Vs_Alpha
private

Definition at line 255 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::NStrips_Vs_Beta
private

Definition at line 259 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and ComputeChargeOverPath().

TH2F* SiStripGainFromData::NStrips_Vs_TransversAngle
private

Definition at line 251 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), algoEndJob(), and ComputeChargeOverPath().

TH1F* SiStripGainFromData::NumberOfEntriesByAPV
private

Definition at line 145 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and algoEndJob().

std::string SiStripGainFromData::OutputGains
private

Definition at line 133 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

std::string SiStripGainFromData::OutputHistos
private

Definition at line 134 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().

unsigned int SiStripGainFromData::SEvent
private

Definition at line 277 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

unsigned int SiStripGainFromData::SRun
private

Definition at line 276 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

TimeValue_t SiStripGainFromData::STimestamp
private

Definition at line 278 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and algoBeginJob().

edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> SiStripGainFromData::tkGeomToken_
private

Definition at line 296 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), IsFarFromBorder(), and SiStripGainFromData().

MonitorElement* SiStripGainFromData::tmp
private

Definition at line 140 of file SiStripGainFromData.cc.

Referenced by algoBeginJob().

TH2F* SiStripGainFromData::Tracks_P_Vs_Eta
private

Definition at line 142 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

TH2F* SiStripGainFromData::Tracks_Pt_Vs_Eta
private

Definition at line 143 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), algoBeginJob(), and algoEndJob().

std::string SiStripGainFromData::TrajToTrackLabel
private

Definition at line 136 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

std::string SiStripGainFromData::TrajToTrackProducer
private

Definition at line 135 of file SiStripGainFromData.cc.

Referenced by algoAnalyze(), and SiStripGainFromData().

edm::ESGetToken<TrackerTopology, TrackerTopologyRcd> SiStripGainFromData::tTopoToken_
private

Definition at line 295 of file SiStripGainFromData.cc.

Referenced by algoBeginJob(), and SiStripGainFromData().

bool SiStripGainFromData::Validation
private
vector<string> SiStripGainFromData::VInputFiles
private

Definition at line 138 of file SiStripGainFromData.cc.

Referenced by algoEndJob(), and SiStripGainFromData().